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
@@ -10,7 +10,7 @@ export class ItineraryService {
10
10
  * @returns any OK
11
11
  * @throws ApiError
12
12
  */
13
- static itineraryList(page, limit, search) {
13
+ itineraryList(page, limit, search) {
14
14
  return __request(OpenAPI, {
15
15
  method: 'GET',
16
16
  url: '/itineraries',
@@ -28,7 +28,7 @@ export class ItineraryService {
28
28
  * @returns DTOItineraryRead OK
29
29
  * @throws ApiError
30
30
  */
31
- static itineraryCreate(requestBody) {
31
+ itineraryCreate(requestBody) {
32
32
  return __request(OpenAPI, {
33
33
  method: 'POST',
34
34
  url: '/itineraries',
@@ -43,7 +43,7 @@ export class ItineraryService {
43
43
  * @returns DTOItineraryRead OK
44
44
  * @throws ApiError
45
45
  */
46
- static itineraryGet(itineraryId) {
46
+ itineraryGet(itineraryId) {
47
47
  return __request(OpenAPI, {
48
48
  method: 'GET',
49
49
  url: '/itineraries/{itineraryId}',
@@ -60,7 +60,7 @@ export class ItineraryService {
60
60
  * @returns DTOItineraryRead OK
61
61
  * @throws ApiError
62
62
  */
63
- static itineraryUpdate(itineraryId, requestBody) {
63
+ itineraryUpdate(itineraryId, requestBody) {
64
64
  return __request(OpenAPI, {
65
65
  method: 'PATCH',
66
66
  url: '/itineraries/{itineraryId}',
@@ -78,7 +78,7 @@ export class ItineraryService {
78
78
  * @returns any OK
79
79
  * @throws ApiError
80
80
  */
81
- static itineraryDelete(itineraryId) {
81
+ itineraryDelete(itineraryId) {
82
82
  return __request(OpenAPI, {
83
83
  method: 'DELETE',
84
84
  url: '/itineraries/{itineraryId}',
@@ -87,38 +87,6 @@ export class ItineraryService {
87
87
  },
88
88
  });
89
89
  }
90
- /**
91
- * List Persons
92
- * List swoopers
93
- * @param region Region name
94
- * @returns SwooperResponse OK
95
- * @throws ApiError
96
- */
97
- static personList(region) {
98
- return __request(OpenAPI, {
99
- method: 'GET',
100
- url: '/persons',
101
- query: {
102
- 'region': region,
103
- },
104
- });
105
- }
106
- /**
107
- * Get Person
108
- * Get swooper via id
109
- * @param id Object Id
110
- * @returns Member OK
111
- * @throws ApiError
112
- */
113
- static personGet(id) {
114
- return __request(OpenAPI, {
115
- method: 'GET',
116
- url: '/persons/{id}',
117
- path: {
118
- 'id': id,
119
- },
120
- });
121
- }
122
90
  /**
123
91
  * Sync Itinerary
124
92
  * Sync an itinerary with swoop
@@ -126,9 +94,9 @@ export class ItineraryService {
126
94
  * @returns DTOItineraryRead OK
127
95
  * @throws ApiError
128
96
  */
129
- static sync(itineraryId) {
97
+ sync(itineraryId) {
130
98
  return __request(OpenAPI, {
131
- method: 'GET',
99
+ method: 'POST',
132
100
  url: '/sync/{itineraryId}',
133
101
  path: {
134
102
  'itineraryId': itineraryId,
@@ -136,110 +104,34 @@ export class ItineraryService {
136
104
  });
137
105
  }
138
106
  /**
139
- * List Partners
140
- * List all partners
107
+ * List Regions
108
+ * List all regions
141
109
  * @param page Pagination, starting at page 1
142
- * @param region Region name
143
- * @param itemsPerPage Items per page
144
- * @returns PartnerResponse OK
110
+ * @param limit Number of items per page
111
+ * @returns any OK
145
112
  * @throws ApiError
146
113
  */
147
- static partnerList(page, region, itemsPerPage) {
114
+ regionList(page, limit) {
148
115
  return __request(OpenAPI, {
149
116
  method: 'GET',
150
- url: '/partner',
117
+ url: '/regions',
151
118
  query: {
152
119
  'page': page,
153
- 'region': region,
154
- 'itemsPerPage': itemsPerPage,
155
- },
156
- });
157
- }
158
- /**
159
- * Get Partner
160
- * Get partner via id
161
- * @param id Object Id
162
- * @returns Partner OK
163
- * @throws ApiError
164
- */
165
- static partnerGet(id) {
166
- return __request(OpenAPI, {
167
- method: 'GET',
168
- url: '/partner/{id}',
169
- path: {
170
- 'id': id,
171
- },
172
- });
173
- }
174
- /**
175
- * List Travellers
176
- * List all travellers
177
- * @param enquiryId Enquiry Id
178
- * @param region Region
179
- * @returns TravellerResponse OK
180
- * @throws ApiError
181
- */
182
- static travellerList(enquiryId, region) {
183
- return __request(OpenAPI, {
184
- method: 'GET',
185
- url: '/traveller',
186
- query: {
187
- 'enquiry_id': enquiryId,
188
- 'region': region,
189
- },
190
- });
191
- }
192
- /**
193
- * Get Traveller
194
- * Get traveller via id
195
- * @param id Object Id
196
- * @returns Traveller OK
197
- * @throws ApiError
198
- */
199
- static travellerGet(id) {
200
- return __request(OpenAPI, {
201
- method: 'GET',
202
- url: '/traveller/{id}',
203
- path: {
204
- 'id': id,
120
+ 'limit': limit,
205
121
  },
206
122
  });
207
123
  }
208
124
  /**
209
- * List Booking Items
210
- * List all booking items
211
- * @returns BookingItemResponse OK
212
- * @throws ApiError
213
- */
214
- static bookingItemList() {
215
- return __request(OpenAPI, {
216
- method: 'GET',
217
- url: '/bookingitem',
218
- });
219
- }
220
- /**
221
- * List Currencies
222
- * List all currencies
223
- * @returns CurrencyItemResponse OK
224
- * @throws ApiError
225
- */
226
- static currencyList() {
227
- return __request(OpenAPI, {
228
- method: 'GET',
229
- url: '/currency',
230
- });
231
- }
232
- /**
233
- * Audit
234
- * Audit
125
+ * Create Region
126
+ * Create a region
235
127
  * @param requestBody
236
- * @returns any OK
128
+ * @returns DTORegionRead OK
237
129
  * @throws ApiError
238
130
  */
239
- static audit(requestBody) {
131
+ regionCreate(requestBody) {
240
132
  return __request(OpenAPI, {
241
- method: 'GET',
242
- url: '/audit',
133
+ method: 'POST',
134
+ url: '/regions',
243
135
  body: requestBody,
244
136
  mediaType: 'application/json',
245
137
  });
@@ -1,66 +1,48 @@
1
- export type { OpenAPIConfig } from './core/OpenAPI';
2
- export type { Address as AddressSwoop } from './models/Address';
3
- export type { Address_jsonld as Address_jsonldSwoop } from './models/Address_jsonld';
4
- export type { BookingItemType as BookingItemTypeSwoop } from './models/BookingItemType';
5
- export type { BookingItemType_jsonld as BookingItemType_jsonldSwoop } from './models/BookingItemType_jsonld';
6
- export type { Category as CategorySwoop } from './models/Category';
7
- export type { Category_jsonld as Category_jsonldSwoop } from './models/Category_jsonld';
8
- export type { Country as CountrySwoop } from './models/Country';
9
- export type { Country_jsonld as Country_jsonldSwoop } from './models/Country_jsonld';
10
- export type { Currency as CurrencySwoop } from './models/Currency';
11
- export type { Currency_jsonld as Currency_jsonldSwoop } from './models/Currency_jsonld';
12
- export type { Customer as CustomerSwoop } from './models/Customer';
13
- export type { Customer_jsonld as Customer_jsonldSwoop } from './models/Customer_jsonld';
14
- export type { CustomerLookup as CustomerLookupSwoop } from './models/CustomerLookup';
15
- export type { CustomerLookup_jsonld as CustomerLookup_jsonldSwoop } from './models/CustomerLookup_jsonld';
16
- export type { CustomerLookupCXPerson as CustomerLookupCXPersonSwoop } from './models/CustomerLookupCXPerson';
17
- export type { CustomerLookupCXPerson_jsonld as CustomerLookupCXPerson_jsonldSwoop } from './models/CustomerLookupCXPerson_jsonld';
18
- export type { CustomerLookupEnquiry as CustomerLookupEnquirySwoop } from './models/CustomerLookupEnquiry';
19
- export type { CustomerLookupEnquiry_jsonld as CustomerLookupEnquiry_jsonldSwoop } from './models/CustomerLookupEnquiry_jsonld';
20
- export type { CustomerLookupSalesPerson as CustomerLookupSalesPersonSwoop } from './models/CustomerLookupSalesPerson';
21
- export type { CustomerLookupSalesPerson_jsonld as CustomerLookupSalesPerson_jsonldSwoop } from './models/CustomerLookupSalesPerson_jsonld';
22
- export type { EmergencyDetails as EmergencyDetailsSwoop } from './models/EmergencyDetails';
23
- export type { EmergencyDetails_jsonld as EmergencyDetails_jsonldSwoop } from './models/EmergencyDetails_jsonld';
24
- export type { Enquiry as EnquirySwoop } from './models/Enquiry';
25
- export type { Enquiry_jsonld as Enquiry_jsonldSwoop } from './models/Enquiry_jsonld';
26
- export type { EnquiryPerson as EnquiryPersonSwoop } from './models/EnquiryPerson';
27
- export type { EnquiryPerson_jsonld as EnquiryPerson_jsonldSwoop } from './models/EnquiryPerson_jsonld';
28
- export type { EnquiryStatus as EnquiryStatusSwoop } from './models/EnquiryStatus';
29
- export type { EnquiryStatus_jsonld as EnquiryStatus_jsonldSwoop } from './models/EnquiryStatus_jsonld';
30
- export type { Partner as PartnerSwoop } from './models/Partner';
31
- export type { Partner_jsonld as Partner_jsonldSwoop } from './models/Partner_jsonld';
32
- export type { Passport as PassportSwoop } from './models/Passport';
33
- export type { Passport_jsonld as Passport_jsonldSwoop } from './models/Passport_jsonld';
34
- export type { Payment as PaymentSwoop } from './models/Payment';
35
- export type { Payment_jsonld as Payment_jsonldSwoop } from './models/Payment_jsonld';
36
- export type { PaymentType as PaymentTypeSwoop } from './models/PaymentType';
37
- export type { PaymentType_jsonld as PaymentType_jsonldSwoop } from './models/PaymentType_jsonld';
38
- export type { Person as PersonSwoop } from './models/Person';
39
- export type { Person_jsonld as Person_jsonldSwoop } from './models/Person_jsonld';
40
- export type { PublishState as PublishStateSwoop } from './models/PublishState';
41
- export type { PublishState_jsonld as PublishState_jsonldSwoop } from './models/PublishState_jsonld';
42
- export type { Status as StatusSwoop } from './models/Status';
43
- export type { Status_jsonld as Status_jsonldSwoop } from './models/Status_jsonld';
44
- export type { Traveller as TravellerSwoop } from './models/Traveller';
45
- export type { Traveller_jsonld as Traveller_jsonldSwoop } from './models/Traveller_jsonld';
46
- export type { TravellerGroup as TravellerGroupSwoop } from './models/TravellerGroup';
47
- export type { TravellerGroup_jsonld as TravellerGroup_jsonldSwoop } from './models/TravellerGroup_jsonld';
48
- export type { Trip as TripSwoop } from './models/Trip';
49
- export type { Trip_jsonld as Trip_jsonldSwoop } from './models/Trip_jsonld';
50
- import { BookingItemTypeService } from './services/BookingItemTypeService';
51
- import { CategoryService } from './services/CategoryService';
52
- import { CurrencyService } from './services/CurrencyService';
53
- import { CustomerService } from './services/CustomerService';
54
- import { CustomerLookupService } from './services/CustomerLookupService';
55
- import { EnquiryService } from './services/EnquiryService';
56
- import { EnquiryStatusService } from './services/EnquiryStatusService';
57
- import { PartnerService } from './services/PartnerService';
58
- import { PaymentService } from './services/PaymentService';
59
- import { PersonService } from './services/PersonService';
60
- import { TravellerService } from './services/TravellerService';
61
- import { TripService } from './services/TripService';
62
- type SwoopService = StaticMethods<typeof BookingItemTypeService> & StaticMethods<typeof CategoryService> & StaticMethods<typeof CurrencyService> & StaticMethods<typeof CustomerService> & StaticMethods<typeof CustomerLookupService> & StaticMethods<typeof EnquiryService> & StaticMethods<typeof EnquiryStatusService> & StaticMethods<typeof PartnerService> & StaticMethods<typeof PaymentService> & StaticMethods<typeof PersonService> & StaticMethods<typeof TravellerService> & StaticMethods<typeof TripService>;
63
- type StaticMethods<T> = {
64
- [K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: T[K];
65
- };
66
- export declare const SwoopService: SwoopService;
1
+ export type { AddressSwoop } from './index';
2
+ export type { Address_jsonldSwoop } from './index';
3
+ export type { BookingItemTypeSwoop } from './index';
4
+ export type { BookingItemType_jsonldSwoop } from './index';
5
+ export type { CategorySwoop } from './index';
6
+ export type { Category_jsonldSwoop } from './index';
7
+ export type { CountrySwoop } from './index';
8
+ export type { Country_jsonldSwoop } from './index';
9
+ export type { CurrencySwoop } from './index';
10
+ export type { Currency_jsonldSwoop } from './index';
11
+ export type { CustomerSwoop } from './index';
12
+ export type { Customer_jsonldSwoop } from './index';
13
+ export type { CustomerLookupSwoop } from './index';
14
+ export type { CustomerLookup_jsonldSwoop } from './index';
15
+ export type { CustomerLookupCXPersonSwoop } from './index';
16
+ export type { CustomerLookupCXPerson_jsonldSwoop } from './index';
17
+ export type { CustomerLookupEnquirySwoop } from './index';
18
+ export type { CustomerLookupEnquiry_jsonldSwoop } from './index';
19
+ export type { CustomerLookupSalesPersonSwoop } from './index';
20
+ export type { CustomerLookupSalesPerson_jsonldSwoop } from './index';
21
+ export type { EmergencyDetailsSwoop } from './index';
22
+ export type { EmergencyDetails_jsonldSwoop } from './index';
23
+ export type { EnquirySwoop } from './index';
24
+ export type { Enquiry_jsonldSwoop } from './index';
25
+ export type { EnquiryPersonSwoop } from './index';
26
+ export type { EnquiryPerson_jsonldSwoop } from './index';
27
+ export type { EnquiryStatusSwoop } from './index';
28
+ export type { EnquiryStatus_jsonldSwoop } from './index';
29
+ export type { PartnerSwoop } from './index';
30
+ export type { Partner_jsonldSwoop } from './index';
31
+ export type { PassportSwoop } from './index';
32
+ export type { Passport_jsonldSwoop } from './index';
33
+ export type { PaymentSwoop } from './index';
34
+ export type { Payment_jsonldSwoop } from './index';
35
+ export type { PaymentTypeSwoop } from './index';
36
+ export type { PaymentType_jsonldSwoop } from './index';
37
+ export type { PersonSwoop } from './index';
38
+ export type { Person_jsonldSwoop } from './index';
39
+ export type { PublishStateSwoop } from './index';
40
+ export type { PublishState_jsonldSwoop } from './index';
41
+ export type { StatusSwoop } from './index';
42
+ export type { Status_jsonldSwoop } from './index';
43
+ export type { TravellerSwoop } from './index';
44
+ export type { Traveller_jsonldSwoop } from './index';
45
+ export type { TravellerGroupSwoop } from './index';
46
+ export type { TravellerGroup_jsonldSwoop } from './index';
47
+ export type { TripSwoop } from './index';
48
+ export type { Trip_jsonldSwoop } from './index';
@@ -1,30 +1,2 @@
1
1
  // GENERATED FILE DO NOT EDIT //
2
- import { BookingItemTypeService } from './services/BookingItemTypeService';
3
- import { CategoryService } from './services/CategoryService';
4
- import { CurrencyService } from './services/CurrencyService';
5
- import { CustomerService } from './services/CustomerService';
6
- import { CustomerLookupService } from './services/CustomerLookupService';
7
- import { EnquiryService } from './services/EnquiryService';
8
- import { EnquiryStatusService } from './services/EnquiryStatusService';
9
- import { PartnerService } from './services/PartnerService';
10
- import { PaymentService } from './services/PaymentService';
11
- import { PersonService } from './services/PersonService';
12
- import { TravellerService } from './services/TravellerService';
13
- import { TripService } from './services/TripService';
14
- const services = [BookingItemTypeService, CategoryService, CurrencyService, CustomerService, CustomerLookupService, EnquiryService, EnquiryStatusService, PartnerService, PaymentService, PersonService, TravellerService, TripService];
15
- function flatten() {
16
- const flattened = {};
17
- services.forEach((service) => {
18
- const methodNames = Object.getOwnPropertyNames(service)
19
- .filter(name => name !== 'constructor' &&
20
- name !== 'prototype' &&
21
- name !== 'length' &&
22
- name !== 'name' &&
23
- typeof service[name] === 'function');
24
- methodNames.forEach(methodName => {
25
- flattened[methodName] = service[methodName];
26
- });
27
- });
28
- return flattened;
29
- }
30
- export const SwoopService = flatten();
2
+ export {};
@@ -50,15 +50,4 @@ export type { TravellerGroup as TravellerGroupSwoop } from './models/TravellerGr
50
50
  export type { TravellerGroup_jsonld as TravellerGroup_jsonldSwoop } from './models/TravellerGroup_jsonld';
51
51
  export type { Trip as TripSwoop } from './models/Trip';
52
52
  export type { Trip_jsonld as Trip_jsonldSwoop } from './models/Trip_jsonld';
53
- export { BookingItemTypeService } from './services/BookingItemTypeService';
54
- export { CategoryService } from './services/CategoryService';
55
- export { CurrencyService } from './services/CurrencyService';
56
- export { CustomerService } from './services/CustomerService';
57
- export { CustomerLookupService } from './services/CustomerLookupService';
58
- export { EnquiryService } from './services/EnquiryService';
59
- export { EnquiryStatusService } from './services/EnquiryStatusService';
60
- export { PartnerService } from './services/PartnerService';
61
- export { PaymentService } from './services/PaymentService';
62
- export { PersonService } from './services/PersonService';
63
- export { TravellerService } from './services/TravellerService';
64
- export { TripService } from './services/TripService';
53
+ export { SwoopService } from './services/SwoopService';
@@ -5,15 +5,4 @@
5
5
  export { ApiError } from './core/ApiError';
6
6
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
7
7
  export { OpenAPI } from './core/OpenAPI';
8
- export { BookingItemTypeService } from './services/BookingItemTypeService';
9
- export { CategoryService } from './services/CategoryService';
10
- export { CurrencyService } from './services/CurrencyService';
11
- export { CustomerService } from './services/CustomerService';
12
- export { CustomerLookupService } from './services/CustomerLookupService';
13
- export { EnquiryService } from './services/EnquiryService';
14
- export { EnquiryStatusService } from './services/EnquiryStatusService';
15
- export { PartnerService } from './services/PartnerService';
16
- export { PaymentService } from './services/PaymentService';
17
- export { PersonService } from './services/PersonService';
18
- export { TravellerService } from './services/TravellerService';
19
- export { TripService } from './services/TripService';
8
+ export { SwoopService } from './services/SwoopService';