@burdenoff/microfe-theglobalfuel 2026.705.5 → 2026.709.2

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 (241) hide show
  1. package/README.md +3 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +18199 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +2 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-types.d.ts +43046 -0
  11. package/dist/generated/wspace-types.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +3 -1
  15. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  17. package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
  18. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  19. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  21. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
  22. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  23. package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
  24. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  25. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  26. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  27. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  29. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  31. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  32. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  33. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  34. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  35. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  36. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  37. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  38. package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
  39. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  40. package/dist/theglobalfuel/components/PageLayout.js +2 -1
  41. package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
  42. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  43. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  44. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  45. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  46. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  47. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  48. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  49. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  50. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  51. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  52. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  53. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  54. package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
  55. package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
  56. package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
  57. package/dist/theglobalfuel/components/index.d.ts +21 -0
  58. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  59. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
  60. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
  61. package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
  62. package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
  63. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
  64. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
  65. package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
  66. package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
  67. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
  68. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
  69. package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
  70. package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
  71. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
  72. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
  73. package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
  74. package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
  75. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
  76. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
  77. package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
  78. package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
  79. package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
  80. package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
  81. package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
  82. package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
  83. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
  84. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
  85. package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
  86. package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
  87. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
  88. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
  89. package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
  90. package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
  91. package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
  92. package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
  93. package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
  94. package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
  95. package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
  96. package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
  97. package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
  98. package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
  99. package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
  100. package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
  101. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
  102. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
  103. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
  104. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
  105. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
  106. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
  107. package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
  108. package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
  109. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
  110. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
  111. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
  112. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
  113. package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
  114. package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
  115. package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
  116. package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
  117. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  118. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  119. package/dist/theglobalfuel/context/index.d.ts +6 -0
  120. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  121. package/dist/theglobalfuel/hooks/index.d.ts +15 -0
  122. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  123. package/dist/theglobalfuel/hooks/index.js +4 -0
  124. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
  125. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  126. package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
  127. package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
  128. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
  129. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
  130. package/dist/theglobalfuel/hooks/useTheAnalytics.js +46 -0
  131. package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -0
  132. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  133. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  134. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  135. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  136. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
  137. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  138. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
  139. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
  140. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
  141. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
  142. package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
  143. package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
  144. package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
  145. package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
  146. package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
  147. package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
  148. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  149. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  150. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
  151. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
  152. package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
  153. package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
  154. package/dist/theglobalfuel/index.d.ts +11 -0
  155. package/dist/theglobalfuel/index.d.ts.map +1 -0
  156. package/dist/theglobalfuel/index.js +2 -0
  157. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  158. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  159. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +395 -353
  160. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  161. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  162. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  163. package/dist/theglobalfuel/pages/assets/AssetsPage.js +152 -146
  164. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  165. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  166. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  167. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
  168. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  169. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  170. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  171. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
  172. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  173. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  174. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  175. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +237 -231
  176. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  177. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
  178. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  179. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +255 -250
  180. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  181. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
  182. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  183. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
  184. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  185. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  186. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  187. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
  188. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  189. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  190. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  191. package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
  192. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  193. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
  194. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
  195. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
  196. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  197. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  198. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  199. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
  200. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  201. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
  202. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  203. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
  204. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  205. package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
  206. package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
  207. package/dist/theglobalfuel/services/assistantApi.js +225 -0
  208. package/dist/theglobalfuel/services/assistantApi.js.map +1 -0
  209. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
  210. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
  211. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js +120 -0
  212. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -0
  213. package/dist/theglobalfuel/services/index.d.ts +7 -0
  214. package/dist/theglobalfuel/services/index.d.ts.map +1 -0
  215. package/dist/theglobalfuel/types/assistant.d.ts +65 -0
  216. package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
  217. package/dist/theglobalfuel/types/index.d.ts +376 -0
  218. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  219. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  220. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  221. package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
  222. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  223. package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
  224. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  225. package/dist/theglobalfuel/utils/i18n.js +15 -0
  226. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  227. package/dist/theglobalfuel/utils/index.d.ts +10 -0
  228. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  229. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  230. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  231. package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
  232. package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
  233. package/dist/theglobalfuel/utils/pageContext.js +65 -0
  234. package/dist/theglobalfuel/utils/pageContext.js.map +1 -0
  235. package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
  236. package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
  237. package/package.json +5 -1
  238. package/dist/node_modules/clsx/dist/clsx.js +0 -18
  239. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  240. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1716
  241. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Context index
3
+ * @module theglobalfuel/context
4
+ */
5
+ export { TheGlobalFuelProvider, useTheGlobalFuel } from './TheGlobalFuelContext';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/context/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Hooks index
3
+ * @module theglobalfuel/hooks
4
+ */
5
+ export * from './useTheGlobalFuelApi';
6
+ export * from './useCursorPager';
7
+ export * from './useNotify';
8
+ export * from './useTheFiles';
9
+ export * from './useTheComments';
10
+ export * from './useTheTags';
11
+ export * from './useTheAnalytics';
12
+ export * from './useThePageView';
13
+ export * from './useTheNativeControls';
14
+ export * from './useTheTranslation';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
@@ -4,3 +4,7 @@ import "./useNotify.js";
4
4
  import "./useTheFiles.js";
5
5
  import "./useTheComments.js";
6
6
  import "./useTheTags.js";
7
+ import "./useTheAnalytics.js";
8
+ import "./useThePageView.js";
9
+ import "./useTheNativeControls.js";
10
+ import "./useTheTranslation.js";
@@ -0,0 +1,26 @@
1
+ /**
2
+ * useCursorPager — forward/back pager for the `The*Connection` list queries.
3
+ * @module theglobalfuel/hooks
4
+ *
5
+ * Paginates by OFFSET, not cursor. The workspaces gateway's composed
6
+ * `PaginationInput` does not reliably carry `cursor` (a shared federated input
7
+ * type), so sending `pagination.cursor` fails at the gateway / subgraph
8
+ * (VALIDATION_FAILED or, for a null/absent end-cursor, INTERNAL_SERVER_ERROR).
9
+ * The svc DOES honor `offset` (Prisma `skip`), so a page requests
10
+ * `pagination = { limit, offset: page * limit }` and uses `pageInfo.hasMore`
11
+ * to enable Next. Keeps a 0-indexed `page` for display.
12
+ */
13
+ export interface CursorPager {
14
+ /** 0-indexed page number for display; multiply by pageSize for the offset. */
15
+ page: number;
16
+ /** Advance one page. */
17
+ next: () => void;
18
+ /** Go back one page (no-op on the first page). */
19
+ prev: () => void;
20
+ /** Reset to the first page (call when filters change). */
21
+ reset: () => void;
22
+ /** Adapter for `<Pagination onPageChange>` — jump to an absolute page index. */
23
+ onPageChange: (targetPage: number) => void;
24
+ }
25
+ export declare function useCursorPager(): CursorPager;
26
+ //# sourceMappingURL=useCursorPager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCursorPager.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useCursorPager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,MAAM,WAAW,WAAW;IAC1B,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,kDAAkD;IAClD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,gFAAgF;IAChF,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,cAAc,IAAI,WAAW,CAS5C"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * useNotify — thin wrapper over the shell's shared toast surface.
3
+ * @module theglobalfuel/hooks
4
+ *
5
+ * Every write control (create/record/transition/verify/deliver/set-status)
6
+ * routes success + error feedback through the app-shell's single `GlobalUi`
7
+ * toaster (fe-libs) — NOT a locally-bundled `sonner` singleton, which would be
8
+ * a different instance from the shell's mounted `<Toaster>` and never render.
9
+ *
10
+ * `useGlobalUi()` is called unconditionally (React rules-of-hooks): the MFE is
11
+ * always mounted inside the app-shell's GlobalUiProvider in production, and the
12
+ * standalone dev harness (src/dev/main.tsx) wraps the Root in the same provider.
13
+ */
14
+ export type NotifyKind = 'info' | 'success' | 'warning' | 'error';
15
+ export interface Notifier {
16
+ success: (message: string) => void;
17
+ error: (message: string) => void;
18
+ info: (message: string) => void;
19
+ /** Extract a human-readable message from a thrown error and toast it. */
20
+ fromError: (err: unknown, fallback?: string) => void;
21
+ }
22
+ export declare function useNotify(): Notifier;
23
+ //# sourceMappingURL=useNotify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotify.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useNotify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,yEAAyE;IACzE,SAAS,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAQD,wBAAgB,SAAS,IAAI,QAAQ,CAoBpC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * TheGlobalFuel analytics helpers.
3
+ * @module theglobalfuel/hooks
4
+ *
5
+ * Thin wrapper around the shared event bus. Emits intent + fact pairs for key
6
+ * user actions so the app-shell RybbitSink can forward allow-listed events to
7
+ * Rybbit Cloud. Payloads contain IDs only — no names, bodies or search queries.
8
+ */
9
+ export declare function useTheAnalytics(): {
10
+ emit: (name: string, payload?: Record<string, unknown>) => void;
11
+ workspaceId: string | undefined;
12
+ trackPageViewed: (page: string) => void;
13
+ trackDashboardViewed: () => void;
14
+ trackAssetCreateClicked: () => void;
15
+ trackAssetCreated: (id: string) => void;
16
+ trackAssetUpdated: (id: string) => void;
17
+ trackAssetDeleted: (id: string) => void;
18
+ trackProductionRecordClicked: () => void;
19
+ trackProductionRecorded: (id: string) => void;
20
+ trackReserveCreateClicked: () => void;
21
+ trackReserveCreated: (id: string) => void;
22
+ trackContractCreateClicked: () => void;
23
+ trackContractCreated: (id: string) => void;
24
+ trackContractUpdated: (id: string) => void;
25
+ trackShipmentScheduleClicked: () => void;
26
+ trackShipmentScheduled: (id: string) => void;
27
+ trackShipmentDelivered: (id: string) => void;
28
+ trackInventoryLotCreateClicked: () => void;
29
+ trackInventoryLotCreated: (id: string) => void;
30
+ trackInventoryLotStatusSet: (id: string) => void;
31
+ trackEmissionRecordClicked: () => void;
32
+ trackEmissionRecorded: (id: string) => void;
33
+ trackEmissionVerified: (id: string) => void;
34
+ trackComplianceCertCreateClicked: () => void;
35
+ trackComplianceCertCreated: (id: string) => void;
36
+ trackComplianceCertTransitioned: (id: string) => void;
37
+ };
38
+ //# sourceMappingURL=useTheAnalytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheAnalytics.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheAnalytics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,wBAAgB,eAAe;iBAKpB,MAAM,YAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;4BAWX,MAAM;;;4BAInC,MAAM;4BAIN,MAAM;4BAIN,MAAM;;kCAQN,MAAM;;8BAQN,MAAM;;+BAQN,MAAM;+BAIN,MAAM;;iCAQN,MAAM;iCAIN,MAAM;;mCAQN,MAAM;qCAIN,MAAM;;gCAQN,MAAM;gCAIN,MAAM;;qCAQN,MAAM;0CAIN,MAAM;EAIhB"}
@@ -0,0 +1,46 @@
1
+ import { useTheGlobalFuel as e } from "../context/TheGlobalFuelContext.js";
2
+ import "../context/index.js";
3
+ import { useCallback as t } from "react";
4
+ import { useEventBus as n } from "@burdenoff/fe-libs/shared/events";
5
+ //#region src/theglobalfuel/hooks/useTheAnalytics.ts
6
+ function r() {
7
+ let r = n(), { workspaceId: i } = e(), a = t((e, t = {}) => {
8
+ r.emitCustom(e, {
9
+ workspaceId: i,
10
+ ...t
11
+ });
12
+ }, [r, i]);
13
+ return {
14
+ emit: a,
15
+ workspaceId: i,
16
+ trackPageViewed: t((e) => a(`theglobalfuel.${e}.viewed`), [a]),
17
+ trackDashboardViewed: t(() => a("theglobalfuel.dashboard.viewed"), [a]),
18
+ trackAssetCreateClicked: t(() => a("theglobalfuel.asset.create_clicked"), [a]),
19
+ trackAssetCreated: t((e) => a("theglobalfuel.asset.created", { id: e }), [a]),
20
+ trackAssetUpdated: t((e) => a("theglobalfuel.asset.updated", { id: e }), [a]),
21
+ trackAssetDeleted: t((e) => a("theglobalfuel.asset.deleted", { id: e }), [a]),
22
+ trackProductionRecordClicked: t(() => a("theglobalfuel.production.record_clicked"), [a]),
23
+ trackProductionRecorded: t((e) => a("theglobalfuel.production.recorded", { id: e }), [a]),
24
+ trackReserveCreateClicked: t(() => a("theglobalfuel.reserve.create_clicked"), [a]),
25
+ trackReserveCreated: t((e) => a("theglobalfuel.reserve.created", { id: e }), [a]),
26
+ trackContractCreateClicked: t(() => a("theglobalfuel.contract.create_clicked"), [a]),
27
+ trackContractCreated: t((e) => a("theglobalfuel.contract.created", { id: e }), [a]),
28
+ trackContractUpdated: t((e) => a("theglobalfuel.contract.updated", { id: e }), [a]),
29
+ trackShipmentScheduleClicked: t(() => a("theglobalfuel.shipment.schedule_clicked"), [a]),
30
+ trackShipmentScheduled: t((e) => a("theglobalfuel.shipment.scheduled", { id: e }), [a]),
31
+ trackShipmentDelivered: t((e) => a("theglobalfuel.shipment.delivered", { id: e }), [a]),
32
+ trackInventoryLotCreateClicked: t(() => a("theglobalfuel.inventory_lot.create_clicked"), [a]),
33
+ trackInventoryLotCreated: t((e) => a("theglobalfuel.inventory_lot.created", { id: e }), [a]),
34
+ trackInventoryLotStatusSet: t((e) => a("theglobalfuel.inventory_lot.status_set", { id: e }), [a]),
35
+ trackEmissionRecordClicked: t(() => a("theglobalfuel.emission.record_clicked"), [a]),
36
+ trackEmissionRecorded: t((e) => a("theglobalfuel.emission.recorded", { id: e }), [a]),
37
+ trackEmissionVerified: t((e) => a("theglobalfuel.emission.verified", { id: e }), [a]),
38
+ trackComplianceCertCreateClicked: t(() => a("theglobalfuel.compliance_cert.create_clicked"), [a]),
39
+ trackComplianceCertCreated: t((e) => a("theglobalfuel.compliance_cert.created", { id: e }), [a]),
40
+ trackComplianceCertTransitioned: t((e) => a("theglobalfuel.compliance_cert.transitioned", { id: e }), [a])
41
+ };
42
+ }
43
+ //#endregion
44
+ export { r as useTheAnalytics };
45
+
46
+ //# sourceMappingURL=useTheAnalytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheAnalytics.js","names":[],"sources":["../../../src/theglobalfuel/hooks/useTheAnalytics.ts"],"sourcesContent":["/**\n * TheGlobalFuel analytics helpers.\n * @module theglobalfuel/hooks\n *\n * Thin wrapper around the shared event bus. Emits intent + fact pairs for key\n * user actions so the app-shell RybbitSink can forward allow-listed events to\n * Rybbit Cloud. Payloads contain IDs only — no names, bodies or search queries.\n */\n\nimport { useCallback } from 'react';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\nimport { useTheGlobalFuel } from '../context';\n\nexport function useTheAnalytics() {\n const bus = useEventBus();\n const { workspaceId } = useTheGlobalFuel();\n\n const emit = useCallback(\n (name: string, payload: Record<string, unknown> = {}) => {\n // Use emitCustom for MFE-local domain events until they are merged into\n // the typed BurdenoffEventName union in fe-libs.\n bus.emitCustom(name, { workspaceId, ...payload });\n },\n [bus, workspaceId]\n );\n\n return {\n emit,\n workspaceId,\n trackPageViewed: useCallback((page: string) => emit(`theglobalfuel.${page}.viewed`), [emit]),\n trackDashboardViewed: useCallback(() => emit('theglobalfuel.dashboard.viewed'), [emit]),\n trackAssetCreateClicked: useCallback(() => emit('theglobalfuel.asset.create_clicked'), [emit]),\n trackAssetCreated: useCallback(\n (id: string) => emit('theglobalfuel.asset.created', { id }),\n [emit]\n ),\n trackAssetUpdated: useCallback(\n (id: string) => emit('theglobalfuel.asset.updated', { id }),\n [emit]\n ),\n trackAssetDeleted: useCallback(\n (id: string) => emit('theglobalfuel.asset.deleted', { id }),\n [emit]\n ),\n trackProductionRecordClicked: useCallback(\n () => emit('theglobalfuel.production.record_clicked'),\n [emit]\n ),\n trackProductionRecorded: useCallback(\n (id: string) => emit('theglobalfuel.production.recorded', { id }),\n [emit]\n ),\n trackReserveCreateClicked: useCallback(\n () => emit('theglobalfuel.reserve.create_clicked'),\n [emit]\n ),\n trackReserveCreated: useCallback(\n (id: string) => emit('theglobalfuel.reserve.created', { id }),\n [emit]\n ),\n trackContractCreateClicked: useCallback(\n () => emit('theglobalfuel.contract.create_clicked'),\n [emit]\n ),\n trackContractCreated: useCallback(\n (id: string) => emit('theglobalfuel.contract.created', { id }),\n [emit]\n ),\n trackContractUpdated: useCallback(\n (id: string) => emit('theglobalfuel.contract.updated', { id }),\n [emit]\n ),\n trackShipmentScheduleClicked: useCallback(\n () => emit('theglobalfuel.shipment.schedule_clicked'),\n [emit]\n ),\n trackShipmentScheduled: useCallback(\n (id: string) => emit('theglobalfuel.shipment.scheduled', { id }),\n [emit]\n ),\n trackShipmentDelivered: useCallback(\n (id: string) => emit('theglobalfuel.shipment.delivered', { id }),\n [emit]\n ),\n trackInventoryLotCreateClicked: useCallback(\n () => emit('theglobalfuel.inventory_lot.create_clicked'),\n [emit]\n ),\n trackInventoryLotCreated: useCallback(\n (id: string) => emit('theglobalfuel.inventory_lot.created', { id }),\n [emit]\n ),\n trackInventoryLotStatusSet: useCallback(\n (id: string) => emit('theglobalfuel.inventory_lot.status_set', { id }),\n [emit]\n ),\n trackEmissionRecordClicked: useCallback(\n () => emit('theglobalfuel.emission.record_clicked'),\n [emit]\n ),\n trackEmissionRecorded: useCallback(\n (id: string) => emit('theglobalfuel.emission.recorded', { id }),\n [emit]\n ),\n trackEmissionVerified: useCallback(\n (id: string) => emit('theglobalfuel.emission.verified', { id }),\n [emit]\n ),\n trackComplianceCertCreateClicked: useCallback(\n () => emit('theglobalfuel.compliance_cert.create_clicked'),\n [emit]\n ),\n trackComplianceCertCreated: useCallback(\n (id: string) => emit('theglobalfuel.compliance_cert.created', { id }),\n [emit]\n ),\n trackComplianceCertTransitioned: useCallback(\n (id: string) => emit('theglobalfuel.compliance_cert.transitioned', { id }),\n [emit]\n ),\n };\n}\n"],"mappings":";;;;;AAaA,SAAgB,IAAkB;CAChC,IAAM,IAAM,GAAa,EACnB,EAAE,mBAAgB,GAAkB,EAEpC,IAAO,GACV,GAAc,IAAmC,EAAE,KAAK;AAGvD,IAAI,WAAW,GAAM;GAAE;GAAa,GAAG;GAAS,CAAC;IAEnD,CAAC,GAAK,EAAY,CACnB;AAED,QAAO;EACL;EACA;EACA,iBAAiB,GAAa,MAAiB,EAAK,iBAAiB,EAAK,SAAS,EAAE,CAAC,EAAK,CAAC;EAC5F,sBAAsB,QAAkB,EAAK,iCAAiC,EAAE,CAAC,EAAK,CAAC;EACvF,yBAAyB,QAAkB,EAAK,qCAAqC,EAAE,CAAC,EAAK,CAAC;EAC9F,mBAAmB,GAChB,MAAe,EAAK,+BAA+B,EAAE,OAAI,CAAC,EAC3D,CAAC,EAAK,CACP;EACD,mBAAmB,GAChB,MAAe,EAAK,+BAA+B,EAAE,OAAI,CAAC,EAC3D,CAAC,EAAK,CACP;EACD,mBAAmB,GAChB,MAAe,EAAK,+BAA+B,EAAE,OAAI,CAAC,EAC3D,CAAC,EAAK,CACP;EACD,8BAA8B,QACtB,EAAK,0CAA0C,EACrD,CAAC,EAAK,CACP;EACD,yBAAyB,GACtB,MAAe,EAAK,qCAAqC,EAAE,OAAI,CAAC,EACjE,CAAC,EAAK,CACP;EACD,2BAA2B,QACnB,EAAK,uCAAuC,EAClD,CAAC,EAAK,CACP;EACD,qBAAqB,GAClB,MAAe,EAAK,iCAAiC,EAAE,OAAI,CAAC,EAC7D,CAAC,EAAK,CACP;EACD,4BAA4B,QACpB,EAAK,wCAAwC,EACnD,CAAC,EAAK,CACP;EACD,sBAAsB,GACnB,MAAe,EAAK,kCAAkC,EAAE,OAAI,CAAC,EAC9D,CAAC,EAAK,CACP;EACD,sBAAsB,GACnB,MAAe,EAAK,kCAAkC,EAAE,OAAI,CAAC,EAC9D,CAAC,EAAK,CACP;EACD,8BAA8B,QACtB,EAAK,0CAA0C,EACrD,CAAC,EAAK,CACP;EACD,wBAAwB,GACrB,MAAe,EAAK,oCAAoC,EAAE,OAAI,CAAC,EAChE,CAAC,EAAK,CACP;EACD,wBAAwB,GACrB,MAAe,EAAK,oCAAoC,EAAE,OAAI,CAAC,EAChE,CAAC,EAAK,CACP;EACD,gCAAgC,QACxB,EAAK,6CAA6C,EACxD,CAAC,EAAK,CACP;EACD,0BAA0B,GACvB,MAAe,EAAK,uCAAuC,EAAE,OAAI,CAAC,EACnE,CAAC,EAAK,CACP;EACD,4BAA4B,GACzB,MAAe,EAAK,0CAA0C,EAAE,OAAI,CAAC,EACtE,CAAC,EAAK,CACP;EACD,4BAA4B,QACpB,EAAK,wCAAwC,EACnD,CAAC,EAAK,CACP;EACD,uBAAuB,GACpB,MAAe,EAAK,mCAAmC,EAAE,OAAI,CAAC,EAC/D,CAAC,EAAK,CACP;EACD,uBAAuB,GACpB,MAAe,EAAK,mCAAmC,EAAE,OAAI,CAAC,EAC/D,CAAC,EAAK,CACP;EACD,kCAAkC,QAC1B,EAAK,+CAA+C,EAC1D,CAAC,EAAK,CACP;EACD,4BAA4B,GACzB,MAAe,EAAK,yCAAyC,EAAE,OAAI,CAAC,EACrE,CAAC,EAAK,CACP;EACD,iCAAiC,GAC9B,MAAe,EAAK,8CAA8C,EAAE,OAAI,CAAC,EAC1E,CAAC,EAAK,CACP;EACF"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * TheGlobalFuel — wspace-conversations-svc EntityComment REUSE hooks (Integration B).
3
+ * @module theglobalfuel/hooks/useTheComments
4
+ *
5
+ * Adds a discussion surface to theglobalfuel entities WITHOUT any eco-svc change by
6
+ * reusing the generic EntityComment API composed into the WORKSPACE supergraph.
7
+ * Comments attach to any entity by `(entityType, entityId)`:
8
+ * - `getEntityComments(input): EntityCommentConnection!`
9
+ * - `createEntityComment(input): EntityComment!`
10
+ *
11
+ * Transport reuses `wspaceFetch` from `useTheFiles` (workspace gateway +
12
+ * workspace token). Lives in a separate file; `useTheGlobalFuelApi.ts` is
13
+ * untouched.
14
+ */
15
+ export interface TheComment {
16
+ id: string;
17
+ authorId: string;
18
+ authorType: string;
19
+ content: {
20
+ text: string | null;
21
+ markdown: string | null;
22
+ };
23
+ createdAt: string;
24
+ edited: boolean;
25
+ parentCommentId: string | null;
26
+ replyCount: number;
27
+ }
28
+ /** Top-level (root) comments for an eco entity, oldest first. */
29
+ export declare const useTheComments: (entityType: string, entityId: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
30
+ items: TheComment[];
31
+ total: number;
32
+ }>, Error>;
33
+ export declare const useTheCreateComment: (entityType: string, entityId: string) => import('@tanstack/react-query').UseMutationResult<{
34
+ id: string;
35
+ }, Error, string, unknown>;
36
+ //# sourceMappingURL=useTheComments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheComments.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheComments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,iEAAiE;AACjE,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS;;;UAwC9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAKN,MAAM;0BAmBvE,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * TheGlobalFuel — wspace-files-svc REUSE hooks (Integration A).
3
+ * @module theglobalfuel/hooks/useTheFiles
4
+ *
5
+ * Reuses the platform file store (`wspace-files-svc`) WITHOUT any eco-svc
6
+ * change: the theglobalfuel schema already exposes `TheObservation.evidenceFileId` /
7
+ * `TheReport.fileId`; this module lets the UI actually produce a `fileId` via
8
+ * the canonical 3-step upload flow composed into the WORKSPACE supergraph:
9
+ * 1. `initiateUpload(input)` → `{ uploadUrl, session { id } }`
10
+ * 2. HTTP `PUT` the bytes to the returned signed `uploadUrl`
11
+ * 3. `completeUpload(input: { sessionId })` → `{ fileId }`
12
+ * plus `getFile(id)` to resolve an existing evidence/report file's name + URL.
13
+ *
14
+ * Transport mirrors `useTheGlobalFuelApi` exactly — `graphqlFetch({ gateway:
15
+ * 'workspace', workspaceToken: true })` — so no ApolloProvider is required.
16
+ * These hooks live in a SEPARATE file by design; `useTheGlobalFuelApi.ts` is
17
+ * left untouched.
18
+ */
19
+ /** Execute a workspace-gateway GraphQL operation with the workspace token. */
20
+ export declare const wspaceFetch: <TData>(query: string, variables: Record<string, unknown>, baseUrl?: string) => Promise<TData>;
21
+ export interface UploadedTheFile {
22
+ fileId: string;
23
+ fileName: string;
24
+ }
25
+ export interface UseTheFileUploadResult {
26
+ upload: (file: File) => Promise<UploadedTheFile>;
27
+ isUploading: boolean;
28
+ /** 0–100 byte-progress of the signed-URL PUT. */
29
+ progress: number;
30
+ error: string | null;
31
+ reset: () => void;
32
+ }
33
+ /**
34
+ * Imperative upload hook: `await upload(file)` runs the platform 3-step flow and
35
+ * resolves to `{ fileId, fileName }`. `fileId` is what the theglobalfuel mutations accept
36
+ * (`ecoRecordObservation.evidenceFileId`, `ecoPublishReport.fileId`).
37
+ */
38
+ export declare const useTheFileUpload: () => UseTheFileUploadResult;
39
+ export interface TheFileMeta {
40
+ id: string;
41
+ name: string;
42
+ downloadUrl: string | null;
43
+ mimeType: string;
44
+ size: string;
45
+ }
46
+ export declare const useTheFile: (id: string | null | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheFileMeta | null>, Error>;
47
+ //# sourceMappingURL=useTheFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheFiles.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA8BH,8EAA8E;AAC9E,eAAO,MAAM,WAAW,GAAU,KAAK,EACrC,OAAO,MAAM,EACb,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,UAAU,MAAM,KACf,OAAO,CAAC,KAAK,CAmBf,CAAC;AAMF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AA+BD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACjD,WAAW,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAAO,sBAuFnC,CAAC;AAMF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,uFAsBvD,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { TheConnection, TheAsset, TheAssetKind, TheAssetStatus, TheCommodityType, TheProductionRecord, TheReserveEstimate, TheReserveCategory, TheOfftakeContract, TheContractSide, TheContractStatus, TheShipment, TheShipmentStatus, TheInventoryLot, TheInventoryStatus, TheEmissionRecord, TheEmissionScope, TheComplianceCert, TheComplianceCategory, TheComplianceStatus, TheCreateAssetInput, TheUpdateAssetInput, TheRecordProductionInput, TheCreateReserveEstimateInput, TheCreateOfftakeContractInput, TheUpdateOfftakeContractInput, TheCreateShipmentInput, TheCreateInventoryLotInput, TheRecordEmissionInput, TheCreateComplianceCertInput, PaginationInput } from '../types';
2
+
3
+ export interface AssetFilters {
4
+ commodity?: TheCommodityType;
5
+ kind?: TheAssetKind;
6
+ status?: TheAssetStatus;
7
+ pagination?: PaginationInput;
8
+ }
9
+ export declare const useTheAssets: (filters?: AssetFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheAsset>>, Error>;
10
+ export declare const useTheAsset: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheAsset | null>, Error>;
11
+ export declare const useTheCreateAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, TheCreateAssetInput, unknown>;
12
+ export declare const useTheUpdateAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, {
13
+ id: string;
14
+ input: TheUpdateAssetInput;
15
+ }, unknown>;
16
+ export declare const useTheTransitionAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, {
17
+ id: string;
18
+ status: TheAssetStatus;
19
+ }, unknown>;
20
+ export declare const useTheRetireAsset: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
21
+ export interface ProductionFilters {
22
+ assetId?: string;
23
+ pagination?: PaginationInput;
24
+ }
25
+ export declare const useTheProductionRecords: (filters?: ProductionFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheProductionRecord>>, Error>;
26
+ export declare const useTheRecordProduction: () => import('@tanstack/react-query').UseMutationResult<TheProductionRecord, Error, TheRecordProductionInput, unknown>;
27
+ export declare const useTheReserveEstimates: (assetId?: string, category?: TheReserveCategory, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheReserveEstimate>>, Error>;
28
+ export declare const useTheCreateReserveEstimate: () => import('@tanstack/react-query').UseMutationResult<TheReserveEstimate, Error, TheCreateReserveEstimateInput, unknown>;
29
+ export interface ContractFilters {
30
+ commodity?: TheCommodityType;
31
+ side?: TheContractSide;
32
+ status?: TheContractStatus;
33
+ pagination?: PaginationInput;
34
+ }
35
+ export declare const useTheContracts: (filters?: ContractFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheOfftakeContract>>, Error>;
36
+ export declare const useTheContract: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheOfftakeContract | null>, Error>;
37
+ export declare const useTheCreateContract: () => import('@tanstack/react-query').UseMutationResult<TheOfftakeContract, Error, TheCreateOfftakeContractInput, unknown>;
38
+ export declare const useTheUpdateContract: () => import('@tanstack/react-query').UseMutationResult<TheOfftakeContract, Error, {
39
+ id: string;
40
+ input: TheUpdateOfftakeContractInput;
41
+ }, unknown>;
42
+ export declare const useTheTransitionContract: () => import('@tanstack/react-query').UseMutationResult<TheOfftakeContract, Error, {
43
+ id: string;
44
+ status: TheContractStatus;
45
+ }, unknown>;
46
+ export declare const useTheShipments: (contractId?: string, status?: TheShipmentStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheShipment>>, Error>;
47
+ export declare const useTheTransitionShipment: () => import('@tanstack/react-query').UseMutationResult<TheShipment, Error, {
48
+ id: string;
49
+ status: TheShipmentStatus;
50
+ }, unknown>;
51
+ export declare const useTheScheduleShipment: () => import('@tanstack/react-query').UseMutationResult<TheShipment, Error, TheCreateShipmentInput, unknown>;
52
+ export declare const useTheDeliverShipment: () => import('@tanstack/react-query').UseMutationResult<TheShipment, Error, string, unknown>;
53
+ export interface InventoryFilters {
54
+ commodity?: TheCommodityType;
55
+ status?: TheInventoryStatus;
56
+ pagination?: PaginationInput;
57
+ }
58
+ export declare const useTheInventoryLots: (filters?: InventoryFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheInventoryLot>>, Error>;
59
+ export declare const useTheCreateInventoryLot: () => import('@tanstack/react-query').UseMutationResult<TheInventoryLot, Error, TheCreateInventoryLotInput, unknown>;
60
+ export declare const useTheSetInventoryLotStatus: () => import('@tanstack/react-query').UseMutationResult<TheInventoryLot, Error, {
61
+ id: string;
62
+ status: TheInventoryStatus;
63
+ }, unknown>;
64
+ export interface EmissionFilters {
65
+ assetId?: string;
66
+ scope?: TheEmissionScope;
67
+ pagination?: PaginationInput;
68
+ }
69
+ export declare const useTheEmissionRecords: (filters?: EmissionFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheEmissionRecord>>, Error>;
70
+ export declare const useTheRecordEmission: () => import('@tanstack/react-query').UseMutationResult<TheEmissionRecord, Error, TheRecordEmissionInput, unknown>;
71
+ export declare const useTheVerifyEmission: () => import('@tanstack/react-query').UseMutationResult<TheEmissionRecord, Error, string, unknown>;
72
+ export declare const useTheComplianceCerts: (assetId?: string, category?: TheComplianceCategory, status?: TheComplianceStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheComplianceCert>>, Error>;
73
+ export declare const useTheComplianceCert: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheComplianceCert | null>, Error>;
74
+ export declare const useTheCreateComplianceCert: () => import('@tanstack/react-query').UseMutationResult<TheComplianceCert, Error, TheCreateComplianceCertInput, unknown>;
75
+ export declare const useTheTransitionComplianceCert: () => import('@tanstack/react-query').UseMutationResult<TheComplianceCert, Error, {
76
+ id: string;
77
+ status: TheComplianceStatus;
78
+ }, unknown>;
79
+ //# sourceMappingURL=useTheGlobalFuelApi.d.ts.map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AwB,sHAgBpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;QAIK,MAAM;YAAU,kBAAkB;WAY9E,CAAC;AAMF,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,GAAI,UAAS,eAAoB,qGAsBlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,oHAgBhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oGAgBhC,CAAC;AAMF,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,EAChB,WAAW,qBAAqB,EAChC,SAAS,mBAAmB,EAC5B,aAAa,eAAe,qGAyB7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,IAAI,MAAM,GAAG,SAAS,6FAgB1D,CAAC;AAEF,eAAO,MAAM,0BAA0B,0HAgBtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;QAIE,MAAM;YAAU,mBAAmB;WAe/E,CAAC"}
@@ -63,11 +63,7 @@ var a = () => {
63
63
  queryKey: s.asset(t ?? ""),
64
64
  enabled: !!t,
65
65
  queryFn: async () => (await o(`query TheAsset($id: ID!) {
66
- theAsset(id: $id) {
67
- ${l}
68
- productionRecords { ${u} }
69
- reserveEstimates { ${d} }
70
- }
66
+ theAsset(id: $id) { ${l} }
71
67
  }`, { id: t }, r)).theAsset
72
68
  });
73
69
  }, y = () => {
@@ -173,10 +169,7 @@ var a = () => {
173
169
  queryKey: s.contract(t ?? ""),
174
170
  enabled: !!t,
175
171
  queryFn: async () => (await o(`query TheContract($id: ID!) {
176
- theContract(id: $id) {
177
- ${f}
178
- shipments { ${p} }
179
- }
172
+ theContract(id: $id) { ${f} }
180
173
  }`, { id: t }, r)).theContract
181
174
  });
182
175
  }, O = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"useTheGlobalFuelApi.js","names":[],"sources":["../../../src/theglobalfuel/hooks/useTheGlobalFuelApi.ts"],"sourcesContent":["/**\n * TheGlobalFuel API hooks\n * @module theglobalfuel/hooks\n *\n * React-Query hooks wired DIRECTLY to the real `wspace-theglobalfuel-svc`\n * federated GraphQL contract (the `the*` operations). Every query/mutation\n * below uses an inline gql string whose fields match the svc\n * `.hive-schema.graphql` exactly. No mock data.\n *\n * Transport: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })` —\n * the host shell supplies the gateway base URL + a workspace-scoped token.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useTheGlobalFuel } from '../context';\nimport type {\n TheConnection,\n TheAsset,\n TheAssetKind,\n TheAssetStatus,\n TheCommodityType,\n TheProductionRecord,\n TheReserveEstimate,\n TheReserveCategory,\n TheOfftakeContract,\n TheContractSide,\n TheContractStatus,\n TheShipment,\n TheShipmentStatus,\n TheInventoryLot,\n TheInventoryStatus,\n TheEmissionRecord,\n TheEmissionScope,\n TheComplianceCert,\n TheComplianceCategory,\n TheComplianceStatus,\n TheCreateAssetInput,\n TheUpdateAssetInput,\n TheRecordProductionInput,\n TheCreateReserveEstimateInput,\n TheCreateOfftakeContractInput,\n TheUpdateOfftakeContractInput,\n TheCreateShipmentInput,\n TheCreateInventoryLotInput,\n TheRecordEmissionInput,\n TheCreateComplianceCertInput,\n PaginationInput,\n} from '../types';\n\n// ============================================================================\n// Transport\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache keyed by operationName+variables (~15s; mutations never cached). A read\n * issued right after a write would otherwise return the pre-mutation snapshot\n * until the TTL expires — making just-created rows invisible. We clear those\n * caches after every mutation so every follow-up refetch reads fresh.\n */\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\nconst theQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// React-Query key roots (one namespace per domain entity).\nconst KEY = {\n assets: ['theglobalfuel', 'assets'] as const,\n asset: (id: string) => ['theglobalfuel', 'asset', id] as const,\n production: ['theglobalfuel', 'production'] as const,\n reserves: ['theglobalfuel', 'reserves'] as const,\n contracts: ['theglobalfuel', 'contracts'] as const,\n contract: (id: string) => ['theglobalfuel', 'contract', id] as const,\n shipments: ['theglobalfuel', 'shipments'] as const,\n inventory: ['theglobalfuel', 'inventory'] as const,\n emissions: ['theglobalfuel', 'emissions'] as const,\n compliance: ['theglobalfuel', 'compliance'] as const,\n complianceCert: (id: string) => ['theglobalfuel', 'compliance', id] as const,\n};\n\nconst DEFAULT_PAGE: PaginationInput = { limit: 50 };\n\n// ============================================================================\n// Reusable gql field selections (codegen-free strictness)\n// ============================================================================\n\nconst ASSET_FIELDS = `\n id workspaceId name code kind commodity status location latitude longitude\n capacityPerDay capacityUnit workingInterestPct operatorLeadId\n commissionedAt decommissionedAt tags createdAt updatedAt\n`;\n\nconst PRODUCTION_FIELDS = `\n id workspaceId assetId periodStart periodEnd volume unit grade downtimeHours\n notes createdAt updatedAt\n`;\n\nconst RESERVE_FIELDS = `\n id workspaceId assetId category asOfDate recoverable recoveryFactor unit\n methodology notes createdAt updatedAt\n`;\n\nconst CONTRACT_FIELDS = `\n id workspaceId reference counterparty commodity side status pricingBasis\n pricePerUnit priceIndex currency contractedVolume deliveredVolume unit\n deliveryLocation startDate endDate signedAt notes tags createdAt updatedAt\n`;\n\nconst SHIPMENT_FIELDS = `\n id workspaceId contractId reference mode status carrier origin destination\n volume unit scheduledAt departedAt deliveredAt document { id } notes\n createdAt updatedAt\n`;\n\nconst INVENTORY_FIELDS = `\n id workspaceId lotCode commodity assetId quantity unit grade status location\n unitValue currency producedAt notes createdAt updatedAt\n`;\n\nconst EMISSION_FIELDS = `\n id workspaceId assetId scope co2eTonnes periodStart periodEnd source\n methodology verified verifiedAt notes createdAt updatedAt\n`;\n\nconst COMPLIANCE_FIELDS = `\n id workspaceId title category status assetId authority certNumber ownerId\n issuedAt expiresAt evidence { id } notes tags createdAt updatedAt\n`;\n\n// ============================================================================\n// Registry — Assets\n// ============================================================================\n\nexport interface AssetFilters {\n commodity?: TheCommodityType;\n kind?: TheAssetKind;\n status?: TheAssetStatus;\n pagination?: PaginationInput;\n}\n\nexport const useTheAssets = (filters: AssetFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.assets, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListAssets: TheConnection<TheAsset> }>(\n `query TheListAssets($commodity: TheCommodityType, $kind: TheAssetKind, $status: TheAssetStatus, $pagination: PaginationInput) {\n theListAssets(commodity: $commodity, kind: $kind, status: $status, pagination: $pagination) {\n items { ${ASSET_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n commodity: filters.commodity,\n kind: filters.kind,\n status: filters.status,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListAssets;\n },\n });\n};\n\nexport const useTheAsset = (id: string | undefined) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: KEY.asset(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await theQuery<{ theAsset: TheAsset | null }>(\n `query TheAsset($id: ID!) {\n theAsset(id: $id) {\n ${ASSET_FIELDS}\n productionRecords { ${PRODUCTION_FIELDS} }\n reserveEstimates { ${RESERVE_FIELDS} }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theAsset;\n },\n });\n};\n\nexport const useTheCreateAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateAssetInput) => {\n const data = await theQuery<{ theCreateAsset: TheAsset }>(\n `mutation TheCreateAsset($input: TheCreateAssetInput!) {\n theCreateAsset(input: $input) { ${ASSET_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateAsset;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.assets }),\n });\n};\n\nexport const useTheUpdateAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, input }: { id: string; input: TheUpdateAssetInput }) => {\n const data = await theQuery<{ theUpdateAsset: TheAsset }>(\n `mutation TheUpdateAsset($id: ID!, $input: TheUpdateAssetInput!) {\n theUpdateAsset(id: $id, input: $input) { ${ASSET_FIELDS} }\n }`,\n { id, input },\n apiGatewayUrl\n );\n return data.theUpdateAsset;\n },\n onSuccess: (asset) => {\n qc.invalidateQueries({ queryKey: KEY.assets });\n qc.invalidateQueries({ queryKey: KEY.asset(asset.id) });\n },\n });\n};\n\nexport const useTheTransitionAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheAssetStatus }) => {\n const data = await theQuery<{ theTransitionAsset: TheAsset }>(\n `mutation TheTransitionAsset($id: ID!, $status: TheAssetStatus!) {\n theTransitionAsset(id: $id, status: $status) { ${ASSET_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionAsset;\n },\n onSuccess: (asset) => {\n qc.invalidateQueries({ queryKey: KEY.assets });\n qc.invalidateQueries({ queryKey: KEY.asset(asset.id) });\n },\n });\n};\n\nexport const useTheRetireAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await theQuery<{ theRetireAsset: boolean }>(\n `mutation TheRetireAsset($id: ID!) { theRetireAsset(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return data.theRetireAsset;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.assets }),\n });\n};\n\n// ============================================================================\n// Registry — Production records\n// ============================================================================\n\nexport interface ProductionFilters {\n assetId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useTheProductionRecords = (filters: ProductionFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.production, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListProductionRecords: TheConnection<TheProductionRecord> }>(\n `query TheListProductionRecords($assetId: ID, $pagination: PaginationInput) {\n theListProductionRecords(assetId: $assetId, pagination: $pagination) {\n items { ${PRODUCTION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { assetId: filters.assetId, pagination: filters.pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListProductionRecords;\n },\n });\n};\n\nexport const useTheRecordProduction = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheRecordProductionInput) => {\n const data = await theQuery<{ theRecordProduction: TheProductionRecord }>(\n `mutation TheRecordProduction($input: TheRecordProductionInput!) {\n theRecordProduction(input: $input) { ${PRODUCTION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theRecordProduction;\n },\n onSuccess: (rec) => {\n qc.invalidateQueries({ queryKey: KEY.production });\n qc.invalidateQueries({ queryKey: KEY.asset(rec.assetId) });\n },\n });\n};\n\n// ============================================================================\n// Registry — Reserve estimates\n// ============================================================================\n\nexport const useTheReserveEstimates = (\n assetId?: string,\n category?: TheReserveCategory,\n pagination?: PaginationInput\n) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.reserves, assetId ?? null, category ?? null, pagination ?? null],\n queryFn: async () => {\n const data = await theQuery<{ theListReserveEstimates: TheConnection<TheReserveEstimate> }>(\n `query TheListReserveEstimates($assetId: ID, $category: TheReserveCategory, $pagination: PaginationInput) {\n theListReserveEstimates(assetId: $assetId, category: $category, pagination: $pagination) {\n items { ${RESERVE_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { assetId, category, pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListReserveEstimates;\n },\n });\n};\n\nexport const useTheCreateReserveEstimate = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateReserveEstimateInput) => {\n const data = await theQuery<{ theCreateReserveEstimate: TheReserveEstimate }>(\n `mutation TheCreateReserveEstimate($input: TheCreateReserveEstimateInput!) {\n theCreateReserveEstimate(input: $input) { ${RESERVE_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateReserveEstimate;\n },\n onSuccess: (rec) => {\n qc.invalidateQueries({ queryKey: KEY.reserves });\n qc.invalidateQueries({ queryKey: KEY.asset(rec.assetId) });\n },\n });\n};\n\n// ============================================================================\n// Commerce — Offtake contracts\n// ============================================================================\n\nexport interface ContractFilters {\n commodity?: TheCommodityType;\n side?: TheContractSide;\n status?: TheContractStatus;\n pagination?: PaginationInput;\n}\n\nexport const useTheContracts = (filters: ContractFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.contracts, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListContracts: TheConnection<TheOfftakeContract> }>(\n `query TheListContracts($commodity: TheCommodityType, $side: TheContractSide, $status: TheContractStatus, $pagination: PaginationInput) {\n theListContracts(commodity: $commodity, side: $side, status: $status, pagination: $pagination) {\n items { ${CONTRACT_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n commodity: filters.commodity,\n side: filters.side,\n status: filters.status,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListContracts;\n },\n });\n};\n\nexport const useTheContract = (id: string | undefined) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: KEY.contract(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await theQuery<{ theContract: TheOfftakeContract | null }>(\n `query TheContract($id: ID!) {\n theContract(id: $id) {\n ${CONTRACT_FIELDS}\n shipments { ${SHIPMENT_FIELDS} }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theContract;\n },\n });\n};\n\nexport const useTheCreateContract = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateOfftakeContractInput) => {\n const data = await theQuery<{ theCreateContract: TheOfftakeContract }>(\n `mutation TheCreateContract($input: TheCreateOfftakeContractInput!) {\n theCreateContract(input: $input) { ${CONTRACT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateContract;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.contracts }),\n });\n};\n\nexport const useTheUpdateContract = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, input }: { id: string; input: TheUpdateOfftakeContractInput }) => {\n const data = await theQuery<{ theUpdateContract: TheOfftakeContract }>(\n `mutation TheUpdateContract($id: ID!, $input: TheUpdateOfftakeContractInput!) {\n theUpdateContract(id: $id, input: $input) { ${CONTRACT_FIELDS} }\n }`,\n { id, input },\n apiGatewayUrl\n );\n return data.theUpdateContract;\n },\n onSuccess: (c) => {\n qc.invalidateQueries({ queryKey: KEY.contracts });\n qc.invalidateQueries({ queryKey: KEY.contract(c.id) });\n },\n });\n};\n\nexport const useTheTransitionContract = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheContractStatus }) => {\n const data = await theQuery<{ theTransitionContract: TheOfftakeContract }>(\n `mutation TheTransitionContract($id: ID!, $status: TheContractStatus!) {\n theTransitionContract(id: $id, status: $status) { ${CONTRACT_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionContract;\n },\n onSuccess: (c) => {\n qc.invalidateQueries({ queryKey: KEY.contracts });\n qc.invalidateQueries({ queryKey: KEY.contract(c.id) });\n },\n });\n};\n\n// ============================================================================\n// Commerce — Shipments\n// ============================================================================\n\nexport const useTheShipments = (\n contractId?: string,\n status?: TheShipmentStatus,\n pagination?: PaginationInput\n) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.shipments, contractId ?? null, status ?? null, pagination ?? null],\n queryFn: async () => {\n const data = await theQuery<{ theListShipments: TheConnection<TheShipment> }>(\n `query TheListShipments($contractId: ID, $status: TheShipmentStatus, $pagination: PaginationInput) {\n theListShipments(contractId: $contractId, status: $status, pagination: $pagination) {\n items { ${SHIPMENT_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { contractId, status, pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListShipments;\n },\n });\n};\n\nexport const useTheTransitionShipment = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheShipmentStatus }) => {\n const data = await theQuery<{ theTransitionShipment: TheShipment }>(\n `mutation TheTransitionShipment($id: ID!, $status: TheShipmentStatus!) {\n theTransitionShipment(id: $id, status: $status) { ${SHIPMENT_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionShipment;\n },\n onSuccess: (s) => {\n qc.invalidateQueries({ queryKey: KEY.shipments });\n qc.invalidateQueries({ queryKey: KEY.contract(s.contractId) });\n },\n });\n};\n\nexport const useTheScheduleShipment = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateShipmentInput) => {\n const data = await theQuery<{ theScheduleShipment: TheShipment }>(\n `mutation TheScheduleShipment($input: TheCreateShipmentInput!) {\n theScheduleShipment(input: $input) { ${SHIPMENT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theScheduleShipment;\n },\n onSuccess: (s) => {\n qc.invalidateQueries({ queryKey: KEY.shipments });\n qc.invalidateQueries({ queryKey: KEY.contract(s.contractId) });\n },\n });\n};\n\nexport const useTheDeliverShipment = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await theQuery<{ theDeliverShipment: TheShipment }>(\n `mutation TheDeliverShipment($id: ID!) {\n theDeliverShipment(id: $id) { ${SHIPMENT_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theDeliverShipment;\n },\n onSuccess: (s) => {\n qc.invalidateQueries({ queryKey: KEY.shipments });\n qc.invalidateQueries({ queryKey: KEY.contracts });\n qc.invalidateQueries({ queryKey: KEY.contract(s.contractId) });\n },\n });\n};\n\n// ============================================================================\n// Commerce — Inventory lots\n// ============================================================================\n\nexport interface InventoryFilters {\n commodity?: TheCommodityType;\n status?: TheInventoryStatus;\n pagination?: PaginationInput;\n}\n\nexport const useTheInventoryLots = (filters: InventoryFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.inventory, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListInventoryLots: TheConnection<TheInventoryLot> }>(\n `query TheListInventoryLots($commodity: TheCommodityType, $status: TheInventoryStatus, $pagination: PaginationInput) {\n theListInventoryLots(commodity: $commodity, status: $status, pagination: $pagination) {\n items { ${INVENTORY_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n commodity: filters.commodity,\n status: filters.status,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListInventoryLots;\n },\n });\n};\n\nexport const useTheCreateInventoryLot = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateInventoryLotInput) => {\n const data = await theQuery<{ theCreateInventoryLot: TheInventoryLot }>(\n `mutation TheCreateInventoryLot($input: TheCreateInventoryLotInput!) {\n theCreateInventoryLot(input: $input) { ${INVENTORY_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateInventoryLot;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.inventory }),\n });\n};\n\nexport const useTheSetInventoryLotStatus = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheInventoryStatus }) => {\n const data = await theQuery<{ theSetInventoryLotStatus: TheInventoryLot }>(\n `mutation TheSetInventoryLotStatus($id: ID!, $status: TheInventoryStatus!) {\n theSetInventoryLotStatus(id: $id, status: $status) { ${INVENTORY_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theSetInventoryLotStatus;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.inventory }),\n });\n};\n\n// ============================================================================\n// Sustainability — Emission records\n// ============================================================================\n\nexport interface EmissionFilters {\n assetId?: string;\n scope?: TheEmissionScope;\n pagination?: PaginationInput;\n}\n\nexport const useTheEmissionRecords = (filters: EmissionFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.emissions, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListEmissionRecords: TheConnection<TheEmissionRecord> }>(\n `query TheListEmissionRecords($assetId: ID, $scope: TheEmissionScope, $pagination: PaginationInput) {\n theListEmissionRecords(assetId: $assetId, scope: $scope, pagination: $pagination) {\n items { ${EMISSION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n assetId: filters.assetId,\n scope: filters.scope,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListEmissionRecords;\n },\n });\n};\n\nexport const useTheRecordEmission = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheRecordEmissionInput) => {\n const data = await theQuery<{ theRecordEmission: TheEmissionRecord }>(\n `mutation TheRecordEmission($input: TheRecordEmissionInput!) {\n theRecordEmission(input: $input) { ${EMISSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theRecordEmission;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.emissions }),\n });\n};\n\nexport const useTheVerifyEmission = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await theQuery<{ theVerifyEmission: TheEmissionRecord }>(\n `mutation TheVerifyEmission($id: ID!) {\n theVerifyEmission(id: $id) { ${EMISSION_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theVerifyEmission;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.emissions }),\n });\n};\n\n// ============================================================================\n// Sustainability — Compliance certifications\n// ============================================================================\n\nexport const useTheComplianceCerts = (\n assetId?: string,\n category?: TheComplianceCategory,\n status?: TheComplianceStatus,\n pagination?: PaginationInput\n) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.compliance, assetId ?? null, category ?? null, status ?? null, pagination ?? null],\n queryFn: async () => {\n const data = await theQuery<{ theListComplianceCerts: TheConnection<TheComplianceCert> }>(\n `query TheListComplianceCerts($assetId: ID, $category: TheComplianceCategory, $status: TheComplianceStatus, $pagination: PaginationInput) {\n theListComplianceCerts(assetId: $assetId, category: $category, status: $status, pagination: $pagination) {\n items { ${COMPLIANCE_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { assetId, category, status, pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListComplianceCerts;\n },\n });\n};\n\nexport const useTheComplianceCert = (id: string | undefined) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: KEY.complianceCert(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await theQuery<{ theComplianceCert: TheComplianceCert | null }>(\n `query TheComplianceCert($id: ID!) {\n theComplianceCert(id: $id) { ${COMPLIANCE_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theComplianceCert;\n },\n });\n};\n\nexport const useTheCreateComplianceCert = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateComplianceCertInput) => {\n const data = await theQuery<{ theCreateComplianceCert: TheComplianceCert }>(\n `mutation TheCreateComplianceCert($input: TheCreateComplianceCertInput!) {\n theCreateComplianceCert(input: $input) { ${COMPLIANCE_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateComplianceCert;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.compliance }),\n });\n};\n\nexport const useTheTransitionComplianceCert = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheComplianceStatus }) => {\n const data = await theQuery<{ theTransitionComplianceCert: TheComplianceCert }>(\n `mutation TheTransitionComplianceCert($id: ID!, $status: TheComplianceStatus!) {\n theTransitionComplianceCert(id: $id, status: $status) { ${COMPLIANCE_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionComplianceCert;\n },\n onSuccess: (c) => {\n qc.invalidateQueries({ queryKey: KEY.compliance });\n qc.invalidateQueries({ queryKey: KEY.complianceCert(c.id) });\n },\n });\n};\n"],"mappings":";;;;;AAoEA,IAAM,UAAqC;CAC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,EAAI,YAAY,CAAC,EAClD,EAAG,kBAAkB,EAAE,UAAU,EAAI,eAAe,EAAE,GAAG,EAAE,CAAC;;EAE/D,CAAC"}
1
+ {"version":3,"file":"useTheGlobalFuelApi.js","names":[],"sources":["../../../src/theglobalfuel/hooks/useTheGlobalFuelApi.ts"],"sourcesContent":["/**\n * TheGlobalFuel API hooks\n * @module theglobalfuel/hooks\n *\n * React-Query hooks wired DIRECTLY to the real `wspace-theglobalfuel-svc`\n * federated GraphQL contract (the `the*` operations). Every query/mutation\n * below uses an inline gql string whose fields match the svc\n * `.hive-schema.graphql` exactly. No mock data.\n *\n * Transport: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })` —\n * the host shell supplies the gateway base URL + a workspace-scoped token.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useTheGlobalFuel } from '../context';\nimport type {\n TheConnection,\n TheAsset,\n TheAssetKind,\n TheAssetStatus,\n TheCommodityType,\n TheProductionRecord,\n TheReserveEstimate,\n TheReserveCategory,\n TheOfftakeContract,\n TheContractSide,\n TheContractStatus,\n TheShipment,\n TheShipmentStatus,\n TheInventoryLot,\n TheInventoryStatus,\n TheEmissionRecord,\n TheEmissionScope,\n TheComplianceCert,\n TheComplianceCategory,\n TheComplianceStatus,\n TheCreateAssetInput,\n TheUpdateAssetInput,\n TheRecordProductionInput,\n TheCreateReserveEstimateInput,\n TheCreateOfftakeContractInput,\n TheUpdateOfftakeContractInput,\n TheCreateShipmentInput,\n TheCreateInventoryLotInput,\n TheRecordEmissionInput,\n TheCreateComplianceCertInput,\n PaginationInput,\n} from '../types';\n\n// ============================================================================\n// Transport\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache keyed by operationName+variables (~15s; mutations never cached). A read\n * issued right after a write would otherwise return the pre-mutation snapshot\n * until the TTL expires — making just-created rows invisible. We clear those\n * caches after every mutation so every follow-up refetch reads fresh.\n */\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\nconst theQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// React-Query key roots (one namespace per domain entity).\nconst KEY = {\n assets: ['theglobalfuel', 'assets'] as const,\n asset: (id: string) => ['theglobalfuel', 'asset', id] as const,\n production: ['theglobalfuel', 'production'] as const,\n reserves: ['theglobalfuel', 'reserves'] as const,\n contracts: ['theglobalfuel', 'contracts'] as const,\n contract: (id: string) => ['theglobalfuel', 'contract', id] as const,\n shipments: ['theglobalfuel', 'shipments'] as const,\n inventory: ['theglobalfuel', 'inventory'] as const,\n emissions: ['theglobalfuel', 'emissions'] as const,\n compliance: ['theglobalfuel', 'compliance'] as const,\n complianceCert: (id: string) => ['theglobalfuel', 'compliance', id] as const,\n};\n\nconst DEFAULT_PAGE: PaginationInput = { limit: 50 };\n\n// ============================================================================\n// Reusable gql field selections (codegen-free strictness)\n// ============================================================================\n\nconst ASSET_FIELDS = `\n id workspaceId name code kind commodity status location latitude longitude\n capacityPerDay capacityUnit workingInterestPct operatorLeadId\n commissionedAt decommissionedAt tags createdAt updatedAt\n`;\n\nconst PRODUCTION_FIELDS = `\n id workspaceId assetId periodStart periodEnd volume unit grade downtimeHours\n notes createdAt updatedAt\n`;\n\nconst RESERVE_FIELDS = `\n id workspaceId assetId category asOfDate recoverable recoveryFactor unit\n methodology notes createdAt updatedAt\n`;\n\nconst CONTRACT_FIELDS = `\n id workspaceId reference counterparty commodity side status pricingBasis\n pricePerUnit priceIndex currency contractedVolume deliveredVolume unit\n deliveryLocation startDate endDate signedAt notes tags createdAt updatedAt\n`;\n\nconst SHIPMENT_FIELDS = `\n id workspaceId contractId reference mode status carrier origin destination\n volume unit scheduledAt departedAt deliveredAt document { id } notes\n createdAt updatedAt\n`;\n\nconst INVENTORY_FIELDS = `\n id workspaceId lotCode commodity assetId quantity unit grade status location\n unitValue currency producedAt notes createdAt updatedAt\n`;\n\nconst EMISSION_FIELDS = `\n id workspaceId assetId scope co2eTonnes periodStart periodEnd source\n methodology verified verifiedAt notes createdAt updatedAt\n`;\n\nconst COMPLIANCE_FIELDS = `\n id workspaceId title category status assetId authority certNumber ownerId\n issuedAt expiresAt evidence { id } notes tags createdAt updatedAt\n`;\n\n// ============================================================================\n// Registry — Assets\n// ============================================================================\n\nexport interface AssetFilters {\n commodity?: TheCommodityType;\n kind?: TheAssetKind;\n status?: TheAssetStatus;\n pagination?: PaginationInput;\n}\n\nexport const useTheAssets = (filters: AssetFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.assets, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListAssets: TheConnection<TheAsset> }>(\n `query TheListAssets($commodity: TheCommodityType, $kind: TheAssetKind, $status: TheAssetStatus, $pagination: PaginationInput) {\n theListAssets(commodity: $commodity, kind: $kind, status: $status, pagination: $pagination) {\n items { ${ASSET_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n commodity: filters.commodity,\n kind: filters.kind,\n status: filters.status,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListAssets;\n },\n });\n};\n\nexport const useTheAsset = (id: string | undefined) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: KEY.asset(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await theQuery<{ theAsset: TheAsset | null }>(\n `query TheAsset($id: ID!) {\n theAsset(id: $id) { ${ASSET_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theAsset;\n },\n });\n};\n\nexport const useTheCreateAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateAssetInput) => {\n const data = await theQuery<{ theCreateAsset: TheAsset }>(\n `mutation TheCreateAsset($input: TheCreateAssetInput!) {\n theCreateAsset(input: $input) { ${ASSET_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateAsset;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.assets }),\n });\n};\n\nexport const useTheUpdateAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, input }: { id: string; input: TheUpdateAssetInput }) => {\n const data = await theQuery<{ theUpdateAsset: TheAsset }>(\n `mutation TheUpdateAsset($id: ID!, $input: TheUpdateAssetInput!) {\n theUpdateAsset(id: $id, input: $input) { ${ASSET_FIELDS} }\n }`,\n { id, input },\n apiGatewayUrl\n );\n return data.theUpdateAsset;\n },\n onSuccess: (asset) => {\n qc.invalidateQueries({ queryKey: KEY.assets });\n qc.invalidateQueries({ queryKey: KEY.asset(asset.id) });\n },\n });\n};\n\nexport const useTheTransitionAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheAssetStatus }) => {\n const data = await theQuery<{ theTransitionAsset: TheAsset }>(\n `mutation TheTransitionAsset($id: ID!, $status: TheAssetStatus!) {\n theTransitionAsset(id: $id, status: $status) { ${ASSET_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionAsset;\n },\n onSuccess: (asset) => {\n qc.invalidateQueries({ queryKey: KEY.assets });\n qc.invalidateQueries({ queryKey: KEY.asset(asset.id) });\n },\n });\n};\n\nexport const useTheRetireAsset = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await theQuery<{ theRetireAsset: boolean }>(\n `mutation TheRetireAsset($id: ID!) { theRetireAsset(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return data.theRetireAsset;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.assets }),\n });\n};\n\n// ============================================================================\n// Registry — Production records\n// ============================================================================\n\nexport interface ProductionFilters {\n assetId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useTheProductionRecords = (filters: ProductionFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.production, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListProductionRecords: TheConnection<TheProductionRecord> }>(\n `query TheListProductionRecords($assetId: ID, $pagination: PaginationInput) {\n theListProductionRecords(assetId: $assetId, pagination: $pagination) {\n items { ${PRODUCTION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { assetId: filters.assetId, pagination: filters.pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListProductionRecords;\n },\n });\n};\n\nexport const useTheRecordProduction = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheRecordProductionInput) => {\n const data = await theQuery<{ theRecordProduction: TheProductionRecord }>(\n `mutation TheRecordProduction($input: TheRecordProductionInput!) {\n theRecordProduction(input: $input) { ${PRODUCTION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theRecordProduction;\n },\n onSuccess: (rec) => {\n qc.invalidateQueries({ queryKey: KEY.production });\n qc.invalidateQueries({ queryKey: KEY.asset(rec.assetId) });\n },\n });\n};\n\n// ============================================================================\n// Registry — Reserve estimates\n// ============================================================================\n\nexport const useTheReserveEstimates = (\n assetId?: string,\n category?: TheReserveCategory,\n pagination?: PaginationInput\n) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.reserves, assetId ?? null, category ?? null, pagination ?? null],\n queryFn: async () => {\n const data = await theQuery<{ theListReserveEstimates: TheConnection<TheReserveEstimate> }>(\n `query TheListReserveEstimates($assetId: ID, $category: TheReserveCategory, $pagination: PaginationInput) {\n theListReserveEstimates(assetId: $assetId, category: $category, pagination: $pagination) {\n items { ${RESERVE_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { assetId, category, pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListReserveEstimates;\n },\n });\n};\n\nexport const useTheCreateReserveEstimate = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateReserveEstimateInput) => {\n const data = await theQuery<{ theCreateReserveEstimate: TheReserveEstimate }>(\n `mutation TheCreateReserveEstimate($input: TheCreateReserveEstimateInput!) {\n theCreateReserveEstimate(input: $input) { ${RESERVE_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateReserveEstimate;\n },\n onSuccess: (rec) => {\n qc.invalidateQueries({ queryKey: KEY.reserves });\n qc.invalidateQueries({ queryKey: KEY.asset(rec.assetId) });\n },\n });\n};\n\n// ============================================================================\n// Commerce — Offtake contracts\n// ============================================================================\n\nexport interface ContractFilters {\n commodity?: TheCommodityType;\n side?: TheContractSide;\n status?: TheContractStatus;\n pagination?: PaginationInput;\n}\n\nexport const useTheContracts = (filters: ContractFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.contracts, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListContracts: TheConnection<TheOfftakeContract> }>(\n `query TheListContracts($commodity: TheCommodityType, $side: TheContractSide, $status: TheContractStatus, $pagination: PaginationInput) {\n theListContracts(commodity: $commodity, side: $side, status: $status, pagination: $pagination) {\n items { ${CONTRACT_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n commodity: filters.commodity,\n side: filters.side,\n status: filters.status,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListContracts;\n },\n });\n};\n\nexport const useTheContract = (id: string | undefined) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: KEY.contract(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await theQuery<{ theContract: TheOfftakeContract | null }>(\n `query TheContract($id: ID!) {\n theContract(id: $id) { ${CONTRACT_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theContract;\n },\n });\n};\n\nexport const useTheCreateContract = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateOfftakeContractInput) => {\n const data = await theQuery<{ theCreateContract: TheOfftakeContract }>(\n `mutation TheCreateContract($input: TheCreateOfftakeContractInput!) {\n theCreateContract(input: $input) { ${CONTRACT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateContract;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.contracts }),\n });\n};\n\nexport const useTheUpdateContract = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, input }: { id: string; input: TheUpdateOfftakeContractInput }) => {\n const data = await theQuery<{ theUpdateContract: TheOfftakeContract }>(\n `mutation TheUpdateContract($id: ID!, $input: TheUpdateOfftakeContractInput!) {\n theUpdateContract(id: $id, input: $input) { ${CONTRACT_FIELDS} }\n }`,\n { id, input },\n apiGatewayUrl\n );\n return data.theUpdateContract;\n },\n onSuccess: (c) => {\n qc.invalidateQueries({ queryKey: KEY.contracts });\n qc.invalidateQueries({ queryKey: KEY.contract(c.id) });\n },\n });\n};\n\nexport const useTheTransitionContract = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheContractStatus }) => {\n const data = await theQuery<{ theTransitionContract: TheOfftakeContract }>(\n `mutation TheTransitionContract($id: ID!, $status: TheContractStatus!) {\n theTransitionContract(id: $id, status: $status) { ${CONTRACT_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionContract;\n },\n onSuccess: (c) => {\n qc.invalidateQueries({ queryKey: KEY.contracts });\n qc.invalidateQueries({ queryKey: KEY.contract(c.id) });\n },\n });\n};\n\n// ============================================================================\n// Commerce — Shipments\n// ============================================================================\n\nexport const useTheShipments = (\n contractId?: string,\n status?: TheShipmentStatus,\n pagination?: PaginationInput\n) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.shipments, contractId ?? null, status ?? null, pagination ?? null],\n queryFn: async () => {\n const data = await theQuery<{ theListShipments: TheConnection<TheShipment> }>(\n `query TheListShipments($contractId: ID, $status: TheShipmentStatus, $pagination: PaginationInput) {\n theListShipments(contractId: $contractId, status: $status, pagination: $pagination) {\n items { ${SHIPMENT_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { contractId, status, pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListShipments;\n },\n });\n};\n\nexport const useTheTransitionShipment = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheShipmentStatus }) => {\n const data = await theQuery<{ theTransitionShipment: TheShipment }>(\n `mutation TheTransitionShipment($id: ID!, $status: TheShipmentStatus!) {\n theTransitionShipment(id: $id, status: $status) { ${SHIPMENT_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionShipment;\n },\n onSuccess: (s) => {\n qc.invalidateQueries({ queryKey: KEY.shipments });\n qc.invalidateQueries({ queryKey: KEY.contract(s.contractId) });\n },\n });\n};\n\nexport const useTheScheduleShipment = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateShipmentInput) => {\n const data = await theQuery<{ theScheduleShipment: TheShipment }>(\n `mutation TheScheduleShipment($input: TheCreateShipmentInput!) {\n theScheduleShipment(input: $input) { ${SHIPMENT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theScheduleShipment;\n },\n onSuccess: (s) => {\n qc.invalidateQueries({ queryKey: KEY.shipments });\n qc.invalidateQueries({ queryKey: KEY.contract(s.contractId) });\n },\n });\n};\n\nexport const useTheDeliverShipment = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await theQuery<{ theDeliverShipment: TheShipment }>(\n `mutation TheDeliverShipment($id: ID!) {\n theDeliverShipment(id: $id) { ${SHIPMENT_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theDeliverShipment;\n },\n onSuccess: (s) => {\n qc.invalidateQueries({ queryKey: KEY.shipments });\n qc.invalidateQueries({ queryKey: KEY.contracts });\n qc.invalidateQueries({ queryKey: KEY.contract(s.contractId) });\n },\n });\n};\n\n// ============================================================================\n// Commerce — Inventory lots\n// ============================================================================\n\nexport interface InventoryFilters {\n commodity?: TheCommodityType;\n status?: TheInventoryStatus;\n pagination?: PaginationInput;\n}\n\nexport const useTheInventoryLots = (filters: InventoryFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.inventory, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListInventoryLots: TheConnection<TheInventoryLot> }>(\n `query TheListInventoryLots($commodity: TheCommodityType, $status: TheInventoryStatus, $pagination: PaginationInput) {\n theListInventoryLots(commodity: $commodity, status: $status, pagination: $pagination) {\n items { ${INVENTORY_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n commodity: filters.commodity,\n status: filters.status,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListInventoryLots;\n },\n });\n};\n\nexport const useTheCreateInventoryLot = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateInventoryLotInput) => {\n const data = await theQuery<{ theCreateInventoryLot: TheInventoryLot }>(\n `mutation TheCreateInventoryLot($input: TheCreateInventoryLotInput!) {\n theCreateInventoryLot(input: $input) { ${INVENTORY_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateInventoryLot;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.inventory }),\n });\n};\n\nexport const useTheSetInventoryLotStatus = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheInventoryStatus }) => {\n const data = await theQuery<{ theSetInventoryLotStatus: TheInventoryLot }>(\n `mutation TheSetInventoryLotStatus($id: ID!, $status: TheInventoryStatus!) {\n theSetInventoryLotStatus(id: $id, status: $status) { ${INVENTORY_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theSetInventoryLotStatus;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.inventory }),\n });\n};\n\n// ============================================================================\n// Sustainability — Emission records\n// ============================================================================\n\nexport interface EmissionFilters {\n assetId?: string;\n scope?: TheEmissionScope;\n pagination?: PaginationInput;\n}\n\nexport const useTheEmissionRecords = (filters: EmissionFilters = {}) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [...KEY.emissions, filters],\n queryFn: async () => {\n const data = await theQuery<{ theListEmissionRecords: TheConnection<TheEmissionRecord> }>(\n `query TheListEmissionRecords($assetId: ID, $scope: TheEmissionScope, $pagination: PaginationInput) {\n theListEmissionRecords(assetId: $assetId, scope: $scope, pagination: $pagination) {\n items { ${EMISSION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n assetId: filters.assetId,\n scope: filters.scope,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return data.theListEmissionRecords;\n },\n });\n};\n\nexport const useTheRecordEmission = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheRecordEmissionInput) => {\n const data = await theQuery<{ theRecordEmission: TheEmissionRecord }>(\n `mutation TheRecordEmission($input: TheRecordEmissionInput!) {\n theRecordEmission(input: $input) { ${EMISSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theRecordEmission;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.emissions }),\n });\n};\n\nexport const useTheVerifyEmission = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await theQuery<{ theVerifyEmission: TheEmissionRecord }>(\n `mutation TheVerifyEmission($id: ID!) {\n theVerifyEmission(id: $id) { ${EMISSION_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theVerifyEmission;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.emissions }),\n });\n};\n\n// ============================================================================\n// Sustainability — Compliance certifications\n// ============================================================================\n\nexport const useTheComplianceCerts = (\n assetId?: string,\n category?: TheComplianceCategory,\n status?: TheComplianceStatus,\n pagination?: PaginationInput\n) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: [\n ...KEY.compliance,\n assetId ?? null,\n category ?? null,\n status ?? null,\n pagination ?? null,\n ],\n queryFn: async () => {\n const data = await theQuery<{ theListComplianceCerts: TheConnection<TheComplianceCert> }>(\n `query TheListComplianceCerts($assetId: ID, $category: TheComplianceCategory, $status: TheComplianceStatus, $pagination: PaginationInput) {\n theListComplianceCerts(assetId: $assetId, category: $category, status: $status, pagination: $pagination) {\n items { ${COMPLIANCE_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { assetId, category, status, pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return data.theListComplianceCerts;\n },\n });\n};\n\nexport const useTheComplianceCert = (id: string | undefined) => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n return useQuery({\n queryKey: KEY.complianceCert(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await theQuery<{ theComplianceCert: TheComplianceCert | null }>(\n `query TheComplianceCert($id: ID!) {\n theComplianceCert(id: $id) { ${COMPLIANCE_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.theComplianceCert;\n },\n });\n};\n\nexport const useTheCreateComplianceCert = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: TheCreateComplianceCertInput) => {\n const data = await theQuery<{ theCreateComplianceCert: TheComplianceCert }>(\n `mutation TheCreateComplianceCert($input: TheCreateComplianceCertInput!) {\n theCreateComplianceCert(input: $input) { ${COMPLIANCE_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return data.theCreateComplianceCert;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.compliance }),\n });\n};\n\nexport const useTheTransitionComplianceCert = () => {\n const { apiGatewayUrl } = useTheGlobalFuel();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async ({ id, status }: { id: string; status: TheComplianceStatus }) => {\n const data = await theQuery<{ theTransitionComplianceCert: TheComplianceCert }>(\n `mutation TheTransitionComplianceCert($id: ID!, $status: TheComplianceStatus!) {\n theTransitionComplianceCert(id: $id, status: $status) { ${COMPLIANCE_FIELDS} }\n }`,\n { id, status },\n apiGatewayUrl\n );\n return data.theTransitionComplianceCert;\n },\n onSuccess: (c) => {\n qc.invalidateQueries({ queryKey: KEY.compliance });\n qc.invalidateQueries({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AAG,kBAAkB,EAAE,UAAU,EAAI,YAAY,CAAC,EAClD,EAAG,kBAAkB,EAAE,UAAU,EAAI,eAAe,EAAE,GAAG,EAAE,CAAC;;EAE/D,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { HapticImpactStyle, HapticNotificationType, ToastDuration, ConfirmOptions, ShareOptions } from '@burdenoff/fe-libs/shared/native';
2
+
3
+ export interface NativeControls {
4
+ /** Light haptic tap for button presses, toggles, tab selection. */
5
+ haptic: (style?: HapticImpactStyle) => void;
6
+ /** Success / warning / error haptic notification. */
7
+ notify: (type: HapticNotificationType) => void;
8
+ /** Native toast (falls back to the shell toaster on web). */
9
+ toast: (message: string, duration?: ToastDuration) => Promise<boolean>;
10
+ /** Native confirm dialog (falls back to `window.confirm`). */
11
+ confirm: (options: ConfirmOptions) => Promise<boolean | null>;
12
+ /** Copy text to native clipboard (falls back to web clipboard). */
13
+ copyText: (text: string) => Promise<boolean>;
14
+ /** Open native share sheet (falls back to web share API). */
15
+ share: (options: ShareOptions) => Promise<boolean>;
16
+ /** Open an external HTTPS URL in SFSafariViewController / Chrome Custom Tabs. */
17
+ openExternalUrl: (url: string) => Promise<void>;
18
+ }
19
+ export declare function useTheNativeControls(): NativeControls;
20
+ //# sourceMappingURL=useTheNativeControls.d.ts.map