@finos/legend-application-marketplace 0.0.19 → 0.0.21

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 (248) hide show
  1. package/lib/__lib__/LegendMarketplaceNavigation.d.ts +3 -0
  2. package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendMarketplaceNavigation.js +11 -1
  4. package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -1
  5. package/lib/app.css +2 -2
  6. package/lib/app.css.map +1 -1
  7. package/lib/application/LegendMarketplaceApplicationConfig.d.ts +10 -0
  8. package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -1
  9. package/lib/application/LegendMarketplaceApplicationConfig.js +10 -0
  10. package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -1
  11. package/lib/application/LegendMarketplaceFrameworkProvider.d.ts.map +1 -1
  12. package/lib/application/LegendMarketplaceFrameworkProvider.js +2 -2
  13. package/lib/application/LegendMarketplaceFrameworkProvider.js.map +1 -1
  14. package/lib/application/LegendMarketplaceWebApplication.d.ts.map +1 -1
  15. package/lib/application/LegendMarketplaceWebApplication.js +18 -8
  16. package/lib/application/LegendMarketplaceWebApplication.js.map +1 -1
  17. package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.d.ts.map +1 -1
  18. package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.js +6 -3
  19. package/lib/components/DataProductCard/LegendMarketplaceDataProductSearchCard.js.map +1 -1
  20. package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.d.ts.map +1 -1
  21. package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.js +9 -6
  22. package/lib/components/DataProductCard/LegendMarketplaceLightDataProductCard.js.map +1 -1
  23. package/lib/components/{Lakehouse/LakehouseHeader.d.ts → Header/MarketplaceLakehouseHeader.d.ts} +2 -2
  24. package/lib/components/Header/MarketplaceLakehouseHeader.d.ts.map +1 -0
  25. package/lib/components/{Lakehouse/LakehouseHeader.js → Header/MarketplaceLakehouseHeader.js} +8 -4
  26. package/lib/components/Header/MarketplaceLakehouseHeader.js.map +1 -0
  27. package/lib/components/MarketplaceCard/LegendMarketplaceCard.d.ts +25 -0
  28. package/lib/components/MarketplaceCard/LegendMarketplaceCard.d.ts.map +1 -0
  29. package/lib/components/MarketplaceCard/LegendMarketplaceCard.js +32 -0
  30. package/lib/components/MarketplaceCard/LegendMarketplaceCard.js.map +1 -0
  31. package/lib/components/ProviderCard/LegendMarketplaceProviderCard.d.ts.map +1 -1
  32. package/lib/components/ProviderCard/LegendMarketplaceProviderCard.js +6 -3
  33. package/lib/components/ProviderCard/LegendMarketplaceProviderCard.js.map +1 -1
  34. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts.map +1 -1
  35. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js +3 -6
  36. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js.map +1 -1
  37. package/lib/index.css +2 -2
  38. package/lib/index.css.map +1 -1
  39. package/lib/package.json +2 -1
  40. package/lib/pages/Home/LegendMarketplaceHome.d.ts.map +1 -1
  41. package/lib/pages/Home/LegendMarketplaceHome.js +4 -4
  42. package/lib/pages/Home/LegendMarketplaceHome.js.map +1 -1
  43. package/lib/pages/Lakehouse/DataProductDataAccess.d.ts.map +1 -0
  44. package/lib/{components → pages}/Lakehouse/DataProductDataAccess.js +41 -9
  45. package/lib/pages/Lakehouse/DataProductDataAccess.js.map +1 -0
  46. package/lib/pages/Lakehouse/DataProductHolder.d.ts.map +1 -0
  47. package/lib/pages/Lakehouse/DataProductHolder.js.map +1 -0
  48. package/lib/pages/Lakehouse/DataProductViewer.d.ts.map +1 -0
  49. package/lib/pages/Lakehouse/DataProductViewer.js.map +1 -0
  50. package/lib/pages/Lakehouse/DataProductViewerActivityBar.d.ts.map +1 -0
  51. package/lib/pages/Lakehouse/DataProductViewerActivityBar.js.map +1 -0
  52. package/lib/pages/Lakehouse/DataProductWiki.d.ts.map +1 -0
  53. package/lib/pages/Lakehouse/DataProductWiki.js.map +1 -0
  54. package/lib/pages/Lakehouse/LakehouseDataProduct.d.ts.map +1 -0
  55. package/lib/{components → pages}/Lakehouse/LakehouseDataProduct.js +3 -3
  56. package/lib/pages/Lakehouse/LakehouseDataProduct.js.map +1 -0
  57. package/lib/{components/Lakehouse/LakehouseMarketplace.d.ts → pages/Lakehouse/MarketplaceLakehouseHome.d.ts} +2 -2
  58. package/lib/pages/Lakehouse/MarketplaceLakehouseHome.d.ts.map +1 -0
  59. package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js +54 -0
  60. package/lib/pages/Lakehouse/MarketplaceLakehouseHome.js.map +1 -0
  61. package/lib/{components/Lakehouse/MarketLakehouseStoreProvider.d.ts → pages/Lakehouse/MarketplaceLakehouseStoreProvider.d.ts} +1 -1
  62. package/lib/pages/Lakehouse/MarketplaceLakehouseStoreProvider.d.ts.map +1 -0
  63. package/lib/{components/Lakehouse/MarketLakehouseStoreProvider.js → pages/Lakehouse/MarketplaceLakehouseStoreProvider.js} +1 -1
  64. package/lib/pages/Lakehouse/MarketplaceLakehouseStoreProvider.js.map +1 -0
  65. package/lib/{components/Lakehouse/entitlements/LakehouseEntitlements.d.ts → pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts} +6 -5
  66. package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.d.ts.map +1 -0
  67. package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.js +194 -0
  68. package/lib/pages/Lakehouse/entitlements/EntitlementsDashboard.js.map +1 -0
  69. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts +24 -0
  70. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.d.ts.map +1 -0
  71. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js +38 -0
  72. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.js.map +1 -0
  73. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.d.ts +22 -0
  74. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.d.ts.map +1 -0
  75. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.js +23 -0
  76. package/lib/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.js.map +1 -0
  77. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.d.ts +21 -0
  78. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.d.ts.map +1 -0
  79. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.js +32 -0
  80. package/lib/pages/Lakehouse/entitlements/EntitlementsTaskViewer.js.map +1 -0
  81. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.d.ts +17 -0
  82. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +1 -0
  83. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.js +55 -0
  84. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlements.js.map +1 -0
  85. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts.map +1 -0
  86. package/lib/pages/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js.map +1 -0
  87. package/lib/pages/Lakehouse/shared/GridItemViewer.d.ts +21 -0
  88. package/lib/pages/Lakehouse/shared/GridItemViewer.d.ts.map +1 -0
  89. package/lib/pages/Lakehouse/shared/GridItemViewer.js +46 -0
  90. package/lib/pages/Lakehouse/shared/GridItemViewer.js.map +1 -0
  91. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts +29 -0
  92. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.d.ts.map +1 -0
  93. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.js +152 -0
  94. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptions.js.map +1 -0
  95. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts +22 -0
  96. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.d.ts.map +1 -0
  97. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js +34 -0
  98. package/lib/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.js.map +1 -0
  99. package/lib/pages/LegendMarketplacePage.d.ts +23 -0
  100. package/lib/pages/LegendMarketplacePage.d.ts.map +1 -0
  101. package/lib/pages/LegendMarketplacePage.js +23 -0
  102. package/lib/pages/LegendMarketplacePage.js.map +1 -0
  103. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.d.ts.map +1 -1
  104. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js +13 -13
  105. package/lib/pages/SearchResults/LegendMarketplaceSearchResults.js.map +1 -1
  106. package/lib/pages/VendorData/LegendMarketplaceVendorData.d.ts.map +1 -1
  107. package/lib/pages/VendorData/LegendMarketplaceVendorData.js +6 -6
  108. package/lib/pages/VendorData/LegendMarketplaceVendorData.js.map +1 -1
  109. package/lib/stores/LakehouseContractServerClient.d.ts +11 -4
  110. package/lib/stores/LakehouseContractServerClient.d.ts.map +1 -1
  111. package/lib/stores/LakehouseContractServerClient.js +21 -3
  112. package/lib/stores/LakehouseContractServerClient.js.map +1 -1
  113. package/lib/stores/LegendMarketplaceBaseStore.d.ts +3 -0
  114. package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -1
  115. package/lib/stores/LegendMarketplaceBaseStore.js +8 -1
  116. package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -1
  117. package/lib/stores/lakehouse/DataProductDataAccessState.d.ts +6 -7
  118. package/lib/stores/lakehouse/DataProductDataAccessState.d.ts.map +1 -1
  119. package/lib/stores/lakehouse/DataProductDataAccessState.js +47 -48
  120. package/lib/stores/lakehouse/DataProductDataAccessState.js.map +1 -1
  121. package/lib/stores/lakehouse/DataProductViewerState.d.ts +7 -3
  122. package/lib/stores/lakehouse/DataProductViewerState.d.ts.map +1 -1
  123. package/lib/stores/lakehouse/DataProductViewerState.js +51 -22
  124. package/lib/stores/lakehouse/DataProductViewerState.js.map +1 -1
  125. package/lib/stores/lakehouse/LakehouseUtils.d.ts +50 -0
  126. package/lib/stores/lakehouse/LakehouseUtils.d.ts.map +1 -0
  127. package/lib/stores/lakehouse/LakehouseUtils.js +267 -0
  128. package/lib/stores/lakehouse/LakehouseUtils.js.map +1 -0
  129. package/lib/stores/lakehouse/MarketplaceLakehouseStore.d.ts.map +1 -1
  130. package/lib/stores/lakehouse/MarketplaceLakehouseStore.js +9 -4
  131. package/lib/stores/lakehouse/MarketplaceLakehouseStore.js.map +1 -1
  132. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts +31 -0
  133. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.d.ts.map +1 -0
  134. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js +110 -0
  135. package/lib/stores/lakehouse/entitlements/EntitlementsDashboardState.js.map +1 -0
  136. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.d.ts +30 -0
  137. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.d.ts.map +1 -0
  138. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js +65 -0
  139. package/lib/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.js.map +1 -0
  140. package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.d.ts +41 -0
  141. package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.d.ts.map +1 -0
  142. package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.js +146 -0
  143. package/lib/stores/lakehouse/entitlements/EntitlementsTaskViewerState.js.map +1 -0
  144. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts +10 -32
  145. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.d.ts.map +1 -1
  146. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js +49 -163
  147. package/lib/stores/lakehouse/entitlements/LakehouseEntitlementsStore.js.map +1 -1
  148. package/lib/stores/lakehouse/entitlements/LakehouseViewerState.d.ts +23 -0
  149. package/lib/stores/lakehouse/entitlements/LakehouseViewerState.d.ts.map +1 -0
  150. package/lib/stores/lakehouse/entitlements/LakehouseViewerState.js +24 -0
  151. package/lib/stores/lakehouse/entitlements/LakehouseViewerState.js.map +1 -0
  152. package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.d.ts +30 -0
  153. package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.d.ts.map +1 -0
  154. package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.js +63 -0
  155. package/lib/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.js.map +1 -0
  156. package/package.json +5 -4
  157. package/src/__lib__/LegendMarketplaceNavigation.ts +16 -1
  158. package/src/application/LegendMarketplaceApplicationConfig.ts +25 -0
  159. package/src/application/LegendMarketplaceFrameworkProvider.tsx +2 -0
  160. package/src/application/LegendMarketplaceWebApplication.tsx +50 -12
  161. package/src/components/DataProductCard/LegendMarketplaceDataProductSearchCard.tsx +41 -33
  162. package/src/components/DataProductCard/LegendMarketplaceLightDataProductCard.tsx +33 -36
  163. package/src/components/{Lakehouse/LakehouseHeader.tsx → Header/MarketplaceLakehouseHeader.tsx} +7 -3
  164. package/src/components/MarketplaceCard/LegendMarketplaceCard.tsx +98 -0
  165. package/src/components/ProviderCard/LegendMarketplaceProviderCard.tsx +47 -39
  166. package/src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx +2 -14
  167. package/src/pages/Home/LegendMarketplaceHome.tsx +42 -51
  168. package/src/{components → pages}/Lakehouse/DataProductDataAccess.tsx +91 -12
  169. package/src/{components → pages}/Lakehouse/LakehouseDataProduct.tsx +14 -23
  170. package/src/pages/Lakehouse/MarketplaceLakehouseHome.tsx +167 -0
  171. package/src/pages/Lakehouse/entitlements/EntitlementsDashboard.tsx +390 -0
  172. package/src/pages/Lakehouse/entitlements/EntitlementsDataContractCreator.tsx +99 -0
  173. package/src/pages/Lakehouse/entitlements/EntitlementsDataContractViewer.tsx +33 -0
  174. package/src/pages/Lakehouse/entitlements/EntitlementsTaskViewer.tsx +73 -0
  175. package/src/pages/Lakehouse/entitlements/LakehouseEntitlements.tsx +82 -0
  176. package/src/pages/Lakehouse/shared/GridItemViewer.tsx +105 -0
  177. package/src/pages/Lakehouse/subscriptions/LakehouseSubscriptions.tsx +358 -0
  178. package/src/pages/Lakehouse/subscriptions/LakehouseSubscriptionsStoreProvider.tsx +65 -0
  179. package/src/pages/LegendMarketplacePage.tsx +26 -0
  180. package/src/pages/SearchResults/LegendMarketplaceSearchResults.tsx +58 -65
  181. package/src/pages/VendorData/LegendMarketplaceVendorData.tsx +44 -42
  182. package/src/stores/LakehouseContractServerClient.ts +78 -10
  183. package/src/stores/LegendMarketplaceBaseStore.ts +16 -1
  184. package/src/stores/lakehouse/DataProductDataAccessState.ts +67 -63
  185. package/src/stores/lakehouse/DataProductViewerState.ts +86 -29
  186. package/src/stores/lakehouse/LakehouseUtils.ts +345 -0
  187. package/src/stores/lakehouse/MarketplaceLakehouseStore.ts +10 -6
  188. package/src/stores/lakehouse/entitlements/EntitlementsDashboardState.ts +167 -0
  189. package/src/stores/lakehouse/entitlements/EntitlementsDataContractViewerState.ts +101 -0
  190. package/src/stores/lakehouse/entitlements/EntitlementsTaskViewerState.ts +227 -0
  191. package/src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts +69 -231
  192. package/src/stores/lakehouse/entitlements/LakehouseViewerState.ts +27 -0
  193. package/src/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.ts +100 -0
  194. package/tsconfig.json +26 -13
  195. package/lib/components/Lakehouse/DataProductDataAccess.d.ts.map +0 -1
  196. package/lib/components/Lakehouse/DataProductDataAccess.js.map +0 -1
  197. package/lib/components/Lakehouse/DataProductHolder.d.ts.map +0 -1
  198. package/lib/components/Lakehouse/DataProductHolder.js.map +0 -1
  199. package/lib/components/Lakehouse/DataProductViewer.d.ts.map +0 -1
  200. package/lib/components/Lakehouse/DataProductViewer.js.map +0 -1
  201. package/lib/components/Lakehouse/DataProductViewerActivityBar.d.ts.map +0 -1
  202. package/lib/components/Lakehouse/DataProductViewerActivityBar.js.map +0 -1
  203. package/lib/components/Lakehouse/DataProductWiki.d.ts.map +0 -1
  204. package/lib/components/Lakehouse/DataProductWiki.js.map +0 -1
  205. package/lib/components/Lakehouse/LakehouseDataProduct.d.ts.map +0 -1
  206. package/lib/components/Lakehouse/LakehouseDataProduct.js.map +0 -1
  207. package/lib/components/Lakehouse/LakehouseHeader.d.ts.map +0 -1
  208. package/lib/components/Lakehouse/LakehouseHeader.js.map +0 -1
  209. package/lib/components/Lakehouse/LakehouseMarketplace.d.ts.map +0 -1
  210. package/lib/components/Lakehouse/LakehouseMarketplace.js +0 -57
  211. package/lib/components/Lakehouse/LakehouseMarketplace.js.map +0 -1
  212. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.d.ts.map +0 -1
  213. package/lib/components/Lakehouse/MarketLakehouseStoreProvider.js.map +0 -1
  214. package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.d.ts.map +0 -1
  215. package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.js +0 -147
  216. package/lib/components/Lakehouse/entitlements/LakehouseEntitlements.js.map +0 -1
  217. package/lib/components/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts.map +0 -1
  218. package/lib/components/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js.map +0 -1
  219. package/lib/stores/MarketplaceLakehouseServerClient.d.ts +0 -25
  220. package/lib/stores/MarketplaceLakehouseServerClient.d.ts.map +0 -1
  221. package/lib/stores/MarketplaceLakehouseServerClient.js +0 -27
  222. package/lib/stores/MarketplaceLakehouseServerClient.js.map +0 -1
  223. package/lib/stores/lakehouse/entitlements/DataContractState.d.ts +0 -27
  224. package/lib/stores/lakehouse/entitlements/DataContractState.d.ts.map +0 -1
  225. package/lib/stores/lakehouse/entitlements/DataContractState.js +0 -115
  226. package/lib/stores/lakehouse/entitlements/DataContractState.js.map +0 -1
  227. package/src/components/Lakehouse/LakehouseMarketplace.tsx +0 -193
  228. package/src/components/Lakehouse/entitlements/LakehouseEntitlements.tsx +0 -332
  229. package/src/stores/MarketplaceLakehouseServerClient.ts +0 -40
  230. package/src/stores/lakehouse/entitlements/DataContractState.ts +0 -131
  231. /package/lib/{components → pages}/Lakehouse/DataProductDataAccess.d.ts +0 -0
  232. /package/lib/{components → pages}/Lakehouse/DataProductHolder.d.ts +0 -0
  233. /package/lib/{components → pages}/Lakehouse/DataProductHolder.js +0 -0
  234. /package/lib/{components → pages}/Lakehouse/DataProductViewer.d.ts +0 -0
  235. /package/lib/{components → pages}/Lakehouse/DataProductViewer.js +0 -0
  236. /package/lib/{components → pages}/Lakehouse/DataProductViewerActivityBar.d.ts +0 -0
  237. /package/lib/{components → pages}/Lakehouse/DataProductViewerActivityBar.js +0 -0
  238. /package/lib/{components → pages}/Lakehouse/DataProductWiki.d.ts +0 -0
  239. /package/lib/{components → pages}/Lakehouse/DataProductWiki.js +0 -0
  240. /package/lib/{components → pages}/Lakehouse/LakehouseDataProduct.d.ts +0 -0
  241. /package/lib/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.d.ts +0 -0
  242. /package/lib/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.js +0 -0
  243. /package/src/{components → pages}/Lakehouse/DataProductHolder.tsx +0 -0
  244. /package/src/{components → pages}/Lakehouse/DataProductViewer.tsx +0 -0
  245. /package/src/{components → pages}/Lakehouse/DataProductViewerActivityBar.tsx +0 -0
  246. /package/src/{components → pages}/Lakehouse/DataProductWiki.tsx +0 -0
  247. /package/src/{components/Lakehouse/MarketLakehouseStoreProvider.tsx → pages/Lakehouse/MarketplaceLakehouseStoreProvider.tsx} +0 -0
  248. /package/src/{components → pages}/Lakehouse/entitlements/LakehouseEntitlementsStoreProvider.tsx +0 -0
@@ -15,197 +15,81 @@
15
15
  */
16
16
  import { ActionState, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';
17
17
  import { deserialize } from 'serializr';
18
- import { V1_pendingTasksRespondModelSchema, V1_TaskStatusChangeResponseModelSchema, V1_DataContractsRecordModelSchema, } from '@finos/legend-graph';
19
- import { makeObservable, flow, observable, action, flowResult } from 'mobx';
20
- import { buildDataContractDetail, DataContractState, } from './DataContractState.js';
18
+ import { V1_deserializeTaskResponse, V1_DataContractsRecordModelSchema, } from '@finos/legend-graph';
19
+ import { makeObservable, flow, observable, flowResult, action } from 'mobx';
20
+ import { EntitlementsDataContractViewerState } from './EntitlementsDataContractViewerState.js';
21
+ import { EntitlementsDashboardState } from './EntitlementsDashboardState.js';
22
+ import { EntitlementsTaskViewerState } from './EntitlementsTaskViewerState.js';
21
23
  export const TEST_USER = undefined;
22
- export class ContractUserEventState {
23
- state;
24
- value;
25
- canApprove;
26
- dataContract;
27
- constructor(value, state) {
28
- this.value = value;
29
- this.state = state;
30
- makeObservable(this, {
31
- value: observable,
32
- canApprove: observable,
33
- setCanApprove: observable,
34
- approve: flow,
35
- deny: flow,
36
- init: flow,
37
- calculateApprovalRights: flow,
38
- fetchContract: flow,
39
- dataContract: observable,
40
- });
41
- this.observeContract();
42
- }
43
- get id() {
44
- return this.value.taskId;
45
- }
46
- *init(token) {
47
- flowResult(this.calculateApprovalRights(token)).catch(this.state.applicationStore.alertUnhandledError);
48
- flowResult(this.fetchContract(token)).catch(this.state.applicationStore.alertUnhandledError);
49
- }
50
- setCanApprove(val) {
51
- this.canApprove = val;
52
- }
53
- observeContract() {
54
- makeObservable(this.value, {
55
- status: observable,
56
- });
57
- }
58
- *approve(token) {
59
- try {
60
- const response = (yield this.state.lakehouseServerClient.approveTask(this.value.taskId, token));
61
- const change = deserialize(V1_TaskStatusChangeResponseModelSchema, response);
62
- if (change.errorMessage) {
63
- throw new Error(`Unable to approve task: ${this.value.taskId}: ${change.errorMessage}`);
64
- }
65
- this.value.status = change.status;
66
- this.setCanApprove(false);
67
- }
68
- catch (error) {
69
- assertErrorThrown(error);
70
- }
71
- }
72
- *deny(token) {
73
- try {
74
- const response = (yield this.state.lakehouseServerClient.denyTaskTask(this.value.taskId, token));
75
- const change = deserialize(V1_TaskStatusChangeResponseModelSchema, response);
76
- if (change.errorMessage) {
77
- throw new Error(`Unable to deny task: ${this.value.taskId}: ${change.errorMessage}`);
78
- }
79
- this.value.status = change.status;
80
- this.setCanApprove(false);
81
- }
82
- catch (error) {
83
- assertErrorThrown(error);
84
- }
85
- }
86
- *calculateApprovalRights(token) {
87
- this.canApprove = undefined;
88
- try {
89
- const rawTasks = (yield this.state.lakehouseServerClient.getPendingTasks(TEST_USER, token));
90
- const tasks = deserialize(V1_pendingTasksRespondModelSchema, rawTasks);
91
- const allTasks = [...tasks.dataOwner, ...tasks.privilegeManager];
92
- const canApprove = Boolean(allTasks.find((e) => e.taskId === this.value.taskId));
93
- this.setCanApprove(canApprove);
94
- }
95
- catch (error) {
96
- assertErrorThrown(error);
97
- }
98
- }
99
- *fetchContract(token) {
100
- try {
101
- const contractId = this.value.dataContractId;
102
- const dataContracts = (yield this.state.lakehouseServerClient.getDataContract(contractId, token));
103
- const dataContract = deserialize(V1_DataContractsRecordModelSchema, dataContracts).dataContracts[0]?.dataContract;
104
- this.dataContract = dataContract;
105
- }
106
- catch (error) {
107
- assertErrorThrown(error);
108
- }
109
- }
110
- get taskDetails() {
111
- return [
112
- {
113
- name: 'Task ID',
114
- value: this.value.taskId,
115
- },
116
- {
117
- name: 'Task Status',
118
- value: this.value.status.toString(),
119
- },
120
- {
121
- name: 'Task Consumer',
122
- value: this.value.consumer,
123
- },
124
- ...(this.dataContract ? buildDataContractDetail(this.dataContract) : []),
125
- ];
126
- }
127
- }
24
+ export const TEST_USER2 = undefined;
128
25
  export class LakehouseEntitlementsStore {
129
26
  applicationStore;
130
27
  lakehouseServerClient;
131
- tasks;
132
- fetchingTasks = ActionState.create();
133
- // TODO: make current rendering more robust
134
- currentTask;
135
- currentDataContract;
28
+ directoryUrl;
29
+ applicationIdUrl;
30
+ directoryCallBack;
31
+ applicationCallBack;
32
+ initializationState = ActionState.create();
33
+ currentViewer;
136
34
  constructor(applicationStore, lakehouseServerClient) {
137
35
  this.applicationStore = applicationStore;
138
36
  this.lakehouseServerClient = lakehouseServerClient;
37
+ this.directoryUrl =
38
+ this.applicationStore.config.lakehouseEntitlementsConfig?.applicationDirectoryUrl;
39
+ this.applicationIdUrl =
40
+ this.applicationStore.config.lakehouseEntitlementsConfig?.applicationIDUrl;
41
+ this.directoryCallBack = this.directoryUrl
42
+ ? (user) => {
43
+ this.applicationStore.navigationService.navigator.visitAddress(`${this.directoryUrl}/${user}`);
44
+ }
45
+ : undefined;
46
+ this.applicationCallBack = this.applicationIdUrl
47
+ ? (id) => {
48
+ this.applicationStore.navigationService.navigator.visitAddress(`${this.applicationIdUrl}/${id}`);
49
+ }
50
+ : undefined;
139
51
  makeObservable(this, {
140
52
  init: flow,
141
- initWithId: flow,
53
+ initWithTaskId: flow,
142
54
  initWithContract: flow,
143
- currentTask: observable,
144
- fetchingTasks: observable,
145
- currentDataContract: observable,
146
- tasks: observable,
147
- setTasks: action,
148
- setDataContract: action,
149
- clear: action,
55
+ currentViewer: observable,
56
+ setCurrentViewer: action,
150
57
  });
151
58
  }
152
- setTasks(val) {
153
- this.tasks = val;
154
- }
155
- setCurrentTask(val) {
156
- this.currentTask = val;
157
- }
158
- setDataContract(val) {
159
- this.currentDataContract = val;
160
- }
161
- clear() {
162
- this.setCurrentTask(undefined);
163
- this.setTasks(undefined);
164
- this.setDataContract(undefined);
59
+ setCurrentViewer(val) {
60
+ this.currentViewer = val;
165
61
  }
166
62
  *init(taskId, contractId, token) {
167
- this.clear();
63
+ this.setCurrentViewer(undefined);
168
64
  if (taskId) {
169
- flowResult(this.initWithId(taskId, token)).catch(this.applicationStore.alertUnhandledError);
65
+ flowResult(this.initWithTaskId(taskId, token)).catch(this.applicationStore.alertUnhandledError);
170
66
  return;
171
67
  }
172
68
  else if (contractId) {
173
69
  flowResult(this.initWithContract(contractId, token)).catch(this.applicationStore.alertUnhandledError);
174
70
  return;
175
71
  }
176
- try {
177
- this.fetchingTasks.inProgress();
178
- const rawTasks = (yield this.lakehouseServerClient.getPendingTasks(TEST_USER, token));
179
- const tasks = deserialize(V1_pendingTasksRespondModelSchema, rawTasks);
180
- this.setTasks([...tasks.dataOwner, ...tasks.privilegeManager].map((_contract) => new ContractUserEventState(_contract, this)));
181
- }
182
- catch (error) {
183
- assertErrorThrown(error);
184
- }
185
- finally {
186
- this.fetchingTasks.complete();
187
- }
72
+ // TODO: similiar logic should be used above ^
73
+ const currentViewer = new EntitlementsDashboardState(this);
74
+ this.setCurrentViewer(currentViewer);
75
+ currentViewer.init(token);
188
76
  }
189
- *initWithId(taskId, token) {
190
- this.setTasks(undefined);
77
+ *initWithTaskId(taskId, token) {
191
78
  try {
192
- this.fetchingTasks.inProgress();
193
- // TEMP: for now we will assume task id is in pending user.
194
- // Once 'getTaskId` is added in server we will use that to query task
195
- const rawTasks = (yield this.lakehouseServerClient.getPendingTasks(TEST_USER, token));
196
- const tasks = deserialize(V1_pendingTasksRespondModelSchema, rawTasks);
197
- const allTasks = [...tasks.dataOwner, ...tasks.privilegeManager];
198
- const task = guaranteeNonNullable(allTasks.find((e) => e.taskId === taskId));
199
- const currentTask = new ContractUserEventState(task, this);
200
- this.setCurrentTask(currentTask);
79
+ this.initializationState.inProgress();
80
+ const rawTasks = (yield this.lakehouseServerClient.getTask(taskId, token));
81
+ const tasks = V1_deserializeTaskResponse(rawTasks);
82
+ const task = guaranteeNonNullable(tasks[0], `Task with id '${taskId}' not found`);
83
+ const currentTask = new EntitlementsTaskViewerState(task, this);
84
+ this.setCurrentViewer(currentTask);
201
85
  flowResult(currentTask.init(token)).catch(this.applicationStore.alertUnhandledError);
202
86
  }
203
87
  catch (error) {
204
88
  assertErrorThrown(error);
205
- // TODO: show user error
89
+ this.applicationStore.notificationService.notifyError(`Unable to render task page: ${error.message}`);
206
90
  }
207
91
  finally {
208
- this.fetchingTasks.complete();
92
+ this.initializationState.complete();
209
93
  }
210
94
  }
211
95
  *initWithContract(id, token) {
@@ -213,7 +97,9 @@ export class LakehouseEntitlementsStore {
213
97
  const dataContracts = (yield this.lakehouseServerClient.getDataContract(id, token));
214
98
  const dataContract = deserialize(V1_DataContractsRecordModelSchema, dataContracts).dataContracts[0]?.dataContract;
215
99
  const contract = guaranteeNonNullable(dataContract, 'Data Contract not found');
216
- this.currentDataContract = new DataContractState(contract, this);
100
+ const currentViewer = new EntitlementsDataContractViewerState(contract, this);
101
+ this.setCurrentViewer(currentViewer);
102
+ flowResult(currentViewer.init(token)).catch(this.applicationStore.alertUnhandledError);
217
103
  }
218
104
  catch (error) {
219
105
  assertErrorThrown(error);
@@ -1 +1 @@
1
- {"version":3,"file":"LakehouseEntitlementsStore.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAML,iCAAiC,EACjC,sCAAsC,EACtC,iCAAiC,GAElC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AAQnC,MAAM,OAAO,sBAAsB;IACxB,KAAK,CAA6B;IAClC,KAAK,CAA6B;IAC3C,UAAU,CAAsB;IAChC,YAAY,CAA8B;IAE1C,YACE,KAAiC,EACjC,KAAiC;QAEjC,IAAI,CAAC,KAAK,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AoB,CACnC,YAAY,EACZ,yBAAyB,CAC1B,CAAC;YACF,IAAI,CAAC,mBAAmB,GAAG,IAAI,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"LakehouseEntitlementsStore.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseEntitlementsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAGL,0BAA0B,EAC1B,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAG/E,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;AAEpC,MAAM,OAAO,0BAA0B;IAC5B,gBAAgB,CAAoC;IACpD,qBAAqB,CAAgC;IACrD,YAAY,CAAqB;IACjC,gBAAgB,CAAqB;IACrC,iBAAiB,CAAuC;IACxD,mBAAmB,CAAgD;IAC5E,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAC3C,aAAa,CAAmC;IAEhD,YACE,gBAAmD,EACnD,qBAAoD;QAEpD,IAAI,CAAC,gBAAgB,GAAG,gBAA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,mBAAmB,CAAC,WAAW,CACnD,+BAA+B,KAAK,CAAC,OAAO,EAAE,CAC/C,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAED,CAAC,gBAAgB,CAAC,EAAU,EAAE,KAAyB;QACrD,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,eAAe,CACrE,EAAE,EACF,KAAK,CACN,CAAwC,CAAC;YAE1C,MAAM,YAAY,GAAG,WAAW,CAC9B,iCAAiC,EACjC,aAAa,CACd,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;YACjC,MAAM,QAAQ,GAAG,oBAAoB,CACnC,YAAY,EACZ,yBAAyB,CAC1B,CAAC;YACF,MAAM,aAAa,GAAG,IAAI,mCAAmC,CAC3D,QAAQ,EACR,IAAI,CACL,CAAC;YACF,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YACrC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CACzC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAC1C,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ActionState } from '@finos/legend-shared';
17
+ import type { LakehouseEntitlementsStore } from './LakehouseEntitlementsStore.js';
18
+ export declare abstract class LakehouseViewerState {
19
+ readonly state: LakehouseEntitlementsStore;
20
+ initializationState: ActionState;
21
+ constructor(state: LakehouseEntitlementsStore);
22
+ }
23
+ //# sourceMappingURL=LakehouseViewerState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LakehouseViewerState.d.ts","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,8BAAsB,oBAAoB;IACxC,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;IAC3C,mBAAmB,cAAwB;gBAE/B,KAAK,EAAE,0BAA0B;CAG9C"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ActionState } from '@finos/legend-shared';
17
+ export class LakehouseViewerState {
18
+ state;
19
+ initializationState = ActionState.create();
20
+ constructor(state) {
21
+ this.state = state;
22
+ }
23
+ }
24
+ //# sourceMappingURL=LakehouseViewerState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LakehouseViewerState.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/entitlements/LakehouseViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,MAAM,OAAgB,oBAAoB;IAC/B,KAAK,CAA6B;IAC3C,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAE3C,YAAY,KAAiC;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { LakehouseContractServerClient } from '../../LakehouseContractServerClient.js';
17
+ import type { LegendMarketplaceApplicationStore } from '../../LegendMarketplaceBaseStore.js';
18
+ import { type GeneratorFn, ActionState } from '@finos/legend-shared';
19
+ import { type V1_DataSubscription, type V1_DataSubscriptionTarget } from '@finos/legend-graph';
20
+ export declare class LakehouseSubscriptionsStore {
21
+ readonly applicationStore: LegendMarketplaceApplicationStore;
22
+ readonly lakehouseServerClient: LakehouseContractServerClient;
23
+ initializationState: ActionState;
24
+ subscriptions: V1_DataSubscription[];
25
+ constructor(applicationStore: LegendMarketplaceApplicationStore, lakehouseServerClient: LakehouseContractServerClient);
26
+ init(token: string | undefined): GeneratorFn<void>;
27
+ setSubscriptions(val: V1_DataSubscription[]): void;
28
+ createSubscription(contractId: string, target: V1_DataSubscriptionTarget, token: string | undefined): Promise<V1_DataSubscription>;
29
+ }
30
+ //# sourceMappingURL=LakehouseSubscriptionsStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LakehouseSubscriptionsStore.d.ts","sourceRoot":"","sources":["../../../../src/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,yBAAyB,EAK/B,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,2BAA2B;IACtC,QAAQ,CAAC,gBAAgB,EAAE,iCAAiC,CAAC;IAC7D,QAAQ,CAAC,qBAAqB,EAAE,6BAA6B,CAAC;IAC9D,mBAAmB,cAAwB;IAC3C,aAAa,EAAE,mBAAmB,EAAE,CAAM;gBAGxC,gBAAgB,EAAE,iCAAiC,EACnD,qBAAqB,EAAE,6BAA6B;IAYrD,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC;IAoBnD,gBAAgB,CAAC,GAAG,EAAE,mBAAmB,EAAE,GAAG,IAAI;IAI5C,kBAAkB,CACtB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,yBAAyB,EACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,mBAAmB,CAAC;CAehC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ActionState, assertErrorThrown, guaranteeNonNullable, } from '@finos/legend-shared';
17
+ import { deserialize, serialize } from 'serializr';
18
+ import { V1_CreateSubscriptionInput, V1_CreateSubscriptionInputModelSchema, V1_dataSubscriptionModelSchema, V1_DataSubscriptionResponseModelSchema, } from '@finos/legend-graph';
19
+ import { makeObservable, flow, action, observable } from 'mobx';
20
+ export class LakehouseSubscriptionsStore {
21
+ applicationStore;
22
+ lakehouseServerClient;
23
+ initializationState = ActionState.create();
24
+ subscriptions = [];
25
+ constructor(applicationStore, lakehouseServerClient) {
26
+ this.applicationStore = applicationStore;
27
+ this.lakehouseServerClient = lakehouseServerClient;
28
+ makeObservable(this, {
29
+ subscriptions: observable,
30
+ init: flow,
31
+ setSubscriptions: action,
32
+ createSubscription: action,
33
+ });
34
+ }
35
+ *init(token) {
36
+ try {
37
+ this.initializationState.inProgress();
38
+ const rawSubscriptions = (yield this.lakehouseServerClient.getAllSubscriptions(token));
39
+ const subscriptions = rawSubscriptions.subscriptions?.map((rawSubscription) => deserialize(V1_dataSubscriptionModelSchema, rawSubscription));
40
+ this.setSubscriptions(subscriptions ?? []);
41
+ }
42
+ catch (error) {
43
+ assertErrorThrown(error);
44
+ // TODO: show user error
45
+ }
46
+ finally {
47
+ this.initializationState.complete();
48
+ }
49
+ }
50
+ setSubscriptions(val) {
51
+ this.subscriptions = val;
52
+ }
53
+ async createSubscription(contractId, target, token) {
54
+ const input = new V1_CreateSubscriptionInput();
55
+ input.contractId = contractId;
56
+ input.target = target;
57
+ const response = await this.lakehouseServerClient.createSubscription(serialize(V1_CreateSubscriptionInputModelSchema, input), token);
58
+ const subscription = guaranteeNonNullable(deserialize(V1_DataSubscriptionResponseModelSchema, response)
59
+ .subscriptions?.[0], 'No subsription returned from server');
60
+ return subscription;
61
+ }
62
+ }
63
+ //# sourceMappingURL=LakehouseSubscriptionsStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LakehouseSubscriptionsStore.js","sourceRoot":"","sources":["../../../../src/stores/lakehouse/subscriptions/LakehouseSubscriptionsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAIL,0BAA0B,EAC1B,qCAAqC,EACrC,8BAA8B,EAC9B,sCAAsC,GACvC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEhE,MAAM,OAAO,2BAA2B;IAC7B,gBAAgB,CAAoC;IACpD,qBAAqB,CAAgC;IAC9D,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAC3C,aAAa,GAA0B,EAAE,CAAC;IAE1C,YACE,gBAAmD,EACnD,qBAAoD;QAEpD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,cAAc,CAAC,IAAI,EAAE;YACnB,aAAa,EAAE,UAAU;YACzB,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,MAAM;YACxB,kBAAkB,EAAE,MAAM;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,CAAC,IAAI,CAAC,KAAyB;QAC7B,IAAI,CAAC;YACH,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC;YACtC,MAAM,gBAAgB,GACpB,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,mBAAmB,CACnD,KAAK,CACN,CAAgC,CAAC;YACpC,MAAM,aAAa,GAAG,gBAAgB,CAAC,aAAa,EAAE,GAAG,CACvD,CAAC,eAAe,EAAE,EAAE,CAClB,WAAW,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAC/D,CAAC;YACF,IAAI,CAAC,gBAAgB,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,wBAAwB;QAC1B,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAED,gBAAgB,CAAC,GAA0B;QACzC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,UAAkB,EAClB,MAAiC,EACjC,KAAyB;QAEzB,MAAM,KAAK,GAAG,IAAI,0BAA0B,EAAE,CAAC;QAC/C,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;QAC9B,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAClE,SAAS,CAAC,qCAAqC,EAAE,KAAK,CAAC,EACvD,KAAK,CACN,CAAC;QACF,MAAM,YAAY,GAAG,oBAAoB,CACvC,WAAW,CAAC,sCAAsC,EAAE,QAAQ,CAAC;aAC1D,aAAa,EAAE,CAAC,CAAC,CAAC,EACrB,qCAAqC,CACtC,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-marketplace",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "Legend Marketplace application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,10 +45,11 @@
45
45
  "test:watch": "jest --watch"
46
46
  },
47
47
  "dependencies": {
48
- "@finos/legend-application": "16.0.39",
48
+ "@finos/legend-application": "16.0.41",
49
49
  "@finos/legend-art": "7.1.95",
50
- "@finos/legend-graph": "32.1.25",
51
- "@finos/legend-lego": "2.0.71",
50
+ "@finos/legend-code-editor": "workspace:^",
51
+ "@finos/legend-graph": "32.1.27",
52
+ "@finos/legend-lego": "2.0.73",
52
53
  "@finos/legend-server-depot": "6.0.90",
53
54
  "@finos/legend-server-marketplace": "0.0.3",
54
55
  "@finos/legend-shared": "11.0.11",
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { generatePath } from '@finos/legend-application/browser';
17
+ import { generatePath, matchPath } from '@finos/legend-application/browser';
18
18
  import {
19
19
  addQueryParametersToUrl,
20
20
  stringifyQueryParams,
@@ -53,8 +53,23 @@ export const LEGEND_MARKETPLACE_ROUTE_PATTERN = Object.freeze({
53
53
  LAKEHOUSE_ENTITLEMENTS_TASKS: `/lakehouse/entitlements/tasks/:${LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.TASK_ID}`,
54
54
  LAKEHOUSE_ENTITLEMENTS_CONTRACTS: `/lakehouse/entitlements/contracts/:${LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.CONTRACT_ID}`,
55
55
  LAKEHOUSE_PRODUCT: `/lakehouse/dataProduct/:${LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.GAV}/:${LEGEND_MARKETPLACE_ROUTE_PATTERN_TOKEN.DATA_PRODUCT_PATH}`,
56
+ LAKEHOUSE_SUBSCRIPTIONS: '/lakehouse/subscriptions',
56
57
  });
57
58
 
59
+ export const LAKEHOUSE_ROUTES = Object.freeze([
60
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE,
61
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS,
62
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS_TASKS,
63
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_ENTITLEMENTS_CONTRACTS,
64
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_PRODUCT,
65
+ LEGEND_MARKETPLACE_ROUTE_PATTERN.LAKEHOUSE_SUBSCRIPTIONS,
66
+ ]);
67
+
68
+ export const isLakehouseRoute = (pathName: string): boolean =>
69
+ LAKEHOUSE_ROUTES.some(
70
+ (route) => matchPath(route as string, pathName) !== null,
71
+ );
72
+
58
73
  export const generateLakehouseDataProduct = (
59
74
  gav: string,
60
75
  path: string,
@@ -60,12 +60,24 @@ export interface LegendMarketplaceApplicationConfigurationData
60
60
  };
61
61
  lakehouse?: {
62
62
  url: string;
63
+ entitlements: {
64
+ applicationDirectoryUrl: string;
65
+ applicationIDUrl: string;
66
+ };
63
67
  };
64
68
  studio?: {
65
69
  url: string;
66
70
  };
67
71
  }
68
72
 
73
+ export class LegendLakehouseEntitlementsConfig {
74
+ applicationDirectoryUrl: string;
75
+ applicationIDUrl: string;
76
+ constructor(applicationDirectoryUrl: string, applicationIDUrl: string) {
77
+ this.applicationDirectoryUrl = applicationDirectoryUrl;
78
+ this.applicationIDUrl = applicationIDUrl;
79
+ }
80
+ }
69
81
  export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig {
70
82
  readonly options = new LegendMarketplaceApplicationCoreOptions();
71
83
 
@@ -74,6 +86,9 @@ export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig
74
86
  readonly engineServerUrl: string;
75
87
  readonly depotServerUrl: string;
76
88
  readonly lakehouseServerUrl?: string;
89
+ readonly lakehouseEntitlementsConfig:
90
+ | LegendLakehouseEntitlementsConfig
91
+ | undefined;
77
92
  readonly studioServerUrl?: string;
78
93
 
79
94
  constructor(
@@ -127,6 +142,16 @@ export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig
127
142
  `Can't configure application: 'lakehouse.url' field is missing or empty`,
128
143
  ),
129
144
  );
145
+ this.lakehouseEntitlementsConfig = new LegendLakehouseEntitlementsConfig(
146
+ guaranteeNonEmptyString(
147
+ input.configData.lakehouse.entitlements.applicationDirectoryUrl,
148
+ `Can't configure application: 'lakehouse.entitlements.applicationDirectoryUrl' field is missing or empty`,
149
+ ),
150
+ guaranteeNonEmptyString(
151
+ input.configData.lakehouse.entitlements.applicationIDUrl,
152
+ `Can't configure application: 'lakehouse.entitlements.applicationIDUrl' field is missing or empty`,
153
+ ),
154
+ );
130
155
  }
131
156
  // studio
132
157
  if (input.configData.studio) {
@@ -21,6 +21,7 @@ import {
21
21
  ApplicationFrameworkProvider,
22
22
  BlockingAlert,
23
23
  useApplicationStore,
24
+ NotificationManager,
24
25
  } from '@finos/legend-application';
25
26
  import {
26
27
  type LegendMarketplaceApplicationStore,
@@ -65,6 +66,7 @@ export const LegendMarketplaceFrameworkProvider: React.FC<{
65
66
  }> = ({ children }) => (
66
67
  <ApplicationFrameworkProvider simple={true} enableTransitions={true}>
67
68
  <BlockingAlert />
69
+ <NotificationManager />
68
70
  <LegendMarketplaceBaseStoreProvider>
69
71
  {children}
70
72
  </LegendMarketplaceBaseStoreProvider>