@genispace/geniapp 0.1.0
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/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/CrossAppRecordPicker-BXchXcK5.js +624 -0
- package/dist/CrossAppRecordPicker-BXchXcK5.js.map +1 -0
- package/dist/Page-wHZrMN17.js +24 -0
- package/dist/Page-wHZrMN17.js.map +1 -0
- package/dist/ai/adopt/AiSuggestionPanel.d.ts +30 -0
- package/dist/ai/adopt/BusinessGuidancePanel.d.ts +31 -0
- package/dist/ai/adopt/DetailPageAiLayout.d.ts +7 -0
- package/dist/ai/adopt/adoptPresets.d.ts +11 -0
- package/dist/ai/adopt/guidanceContent.d.ts +27 -0
- package/dist/ai/adopt/parseAiSummary.d.ts +7 -0
- package/dist/ai/components/AgentJobProgress.d.ts +124 -0
- package/dist/ai/components/AsyncCombobox.d.ts +44 -0
- package/dist/ai/components/BulkActionBar.d.ts +44 -0
- package/dist/ai/components/EntityRef.d.ts +39 -0
- package/dist/ai/components/JobProgress.d.ts +64 -0
- package/dist/ai/components/ServerDataTable.d.ts +89 -0
- package/dist/ai/components/Timeline.d.ts +35 -0
- package/dist/ai/components/useInfiniteRows.d.ts +25 -0
- package/dist/ai/errors/userFacingError.d.ts +14 -0
- package/dist/ai/errors/userFacingError.js +48 -0
- package/dist/ai/errors/userFacingError.js.map +1 -0
- package/dist/ai/index.d.ts +34 -0
- package/dist/ai/integrations/partner/createPartnerRecordPickerHook.d.ts +15 -0
- package/dist/ai/integrations/partner/partnerRecordPicker.d.ts +20 -0
- package/dist/ai/layout/ModalWithAiLayout.d.ts +11 -0
- package/dist/ai/layout/aiUi.d.ts +16 -0
- package/dist/ai/layout/layoutConstants.d.ts +19 -0
- package/dist/ai/layout/modalSizeForAi.d.ts +5 -0
- package/dist/ai/locales/sharedAiCopy.d.ts +6 -0
- package/dist/ai/managed-data/DatasourceReadonlyTable.d.ts +11 -0
- package/dist/ai/managed-data/createTableClient.d.ts +7 -0
- package/dist/ai/managed-data/emitManagedEvent.d.ts +18 -0
- package/dist/ai/managed-data/executeManagedDatasource.d.ts +21 -0
- package/dist/ai/managed-data/queryManagedDatasource.d.ts +28 -0
- package/dist/ai/providers/AppUiProviders.d.ts +6 -0
- package/dist/ai/types/app-ai.types.d.ts +29 -0
- package/dist/ai/types/index.d.ts +1 -0
- package/dist/ai.d.ts +1 -0
- package/dist/ai.js +1817 -0
- package/dist/ai.js.map +1 -0
- package/dist/case-workspace/domain.d.ts +41 -0
- package/dist/case-workspace/domain.js +24 -0
- package/dist/case-workspace/domain.js.map +1 -0
- package/dist/case-workspace/index.d.ts +91 -0
- package/dist/case-workspace.d.ts +1 -0
- package/dist/case-workspace.js +392 -0
- package/dist/case-workspace.js.map +1 -0
- package/dist/cn-B6yFEsav.js +9 -0
- package/dist/cn-B6yFEsav.js.map +1 -0
- package/dist/components/ui/calendar.css +7 -0
- package/dist/cookieSettings-D_v3KS02.js +97 -0
- package/dist/cookieSettings-D_v3KS02.js.map +1 -0
- package/dist/dashboard/index.d.ts +16 -0
- package/dist/dashboard/src/ChartFrame.d.ts +18 -0
- package/dist/dashboard/src/ChartTooltip.d.ts +38 -0
- package/dist/dashboard/src/FilterBar.d.ts +23 -0
- package/dist/dashboard/src/KpiStatCard.d.ts +29 -0
- package/dist/dashboard/src/StatGrid.d.ts +15 -0
- package/dist/dashboard/src/TimeRangePicker.d.ts +14 -0
- package/dist/dashboard/src/chart.d.ts +10 -0
- package/dist/dashboard/src/format.d.ts +16 -0
- package/dist/dashboard/src/links.d.ts +2 -0
- package/dist/dashboard/src/useDashboardRange.d.ts +27 -0
- package/dist/dashboard.d.ts +1 -0
- package/dist/dashboard.js +361 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/fonts.css +15 -0
- package/dist/hooks/access/AppAccessGate.d.ts +20 -0
- package/dist/hooks/access/AppAccessNotice.d.ts +8 -0
- package/dist/hooks/access/useAppAccess.d.ts +26 -0
- package/dist/hooks/config/businessLocale.d.ts +12 -0
- package/dist/hooks/config/currencies.d.ts +9 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/picker/CrossAppRecordPicker.d.ts +37 -0
- package/dist/hooks/picker/managedAppPicker.d.ts +21 -0
- package/dist/hooks/picker/partnerPayload.d.ts +6 -0
- package/dist/hooks/routing/draftEntityId.d.ts +5 -0
- package/dist/hooks/routing/useRefetchOnRouteMatch.d.ts +6 -0
- package/dist/hooks/shell/resolveApiRoot.d.ts +13 -0
- package/dist/hooks/shell/shell.d.ts +4 -0
- package/dist/hooks/shell/useGenispacePlatformClient.d.ts +7 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +42 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/kit.d.ts +50 -0
- package/dist/kit.js +2067 -0
- package/dist/kit.js.map +1 -0
- package/dist/page.d.ts +1 -0
- package/dist/page.js +5 -0
- package/dist/page.js.map +1 -0
- package/dist/shell-DIHnXIUb.js +6 -0
- package/dist/shell-DIHnXIUb.js.map +1 -0
- package/dist/shell.d.ts +30 -0
- package/dist/shell.js +104 -0
- package/dist/shell.js.map +1 -0
- package/dist/storage/assetPreview.d.ts +12 -0
- package/dist/storage/components/AssetThumbnail.d.ts +15 -0
- package/dist/storage/components/CopyStorageLinkButton.d.ts +13 -0
- package/dist/storage/components/StorageImage.d.ts +9 -0
- package/dist/storage/components/StoragePreviewContent.d.ts +22 -0
- package/dist/storage/components/StorageVideo.d.ts +9 -0
- package/dist/storage/copyTextToClipboard.d.ts +5 -0
- package/dist/storage/hooks/useAuthenticatedStorageBlobs.d.ts +3 -0
- package/dist/storage/hooks/useImageThumbnailBlobs.d.ts +4 -0
- package/dist/storage/hooks/useShareableStorageLink.d.ts +7 -0
- package/dist/storage/index.d.ts +12 -0
- package/dist/storage/openUrlInNewTab.d.ts +6 -0
- package/dist/storage/platformStorage.d.ts +43 -0
- package/dist/storage.d.ts +1 -0
- package/dist/storage.js +605 -0
- package/dist/storage.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/styles/base.css +616 -0
- package/dist/styles/reduced-motion.css +14 -0
- package/dist/styles/tailwind-preset.js +269 -0
- package/dist/task-workspace/domain.d.ts +35 -0
- package/dist/task-workspace/domain.js +45 -0
- package/dist/task-workspace/domain.js.map +1 -0
- package/dist/task-workspace/experience.d.ts +50 -0
- package/dist/task-workspace/index.d.ts +172 -0
- package/dist/task-workspace.d.ts +1 -0
- package/dist/task-workspace.js +626 -0
- package/dist/task-workspace.js.map +1 -0
- package/dist/ui/components/features/app/AppCheckboxInput.d.ts +9 -0
- package/dist/ui/components/features/app/AppConfirmDialog.d.ts +12 -0
- package/dist/ui/components/features/app/AppDashboardSkeleton.d.ts +9 -0
- package/dist/ui/components/features/app/AppDatePicker.d.ts +69 -0
- package/dist/ui/components/features/app/AppModal.d.ts +27 -0
- package/dist/ui/components/features/app/AppPageStates.d.ts +17 -0
- package/dist/ui/components/features/app/AppSelectInput.d.ts +10 -0
- package/dist/ui/components/features/app/AppTemporalInput.d.ts +19 -0
- package/dist/ui/components/features/app/Page.d.ts +14 -0
- package/dist/ui/components/features/app/QueryErrorAlert.d.ts +7 -0
- package/dist/ui/components/features/app/Sidebar.d.ts +47 -0
- package/dist/ui/components/features/app/index.d.ts +17 -0
- package/dist/ui/components/features/user/UserAvatar.d.ts +17 -0
- package/dist/ui/components/features/user/UserDisplay.d.ts +10 -0
- package/dist/ui/components/features/user/UserSelect.d.ts +14 -0
- package/dist/ui/components/features/user/useUserDirectory.d.ts +13 -0
- package/dist/ui/components/features/user/userDirectoryTypes.d.ts +18 -0
- package/dist/ui/components/patterns/form-section.d.ts +11 -0
- package/dist/ui/components/primitives/feedback/index.d.ts +2 -0
- package/dist/ui/components/primitives/feedback/toaster.d.ts +1 -0
- package/dist/ui/components/primitives/feedback/use-toast.d.ts +46 -0
- package/dist/ui/components/primitives/page-skeleton/ChartAreaSkeleton.d.ts +13 -0
- package/dist/ui/components/primitives/page-skeleton/ChartEmptyState.d.ts +14 -0
- package/dist/ui/components/primitives/page-skeleton/ComponentSkeletonShell.d.ts +16 -0
- package/dist/ui/components/primitives/page-skeleton/ConfigEditorSkeleton.d.ts +5 -0
- package/dist/ui/components/primitives/page-skeleton/DetailTabsSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/EmptyStateBadge.d.ts +13 -0
- package/dist/ui/components/primitives/page-skeleton/FormCardSkeleton.d.ts +7 -0
- package/dist/ui/components/primitives/page-skeleton/FormFieldSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/FormPageSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/GridCardsSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/ListSkeleton.d.ts +26 -0
- package/dist/ui/components/primitives/page-skeleton/PageHeaderSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/SplitPaneSkeleton.d.ts +4 -0
- package/dist/ui/components/primitives/page-skeleton/StatsRowSkeleton.d.ts +5 -0
- package/dist/ui/components/primitives/page-skeleton/TableEmptyState.d.ts +27 -0
- package/dist/ui/components/primitives/page-skeleton/TablePageSkeleton.d.ts +8 -0
- package/dist/ui/components/primitives/page-skeleton/TabsBarSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/index.d.ts +24 -0
- package/dist/ui/components/primitives/page-skeleton/skeletonMetrics.d.ts +9 -0
- package/dist/ui/components/primitives/page-skeleton/useVisibleCenter.d.ts +34 -0
- package/dist/ui/components/ui/accordion.d.ts +7 -0
- package/dist/ui/components/ui/ai-draft-banner.d.ts +21 -0
- package/dist/ui/components/ui/alert-dialog.d.ts +48 -0
- package/dist/ui/components/ui/alert.d.ts +8 -0
- package/dist/ui/components/ui/avatar.d.ts +6 -0
- package/dist/ui/components/ui/badge.d.ts +9 -0
- package/dist/ui/components/ui/breadcrumb.d.ts +19 -0
- package/dist/ui/components/ui/button.d.ts +11 -0
- package/dist/ui/components/ui/calendar.d.ts +8 -0
- package/dist/ui/components/ui/card.d.ts +8 -0
- package/dist/ui/components/ui/chart.d.ts +16 -0
- package/dist/ui/components/ui/checkbox.d.ts +4 -0
- package/dist/ui/components/ui/collapsible.d.ts +5 -0
- package/dist/ui/components/ui/column-config.d.ts +42 -0
- package/dist/ui/components/ui/date-picker.d.ts +9 -0
- package/dist/ui/components/ui/date-range-filter.d.ts +32 -0
- package/dist/ui/components/ui/date-range-picker.d.ts +11 -0
- package/dist/ui/components/ui/dialog-input.d.ts +17 -0
- package/dist/ui/components/ui/dialog-safe-select.d.ts +13 -0
- package/dist/ui/components/ui/dialog.d.ts +25 -0
- package/dist/ui/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/ui/components/ui/feature-guide.d.ts +43 -0
- package/dist/ui/components/ui/form.d.ts +25 -0
- package/dist/ui/components/ui/help-tip.d.ts +29 -0
- package/dist/ui/components/ui/hint-notice.d.ts +22 -0
- package/dist/ui/components/ui/index.d.ts +6 -0
- package/dist/ui/components/ui/input.d.ts +3 -0
- package/dist/ui/components/ui/label.d.ts +5 -0
- package/dist/ui/components/ui/modal-container.d.ts +56 -0
- package/dist/ui/components/ui/modal-templates.d.ts +46 -0
- package/dist/ui/components/ui/multi-select.d.ts +20 -0
- package/dist/ui/components/ui/pagination.d.ts +28 -0
- package/dist/ui/components/ui/popover.d.ts +7 -0
- package/dist/ui/components/ui/progress.d.ts +7 -0
- package/dist/ui/components/ui/radio-button-group.d.ts +18 -0
- package/dist/ui/components/ui/radio-group.d.ts +5 -0
- package/dist/ui/components/ui/scroll-area.d.ts +5 -0
- package/dist/ui/components/ui/select.d.ts +16 -0
- package/dist/ui/components/ui/separator.d.ts +7 -0
- package/dist/ui/components/ui/sheet.d.ts +25 -0
- package/dist/ui/components/ui/sidebar-rail.d.ts +9 -0
- package/dist/ui/components/ui/skeleton.d.ts +2 -0
- package/dist/ui/components/ui/slider.d.ts +13 -0
- package/dist/ui/components/ui/switch.d.ts +4 -0
- package/dist/ui/components/ui/table.d.ts +10 -0
- package/dist/ui/components/ui/tabs.d.ts +10 -0
- package/dist/ui/components/ui/textarea.d.ts +3 -0
- package/dist/ui/components/ui/toast.d.ts +21 -0
- package/dist/ui/components/ui/toggle-group.d.ts +12 -0
- package/dist/ui/components/ui/toggle.d.ts +12 -0
- package/dist/ui/components/ui/tooltip.d.ts +7 -0
- package/dist/ui/components/ui/typography.d.ts +15 -0
- package/dist/ui/components/ui/underline-tabs.d.ts +13 -0
- package/dist/ui/components/ui/view-mode-toggle.d.ts +9 -0
- package/dist/ui/hooks/useIsMobile.d.ts +16 -0
- package/dist/ui/styles/design-tokens.d.ts +189 -0
- package/dist/ui/styles/z-index-layers.d.ts +46 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.js +35 -0
- package/dist/ui.js.map +1 -0
- package/dist/useUserDirectory-CqkyCQoR.js +2377 -0
- package/dist/useUserDirectory-CqkyCQoR.js.map +1 -0
- package/dist/utils/cookieSettings.d.ts +12 -0
- package/dist/utils/data/countryCodes.d.ts +26 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/utils/appPath.d.ts +5 -0
- package/dist/utils/utils/chunkLoadRecovery.d.ts +7 -0
- package/dist/utils/utils/cn.d.ts +3 -0
- package/dist/utils/utils/crossApp.d.ts +71 -0
- package/dist/utils/utils/debounce.d.ts +1 -0
- package/dist/utils/utils/formatUserLabel.d.ts +8 -0
- package/dist/utils/utils/formatting.d.ts +18 -0
- package/dist/utils/utils/logoutNotification.d.ts +28 -0
- package/dist/utils/utils/operatorLocale.d.ts +32 -0
- package/dist/utils/utils/routeLocalePrefetch.d.ts +5 -0
- package/dist/utils/utils/shellIframeUrl.d.ts +20 -0
- package/dist/utils/utils/spaceSettings.d.ts +20 -0
- package/dist/utils/utils/sso.d.ts +42 -0
- package/dist/utils/utils/throttle.d.ts +1 -0
- package/dist/utils/utils/timezones.d.ts +14 -0
- package/dist/utils/utils/toDateInputValue.d.ts +5 -0
- package/dist/utils/utils/watermark.d.ts +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +1334 -0
- package/dist/utils.js.map +1 -0
- package/dist/vite.d.ts +22 -0
- package/dist/vite.js +74 -0
- package/dist/vite.js.map +1 -0
- package/package.json +191 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AssetPreviewInput } from '../assetPreview';
|
|
2
|
+
|
|
3
|
+
export type AssetThumbnailSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface AssetThumbnailProps {
|
|
5
|
+
asset: AssetPreviewInput & {
|
|
6
|
+
name?: string | null;
|
|
7
|
+
type?: string | null;
|
|
8
|
+
};
|
|
9
|
+
blobUrls?: Record<string, string>;
|
|
10
|
+
size?: AssetThumbnailSize;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function AssetThumbnail({ asset, blobUrls, size, onClick, className, interactive, }: AssetThumbnailProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PlatformStorageClient } from '../platformStorage';
|
|
2
|
+
|
|
3
|
+
interface CopyStorageLinkButtonProps {
|
|
4
|
+
client: PlatformStorageClient | null;
|
|
5
|
+
storageFileId: string | null | undefined;
|
|
6
|
+
copyLabel?: string;
|
|
7
|
+
openLabel?: string;
|
|
8
|
+
expiryHint?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
onError?: (message: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function CopyStorageLinkButton({ client, storageFileId, copyLabel, openLabel, expiryHint, className, onError, }: CopyStorageLinkButtonProps): import("react").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ImgHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
interface StorageImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
4
|
+
storageFileId?: string | null;
|
|
5
|
+
fallbackUrl?: string | null;
|
|
6
|
+
blobUrls: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export declare function StorageImage({ storageFileId, fallbackUrl, blobUrls, src, alt, ...rest }: StorageImageProps): import("react").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AssetPreviewInput } from '../assetPreview';
|
|
2
|
+
import { PlatformStorageClient } from '../platformStorage';
|
|
3
|
+
|
|
4
|
+
export interface StoragePreviewContentProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
asset: AssetPreviewInput & {
|
|
7
|
+
name?: string | null;
|
|
8
|
+
size_bytes?: number | null;
|
|
9
|
+
format?: string | null;
|
|
10
|
+
};
|
|
11
|
+
client: PlatformStorageClient | null;
|
|
12
|
+
blobUrls?: Record<string, string>;
|
|
13
|
+
onDownload?: () => void | Promise<void>;
|
|
14
|
+
labels?: {
|
|
15
|
+
loading?: string;
|
|
16
|
+
loadFailed?: string;
|
|
17
|
+
downloadOnly?: string;
|
|
18
|
+
download?: string;
|
|
19
|
+
emptyText?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare function StoragePreviewContent({ open, asset, client, blobUrls, onDownload, labels, }: StoragePreviewContentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VideoHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
interface StorageVideoProps extends VideoHTMLAttributes<HTMLVideoElement> {
|
|
4
|
+
storageFileId?: string | null;
|
|
5
|
+
fallbackUrl?: string | null;
|
|
6
|
+
blobUrls: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export declare function StorageVideo({ storageFileId, fallbackUrl, blobUrls, src, ...rest }: StorageVideoProps): import("react").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PlatformStorageClient } from '../platformStorage';
|
|
2
|
+
|
|
3
|
+
export declare function useShareableStorageLink(client: PlatformStorageClient | null, onError?: (message: string) => void): {
|
|
4
|
+
copyLink: (fileId: string) => Promise<string | null>;
|
|
5
|
+
openShareTab: (fileId: string) => Promise<string | null>;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { contentUrlFromUpload, createPlatformStorageHelpers, fetchAuthenticatedBlobUrl, isAuthenticatedStorageContentUrl, pickStorageDisplayUrl, resolveAuthenticatedBlobUrls, resolveShareablePublicUrl, resolveShareablePublicUrls, unwrapStorageFileRecord, type AuthenticatedBlobResult, type PlatformStorageClient, type StorageFileRecord, } from './platformStorage';
|
|
2
|
+
export { copyTextToClipboard } from './copyTextToClipboard';
|
|
3
|
+
export { openUrlInNewTab } from './openUrlInNewTab';
|
|
4
|
+
export { inferAssetPreviewKind, inferMimeType, isImagePreviewKind, type AssetPreviewInput, type AssetPreviewKind, } from './assetPreview';
|
|
5
|
+
export { useAuthenticatedStorageBlobs } from './hooks/useAuthenticatedStorageBlobs';
|
|
6
|
+
export { useImageThumbnailBlobs } from './hooks/useImageThumbnailBlobs';
|
|
7
|
+
export { useShareableStorageLink } from './hooks/useShareableStorageLink';
|
|
8
|
+
export { StorageImage } from './components/StorageImage';
|
|
9
|
+
export { StorageVideo } from './components/StorageVideo';
|
|
10
|
+
export { AssetThumbnail, type AssetThumbnailProps, type AssetThumbnailSize } from './components/AssetThumbnail';
|
|
11
|
+
export { StoragePreviewContent, type StoragePreviewContentProps } from './components/StoragePreviewContent';
|
|
12
|
+
export { CopyStorageLinkButton } from './components/CopyStorageLinkButton';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open a URL in a new tab after async resolution.
|
|
3
|
+
* Uses a synchronous `about:blank` popup (without `noopener`) so the opener can navigate it
|
|
4
|
+
* once the URL is ready; then clears `opener` for security.
|
|
5
|
+
*/
|
|
6
|
+
export declare function openUrlInNewTab(urlOrPromise: string | Promise<string>): Promise<string>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Minimal GeniSpace storage surface used by GeniApps. */
|
|
2
|
+
export interface StorageFileRecord {
|
|
3
|
+
id: string;
|
|
4
|
+
url: string;
|
|
5
|
+
publicUrl?: string;
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PlatformStorageClient {
|
|
9
|
+
storage: {
|
|
10
|
+
getFile(fileId: string): Promise<StorageFileRecord | {
|
|
11
|
+
data?: StorageFileRecord;
|
|
12
|
+
}>;
|
|
13
|
+
getFileContent(fileId: string): Promise<ArrayBuffer | ArrayBufferView>;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** SDK `get()` returns `{ success, data: file }` — unwrap to the file record. */
|
|
17
|
+
export declare function unwrapStorageFileRecord(raw: unknown): StorageFileRecord;
|
|
18
|
+
export interface AuthenticatedBlobResult {
|
|
19
|
+
blobUrl: string;
|
|
20
|
+
revoke: () => void;
|
|
21
|
+
}
|
|
22
|
+
/** JWT-backed `/content` URLs cannot be used in `<img src>` — browser sends no Authorization header. */
|
|
23
|
+
export declare function isAuthenticatedStorageContentUrl(url: string | null | undefined): boolean;
|
|
24
|
+
/** JWT-backed in-app preview: fetch /content and return a blob: URL. */
|
|
25
|
+
export declare function fetchAuthenticatedBlobUrl(client: PlatformStorageClient, fileId: string, mimeType?: string): Promise<AuthenticatedBlobResult>;
|
|
26
|
+
/** Batch fetch blob URLs with limited concurrency. */
|
|
27
|
+
export declare function resolveAuthenticatedBlobUrls(client: PlatformStorageClient, fileIds: string[], concurrency?: number): Promise<Record<string, string>>;
|
|
28
|
+
/** Share/copy/external HTTP: fresh signed publicUrl (TTL ~1h on server). */
|
|
29
|
+
export declare function resolveShareablePublicUrl(client: PlatformStorageClient, fileId: string): Promise<string>;
|
|
30
|
+
export declare function resolveShareablePublicUrls(client: PlatformStorageClient, fileIds: string[]): Promise<Record<string, string>>;
|
|
31
|
+
/** Pick blob URL for display, else external/content fallback. */
|
|
32
|
+
export declare function pickStorageDisplayUrl(storageFileId: string | null | undefined, fallbackUrl: string | null | undefined, blobUrls: Record<string, string>): string | null;
|
|
33
|
+
/** Persist content endpoint URL from upload response — never publicUrl. */
|
|
34
|
+
export declare function contentUrlFromUpload(file: {
|
|
35
|
+
url: string;
|
|
36
|
+
publicUrl?: string;
|
|
37
|
+
}): string;
|
|
38
|
+
export declare function createPlatformStorageHelpers(client: PlatformStorageClient): {
|
|
39
|
+
fetchAuthenticatedBlobUrl: (fileId: string, mimeType?: string) => Promise<AuthenticatedBlobResult>;
|
|
40
|
+
resolveAuthenticatedBlobUrls: (fileIds: string[]) => Promise<Record<string, string>>;
|
|
41
|
+
resolveShareablePublicUrl: (fileId: string) => Promise<string>;
|
|
42
|
+
resolveShareablePublicUrls: (fileIds: string[]) => Promise<Record<string, string>>;
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './storage/index';
|