swoop-common 2.0.5 → 2.0.7

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 (52) hide show
  1. package/dist/api/generated/core/exports.d.ts +6 -6
  2. package/dist/api/generated/core/index.d.ts +6 -7
  3. package/dist/api/generated/core/models/Bundle.d.ts +5 -5
  4. package/dist/api/generated/core/models/BundleDay.d.ts +8 -0
  5. package/dist/api/generated/core/models/Component.d.ts +24 -0
  6. package/dist/api/generated/core/models/ComponentInstance.d.ts +6 -0
  7. package/dist/api/generated/core/models/DTORegionUpdate.d.ts +6 -0
  8. package/dist/api/generated/core/models/Fee.d.ts +9 -0
  9. package/dist/api/generated/core/models/Itinerary.d.ts +14 -0
  10. package/dist/api/generated/core/models/Template.d.ts +13 -0
  11. package/dist/api/generated/itinerary/index.d.ts +6 -7
  12. package/dist/api/generated/itinerary/models/Bundle.d.ts +5 -5
  13. package/dist/api/generated/itinerary/models/BundleDay.d.ts +8 -0
  14. package/dist/api/generated/itinerary/models/Component.d.ts +24 -0
  15. package/dist/api/generated/itinerary/models/ComponentInstance.d.ts +6 -0
  16. package/dist/api/generated/itinerary/models/DTORegionUpdate.d.ts +6 -0
  17. package/dist/api/generated/itinerary/models/Fee.d.ts +9 -0
  18. package/dist/api/generated/itinerary/models/Itinerary.d.ts +14 -0
  19. package/dist/api/generated/itinerary/models/Template.d.ts +13 -0
  20. package/dist/rendering/prebuild/generated/import_generated.d.ts +1 -0
  21. package/dist/rendering/prebuild/generated/import_generated.js +1 -0
  22. package/dist/rendering/renderers/Subset.js +47 -0
  23. package/dist/rendering/type_registration/register.js +16 -2
  24. package/package.json +1 -1
  25. package/dist/api/generated/core/models/BookingResponse.d.ts +0 -19
  26. package/dist/api/generated/core/models/CurrencyResponse.d.ts +0 -20
  27. package/dist/api/generated/core/models/Partner.d.ts +0 -10
  28. package/dist/api/generated/core/models/PartnerResponse.d.ts +0 -28
  29. package/dist/api/generated/core/models/SwooperResponse.d.ts +0 -7
  30. package/dist/api/generated/core/models/Traveller.d.ts +0 -37
  31. package/dist/api/generated/core/models/TravellerResponse.d.ts +0 -87
  32. package/dist/api/generated/itinerary/models/BookingResponse.d.ts +0 -19
  33. package/dist/api/generated/itinerary/models/CurrencyResponse.d.ts +0 -20
  34. package/dist/api/generated/itinerary/models/Partner.d.ts +0 -10
  35. package/dist/api/generated/itinerary/models/PartnerResponse.d.ts +0 -28
  36. package/dist/api/generated/itinerary/models/SwooperResponse.d.ts +0 -7
  37. package/dist/api/generated/itinerary/models/Traveller.d.ts +0 -37
  38. package/dist/api/generated/itinerary/models/TravellerResponse.d.ts +0 -87
  39. package/dist/api/generated/itinerary/models/TravellerResponse.js +0 -1
  40. /package/dist/api/generated/core/models/{BookingResponse.js → BundleDay.js} +0 -0
  41. /package/dist/api/generated/core/models/{CurrencyResponse.js → Component.js} +0 -0
  42. /package/dist/api/generated/core/models/{Partner.js → DTORegionUpdate.js} +0 -0
  43. /package/dist/api/generated/core/models/{PartnerResponse.js → Fee.js} +0 -0
  44. /package/dist/api/generated/core/models/{SwooperResponse.js → Itinerary.js} +0 -0
  45. /package/dist/api/generated/core/models/{Traveller.js → Template.js} +0 -0
  46. /package/dist/api/generated/{core/models/TravellerResponse.js → itinerary/models/BundleDay.js} +0 -0
  47. /package/dist/api/generated/itinerary/models/{BookingResponse.js → Component.js} +0 -0
  48. /package/dist/api/generated/itinerary/models/{CurrencyResponse.js → DTORegionUpdate.js} +0 -0
  49. /package/dist/api/generated/itinerary/models/{Partner.js → Fee.js} +0 -0
  50. /package/dist/api/generated/itinerary/models/{PartnerResponse.js → Itinerary.js} +0 -0
  51. /package/dist/api/generated/itinerary/models/{SwooperResponse.js → Template.js} +0 -0
  52. /package/dist/{api/generated/itinerary/models/Traveller.js → rendering/renderers/Subset.d.ts} +0 -0
@@ -5,15 +5,15 @@ export type { AssignedTravellerGroup } from './index';
5
5
  export type { Assignments } from './index';
6
6
  export type { BookingItem } from './index';
7
7
  export type { BookingItemResponse } from './index';
8
- export type { BookingResponse } from './index';
9
8
  export type { Bundle } from './index';
9
+ export type { BundleDay } from './index';
10
10
  export type { BundleItem } from './index';
11
+ export type { Component } from './index';
11
12
  export type { ComponentDetails } from './index';
12
13
  export type { componentId } from './index';
13
14
  export type { ComponentInstance } from './index';
14
15
  export type { CurrencyItem } from './index';
15
16
  export type { CurrencyItemResponse } from './index';
16
- export type { CurrencyResponse } from './index';
17
17
  export type { DTOComponentCreate } from './index';
18
18
  export type { DTOComponentRead } from './index';
19
19
  export type { DTOComponentUpdate } from './index';
@@ -22,29 +22,29 @@ export type { DTOItineraryRead } from './index';
22
22
  export type { DTOItineraryUpdate } from './index';
23
23
  export type { DTORegionCreate } from './index';
24
24
  export type { DTORegionRead } from './index';
25
+ export type { DTORegionUpdate } from './index';
25
26
  export type { DTOTemplateCreate } from './index';
26
27
  export type { DTOTemplateRead } from './index';
27
28
  export type { DTOTemplateUpdate } from './index';
28
29
  export type { enquiryId } from './index';
30
+ export type { Fee } from './index';
29
31
  export type { Field } from './index';
30
32
  export type { IBEvent } from './index';
31
33
  export type { id } from './index';
32
34
  export type { itemsPerPage } from './index';
35
+ export type { Itinerary } from './index';
33
36
  export type { itineraryId } from './index';
34
37
  export type { Limit } from './index';
35
38
  export type { Member } from './index';
36
39
  export type { Metadata } from './index';
37
40
  export type { Page } from './index';
38
41
  export type { Pagination } from './index';
39
- export type { Partner } from './index';
40
- export type { PartnerResponse } from './index';
41
42
  export type { Region } from './index';
42
43
  export { regionParam } from './index';
43
44
  export { regionRequired } from './index';
44
45
  export type { search } from './index';
45
46
  export type { sortParam } from './index';
46
- export type { SwooperResponse } from './index';
47
+ export type { Template } from './index';
47
48
  export type { templateId } from './index';
48
- export type { TravellerResponse } from './index';
49
49
  export type { UserComponentInstanceField } from './index';
50
50
  export type { ValidationSchemas } from './index';
@@ -7,15 +7,15 @@ export type { AssignedTravellerGroup } from './models/AssignedTravellerGroup';
7
7
  export type { Assignments } from './models/Assignments';
8
8
  export type { BookingItem } from './models/BookingItem';
9
9
  export type { BookingItemResponse } from './models/BookingItemResponse';
10
- export type { BookingResponse } from './models/BookingResponse';
11
10
  export type { Bundle } from './models/Bundle';
11
+ export type { BundleDay } from './models/BundleDay';
12
12
  export type { BundleItem } from './models/BundleItem';
13
+ export type { Component } from './models/Component';
13
14
  export type { ComponentDetails } from './models/ComponentDetails';
14
15
  export type { componentId } from './models/componentId';
15
16
  export type { ComponentInstance } from './models/ComponentInstance';
16
17
  export type { CurrencyItem } from './models/CurrencyItem';
17
18
  export type { CurrencyItemResponse } from './models/CurrencyItemResponse';
18
- export type { CurrencyResponse } from './models/CurrencyResponse';
19
19
  export type { DTOComponentCreate } from './models/DTOComponentCreate';
20
20
  export type { DTOComponentRead } from './models/DTOComponentRead';
21
21
  export type { DTOComponentUpdate } from './models/DTOComponentUpdate';
@@ -24,31 +24,30 @@ export type { DTOItineraryRead } from './models/DTOItineraryRead';
24
24
  export type { DTOItineraryUpdate } from './models/DTOItineraryUpdate';
25
25
  export type { DTORegionCreate } from './models/DTORegionCreate';
26
26
  export type { DTORegionRead } from './models/DTORegionRead';
27
+ export type { DTORegionUpdate } from './models/DTORegionUpdate';
27
28
  export type { DTOTemplateCreate } from './models/DTOTemplateCreate';
28
29
  export type { DTOTemplateRead } from './models/DTOTemplateRead';
29
30
  export type { DTOTemplateUpdate } from './models/DTOTemplateUpdate';
30
31
  export type { enquiryId } from './models/enquiryId';
32
+ export type { Fee } from './models/Fee';
31
33
  export type { Field } from './models/Field';
32
34
  export type { IBEvent } from './models/IBEvent';
33
35
  export type { id } from './models/id';
34
36
  export type { itemsPerPage } from './models/itemsPerPage';
37
+ export type { Itinerary } from './models/Itinerary';
35
38
  export type { itineraryId } from './models/itineraryId';
36
39
  export type { Limit } from './models/Limit';
37
40
  export type { Member } from './models/Member';
38
41
  export type { Metadata } from './models/Metadata';
39
42
  export type { Page } from './models/Page';
40
43
  export type { Pagination } from './models/Pagination';
41
- export type { Partner } from './models/Partner';
42
- export type { PartnerResponse } from './models/PartnerResponse';
43
44
  export type { Region } from './models/Region';
44
45
  export { regionParam } from './models/regionParam';
45
46
  export { regionRequired } from './models/regionRequired';
46
47
  export type { search } from './models/search';
47
48
  export type { sortParam } from './models/sortParam';
48
- export type { SwooperResponse } from './models/SwooperResponse';
49
+ export type { Template } from './models/Template';
49
50
  export type { templateId } from './models/templateId';
50
- export type { Traveller } from './models/Traveller';
51
- export type { TravellerResponse } from './models/TravellerResponse';
52
51
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
53
52
  export type { ValidationSchemas } from './models/ValidationSchemas';
54
53
  export { CoreService } from './services/CoreService';
@@ -1,8 +1,8 @@
1
- import type { BundleItem } from './BundleItem';
1
+ import type { BundleDay } from './BundleDay';
2
2
  export type Bundle = {
3
- startDay: number;
4
- endDay: number;
5
- items: Array<BundleItem>;
3
+ days: Array<BundleDay>;
6
4
  title: string;
7
- summary: string;
5
+ description: string;
6
+ start: string;
7
+ end: string;
8
8
  };
@@ -0,0 +1,8 @@
1
+ import type { BundleItem } from './BundleItem';
2
+ export type BundleDay = {
3
+ title?: string;
4
+ description?: string;
5
+ items?: Array<BundleItem>;
6
+ startDay?: string;
7
+ endDay?: string;
8
+ };
@@ -0,0 +1,24 @@
1
+ import type { Bundle } from './Bundle';
2
+ import type { ComponentDetails } from './ComponentDetails';
3
+ import type { Field } from './Field';
4
+ import type { Metadata } from './Metadata';
5
+ export type Component = {
6
+ /**
7
+ * Unique identifier
8
+ */
9
+ id: string;
10
+ orgId: string;
11
+ templateId: string;
12
+ revisionGroupId: string;
13
+ revision: number;
14
+ metadata: Metadata;
15
+ name: string;
16
+ componentFields: Array<Field>;
17
+ partners: Array<string>;
18
+ startDate?: string | null;
19
+ endDate?: string | null;
20
+ duration?: number | null;
21
+ details: ComponentDetails;
22
+ bundle: Bundle;
23
+ state?: string | null;
24
+ };
@@ -11,4 +11,10 @@ export type ComponentInstance = {
11
11
  userComponentInstanceFields: Array<UserComponentInstanceField>;
12
12
  assignedPassengers: Array<AssignedPassenger>;
13
13
  assignedTravellerGroups: Array<AssignedTravellerGroup>;
14
+ startDate?: string;
15
+ endDate?: string;
16
+ price?: number;
17
+ currency?: string;
18
+ commissionPercent?: number;
19
+ partner?: string;
14
20
  };
@@ -0,0 +1,6 @@
1
+ export type DTORegionUpdate = {
2
+ name: string;
3
+ description: string;
4
+ destination: string;
5
+ images: Array<string>;
6
+ };
@@ -0,0 +1,9 @@
1
+ import type { AssignedPassenger } from './AssignedPassenger';
2
+ export type Fee = {
3
+ name: string;
4
+ reason: string;
5
+ type: string;
6
+ price: number;
7
+ currency: string;
8
+ assignedPassenger: AssignedPassenger;
9
+ };
@@ -0,0 +1,14 @@
1
+ import type { ComponentInstance } from './ComponentInstance';
2
+ import type { Fee } from './Fee';
3
+ import type { Metadata } from './Metadata';
4
+ export type Itinerary = {
5
+ /**
6
+ * Unique identifier
7
+ */
8
+ id: string;
9
+ title: string;
10
+ enquirerId: string;
11
+ metadata: Metadata;
12
+ componentInstances: Array<ComponentInstance>;
13
+ fees: Array<Fee>;
14
+ };
@@ -0,0 +1,13 @@
1
+ import type { Metadata } from './Metadata';
2
+ import type { ValidationSchemas } from './ValidationSchemas';
3
+ export type Template = {
4
+ id: string;
5
+ orgId: string;
6
+ parentRevisionGroupId: string;
7
+ revisionGroupId: string;
8
+ revision: number;
9
+ metadata: Metadata;
10
+ name: string;
11
+ masterSchema: string;
12
+ validationSchemas: ValidationSchemas;
13
+ };
@@ -7,15 +7,15 @@ export type { AssignedTravellerGroup } from './models/AssignedTravellerGroup';
7
7
  export type { Assignments } from './models/Assignments';
8
8
  export type { BookingItem } from './models/BookingItem';
9
9
  export type { BookingItemResponse } from './models/BookingItemResponse';
10
- export type { BookingResponse } from './models/BookingResponse';
11
10
  export type { Bundle } from './models/Bundle';
11
+ export type { BundleDay } from './models/BundleDay';
12
12
  export type { BundleItem } from './models/BundleItem';
13
+ export type { Component } from './models/Component';
13
14
  export type { ComponentDetails } from './models/ComponentDetails';
14
15
  export type { componentId } from './models/componentId';
15
16
  export type { ComponentInstance } from './models/ComponentInstance';
16
17
  export type { CurrencyItem } from './models/CurrencyItem';
17
18
  export type { CurrencyItemResponse } from './models/CurrencyItemResponse';
18
- export type { CurrencyResponse } from './models/CurrencyResponse';
19
19
  export type { DTOComponentCreate } from './models/DTOComponentCreate';
20
20
  export type { DTOComponentRead } from './models/DTOComponentRead';
21
21
  export type { DTOComponentUpdate } from './models/DTOComponentUpdate';
@@ -24,31 +24,30 @@ export type { DTOItineraryRead } from './models/DTOItineraryRead';
24
24
  export type { DTOItineraryUpdate } from './models/DTOItineraryUpdate';
25
25
  export type { DTORegionCreate } from './models/DTORegionCreate';
26
26
  export type { DTORegionRead } from './models/DTORegionRead';
27
+ export type { DTORegionUpdate } from './models/DTORegionUpdate';
27
28
  export type { DTOTemplateCreate } from './models/DTOTemplateCreate';
28
29
  export type { DTOTemplateRead } from './models/DTOTemplateRead';
29
30
  export type { DTOTemplateUpdate } from './models/DTOTemplateUpdate';
30
31
  export type { enquiryId } from './models/enquiryId';
32
+ export type { Fee } from './models/Fee';
31
33
  export type { Field } from './models/Field';
32
34
  export type { IBEvent } from './models/IBEvent';
33
35
  export type { id } from './models/id';
34
36
  export type { itemsPerPage } from './models/itemsPerPage';
37
+ export type { Itinerary } from './models/Itinerary';
35
38
  export type { itineraryId } from './models/itineraryId';
36
39
  export type { Limit } from './models/Limit';
37
40
  export type { Member } from './models/Member';
38
41
  export type { Metadata } from './models/Metadata';
39
42
  export type { Page } from './models/Page';
40
43
  export type { Pagination } from './models/Pagination';
41
- export type { Partner } from './models/Partner';
42
- export type { PartnerResponse } from './models/PartnerResponse';
43
44
  export type { Region } from './models/Region';
44
45
  export { regionParam } from './models/regionParam';
45
46
  export { regionRequired } from './models/regionRequired';
46
47
  export type { search } from './models/search';
47
48
  export type { sortParam } from './models/sortParam';
48
- export type { SwooperResponse } from './models/SwooperResponse';
49
+ export type { Template } from './models/Template';
49
50
  export type { templateId } from './models/templateId';
50
- export type { Traveller } from './models/Traveller';
51
- export type { TravellerResponse } from './models/TravellerResponse';
52
51
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
53
52
  export type { ValidationSchemas } from './models/ValidationSchemas';
54
53
  export { ItineraryService } from './services/ItineraryService';
@@ -1,8 +1,8 @@
1
- import type { BundleItem } from './BundleItem';
1
+ import type { BundleDay } from './BundleDay';
2
2
  export type Bundle = {
3
- startDay: number;
4
- endDay: number;
5
- items: Array<BundleItem>;
3
+ days: Array<BundleDay>;
6
4
  title: string;
7
- summary: string;
5
+ description: string;
6
+ start: string;
7
+ end: string;
8
8
  };
@@ -0,0 +1,8 @@
1
+ import type { BundleItem } from './BundleItem';
2
+ export type BundleDay = {
3
+ title?: string;
4
+ description?: string;
5
+ items?: Array<BundleItem>;
6
+ startDay?: string;
7
+ endDay?: string;
8
+ };
@@ -0,0 +1,24 @@
1
+ import type { Bundle } from './Bundle';
2
+ import type { ComponentDetails } from './ComponentDetails';
3
+ import type { Field } from './Field';
4
+ import type { Metadata } from './Metadata';
5
+ export type Component = {
6
+ /**
7
+ * Unique identifier
8
+ */
9
+ id: string;
10
+ orgId: string;
11
+ templateId: string;
12
+ revisionGroupId: string;
13
+ revision: number;
14
+ metadata: Metadata;
15
+ name: string;
16
+ componentFields: Array<Field>;
17
+ partners: Array<string>;
18
+ startDate?: string | null;
19
+ endDate?: string | null;
20
+ duration?: number | null;
21
+ details: ComponentDetails;
22
+ bundle: Bundle;
23
+ state?: string | null;
24
+ };
@@ -11,4 +11,10 @@ export type ComponentInstance = {
11
11
  userComponentInstanceFields: Array<UserComponentInstanceField>;
12
12
  assignedPassengers: Array<AssignedPassenger>;
13
13
  assignedTravellerGroups: Array<AssignedTravellerGroup>;
14
+ startDate?: string;
15
+ endDate?: string;
16
+ price?: number;
17
+ currency?: string;
18
+ commissionPercent?: number;
19
+ partner?: string;
14
20
  };
@@ -0,0 +1,6 @@
1
+ export type DTORegionUpdate = {
2
+ name: string;
3
+ description: string;
4
+ destination: string;
5
+ images: Array<string>;
6
+ };
@@ -0,0 +1,9 @@
1
+ import type { AssignedPassenger } from './AssignedPassenger';
2
+ export type Fee = {
3
+ name: string;
4
+ reason: string;
5
+ type: string;
6
+ price: number;
7
+ currency: string;
8
+ assignedPassenger: AssignedPassenger;
9
+ };
@@ -0,0 +1,14 @@
1
+ import type { ComponentInstance } from './ComponentInstance';
2
+ import type { Fee } from './Fee';
3
+ import type { Metadata } from './Metadata';
4
+ export type Itinerary = {
5
+ /**
6
+ * Unique identifier
7
+ */
8
+ id: string;
9
+ title: string;
10
+ enquirerId: string;
11
+ metadata: Metadata;
12
+ componentInstances: Array<ComponentInstance>;
13
+ fees: Array<Fee>;
14
+ };
@@ -0,0 +1,13 @@
1
+ import type { Metadata } from './Metadata';
2
+ import type { ValidationSchemas } from './ValidationSchemas';
3
+ export type Template = {
4
+ id: string;
5
+ orgId: string;
6
+ parentRevisionGroupId: string;
7
+ revisionGroupId: string;
8
+ revision: number;
9
+ metadata: Metadata;
10
+ name: string;
11
+ masterSchema: string;
12
+ validationSchemas: ValidationSchemas;
13
+ };
@@ -6,6 +6,7 @@ import "../../renderers/Example";
6
6
  import "../../renderers/Image/ImageForm";
7
7
  import "../../renderers/Image/ImagePresentation";
8
8
  import "../../renderers/StagedText";
9
+ import "../../renderers/Subset";
9
10
  import "../../renderers/TemplatePicker";
10
11
  import "../../renderers/textfield/MultilineForm";
11
12
  import "../../renderers/textfield/MultilinePresentation";
@@ -8,6 +8,7 @@ import "../../renderers/Example";
8
8
  import "../../renderers/Image/ImageForm";
9
9
  import "../../renderers/Image/ImagePresentation";
10
10
  import "../../renderers/StagedText";
11
+ import "../../renderers/Subset";
11
12
  import "../../renderers/TemplatePicker";
12
13
  import "../../renderers/textfield/MultilineForm";
13
14
  import "../../renderers/textfield/MultilinePresentation";
@@ -0,0 +1,47 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import React, { useEffect, useState } from 'react';
11
+ import { useLocalErrors } from '../hooks/errors';
12
+ import { ComponentPool } from '../registry/types';
13
+ import { registerComponent } from '../registry/components';
14
+ import { CoreService } from '../../api/generated/core';
15
+ const FormRendererSubset = ({ data, handleChange, path, label, enabled, schema }) => {
16
+ // This needs to know the template and the component id... wip
17
+ const componentId = "";
18
+ const templateId = "";
19
+ const [component, setComponent] = useState();
20
+ const getError = useLocalErrors(path);
21
+ // @ts-ignore
22
+ const set = schema['x-set'] || [];
23
+ useEffect(() => {
24
+ const load = () => __awaiter(void 0, void 0, void 0, function* () {
25
+ try {
26
+ const comp = yield (new CoreService).componentGet(componentId);
27
+ setComponent(comp);
28
+ }
29
+ catch (err) {
30
+ console.error('Error loading component:', err);
31
+ }
32
+ });
33
+ load();
34
+ }, [set]);
35
+ const compData = component === null || component === void 0 ? void 0 : component.componentFields.find(f => f.templateId === templateId);
36
+ // Extract correct data obj, should be array of strings
37
+ const extracted = compData === null || compData === void 0 ? void 0 : compData.data; //.evalPath(path)
38
+ return React.createElement(React.Fragment, null, "WIP");
39
+ /*
40
+ return (
41
+ <Autocomplete
42
+ options={ }>
43
+
44
+ </Autocomplete>
45
+ )*/
46
+ };
47
+ registerComponent("TEMP DONT USE", FormRendererSubset, ComponentPool.FORM);
@@ -37,8 +37,8 @@ registerType("enum", "Dropdown", { type: "string" }, {
37
37
  title: "Dropdown Values",
38
38
  type: "array",
39
39
  items: { type: "string" },
40
- },
41
- },
40
+ }
41
+ }
42
42
  }, true);
43
43
  registerType("stagedEnum", "Staged Dropdown", {
44
44
  type: "array",
@@ -64,6 +64,20 @@ registerType("array", "List", { type: "array" }, {
64
64
  itemDefinition: { $ref: "#/$defs/arrayItemDefinition" },
65
65
  },
66
66
  }, true);
67
+ registerType("stagedEnum", "Staged Dropdown", {
68
+ type: "array",
69
+ items: { type: "string" },
70
+ }, {
71
+ type: "object",
72
+ title: "Dropdown Options",
73
+ properties: {
74
+ enumValues: {
75
+ title: "Dropdown Values",
76
+ type: "array",
77
+ items: { type: "string" },
78
+ },
79
+ },
80
+ }, true);
67
81
  registerType("object", "Group", { type: "object" }, {
68
82
  type: "object",
69
83
  title: "Group",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {
@@ -1,19 +0,0 @@
1
- export type BookingResponse = {
2
- '@type': string;
3
- categories: {
4
- '@context': string;
5
- '@id': string;
6
- '@type': string;
7
- totalItems: number;
8
- member: {
9
- '@id': string;
10
- '@type': string;
11
- id: string;
12
- categoryId: number;
13
- title: string;
14
- alias: string;
15
- entitytype: string;
16
- active: boolean;
17
- };
18
- };
19
- };
@@ -1,20 +0,0 @@
1
- export type CurrencyResponse = {
2
- '@type': string;
3
- currencies: {
4
- '@context': string;
5
- '@id': string;
6
- '@type': string;
7
- totalItems: number;
8
- member: {
9
- '@id': string;
10
- '@type': string;
11
- id: string;
12
- currencyId: number;
13
- title: string;
14
- alias: string;
15
- iso3: string;
16
- symbol: string;
17
- active: boolean;
18
- };
19
- };
20
- };
@@ -1,10 +0,0 @@
1
- export type Partner = {
2
- '@context': string;
3
- '@id': string;
4
- '@type': string;
5
- id: string;
6
- partnerId: number;
7
- title: string;
8
- alias: string;
9
- description: string;
10
- };
@@ -1,28 +0,0 @@
1
- export type PartnerResponse = {
2
- '@context': string;
3
- '@id': string;
4
- '@type': string;
5
- totalItems: number;
6
- member: Array<{
7
- '@id': string;
8
- '@type': string;
9
- id: string;
10
- partnerId: number;
11
- title: string;
12
- alias?: string;
13
- description?: string;
14
- telephone?: string;
15
- email?: string;
16
- name?: string;
17
- }>;
18
- search: {
19
- '@type': string;
20
- template: string;
21
- variableRepresentation: string;
22
- mapping: Record<string, any>;
23
- };
24
- view: {
25
- '@id': string;
26
- '@type': string;
27
- };
28
- };
@@ -1,7 +0,0 @@
1
- import type { Member } from './Member';
2
- export type SwooperResponse = {
3
- people: {
4
- totalItems: number;
5
- member: Array<Member>;
6
- };
7
- };
@@ -1,37 +0,0 @@
1
- export type Traveller = {
2
- id: string;
3
- travellerId: number;
4
- customer: {
5
- '@id': string;
6
- '@type': string;
7
- id: string;
8
- customerId: number;
9
- firstName: string;
10
- email: string;
11
- telephone1: string;
12
- region: string;
13
- 'time|one': string;
14
- address: Record<string, any>;
15
- passport: {
16
- '@type': string;
17
- '@id': string;
18
- country: {
19
- '@type': string;
20
- '@id': string;
21
- country_id: number;
22
- title: string;
23
- alias: string;
24
- };
25
- };
26
- emergencyDetails: Record<string, any>;
27
- };
28
- travellerGroup: {
29
- '@type': string;
30
- '@id': string;
31
- id: string;
32
- traveller_group_id: number;
33
- enquiry_id: number;
34
- title: string;
35
- payment_status: string;
36
- };
37
- };
@@ -1,87 +0,0 @@
1
- import type { Assignments } from './Assignments';
2
- export type TravellerResponse = {
3
- '@id': string;
4
- travellers: {
5
- '@context': string;
6
- '@id': string;
7
- '@type': string;
8
- totalItems: number;
9
- member: {
10
- '@id': string;
11
- '@type': string;
12
- id: string;
13
- travellerId: number;
14
- customer: {
15
- '@id': string;
16
- '@type': string;
17
- id: number;
18
- customerId: string;
19
- firstName: string;
20
- lastName: string;
21
- email: string;
22
- telephone1: string;
23
- dateOfBirth: string;
24
- region: string;
25
- timeZone?: string;
26
- dietaryRequirements: string;
27
- foodAllergies: string;
28
- medicalConditions: string;
29
- specialOccasion: string;
30
- roomTyoe: string;
31
- roomNotes: string;
32
- address: {
33
- '@type': string;
34
- '@id': string;
35
- address_1: string;
36
- town: string;
37
- state: string;
38
- postcode: string;
39
- };
40
- passport: {
41
- '@type': string;
42
- '@id': string;
43
- passport_number: string;
44
- passport_expiry_date: string;
45
- passport_issue_date: string;
46
- country: {
47
- '@type': string;
48
- '@id': string;
49
- country_id: number;
50
- title: string;
51
- alias: string;
52
- };
53
- };
54
- emergencyDetails: {
55
- '@type': string;
56
- '@id': string;
57
- name: string;
58
- phone_number: string;
59
- relationship: string;
60
- email: string;
61
- };
62
- };
63
- travellerGroup: {
64
- '@type': string;
65
- '@id': string;
66
- id: string;
67
- traveller_group_id: number;
68
- enquiry_id: number;
69
- title: string;
70
- payment_status: string;
71
- srf_completed_at: string;
72
- srf_pg2_completed_at: string;
73
- };
74
- };
75
- search: {
76
- '@type': string;
77
- template: string;
78
- variableRepresentation: string;
79
- mapping: Record<string, any>;
80
- };
81
- view: {
82
- '@id': string;
83
- '@type': string;
84
- };
85
- };
86
- assignments: Assignments;
87
- };
@@ -1,19 +0,0 @@
1
- export type BookingResponse = {
2
- '@type': string;
3
- categories: {
4
- '@context': string;
5
- '@id': string;
6
- '@type': string;
7
- totalItems: number;
8
- member: {
9
- '@id': string;
10
- '@type': string;
11
- id: string;
12
- categoryId: number;
13
- title: string;
14
- alias: string;
15
- entitytype: string;
16
- active: boolean;
17
- };
18
- };
19
- };
@@ -1,20 +0,0 @@
1
- export type CurrencyResponse = {
2
- '@type': string;
3
- currencies: {
4
- '@context': string;
5
- '@id': string;
6
- '@type': string;
7
- totalItems: number;
8
- member: {
9
- '@id': string;
10
- '@type': string;
11
- id: string;
12
- currencyId: number;
13
- title: string;
14
- alias: string;
15
- iso3: string;
16
- symbol: string;
17
- active: boolean;
18
- };
19
- };
20
- };
@@ -1,10 +0,0 @@
1
- export type Partner = {
2
- '@context': string;
3
- '@id': string;
4
- '@type': string;
5
- id: string;
6
- partnerId: number;
7
- title: string;
8
- alias: string;
9
- description: string;
10
- };
@@ -1,28 +0,0 @@
1
- export type PartnerResponse = {
2
- '@context': string;
3
- '@id': string;
4
- '@type': string;
5
- totalItems: number;
6
- member: Array<{
7
- '@id': string;
8
- '@type': string;
9
- id: string;
10
- partnerId: number;
11
- title: string;
12
- alias?: string;
13
- description?: string;
14
- telephone?: string;
15
- email?: string;
16
- name?: string;
17
- }>;
18
- search: {
19
- '@type': string;
20
- template: string;
21
- variableRepresentation: string;
22
- mapping: Record<string, any>;
23
- };
24
- view: {
25
- '@id': string;
26
- '@type': string;
27
- };
28
- };
@@ -1,7 +0,0 @@
1
- import type { Member } from './Member';
2
- export type SwooperResponse = {
3
- people: {
4
- totalItems: number;
5
- member: Array<Member>;
6
- };
7
- };
@@ -1,37 +0,0 @@
1
- export type Traveller = {
2
- id: string;
3
- travellerId: number;
4
- customer: {
5
- '@id': string;
6
- '@type': string;
7
- id: string;
8
- customerId: number;
9
- firstName: string;
10
- email: string;
11
- telephone1: string;
12
- region: string;
13
- 'time|one': string;
14
- address: Record<string, any>;
15
- passport: {
16
- '@type': string;
17
- '@id': string;
18
- country: {
19
- '@type': string;
20
- '@id': string;
21
- country_id: number;
22
- title: string;
23
- alias: string;
24
- };
25
- };
26
- emergencyDetails: Record<string, any>;
27
- };
28
- travellerGroup: {
29
- '@type': string;
30
- '@id': string;
31
- id: string;
32
- traveller_group_id: number;
33
- enquiry_id: number;
34
- title: string;
35
- payment_status: string;
36
- };
37
- };
@@ -1,87 +0,0 @@
1
- import type { Assignments } from './Assignments';
2
- export type TravellerResponse = {
3
- '@id': string;
4
- travellers: {
5
- '@context': string;
6
- '@id': string;
7
- '@type': string;
8
- totalItems: number;
9
- member: {
10
- '@id': string;
11
- '@type': string;
12
- id: string;
13
- travellerId: number;
14
- customer: {
15
- '@id': string;
16
- '@type': string;
17
- id: number;
18
- customerId: string;
19
- firstName: string;
20
- lastName: string;
21
- email: string;
22
- telephone1: string;
23
- dateOfBirth: string;
24
- region: string;
25
- timeZone?: string;
26
- dietaryRequirements: string;
27
- foodAllergies: string;
28
- medicalConditions: string;
29
- specialOccasion: string;
30
- roomTyoe: string;
31
- roomNotes: string;
32
- address: {
33
- '@type': string;
34
- '@id': string;
35
- address_1: string;
36
- town: string;
37
- state: string;
38
- postcode: string;
39
- };
40
- passport: {
41
- '@type': string;
42
- '@id': string;
43
- passport_number: string;
44
- passport_expiry_date: string;
45
- passport_issue_date: string;
46
- country: {
47
- '@type': string;
48
- '@id': string;
49
- country_id: number;
50
- title: string;
51
- alias: string;
52
- };
53
- };
54
- emergencyDetails: {
55
- '@type': string;
56
- '@id': string;
57
- name: string;
58
- phone_number: string;
59
- relationship: string;
60
- email: string;
61
- };
62
- };
63
- travellerGroup: {
64
- '@type': string;
65
- '@id': string;
66
- id: string;
67
- traveller_group_id: number;
68
- enquiry_id: number;
69
- title: string;
70
- payment_status: string;
71
- srf_completed_at: string;
72
- srf_pg2_completed_at: string;
73
- };
74
- };
75
- search: {
76
- '@type': string;
77
- template: string;
78
- variableRepresentation: string;
79
- mapping: Record<string, any>;
80
- };
81
- view: {
82
- '@id': string;
83
- '@type': string;
84
- };
85
- };
86
- assignments: Assignments;
87
- };