@burdenoff/microfe-export 2026.510.111

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 (197) hide show
  1. package/README.md +243 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/export/ExportRoot.d.ts +31 -0
  5. package/dist/export/ExportRoot.d.ts.map +1 -0
  6. package/dist/export/ExportRoot.js +70 -0
  7. package/dist/export/ExportRoot.js.map +1 -0
  8. package/dist/export/ExportRoutes.d.ts +14 -0
  9. package/dist/export/ExportRoutes.d.ts.map +1 -0
  10. package/dist/export/ExportRoutes.js +104 -0
  11. package/dist/export/ExportRoutes.js.map +1 -0
  12. package/dist/export/components/ExportProgressBar.d.ts +12 -0
  13. package/dist/export/components/ExportProgressBar.d.ts.map +1 -0
  14. package/dist/export/components/ExportProgressBar.js +34 -0
  15. package/dist/export/components/ExportProgressBar.js.map +1 -0
  16. package/dist/export/components/ExportStatusBadge.d.ts +12 -0
  17. package/dist/export/components/ExportStatusBadge.d.ts.map +1 -0
  18. package/dist/export/components/ExportStatusBadge.js +39 -0
  19. package/dist/export/components/ExportStatusBadge.js.map +1 -0
  20. package/dist/export/components/PageLayout.d.ts +55 -0
  21. package/dist/export/components/PageLayout.d.ts.map +1 -0
  22. package/dist/export/components/PageLayout.js +93 -0
  23. package/dist/export/components/PageLayout.js.map +1 -0
  24. package/dist/export/components/ui.d.ts +6 -0
  25. package/dist/export/components/ui.d.ts.map +1 -0
  26. package/dist/export/constants/enums.d.ts +79 -0
  27. package/dist/export/constants/enums.d.ts.map +1 -0
  28. package/dist/export/constants/enums.js +27 -0
  29. package/dist/export/constants/enums.js.map +1 -0
  30. package/dist/export/constants/index.d.ts +7 -0
  31. package/dist/export/constants/index.d.ts.map +1 -0
  32. package/dist/export/hooks/useExportQueries.d.ts +224 -0
  33. package/dist/export/hooks/useExportQueries.d.ts.map +1 -0
  34. package/dist/export/hooks/useExportQueries.js +401 -0
  35. package/dist/export/hooks/useExportQueries.js.map +1 -0
  36. package/dist/export/index.d.ts +29 -0
  37. package/dist/export/index.d.ts.map +1 -0
  38. package/dist/export/index.js +3 -0
  39. package/dist/export/pages/CreateExportPage.d.ts +2 -0
  40. package/dist/export/pages/CreateExportPage.d.ts.map +1 -0
  41. package/dist/export/pages/CreateExportPage.js +495 -0
  42. package/dist/export/pages/CreateExportPage.js.map +1 -0
  43. package/dist/export/pages/ExportDashboardPage.d.ts +6 -0
  44. package/dist/export/pages/ExportDashboardPage.d.ts.map +1 -0
  45. package/dist/export/pages/ExportDashboardPage.js +166 -0
  46. package/dist/export/pages/ExportDashboardPage.js.map +1 -0
  47. package/dist/export/pages/ExportDetailPage.d.ts +7 -0
  48. package/dist/export/pages/ExportDetailPage.d.ts.map +1 -0
  49. package/dist/export/pages/ExportDetailPage.js +327 -0
  50. package/dist/export/pages/ExportDetailPage.js.map +1 -0
  51. package/dist/export/pages/ExportHistoryPage.d.ts +6 -0
  52. package/dist/export/pages/ExportHistoryPage.d.ts.map +1 -0
  53. package/dist/export/pages/ExportHistoryPage.js +261 -0
  54. package/dist/export/pages/ExportHistoryPage.js.map +1 -0
  55. package/dist/export/pages/ExportLandingPage.d.ts +9 -0
  56. package/dist/export/pages/ExportLandingPage.d.ts.map +1 -0
  57. package/dist/export/pages/ExportLandingPage.js +56 -0
  58. package/dist/export/pages/ExportLandingPage.js.map +1 -0
  59. package/dist/export/pages/ExportTemplatesPage.d.ts +6 -0
  60. package/dist/export/pages/ExportTemplatesPage.d.ts.map +1 -0
  61. package/dist/export/pages/ExportTemplatesPage.js +343 -0
  62. package/dist/export/pages/ExportTemplatesPage.js.map +1 -0
  63. package/dist/export/pages/TemplateDetailPage.d.ts +7 -0
  64. package/dist/export/pages/TemplateDetailPage.d.ts.map +1 -0
  65. package/dist/export/pages/TemplateDetailPage.js +215 -0
  66. package/dist/export/pages/TemplateDetailPage.js.map +1 -0
  67. package/dist/export/providers/ExportProvider.d.ts +13 -0
  68. package/dist/export/providers/ExportProvider.d.ts.map +1 -0
  69. package/dist/export/providers/ExportProvider.js +103 -0
  70. package/dist/export/providers/ExportProvider.js.map +1 -0
  71. package/dist/export/store/exportStore.d.ts +17 -0
  72. package/dist/export/store/exportStore.d.ts.map +1 -0
  73. package/dist/export/store/exportStore.js +43 -0
  74. package/dist/export/store/exportStore.js.map +1 -0
  75. package/dist/export/types/index.d.ts +230 -0
  76. package/dist/export/types/index.d.ts.map +1 -0
  77. package/dist/export/utils/cn.d.ts +8 -0
  78. package/dist/export/utils/cn.d.ts.map +1 -0
  79. package/dist/export/utils/cn.js +10 -0
  80. package/dist/export/utils/cn.js.map +1 -0
  81. package/dist/export/utils/events.d.ts +7 -0
  82. package/dist/export/utils/events.d.ts.map +1 -0
  83. package/dist/export/utils/events.js +16 -0
  84. package/dist/export/utils/events.js.map +1 -0
  85. package/dist/export/utils/i18n.d.ts +6 -0
  86. package/dist/export/utils/i18n.d.ts.map +1 -0
  87. package/dist/export/utils/i18n.js +15 -0
  88. package/dist/export/utils/i18n.js.map +1 -0
  89. package/dist/generated/global-operations.d.ts +2 -0
  90. package/dist/generated/global-operations.d.ts.map +1 -0
  91. package/dist/generated/global-types.d.ts +21253 -0
  92. package/dist/generated/global-types.d.ts.map +1 -0
  93. package/dist/generated/wspace-operations.d.ts +773 -0
  94. package/dist/generated/wspace-operations.d.ts.map +1 -0
  95. package/dist/generated/wspace-operations.js +319 -0
  96. package/dist/generated/wspace-operations.js.map +1 -0
  97. package/dist/generated/wspace-types.d.ts +55214 -0
  98. package/dist/generated/wspace-types.d.ts.map +1 -0
  99. package/dist/generated/wspace-types.js +12 -0
  100. package/dist/generated/wspace-types.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +5 -0
  104. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +24 -0
  105. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
  106. package/dist/node_modules/@apollo/client/errors/utils.js +16 -0
  107. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
  108. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
  109. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
  110. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +41 -0
  111. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
  112. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
  113. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
  114. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
  115. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
  116. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
  117. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
  118. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
  119. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
  120. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
  121. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
  122. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
  123. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
  124. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
  125. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
  126. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
  127. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
  128. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
  129. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
  130. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
  131. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
  132. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
  133. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
  134. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
  135. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
  136. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
  137. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
  138. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
  139. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
  140. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
  141. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
  142. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
  143. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
  144. package/dist/node_modules/@apollo/client/version.js +6 -0
  145. package/dist/node_modules/@apollo/client/version.js.map +1 -0
  146. package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
  147. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
  148. package/dist/node_modules/@wry/trie/lib/index.js +53 -0
  149. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
  150. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  151. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  152. package/dist/node_modules/graphql-ws/dist/client.js +272 -0
  153. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
  154. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +62 -0
  155. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
  156. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
  157. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
  158. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
  159. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  160. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
  161. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  162. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
  163. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  164. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
  165. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
  166. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
  167. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
  168. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
  169. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  170. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
  171. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  172. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
  173. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  174. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  175. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  176. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
  177. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  178. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
  179. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  180. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
  181. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  182. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  183. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  184. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
  185. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  186. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
  187. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  188. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
  189. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  190. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
  191. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  192. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  193. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  194. package/dist/utils/nativeBridge.d.ts +3 -0
  195. package/dist/utils/nativeBridge.d.ts.map +1 -0
  196. package/dist/utils/nativeBridge.js +2 -0
  197. package/package.json +107 -0
@@ -0,0 +1,401 @@
1
+ import { useExport as e } from "../providers/ExportProvider.js";
2
+ import { CancelExportJobDocument as t, CreateExportJobDocument as n, CreateExportTemplateDocument as r, DeleteExportJobDocument as i, DeleteExportTemplateDocument as a, ExportJobProgressDocument as o, GetAvailableExportEntitiesDocument as s, GetExportJobDocument as c, GetExportTemplateDocument as l, ListExportJobsDocument as u, ListExportTemplatesDocument as d, RetryExportJobDocument as f } from "../../generated/wspace-operations.js";
3
+ import { ExportFormat as p, ExportJobStatus as m, ExportScope as h } from "../../generated/wspace-types.js";
4
+ import { emitExportEvent as g } from "../utils/events.js";
5
+ import { useMutation as _, useQuery as v, useSubscription as y } from "@apollo/client/react";
6
+ //#region src/export/hooks/useExportQueries.ts
7
+ function b(e) {
8
+ return e ?? void 0;
9
+ }
10
+ function x(e) {
11
+ if (e == null) return;
12
+ let t = typeof e == "number" ? e : Number(e);
13
+ return Number.isFinite(t) ? t : void 0;
14
+ }
15
+ function S(e) {
16
+ return x(e) ?? 0;
17
+ }
18
+ function C(e) {
19
+ return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
20
+ }
21
+ function w(e) {
22
+ return {
23
+ hasNextPage: e.hasNextPage,
24
+ hasPreviousPage: e.hasPreviousPage,
25
+ startCursor: b(e.startCursor),
26
+ endCursor: b(e.endCursor)
27
+ };
28
+ }
29
+ function T(e) {
30
+ return {
31
+ id: e.id,
32
+ jobId: b(e.jobId),
33
+ partNumber: e.partNumber,
34
+ fileName: e.fileName,
35
+ sizeBytes: S(e.sizeBytes),
36
+ entityTypes: e.entityTypes,
37
+ downloadUrl: b(e.downloadUrl),
38
+ downloadExpiresAt: b(e.downloadExpiresAt),
39
+ checksum: b(e.checksum),
40
+ createdAt: b(e.createdAt)
41
+ };
42
+ }
43
+ function E(e) {
44
+ return {
45
+ id: e.id,
46
+ name: e.name,
47
+ description: b(e.description),
48
+ status: e.status,
49
+ progress: e.progress,
50
+ exportScope: e.exportScope ? e.exportScope : void 0,
51
+ organizationId: b(e.organizationId),
52
+ targetWorkspaceIds: e.targetWorkspaceIds ?? void 0,
53
+ entityTypes: e.entityTypes,
54
+ format: e.format,
55
+ archiveFormat: e.archiveFormat ?? "ZIP",
56
+ totalEntities: x(e.totalEntities),
57
+ processedEntities: x(e.processedEntities),
58
+ totalSizeBytes: x(e.totalSizeBytes),
59
+ parts: e.parts?.map(T) ?? [],
60
+ templateId: b(e.templateId),
61
+ filters: C(e.entityFilters),
62
+ errorMessage: b(e.errorMessage),
63
+ startedAt: b(e.startedAt),
64
+ completedAt: b(e.completedAt),
65
+ expiresAt: b(e.expiresAt),
66
+ createdBy: e.createdBy,
67
+ temporalWorkflowId: b(e.temporalWorkflowId),
68
+ workspaceId: b(e.workspaceId),
69
+ createdAt: e.createdAt,
70
+ updatedAt: e.updatedAt
71
+ };
72
+ }
73
+ function D(e) {
74
+ return {
75
+ id: e.id,
76
+ name: e.name,
77
+ description: b(e.description),
78
+ entityTypes: e.entityTypes,
79
+ format: e.format,
80
+ filters: C(e.entityFilters),
81
+ isDefault: e.isDefault,
82
+ createdBy: e.createdBy,
83
+ workspaceId: b(e.workspaceId),
84
+ createdAt: e.createdAt,
85
+ updatedAt: e.updatedAt
86
+ };
87
+ }
88
+ function O(e) {
89
+ return {
90
+ entityType: e.entityType,
91
+ displayName: e.displayName,
92
+ description: b(e.description),
93
+ estimatedSize: b(e.estimatedSize),
94
+ supportsDateRange: e.supportsDateRange,
95
+ supportsMediaExport: e.supportsMediaExport,
96
+ enabled: e.enabled
97
+ };
98
+ }
99
+ function k(e) {
100
+ if (e === "CSV") return p.Csv;
101
+ if (e === "JSON") return p.Json;
102
+ throw Error(`Unsupported export format: ${e}`);
103
+ }
104
+ function A(e) {
105
+ switch (e) {
106
+ case "CANCELLED": return m.Cancelled;
107
+ case "COMPLETED": return m.Completed;
108
+ case "CREATED": return m.Created;
109
+ case "DELETED": return m.Deleted;
110
+ case "EXPIRED": return m.Expired;
111
+ case "FAILED": return m.Failed;
112
+ case "QUEUED": return m.Queued;
113
+ case "RUNNING": return m.Running;
114
+ default: throw Error(`Unsupported export status: ${e}`);
115
+ }
116
+ }
117
+ function j(e) {
118
+ switch (e) {
119
+ case "INDIVIDUAL": return h.Individual;
120
+ case "WORKSPACE_ADMIN": return h.WorkspaceAdmin;
121
+ case "ORG_ADMIN": return h.OrgAdmin;
122
+ default: throw Error(`Unsupported export scope: ${e}`);
123
+ }
124
+ }
125
+ function M(t, n) {
126
+ let { workspaceId: r } = e(), { data: i, loading: a, error: o, refetch: s } = v(u, {
127
+ variables: {
128
+ filter: t && r ? {
129
+ status: t.status && t.status !== "all" ? [A(t.status)] : void 0,
130
+ format: t.format && t.format !== "all" ? k(t.format) : void 0,
131
+ search: t.search ?? void 0
132
+ } : void 0,
133
+ pagination: n,
134
+ context: { workspaceId: r }
135
+ },
136
+ skip: !r
137
+ });
138
+ return {
139
+ data: i?.listExportJobs.edges.map((e) => E(e.node)) ?? [],
140
+ totalCount: i?.listExportJobs.totalCount ?? 0,
141
+ pageInfo: i?.listExportJobs.pageInfo ? w(i.listExportJobs.pageInfo) : null,
142
+ isLoading: a,
143
+ error: o ?? null,
144
+ refetch: s
145
+ };
146
+ }
147
+ function N(t) {
148
+ let { workspaceId: n } = e(), { data: r, loading: i, error: a, refetch: o } = v(c, {
149
+ variables: {
150
+ id: t ?? "",
151
+ context: { workspaceId: n }
152
+ },
153
+ skip: !t || !n
154
+ });
155
+ return {
156
+ data: r?.getExportJob ? E(r.getExportJob) : null,
157
+ isLoading: i,
158
+ error: a ?? null,
159
+ refetch: o
160
+ };
161
+ }
162
+ function P(e) {
163
+ let { data: t, loading: n, error: r } = y(o, {
164
+ variables: { jobId: e ?? "" },
165
+ skip: !e
166
+ });
167
+ return {
168
+ data: t?.exportJobProgress ? E(t.exportJobProgress) : null,
169
+ isLoading: n,
170
+ error: r ?? null
171
+ };
172
+ }
173
+ function F(t) {
174
+ let { workspaceId: n } = e(), r = t ?? n, { data: i, loading: a, error: o, refetch: c, fetchMore: l } = v(s, {
175
+ variables: {
176
+ context: { workspaceId: r },
177
+ pagination: { first: 100 }
178
+ },
179
+ skip: !r
180
+ }), u = i?.getAvailableExportEntities;
181
+ return {
182
+ data: u?.edges.map((e) => O(e.node)) ?? [],
183
+ totalCount: u?.totalCount ?? 0,
184
+ pageInfo: u?.pageInfo ? w(u.pageInfo) : null,
185
+ loadMore: async () => {
186
+ !r || !u?.pageInfo.hasNextPage || await l({
187
+ variables: {
188
+ context: { workspaceId: r },
189
+ pagination: {
190
+ first: 100,
191
+ after: u.pageInfo.endCursor
192
+ }
193
+ },
194
+ updateQuery: (e, { fetchMoreResult: t }) => t ? { getAvailableExportEntities: {
195
+ ...t.getAvailableExportEntities,
196
+ edges: [...e.getAvailableExportEntities.edges, ...t.getAvailableExportEntities.edges]
197
+ } } : e
198
+ });
199
+ },
200
+ error: o ?? null,
201
+ isLoading: a,
202
+ refetch: c
203
+ };
204
+ }
205
+ function I(t) {
206
+ let { workspaceId: n } = e(), r = t ?? n, { data: i, loading: a, error: o, refetch: s, fetchMore: c } = v(d, {
207
+ variables: {
208
+ context: { workspaceId: r },
209
+ pagination: { first: 50 }
210
+ },
211
+ skip: !r
212
+ }), l = i?.listExportTemplates;
213
+ return {
214
+ data: l?.edges.map((e) => D(e.node)) ?? [],
215
+ totalCount: l?.totalCount ?? 0,
216
+ pageInfo: l?.pageInfo ? w(l.pageInfo) : null,
217
+ loadMore: async () => {
218
+ !r || !l?.pageInfo.hasNextPage || await c({
219
+ variables: {
220
+ context: { workspaceId: r },
221
+ pagination: {
222
+ first: 50,
223
+ after: l.pageInfo.endCursor
224
+ }
225
+ },
226
+ updateQuery: (e, { fetchMoreResult: t }) => t ? { listExportTemplates: {
227
+ ...t.listExportTemplates,
228
+ edges: [...e.listExportTemplates.edges, ...t.listExportTemplates.edges]
229
+ } } : e
230
+ });
231
+ },
232
+ isLoading: a,
233
+ error: o ?? null,
234
+ refetch: s
235
+ };
236
+ }
237
+ function L(t) {
238
+ let { workspaceId: n } = e(), { data: r, loading: i, error: a } = v(l, {
239
+ variables: {
240
+ id: t ?? "",
241
+ context: { workspaceId: n }
242
+ },
243
+ skip: !t || !n
244
+ });
245
+ return {
246
+ data: r?.getExportTemplate ? D(r.getExportTemplate) : null,
247
+ isLoading: i,
248
+ error: a ?? null
249
+ };
250
+ }
251
+ function R() {
252
+ let t = e(), { workspaceId: r } = t, [i, { loading: a, error: o }] = _(n), s = async (e) => {
253
+ let { filters: n, ...a } = e, o = {
254
+ ...a,
255
+ exportScope: a.exportScope ? j(a.exportScope) : void 0,
256
+ format: k(a.format),
257
+ entityFilters: n
258
+ }, s = await i({
259
+ variables: {
260
+ context: { workspaceId: r },
261
+ input: o
262
+ },
263
+ refetchQueries: [{
264
+ query: u,
265
+ variables: { context: { workspaceId: r } }
266
+ }]
267
+ });
268
+ if (!s.data) throw g(t, "export.api.failed", { operation: "createExportJob" }), Error("Failed to create export job");
269
+ return g(t, "export.job.created", { jobId: s.data.createExportJob.id }), E(s.data.createExportJob);
270
+ };
271
+ return {
272
+ createJob: s,
273
+ mutate: s,
274
+ mutateAsync: s,
275
+ loading: a,
276
+ isPending: a,
277
+ error: o ?? null
278
+ };
279
+ }
280
+ function z() {
281
+ let n = e(), { workspaceId: r } = n, [i, { loading: a, error: o }] = _(t), s = async (e) => {
282
+ let t = await i({
283
+ variables: {
284
+ id: e,
285
+ context: { workspaceId: r }
286
+ },
287
+ refetchQueries: [{
288
+ query: u,
289
+ variables: { context: { workspaceId: r } }
290
+ }]
291
+ });
292
+ if (!t.data) throw g(n, "export.api.failed", {
293
+ operation: "cancelExportJob",
294
+ jobId: e
295
+ }), Error("Failed to cancel export job");
296
+ return g(n, "export.job.cancelled", { jobId: e }), t.data.cancelExportJob;
297
+ };
298
+ return {
299
+ cancelJob: s,
300
+ mutate: s,
301
+ mutateAsync: s,
302
+ loading: a,
303
+ isPending: a,
304
+ error: o ?? null
305
+ };
306
+ }
307
+ function B() {
308
+ let t = e(), { workspaceId: n } = t, [r, { loading: a, error: o }] = _(i), s = async (e) => (await r({
309
+ variables: {
310
+ id: e,
311
+ context: { workspaceId: n }
312
+ },
313
+ refetchQueries: [{
314
+ query: u,
315
+ variables: { context: { workspaceId: n } }
316
+ }]
317
+ }), g(t, "export.job.deleted", { jobId: e }), !0);
318
+ return {
319
+ deleteJob: s,
320
+ mutate: s,
321
+ mutateAsync: s,
322
+ loading: a,
323
+ isPending: a,
324
+ error: o ?? null
325
+ };
326
+ }
327
+ function V() {
328
+ let t = e(), { workspaceId: n } = t, [r, { loading: i, error: a }] = _(f);
329
+ return {
330
+ retryJob: async (e) => {
331
+ let i = await r({
332
+ variables: {
333
+ id: e,
334
+ context: { workspaceId: n }
335
+ },
336
+ refetchQueries: [{
337
+ query: u,
338
+ variables: { context: { workspaceId: n } }
339
+ }]
340
+ });
341
+ if (!i.data) throw g(t, "export.api.failed", {
342
+ operation: "retryExportJob",
343
+ jobId: e
344
+ }), Error("Failed to retry export job");
345
+ return g(t, "export.job.retried", {
346
+ originalJobId: e,
347
+ jobId: i.data.retryExportJob.id
348
+ }), E(i.data.retryExportJob);
349
+ },
350
+ loading: i,
351
+ isPending: i,
352
+ error: a ?? null
353
+ };
354
+ }
355
+ function H() {
356
+ let t = e(), { workspaceId: n } = t, [i, { loading: a, error: o }] = _(r);
357
+ return {
358
+ createTemplate: async (e) => {
359
+ let r = {
360
+ ...e,
361
+ format: k(e.format)
362
+ }, a = await i({
363
+ variables: {
364
+ context: { workspaceId: n },
365
+ input: r
366
+ },
367
+ refetchQueries: [{
368
+ query: d,
369
+ variables: { context: { workspaceId: n } }
370
+ }]
371
+ });
372
+ if (!a.data) throw g(t, "export.api.failed", { operation: "createExportTemplate" }), Error("Failed to create export template");
373
+ return g(t, "export.template.created", { templateId: a.data.createExportTemplate.id }), D(a.data.createExportTemplate);
374
+ },
375
+ loading: a,
376
+ isPending: a,
377
+ error: o ?? null
378
+ };
379
+ }
380
+ function U() {
381
+ let t = e(), { workspaceId: n } = t, [r, { loading: i, error: o }] = _(a);
382
+ return {
383
+ deleteTemplate: async (e) => (await r({
384
+ variables: {
385
+ id: e,
386
+ context: { workspaceId: n }
387
+ },
388
+ refetchQueries: [{
389
+ query: d,
390
+ variables: { context: { workspaceId: n } }
391
+ }]
392
+ }), g(t, "export.template.deleted", { templateId: e }), !0),
393
+ loading: i,
394
+ isPending: i,
395
+ error: o ?? null
396
+ };
397
+ }
398
+ //#endregion
399
+ export { F as useAvailableEntities, z as useCancelExportJob, R as useCreateExportJob, H as useCreateExportTemplate, B as useDeleteExportJob, U as useDeleteExportTemplate, N as useExportJob, P as useExportJobProgress, M as useExportJobs, L as useExportTemplate, I as useExportTemplates, V as useRetryExportJob };
400
+
401
+ //# sourceMappingURL=useExportQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExportQueries.js","names":[],"sources":["../../../src/export/hooks/useExportQueries.ts"],"sourcesContent":["/**\n * Export Query Hooks\n *\n * Real Apollo Client hooks for all export operations.\n * Keep these documents in sync with src/operations/wspace/export/*.graphql.\n */\n\nimport { useMutation, useQuery, useSubscription } from \"@apollo/client/react\";\nimport {\n CancelExportJobDocument,\n CreateExportJobDocument,\n CreateExportTemplateDocument,\n DeleteExportJobDocument,\n DeleteExportTemplateDocument,\n ExportJobProgressDocument,\n GetAvailableExportEntitiesDocument,\n GetExportJobDocument,\n GetExportPartDocument,\n GetExportTemplateDocument,\n ListExportJobsDocument,\n ListExportTemplatesDocument,\n RetryExportJobDocument,\n UpdateExportTemplateDocument,\n type CancelExportJobMutation,\n type CancelExportJobMutationVariables,\n type CreateExportJobMutation,\n type CreateExportJobMutationVariables,\n type CreateExportTemplateMutation,\n type CreateExportTemplateMutationVariables,\n type DeleteExportJobMutation,\n type DeleteExportJobMutationVariables,\n type DeleteExportTemplateMutation,\n type DeleteExportTemplateMutationVariables,\n type ExportJobProgressSubscription,\n type ExportJobProgressSubscriptionVariables,\n type GetAvailableExportEntitiesQuery,\n type GetAvailableExportEntitiesQueryVariables,\n type GetExportJobQuery,\n type GetExportJobQueryVariables,\n type GetExportPartQuery,\n type GetExportPartQueryVariables,\n type GetExportTemplateQuery,\n type GetExportTemplateQueryVariables,\n type ListExportJobsQuery,\n type ListExportJobsQueryVariables,\n type ListExportTemplatesQuery,\n type ListExportTemplatesQueryVariables,\n type RetryExportJobMutation,\n type RetryExportJobMutationVariables,\n type UpdateExportTemplateMutation,\n type UpdateExportTemplateMutationVariables,\n} from \"../../generated/wspace-operations\";\nimport {\n ExportFormat as GqlExportFormat,\n ExportJobStatus as GqlExportJobStatus,\n ExportScope as GqlExportScope,\n type CreateExportJobInput as GqlCreateExportJobInput,\n type CreateExportTemplateInput as GqlCreateExportTemplateInput,\n type ExportJobFilterInput as GqlExportJobFilterInput,\n type ExportPaginationInput as GqlExportPaginationInput,\n type UpdateExportTemplateInput as GqlUpdateExportTemplateInput,\n} from \"../../generated/wspace-types\";\nimport { useExport } from \"../providers/ExportProvider\";\nimport { emitExportEvent } from \"../utils/events\";\nimport type {\n ExportArchiveFormat,\n ExportFormat,\n ExportJob,\n ExportJobStatus,\n ExportScope,\n ExportTemplate,\n ExportAvailableEntity,\n ExportPart,\n ExportFilter,\n PageInfo,\n} from \"../types\";\n\n// ---------------------------------------------------------------------------\n// Mapping helpers\n// ---------------------------------------------------------------------------\n\ntype Nullable<T> = T | null | undefined;\n\ninterface ExportPartLike {\n id: string;\n jobId?: Nullable<string>;\n partNumber: number;\n fileName: string;\n sizeBytes: number | string;\n entityTypes: string[];\n downloadUrl?: Nullable<string>;\n downloadExpiresAt?: Nullable<string>;\n checksum?: Nullable<string>;\n createdAt?: Nullable<string>;\n}\n\ninterface ExportJobLike {\n id: string;\n name: string;\n description?: Nullable<string>;\n status: string;\n progress: number;\n exportScope?: Nullable<string>;\n organizationId?: Nullable<string>;\n targetWorkspaceIds?: Nullable<string[]>;\n entityTypes: string[];\n format: string;\n archiveFormat?: Nullable<string>;\n totalEntities?: Nullable<number>;\n processedEntities?: Nullable<number>;\n totalSizeBytes?: Nullable<number | string>;\n parts?: Nullable<ExportPartLike[]>;\n templateId?: Nullable<string>;\n entityFilters?: Nullable<Record<string, unknown>>;\n errorMessage?: Nullable<string>;\n startedAt?: Nullable<string>;\n completedAt?: Nullable<string>;\n expiresAt?: Nullable<string>;\n createdBy: string;\n temporalWorkflowId?: Nullable<string>;\n workspaceId?: Nullable<string>;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ExportTemplateLike {\n id: string;\n name: string;\n description?: Nullable<string>;\n entityTypes: string[];\n format: string;\n entityFilters?: Nullable<Record<string, unknown>>;\n isDefault: boolean;\n workspaceId?: Nullable<string>;\n createdBy: string;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ExportAvailableEntityLike {\n entityType: string;\n displayName: string;\n description?: Nullable<string>;\n estimatedSize?: Nullable<string>;\n supportsDateRange: boolean;\n supportsMediaExport: boolean;\n enabled: boolean;\n}\n\nfunction optionalString(value: Nullable<string>): string | undefined {\n return value ?? undefined;\n}\n\nfunction optionalNumber(value: Nullable<number | string>): number | undefined {\n if (value == null) return undefined;\n const parsed = typeof value === \"number\" ? value : Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction numberOrZero(value: Nullable<number | string>): number {\n return optionalNumber(value) ?? 0;\n}\n\nfunction optionalRecord(\n value: Nullable<Record<string, unknown>>,\n): Record<string, unknown> | undefined {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? value\n : undefined;\n}\n\nfunction mapPageInfo(pageInfo: {\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n startCursor?: Nullable<string>;\n endCursor?: Nullable<string>;\n}): PageInfo {\n return {\n hasNextPage: pageInfo.hasNextPage,\n hasPreviousPage: pageInfo.hasPreviousPage,\n startCursor: optionalString(pageInfo.startCursor),\n endCursor: optionalString(pageInfo.endCursor),\n };\n}\n\nfunction mapPart(part: ExportPartLike): ExportPart {\n return {\n id: part.id,\n jobId: optionalString(part.jobId),\n partNumber: part.partNumber,\n fileName: part.fileName,\n sizeBytes: numberOrZero(part.sizeBytes),\n entityTypes: part.entityTypes,\n downloadUrl: optionalString(part.downloadUrl),\n downloadExpiresAt: optionalString(part.downloadExpiresAt),\n checksum: optionalString(part.checksum),\n createdAt: optionalString(part.createdAt),\n };\n}\n\nfunction mapJob(job: ExportJobLike): ExportJob {\n return {\n id: job.id,\n name: job.name,\n description: optionalString(job.description),\n status: job.status as ExportJobStatus,\n progress: job.progress,\n exportScope: job.exportScope ? (job.exportScope as ExportScope) : undefined,\n organizationId: optionalString(job.organizationId),\n targetWorkspaceIds: job.targetWorkspaceIds ?? undefined,\n entityTypes: job.entityTypes,\n format: job.format as ExportFormat,\n archiveFormat: (job.archiveFormat ?? \"ZIP\") as ExportArchiveFormat,\n totalEntities: optionalNumber(job.totalEntities),\n processedEntities: optionalNumber(job.processedEntities),\n totalSizeBytes: optionalNumber(job.totalSizeBytes),\n parts: job.parts?.map(mapPart) ?? [],\n templateId: optionalString(job.templateId),\n filters: optionalRecord(job.entityFilters),\n errorMessage: optionalString(job.errorMessage),\n startedAt: optionalString(job.startedAt),\n completedAt: optionalString(job.completedAt),\n expiresAt: optionalString(job.expiresAt),\n createdBy: job.createdBy,\n temporalWorkflowId: optionalString(job.temporalWorkflowId),\n workspaceId: optionalString(job.workspaceId),\n createdAt: job.createdAt,\n updatedAt: job.updatedAt,\n };\n}\n\nfunction mapTemplate(template: ExportTemplateLike): ExportTemplate {\n return {\n id: template.id,\n name: template.name,\n description: optionalString(template.description),\n entityTypes: template.entityTypes,\n format: template.format as ExportFormat,\n filters: optionalRecord(template.entityFilters),\n isDefault: template.isDefault,\n createdBy: template.createdBy,\n workspaceId: optionalString(template.workspaceId),\n createdAt: template.createdAt,\n updatedAt: template.updatedAt,\n };\n}\n\nfunction mapAvailableEntity(\n entity: ExportAvailableEntityLike,\n): ExportAvailableEntity {\n return {\n entityType: entity.entityType,\n displayName: entity.displayName,\n description: optionalString(entity.description),\n estimatedSize: optionalString(entity.estimatedSize),\n supportsDateRange: entity.supportsDateRange,\n supportsMediaExport: entity.supportsMediaExport,\n enabled: entity.enabled,\n };\n}\n\nfunction toGqlFormat(format: ExportFormat | string): GqlExportFormat {\n if (format === \"CSV\") return GqlExportFormat.Csv;\n if (format === \"JSON\") return GqlExportFormat.Json;\n throw new Error(`Unsupported export format: ${format}`);\n}\n\nfunction toGqlStatus(status: ExportJobStatus | string): GqlExportJobStatus {\n switch (status) {\n case \"CANCELLED\":\n return GqlExportJobStatus.Cancelled;\n case \"COMPLETED\":\n return GqlExportJobStatus.Completed;\n case \"CREATED\":\n return GqlExportJobStatus.Created;\n case \"DELETED\":\n return GqlExportJobStatus.Deleted;\n case \"EXPIRED\":\n return GqlExportJobStatus.Expired;\n case \"FAILED\":\n return GqlExportJobStatus.Failed;\n case \"QUEUED\":\n return GqlExportJobStatus.Queued;\n case \"RUNNING\":\n return GqlExportJobStatus.Running;\n default:\n throw new Error(`Unsupported export status: ${status}`);\n }\n}\n\nfunction toGqlScope(scope: ExportScope | string): GqlExportScope {\n switch (scope) {\n case \"INDIVIDUAL\":\n return GqlExportScope.Individual;\n case \"WORKSPACE_ADMIN\":\n return GqlExportScope.WorkspaceAdmin;\n case \"ORG_ADMIN\":\n return GqlExportScope.OrgAdmin;\n default:\n throw new Error(`Unsupported export scope: ${scope}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// Query Hooks\n// ---------------------------------------------------------------------------\n\n/**\n * Input for creating an export job\n */\nexport interface CreateExportJobInput {\n name: string;\n description?: string;\n exportScope?: ExportScope;\n organizationId?: string;\n entityTypes: string[];\n format: ExportFormat;\n filters?: Record<string, unknown>;\n templateId?: string;\n dateRangeStart?: string | null;\n dateRangeEnd?: string | null;\n}\n\n/**\n * Input for creating an export template\n */\nexport interface CreateExportTemplateInput {\n name: string;\n description?: string;\n entityTypes: string[];\n format: ExportFormat;\n}\n\n/**\n * Input for updating an export template\n */\nexport interface UpdateExportTemplateInput {\n name?: string;\n description?: string;\n entityTypes?: string[];\n format?: ExportFormat;\n isDefault?: boolean;\n}\n\n/**\n * Filter input for listing export jobs\n */\nexport interface ExportJobFilterInput {\n status?: ExportJobStatus[];\n format?: ExportFormat;\n entityTypes?: string[];\n search?: string;\n dateFrom?: string;\n dateTo?: string;\n}\n\n/**\n * Pagination input for export job list\n */\nexport interface ExportPaginationInput {\n first?: number;\n after?: string;\n last?: number;\n before?: string;\n}\n\n/**\n * Hook to fetch a paginated list of export jobs\n */\nexport function useExportJobs(\n filter?: Partial<ExportFilter>,\n pagination?: ExportPaginationInput,\n) {\n const { workspaceId } = useExport();\n\n // Build the backend filter from the UI filter shape\n const backendFilter: GqlExportJobFilterInput | undefined =\n filter && workspaceId\n ? {\n status:\n filter.status && filter.status !== \"all\"\n ? [toGqlStatus(filter.status)]\n : undefined,\n format:\n filter.format && filter.format !== \"all\"\n ? toGqlFormat(filter.format)\n : undefined,\n search: filter.search ?? undefined,\n }\n : undefined;\n\n const { data, loading, error, refetch } = useQuery<\n ListExportJobsQuery,\n ListExportJobsQueryVariables\n >(ListExportJobsDocument, {\n variables: {\n filter: backendFilter,\n pagination: pagination as GqlExportPaginationInput | undefined,\n context: { workspaceId },\n },\n skip: !workspaceId,\n });\n\n const jobs = data?.listExportJobs.edges.map((e) => mapJob(e.node)) ?? [];\n const totalCount = data?.listExportJobs.totalCount ?? 0;\n const pageInfo = data?.listExportJobs.pageInfo\n ? mapPageInfo(data.listExportJobs.pageInfo)\n : null;\n\n return {\n data: jobs,\n totalCount,\n pageInfo,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to fetch a single export job by ID.\n */\nexport function useExportJob(jobId: string | undefined) {\n const { workspaceId } = useExport();\n\n const { data, loading, error, refetch } = useQuery<\n GetExportJobQuery,\n GetExportJobQueryVariables\n >(GetExportJobDocument, {\n variables: { id: jobId ?? \"\", context: { workspaceId } },\n skip: !jobId || !workspaceId,\n });\n\n const job = data?.getExportJob ? mapJob(data.getExportJob) : null;\n\n return {\n data: job,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to subscribe to live progress updates for an export job.\n */\nexport function useExportJobProgress(jobId: string | undefined) {\n const { data, loading, error } = useSubscription<\n ExportJobProgressSubscription,\n ExportJobProgressSubscriptionVariables\n >(ExportJobProgressDocument, {\n variables: { jobId: jobId ?? \"\" },\n skip: !jobId,\n });\n\n return {\n data: data?.exportJobProgress ? mapJob(data.exportJobProgress) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to fetch available entity types for export in a workspace\n */\nexport function useAvailableEntities(overrideWorkspaceId?: string) {\n const { workspaceId: ctxWorkspaceId } = useExport();\n const workspaceId = overrideWorkspaceId ?? ctxWorkspaceId;\n\n const { data, loading, error, refetch, fetchMore } = useQuery<\n GetAvailableExportEntitiesQuery,\n GetAvailableExportEntitiesQueryVariables\n >(GetAvailableExportEntitiesDocument, {\n variables: {\n context: { workspaceId },\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const connection = data?.getAvailableExportEntities;\n const entities =\n connection?.edges.map((edge) => mapAvailableEntity(edge.node)) ?? [];\n\n const loadMore = async () => {\n if (!workspaceId || !connection?.pageInfo.hasNextPage) return;\n await fetchMore({\n variables: {\n context: { workspaceId },\n pagination: { first: 100, after: connection.pageInfo.endCursor },\n },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n return {\n getAvailableExportEntities: {\n ...fetchMoreResult.getAvailableExportEntities,\n edges: [\n ...previous.getAvailableExportEntities.edges,\n ...fetchMoreResult.getAvailableExportEntities.edges,\n ],\n },\n };\n },\n });\n };\n\n return {\n data: entities,\n totalCount: connection?.totalCount ?? 0,\n pageInfo: connection?.pageInfo ? mapPageInfo(connection.pageInfo) : null,\n loadMore,\n error: error ?? null,\n isLoading: loading,\n refetch,\n };\n}\n\n/**\n * Hook to fetch all export templates for the current workspace\n */\nexport function useExportTemplates(overrideWorkspaceId?: string) {\n const { workspaceId: ctxWorkspaceId } = useExport();\n const workspaceId = overrideWorkspaceId ?? ctxWorkspaceId;\n\n const { data, loading, error, refetch, fetchMore } = useQuery<\n ListExportTemplatesQuery,\n ListExportTemplatesQueryVariables\n >(ListExportTemplatesDocument, {\n variables: {\n context: { workspaceId },\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n const connection = data?.listExportTemplates;\n const templates =\n connection?.edges.map((edge) => mapTemplate(edge.node)) ?? [];\n\n const loadMore = async () => {\n if (!workspaceId || !connection?.pageInfo.hasNextPage) return;\n await fetchMore({\n variables: {\n context: { workspaceId },\n pagination: { first: 50, after: connection.pageInfo.endCursor },\n },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n return {\n listExportTemplates: {\n ...fetchMoreResult.listExportTemplates,\n edges: [\n ...previous.listExportTemplates.edges,\n ...fetchMoreResult.listExportTemplates.edges,\n ],\n },\n };\n },\n });\n };\n\n return {\n data: templates,\n totalCount: connection?.totalCount ?? 0,\n pageInfo: connection?.pageInfo ? mapPageInfo(connection.pageInfo) : null,\n loadMore,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to fetch a single export template by ID\n */\nexport function useExportTemplate(templateId: string | undefined) {\n const { workspaceId } = useExport();\n\n const { data, loading, error } = useQuery<\n GetExportTemplateQuery,\n GetExportTemplateQueryVariables\n >(GetExportTemplateDocument, {\n variables: { id: templateId ?? \"\", context: { workspaceId } },\n skip: !templateId || !workspaceId,\n });\n\n return {\n data: data?.getExportTemplate ? mapTemplate(data.getExportTemplate) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to fetch a single export part by ID\n */\nexport function useExportPart(partId: string | undefined) {\n const { workspaceId } = useExport();\n const { data, loading, error } = useQuery<\n GetExportPartQuery,\n GetExportPartQueryVariables\n >(GetExportPartDocument, {\n variables: { id: partId ?? \"\", context: { workspaceId } },\n skip: !partId || !workspaceId,\n });\n\n return {\n data: data?.getExportPart ? mapPart(data.getExportPart) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Mutation Hooks\n// ---------------------------------------------------------------------------\n\n/**\n * Hook to create a new export job\n */\nexport function useCreateExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CreateExportJobMutation,\n CreateExportJobMutationVariables\n >(CreateExportJobDocument);\n\n const createJob = async (input: CreateExportJobInput): Promise<ExportJob> => {\n const { filters, ...restInput } = input;\n const gqlInput: GqlCreateExportJobInput = {\n ...restInput,\n exportScope: restInput.exportScope\n ? toGqlScope(restInput.exportScope)\n : undefined,\n format: toGqlFormat(restInput.format),\n entityFilters: filters,\n };\n\n const result = await mutate({\n variables: {\n context: { workspaceId },\n input: gqlInput,\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"createExportJob\",\n });\n throw new Error(\"Failed to create export job\");\n }\n emitExportEvent(exportContext, \"export.job.created\", {\n jobId: result.data.createExportJob.id,\n });\n return mapJob(result.data.createExportJob);\n };\n\n return {\n createJob,\n // Keep legacy names for existing callers\n mutate: createJob,\n mutateAsync: createJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to cancel an export job\n */\nexport function useCancelExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CancelExportJobMutation,\n CancelExportJobMutationVariables\n >(CancelExportJobDocument);\n\n const cancelJob = async (id: string) => {\n const result = await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"cancelExportJob\",\n jobId: id,\n });\n throw new Error(\"Failed to cancel export job\");\n }\n emitExportEvent(exportContext, \"export.job.cancelled\", { jobId: id });\n return result.data.cancelExportJob;\n };\n\n return {\n cancelJob,\n mutate: cancelJob,\n mutateAsync: cancelJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to delete an export job\n */\nexport function useDeleteExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n DeleteExportJobMutation,\n DeleteExportJobMutationVariables\n >(DeleteExportJobDocument);\n\n const deleteJob = async (id: string): Promise<boolean> => {\n await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n emitExportEvent(exportContext, \"export.job.deleted\", { jobId: id });\n return true;\n };\n\n return {\n deleteJob,\n mutate: deleteJob,\n mutateAsync: deleteJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to retry a failed export job\n */\nexport function useRetryExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n RetryExportJobMutation,\n RetryExportJobMutationVariables\n >(RetryExportJobDocument);\n\n const retryJob = async (id: string): Promise<ExportJob> => {\n const result = await mutate({\n variables: { id, context: { workspaceId } },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"retryExportJob\",\n jobId: id,\n });\n throw new Error(\"Failed to retry export job\");\n }\n emitExportEvent(exportContext, \"export.job.retried\", {\n originalJobId: id,\n jobId: result.data.retryExportJob.id,\n });\n return mapJob(result.data.retryExportJob);\n };\n\n return {\n retryJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to create a new export template\n */\nexport function useCreateExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CreateExportTemplateMutation,\n CreateExportTemplateMutationVariables\n >(CreateExportTemplateDocument);\n\n const createTemplate = async (\n input: CreateExportTemplateInput,\n ): Promise<ExportTemplate> => {\n const gqlInput: GqlCreateExportTemplateInput = {\n ...input,\n format: toGqlFormat(input.format),\n };\n\n const result = await mutate({\n variables: {\n context: { workspaceId },\n input: gqlInput,\n },\n refetchQueries: [\n {\n query: ListExportTemplatesDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"createExportTemplate\",\n });\n throw new Error(\"Failed to create export template\");\n }\n emitExportEvent(exportContext, \"export.template.created\", {\n templateId: result.data.createExportTemplate.id,\n });\n return mapTemplate(result.data.createExportTemplate);\n };\n\n return {\n createTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to update an existing export template\n */\nexport function useUpdateExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n UpdateExportTemplateMutation,\n UpdateExportTemplateMutationVariables\n >(UpdateExportTemplateDocument);\n\n const updateTemplate = async (\n id: string,\n input: UpdateExportTemplateInput,\n ): Promise<Partial<ExportTemplate>> => {\n const gqlInput: GqlUpdateExportTemplateInput = {\n ...input,\n format: input.format ? toGqlFormat(input.format) : undefined,\n };\n\n const result = await mutate({\n variables: { id, input: gqlInput, context: { workspaceId } },\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"updateExportTemplate\",\n templateId: id,\n });\n throw new Error(\"Failed to update export template\");\n }\n emitExportEvent(exportContext, \"export.template.updated\", {\n templateId: id,\n });\n return mapTemplate(result.data.updateExportTemplate);\n };\n\n return {\n updateTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to delete an export template\n */\nexport function useDeleteExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n DeleteExportTemplateMutation,\n DeleteExportTemplateMutationVariables\n >(DeleteExportTemplateDocument);\n\n const deleteTemplate = async (id: string): Promise<boolean> => {\n await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportTemplatesDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n emitExportEvent(exportContext, \"export.template.deleted\", {\n templateId: id,\n });\n return true;\n };\n\n return {\n deleteTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n"],"mappings":";;;;;;AAqJA,SAAS,EAAe,GAA6C;AACnE,QAAO,KAAS,KAAA;;AAGlB,SAAS,EAAe,GAAsD;AAC5E,KAAI,KAAS,KAAM;CACnB,IAAM,IAAS,OAAO,KAAU,WAAW,IAAQ,OAAO,EAAM;AAChE,QAAO,OAAO,SAAS,EAAO,GAAG,IAAS,KAAA;;AAG5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,EAAO,KAAK,qBAAqB;;EAKpD;EACA,WAAW;EACX,OAAO,KAAS;EACjB;;AAkDH,SAAgB,IAA0B;CACxC,IAAM,IAAgB,GAAW,EAC3B,EAAE,mBAAgB,GAClB,CAAC,GAAQ,EAAE,YAAS,cAAW,EAGnC,EAA6B;AAqB/B,QAAO;EACL,gBApBqB,OAAO,OAC5B,MAAM,EAAO;GACX,WAAW;IACT;IACA,SAAS,EAAE,gBAAa;IACzB;GACD,gBAAgB,CACd;IACE,OAAO;IACP,WAAW,EAAE,SAAS,EAAE,gBAAa,EAAE;IACxC,CACF;GACF,CAAC,EACF,EAAgB,GAAe,2BAA2B,EACxD,YAAY,GACb,CAAC,EACK;EAKP;EACA,WAAW;EACX,OAAO,KAAS;EACjB"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Export Microfrontend
3
+ *
4
+ * Provides data export functionality for workspaces including
5
+ * job management, scheduling, templates, and multi-format output.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * import { ExportRoot, type ExportRootProps } from '@burdenoff/micro-fe/export';
10
+ *
11
+ * function App() {
12
+ * const props: ExportRootProps = {
13
+ * basePath: '/export',
14
+ * navigate: (path) => router.push(path),
15
+ * currentUser: { id: '1', email: 'user@example.com' },
16
+ * workspaceId: 'ws-123',
17
+ * apiGatewayUrl: 'https://api.example.com',
18
+ * authToken: 'token',
19
+ * };
20
+ *
21
+ * return <ExportRoot {...props} />;
22
+ * }
23
+ * ```
24
+ */
25
+ export { ExportRoot } from './ExportRoot';
26
+ export type { ExportRootProps, ExportJob, ExportPart, ExportTemplate, ExportAvailableEntity, ExportFilter, ExportView, } from './types';
27
+ export { useExport } from './providers/ExportProvider';
28
+ export { useExportStore } from './store/exportStore';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/export/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,eAAe,EACf,SAAS,EACT,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import "./providers/ExportProvider.js";
2
+ import "./store/exportStore.js";
3
+ import "./ExportRoot.js";
@@ -0,0 +1,2 @@
1
+ export declare function CreateExportPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=CreateExportPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateExportPage.d.ts","sourceRoot":"","sources":["../../../src/export/pages/CreateExportPage.tsx"],"names":[],"mappings":"AAuEA,wBAAgB,gBAAgB,4CAkrB/B"}