swoop-common 2.1.89 → 2.1.91

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 (237) hide show
  1. package/README.md +55 -34
  2. package/dist/api/generated/core/core/OpenAPI.js +1 -1
  3. package/dist/api/generated/core/index.d.ts +4 -0
  4. package/dist/api/generated/core/index.js +4 -0
  5. package/dist/api/generated/core/models/DTOItineraryCreate.d.ts +2 -0
  6. package/dist/api/generated/core/models/DTOSwooperCreate.d.ts +4 -1
  7. package/dist/api/generated/core/models/DTOSwooperEntity.d.ts +3 -0
  8. package/dist/api/generated/core/models/DTOSwooperRead.d.ts +4 -1
  9. package/dist/api/generated/core/models/DTOSwooperUpdate.d.ts +3 -0
  10. package/dist/api/generated/core/services/ComponentService.d.ts +1 -1
  11. package/dist/api/generated/core/services/ComponentService.js +10 -10
  12. package/dist/api/generated/core/services/CoreService.d.ts +171 -1
  13. package/dist/api/generated/core/services/CoreService.js +394 -20
  14. package/dist/api/generated/core/services/ItineraryService.d.ts +80 -0
  15. package/dist/api/generated/core/services/ItineraryService.js +177 -0
  16. package/dist/api/generated/{itinerary → core}/services/SnapshotService.js +1 -1
  17. package/dist/api/generated/core/services/SwooperService.js +4 -4
  18. package/dist/api/generated/core/services/TemplateService.js +6 -6
  19. package/dist/api/init.d.ts +0 -4
  20. package/dist/api/init.js +0 -7
  21. package/dist/rendering/components/ComponentPicker.js +1 -1
  22. package/package.json +56 -58
  23. package/dist/api/bundler.d.ts +0 -1
  24. package/dist/api/bundler.js +0 -141
  25. package/dist/api/generated/itinerary/core/ApiError.d.ts +0 -10
  26. package/dist/api/generated/itinerary/core/ApiError.js +0 -11
  27. package/dist/api/generated/itinerary/core/ApiRequestOptions.d.ts +0 -13
  28. package/dist/api/generated/itinerary/core/ApiRequestOptions.js +0 -1
  29. package/dist/api/generated/itinerary/core/ApiResult.d.ts +0 -7
  30. package/dist/api/generated/itinerary/core/ApiResult.js +0 -1
  31. package/dist/api/generated/itinerary/core/CancelablePromise.d.ts +0 -20
  32. package/dist/api/generated/itinerary/core/CancelablePromise.js +0 -111
  33. package/dist/api/generated/itinerary/core/OpenAPI.d.ts +0 -16
  34. package/dist/api/generated/itinerary/core/OpenAPI.js +0 -11
  35. package/dist/api/generated/itinerary/core/request.d.ts +0 -30
  36. package/dist/api/generated/itinerary/core/request.js +0 -271
  37. package/dist/api/generated/itinerary/exports.d.ts +0 -0
  38. package/dist/api/generated/itinerary/exports.js +0 -2
  39. package/dist/api/generated/itinerary/index.d.ts +0 -103
  40. package/dist/api/generated/itinerary/index.js +0 -19
  41. package/dist/api/generated/itinerary/models/Amendment.d.ts +0 -8
  42. package/dist/api/generated/itinerary/models/Amendment.js +0 -1
  43. package/dist/api/generated/itinerary/models/AssignedPassenger.d.ts +0 -7
  44. package/dist/api/generated/itinerary/models/AssignedPassenger.js +0 -1
  45. package/dist/api/generated/itinerary/models/AssignedTravellerGroup.d.ts +0 -6
  46. package/dist/api/generated/itinerary/models/AssignedTravellerGroup.js +0 -1
  47. package/dist/api/generated/itinerary/models/B64StringQueryParam.d.ts +0 -4
  48. package/dist/api/generated/itinerary/models/B64StringQueryParam.js +0 -1
  49. package/dist/api/generated/itinerary/models/BookingStatus.d.ts +0 -7
  50. package/dist/api/generated/itinerary/models/BookingStatus.js +0 -12
  51. package/dist/api/generated/itinerary/models/BranchId.d.ts +0 -1
  52. package/dist/api/generated/itinerary/models/BranchId.js +0 -1
  53. package/dist/api/generated/itinerary/models/BranchTag.d.ts +0 -1
  54. package/dist/api/generated/itinerary/models/BranchTag.js +0 -1
  55. package/dist/api/generated/itinerary/models/Branches.d.ts +0 -12
  56. package/dist/api/generated/itinerary/models/Branches.js +0 -1
  57. package/dist/api/generated/itinerary/models/ComponentDescription.d.ts +0 -5
  58. package/dist/api/generated/itinerary/models/ComponentDescription.js +0 -1
  59. package/dist/api/generated/itinerary/models/ComponentFAQ.d.ts +0 -4
  60. package/dist/api/generated/itinerary/models/ComponentFAQ.js +0 -1
  61. package/dist/api/generated/itinerary/models/ComponentId.d.ts +0 -1
  62. package/dist/api/generated/itinerary/models/ComponentId.js +0 -1
  63. package/dist/api/generated/itinerary/models/ComponentIdPathParam.d.ts +0 -5
  64. package/dist/api/generated/itinerary/models/ComponentIdPathParam.js +0 -1
  65. package/dist/api/generated/itinerary/models/ComponentInstance.d.ts +0 -28
  66. package/dist/api/generated/itinerary/models/ComponentInstance.js +0 -1
  67. package/dist/api/generated/itinerary/models/ComponentNotes.d.ts +0 -9
  68. package/dist/api/generated/itinerary/models/ComponentNotes.js +0 -1
  69. package/dist/api/generated/itinerary/models/ComponentRevisionGroupId.d.ts +0 -1
  70. package/dist/api/generated/itinerary/models/ComponentRevisionGroupId.js +0 -1
  71. package/dist/api/generated/itinerary/models/ComponentState.d.ts +0 -5
  72. package/dist/api/generated/itinerary/models/ComponentState.js +0 -10
  73. package/dist/api/generated/itinerary/models/Currency.d.ts +0 -12
  74. package/dist/api/generated/itinerary/models/Currency.js +0 -17
  75. package/dist/api/generated/itinerary/models/DTOBranchCreate.d.ts +0 -8
  76. package/dist/api/generated/itinerary/models/DTOBranchCreate.js +0 -1
  77. package/dist/api/generated/itinerary/models/DTOBranchEntity.d.ts +0 -11
  78. package/dist/api/generated/itinerary/models/DTOBranchEntity.js +0 -1
  79. package/dist/api/generated/itinerary/models/DTOBranchRead.d.ts +0 -11
  80. package/dist/api/generated/itinerary/models/DTOBranchRead.js +0 -1
  81. package/dist/api/generated/itinerary/models/DTOBranchUpdate.d.ts +0 -4
  82. package/dist/api/generated/itinerary/models/DTOBranchUpdate.js +0 -1
  83. package/dist/api/generated/itinerary/models/DTOComponentCreate.d.ts +0 -30
  84. package/dist/api/generated/itinerary/models/DTOComponentCreate.js +0 -1
  85. package/dist/api/generated/itinerary/models/DTOComponentEntity.d.ts +0 -37
  86. package/dist/api/generated/itinerary/models/DTOComponentEntity.js +0 -1
  87. package/dist/api/generated/itinerary/models/DTOComponentRead.d.ts +0 -37
  88. package/dist/api/generated/itinerary/models/DTOComponentRead.js +0 -1
  89. package/dist/api/generated/itinerary/models/DTOComponentUpdate.d.ts +0 -25
  90. package/dist/api/generated/itinerary/models/DTOComponentUpdate.js +0 -1
  91. package/dist/api/generated/itinerary/models/DTOItineraryCreate.d.ts +0 -16
  92. package/dist/api/generated/itinerary/models/DTOItineraryCreate.js +0 -1
  93. package/dist/api/generated/itinerary/models/DTOItineraryEntity.d.ts +0 -25
  94. package/dist/api/generated/itinerary/models/DTOItineraryEntity.js +0 -1
  95. package/dist/api/generated/itinerary/models/DTOItineraryRead.d.ts +0 -25
  96. package/dist/api/generated/itinerary/models/DTOItineraryRead.js +0 -1
  97. package/dist/api/generated/itinerary/models/DTOItineraryUpdate.d.ts +0 -16
  98. package/dist/api/generated/itinerary/models/DTOItineraryUpdate.js +0 -1
  99. package/dist/api/generated/itinerary/models/DTORegionCreate.d.ts +0 -8
  100. package/dist/api/generated/itinerary/models/DTORegionCreate.js +0 -1
  101. package/dist/api/generated/itinerary/models/DTORegionEntity.d.ts +0 -12
  102. package/dist/api/generated/itinerary/models/DTORegionEntity.js +0 -1
  103. package/dist/api/generated/itinerary/models/DTORegionRead.d.ts +0 -12
  104. package/dist/api/generated/itinerary/models/DTORegionRead.js +0 -1
  105. package/dist/api/generated/itinerary/models/DTORegionUpdate.d.ts +0 -8
  106. package/dist/api/generated/itinerary/models/DTORegionUpdate.js +0 -1
  107. package/dist/api/generated/itinerary/models/DTOSnapshotCreate.d.ts +0 -8
  108. package/dist/api/generated/itinerary/models/DTOSnapshotCreate.js +0 -1
  109. package/dist/api/generated/itinerary/models/DTOSnapshotEntity.d.ts +0 -12
  110. package/dist/api/generated/itinerary/models/DTOSnapshotEntity.js +0 -1
  111. package/dist/api/generated/itinerary/models/DTOSnapshotRead.d.ts +0 -12
  112. package/dist/api/generated/itinerary/models/DTOSnapshotRead.js +0 -1
  113. package/dist/api/generated/itinerary/models/DTOSnapshotUpdate.d.ts +0 -6
  114. package/dist/api/generated/itinerary/models/DTOSnapshotUpdate.js +0 -1
  115. package/dist/api/generated/itinerary/models/DTOSwooperCreate.d.ts +0 -16
  116. package/dist/api/generated/itinerary/models/DTOSwooperCreate.js +0 -1
  117. package/dist/api/generated/itinerary/models/DTOSwooperEntity.d.ts +0 -20
  118. package/dist/api/generated/itinerary/models/DTOSwooperEntity.js +0 -1
  119. package/dist/api/generated/itinerary/models/DTOSwooperRead.d.ts +0 -20
  120. package/dist/api/generated/itinerary/models/DTOSwooperRead.js +0 -1
  121. package/dist/api/generated/itinerary/models/DTOSwooperUpdate.d.ts +0 -16
  122. package/dist/api/generated/itinerary/models/DTOSwooperUpdate.js +0 -1
  123. package/dist/api/generated/itinerary/models/DTOTemplateCreate.d.ts +0 -11
  124. package/dist/api/generated/itinerary/models/DTOTemplateCreate.js +0 -1
  125. package/dist/api/generated/itinerary/models/DTOTemplateEntity.d.ts +0 -17
  126. package/dist/api/generated/itinerary/models/DTOTemplateEntity.js +0 -1
  127. package/dist/api/generated/itinerary/models/DTOTemplateRead.d.ts +0 -17
  128. package/dist/api/generated/itinerary/models/DTOTemplateRead.js +0 -1
  129. package/dist/api/generated/itinerary/models/DTOTemplateUpdate.d.ts +0 -7
  130. package/dist/api/generated/itinerary/models/DTOTemplateUpdate.js +0 -1
  131. package/dist/api/generated/itinerary/models/Destination.d.ts +0 -5
  132. package/dist/api/generated/itinerary/models/Destination.js +0 -10
  133. package/dist/api/generated/itinerary/models/Discount.d.ts +0 -10
  134. package/dist/api/generated/itinerary/models/Discount.js +0 -1
  135. package/dist/api/generated/itinerary/models/EnquiryId.d.ts +0 -1
  136. package/dist/api/generated/itinerary/models/EnquiryId.js +0 -1
  137. package/dist/api/generated/itinerary/models/EnquiryIdPathParam.d.ts +0 -5
  138. package/dist/api/generated/itinerary/models/EnquiryIdPathParam.js +0 -1
  139. package/dist/api/generated/itinerary/models/EnquiryIdQueryParam.d.ts +0 -1
  140. package/dist/api/generated/itinerary/models/EnquiryIdQueryParam.js +0 -1
  141. package/dist/api/generated/itinerary/models/Error.d.ts +0 -4
  142. package/dist/api/generated/itinerary/models/Error.js +0 -1
  143. package/dist/api/generated/itinerary/models/Fee.d.ts +0 -10
  144. package/dist/api/generated/itinerary/models/Fee.js +0 -1
  145. package/dist/api/generated/itinerary/models/Field.d.ts +0 -4
  146. package/dist/api/generated/itinerary/models/Field.js +0 -1
  147. package/dist/api/generated/itinerary/models/ItineraryId.d.ts +0 -1
  148. package/dist/api/generated/itinerary/models/ItineraryId.js +0 -1
  149. package/dist/api/generated/itinerary/models/ItineraryIdPathParam.d.ts +0 -5
  150. package/dist/api/generated/itinerary/models/ItineraryIdPathParam.js +0 -1
  151. package/dist/api/generated/itinerary/models/ItineraryIdQueryParam.d.ts +0 -5
  152. package/dist/api/generated/itinerary/models/ItineraryIdQueryParam.js +0 -1
  153. package/dist/api/generated/itinerary/models/ItineraryRevisionGroupId.d.ts +0 -1
  154. package/dist/api/generated/itinerary/models/ItineraryRevisionGroupId.js +0 -1
  155. package/dist/api/generated/itinerary/models/ItineraryValue.d.ts +0 -4
  156. package/dist/api/generated/itinerary/models/ItineraryValue.js +0 -1
  157. package/dist/api/generated/itinerary/models/LimitQueryParam.d.ts +0 -4
  158. package/dist/api/generated/itinerary/models/LimitQueryParam.js +0 -1
  159. package/dist/api/generated/itinerary/models/Meals.d.ts +0 -8
  160. package/dist/api/generated/itinerary/models/Meals.js +0 -13
  161. package/dist/api/generated/itinerary/models/Media.d.ts +0 -4
  162. package/dist/api/generated/itinerary/models/Media.js +0 -1
  163. package/dist/api/generated/itinerary/models/Metadata.d.ts +0 -7
  164. package/dist/api/generated/itinerary/models/Metadata.js +0 -1
  165. package/dist/api/generated/itinerary/models/MockErrorCodeQueryParam.d.ts +0 -4
  166. package/dist/api/generated/itinerary/models/MockErrorCodeQueryParam.js +0 -1
  167. package/dist/api/generated/itinerary/models/OnQueryParam.d.ts +0 -4
  168. package/dist/api/generated/itinerary/models/OnQueryParam.js +0 -1
  169. package/dist/api/generated/itinerary/models/OrderQueryParam.d.ts +0 -7
  170. package/dist/api/generated/itinerary/models/OrderQueryParam.js +0 -12
  171. package/dist/api/generated/itinerary/models/OrgId.d.ts +0 -3
  172. package/dist/api/generated/itinerary/models/OrgId.js +0 -8
  173. package/dist/api/generated/itinerary/models/Package.d.ts +0 -7
  174. package/dist/api/generated/itinerary/models/Package.js +0 -1
  175. package/dist/api/generated/itinerary/models/PackageItem.d.ts +0 -6
  176. package/dist/api/generated/itinerary/models/PackageItem.js +0 -1
  177. package/dist/api/generated/itinerary/models/PackageSpan.d.ts +0 -11
  178. package/dist/api/generated/itinerary/models/PackageSpan.js +0 -1
  179. package/dist/api/generated/itinerary/models/PageQueryParam.d.ts +0 -4
  180. package/dist/api/generated/itinerary/models/PageQueryParam.js +0 -1
  181. package/dist/api/generated/itinerary/models/Pagination.d.ts +0 -5
  182. package/dist/api/generated/itinerary/models/Pagination.js +0 -1
  183. package/dist/api/generated/itinerary/models/Price.d.ts +0 -5
  184. package/dist/api/generated/itinerary/models/Price.js +0 -1
  185. package/dist/api/generated/itinerary/models/QuoteOptions.d.ts +0 -9
  186. package/dist/api/generated/itinerary/models/QuoteOptions.js +0 -1
  187. package/dist/api/generated/itinerary/models/RegionId.d.ts +0 -1
  188. package/dist/api/generated/itinerary/models/RegionId.js +0 -1
  189. package/dist/api/generated/itinerary/models/SearchQueryParam.d.ts +0 -4
  190. package/dist/api/generated/itinerary/models/SearchQueryParam.js +0 -1
  191. package/dist/api/generated/itinerary/models/SnapshotId.d.ts +0 -1
  192. package/dist/api/generated/itinerary/models/SnapshotId.js +0 -1
  193. package/dist/api/generated/itinerary/models/SnapshotIdPathParam.d.ts +0 -2
  194. package/dist/api/generated/itinerary/models/SnapshotIdPathParam.js +0 -1
  195. package/dist/api/generated/itinerary/models/SortQueryParam.d.ts +0 -4
  196. package/dist/api/generated/itinerary/models/SortQueryParam.js +0 -1
  197. package/dist/api/generated/itinerary/models/StateQueryParam.d.ts +0 -5
  198. package/dist/api/generated/itinerary/models/StateQueryParam.js +0 -1
  199. package/dist/api/generated/itinerary/models/SwoopContactInfo.d.ts +0 -5
  200. package/dist/api/generated/itinerary/models/SwoopContactInfo.js +0 -1
  201. package/dist/api/generated/itinerary/models/SwooperExperience.d.ts +0 -7
  202. package/dist/api/generated/itinerary/models/SwooperExperience.js +0 -1
  203. package/dist/api/generated/itinerary/models/SwooperHighlights.d.ts +0 -5
  204. package/dist/api/generated/itinerary/models/SwooperHighlights.js +0 -1
  205. package/dist/api/generated/itinerary/models/SwooperId.d.ts +0 -1
  206. package/dist/api/generated/itinerary/models/SwooperId.js +0 -1
  207. package/dist/api/generated/itinerary/models/SwooperIdPathParam.d.ts +0 -5
  208. package/dist/api/generated/itinerary/models/SwooperIdPathParam.js +0 -1
  209. package/dist/api/generated/itinerary/models/SwooperInfo.d.ts +0 -6
  210. package/dist/api/generated/itinerary/models/SwooperInfo.js +0 -1
  211. package/dist/api/generated/itinerary/models/SwooperPersonalInfo.d.ts +0 -7
  212. package/dist/api/generated/itinerary/models/SwooperPersonalInfo.js +0 -1
  213. package/dist/api/generated/itinerary/models/TagPathParam.d.ts +0 -4
  214. package/dist/api/generated/itinerary/models/TagPathParam.js +0 -1
  215. package/dist/api/generated/itinerary/models/TemplateId.d.ts +0 -1
  216. package/dist/api/generated/itinerary/models/TemplateId.js +0 -1
  217. package/dist/api/generated/itinerary/models/TemplateIdPathParam.d.ts +0 -5
  218. package/dist/api/generated/itinerary/models/TemplateIdPathParam.js +0 -1
  219. package/dist/api/generated/itinerary/models/TemplateRevisionGroupId.d.ts +0 -1
  220. package/dist/api/generated/itinerary/models/TemplateRevisionGroupId.js +0 -1
  221. package/dist/api/generated/itinerary/models/Title.d.ts +0 -1
  222. package/dist/api/generated/itinerary/models/Title.js +0 -1
  223. package/dist/api/generated/itinerary/models/UrgencyCTA.d.ts +0 -4
  224. package/dist/api/generated/itinerary/models/UrgencyCTA.js +0 -9
  225. package/dist/api/generated/itinerary/models/UserComponentInstanceField.d.ts +0 -5
  226. package/dist/api/generated/itinerary/models/UserComponentInstanceField.js +0 -1
  227. package/dist/api/generated/itinerary/models/ValidationSchemas.d.ts +0 -5
  228. package/dist/api/generated/itinerary/models/ValidationSchemas.js +0 -1
  229. package/dist/api/generated/itinerary/models/VersionPathParam.d.ts +0 -4
  230. package/dist/api/generated/itinerary/models/VersionPathParam.js +0 -1
  231. package/dist/api/generated/itinerary/services/ItineraryService.d.ts +0 -174
  232. package/dist/api/generated/itinerary/services/ItineraryService.js +0 -378
  233. /package/dist/api/generated/{itinerary → core}/services/AuditService.d.ts +0 -0
  234. /package/dist/api/generated/{itinerary → core}/services/AuditService.js +0 -0
  235. /package/dist/api/generated/{itinerary → core}/services/RegionService.d.ts +0 -0
  236. /package/dist/api/generated/{itinerary → core}/services/RegionService.js +0 -0
  237. /package/dist/api/generated/{itinerary → core}/services/SnapshotService.d.ts +0 -0
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Swoop Library
2
2
 
3
- This library is used for rendering **Swoop itinerary templates**.
4
- It provides tools for defining **custom field types**, registering **custom components**,
5
- rendering templates from a **MasterSchema**, and includes SDKs for all related services.
6
- It supports both input mode (for creating templates) and presentation mode (for rendering them for end users).
3
+ This library is used for rendering **Swoop itinerary templates**.
4
+ It provides tools for defining **custom field types**, registering **custom components**,
5
+ rendering templates from a **MasterSchema**, and includes SDKs for all related services.
6
+ It supports both input mode (for creating templates) and presentation mode (for rendering them for end users).
7
7
  The schema system is stage-aware, enabling precise control over what data is editable or displayed at which stage.
8
8
 
9
9
  > Note: This package is intended for internal use only.
@@ -17,12 +17,11 @@ The schema system is stage-aware, enabling precise control over what data is edi
17
17
  Before using the Swoop Library, you must initialize it with service URLs:
18
18
 
19
19
  ```ts
20
- import { init } from 'swoop-common';
20
+ import { init } from "swoop-common";
21
21
 
22
22
  init({
23
- itineraryServiceUrl: 'https://your.itinerary.service',
24
- coreServiceUrl: 'https://your.core.service',
25
- swoopServiceForwardUrl: 'https://your.forward.service'
23
+ coreServiceUrl: "https://your.core.service",
24
+ swoopServiceForwardUrl: "https://your.forward.service",
26
25
  });
27
26
  ```
28
27
 
@@ -31,7 +30,6 @@ init({
31
30
  The library provides three primary service interfaces to interact with backend systems:
32
31
 
33
32
  - **SwoopService** — Interfaces with the Swoop API.
34
- - **ItineraryService** — For itinerary service.
35
33
  - **CoreService** — For core service.
36
34
 
37
35
  These interfaces offer convenient methods to work seamlessly with the underlying services required by the itinerary system.
@@ -41,7 +39,7 @@ These interfaces offer convenient methods to work seamlessly with the underlying
41
39
  The `StyledFormView` component is the entry point for rendering a full itinerary template. It handles schema parsing and renderer injection based on mode and form stage.
42
40
 
43
41
  ```tsx
44
- import { StyledFormView } from 'your-form-library';
42
+ import { StyledFormView } from "your-form-library";
45
43
 
46
44
  <StyledFormView
47
45
  initialData={/* object */}
@@ -50,19 +48,19 @@ import { StyledFormView } from 'your-form-library';
50
48
  pool="FORM"
51
49
  readonly={false}
52
50
  stage="Inst"
53
- />
51
+ />;
54
52
  ```
55
53
 
56
54
  ### Props
57
55
 
58
- | Name | Type | Description |
59
- |--------------|-------------------------------|-----------------------------------------------------------------------------|
60
- | initialData | `any` | Initial values for the template. Should not be updated frequently. |
61
- | schema | `MasterSchema` | Template definition object. |
62
- | onChange | `(val: any) => void` | Callback with updated data. |
63
- | pool | `ComponentPool` | `"FORM"` or `"PRESENTATION"` depending on context. |
64
- | readonly | `boolean` | Disables inputs if true (only relevant in FORM pool). |
65
- | stage | `Stage` | Controls which data segment is being rendered. |
56
+ | Name | Type | Description |
57
+ | ----------- | -------------------- | ------------------------------------------------------------------ |
58
+ | initialData | `any` | Initial values for the template. Should not be updated frequently. |
59
+ | schema | `MasterSchema` | Template definition object. |
60
+ | onChange | `(val: any) => void` | Callback with updated data. |
61
+ | pool | `ComponentPool` | `"FORM"` or `"PRESENTATION"` depending on context. |
62
+ | readonly | `boolean` | Disables inputs if true (only relevant in FORM pool). |
63
+ | stage | `Stage` | Controls which data segment is being rendered. |
66
64
 
67
65
  ### Stages
68
66
 
@@ -83,7 +81,13 @@ Custom components define how individual fields render. These can behave like typ
83
81
  ### Example
84
82
 
85
83
  ```tsx
86
- const FormExample: React.FC<Props> = ({ text, onChange, getError, label, enabled }) => {
84
+ const FormExample: React.FC<Props> = ({
85
+ text,
86
+ onChange,
87
+ getError,
88
+ label,
89
+ enabled,
90
+ }) => {
87
91
  const [val, setVal] = useState(text);
88
92
  const error = getError ? getError("example")?.message : undefined;
89
93
  const onChangeDebounced = useMemo(() => debounce(onChange, 300), [onChange]);
@@ -94,9 +98,18 @@ const FormExample: React.FC<Props> = ({ text, onChange, getError, label, enabled
94
98
  };
95
99
 
96
100
  return (
97
- <Paper sx={{ display: 'flex', flexDirection: 'column', gap: 1, p: 2, background: "#CBC3E3", mb: 1 }}>
101
+ <Paper
102
+ sx={{
103
+ display: "flex",
104
+ flexDirection: "column",
105
+ gap: 1,
106
+ p: 2,
107
+ background: "#CBC3E3",
108
+ mb: 1,
109
+ }}
110
+ >
98
111
  {!enabled && "THIS IS DISABLED"}
99
- <Typography variant='h6'>{label}</Typography>
112
+ <Typography variant="h6">{label}</Typography>
100
113
  <TextField
101
114
  label="Example label"
102
115
  value={val}
@@ -109,7 +122,13 @@ const FormExample: React.FC<Props> = ({ text, onChange, getError, label, enabled
109
122
  );
110
123
  };
111
124
 
112
- const FormRendererExample: React.FC<ControlProps> = ({ data, handleChange, path, label, enabled }) => {
125
+ const FormRendererExample: React.FC<ControlProps> = ({
126
+ data,
127
+ handleChange,
128
+ path,
129
+ label,
130
+ enabled,
131
+ }) => {
113
132
  const getError = useLocalErrors(path);
114
133
  return (
115
134
  <FormExample
@@ -126,7 +145,7 @@ registerComponent("example", FormRendererExample, ComponentPool.FORM);
126
145
  registerComponent("example", FormRendererExample, ComponentPool.PRESENTATION);
127
146
  ```
128
147
 
129
- > Important: You **cannot register two components with the same name within the same pool**. You *can* register the same component name across different pools (e.g., `"example"` in both `"FORM"` and `"PRESENTATION"`).
148
+ > Important: You **cannot register two components with the same name within the same pool**. You _can_ register the same component name across different pools (e.g., `"example"` in both `"FORM"` and `"PRESENTATION"`).
130
149
 
131
150
  ### Presentation Pool
132
151
 
@@ -142,18 +161,20 @@ Custom field types define what kinds of fields can be used when **building a tem
142
161
 
143
162
  ```ts
144
163
  registerType(
145
- "typeId", // Unique type string
146
- "Display Name", // Name shown in template builder
147
- schema, // JSON Schema defining the data structure
148
- optionsSchema, // JSON Schema defining configuration data structure
149
- requiredOptions // boolean: must the options be filled?
164
+ "typeId", // Unique type string
165
+ "Display Name", // Name shown in template builder
166
+ schema, // JSON Schema defining the data structure
167
+ optionsSchema, // JSON Schema defining configuration data structure
168
+ requiredOptions // boolean: must the options be filled?
150
169
  );
151
170
  ```
152
171
 
153
172
  ### Example
154
173
 
155
174
  ```ts
156
- registerType("enum", "Dropdown",
175
+ registerType(
176
+ "enum",
177
+ "Dropdown",
157
178
  { type: "array" },
158
179
  {
159
180
  type: "object",
@@ -162,9 +183,9 @@ registerType("enum", "Dropdown",
162
183
  enumValues: {
163
184
  title: "Dropdown Values",
164
185
  type: "array",
165
- items: { type: "string" }
166
- }
167
- }
186
+ items: { type: "string" },
187
+ },
188
+ },
168
189
  },
169
190
  true
170
191
  );
@@ -176,7 +197,7 @@ This type defines a dropdown field where the values are defined via the `enumVal
176
197
 
177
198
  If you want to render a **custom options block** (i.e., how the field type's options are displayed in the template editor), you must do the following:
178
199
 
179
- 1. In the top-level `optionsSchema` of the type, define `"x-type": "yourTypeName"`
200
+ 1. In the top-level `optionsSchema` of the type, define `"x-type": "yourTypeName"`
180
201
  2. Create and register a custom component with the name `"yourTypeName"` in the `"FORM"` pool.
181
202
 
182
203
  This component will then be used to render the configuration UI for that field type.
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: 'http://localhost:8080/core-data-service/v1',
3
- VERSION: '1',
3
+ VERSION: '1.0.0',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -97,7 +97,11 @@ export { UrgencyCTA } from './models/UrgencyCTA';
97
97
  export type { UserComponentInstanceField } from './models/UserComponentInstanceField';
98
98
  export type { ValidationSchemas } from './models/ValidationSchemas';
99
99
  export type { VersionPathParam } from './models/VersionPathParam';
100
+ export { AuditService } from './services/AuditService';
100
101
  export { ComponentService } from './services/ComponentService';
101
102
  export { CoreService } from './services/CoreService';
103
+ export { ItineraryService } from './services/ItineraryService';
104
+ export { RegionService } from './services/RegionService';
105
+ export { SnapshotService } from './services/SnapshotService';
102
106
  export { SwooperService } from './services/SwooperService';
103
107
  export { TemplateService } from './services/TemplateService';
@@ -13,7 +13,11 @@ 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';
16
17
  export { ComponentService } from './services/ComponentService';
17
18
  export { CoreService } from './services/CoreService';
19
+ export { ItineraryService } from './services/ItineraryService';
20
+ export { RegionService } from './services/RegionService';
21
+ export { SnapshotService } from './services/SnapshotService';
18
22
  export { SwooperService } from './services/SwooperService';
19
23
  export { TemplateService } from './services/TemplateService';
@@ -1,10 +1,12 @@
1
1
  import type { ComponentInstance } from './ComponentInstance';
2
2
  import type { Discount } from './Discount';
3
+ import type { EnquiryId } from './EnquiryId';
3
4
  import type { Fee } from './Fee';
4
5
  import type { ItineraryValue } from './ItineraryValue';
5
6
  import type { QuoteOptions } from './QuoteOptions';
6
7
  import type { Title } from './Title';
7
8
  export type DTOItineraryCreate = {
9
+ enquiryId?: EnquiryId;
8
10
  title: Title;
9
11
  welcomeNote?: string;
10
12
  values?: Array<ItineraryValue>;
@@ -4,7 +4,10 @@ import type { SwooperExperience } from './SwooperExperience';
4
4
  import type { SwooperInfo } from './SwooperInfo';
5
5
  import type { SwooperPersonalInfo } from './SwooperPersonalInfo';
6
6
  export type DTOSwooperCreate = {
7
- avatar: string;
7
+ portrait?: string;
8
+ avatar?: string;
9
+ banner?: string;
10
+ bio?: string;
8
11
  name: string;
9
12
  fullName: string;
10
13
  media?: Media;
@@ -8,7 +8,10 @@ import type { SwooperPersonalInfo } from './SwooperPersonalInfo';
8
8
  export type DTOSwooperEntity = {
9
9
  id: SwooperId;
10
10
  metadata: Metadata;
11
+ portrait: string;
11
12
  avatar: string;
13
+ banner: string;
14
+ bio: string;
12
15
  name: string;
13
16
  fullName: string;
14
17
  media: Media;
@@ -8,7 +8,10 @@ import type { SwooperPersonalInfo } from './SwooperPersonalInfo';
8
8
  export type DTOSwooperRead = {
9
9
  id: SwooperId;
10
10
  metadata: Metadata;
11
- avatar: string;
11
+ portrait?: string;
12
+ avatar?: string;
13
+ banner?: string;
14
+ bio?: string;
12
15
  name: string;
13
16
  fullName: string;
14
17
  media: Media;
@@ -4,7 +4,10 @@ import type { SwooperExperience } from './SwooperExperience';
4
4
  import type { SwooperInfo } from './SwooperInfo';
5
5
  import type { SwooperPersonalInfo } from './SwooperPersonalInfo';
6
6
  export type DTOSwooperUpdate = {
7
+ portrait?: string;
7
8
  avatar?: string;
9
+ banner?: string;
10
+ bio?: string;
8
11
  name?: string;
9
12
  fullName?: string;
10
13
  media?: Media;
@@ -49,7 +49,7 @@ export declare class ComponentService {
49
49
  static componentUpdateAsNewRevision(componentId: ComponentId, requestBody: DTOComponentUpdate): CancelablePromise<DTOComponentRead>;
50
50
  /**
51
51
  * Update Component
52
- * Updates an component
52
+ * Updates a component
53
53
  * @param componentId Id of a component
54
54
  * @param requestBody
55
55
  * @returns DTOComponentRead When a component is updated successfully
@@ -16,7 +16,7 @@ export class ComponentService {
16
16
  static componentList(page, limit, order, sort, search, on) {
17
17
  return __request(OpenAPI, {
18
18
  method: 'GET',
19
- url: '/components',
19
+ url: '/component',
20
20
  query: {
21
21
  'page': page,
22
22
  'limit': limit,
@@ -43,7 +43,7 @@ export class ComponentService {
43
43
  static componentCreate(requestBody) {
44
44
  return __request(OpenAPI, {
45
45
  method: 'POST',
46
- url: '/components',
46
+ url: '/component',
47
47
  body: requestBody,
48
48
  mediaType: 'application/json',
49
49
  errors: {
@@ -64,7 +64,7 @@ export class ComponentService {
64
64
  static componentGet(componentId) {
65
65
  return __request(OpenAPI, {
66
66
  method: 'GET',
67
- url: '/components/{componentId}',
67
+ url: '/component/{componentId}',
68
68
  path: {
69
69
  'componentId': componentId,
70
70
  },
@@ -85,8 +85,8 @@ export class ComponentService {
85
85
  */
86
86
  static componentUpdateAsNewRevision(componentId, requestBody) {
87
87
  return __request(OpenAPI, {
88
- method: 'PATCH',
89
- url: '/components/{componentId}',
88
+ method: 'PUT',
89
+ url: '/component/{componentId}',
90
90
  path: {
91
91
  'componentId': componentId,
92
92
  },
@@ -103,7 +103,7 @@ export class ComponentService {
103
103
  }
104
104
  /**
105
105
  * Update Component
106
- * Updates an component
106
+ * Updates a component
107
107
  * @param componentId Id of a component
108
108
  * @param requestBody
109
109
  * @returns DTOComponentRead When a component is updated successfully
@@ -111,8 +111,8 @@ export class ComponentService {
111
111
  */
112
112
  static componentUpdate(componentId, requestBody) {
113
113
  return __request(OpenAPI, {
114
- method: 'PUT',
115
- url: '/components/{componentId}',
114
+ method: 'PATCH',
115
+ url: '/component/{componentId}',
116
116
  path: {
117
117
  'componentId': componentId,
118
118
  },
@@ -137,7 +137,7 @@ export class ComponentService {
137
137
  static componentDelete(componentId) {
138
138
  return __request(OpenAPI, {
139
139
  method: 'DELETE',
140
- url: '/components/{componentId}',
140
+ url: '/component/{componentId}',
141
141
  path: {
142
142
  'componentId': componentId,
143
143
  },
@@ -161,7 +161,7 @@ export class ComponentService {
161
161
  static componentStateUpdate(componentId, state) {
162
162
  return __request(OpenAPI, {
163
163
  method: 'GET',
164
- url: '/components/{componentId}/state',
164
+ url: '/component/{componentId}/state',
165
165
  path: {
166
166
  'componentId': componentId,
167
167
  },
@@ -1,19 +1,189 @@
1
+ import type { Branches } from '../models/Branches';
2
+ import type { BranchTag } from '../models/BranchTag';
1
3
  import type { ComponentId } from '../models/ComponentId';
2
4
  import type { ComponentState } from '../models/ComponentState';
3
5
  import type { DTOComponentCreate } from '../models/DTOComponentCreate';
4
6
  import type { DTOComponentRead } from '../models/DTOComponentRead';
5
7
  import type { DTOComponentUpdate } from '../models/DTOComponentUpdate';
8
+ import type { DTOItineraryCreate } from '../models/DTOItineraryCreate';
9
+ import type { DTOItineraryRead } from '../models/DTOItineraryRead';
10
+ import type { DTOItineraryUpdate } from '../models/DTOItineraryUpdate';
11
+ import type { DTORegionCreate } from '../models/DTORegionCreate';
12
+ import type { DTORegionRead } from '../models/DTORegionRead';
13
+ import type { DTOSnapshotCreate } from '../models/DTOSnapshotCreate';
14
+ import type { DTOSnapshotRead } from '../models/DTOSnapshotRead';
6
15
  import type { DTOSwooperCreate } from '../models/DTOSwooperCreate';
7
16
  import type { DTOSwooperRead } from '../models/DTOSwooperRead';
8
17
  import type { DTOSwooperUpdate } from '../models/DTOSwooperUpdate';
9
18
  import type { DTOTemplateCreate } from '../models/DTOTemplateCreate';
10
19
  import { DTOTemplateRead } from '../models/DTOTemplateRead';
11
20
  import type { DTOTemplateUpdate } from '../models/DTOTemplateUpdate';
21
+ import type { EnquiryId } from '../models/EnquiryId';
22
+ import type { ItineraryId } from '../models/ItineraryId';
12
23
  import type { Pagination } from '../models/Pagination';
24
+ import type { SnapshotId } from '../models/SnapshotId';
13
25
  import type { SwooperId } from '../models/SwooperId';
14
26
  import type { TemplateId } from '../models/TemplateId';
15
27
  import { CancelablePromise } from '../core/CancelablePromise';
16
28
  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
+ /**
39
+ * Create a Snapshot
40
+ * Creates a new snapshot. A snapshot is a reference to a specific itinerary revision group id.
41
+ * @param requestBody
42
+ * @returns DTOSnapshotRead When a snapshot is created
43
+ * @throws ApiError
44
+ */
45
+ snapshotCreate(requestBody: DTOSnapshotCreate): CancelablePromise<DTOSnapshotRead>;
46
+ /**
47
+ * List Snapshots
48
+ * List all available snapshots relating to the query params
49
+ * @param enquiryId
50
+ * @param page Pagination, starting at page 1
51
+ * @param limit Number of items per page
52
+ * @param order Order the sort query parameter values either by ascending or descending order
53
+ * @param sort List of fields to sort by, this requires the order query param
54
+ * @param search The search strings to apply to the on query parameter values
55
+ * @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
57
+ * @throws ApiError
58
+ */
59
+ snapshotList(enquiryId?: string, page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
60
+ snapshots?: Array<DTOSnapshotRead>;
61
+ }>;
62
+ /**
63
+ * Get Snapshot va ID
64
+ * Returns the specific snapshot given its Id
65
+ * @param snapshotId
66
+ * @returns any OK
67
+ * @throws ApiError
68
+ */
69
+ snapshotGet(snapshotId: SnapshotId): CancelablePromise<{
70
+ snapshot?: DTOSnapshotRead;
71
+ itinerary?: DTOItineraryRead;
72
+ }>;
73
+ /**
74
+ * Delete Snapshot via ID
75
+ * Deletes a specific snapshot given its Id
76
+ * @param snapshotId
77
+ * @returns void
78
+ * @throws ApiError
79
+ */
80
+ snapshotDelete(snapshotId: SnapshotId): CancelablePromise<void>;
81
+ /**
82
+ * Restore Snapshot
83
+ * Creates a new itinerary revision given the content the snapshot refers to
84
+ * @param snapshotId
85
+ * @returns any When a snapshot is restored as the latest version
86
+ * @throws ApiError
87
+ */
88
+ snapshotRestore(snapshotId: SnapshotId): CancelablePromise<{
89
+ snapshot?: DTOSnapshotRead;
90
+ itinerary?: DTOItineraryRead;
91
+ }>;
92
+ /**
93
+ * List Tree view of Itineraries
94
+ * List all itineraries in a tree view for a specific enquiry id
95
+ * @param enquiryId Enquiry Id
96
+ * @returns any The tree list view of all itineraries given the parameters used
97
+ * @throws ApiError
98
+ */
99
+ itineraryList(enquiryId: EnquiryId): CancelablePromise<{
100
+ tree?: Array<Branches>;
101
+ }>;
102
+ /**
103
+ * Create an Itinerary on an Enquiry
104
+ * Creates a new itinerary on an Enquiry
105
+ * @param enquiryId Enquiry Id
106
+ * @param requestBody
107
+ * @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
109
+ * @throws ApiError
110
+ */
111
+ itineraryCreate(enquiryId: EnquiryId, requestBody: DTOItineraryCreate, error?: number): CancelablePromise<{
112
+ itinerary?: DTOItineraryRead;
113
+ tag?: BranchTag;
114
+ enquiryId?: EnquiryId;
115
+ }>;
116
+ /**
117
+ * Get Itinerary
118
+ * Get itinerary via ID
119
+ * @param enquiryId Enquiry Id
120
+ * @param tag the branch tag
121
+ * @param version the version of a branch
122
+ * @returns any The corresponding itinerary that matches the enquiry id, tag, and version
123
+ * @throws ApiError
124
+ */
125
+ itineraryGet(enquiryId: EnquiryId, tag: string, version: string): CancelablePromise<any>;
126
+ /**
127
+ * Update Itinerary as New Revision
128
+ * Updates an itinerary as a new revision on the latest version of a branch
129
+ * @param enquiryId Enquiry Id
130
+ * @param tag the branch tag
131
+ * @param requestBody
132
+ * @param error error can be set to 1, 100, 101, 200, and 201 to mock sync error responses
133
+ * @returns DTOItineraryRead When a new revision is created successfully
134
+ * @throws ApiError
135
+ */
136
+ itineraryUpdateAsNewRevision(enquiryId: EnquiryId, tag: string, requestBody: DTOItineraryUpdate, error?: number): CancelablePromise<DTOItineraryRead>;
137
+ /**
138
+ * Fork an Itinerary
139
+ * this will create a new sub branch off the corresponding itinerary (enquiry id/tag/version)
140
+ * @param enquiryId Enquiry Id
141
+ * @param tag the branch tag
142
+ * @param version the version of a branch
143
+ * @param error error can be set to 1, 100, 101, 200, and 201 to mock sync error responses
144
+ * @returns any When the fork was successful
145
+ * @throws ApiError
146
+ */
147
+ forkItinerary(enquiryId: EnquiryId, tag: string, version: string, error?: number): CancelablePromise<{
148
+ itinerary?: DTOItineraryRead;
149
+ tag?: BranchTag;
150
+ enquiryId?: EnquiryId;
151
+ }>;
152
+ /**
153
+ * Promote an Itinerary
154
+ * This will take itinerary that matches the enquiry id, tag, and version to create a new revision on the head of it's parent branch. This will delete the old sub branch that is being promoted as will exist as the new main head of its parent. Promotions of any tag will always promote into the main branch.
155
+ * @param enquiryId Enquiry Id
156
+ * @param tag the branch tag
157
+ * @param version the version of a branch
158
+ * @param error error can be set to 1, 100, 101, 200, and 201 to mock sync error responses
159
+ * @returns DTOItineraryRead The new head of the parent branch
160
+ * @throws ApiError
161
+ */
162
+ promoteItinerary(enquiryId: EnquiryId, tag: string, version: string, error?: number): CancelablePromise<DTOItineraryRead>;
163
+ /**
164
+ * List Regions
165
+ * List all regions
166
+ * @param page Pagination, starting at page 1
167
+ * @param limit Number of items per page
168
+ * @param order Order the sort query parameter values either by ascending or descending order
169
+ * @param sort List of fields to sort by, this requires the order query param
170
+ * @param search The search strings to apply to the on query parameter values
171
+ * @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
173
+ * @throws ApiError
174
+ */
175
+ regionList(page?: number, limit?: number, order?: 'asc' | 'desc', sort?: any[], search?: Array<string>, on?: Array<string>): CancelablePromise<{
176
+ data?: Array<DTORegionRead>;
177
+ pagination?: Pagination;
178
+ }>;
179
+ /**
180
+ * Create Region
181
+ * Create a region
182
+ * @param requestBody
183
+ * @returns DTORegionRead OK
184
+ * @throws ApiError
185
+ */
186
+ regionCreate(requestBody?: DTORegionCreate): CancelablePromise<DTORegionRead>;
17
187
  /**
18
188
  * List Templates
19
189
  * List all available templates
@@ -106,7 +276,7 @@ export declare class CoreService {
106
276
  componentUpdateAsNewRevision(componentId: ComponentId, requestBody: DTOComponentUpdate): CancelablePromise<DTOComponentRead>;
107
277
  /**
108
278
  * Update Component
109
- * Updates an component
279
+ * Updates a component
110
280
  * @param componentId Id of a component
111
281
  * @param requestBody
112
282
  * @returns DTOComponentRead When a component is updated successfully