@burdenoff/microfe-export 2026.1107.2 → 2026.1113.1
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.
- package/dist/dev/main.d.ts +0 -2
- package/dist/export/ExportRoot.d.ts +0 -2
- package/dist/export/ExportRoot.js +50 -42
- package/dist/export/ExportRoot.js.map +1 -1
- package/dist/export/ExportRoutes.d.ts +8 -2
- package/dist/export/ExportRoutes.js +71 -53
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/components/ConfirmDestructiveDialog.d.ts +21 -0
- package/dist/export/components/ConfirmDestructiveDialog.js +37 -0
- package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -0
- package/dist/export/components/DownloadSections.d.ts +10 -0
- package/dist/export/components/DownloadSections.js +161 -0
- package/dist/export/components/DownloadSections.js.map +1 -0
- package/dist/export/components/DownloadStatus.d.ts +13 -0
- package/dist/export/components/DownloadStatus.js +36 -0
- package/dist/export/components/DownloadStatus.js.map +1 -0
- package/dist/export/components/DownloadsTabs.d.ts +5 -0
- package/dist/export/components/DownloadsTabs.js +25 -0
- package/dist/export/components/DownloadsTabs.js.map +1 -0
- package/dist/export/components/ExportProgressBar.d.ts +1 -2
- package/dist/export/components/ExportProgressBar.js +1 -2
- package/dist/export/components/ExportProgressBar.js.map +1 -1
- package/dist/export/components/ExportStatusBadge.d.ts +1 -3
- package/dist/export/components/ExportStatusBadge.js +7 -8
- package/dist/export/components/ExportStatusBadge.js.map +1 -1
- package/dist/export/components/PageLayout.d.ts +3 -5
- package/dist/export/components/PageLayout.js +1 -2
- package/dist/export/components/PageLayout.js.map +1 -1
- package/dist/export/constants/enums.d.ts +0 -2
- package/dist/export/constants/enums.js +1 -2
- package/dist/export/constants/enums.js.map +1 -1
- package/dist/export/constants/index.d.ts +0 -1
- package/dist/export/hooks/useEntityLabel.d.ts +7 -0
- package/dist/export/hooks/useEntityLabel.js +16 -0
- package/dist/export/hooks/useEntityLabel.js.map +1 -0
- package/dist/export/hooks/useExportQueries.d.ts +17 -32
- package/dist/export/hooks/useExportQueries.js +144 -145
- package/dist/export/hooks/useExportQueries.js.map +1 -1
- package/dist/export/hooks/useTr.d.ts +0 -2
- package/dist/export/hooks/useTr.js +1 -2
- package/dist/export/hooks/useTr.js.map +1 -1
- package/dist/export/index.d.ts +0 -1
- package/dist/export/index.js +5 -4
- package/dist/export/navigation-v2/NavigationV2.d.ts +7 -0
- package/dist/export/navigation-v2/NavigationV2.js +16 -0
- package/dist/export/navigation-v2/NavigationV2.js.map +1 -0
- package/dist/export/pages/CreateExportPage.d.ts +1 -2
- package/dist/export/pages/CreateExportPage.js +126 -125
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.d.ts +1 -2
- package/dist/export/pages/ExportDashboardPage.js +17 -18
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.d.ts +1 -2
- package/dist/export/pages/ExportDetailPage.js +133 -127
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.d.ts +1 -2
- package/dist/export/pages/ExportHistoryPage.js +74 -69
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportLandingPage.d.ts +1 -2
- package/dist/export/pages/ExportLandingPage.js +1 -2
- package/dist/export/pages/ExportLandingPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.d.ts +1 -2
- package/dist/export/pages/ExportTemplatesPage.js +219 -192
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.d.ts +1 -2
- package/dist/export/pages/TemplateDetailPage.js +146 -125
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/dist/export/pages/v2/DownloadDetailPage.d.ts +8 -0
- package/dist/export/pages/v2/DownloadDetailPage.js +176 -0
- package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -0
- package/dist/export/pages/v2/DownloadsPage.d.ts +10 -0
- package/dist/export/pages/v2/DownloadsPage.js +401 -0
- package/dist/export/pages/v2/DownloadsPage.js.map +1 -0
- package/dist/export/pages/v2/NewDownloadPage.d.ts +8 -0
- package/dist/export/pages/v2/NewDownloadPage.js +440 -0
- package/dist/export/pages/v2/NewDownloadPage.js.map +1 -0
- package/dist/export/providers/ExportProvider.d.ts +0 -2
- package/dist/export/providers/ExportProvider.js +12 -16
- package/dist/export/providers/ExportProvider.js.map +1 -1
- package/dist/export/store/exportStore.d.ts +0 -2
- package/dist/export/store/exportStore.js +1 -2
- package/dist/export/store/exportStore.js.map +1 -1
- package/dist/export/types/index.d.ts +7 -1
- package/dist/export/utils/billing.d.ts +6 -0
- package/dist/export/utils/billing.js +7 -0
- package/dist/export/utils/billing.js.map +1 -0
- package/dist/export/utils/cn.d.ts +0 -2
- package/dist/export/utils/cn.js +2 -3
- package/dist/export/utils/cn.js.map +1 -1
- package/dist/export/utils/disabledModules.d.ts +0 -1
- package/dist/export/utils/disabledModules.js +3 -4
- package/dist/export/utils/disabledModules.js.map +1 -1
- package/dist/export/utils/downloadStatus.d.ts +15 -0
- package/dist/export/utils/downloadStatus.js +48 -0
- package/dist/export/utils/downloadStatus.js.map +1 -0
- package/dist/export/utils/entityLabels.d.ts +47 -0
- package/dist/export/utils/entityLabels.js +150 -0
- package/dist/export/utils/entityLabels.js.map +1 -0
- package/dist/export/utils/events.d.ts +0 -2
- package/dist/export/utils/events.js +1 -2
- package/dist/export/utils/events.js.map +1 -1
- package/dist/export/utils/exportAuthority.d.ts +0 -2
- package/dist/export/utils/exportAuthority.js +1 -2
- package/dist/export/utils/exportAuthority.js.map +1 -1
- package/dist/export/utils/formatBytes.d.ts +2 -0
- package/dist/export/utils/formatBytes.js +15 -0
- package/dist/export/utils/formatBytes.js.map +1 -0
- package/dist/export/utils/i18n.d.ts +0 -2
- package/dist/export/utils/i18n.js +1 -2
- package/dist/export/utils/i18n.js.map +1 -1
- package/dist/export/utils/newDownloadForm.d.ts +32 -0
- package/dist/export/utils/newDownloadForm.js +42 -0
- package/dist/export/utils/newDownloadForm.js.map +1 -0
- package/dist/export/utils/paths.d.ts +2 -0
- package/dist/export/utils/paths.js +7 -0
- package/dist/export/utils/paths.js.map +1 -0
- package/dist/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/wspace-operations.d.ts +226 -181
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/generated/wspace-types.js +1 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
- package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
- package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js +15 -16
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/version.js +2 -3
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
- package/dist/node_modules/@wry/trie/lib/index.js +2 -3
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/client.js +76 -69
- package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.d.ts +0 -1
- package/dist/translations/en.js +1 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +63 -47
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/export/ExportRoot.d.ts.map +0 -1
- package/dist/export/ExportRoutes.d.ts.map +0 -1
- package/dist/export/components/ExportProgressBar.d.ts.map +0 -1
- package/dist/export/components/ExportStatusBadge.d.ts.map +0 -1
- package/dist/export/components/PageLayout.d.ts.map +0 -1
- package/dist/export/constants/enums.d.ts.map +0 -1
- package/dist/export/constants/index.d.ts.map +0 -1
- package/dist/export/hooks/useExportQueries.d.ts.map +0 -1
- package/dist/export/hooks/useTr.d.ts.map +0 -1
- package/dist/export/index.d.ts.map +0 -1
- package/dist/export/pages/CreateExportPage.d.ts.map +0 -1
- package/dist/export/pages/ExportDashboardPage.d.ts.map +0 -1
- package/dist/export/pages/ExportDetailPage.d.ts.map +0 -1
- package/dist/export/pages/ExportHistoryPage.d.ts.map +0 -1
- package/dist/export/pages/ExportLandingPage.d.ts.map +0 -1
- package/dist/export/pages/ExportTemplatesPage.d.ts.map +0 -1
- package/dist/export/pages/TemplateDetailPage.d.ts.map +0 -1
- package/dist/export/providers/ExportProvider.d.ts.map +0 -1
- package/dist/export/store/exportStore.d.ts.map +0 -1
- package/dist/export/types/index.d.ts.map +0 -1
- package/dist/export/utils/cn.d.ts.map +0 -1
- package/dist/export/utils/disabledModules.d.ts.map +0 -1
- package/dist/export/utils/events.d.ts.map +0 -1
- package/dist/export/utils/exportAuthority.d.ts.map +0 -1
- package/dist/export/utils/i18n.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GetAvailableExportEntitiesQuery, GetExportJobQuery, ListExportJobsQuery, ListExportTemplatesQuery } from '../../generated/wspace-operations';
|
|
2
2
|
import { ExportJobStatus as GqlExportJobStatus, ExportJobFilterInput as GqlExportJobFilterInput, ExportPaginationInput as GqlExportPaginationInput } from '../../generated/wspace-types';
|
|
3
3
|
import { ExportFormat, ExportJob, ExportJobStatus, ExportScope, ExportTemplate, ExportAvailableEntity, ExportFilter, PageInfo } from '../types';
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Input for creating an export job
|
|
7
6
|
*/
|
|
@@ -55,14 +54,11 @@ export declare function useExportJobs(filter?: Partial<ExportFilter>, pagination
|
|
|
55
54
|
pageInfo: PageInfo | null;
|
|
56
55
|
isLoading: boolean;
|
|
57
56
|
error: import('@apollo/client').ErrorLike | null;
|
|
58
|
-
refetch:
|
|
59
|
-
filter?:
|
|
60
|
-
pagination?:
|
|
57
|
+
refetch: import('@apollo/client/react/internal').RefetchFunction<ListExportJobsQuery, {
|
|
58
|
+
filter?: GqlExportJobFilterInput | null | undefined;
|
|
59
|
+
pagination?: GqlExportPaginationInput | null | undefined;
|
|
61
60
|
context: import('../../generated/wspace-types').ContextInput;
|
|
62
|
-
}
|
|
63
|
-
data: ListExportJobsQuery | undefined;
|
|
64
|
-
error?: import('@apollo/client').ErrorLike;
|
|
65
|
-
}>;
|
|
61
|
+
}, undefined>;
|
|
66
62
|
};
|
|
67
63
|
/**
|
|
68
64
|
* Hook to fetch a single export job by ID.
|
|
@@ -71,13 +67,10 @@ export declare function useExportJob(jobId: string | undefined): {
|
|
|
71
67
|
data: ExportJob | null;
|
|
72
68
|
isLoading: boolean;
|
|
73
69
|
error: import('@apollo/client').ErrorLike | null;
|
|
74
|
-
refetch:
|
|
75
|
-
context?: import('../../generated/wspace-types').
|
|
76
|
-
id:
|
|
77
|
-
}
|
|
78
|
-
data: GetExportJobQuery | undefined;
|
|
79
|
-
error?: import('@apollo/client').ErrorLike;
|
|
80
|
-
}>;
|
|
70
|
+
refetch: import('@apollo/client/react/internal').RefetchFunction<GetExportJobQuery, {
|
|
71
|
+
context?: import('../../generated/wspace-types').ContextInput | null | undefined;
|
|
72
|
+
id: string | number;
|
|
73
|
+
}, undefined>;
|
|
81
74
|
};
|
|
82
75
|
/**
|
|
83
76
|
* Hook to subscribe to live progress updates for an export job.
|
|
@@ -90,20 +83,19 @@ export declare function useExportJobProgress(jobId: string | undefined): {
|
|
|
90
83
|
/**
|
|
91
84
|
* Hook to fetch available entity types for export in a workspace
|
|
92
85
|
*/
|
|
93
|
-
export declare function useAvailableEntities(overrideWorkspaceId?: string
|
|
86
|
+
export declare function useAvailableEntities(overrideWorkspaceId?: string, options?: {
|
|
87
|
+
skip?: boolean;
|
|
88
|
+
}): {
|
|
94
89
|
data: ExportAvailableEntity[];
|
|
95
90
|
totalCount: number;
|
|
96
91
|
pageInfo: PageInfo | null;
|
|
97
92
|
loadMore: () => Promise<void>;
|
|
98
93
|
error: import('@apollo/client').ErrorLike | null;
|
|
99
94
|
isLoading: boolean;
|
|
100
|
-
refetch:
|
|
95
|
+
refetch: import('@apollo/client/react/internal').RefetchFunction<GetAvailableExportEntitiesQuery, {
|
|
101
96
|
context: import('../../generated/wspace-types').ContextInput;
|
|
102
|
-
pagination?:
|
|
103
|
-
}
|
|
104
|
-
data: GetAvailableExportEntitiesQuery | undefined;
|
|
105
|
-
error?: import('@apollo/client').ErrorLike;
|
|
106
|
-
}>;
|
|
97
|
+
pagination?: GqlExportPaginationInput | null | undefined;
|
|
98
|
+
}, undefined>;
|
|
107
99
|
};
|
|
108
100
|
/**
|
|
109
101
|
* Hook to fetch all export templates for the current workspace
|
|
@@ -115,13 +107,10 @@ export declare function useExportTemplates(overrideWorkspaceId?: string): {
|
|
|
115
107
|
loadMore: () => Promise<void>;
|
|
116
108
|
isLoading: boolean;
|
|
117
109
|
error: import('@apollo/client').ErrorLike | null;
|
|
118
|
-
refetch:
|
|
110
|
+
refetch: import('@apollo/client/react/internal').RefetchFunction<ListExportTemplatesQuery, {
|
|
119
111
|
context: import('../../generated/wspace-types').ContextInput;
|
|
120
|
-
pagination?:
|
|
121
|
-
}
|
|
122
|
-
data: ListExportTemplatesQuery | undefined;
|
|
123
|
-
error?: import('@apollo/client').ErrorLike;
|
|
124
|
-
}>;
|
|
112
|
+
pagination?: GqlExportPaginationInput | null | undefined;
|
|
113
|
+
}, undefined>;
|
|
125
114
|
};
|
|
126
115
|
/**
|
|
127
116
|
* Hook to fetch a single export template by ID
|
|
@@ -147,19 +136,16 @@ export declare function useCreateExportJob(): {
|
|
|
147
136
|
*/
|
|
148
137
|
export declare function useCancelExportJob(): {
|
|
149
138
|
cancelJob: (id: string) => Promise<{
|
|
150
|
-
__typename?: "ExportJob";
|
|
151
139
|
id: string;
|
|
152
140
|
status: GqlExportJobStatus;
|
|
153
141
|
updatedAt: string;
|
|
154
142
|
}>;
|
|
155
143
|
mutate: (id: string) => Promise<{
|
|
156
|
-
__typename?: "ExportJob";
|
|
157
144
|
id: string;
|
|
158
145
|
status: GqlExportJobStatus;
|
|
159
146
|
updatedAt: string;
|
|
160
147
|
}>;
|
|
161
148
|
mutateAsync: (id: string) => Promise<{
|
|
162
|
-
__typename?: "ExportJob";
|
|
163
149
|
id: string;
|
|
164
150
|
status: GqlExportJobStatus;
|
|
165
151
|
updatedAt: string;
|
|
@@ -208,4 +194,3 @@ export declare function useDeleteExportTemplate(): {
|
|
|
208
194
|
};
|
|
209
195
|
/** Organization scope is independent of workspace grants; this is a UX hint only. */
|
|
210
196
|
export declare function useOrganizationExportPermission(organizationId: string | undefined): boolean;
|
|
211
|
-
//# sourceMappingURL=useExportQueries.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CancelExportJobDocument as e, CreateExportJobDocument as t, CreateExportTemplateDocument as n, DeleteExportJobDocument as r, DeleteExportTemplateDocument as i, ExportJobProgressDocument as a, ExportOrganizationPermissionDocument 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";
|
|
2
|
+
import { ExportFormat as p, ExportJobStatus as m, ExportScope as h } from "../../generated/wspace-types.js";
|
|
3
|
+
import { useExport as g } from "../providers/ExportProvider.js";
|
|
4
4
|
import { emitExportEvent as _ } from "../utils/events.js";
|
|
5
5
|
import { useEffect as v, useRef as y } from "react";
|
|
6
6
|
import { useMutation as b, useQuery as x, useSubscription as S } from "@apollo/client/react";
|
|
7
|
-
|
|
7
|
+
// src/export/hooks/useExportQueries.ts
|
|
8
8
|
function C(e) {
|
|
9
9
|
return e ?? void 0;
|
|
10
10
|
}
|
|
@@ -101,43 +101,43 @@ function j(e) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
function M(e) {
|
|
104
|
-
if (e === "CSV") return
|
|
105
|
-
if (e === "JSON") return
|
|
104
|
+
if (e === "CSV") return p.Csv;
|
|
105
|
+
if (e === "JSON") return p.Json;
|
|
106
106
|
throw Error(`Unsupported export format: ${e}`);
|
|
107
107
|
}
|
|
108
108
|
function N(e) {
|
|
109
109
|
switch (e) {
|
|
110
|
-
case "CANCELLED": return
|
|
111
|
-
case "COMPLETED": return
|
|
112
|
-
case "CREATED": return
|
|
113
|
-
case "DELETED": return
|
|
114
|
-
case "EXPIRED": return
|
|
115
|
-
case "FAILED": return
|
|
116
|
-
case "QUEUED": return
|
|
117
|
-
case "RUNNING": return
|
|
110
|
+
case "CANCELLED": return m.Cancelled;
|
|
111
|
+
case "COMPLETED": return m.Completed;
|
|
112
|
+
case "CREATED": return m.Created;
|
|
113
|
+
case "DELETED": return m.Deleted;
|
|
114
|
+
case "EXPIRED": return m.Expired;
|
|
115
|
+
case "FAILED": return m.Failed;
|
|
116
|
+
case "QUEUED": return m.Queued;
|
|
117
|
+
case "RUNNING": return m.Running;
|
|
118
118
|
default: throw Error(`Unsupported export status: ${e}`);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function P(e) {
|
|
122
122
|
switch (e) {
|
|
123
|
-
case "INDIVIDUAL": return
|
|
124
|
-
case "WORKSPACE_ADMIN": return
|
|
125
|
-
case "ORG_ADMIN": return
|
|
123
|
+
case "INDIVIDUAL": return h.Individual;
|
|
124
|
+
case "WORKSPACE_ADMIN": return h.WorkspaceAdmin;
|
|
125
|
+
case "ORG_ADMIN": return h.OrgAdmin;
|
|
126
126
|
default: throw Error(`Unsupported export scope: ${e}`);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
function F(
|
|
130
|
-
let { workspaceId:
|
|
129
|
+
function F(e, t) {
|
|
130
|
+
let { workspaceId: n } = g(), r = e && n ? {
|
|
131
|
+
status: e.status && e.status !== "all" ? [N(e.status)] : void 0,
|
|
132
|
+
format: e.format && e.format !== "all" ? M(e.format) : void 0,
|
|
133
|
+
search: e.search ?? void 0
|
|
134
|
+
} : void 0, { data: i, loading: a, error: o, refetch: s } = x(u, {
|
|
131
135
|
variables: {
|
|
132
|
-
filter:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
search: t.search ?? void 0
|
|
136
|
-
} : void 0,
|
|
137
|
-
pagination: n,
|
|
138
|
-
context: { workspaceId: r }
|
|
136
|
+
filter: r,
|
|
137
|
+
pagination: t,
|
|
138
|
+
context: { workspaceId: n }
|
|
139
139
|
},
|
|
140
|
-
skip: !
|
|
140
|
+
skip: !n
|
|
141
141
|
});
|
|
142
142
|
return {
|
|
143
143
|
data: i?.listExportJobs.edges.map((e) => k(e.node)) ?? [],
|
|
@@ -148,23 +148,23 @@ function F(t, n) {
|
|
|
148
148
|
refetch: s
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
function I(
|
|
152
|
-
let { workspaceId:
|
|
151
|
+
function I(e) {
|
|
152
|
+
let { workspaceId: t } = g(), { data: n, loading: r, error: i, refetch: a } = x(c, {
|
|
153
153
|
variables: {
|
|
154
|
-
id:
|
|
155
|
-
context: { workspaceId:
|
|
154
|
+
id: e ?? "",
|
|
155
|
+
context: { workspaceId: t }
|
|
156
156
|
},
|
|
157
|
-
skip: !
|
|
157
|
+
skip: !e || !t
|
|
158
158
|
});
|
|
159
159
|
return {
|
|
160
|
-
data:
|
|
161
|
-
isLoading:
|
|
162
|
-
error:
|
|
163
|
-
refetch:
|
|
160
|
+
data: n?.getExportJob ? k(n.getExportJob) : null,
|
|
161
|
+
isLoading: r,
|
|
162
|
+
error: i ?? null,
|
|
163
|
+
refetch: a
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
function L(e) {
|
|
167
|
-
let { data: t, loading: n, error: r } = S(
|
|
167
|
+
let { data: t, loading: n, error: r } = S(a, {
|
|
168
168
|
variables: { jobId: e ?? "" },
|
|
169
169
|
skip: !e
|
|
170
170
|
});
|
|
@@ -180,15 +180,15 @@ function R(e, { fetchMoreResult: t }) {
|
|
|
180
180
|
edges: [...e.getAvailableExportEntities.edges, ...t.getAvailableExportEntities.edges]
|
|
181
181
|
} } : e;
|
|
182
182
|
}
|
|
183
|
-
function z(t) {
|
|
184
|
-
let { workspaceId: n } =
|
|
183
|
+
function z(e, t = {}) {
|
|
184
|
+
let { workspaceId: n } = g(), r = t.skip ? void 0 : e ?? n, { data: i, loading: a, error: o, refetch: c, fetchMore: l } = x(s, {
|
|
185
185
|
variables: {
|
|
186
186
|
context: { workspaceId: r },
|
|
187
187
|
pagination: { first: 100 }
|
|
188
188
|
},
|
|
189
189
|
skip: !r
|
|
190
190
|
}), u = i?.getAvailableExportEntities, d = u?.edges.map((e) => j(e.node)) ?? [], f = async () => {
|
|
191
|
-
|
|
191
|
+
r && u?.pageInfo.hasNextPage && await l({
|
|
192
192
|
variables: {
|
|
193
193
|
context: { workspaceId: r },
|
|
194
194
|
pagination: {
|
|
@@ -200,7 +200,7 @@ function z(t) {
|
|
|
200
200
|
});
|
|
201
201
|
}, p = u?.pageInfo.hasNextPage ?? !1, m = u?.pageInfo.endCursor ?? null, h = y(null);
|
|
202
202
|
return v(() => {
|
|
203
|
-
a
|
|
203
|
+
!a && r && p && m && h.current !== m && (h.current = m, l({
|
|
204
204
|
variables: {
|
|
205
205
|
context: { workspaceId: r },
|
|
206
206
|
pagination: {
|
|
@@ -223,28 +223,28 @@ function z(t) {
|
|
|
223
223
|
loadMore: f,
|
|
224
224
|
error: o ?? null,
|
|
225
225
|
isLoading: a,
|
|
226
|
-
refetch:
|
|
226
|
+
refetch: c
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
function B(
|
|
230
|
-
let { workspaceId:
|
|
229
|
+
function B(e) {
|
|
230
|
+
let { workspaceId: t } = g(), n = e ?? t, { data: r, loading: i, error: a, refetch: o, fetchMore: s } = x(d, {
|
|
231
231
|
variables: {
|
|
232
|
-
context: { workspaceId:
|
|
232
|
+
context: { workspaceId: n },
|
|
233
233
|
pagination: { first: 50 }
|
|
234
234
|
},
|
|
235
|
-
skip: !
|
|
236
|
-
}),
|
|
235
|
+
skip: !n
|
|
236
|
+
}), c = r?.listExportTemplates;
|
|
237
237
|
return {
|
|
238
|
-
data:
|
|
239
|
-
totalCount:
|
|
240
|
-
pageInfo:
|
|
238
|
+
data: c?.edges.map((e) => A(e.node)) ?? [],
|
|
239
|
+
totalCount: c?.totalCount ?? 0,
|
|
240
|
+
pageInfo: c?.pageInfo ? D(c.pageInfo) : null,
|
|
241
241
|
loadMore: async () => {
|
|
242
|
-
|
|
242
|
+
n && c?.pageInfo.hasNextPage && await s({
|
|
243
243
|
variables: {
|
|
244
|
-
context: { workspaceId:
|
|
244
|
+
context: { workspaceId: n },
|
|
245
245
|
pagination: {
|
|
246
246
|
first: 50,
|
|
247
|
-
after:
|
|
247
|
+
after: c.pageInfo.endCursor
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
250
|
updateQuery: (e, { fetchMoreResult: t }) => t ? { listExportTemplates: {
|
|
@@ -253,181 +253,180 @@ function B(t) {
|
|
|
253
253
|
} } : e
|
|
254
254
|
});
|
|
255
255
|
},
|
|
256
|
-
isLoading:
|
|
257
|
-
error:
|
|
258
|
-
refetch:
|
|
256
|
+
isLoading: i,
|
|
257
|
+
error: a ?? null,
|
|
258
|
+
refetch: o
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
function V(
|
|
262
|
-
let { workspaceId:
|
|
261
|
+
function V(e) {
|
|
262
|
+
let { workspaceId: t } = g(), { data: n, loading: r, error: i } = x(l, {
|
|
263
263
|
variables: {
|
|
264
|
-
id:
|
|
265
|
-
context: { workspaceId:
|
|
264
|
+
id: e ?? "",
|
|
265
|
+
context: { workspaceId: t }
|
|
266
266
|
},
|
|
267
|
-
skip: !
|
|
267
|
+
skip: !e || !t
|
|
268
268
|
});
|
|
269
269
|
return {
|
|
270
|
-
data:
|
|
271
|
-
isLoading:
|
|
272
|
-
error:
|
|
270
|
+
data: n?.getExportTemplate ? A(n.getExportTemplate) : null,
|
|
271
|
+
isLoading: r,
|
|
272
|
+
error: i ?? null
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
function H() {
|
|
276
|
-
let
|
|
277
|
-
let { filters:
|
|
276
|
+
let e = g(), { workspaceId: n } = e, [r, { loading: i, error: a }] = b(t), o = async (t) => {
|
|
277
|
+
let { filters: i, ...a } = t, o = {
|
|
278
278
|
...a,
|
|
279
279
|
exportScope: a.exportScope ? P(a.exportScope) : void 0,
|
|
280
280
|
format: M(a.format),
|
|
281
|
-
entityFilters:
|
|
282
|
-
}, s = await
|
|
281
|
+
entityFilters: i
|
|
282
|
+
}, s = await r({
|
|
283
283
|
variables: {
|
|
284
|
-
context: { workspaceId:
|
|
284
|
+
context: { workspaceId: n },
|
|
285
285
|
input: o
|
|
286
286
|
},
|
|
287
287
|
refetchQueries: [{
|
|
288
|
-
query:
|
|
289
|
-
variables: { context: { workspaceId:
|
|
288
|
+
query: u,
|
|
289
|
+
variables: { context: { workspaceId: n } }
|
|
290
290
|
}]
|
|
291
291
|
});
|
|
292
|
-
if (!s.data) throw _(
|
|
293
|
-
return _(
|
|
292
|
+
if (!s.data) throw _(e, "export.api.failed", { operation: "createExportJob" }), Error("Failed to create export job");
|
|
293
|
+
return _(e, "export.job.created", { jobId: s.data.createExportJob.id }), k(s.data.createExportJob);
|
|
294
294
|
};
|
|
295
295
|
return {
|
|
296
|
-
createJob:
|
|
297
|
-
mutate:
|
|
298
|
-
mutateAsync:
|
|
299
|
-
loading:
|
|
300
|
-
isPending:
|
|
301
|
-
error:
|
|
296
|
+
createJob: o,
|
|
297
|
+
mutate: o,
|
|
298
|
+
mutateAsync: o,
|
|
299
|
+
loading: i,
|
|
300
|
+
isPending: i,
|
|
301
|
+
error: a ?? null
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
function U() {
|
|
305
|
-
let
|
|
306
|
-
let
|
|
305
|
+
let t = g(), { workspaceId: n } = t, [r, { loading: i, error: a }] = b(e), o = async (e) => {
|
|
306
|
+
let i = await r({
|
|
307
307
|
variables: {
|
|
308
308
|
id: e,
|
|
309
|
-
context: { workspaceId:
|
|
309
|
+
context: { workspaceId: n }
|
|
310
310
|
},
|
|
311
311
|
refetchQueries: [{
|
|
312
|
-
query:
|
|
313
|
-
variables: { context: { workspaceId:
|
|
312
|
+
query: u,
|
|
313
|
+
variables: { context: { workspaceId: n } }
|
|
314
314
|
}]
|
|
315
315
|
});
|
|
316
|
-
if (!
|
|
316
|
+
if (!i.data) throw _(t, "export.api.failed", {
|
|
317
317
|
operation: "cancelExportJob",
|
|
318
318
|
jobId: e
|
|
319
319
|
}), Error("Failed to cancel export job");
|
|
320
|
-
return _(
|
|
320
|
+
return _(t, "export.job.cancelled", { jobId: e }), i.data.cancelExportJob;
|
|
321
321
|
};
|
|
322
322
|
return {
|
|
323
|
-
cancelJob:
|
|
324
|
-
mutate:
|
|
325
|
-
mutateAsync:
|
|
326
|
-
loading:
|
|
327
|
-
isPending:
|
|
328
|
-
error:
|
|
323
|
+
cancelJob: o,
|
|
324
|
+
mutate: o,
|
|
325
|
+
mutateAsync: o,
|
|
326
|
+
loading: i,
|
|
327
|
+
isPending: i,
|
|
328
|
+
error: a ?? null
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
function W() {
|
|
332
|
-
let
|
|
332
|
+
let e = g(), { workspaceId: t } = e, [n, { loading: i, error: a }] = b(r), o = async (r) => (await n({
|
|
333
333
|
variables: {
|
|
334
|
-
id:
|
|
335
|
-
context: { workspaceId:
|
|
334
|
+
id: r,
|
|
335
|
+
context: { workspaceId: t }
|
|
336
336
|
},
|
|
337
337
|
refetchQueries: [{
|
|
338
|
-
query:
|
|
339
|
-
variables: { context: { workspaceId:
|
|
338
|
+
query: u,
|
|
339
|
+
variables: { context: { workspaceId: t } }
|
|
340
340
|
}]
|
|
341
|
-
}), _(
|
|
341
|
+
}), _(e, "export.job.deleted", { jobId: r }), !0);
|
|
342
342
|
return {
|
|
343
|
-
deleteJob:
|
|
344
|
-
mutate:
|
|
345
|
-
mutateAsync:
|
|
346
|
-
loading:
|
|
347
|
-
isPending:
|
|
348
|
-
error:
|
|
343
|
+
deleteJob: o,
|
|
344
|
+
mutate: o,
|
|
345
|
+
mutateAsync: o,
|
|
346
|
+
loading: i,
|
|
347
|
+
isPending: i,
|
|
348
|
+
error: a ?? null
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
function G() {
|
|
352
|
-
let
|
|
352
|
+
let e = g(), { workspaceId: t } = e, [n, { loading: r, error: i }] = b(f);
|
|
353
353
|
return {
|
|
354
|
-
retryJob: async (
|
|
355
|
-
let i = await
|
|
354
|
+
retryJob: async (r) => {
|
|
355
|
+
let i = await n({
|
|
356
356
|
variables: {
|
|
357
|
-
id:
|
|
358
|
-
context: { workspaceId:
|
|
357
|
+
id: r,
|
|
358
|
+
context: { workspaceId: t }
|
|
359
359
|
},
|
|
360
360
|
refetchQueries: [{
|
|
361
|
-
query:
|
|
362
|
-
variables: { context: { workspaceId:
|
|
361
|
+
query: u,
|
|
362
|
+
variables: { context: { workspaceId: t } }
|
|
363
363
|
}]
|
|
364
364
|
});
|
|
365
|
-
if (!i.data) throw _(
|
|
365
|
+
if (!i.data) throw _(e, "export.api.failed", {
|
|
366
366
|
operation: "retryExportJob",
|
|
367
|
-
jobId:
|
|
367
|
+
jobId: r
|
|
368
368
|
}), Error("Failed to retry export job");
|
|
369
|
-
return _(
|
|
370
|
-
originalJobId:
|
|
369
|
+
return _(e, "export.job.retried", {
|
|
370
|
+
originalJobId: r,
|
|
371
371
|
jobId: i.data.retryExportJob.id
|
|
372
372
|
}), k(i.data.retryExportJob);
|
|
373
373
|
},
|
|
374
|
-
loading:
|
|
375
|
-
isPending:
|
|
376
|
-
error:
|
|
374
|
+
loading: r,
|
|
375
|
+
isPending: r,
|
|
376
|
+
error: i ?? null
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
379
|
function K() {
|
|
380
|
-
let
|
|
380
|
+
let e = g(), { workspaceId: t } = e, [r, { loading: i, error: a }] = b(n);
|
|
381
381
|
return {
|
|
382
|
-
createTemplate: async (
|
|
383
|
-
let
|
|
384
|
-
...
|
|
385
|
-
format: M(
|
|
386
|
-
}, a = await
|
|
382
|
+
createTemplate: async (n) => {
|
|
383
|
+
let i = {
|
|
384
|
+
...n,
|
|
385
|
+
format: M(n.format)
|
|
386
|
+
}, a = await r({
|
|
387
387
|
variables: {
|
|
388
|
-
context: { workspaceId:
|
|
389
|
-
input:
|
|
388
|
+
context: { workspaceId: t },
|
|
389
|
+
input: i
|
|
390
390
|
},
|
|
391
391
|
refetchQueries: [{
|
|
392
|
-
query:
|
|
393
|
-
variables: { context: { workspaceId:
|
|
392
|
+
query: d,
|
|
393
|
+
variables: { context: { workspaceId: t } }
|
|
394
394
|
}]
|
|
395
395
|
});
|
|
396
|
-
if (!a.data) throw _(
|
|
397
|
-
return _(
|
|
396
|
+
if (!a.data) throw _(e, "export.api.failed", { operation: "createExportTemplate" }), Error("Failed to create export template");
|
|
397
|
+
return _(e, "export.template.created", { templateId: a.data.createExportTemplate.id }), A(a.data.createExportTemplate);
|
|
398
398
|
},
|
|
399
|
-
loading:
|
|
400
|
-
isPending:
|
|
401
|
-
error:
|
|
399
|
+
loading: i,
|
|
400
|
+
isPending: i,
|
|
401
|
+
error: a ?? null
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
404
|
function q() {
|
|
405
|
-
let
|
|
405
|
+
let e = g(), { workspaceId: t } = e, [n, { loading: r, error: a }] = b(i);
|
|
406
406
|
return {
|
|
407
|
-
deleteTemplate: async (
|
|
407
|
+
deleteTemplate: async (r) => (await n({
|
|
408
408
|
variables: {
|
|
409
|
-
id:
|
|
410
|
-
context: { workspaceId:
|
|
409
|
+
id: r,
|
|
410
|
+
context: { workspaceId: t }
|
|
411
411
|
},
|
|
412
412
|
refetchQueries: [{
|
|
413
|
-
query:
|
|
414
|
-
variables: { context: { workspaceId:
|
|
413
|
+
query: d,
|
|
414
|
+
variables: { context: { workspaceId: t } }
|
|
415
415
|
}]
|
|
416
|
-
}), _(
|
|
417
|
-
loading:
|
|
418
|
-
isPending:
|
|
419
|
-
error:
|
|
416
|
+
}), _(e, "export.template.deleted", { templateId: r }), !0),
|
|
417
|
+
loading: r,
|
|
418
|
+
isPending: r,
|
|
419
|
+
error: a ?? null
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
422
|
function J(e) {
|
|
423
|
-
let { data: t, loading: n, error: r } = x(
|
|
423
|
+
let { data: t, loading: n, error: r } = x(o, {
|
|
424
424
|
variables: { scopeId: e ?? "" },
|
|
425
425
|
skip: !e,
|
|
426
426
|
fetchPolicy: "network-only"
|
|
427
427
|
});
|
|
428
428
|
return !!e && !!t && !n && !r && t?.myPermissions.scopeId === e && t.myPermissions.permissions.some((e) => e.resourceType === "export" && e.allowedActions.includes("organization_admin"));
|
|
429
429
|
}
|
|
430
|
-
//#endregion
|
|
431
430
|
export { z as useAvailableEntities, U as useCancelExportJob, H as useCreateExportJob, K as useCreateExportTemplate, W as useDeleteExportJob, q as useDeleteExportTemplate, I as useExportJob, L as useExportJobProgress, F as useExportJobs, V as useExportTemplate, B as useExportTemplates, J as useOrganizationExportPermission, G as useRetryExportJob };
|
|
432
431
|
|
|
433
432
|
//# sourceMappingURL=useExportQueries.js.map
|