@burdenoff/microfe-cosmicintersection 2026.1030.4 → 2026.1101.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/cosmicintersection/CosmicIntersectionRoot.d.ts +0 -1
- package/dist/cosmicintersection/CosmicIntersectionRoot.js +2 -2
- package/dist/cosmicintersection/CosmicIntersectionRoutes.d.ts +1 -1
- package/dist/cosmicintersection/CosmicIntersectionRoutes.js +1 -1
- package/dist/cosmicintersection/api/cosmicApi.d.ts +0 -1
- package/dist/cosmicintersection/api/cosmicApi.js +82 -82
- package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
- package/dist/cosmicintersection/components/ActionMenu.d.ts +1 -2
- package/dist/cosmicintersection/components/ActionMenu.js +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/ActivityFeedPanel.js +4 -4
- package/dist/cosmicintersection/components/DiscussionPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/DiscussionPanel.js +2 -2
- package/dist/cosmicintersection/components/EmptyState.d.ts +1 -2
- package/dist/cosmicintersection/components/EmptyState.js +1 -1
- package/dist/cosmicintersection/components/EntityFormShell.d.ts +1 -2
- package/dist/cosmicintersection/components/EntityFormShell.js +1 -1
- package/dist/cosmicintersection/components/EntityTagsField.d.ts +1 -1
- package/dist/cosmicintersection/components/EntityTagsField.js +1 -1
- package/dist/cosmicintersection/components/ErrorState.d.ts +1 -1
- package/dist/cosmicintersection/components/ErrorState.js +1 -1
- package/dist/cosmicintersection/components/FacetPanel.d.ts +1 -1
- package/dist/cosmicintersection/components/FacetPanel.js +1 -1
- package/dist/cosmicintersection/components/FacetPanel.js.map +1 -1
- package/dist/cosmicintersection/components/FileUploadField.d.ts +1 -2
- package/dist/cosmicintersection/components/FileUploadField.js +1 -1
- package/dist/cosmicintersection/components/FileUploadField.js.map +1 -1
- package/dist/cosmicintersection/components/LineageGraph.d.ts +1 -2
- package/dist/cosmicintersection/components/LineageGraph.js +1 -1
- package/dist/cosmicintersection/components/LineageGraph.js.map +1 -1
- package/dist/cosmicintersection/components/LoadingState.d.ts +1 -1
- package/dist/cosmicintersection/components/LoadingState.js +1 -1
- package/dist/cosmicintersection/components/LoadingState.js.map +1 -1
- package/dist/cosmicintersection/components/PageLayout.d.ts +1 -2
- package/dist/cosmicintersection/components/PageLayout.js +1 -1
- package/dist/cosmicintersection/components/Pagination.d.ts +1 -1
- package/dist/cosmicintersection/components/Pagination.js +1 -1
- package/dist/cosmicintersection/components/ResultsChart.d.ts +1 -1
- package/dist/cosmicintersection/components/ResultsChart.js +4 -3
- package/dist/cosmicintersection/components/ResultsChart.js.map +1 -1
- package/dist/cosmicintersection/components/SafeLink.d.ts +1 -2
- package/dist/cosmicintersection/components/SafeLink.js +1 -1
- package/dist/cosmicintersection/components/StatusBadge.d.ts +1 -1
- package/dist/cosmicintersection/components/StatusBadge.d.ts.map +1 -1
- package/dist/cosmicintersection/components/StatusBadge.js +3 -3
- package/dist/cosmicintersection/components/StatusBadge.js.map +1 -1
- package/dist/cosmicintersection/components/StepDAG.d.ts +1 -2
- package/dist/cosmicintersection/components/StepDAG.js +1 -1
- package/dist/cosmicintersection/components/StepDAG.js.map +1 -1
- package/dist/cosmicintersection/components/index.js +14 -13
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +1 -2
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js +2 -1
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js.map +1 -1
- package/dist/cosmicintersection/lib/assistantAwareDialog.js +7 -5
- package/dist/cosmicintersection/lib/assistantAwareDialog.js.map +1 -1
- package/dist/cosmicintersection/lib/mutationResult.d.ts +0 -1
- package/dist/cosmicintersection/lib/toast.d.ts +0 -1
- package/dist/cosmicintersection/lib/toast.js +1 -1
- package/dist/cosmicintersection/lib/useSelectedRecord.js.map +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/access/AccessPage.js +10 -9
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +8 -8
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js +14 -13
- package/dist/cosmicintersection/pages/collections/CollectionFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js +5 -5
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +3 -3
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +12 -12
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js +16 -15
- package/dist/cosmicintersection/pages/datasets/DatasetFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +7 -7
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +6 -6
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.d.ts +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.js +5 -5
- package/dist/cosmicintersection/pages/lineage/LineagePage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.js +19 -19
- package/dist/cosmicintersection/pages/notebooks/NotebookFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +7 -7
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +2 -2
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +7 -7
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.js +5 -4
- package/dist/cosmicintersection/pages/releases/ReleaseFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +9 -9
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.js +6 -6
- package/dist/cosmicintersection/pages/runs/RunsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +7 -7
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourceFormPage.js +2 -2
- package/dist/cosmicintersection/pages/sources/SourceFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/sources/SourcesPage.d.ts +1 -1
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +8 -8
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/dist/cosmicintersection/types/index.d.ts +0 -1
- package/dist/cosmicintersection/utils/cn.d.ts +0 -1
- package/dist/cosmicintersection/utils/cn.js +1 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/global-types.d.ts +2 -21
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +2 -21
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/node_modules/clsx/dist/clsx.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +130 -130
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/stories/EmptyState.stories.d.ts +0 -1
- package/dist/stories/LoadingState.stories.d.ts +0 -1
- package/dist/stories/StatusBadge.stories.d.ts +0 -1
- package/dist/test/fakeGateway.d.ts +0 -1
- package/dist/test/fixtures.d.ts +0 -1
- package/dist/test/renderWithProviders.d.ts +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/utils/pageContext.d.ts +0 -2
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +4 -6
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +44 -45
- package/dist/generated/global-operations.d.ts +0 -2
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts +0 -2
- package/dist/generated/wspace-operations.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmicApi.js","names":[],"sources":["../../../src/cosmicintersection/api/cosmicApi.ts"],"sourcesContent":["/**\n * cosmicApi — hand-written typed data layer for the CosmicIntersection MFE.\n *\n * Mirrors the pattern in microfe-eventfullymanaged's eventApi.ts: inline `gql`\n * documents + `@apollo/client/react` hooks, with hand-written response/variables\n * types that track the wspace-cosmicintersection-svc subgraph SDL exactly. The\n * Apollo client is provided by the HOST app shell via React context (integrated\n * mode) — this module never constructs a client. Every `cos*` operation runs on\n * the workspace gateway (the default client in context).\n *\n * Scalar mapping: BigInt -> string, JSON -> Record<string, unknown>,\n * DateTime -> string (ISO).\n */\nimport { gql, type ErrorLike } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\n\nimport { notify } from '../lib/toast';\n\n/**\n * Shared mutation error sink. The gateway client runs with `errorPolicy: 'all'`,\n * so in-band GraphQL errors also invoke `onError`; wiring this on every write\n * mutation guarantees a failure is always surfaced to the user even if a caller\n * forgets to inspect the resolved result.\n */\nconst onMutationError = (error: ErrorLike): void => {\n notify.error('Something went wrong', error.message || 'Please try again.');\n};\n\n// ============================================================================\n// ENUMS (string-literal unions — exact SDL values)\n// ============================================================================\n\nexport type CosDatasetStatus = 'DRAFT' | 'INGESTING' | 'AVAILABLE' | 'DEPRECATED' | 'ARCHIVED';\nexport type CosAccessLevel = 'PUBLIC' | 'WORKSPACE' | 'RESTRICTED' | 'EMBARGOED';\nexport type CosSourceType =\n | 'TELESCOPE'\n | 'SATELLITE'\n | 'GROUND_SENSOR'\n | 'ARCHIVE'\n | 'API'\n | 'STREAM'\n | 'FILE_DROP'\n | 'SIMULATION';\nexport type CosSourceStatus =\n 'CONFIGURING' | 'CONNECTED' | 'SYNCING' | 'DEGRADED' | 'ERROR' | 'DISABLED';\nexport type CosFieldType =\n | 'STRING'\n | 'INTEGER'\n | 'FLOAT'\n | 'BOOLEAN'\n | 'TIMESTAMP'\n | 'COORDINATE'\n | 'SPECTRUM'\n | 'GEOMETRY'\n | 'IMAGE_REF'\n | 'JSON';\nexport type CosPipelineStatus = 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';\nexport type CosPipelineTrigger = 'MANUAL' | 'SCHEDULED' | 'ON_INGEST' | 'WEBHOOK';\nexport type CosRunStatus = 'QUEUED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED';\n/**\n * Full SDL vocabulary. The four geospatial kinds are recognised values a step\n * can already carry (BOFF-4355) — only RASTER_CALC has an execution backend, so\n * they are readable/renderable but are deliberately not offered as authoring\n * options in the add-step form.\n */\nexport type CosStepKind =\n | 'INGEST'\n | 'CALIBRATE'\n | 'TRANSFORM'\n | 'ANALYZE'\n | 'EXPORT'\n | 'NOTIFY'\n | 'RASTER_CALC'\n | 'REPROJECT'\n | 'TILE'\n | 'ZONAL_STATS';\nexport type CosNotebookStatus = 'DRAFT' | 'RUNNING' | 'PUBLISHED' | 'ARCHIVED';\nexport type CosAnalysisStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';\nexport type CosReleaseStatus = 'DRAFT' | 'UNDER_REVIEW' | 'PUBLISHED' | 'RETRACTED';\nexport type CosGrantStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'REVOKED';\n\n// ============================================================================\n// ENTITY TYPES\n// ============================================================================\n\n/** Federated wspace-files File stub — only `{ id }` is resolvable in this subgraph. */\nexport interface CosFileRef {\n id: string;\n}\n\n/** An entity selected id-only, where the operation needs its existence, not its body. */\nexport interface CosIdRef {\n id: string;\n}\n\n/**\n * Per-parent cap the subgraph applies to every relation field\n * (`capPerGroup(rows, key, DEFAULT_LIMIT)` in wspace-cosmicintersection-svc's\n * dataloaders — DEFAULT_LIMIT is 50).\n *\n * A relation array of exactly this length means \"at least this many\", NOT an\n * exact total: render it as `50+`, never as a precise count.\n */\nexport const COS_RELATION_PAGE_SIZE = 50;\n\nexport interface CosSchemaField {\n id: string;\n workspaceId: string;\n datasetId: string;\n name: string;\n fieldType: CosFieldType;\n unit?: string | null;\n description?: string | null;\n nullable: boolean;\n position: number;\n provenance?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosDataset {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n status: CosDatasetStatus;\n accessLevel: CosAccessLevel;\n format?: string | null;\n sourceId?: string | null;\n collectionId?: string | null;\n /** BigInt returned as a numeric string. */\n rowCount: string;\n /** BigInt returned as a numeric string. */\n sizeBytes: string;\n version: number;\n lineageCaptured: boolean;\n coverage?: Record<string, unknown> | null;\n ingestedAt?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relations — only present when the operation selects them (detail queries).\n source?: CosSource | null;\n collection?: CosCollection | null;\n file?: CosFileRef | null;\n schemaFields?: CosSchemaField[];\n}\n\nexport interface CosSource {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n type: CosSourceType;\n status: CosSourceStatus;\n endpoint?: string | null;\n config?: Record<string, unknown> | null;\n lastSyncedAt?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relation — present only on detail queries.\n datasets?: CosDataset[];\n}\n\nexport interface CosCollection {\n id: string;\n workspaceId: string;\n name: string;\n slug?: string | null;\n description?: string | null;\n isPublic: boolean;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relation — present only on detail queries.\n datasets?: CosDataset[];\n}\n\nexport interface CosPipeline {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n status: CosPipelineStatus;\n trigger: CosPipelineTrigger;\n schedule?: string | null;\n definition?: Record<string, unknown> | null;\n version: number;\n lastRunAt?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relation — present only on detail queries.\n runs?: CosPipelineRun[];\n}\n\nexport interface CosPipelineRun {\n id: string;\n workspaceId: string;\n pipelineId: string;\n runNumber: number;\n status: CosRunStatus;\n datasetId?: string | null;\n params?: Record<string, unknown> | null;\n metrics?: Record<string, unknown> | null;\n triggeredBy?: string | null;\n startedAt?: string | null;\n finishedAt?: string | null;\n durationMs?: number | null;\n errorMessage?: string | null;\n createdAt: string;\n updatedAt: string;\n // Relations — present only on detail queries.\n pipeline?: CosPipeline | null;\n steps?: CosPipelineStep[];\n}\n\nexport interface CosPipelineStep {\n id: string;\n workspaceId: string;\n runId: string;\n name: string;\n kind: CosStepKind;\n position: number;\n status: CosRunStatus;\n inputs?: Record<string, unknown> | null;\n outputs?: Record<string, unknown> | null;\n logsRef?: string | null;\n startedAt?: string | null;\n finishedAt?: string | null;\n durationMs?: number | null;\n errorMessage?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosNotebook {\n id: string;\n workspaceId: string;\n title: string;\n description?: string | null;\n status: CosNotebookStatus;\n runtime?: string | null;\n environment?: Record<string, unknown> | null;\n datasetIds: string[];\n isShared: boolean;\n shareSlug?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relations — present only on detail queries.\n file?: CosFileRef | null;\n analyses?: CosAnalysis[];\n releases?: CosRelease[];\n}\n\nexport interface CosAnalysis {\n id: string;\n workspaceId: string;\n title: string;\n status: CosAnalysisStatus;\n method?: string | null;\n aiAssisted: boolean;\n notebookId?: string | null;\n datasetId?: string | null;\n results?: Record<string, unknown> | null;\n outputFile?: CosFileRef | null;\n startedAt?: string | null;\n finishedAt?: string | null;\n errorMessage?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosRelease {\n id: string;\n workspaceId: string;\n title: string;\n version: string;\n status: CosReleaseStatus;\n abstract?: string | null;\n authors: string[];\n datasetIds: string[];\n notebookId?: string | null;\n doi?: string | null;\n license?: string | null;\n publishedAt?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosDataAccessGrant {\n id: string;\n workspaceId: string;\n datasetId: string;\n granteeId: string;\n status: CosGrantStatus;\n scopes: string[];\n reason?: string | null;\n grantedAt?: string | null;\n expiresAt?: string | null;\n revokedAt?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\n// ============================================================================\n// PAGINATION / CONNECTIONS\n// ============================================================================\n\nexport interface CosPageInfo {\n hasMore: boolean;\n cursor?: string | null;\n}\n\nexport interface CosConnection<T> {\n items: T[];\n pageInfo: CosPageInfo;\n}\n\n/** Offset-based pagination input (PaginationInput in the SDL; limit defaults to 50). */\nexport interface CosPaginationInput {\n limit?: number;\n offset?: number;\n cursor?: string;\n}\n\n// ============================================================================\n// INPUT TYPES\n// ============================================================================\n\nexport interface CosCreateDatasetInput {\n name: string;\n description?: string;\n status?: CosDatasetStatus;\n accessLevel?: CosAccessLevel;\n format?: string;\n sourceId?: string;\n collectionId?: string;\n fileId?: string;\n coverage?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosUpdateDatasetInput {\n name?: string;\n description?: string;\n accessLevel?: CosAccessLevel;\n format?: string;\n collectionId?: string;\n coverage?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosAddSchemaFieldInput {\n datasetId: string;\n name: string;\n fieldType?: CosFieldType;\n unit?: string;\n description?: string;\n nullable?: boolean;\n position?: number;\n provenance?: string;\n}\n\nexport interface CosCreateSourceInput {\n name: string;\n type?: CosSourceType;\n status?: CosSourceStatus;\n description?: string;\n endpoint?: string;\n credentialRef?: string;\n config?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosUpdateSourceInput {\n name?: string;\n type?: CosSourceType;\n status?: CosSourceStatus;\n description?: string;\n endpoint?: string;\n credentialRef?: string;\n config?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosCreateCollectionInput {\n name: string;\n slug?: string;\n description?: string;\n isPublic?: boolean;\n tags?: string[];\n}\n\n/** All fields optional — only the provided keys are updated (CosUpdateCollectionInput in the SDL). */\nexport interface CosUpdateCollectionInput {\n name?: string;\n slug?: string;\n description?: string;\n isPublic?: boolean;\n tags?: string[];\n}\n\nexport interface CosCreatePipelineInput {\n name: string;\n description?: string;\n trigger?: CosPipelineTrigger;\n schedule?: string;\n definition?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosUpdatePipelineInput {\n name?: string;\n description?: string;\n status?: CosPipelineStatus;\n trigger?: CosPipelineTrigger;\n schedule?: string;\n definition?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosStartRunInput {\n pipelineId: string;\n datasetId?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface CosAddRunStepInput {\n runId: string;\n name: string;\n kind?: CosStepKind;\n inputs?: Record<string, unknown>;\n position?: number;\n}\n\nexport interface CosCreateNotebookInput {\n title: string;\n description?: string;\n runtime?: string;\n environment?: Record<string, unknown>;\n datasetIds?: string[];\n fileId?: string;\n tags?: string[];\n}\n\nexport interface CosUpdateNotebookInput {\n title?: string;\n description?: string;\n status?: CosNotebookStatus;\n runtime?: string;\n environment?: Record<string, unknown>;\n datasetIds?: string[];\n isShared?: boolean;\n shareSlug?: string;\n tags?: string[];\n}\n\nexport interface CosRunAnalysisInput {\n title: string;\n method?: string;\n aiAssisted?: boolean;\n notebookId?: string;\n datasetId?: string;\n}\n\nexport interface CosCreateReleaseInput {\n title: string;\n version?: string;\n abstract?: string;\n authors?: string[];\n datasetIds?: string[];\n notebookId?: string;\n license?: string;\n}\n\nexport interface CosGrantAccessInput {\n datasetId: string;\n granteeId: string;\n scopes?: string[];\n reason?: string;\n expiresAt?: string;\n}\n\n// ============================================================================\n// GQL DOCUMENTS — QUERIES\n// ============================================================================\n\nexport const COS_HEALTH_QUERY = gql`\n query CosHealth {\n cosHealth\n }\n`;\n\nexport const COS_DATASETS_QUERY = gql`\n query CosListDatasets(\n $q: String\n $accessLevel: CosAccessLevel\n $format: String\n $collectionId: ID\n $sourceId: ID\n $status: CosDatasetStatus\n $pagination: PaginationInput\n ) {\n cosListDatasets(\n q: $q\n accessLevel: $accessLevel\n format: $format\n collectionId: $collectionId\n sourceId: $sourceId\n status: $status\n pagination: $pagination\n ) {\n items {\n id\n workspaceId\n name\n description\n status\n accessLevel\n format\n sourceId\n collectionId\n rowCount\n sizeBytes\n version\n lineageCaptured\n ingestedAt\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_DATASET_QUERY = gql`\n query CosDataset($id: ID!) {\n cosDataset(id: $id) {\n id\n workspaceId\n name\n description\n status\n accessLevel\n format\n sourceId\n collectionId\n rowCount\n sizeBytes\n version\n lineageCaptured\n coverage\n ingestedAt\n tags\n createdAt\n updatedAt\n file {\n id\n }\n source {\n id\n name\n type\n status\n }\n collection {\n id\n name\n slug\n }\n schemaFields {\n id\n datasetId\n name\n fieldType\n unit\n description\n nullable\n position\n provenance\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const COS_SOURCES_QUERY = gql`\n query CosListSources(\n $type: CosSourceType\n $status: CosSourceStatus\n $pagination: PaginationInput\n ) {\n cosListSources(type: $type, status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n name\n description\n type\n status\n endpoint\n config\n lastSyncedAt\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_SOURCE_QUERY = gql`\n query CosSource($id: ID!) {\n cosSource(id: $id) {\n id\n workspaceId\n name\n description\n type\n status\n endpoint\n config\n lastSyncedAt\n tags\n createdAt\n updatedAt\n datasets {\n id\n name\n status\n accessLevel\n rowCount\n updatedAt\n }\n }\n }\n`;\n\n/**\n * `datasets` is selected id-only so each card can show how many datasets the\n * collection holds. The subgraph resolves it through `collectionDatasetsLoader`\n * (one batched query for the whole page) and filters to the datasets THIS actor\n * may read, so the length is the caller's visible count — capped at\n * `COS_RELATION_PAGE_SIZE`.\n */\nexport const COS_COLLECTIONS_QUERY = gql`\n query CosListCollections {\n cosListCollections {\n id\n workspaceId\n name\n slug\n description\n isPublic\n tags\n createdAt\n updatedAt\n datasets {\n id\n }\n }\n }\n`;\n\nexport const COS_COLLECTION_QUERY = gql`\n query CosCollection($id: ID!) {\n cosCollection(id: $id) {\n id\n workspaceId\n name\n slug\n description\n isPublic\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_SCHEMA_FIELDS_QUERY = gql`\n query CosListSchemaFields($datasetId: ID!) {\n cosListSchemaFields(datasetId: $datasetId) {\n id\n workspaceId\n datasetId\n name\n fieldType\n unit\n description\n nullable\n position\n provenance\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_PIPELINES_QUERY = gql`\n query CosListPipelines($status: CosPipelineStatus, $pagination: PaginationInput) {\n cosListPipelines(status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n name\n description\n status\n trigger\n schedule\n version\n lastRunAt\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_PIPELINE_QUERY = gql`\n query CosPipeline($id: ID!) {\n cosPipeline(id: $id) {\n id\n workspaceId\n name\n description\n status\n trigger\n schedule\n definition\n version\n lastRunAt\n tags\n createdAt\n updatedAt\n runs {\n id\n runNumber\n status\n datasetId\n startedAt\n finishedAt\n durationMs\n createdAt\n }\n }\n }\n`;\n\nexport const COS_RUNS_QUERY = gql`\n query CosListRuns($pipelineId: ID, $status: CosRunStatus, $pagination: PaginationInput) {\n cosListRuns(pipelineId: $pipelineId, status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n pipelineId\n runNumber\n status\n datasetId\n triggeredBy\n startedAt\n finishedAt\n durationMs\n errorMessage\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_RUN_QUERY = gql`\n query CosRun($id: ID!) {\n cosRun(id: $id) {\n id\n workspaceId\n pipelineId\n runNumber\n status\n datasetId\n params\n metrics\n triggeredBy\n startedAt\n finishedAt\n durationMs\n errorMessage\n createdAt\n updatedAt\n pipeline {\n id\n name\n status\n trigger\n schedule\n }\n steps {\n id\n runId\n name\n kind\n position\n status\n startedAt\n finishedAt\n durationMs\n errorMessage\n }\n }\n }\n`;\n\n/**\n * Other FAILED runs of the same pipeline, newest first, each with its steps so\n * the caller can name the step that broke. `steps` resolves through\n * `pipelineRunStepsLoader`, so the whole list costs one extra batched query.\n */\nexport const COS_PIPELINE_FAILED_RUNS_QUERY = gql`\n query CosPipelineFailedRuns($pipelineId: ID!, $pagination: PaginationInput) {\n cosListRuns(pipelineId: $pipelineId, status: FAILED, pagination: $pagination) {\n items {\n id\n workspaceId\n pipelineId\n runNumber\n status\n errorMessage\n startedAt\n finishedAt\n createdAt\n updatedAt\n steps {\n id\n runId\n name\n kind\n position\n status\n errorMessage\n }\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\n/**\n * Minimal dataset lookup — resolves an id held on another entity (e.g.\n * `CosPipelineRun.datasetId`, which the SDL exposes as a bare ID with no\n * relation field) to something a human can read. Returns null when the caller\n * has no read access to that dataset, so callers must fall back to the id.\n */\nexport const COS_DATASET_SUMMARY_QUERY = gql`\n query CosDatasetSummary($id: ID!) {\n cosDataset(id: $id) {\n id\n name\n status\n accessLevel\n }\n }\n`;\n\nexport const COS_RUN_STEPS_QUERY = gql`\n query CosListRunSteps($runId: ID!) {\n cosListRunSteps(runId: $runId) {\n id\n workspaceId\n runId\n name\n kind\n position\n status\n inputs\n outputs\n logsRef\n startedAt\n finishedAt\n durationMs\n errorMessage\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_NOTEBOOKS_QUERY = gql`\n query CosListNotebooks($status: CosNotebookStatus, $pagination: PaginationInput) {\n cosListNotebooks(status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n title\n description\n status\n runtime\n datasetIds\n isShared\n shareSlug\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_NOTEBOOK_QUERY = gql`\n query CosNotebook($id: ID!) {\n cosNotebook(id: $id) {\n id\n workspaceId\n title\n description\n status\n runtime\n environment\n datasetIds\n isShared\n shareSlug\n tags\n createdAt\n updatedAt\n file {\n id\n }\n analyses {\n id\n title\n status\n aiAssisted\n method\n createdAt\n }\n releases {\n id\n title\n version\n status\n publishedAt\n }\n }\n }\n`;\n\nexport const COS_ANALYSES_QUERY = gql`\n query CosListAnalyses($datasetId: ID, $notebookId: ID, $status: CosAnalysisStatus) {\n cosListAnalyses(datasetId: $datasetId, notebookId: $notebookId, status: $status) {\n id\n workspaceId\n title\n status\n method\n aiAssisted\n notebookId\n datasetId\n results\n outputFile {\n id\n }\n startedAt\n finishedAt\n errorMessage\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_RELEASES_QUERY = gql`\n query CosListReleases($status: CosReleaseStatus, $pagination: PaginationInput) {\n cosListReleases(status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n title\n version\n status\n abstract\n authors\n datasetIds\n notebookId\n doi\n license\n publishedAt\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_ACCESS_GRANTS_QUERY = gql`\n query CosListAccessGrants($datasetId: ID, $status: CosGrantStatus) {\n cosListAccessGrants(datasetId: $datasetId, status: $status) {\n id\n workspaceId\n datasetId\n granteeId\n status\n scopes\n reason\n grantedAt\n expiresAt\n revokedAt\n createdAt\n updatedAt\n }\n }\n`;\n\n// ============================================================================\n// PLATFORM REUSE — activity feed (wspace-activity-svc, federated on the\n// workspace supergraph). The cos mutation-audit plugin already writes these\n// ActivityLog rows via be-sdk `trackOperation`; this is the read surface,\n// scoped to a single cos entity by `resourceId`. Only scalar fields are\n// selected so no cross-subgraph entity resolution is required.\n// ============================================================================\n\nexport const COS_ACTIVITY_BY_RESOURCE_QUERY = gql`\n query CosResourceActivity($filter: ActivityLogFilter) {\n getActivities(filter: $filter) {\n id\n action\n description\n resourceType\n resourceId\n userId\n timestamp\n }\n }\n`;\n\n// ============================================================================\n// GQL DOCUMENTS — MUTATIONS\n// ============================================================================\n\nexport const COS_CREATE_DATASET_MUTATION = gql`\n mutation CosCreateDataset($input: CosCreateDatasetInput!) {\n cosCreateDataset(input: $input) {\n id\n name\n status\n accessLevel\n sourceId\n collectionId\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_DATASET_MUTATION = gql`\n mutation CosUpdateDataset($id: ID!, $input: CosUpdateDatasetInput!) {\n cosUpdateDataset(id: $id, input: $input) {\n id\n name\n description\n status\n accessLevel\n format\n collectionId\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_PUBLISH_DATASET_MUTATION = gql`\n mutation CosPublishDataset($id: ID!) {\n cosPublishDataset(id: $id) {\n id\n status\n ingestedAt\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_DATASET_MUTATION = gql`\n mutation CosArchiveDataset($id: ID!) {\n cosArchiveDataset(id: $id)\n }\n`;\n\nexport const COS_ADD_SCHEMA_FIELD_MUTATION = gql`\n mutation CosAddSchemaField($input: CosAddSchemaFieldInput!) {\n cosAddSchemaField(input: $input) {\n id\n workspaceId\n datasetId\n name\n fieldType\n unit\n description\n nullable\n position\n provenance\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_CREATE_SOURCE_MUTATION = gql`\n mutation CosCreateSource($input: CosCreateSourceInput!) {\n cosCreateSource(input: $input) {\n id\n name\n type\n status\n endpoint\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_SOURCE_MUTATION = gql`\n mutation CosUpdateSource($id: ID!, $input: CosUpdateSourceInput!) {\n cosUpdateSource(id: $id, input: $input) {\n id\n name\n description\n type\n status\n endpoint\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_MARK_SOURCE_SYNCED_MUTATION = gql`\n mutation CosMarkSourceSynced($id: ID!) {\n cosMarkSourceSynced(id: $id) {\n id\n status\n lastSyncedAt\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_SOURCE_MUTATION = gql`\n mutation CosArchiveSource($id: ID!) {\n cosArchiveSource(id: $id)\n }\n`;\n\nexport const COS_CREATE_COLLECTION_MUTATION = gql`\n mutation CosCreateCollection($input: CosCreateCollectionInput!) {\n cosCreateCollection(input: $input) {\n id\n name\n slug\n description\n isPublic\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_COLLECTION_MUTATION = gql`\n mutation CosUpdateCollection($id: ID!, $input: CosUpdateCollectionInput!) {\n cosUpdateCollection(id: $id, input: $input) {\n id\n name\n slug\n description\n isPublic\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_COLLECTION_MUTATION = gql`\n mutation CosArchiveCollection($id: ID!) {\n cosArchiveCollection(id: $id)\n }\n`;\n\nexport const COS_CREATE_PIPELINE_MUTATION = gql`\n mutation CosCreatePipeline($input: CosCreatePipelineInput!) {\n cosCreatePipeline(input: $input) {\n id\n name\n status\n trigger\n schedule\n version\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_PIPELINE_MUTATION = gql`\n mutation CosUpdatePipeline($id: ID!, $input: CosUpdatePipelineInput!) {\n cosUpdatePipeline(id: $id, input: $input) {\n id\n name\n description\n status\n trigger\n schedule\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_PIPELINE_MUTATION = gql`\n mutation CosArchivePipeline($id: ID!) {\n cosArchivePipeline(id: $id)\n }\n`;\n\nexport const COS_START_RUN_MUTATION = gql`\n mutation CosStartRun($input: CosStartRunInput!) {\n cosStartRun(input: $input) {\n id\n pipelineId\n runNumber\n status\n datasetId\n startedAt\n createdAt\n }\n }\n`;\n\nexport const COS_TRANSITION_RUN_MUTATION = gql`\n mutation CosTransitionRun($id: ID!, $status: CosRunStatus!) {\n cosTransitionRun(id: $id, status: $status) {\n id\n status\n startedAt\n finishedAt\n durationMs\n updatedAt\n }\n }\n`;\n\nexport const COS_ADD_RUN_STEP_MUTATION = gql`\n mutation CosAddRunStep($input: CosAddRunStepInput!) {\n cosAddRunStep(input: $input) {\n id\n runId\n name\n kind\n position\n status\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_CREATE_NOTEBOOK_MUTATION = gql`\n mutation CosCreateNotebook($input: CosCreateNotebookInput!) {\n cosCreateNotebook(input: $input) {\n id\n title\n status\n runtime\n datasetIds\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_NOTEBOOK_MUTATION = gql`\n mutation CosUpdateNotebook($id: ID!, $input: CosUpdateNotebookInput!) {\n cosUpdateNotebook(id: $id, input: $input) {\n id\n title\n description\n status\n runtime\n datasetIds\n isShared\n shareSlug\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_NOTEBOOK_MUTATION = gql`\n mutation CosArchiveNotebook($id: ID!) {\n cosArchiveNotebook(id: $id)\n }\n`;\n\nexport const COS_RUN_ANALYSIS_MUTATION = gql`\n mutation CosRunAnalysis($input: CosRunAnalysisInput!) {\n cosRunAnalysis(input: $input) {\n id\n title\n status\n method\n aiAssisted\n notebookId\n datasetId\n startedAt\n createdAt\n }\n }\n`;\n\nexport const COS_COMPLETE_ANALYSIS_MUTATION = gql`\n mutation CosCompleteAnalysis(\n $id: ID!\n $status: CosAnalysisStatus!\n $results: JSON\n $outputFileId: ID\n ) {\n cosCompleteAnalysis(id: $id, status: $status, results: $results, outputFileId: $outputFileId) {\n id\n status\n results\n finishedAt\n errorMessage\n outputFile {\n id\n }\n updatedAt\n }\n }\n`;\n\nexport const COS_CREATE_RELEASE_MUTATION = gql`\n mutation CosCreateRelease($input: CosCreateReleaseInput!) {\n cosCreateRelease(input: $input) {\n id\n title\n version\n status\n authors\n datasetIds\n notebookId\n license\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_PUBLISH_RELEASE_MUTATION = gql`\n mutation CosPublishRelease($id: ID!, $doi: String) {\n cosPublishRelease(id: $id, doi: $doi) {\n id\n status\n doi\n publishedAt\n updatedAt\n }\n }\n`;\n\nexport const COS_GRANT_ACCESS_MUTATION = gql`\n mutation CosGrantAccess($input: CosGrantAccessInput!) {\n cosGrantAccess(input: $input) {\n id\n datasetId\n granteeId\n status\n scopes\n reason\n grantedAt\n expiresAt\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_REVOKE_ACCESS_MUTATION = gql`\n mutation CosRevokeAccess($id: ID!) {\n cosRevokeAccess(id: $id) {\n id\n status\n revokedAt\n updatedAt\n }\n }\n`;\n\n// ============================================================================\n// RESPONSE / VARIABLES TYPES\n// ============================================================================\n\nexport interface CosHealthQueryData {\n cosHealth: string;\n}\n\nexport interface CosDatasetsQueryData {\n cosListDatasets: CosConnection<CosDataset>;\n}\nexport interface CosDatasetsQueryVars {\n /** Full-text search across dataset name/description/tags (backend `q` arg). */\n q?: string;\n accessLevel?: CosAccessLevel;\n format?: string;\n collectionId?: string;\n sourceId?: string;\n status?: CosDatasetStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosDatasetQueryData {\n cosDataset: CosDataset | null;\n}\n\nexport interface CosSourcesQueryData {\n cosListSources: CosConnection<CosSource>;\n}\nexport interface CosSourcesQueryVars {\n type?: CosSourceType;\n status?: CosSourceStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosSourceQueryData {\n cosSource: CosSource | null;\n}\n\n/**\n * Row shape of `cosListCollections` — same as `CosCollection` except `datasets`\n * is the id-only selection COS_COLLECTIONS_QUERY makes, so the list page can\n * size each collection without over-fetching dataset bodies.\n */\nexport interface CosCollectionListItem extends Omit<CosCollection, 'datasets'> {\n datasets: CosIdRef[];\n}\n\nexport interface CosCollectionsQueryData {\n cosListCollections: CosCollectionListItem[];\n}\n\nexport interface CosCollectionQueryData {\n cosCollection: CosCollection | null;\n}\n\nexport interface CosSchemaFieldsQueryData {\n cosListSchemaFields: CosSchemaField[];\n}\n\nexport interface CosPipelinesQueryData {\n cosListPipelines: CosConnection<CosPipeline>;\n}\nexport interface CosPipelinesQueryVars {\n status?: CosPipelineStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosPipelineQueryData {\n cosPipeline: CosPipeline | null;\n}\n\nexport interface CosRunsQueryData {\n cosListRuns: CosConnection<CosPipelineRun>;\n}\nexport interface CosRunsQueryVars {\n pipelineId?: string;\n status?: CosRunStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosRunQueryData {\n cosRun: CosPipelineRun | null;\n}\n\nexport interface CosRunStepsQueryData {\n cosListRunSteps: CosPipelineStep[];\n}\n\n/** Row of COS_PIPELINE_FAILED_RUNS_QUERY — `steps` is always selected. */\nexport interface CosFailedRunListItem extends Omit<CosPipelineRun, 'steps'> {\n steps: CosPipelineStep[];\n}\n\nexport interface CosPipelineFailedRunsQueryData {\n cosListRuns: CosConnection<CosFailedRunListItem>;\n}\nexport interface CosPipelineFailedRunsQueryVars {\n pipelineId: string;\n pagination?: CosPaginationInput;\n}\n\n/** Just enough of a dataset to render its name in place of a bare id. */\nexport interface CosDatasetSummary {\n id: string;\n name: string;\n status: CosDatasetStatus;\n accessLevel: CosAccessLevel;\n}\n\nexport interface CosDatasetSummaryQueryData {\n cosDataset: CosDatasetSummary | null;\n}\n\nexport interface CosNotebooksQueryData {\n cosListNotebooks: CosConnection<CosNotebook>;\n}\nexport interface CosNotebooksQueryVars {\n status?: CosNotebookStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosNotebookQueryData {\n cosNotebook: CosNotebook | null;\n}\n\nexport interface CosAnalysesQueryData {\n cosListAnalyses: CosAnalysis[];\n}\nexport interface CosAnalysesQueryVars {\n datasetId?: string;\n notebookId?: string;\n status?: CosAnalysisStatus;\n}\n\nexport interface CosReleasesQueryData {\n cosListReleases: CosConnection<CosRelease>;\n}\nexport interface CosReleasesQueryVars {\n status?: CosReleaseStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosAccessGrantsQueryData {\n cosListAccessGrants: CosDataAccessGrant[];\n}\nexport interface CosAccessGrantsQueryVars {\n datasetId?: string;\n status?: CosGrantStatus;\n}\n\n/** A single platform activity record (subset of wspace-activity-svc ActivityLog). */\nexport interface CosActivityEntry {\n id: string;\n action: string;\n description?: string | null;\n resourceType?: string | null;\n resourceId?: string | null;\n userId: string;\n timestamp: string;\n}\n\nexport interface CosActivityQueryData {\n getActivities: CosActivityEntry[];\n}\n\n/** Mirrors ActivityLogFilter — only the fields the cos activity panel needs. */\nexport interface CosActivityFilter {\n workspaceId?: string;\n resourceId?: string;\n resourceType?: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface CosActivityQueryVars {\n filter?: CosActivityFilter;\n}\n\n// ============================================================================\n// QUERY HOOKS\n// ============================================================================\n\nexport const useCosHealthQuery = () => useQuery<CosHealthQueryData>(COS_HEALTH_QUERY);\n\nexport const useCosDatasetsQuery = (variables: CosDatasetsQueryVars = {}) =>\n useQuery<CosDatasetsQueryData, CosDatasetsQueryVars>(COS_DATASETS_QUERY, { variables });\n\nexport const useCosDatasetQuery = (id: string) =>\n useQuery<CosDatasetQueryData, { id: string }>(COS_DATASET_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosSourcesQuery = (variables: CosSourcesQueryVars = {}) =>\n useQuery<CosSourcesQueryData, CosSourcesQueryVars>(COS_SOURCES_QUERY, { variables });\n\nexport const useCosSourceQuery = (id: string) =>\n useQuery<CosSourceQueryData, { id: string }>(COS_SOURCE_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosCollectionsQuery = () =>\n useQuery<CosCollectionsQueryData>(COS_COLLECTIONS_QUERY);\n\nexport const useCosCollectionQuery = (id: string) =>\n useQuery<CosCollectionQueryData, { id: string }>(COS_COLLECTION_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosSchemaFieldsQuery = (datasetId: string) =>\n useQuery<CosSchemaFieldsQueryData, { datasetId: string }>(COS_SCHEMA_FIELDS_QUERY, {\n variables: { datasetId },\n skip: !datasetId,\n });\n\nexport const useCosPipelinesQuery = (variables: CosPipelinesQueryVars = {}) =>\n useQuery<CosPipelinesQueryData, CosPipelinesQueryVars>(COS_PIPELINES_QUERY, { variables });\n\nexport const useCosPipelineQuery = (id: string) =>\n useQuery<CosPipelineQueryData, { id: string }>(COS_PIPELINE_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosRunsQuery = (variables: CosRunsQueryVars = {}) =>\n useQuery<CosRunsQueryData, CosRunsQueryVars>(COS_RUNS_QUERY, { variables });\n\nexport const useCosRunQuery = (id: string) =>\n useQuery<CosRunQueryData, { id: string }>(COS_RUN_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosRunStepsQuery = (runId: string) =>\n useQuery<CosRunStepsQueryData, { runId: string }>(COS_RUN_STEPS_QUERY, {\n variables: { runId },\n skip: !runId,\n });\n\n/**\n * Failed runs of one pipeline. Skipped until a pipelineId is known so the run\n * detail page can call it unconditionally while its own query is still loading.\n */\nexport const useCosPipelineFailedRunsQuery = (\n pipelineId: string | undefined,\n options: { limit?: number; skip?: boolean } = {}\n) =>\n useQuery<CosPipelineFailedRunsQueryData, CosPipelineFailedRunsQueryVars>(\n COS_PIPELINE_FAILED_RUNS_QUERY,\n {\n variables: {\n pipelineId: pipelineId ?? '',\n pagination: { limit: options.limit ?? 20, offset: 0 },\n },\n skip: !pipelineId || options.skip === true,\n }\n );\n\n/** Resolves a dataset id to its name. Returns null data when unreadable. */\nexport const useCosDatasetSummaryQuery = (id: string | null | undefined) =>\n useQuery<CosDatasetSummaryQueryData, { id: string }>(COS_DATASET_SUMMARY_QUERY, {\n variables: { id: id ?? '' },\n skip: !id,\n });\n\nexport const useCosNotebooksQuery = (variables: CosNotebooksQueryVars = {}) =>\n useQuery<CosNotebooksQueryData, CosNotebooksQueryVars>(COS_NOTEBOOKS_QUERY, { variables });\n\nexport const useCosNotebookQuery = (id: string) =>\n useQuery<CosNotebookQueryData, { id: string }>(COS_NOTEBOOK_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosAnalysesQuery = (variables: CosAnalysesQueryVars = {}) =>\n useQuery<CosAnalysesQueryData, CosAnalysesQueryVars>(COS_ANALYSES_QUERY, { variables });\n\nexport const useCosReleasesQuery = (variables: CosReleasesQueryVars = {}) =>\n useQuery<CosReleasesQueryData, CosReleasesQueryVars>(COS_RELEASES_QUERY, { variables });\n\nexport const useCosAccessGrantsQuery = (variables: CosAccessGrantsQueryVars = {}) =>\n useQuery<CosAccessGrantsQueryData, CosAccessGrantsQueryVars>(COS_ACCESS_GRANTS_QUERY, {\n variables,\n });\n\n/**\n * Resource-scoped platform activity for a single cos entity. RBAC on\n * `getActivities` scopes on `filter.workspaceId`, so both a workspaceId and the\n * entity's resourceId are required — the query is skipped until both are known.\n */\nexport const useCosResourceActivityQuery = (params: {\n workspaceId?: string;\n resourceId: string;\n resourceType?: string;\n limit?: number;\n}) => {\n const { workspaceId, resourceId, resourceType, limit = 20 } = params;\n return useQuery<CosActivityQueryData, CosActivityQueryVars>(COS_ACTIVITY_BY_RESOURCE_QUERY, {\n variables: { filter: { workspaceId, resourceId, resourceType, limit } },\n skip: !workspaceId || !resourceId,\n fetchPolicy: 'cache-and-network',\n });\n};\n\n// ============================================================================\n// MUTATION HOOKS\n// ============================================================================\n\nexport const useCosCreateDatasetMutation = () =>\n useMutation<{ cosCreateDataset: CosDataset }, { input: CosCreateDatasetInput }>(\n COS_CREATE_DATASET_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n }\n );\n\nexport const useCosUpdateDatasetMutation = () =>\n useMutation<{ cosUpdateDataset: CosDataset }, { id: string; input: CosUpdateDatasetInput }>(\n COS_UPDATE_DATASET_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n }\n );\n\nexport const useCosPublishDatasetMutation = () =>\n useMutation<{ cosPublishDataset: CosDataset }, { id: string }>(COS_PUBLISH_DATASET_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n });\n\nexport const useCosArchiveDatasetMutation = () =>\n useMutation<{ cosArchiveDataset: boolean }, { id: string }>(COS_ARCHIVE_DATASET_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n });\n\nexport const useCosAddSchemaFieldMutation = () =>\n useMutation<{ cosAddSchemaField: CosSchemaField }, { input: CosAddSchemaFieldInput }>(\n COS_ADD_SCHEMA_FIELD_MUTATION,\n { errorPolicy: 'all', onError: onMutationError }\n );\n\nexport const useCosCreateSourceMutation = () =>\n useMutation<{ cosCreateSource: CosSource }, { input: CosCreateSourceInput }>(\n COS_CREATE_SOURCE_MUTATION,\n { errorPolicy: 'all', onError: onMutationError, refetchQueries: [{ query: COS_SOURCES_QUERY }] }\n );\n\nexport const useCosUpdateSourceMutation = () =>\n useMutation<{ cosUpdateSource: CosSource }, { id: string; input: CosUpdateSourceInput }>(\n COS_UPDATE_SOURCE_MUTATION,\n { errorPolicy: 'all', onError: onMutationError, refetchQueries: [{ query: COS_SOURCES_QUERY }] }\n );\n\nexport const useCosMarkSourceSyncedMutation = () =>\n useMutation<{ cosMarkSourceSynced: CosSource }, { id: string }>(COS_MARK_SOURCE_SYNCED_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_SOURCES_QUERY }],\n });\n\nexport const useCosArchiveSourceMutation = () =>\n useMutation<{ cosArchiveSource: boolean }, { id: string }>(COS_ARCHIVE_SOURCE_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_SOURCES_QUERY }],\n });\n\nexport const useCosCreateCollectionMutation = () =>\n useMutation<{ cosCreateCollection: CosCollection }, { input: CosCreateCollectionInput }>(\n COS_CREATE_COLLECTION_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_COLLECTIONS_QUERY }],\n }\n );\n\nexport const useCosUpdateCollectionMutation = () =>\n useMutation<\n { cosUpdateCollection: CosCollection },\n { id: string; input: CosUpdateCollectionInput }\n >(COS_UPDATE_COLLECTION_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_COLLECTIONS_QUERY }],\n });\n\nexport const useCosArchiveCollectionMutation = () =>\n useMutation<{ cosArchiveCollection: boolean }, { id: string }>(COS_ARCHIVE_COLLECTION_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_COLLECTIONS_QUERY }],\n });\n\nexport const useCosCreatePipelineMutation = () =>\n useMutation<{ cosCreatePipeline: CosPipeline }, { input: CosCreatePipelineInput }>(\n COS_CREATE_PIPELINE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_PIPELINES_QUERY }],\n }\n );\n\nexport const useCosUpdatePipelineMutation = () =>\n useMutation<{ cosUpdatePipeline: CosPipeline }, { id: string; input: CosUpdatePipelineInput }>(\n COS_UPDATE_PIPELINE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_PIPELINES_QUERY }],\n }\n );\n\nexport const useCosArchivePipelineMutation = () =>\n useMutation<{ cosArchivePipeline: boolean }, { id: string }>(COS_ARCHIVE_PIPELINE_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_PIPELINES_QUERY }],\n });\n\nexport const useCosStartRunMutation = () =>\n useMutation<{ cosStartRun: CosPipelineRun }, { input: CosStartRunInput }>(\n COS_START_RUN_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_RUNS_QUERY }],\n }\n );\n\nexport const useCosTransitionRunMutation = () =>\n useMutation<{ cosTransitionRun: CosPipelineRun }, { id: string; status: CosRunStatus }>(\n COS_TRANSITION_RUN_MUTATION,\n { errorPolicy: 'all', onError: onMutationError, refetchQueries: [{ query: COS_RUNS_QUERY }] }\n );\n\nexport const useCosAddRunStepMutation = () =>\n useMutation<{ cosAddRunStep: CosPipelineStep }, { input: CosAddRunStepInput }>(\n COS_ADD_RUN_STEP_MUTATION,\n { errorPolicy: 'all', onError: onMutationError }\n );\n\nexport const useCosCreateNotebookMutation = () =>\n useMutation<{ cosCreateNotebook: CosNotebook }, { input: CosCreateNotebookInput }>(\n COS_CREATE_NOTEBOOK_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_NOTEBOOKS_QUERY }],\n }\n );\n\nexport const useCosUpdateNotebookMutation = () =>\n useMutation<{ cosUpdateNotebook: CosNotebook }, { id: string; input: CosUpdateNotebookInput }>(\n COS_UPDATE_NOTEBOOK_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_NOTEBOOKS_QUERY }],\n }\n );\n\nexport const useCosArchiveNotebookMutation = () =>\n useMutation<{ cosArchiveNotebook: boolean }, { id: string }>(COS_ARCHIVE_NOTEBOOK_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_NOTEBOOKS_QUERY }],\n });\n\nexport const useCosRunAnalysisMutation = () =>\n useMutation<{ cosRunAnalysis: CosAnalysis }, { input: CosRunAnalysisInput }>(\n COS_RUN_ANALYSIS_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ANALYSES_QUERY }],\n }\n );\n\nexport const useCosCompleteAnalysisMutation = () =>\n useMutation<\n { cosCompleteAnalysis: CosAnalysis },\n {\n id: string;\n status: Extract<CosAnalysisStatus, 'COMPLETED' | 'FAILED'>;\n results?: Record<string, unknown>;\n outputFileId?: string;\n }\n >(COS_COMPLETE_ANALYSIS_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ANALYSES_QUERY }],\n });\n\nexport const useCosCreateReleaseMutation = () =>\n useMutation<{ cosCreateRelease: CosRelease }, { input: CosCreateReleaseInput }>(\n COS_CREATE_RELEASE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_RELEASES_QUERY }],\n }\n );\n\nexport const useCosPublishReleaseMutation = () =>\n useMutation<{ cosPublishRelease: CosRelease }, { id: string; doi?: string }>(\n COS_PUBLISH_RELEASE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_RELEASES_QUERY }],\n }\n );\n\nexport const useCosGrantAccessMutation = () =>\n useMutation<{ cosGrantAccess: CosDataAccessGrant }, { input: CosGrantAccessInput }>(\n COS_GRANT_ACCESS_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ACCESS_GRANTS_QUERY }],\n }\n );\n\nexport const useCosRevokeAccessMutation = () =>\n useMutation<{ cosRevokeAccess: CosDataAccessGrant }, { id: string }>(COS_REVOKE_ACCESS_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ACCESS_GRANTS_QUERY }],\n });\n"],"mappings":";;;;AAwBA,IAAM,KAAmB,MAA2B;CAClD,EAAO,MAAM,wBAAwB,EAAM,WAAW,mBAAmB;AAC3E;AAgdgC,CAAG;;;;;AAMnC,IAAa,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CxB,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDvB,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BvB,IAAmB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;GAk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AE,aAAa;CAAO,SAAS;CAAiB,gBAAgB,CAAC,EAAE,OAAO,EAAe,CAAC;AAAE,CAC9F,GAEW,WACX,EACE,GACA;CAAE,aAAa;CAAO,SAAS;AAAgB,CACjD,GAEW,UACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAoB,CAAC;AACjD,CACF,GAEW,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAoB,CAAC;AACjD,CACF,GAEW,WACX,EAA6D,GAA+B;CAC1F,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAoB,CAAC;AACjD,CAAC,GAEU,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CACF,GAEW,WACX,EAQE,GAAgC;CAChC,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CAAC,GAEU,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CACF,GAEW,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CACF,GAEW,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAwB,CAAC;AACrD,CACF,GAEW,WACX,EAAqE,GAA4B;CAC/F,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAwB,CAAC;AACrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"cosmicApi.js","names":[],"sources":["../../../src/cosmicintersection/api/cosmicApi.ts"],"sourcesContent":["/**\n * cosmicApi — hand-written typed data layer for the CosmicIntersection MFE.\n *\n * Mirrors the pattern in microfe-eventfullymanaged's eventApi.ts: inline `gql`\n * documents + `@apollo/client/react` hooks, with hand-written response/variables\n * types that track the wspace-cosmicintersection-svc subgraph SDL exactly. The\n * Apollo client is provided by the HOST app shell via React context (integrated\n * mode) — this module never constructs a client. Every `cos*` operation runs on\n * the workspace gateway (the default client in context).\n *\n * Scalar mapping: BigInt -> string, JSON -> Record<string, unknown>,\n * DateTime -> string (ISO).\n */\nimport { gql, type ErrorLike } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\n\nimport { notify } from '../lib/toast';\n\n/**\n * Shared mutation error sink. The gateway client runs with `errorPolicy: 'all'`,\n * so in-band GraphQL errors also invoke `onError`; wiring this on every write\n * mutation guarantees a failure is always surfaced to the user even if a caller\n * forgets to inspect the resolved result.\n */\nconst onMutationError = (error: ErrorLike): void => {\n notify.error('Something went wrong', error.message || 'Please try again.');\n};\n\n// ============================================================================\n// ENUMS (string-literal unions — exact SDL values)\n// ============================================================================\n\nexport type CosDatasetStatus = 'DRAFT' | 'INGESTING' | 'AVAILABLE' | 'DEPRECATED' | 'ARCHIVED';\nexport type CosAccessLevel = 'PUBLIC' | 'WORKSPACE' | 'RESTRICTED' | 'EMBARGOED';\nexport type CosSourceType =\n | 'TELESCOPE'\n | 'SATELLITE'\n | 'GROUND_SENSOR'\n | 'ARCHIVE'\n | 'API'\n | 'STREAM'\n | 'FILE_DROP'\n | 'SIMULATION';\nexport type CosSourceStatus =\n 'CONFIGURING' | 'CONNECTED' | 'SYNCING' | 'DEGRADED' | 'ERROR' | 'DISABLED';\nexport type CosFieldType =\n | 'STRING'\n | 'INTEGER'\n | 'FLOAT'\n | 'BOOLEAN'\n | 'TIMESTAMP'\n | 'COORDINATE'\n | 'SPECTRUM'\n | 'GEOMETRY'\n | 'IMAGE_REF'\n | 'JSON';\nexport type CosPipelineStatus = 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';\nexport type CosPipelineTrigger = 'MANUAL' | 'SCHEDULED' | 'ON_INGEST' | 'WEBHOOK';\nexport type CosRunStatus = 'QUEUED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED';\n/**\n * Full SDL vocabulary. The four geospatial kinds are recognised values a step\n * can already carry (BOFF-4355) — only RASTER_CALC has an execution backend, so\n * they are readable/renderable but are deliberately not offered as authoring\n * options in the add-step form.\n */\nexport type CosStepKind =\n | 'INGEST'\n | 'CALIBRATE'\n | 'TRANSFORM'\n | 'ANALYZE'\n | 'EXPORT'\n | 'NOTIFY'\n | 'RASTER_CALC'\n | 'REPROJECT'\n | 'TILE'\n | 'ZONAL_STATS';\nexport type CosNotebookStatus = 'DRAFT' | 'RUNNING' | 'PUBLISHED' | 'ARCHIVED';\nexport type CosAnalysisStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';\nexport type CosReleaseStatus = 'DRAFT' | 'UNDER_REVIEW' | 'PUBLISHED' | 'RETRACTED';\nexport type CosGrantStatus = 'PENDING' | 'ACTIVE' | 'EXPIRED' | 'REVOKED';\n\n// ============================================================================\n// ENTITY TYPES\n// ============================================================================\n\n/** Federated wspace-files File stub — only `{ id }` is resolvable in this subgraph. */\nexport interface CosFileRef {\n id: string;\n}\n\n/** An entity selected id-only, where the operation needs its existence, not its body. */\nexport interface CosIdRef {\n id: string;\n}\n\n/**\n * Per-parent cap the subgraph applies to every relation field\n * (`capPerGroup(rows, key, DEFAULT_LIMIT)` in wspace-cosmicintersection-svc's\n * dataloaders — DEFAULT_LIMIT is 50).\n *\n * A relation array of exactly this length means \"at least this many\", NOT an\n * exact total: render it as `50+`, never as a precise count.\n */\nexport const COS_RELATION_PAGE_SIZE = 50;\n\nexport interface CosSchemaField {\n id: string;\n workspaceId: string;\n datasetId: string;\n name: string;\n fieldType: CosFieldType;\n unit?: string | null;\n description?: string | null;\n nullable: boolean;\n position: number;\n provenance?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosDataset {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n status: CosDatasetStatus;\n accessLevel: CosAccessLevel;\n format?: string | null;\n sourceId?: string | null;\n collectionId?: string | null;\n /** BigInt returned as a numeric string. */\n rowCount: string;\n /** BigInt returned as a numeric string. */\n sizeBytes: string;\n version: number;\n lineageCaptured: boolean;\n coverage?: Record<string, unknown> | null;\n ingestedAt?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relations — only present when the operation selects them (detail queries).\n source?: CosSource | null;\n collection?: CosCollection | null;\n file?: CosFileRef | null;\n schemaFields?: CosSchemaField[];\n}\n\nexport interface CosSource {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n type: CosSourceType;\n status: CosSourceStatus;\n endpoint?: string | null;\n config?: Record<string, unknown> | null;\n lastSyncedAt?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relation — present only on detail queries.\n datasets?: CosDataset[];\n}\n\nexport interface CosCollection {\n id: string;\n workspaceId: string;\n name: string;\n slug?: string | null;\n description?: string | null;\n isPublic: boolean;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relation — present only on detail queries.\n datasets?: CosDataset[];\n}\n\nexport interface CosPipeline {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n status: CosPipelineStatus;\n trigger: CosPipelineTrigger;\n schedule?: string | null;\n definition?: Record<string, unknown> | null;\n version: number;\n lastRunAt?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relation — present only on detail queries.\n runs?: CosPipelineRun[];\n}\n\nexport interface CosPipelineRun {\n id: string;\n workspaceId: string;\n pipelineId: string;\n runNumber: number;\n status: CosRunStatus;\n datasetId?: string | null;\n params?: Record<string, unknown> | null;\n metrics?: Record<string, unknown> | null;\n triggeredBy?: string | null;\n startedAt?: string | null;\n finishedAt?: string | null;\n durationMs?: number | null;\n errorMessage?: string | null;\n createdAt: string;\n updatedAt: string;\n // Relations — present only on detail queries.\n pipeline?: CosPipeline | null;\n steps?: CosPipelineStep[];\n}\n\nexport interface CosPipelineStep {\n id: string;\n workspaceId: string;\n runId: string;\n name: string;\n kind: CosStepKind;\n position: number;\n status: CosRunStatus;\n inputs?: Record<string, unknown> | null;\n outputs?: Record<string, unknown> | null;\n logsRef?: string | null;\n startedAt?: string | null;\n finishedAt?: string | null;\n durationMs?: number | null;\n errorMessage?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosNotebook {\n id: string;\n workspaceId: string;\n title: string;\n description?: string | null;\n status: CosNotebookStatus;\n runtime?: string | null;\n environment?: Record<string, unknown> | null;\n datasetIds: string[];\n isShared: boolean;\n shareSlug?: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n // Relations — present only on detail queries.\n file?: CosFileRef | null;\n analyses?: CosAnalysis[];\n releases?: CosRelease[];\n}\n\nexport interface CosAnalysis {\n id: string;\n workspaceId: string;\n title: string;\n status: CosAnalysisStatus;\n method?: string | null;\n aiAssisted: boolean;\n notebookId?: string | null;\n datasetId?: string | null;\n results?: Record<string, unknown> | null;\n outputFile?: CosFileRef | null;\n startedAt?: string | null;\n finishedAt?: string | null;\n errorMessage?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosRelease {\n id: string;\n workspaceId: string;\n title: string;\n version: string;\n status: CosReleaseStatus;\n abstract?: string | null;\n authors: string[];\n datasetIds: string[];\n notebookId?: string | null;\n doi?: string | null;\n license?: string | null;\n publishedAt?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CosDataAccessGrant {\n id: string;\n workspaceId: string;\n datasetId: string;\n granteeId: string;\n status: CosGrantStatus;\n scopes: string[];\n reason?: string | null;\n grantedAt?: string | null;\n expiresAt?: string | null;\n revokedAt?: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\n// ============================================================================\n// PAGINATION / CONNECTIONS\n// ============================================================================\n\nexport interface CosPageInfo {\n hasMore: boolean;\n cursor?: string | null;\n}\n\nexport interface CosConnection<T> {\n items: T[];\n pageInfo: CosPageInfo;\n}\n\n/** Offset-based pagination input (PaginationInput in the SDL; limit defaults to 50). */\nexport interface CosPaginationInput {\n limit?: number;\n offset?: number;\n cursor?: string;\n}\n\n// ============================================================================\n// INPUT TYPES\n// ============================================================================\n\nexport interface CosCreateDatasetInput {\n name: string;\n description?: string;\n status?: CosDatasetStatus;\n accessLevel?: CosAccessLevel;\n format?: string;\n sourceId?: string;\n collectionId?: string;\n fileId?: string;\n coverage?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosUpdateDatasetInput {\n name?: string;\n description?: string;\n accessLevel?: CosAccessLevel;\n format?: string;\n collectionId?: string;\n coverage?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosAddSchemaFieldInput {\n datasetId: string;\n name: string;\n fieldType?: CosFieldType;\n unit?: string;\n description?: string;\n nullable?: boolean;\n position?: number;\n provenance?: string;\n}\n\nexport interface CosCreateSourceInput {\n name: string;\n type?: CosSourceType;\n status?: CosSourceStatus;\n description?: string;\n endpoint?: string;\n credentialRef?: string;\n config?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosUpdateSourceInput {\n name?: string;\n type?: CosSourceType;\n status?: CosSourceStatus;\n description?: string;\n endpoint?: string;\n credentialRef?: string;\n config?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosCreateCollectionInput {\n name: string;\n slug?: string;\n description?: string;\n isPublic?: boolean;\n tags?: string[];\n}\n\n/** All fields optional — only the provided keys are updated (CosUpdateCollectionInput in the SDL). */\nexport interface CosUpdateCollectionInput {\n name?: string;\n slug?: string;\n description?: string;\n isPublic?: boolean;\n tags?: string[];\n}\n\nexport interface CosCreatePipelineInput {\n name: string;\n description?: string;\n trigger?: CosPipelineTrigger;\n schedule?: string;\n definition?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosUpdatePipelineInput {\n name?: string;\n description?: string;\n status?: CosPipelineStatus;\n trigger?: CosPipelineTrigger;\n schedule?: string;\n definition?: Record<string, unknown>;\n tags?: string[];\n}\n\nexport interface CosStartRunInput {\n pipelineId: string;\n datasetId?: string;\n params?: Record<string, unknown>;\n}\n\nexport interface CosAddRunStepInput {\n runId: string;\n name: string;\n kind?: CosStepKind;\n inputs?: Record<string, unknown>;\n position?: number;\n}\n\nexport interface CosCreateNotebookInput {\n title: string;\n description?: string;\n runtime?: string;\n environment?: Record<string, unknown>;\n datasetIds?: string[];\n fileId?: string;\n tags?: string[];\n}\n\nexport interface CosUpdateNotebookInput {\n title?: string;\n description?: string;\n status?: CosNotebookStatus;\n runtime?: string;\n environment?: Record<string, unknown>;\n datasetIds?: string[];\n isShared?: boolean;\n shareSlug?: string;\n tags?: string[];\n}\n\nexport interface CosRunAnalysisInput {\n title: string;\n method?: string;\n aiAssisted?: boolean;\n notebookId?: string;\n datasetId?: string;\n}\n\nexport interface CosCreateReleaseInput {\n title: string;\n version?: string;\n abstract?: string;\n authors?: string[];\n datasetIds?: string[];\n notebookId?: string;\n license?: string;\n}\n\nexport interface CosGrantAccessInput {\n datasetId: string;\n granteeId: string;\n scopes?: string[];\n reason?: string;\n expiresAt?: string;\n}\n\n// ============================================================================\n// GQL DOCUMENTS — QUERIES\n// ============================================================================\n\nexport const COS_HEALTH_QUERY = gql`\n query CosHealth {\n cosHealth\n }\n`;\n\nexport const COS_DATASETS_QUERY = gql`\n query CosListDatasets(\n $q: String\n $accessLevel: CosAccessLevel\n $format: String\n $collectionId: ID\n $sourceId: ID\n $status: CosDatasetStatus\n $pagination: PaginationInput\n ) {\n cosListDatasets(\n q: $q\n accessLevel: $accessLevel\n format: $format\n collectionId: $collectionId\n sourceId: $sourceId\n status: $status\n pagination: $pagination\n ) {\n items {\n id\n workspaceId\n name\n description\n status\n accessLevel\n format\n sourceId\n collectionId\n rowCount\n sizeBytes\n version\n lineageCaptured\n ingestedAt\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_DATASET_QUERY = gql`\n query CosDataset($id: ID!) {\n cosDataset(id: $id) {\n id\n workspaceId\n name\n description\n status\n accessLevel\n format\n sourceId\n collectionId\n rowCount\n sizeBytes\n version\n lineageCaptured\n coverage\n ingestedAt\n tags\n createdAt\n updatedAt\n file {\n id\n }\n source {\n id\n name\n type\n status\n }\n collection {\n id\n name\n slug\n }\n schemaFields {\n id\n datasetId\n name\n fieldType\n unit\n description\n nullable\n position\n provenance\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const COS_SOURCES_QUERY = gql`\n query CosListSources(\n $type: CosSourceType\n $status: CosSourceStatus\n $pagination: PaginationInput\n ) {\n cosListSources(type: $type, status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n name\n description\n type\n status\n endpoint\n config\n lastSyncedAt\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_SOURCE_QUERY = gql`\n query CosSource($id: ID!) {\n cosSource(id: $id) {\n id\n workspaceId\n name\n description\n type\n status\n endpoint\n config\n lastSyncedAt\n tags\n createdAt\n updatedAt\n datasets {\n id\n name\n status\n accessLevel\n rowCount\n updatedAt\n }\n }\n }\n`;\n\n/**\n * `datasets` is selected id-only so each card can show how many datasets the\n * collection holds. The subgraph resolves it through `collectionDatasetsLoader`\n * (one batched query for the whole page) and filters to the datasets THIS actor\n * may read, so the length is the caller's visible count — capped at\n * `COS_RELATION_PAGE_SIZE`.\n */\nexport const COS_COLLECTIONS_QUERY = gql`\n query CosListCollections {\n cosListCollections {\n id\n workspaceId\n name\n slug\n description\n isPublic\n tags\n createdAt\n updatedAt\n datasets {\n id\n }\n }\n }\n`;\n\nexport const COS_COLLECTION_QUERY = gql`\n query CosCollection($id: ID!) {\n cosCollection(id: $id) {\n id\n workspaceId\n name\n slug\n description\n isPublic\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_SCHEMA_FIELDS_QUERY = gql`\n query CosListSchemaFields($datasetId: ID!) {\n cosListSchemaFields(datasetId: $datasetId) {\n id\n workspaceId\n datasetId\n name\n fieldType\n unit\n description\n nullable\n position\n provenance\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_PIPELINES_QUERY = gql`\n query CosListPipelines($status: CosPipelineStatus, $pagination: PaginationInput) {\n cosListPipelines(status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n name\n description\n status\n trigger\n schedule\n version\n lastRunAt\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_PIPELINE_QUERY = gql`\n query CosPipeline($id: ID!) {\n cosPipeline(id: $id) {\n id\n workspaceId\n name\n description\n status\n trigger\n schedule\n definition\n version\n lastRunAt\n tags\n createdAt\n updatedAt\n runs {\n id\n runNumber\n status\n datasetId\n startedAt\n finishedAt\n durationMs\n createdAt\n }\n }\n }\n`;\n\nexport const COS_RUNS_QUERY = gql`\n query CosListRuns($pipelineId: ID, $status: CosRunStatus, $pagination: PaginationInput) {\n cosListRuns(pipelineId: $pipelineId, status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n pipelineId\n runNumber\n status\n datasetId\n triggeredBy\n startedAt\n finishedAt\n durationMs\n errorMessage\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_RUN_QUERY = gql`\n query CosRun($id: ID!) {\n cosRun(id: $id) {\n id\n workspaceId\n pipelineId\n runNumber\n status\n datasetId\n params\n metrics\n triggeredBy\n startedAt\n finishedAt\n durationMs\n errorMessage\n createdAt\n updatedAt\n pipeline {\n id\n name\n status\n trigger\n schedule\n }\n steps {\n id\n runId\n name\n kind\n position\n status\n startedAt\n finishedAt\n durationMs\n errorMessage\n }\n }\n }\n`;\n\n/**\n * Other FAILED runs of the same pipeline, newest first, each with its steps so\n * the caller can name the step that broke. `steps` resolves through\n * `pipelineRunStepsLoader`, so the whole list costs one extra batched query.\n */\nexport const COS_PIPELINE_FAILED_RUNS_QUERY = gql`\n query CosPipelineFailedRuns($pipelineId: ID!, $pagination: PaginationInput) {\n cosListRuns(pipelineId: $pipelineId, status: FAILED, pagination: $pagination) {\n items {\n id\n workspaceId\n pipelineId\n runNumber\n status\n errorMessage\n startedAt\n finishedAt\n createdAt\n updatedAt\n steps {\n id\n runId\n name\n kind\n position\n status\n errorMessage\n }\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\n/**\n * Minimal dataset lookup — resolves an id held on another entity (e.g.\n * `CosPipelineRun.datasetId`, which the SDL exposes as a bare ID with no\n * relation field) to something a human can read. Returns null when the caller\n * has no read access to that dataset, so callers must fall back to the id.\n */\nexport const COS_DATASET_SUMMARY_QUERY = gql`\n query CosDatasetSummary($id: ID!) {\n cosDataset(id: $id) {\n id\n name\n status\n accessLevel\n }\n }\n`;\n\nexport const COS_RUN_STEPS_QUERY = gql`\n query CosListRunSteps($runId: ID!) {\n cosListRunSteps(runId: $runId) {\n id\n workspaceId\n runId\n name\n kind\n position\n status\n inputs\n outputs\n logsRef\n startedAt\n finishedAt\n durationMs\n errorMessage\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_NOTEBOOKS_QUERY = gql`\n query CosListNotebooks($status: CosNotebookStatus, $pagination: PaginationInput) {\n cosListNotebooks(status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n title\n description\n status\n runtime\n datasetIds\n isShared\n shareSlug\n tags\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_NOTEBOOK_QUERY = gql`\n query CosNotebook($id: ID!) {\n cosNotebook(id: $id) {\n id\n workspaceId\n title\n description\n status\n runtime\n environment\n datasetIds\n isShared\n shareSlug\n tags\n createdAt\n updatedAt\n file {\n id\n }\n analyses {\n id\n title\n status\n aiAssisted\n method\n createdAt\n }\n releases {\n id\n title\n version\n status\n publishedAt\n }\n }\n }\n`;\n\nexport const COS_ANALYSES_QUERY = gql`\n query CosListAnalyses($datasetId: ID, $notebookId: ID, $status: CosAnalysisStatus) {\n cosListAnalyses(datasetId: $datasetId, notebookId: $notebookId, status: $status) {\n id\n workspaceId\n title\n status\n method\n aiAssisted\n notebookId\n datasetId\n results\n outputFile {\n id\n }\n startedAt\n finishedAt\n errorMessage\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_RELEASES_QUERY = gql`\n query CosListReleases($status: CosReleaseStatus, $pagination: PaginationInput) {\n cosListReleases(status: $status, pagination: $pagination) {\n items {\n id\n workspaceId\n title\n version\n status\n abstract\n authors\n datasetIds\n notebookId\n doi\n license\n publishedAt\n createdAt\n updatedAt\n }\n pageInfo {\n hasMore\n cursor\n }\n }\n }\n`;\n\nexport const COS_ACCESS_GRANTS_QUERY = gql`\n query CosListAccessGrants($datasetId: ID, $status: CosGrantStatus) {\n cosListAccessGrants(datasetId: $datasetId, status: $status) {\n id\n workspaceId\n datasetId\n granteeId\n status\n scopes\n reason\n grantedAt\n expiresAt\n revokedAt\n createdAt\n updatedAt\n }\n }\n`;\n\n// ============================================================================\n// PLATFORM REUSE — activity feed (wspace-activity-svc, federated on the\n// workspace supergraph). The cos mutation-audit plugin already writes these\n// ActivityLog rows via be-sdk `trackOperation`; this is the read surface,\n// scoped to a single cos entity by `resourceId`. Only scalar fields are\n// selected so no cross-subgraph entity resolution is required.\n// ============================================================================\n\nexport const COS_ACTIVITY_BY_RESOURCE_QUERY = gql`\n query CosResourceActivity($filter: ActivityLogFilter) {\n getActivities(filter: $filter) {\n id\n action\n description\n resourceType\n resourceId\n userId\n timestamp\n }\n }\n`;\n\n// ============================================================================\n// GQL DOCUMENTS — MUTATIONS\n// ============================================================================\n\nexport const COS_CREATE_DATASET_MUTATION = gql`\n mutation CosCreateDataset($input: CosCreateDatasetInput!) {\n cosCreateDataset(input: $input) {\n id\n name\n status\n accessLevel\n sourceId\n collectionId\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_DATASET_MUTATION = gql`\n mutation CosUpdateDataset($id: ID!, $input: CosUpdateDatasetInput!) {\n cosUpdateDataset(id: $id, input: $input) {\n id\n name\n description\n status\n accessLevel\n format\n collectionId\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_PUBLISH_DATASET_MUTATION = gql`\n mutation CosPublishDataset($id: ID!) {\n cosPublishDataset(id: $id) {\n id\n status\n ingestedAt\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_DATASET_MUTATION = gql`\n mutation CosArchiveDataset($id: ID!) {\n cosArchiveDataset(id: $id)\n }\n`;\n\nexport const COS_ADD_SCHEMA_FIELD_MUTATION = gql`\n mutation CosAddSchemaField($input: CosAddSchemaFieldInput!) {\n cosAddSchemaField(input: $input) {\n id\n workspaceId\n datasetId\n name\n fieldType\n unit\n description\n nullable\n position\n provenance\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_CREATE_SOURCE_MUTATION = gql`\n mutation CosCreateSource($input: CosCreateSourceInput!) {\n cosCreateSource(input: $input) {\n id\n name\n type\n status\n endpoint\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_SOURCE_MUTATION = gql`\n mutation CosUpdateSource($id: ID!, $input: CosUpdateSourceInput!) {\n cosUpdateSource(id: $id, input: $input) {\n id\n name\n description\n type\n status\n endpoint\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_MARK_SOURCE_SYNCED_MUTATION = gql`\n mutation CosMarkSourceSynced($id: ID!) {\n cosMarkSourceSynced(id: $id) {\n id\n status\n lastSyncedAt\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_SOURCE_MUTATION = gql`\n mutation CosArchiveSource($id: ID!) {\n cosArchiveSource(id: $id)\n }\n`;\n\nexport const COS_CREATE_COLLECTION_MUTATION = gql`\n mutation CosCreateCollection($input: CosCreateCollectionInput!) {\n cosCreateCollection(input: $input) {\n id\n name\n slug\n description\n isPublic\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_COLLECTION_MUTATION = gql`\n mutation CosUpdateCollection($id: ID!, $input: CosUpdateCollectionInput!) {\n cosUpdateCollection(id: $id, input: $input) {\n id\n name\n slug\n description\n isPublic\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_COLLECTION_MUTATION = gql`\n mutation CosArchiveCollection($id: ID!) {\n cosArchiveCollection(id: $id)\n }\n`;\n\nexport const COS_CREATE_PIPELINE_MUTATION = gql`\n mutation CosCreatePipeline($input: CosCreatePipelineInput!) {\n cosCreatePipeline(input: $input) {\n id\n name\n status\n trigger\n schedule\n version\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_PIPELINE_MUTATION = gql`\n mutation CosUpdatePipeline($id: ID!, $input: CosUpdatePipelineInput!) {\n cosUpdatePipeline(id: $id, input: $input) {\n id\n name\n description\n status\n trigger\n schedule\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_PIPELINE_MUTATION = gql`\n mutation CosArchivePipeline($id: ID!) {\n cosArchivePipeline(id: $id)\n }\n`;\n\nexport const COS_START_RUN_MUTATION = gql`\n mutation CosStartRun($input: CosStartRunInput!) {\n cosStartRun(input: $input) {\n id\n pipelineId\n runNumber\n status\n datasetId\n startedAt\n createdAt\n }\n }\n`;\n\nexport const COS_TRANSITION_RUN_MUTATION = gql`\n mutation CosTransitionRun($id: ID!, $status: CosRunStatus!) {\n cosTransitionRun(id: $id, status: $status) {\n id\n status\n startedAt\n finishedAt\n durationMs\n updatedAt\n }\n }\n`;\n\nexport const COS_ADD_RUN_STEP_MUTATION = gql`\n mutation CosAddRunStep($input: CosAddRunStepInput!) {\n cosAddRunStep(input: $input) {\n id\n runId\n name\n kind\n position\n status\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_CREATE_NOTEBOOK_MUTATION = gql`\n mutation CosCreateNotebook($input: CosCreateNotebookInput!) {\n cosCreateNotebook(input: $input) {\n id\n title\n status\n runtime\n datasetIds\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_UPDATE_NOTEBOOK_MUTATION = gql`\n mutation CosUpdateNotebook($id: ID!, $input: CosUpdateNotebookInput!) {\n cosUpdateNotebook(id: $id, input: $input) {\n id\n title\n description\n status\n runtime\n datasetIds\n isShared\n shareSlug\n tags\n updatedAt\n }\n }\n`;\n\nexport const COS_ARCHIVE_NOTEBOOK_MUTATION = gql`\n mutation CosArchiveNotebook($id: ID!) {\n cosArchiveNotebook(id: $id)\n }\n`;\n\nexport const COS_RUN_ANALYSIS_MUTATION = gql`\n mutation CosRunAnalysis($input: CosRunAnalysisInput!) {\n cosRunAnalysis(input: $input) {\n id\n title\n status\n method\n aiAssisted\n notebookId\n datasetId\n startedAt\n createdAt\n }\n }\n`;\n\nexport const COS_COMPLETE_ANALYSIS_MUTATION = gql`\n mutation CosCompleteAnalysis(\n $id: ID!\n $status: CosAnalysisStatus!\n $results: JSON\n $outputFileId: ID\n ) {\n cosCompleteAnalysis(id: $id, status: $status, results: $results, outputFileId: $outputFileId) {\n id\n status\n results\n finishedAt\n errorMessage\n outputFile {\n id\n }\n updatedAt\n }\n }\n`;\n\nexport const COS_CREATE_RELEASE_MUTATION = gql`\n mutation CosCreateRelease($input: CosCreateReleaseInput!) {\n cosCreateRelease(input: $input) {\n id\n title\n version\n status\n authors\n datasetIds\n notebookId\n license\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_PUBLISH_RELEASE_MUTATION = gql`\n mutation CosPublishRelease($id: ID!, $doi: String) {\n cosPublishRelease(id: $id, doi: $doi) {\n id\n status\n doi\n publishedAt\n updatedAt\n }\n }\n`;\n\nexport const COS_GRANT_ACCESS_MUTATION = gql`\n mutation CosGrantAccess($input: CosGrantAccessInput!) {\n cosGrantAccess(input: $input) {\n id\n datasetId\n granteeId\n status\n scopes\n reason\n grantedAt\n expiresAt\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const COS_REVOKE_ACCESS_MUTATION = gql`\n mutation CosRevokeAccess($id: ID!) {\n cosRevokeAccess(id: $id) {\n id\n status\n revokedAt\n updatedAt\n }\n }\n`;\n\n// ============================================================================\n// RESPONSE / VARIABLES TYPES\n// ============================================================================\n\nexport interface CosHealthQueryData {\n cosHealth: string;\n}\n\nexport interface CosDatasetsQueryData {\n cosListDatasets: CosConnection<CosDataset>;\n}\nexport interface CosDatasetsQueryVars {\n /** Full-text search across dataset name/description/tags (backend `q` arg). */\n q?: string;\n accessLevel?: CosAccessLevel;\n format?: string;\n collectionId?: string;\n sourceId?: string;\n status?: CosDatasetStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosDatasetQueryData {\n cosDataset: CosDataset | null;\n}\n\nexport interface CosSourcesQueryData {\n cosListSources: CosConnection<CosSource>;\n}\nexport interface CosSourcesQueryVars {\n type?: CosSourceType;\n status?: CosSourceStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosSourceQueryData {\n cosSource: CosSource | null;\n}\n\n/**\n * Row shape of `cosListCollections` — same as `CosCollection` except `datasets`\n * is the id-only selection COS_COLLECTIONS_QUERY makes, so the list page can\n * size each collection without over-fetching dataset bodies.\n */\nexport interface CosCollectionListItem extends Omit<CosCollection, 'datasets'> {\n datasets: CosIdRef[];\n}\n\nexport interface CosCollectionsQueryData {\n cosListCollections: CosCollectionListItem[];\n}\n\nexport interface CosCollectionQueryData {\n cosCollection: CosCollection | null;\n}\n\nexport interface CosSchemaFieldsQueryData {\n cosListSchemaFields: CosSchemaField[];\n}\n\nexport interface CosPipelinesQueryData {\n cosListPipelines: CosConnection<CosPipeline>;\n}\nexport interface CosPipelinesQueryVars {\n status?: CosPipelineStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosPipelineQueryData {\n cosPipeline: CosPipeline | null;\n}\n\nexport interface CosRunsQueryData {\n cosListRuns: CosConnection<CosPipelineRun>;\n}\nexport interface CosRunsQueryVars {\n pipelineId?: string;\n status?: CosRunStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosRunQueryData {\n cosRun: CosPipelineRun | null;\n}\n\nexport interface CosRunStepsQueryData {\n cosListRunSteps: CosPipelineStep[];\n}\n\n/** Row of COS_PIPELINE_FAILED_RUNS_QUERY — `steps` is always selected. */\nexport interface CosFailedRunListItem extends Omit<CosPipelineRun, 'steps'> {\n steps: CosPipelineStep[];\n}\n\nexport interface CosPipelineFailedRunsQueryData {\n cosListRuns: CosConnection<CosFailedRunListItem>;\n}\nexport interface CosPipelineFailedRunsQueryVars {\n pipelineId: string;\n pagination?: CosPaginationInput;\n}\n\n/** Just enough of a dataset to render its name in place of a bare id. */\nexport interface CosDatasetSummary {\n id: string;\n name: string;\n status: CosDatasetStatus;\n accessLevel: CosAccessLevel;\n}\n\nexport interface CosDatasetSummaryQueryData {\n cosDataset: CosDatasetSummary | null;\n}\n\nexport interface CosNotebooksQueryData {\n cosListNotebooks: CosConnection<CosNotebook>;\n}\nexport interface CosNotebooksQueryVars {\n status?: CosNotebookStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosNotebookQueryData {\n cosNotebook: CosNotebook | null;\n}\n\nexport interface CosAnalysesQueryData {\n cosListAnalyses: CosAnalysis[];\n}\nexport interface CosAnalysesQueryVars {\n datasetId?: string;\n notebookId?: string;\n status?: CosAnalysisStatus;\n}\n\nexport interface CosReleasesQueryData {\n cosListReleases: CosConnection<CosRelease>;\n}\nexport interface CosReleasesQueryVars {\n status?: CosReleaseStatus;\n pagination?: CosPaginationInput;\n}\n\nexport interface CosAccessGrantsQueryData {\n cosListAccessGrants: CosDataAccessGrant[];\n}\nexport interface CosAccessGrantsQueryVars {\n datasetId?: string;\n status?: CosGrantStatus;\n}\n\n/** A single platform activity record (subset of wspace-activity-svc ActivityLog). */\nexport interface CosActivityEntry {\n id: string;\n action: string;\n description?: string | null;\n resourceType?: string | null;\n resourceId?: string | null;\n userId: string;\n timestamp: string;\n}\n\nexport interface CosActivityQueryData {\n getActivities: CosActivityEntry[];\n}\n\n/** Mirrors ActivityLogFilter — only the fields the cos activity panel needs. */\nexport interface CosActivityFilter {\n workspaceId?: string;\n resourceId?: string;\n resourceType?: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface CosActivityQueryVars {\n filter?: CosActivityFilter;\n}\n\n// ============================================================================\n// QUERY HOOKS\n// ============================================================================\n\nexport const useCosHealthQuery = () => useQuery<CosHealthQueryData>(COS_HEALTH_QUERY);\n\nexport const useCosDatasetsQuery = (variables: CosDatasetsQueryVars = {}) =>\n useQuery<CosDatasetsQueryData, CosDatasetsQueryVars>(COS_DATASETS_QUERY, { variables });\n\nexport const useCosDatasetQuery = (id: string) =>\n useQuery<CosDatasetQueryData, { id: string }>(COS_DATASET_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosSourcesQuery = (variables: CosSourcesQueryVars = {}) =>\n useQuery<CosSourcesQueryData, CosSourcesQueryVars>(COS_SOURCES_QUERY, { variables });\n\nexport const useCosSourceQuery = (id: string) =>\n useQuery<CosSourceQueryData, { id: string }>(COS_SOURCE_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosCollectionsQuery = () =>\n useQuery<CosCollectionsQueryData>(COS_COLLECTIONS_QUERY);\n\nexport const useCosCollectionQuery = (id: string) =>\n useQuery<CosCollectionQueryData, { id: string }>(COS_COLLECTION_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosSchemaFieldsQuery = (datasetId: string) =>\n useQuery<CosSchemaFieldsQueryData, { datasetId: string }>(COS_SCHEMA_FIELDS_QUERY, {\n variables: { datasetId },\n skip: !datasetId,\n });\n\nexport const useCosPipelinesQuery = (variables: CosPipelinesQueryVars = {}) =>\n useQuery<CosPipelinesQueryData, CosPipelinesQueryVars>(COS_PIPELINES_QUERY, { variables });\n\nexport const useCosPipelineQuery = (id: string) =>\n useQuery<CosPipelineQueryData, { id: string }>(COS_PIPELINE_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosRunsQuery = (variables: CosRunsQueryVars = {}) =>\n useQuery<CosRunsQueryData, CosRunsQueryVars>(COS_RUNS_QUERY, { variables });\n\nexport const useCosRunQuery = (id: string) =>\n useQuery<CosRunQueryData, { id: string }>(COS_RUN_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosRunStepsQuery = (runId: string) =>\n useQuery<CosRunStepsQueryData, { runId: string }>(COS_RUN_STEPS_QUERY, {\n variables: { runId },\n skip: !runId,\n });\n\n/**\n * Failed runs of one pipeline. Skipped until a pipelineId is known so the run\n * detail page can call it unconditionally while its own query is still loading.\n */\nexport const useCosPipelineFailedRunsQuery = (\n pipelineId: string | undefined,\n options: { limit?: number; skip?: boolean } = {}\n) =>\n useQuery<CosPipelineFailedRunsQueryData, CosPipelineFailedRunsQueryVars>(\n COS_PIPELINE_FAILED_RUNS_QUERY,\n {\n variables: {\n pipelineId: pipelineId ?? '',\n pagination: { limit: options.limit ?? 20, offset: 0 },\n },\n skip: !pipelineId || options.skip === true,\n }\n );\n\n/** Resolves a dataset id to its name. Returns null data when unreadable. */\nexport const useCosDatasetSummaryQuery = (id: string | null | undefined) =>\n useQuery<CosDatasetSummaryQueryData, { id: string }>(COS_DATASET_SUMMARY_QUERY, {\n variables: { id: id ?? '' },\n skip: !id,\n });\n\nexport const useCosNotebooksQuery = (variables: CosNotebooksQueryVars = {}) =>\n useQuery<CosNotebooksQueryData, CosNotebooksQueryVars>(COS_NOTEBOOKS_QUERY, { variables });\n\nexport const useCosNotebookQuery = (id: string) =>\n useQuery<CosNotebookQueryData, { id: string }>(COS_NOTEBOOK_QUERY, {\n variables: { id },\n skip: !id,\n });\n\nexport const useCosAnalysesQuery = (variables: CosAnalysesQueryVars = {}) =>\n useQuery<CosAnalysesQueryData, CosAnalysesQueryVars>(COS_ANALYSES_QUERY, { variables });\n\nexport const useCosReleasesQuery = (variables: CosReleasesQueryVars = {}) =>\n useQuery<CosReleasesQueryData, CosReleasesQueryVars>(COS_RELEASES_QUERY, { variables });\n\nexport const useCosAccessGrantsQuery = (variables: CosAccessGrantsQueryVars = {}) =>\n useQuery<CosAccessGrantsQueryData, CosAccessGrantsQueryVars>(COS_ACCESS_GRANTS_QUERY, {\n variables,\n });\n\n/**\n * Resource-scoped platform activity for a single cos entity. RBAC on\n * `getActivities` scopes on `filter.workspaceId`, so both a workspaceId and the\n * entity's resourceId are required — the query is skipped until both are known.\n */\nexport const useCosResourceActivityQuery = (params: {\n workspaceId?: string;\n resourceId: string;\n resourceType?: string;\n limit?: number;\n}) => {\n const { workspaceId, resourceId, resourceType, limit = 20 } = params;\n return useQuery<CosActivityQueryData, CosActivityQueryVars>(COS_ACTIVITY_BY_RESOURCE_QUERY, {\n variables: { filter: { workspaceId, resourceId, resourceType, limit } },\n skip: !workspaceId || !resourceId,\n fetchPolicy: 'cache-and-network',\n });\n};\n\n// ============================================================================\n// MUTATION HOOKS\n// ============================================================================\n\nexport const useCosCreateDatasetMutation = () =>\n useMutation<{ cosCreateDataset: CosDataset }, { input: CosCreateDatasetInput }>(\n COS_CREATE_DATASET_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n }\n );\n\nexport const useCosUpdateDatasetMutation = () =>\n useMutation<{ cosUpdateDataset: CosDataset }, { id: string; input: CosUpdateDatasetInput }>(\n COS_UPDATE_DATASET_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n }\n );\n\nexport const useCosPublishDatasetMutation = () =>\n useMutation<{ cosPublishDataset: CosDataset }, { id: string }>(COS_PUBLISH_DATASET_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n });\n\nexport const useCosArchiveDatasetMutation = () =>\n useMutation<{ cosArchiveDataset: boolean }, { id: string }>(COS_ARCHIVE_DATASET_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_DATASETS_QUERY }],\n });\n\nexport const useCosAddSchemaFieldMutation = () =>\n useMutation<{ cosAddSchemaField: CosSchemaField }, { input: CosAddSchemaFieldInput }>(\n COS_ADD_SCHEMA_FIELD_MUTATION,\n { errorPolicy: 'all', onError: onMutationError }\n );\n\nexport const useCosCreateSourceMutation = () =>\n useMutation<{ cosCreateSource: CosSource }, { input: CosCreateSourceInput }>(\n COS_CREATE_SOURCE_MUTATION,\n { errorPolicy: 'all', onError: onMutationError, refetchQueries: [{ query: COS_SOURCES_QUERY }] }\n );\n\nexport const useCosUpdateSourceMutation = () =>\n useMutation<{ cosUpdateSource: CosSource }, { id: string; input: CosUpdateSourceInput }>(\n COS_UPDATE_SOURCE_MUTATION,\n { errorPolicy: 'all', onError: onMutationError, refetchQueries: [{ query: COS_SOURCES_QUERY }] }\n );\n\nexport const useCosMarkSourceSyncedMutation = () =>\n useMutation<{ cosMarkSourceSynced: CosSource }, { id: string }>(COS_MARK_SOURCE_SYNCED_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_SOURCES_QUERY }],\n });\n\nexport const useCosArchiveSourceMutation = () =>\n useMutation<{ cosArchiveSource: boolean }, { id: string }>(COS_ARCHIVE_SOURCE_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_SOURCES_QUERY }],\n });\n\nexport const useCosCreateCollectionMutation = () =>\n useMutation<{ cosCreateCollection: CosCollection }, { input: CosCreateCollectionInput }>(\n COS_CREATE_COLLECTION_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_COLLECTIONS_QUERY }],\n }\n );\n\nexport const useCosUpdateCollectionMutation = () =>\n useMutation<\n { cosUpdateCollection: CosCollection },\n { id: string; input: CosUpdateCollectionInput }\n >(COS_UPDATE_COLLECTION_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_COLLECTIONS_QUERY }],\n });\n\nexport const useCosArchiveCollectionMutation = () =>\n useMutation<{ cosArchiveCollection: boolean }, { id: string }>(COS_ARCHIVE_COLLECTION_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_COLLECTIONS_QUERY }],\n });\n\nexport const useCosCreatePipelineMutation = () =>\n useMutation<{ cosCreatePipeline: CosPipeline }, { input: CosCreatePipelineInput }>(\n COS_CREATE_PIPELINE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_PIPELINES_QUERY }],\n }\n );\n\nexport const useCosUpdatePipelineMutation = () =>\n useMutation<{ cosUpdatePipeline: CosPipeline }, { id: string; input: CosUpdatePipelineInput }>(\n COS_UPDATE_PIPELINE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_PIPELINES_QUERY }],\n }\n );\n\nexport const useCosArchivePipelineMutation = () =>\n useMutation<{ cosArchivePipeline: boolean }, { id: string }>(COS_ARCHIVE_PIPELINE_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_PIPELINES_QUERY }],\n });\n\nexport const useCosStartRunMutation = () =>\n useMutation<{ cosStartRun: CosPipelineRun }, { input: CosStartRunInput }>(\n COS_START_RUN_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_RUNS_QUERY }],\n }\n );\n\nexport const useCosTransitionRunMutation = () =>\n useMutation<{ cosTransitionRun: CosPipelineRun }, { id: string; status: CosRunStatus }>(\n COS_TRANSITION_RUN_MUTATION,\n { errorPolicy: 'all', onError: onMutationError, refetchQueries: [{ query: COS_RUNS_QUERY }] }\n );\n\nexport const useCosAddRunStepMutation = () =>\n useMutation<{ cosAddRunStep: CosPipelineStep }, { input: CosAddRunStepInput }>(\n COS_ADD_RUN_STEP_MUTATION,\n { errorPolicy: 'all', onError: onMutationError }\n );\n\nexport const useCosCreateNotebookMutation = () =>\n useMutation<{ cosCreateNotebook: CosNotebook }, { input: CosCreateNotebookInput }>(\n COS_CREATE_NOTEBOOK_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_NOTEBOOKS_QUERY }],\n }\n );\n\nexport const useCosUpdateNotebookMutation = () =>\n useMutation<{ cosUpdateNotebook: CosNotebook }, { id: string; input: CosUpdateNotebookInput }>(\n COS_UPDATE_NOTEBOOK_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_NOTEBOOKS_QUERY }],\n }\n );\n\nexport const useCosArchiveNotebookMutation = () =>\n useMutation<{ cosArchiveNotebook: boolean }, { id: string }>(COS_ARCHIVE_NOTEBOOK_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_NOTEBOOKS_QUERY }],\n });\n\nexport const useCosRunAnalysisMutation = () =>\n useMutation<{ cosRunAnalysis: CosAnalysis }, { input: CosRunAnalysisInput }>(\n COS_RUN_ANALYSIS_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ANALYSES_QUERY }],\n }\n );\n\nexport const useCosCompleteAnalysisMutation = () =>\n useMutation<\n { cosCompleteAnalysis: CosAnalysis },\n {\n id: string;\n status: Extract<CosAnalysisStatus, 'COMPLETED' | 'FAILED'>;\n results?: Record<string, unknown>;\n outputFileId?: string;\n }\n >(COS_COMPLETE_ANALYSIS_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ANALYSES_QUERY }],\n });\n\nexport const useCosCreateReleaseMutation = () =>\n useMutation<{ cosCreateRelease: CosRelease }, { input: CosCreateReleaseInput }>(\n COS_CREATE_RELEASE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_RELEASES_QUERY }],\n }\n );\n\nexport const useCosPublishReleaseMutation = () =>\n useMutation<{ cosPublishRelease: CosRelease }, { id: string; doi?: string }>(\n COS_PUBLISH_RELEASE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_RELEASES_QUERY }],\n }\n );\n\nexport const useCosGrantAccessMutation = () =>\n useMutation<{ cosGrantAccess: CosDataAccessGrant }, { input: CosGrantAccessInput }>(\n COS_GRANT_ACCESS_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ACCESS_GRANTS_QUERY }],\n }\n );\n\nexport const useCosRevokeAccessMutation = () =>\n useMutation<{ cosRevokeAccess: CosDataAccessGrant }, { id: string }>(COS_REVOKE_ACCESS_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COS_ACCESS_GRANTS_QUERY }],\n });\n"],"mappings":";;;;AAwBA,IAAM,KAAmB,MAA2B;CAClD,EAAO,MAAM,wBAAwB,EAAM,WAAW,mBAAmB;AAC3E;AAgdgC,CAAG;;;;;AAMnC,IAAa,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CxB,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDvB,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BvB,IAAmB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;GAkCtB,IAAwB,CAAG;;;;;;;;;;;;;;;;;GAmB3B,IAAuB,CAAG;;;;;;;;;;;;;;;AAgBA,CAAG;;;;;;;;;;;;;;;;;;AAmB1C,IAAa,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;GAyBzB,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BxB,IAAiB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;GA0BpB,IAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CnB,IAAiC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCpC,IAA4B,CAAG;;;;;;;;;GAW/B,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;GAuBzB,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;GAyBzB,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCxB,IAAqB,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B,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CAAC,GAEU,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CACF,GAEW,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAmB,CAAC;AAChD,CACF,GAEW,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAwB,CAAC;AACrD,CACF,GAEW,WACX,EAAqE,GAA4B;CAC/F,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,EAAwB,CAAC;AACrD,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
|
|
4
3
|
export interface ActionMenuItem {
|
|
5
4
|
key: string;
|
|
6
5
|
label: string;
|
|
@@ -36,6 +35,6 @@ export interface ActionMenuProps {
|
|
|
36
35
|
* before the destructive handler fires. Safe inside clickable cards/rows — the
|
|
37
36
|
* trigger and content stop click propagation.
|
|
38
37
|
*/
|
|
39
|
-
export declare function ActionMenu({ ariaLabel, onView, onEdit, onDelete, entityName, deleteLabel: deleteLabelProp, extraItems, align, trigger, }: ActionMenuProps): import(
|
|
38
|
+
export declare function ActionMenu({ ariaLabel, onView, onEdit, onDelete, entityName, deleteLabel: deleteLabelProp, extraItems, align, trigger, }: ActionMenuProps): import('react').JSX.Element | null;
|
|
40
39
|
export default ActionMenu;
|
|
41
40
|
//# sourceMappingURL=ActionMenu.d.ts.map
|
|
@@ -5,6 +5,6 @@ export interface ActivityFeedPanelProps {
|
|
|
5
5
|
limit?: number;
|
|
6
6
|
emptyDescription?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function ActivityFeedPanel({ resourceId, resourceType, limit, emptyDescription, }: ActivityFeedPanelProps): import(
|
|
8
|
+
export declare function ActivityFeedPanel({ resourceId, resourceType, limit, emptyDescription, }: ActivityFeedPanelProps): import('react').JSX.Element;
|
|
9
9
|
export default ActivityFeedPanel;
|
|
10
10
|
//# sourceMappingURL=ActivityFeedPanel.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCosmicIntersection as e } from "../context/CosmicIntersectionContext.js";
|
|
2
2
|
import { useCosResourceActivityQuery as t } from "../api/cosmicApi.js";
|
|
3
|
-
import n from "./EmptyState.js";
|
|
4
|
-
import r from "./ErrorState.js";
|
|
5
|
-
import i from "./LoadingState.js";
|
|
3
|
+
import { EmptyState as n } from "./EmptyState.js";
|
|
4
|
+
import { ErrorState as r } from "./ErrorState.js";
|
|
5
|
+
import { LoadingState as i } from "./LoadingState.js";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import { History as s } from "lucide-react";
|
|
8
8
|
//#region src/cosmicintersection/components/ActivityFeedPanel.tsx
|
|
@@ -63,6 +63,6 @@ function u({ resourceId: u, resourceType: d, limit: f, emptyDescription: p }) {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
|
-
export { u as default };
|
|
66
|
+
export { u as ActivityFeedPanel, u as default };
|
|
67
67
|
|
|
68
68
|
//# sourceMappingURL=ActivityFeedPanel.js.map
|
|
@@ -9,6 +9,6 @@ export interface DiscussionPanelProps {
|
|
|
9
9
|
/** In-app deep-link used when the shell conversation provider is unavailable. */
|
|
10
10
|
fallbackHref?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare function DiscussionPanel({ entityType, entityId, title, widgetKey, fallbackHref, }: DiscussionPanelProps): import(
|
|
12
|
+
export declare function DiscussionPanel({ entityType, entityId, title, widgetKey, fallbackHref, }: DiscussionPanelProps): import('react').JSX.Element;
|
|
13
13
|
export default DiscussionPanel;
|
|
14
14
|
//# sourceMappingURL=DiscussionPanel.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./SafeLink.js";
|
|
1
|
+
import { SafeLink as e } from "./SafeLink.js";
|
|
2
2
|
import { Component as t, useMemo as n } from "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { MessagesSquare as a } from "lucide-react";
|
|
@@ -52,6 +52,6 @@ function u({ entityType: t, entityId: n, title: o, widgetKey: s, fallbackHref: u
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
|
-
export { u as default };
|
|
55
|
+
export { u as DiscussionPanel, u as default };
|
|
56
56
|
|
|
57
57
|
//# sourceMappingURL=DiscussionPanel.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
|
|
4
3
|
export interface EmptyStateProps {
|
|
5
4
|
icon?: LucideIcon;
|
|
6
5
|
title: string;
|
|
@@ -13,6 +12,6 @@ export interface EmptyStateProps {
|
|
|
13
12
|
* Friendly empty-state for list/detail surfaces with no records yet. Token-styled
|
|
14
13
|
* so it reads correctly in every theme.
|
|
15
14
|
*/
|
|
16
|
-
export declare function EmptyState({ icon: Icon, title, description, action, className, }: EmptyStateProps): import(
|
|
15
|
+
export declare function EmptyState({ icon: Icon, title, description, action, className, }: EmptyStateProps): import('react').JSX.Element;
|
|
17
16
|
export default EmptyState;
|
|
18
17
|
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FormEvent, ReactNode } from 'react';
|
|
2
|
-
|
|
3
2
|
export interface EntityFormShellProps {
|
|
4
3
|
title: string;
|
|
5
4
|
description?: string;
|
|
@@ -20,6 +19,6 @@ export interface EntityFormShellProps {
|
|
|
20
19
|
* footer. Error handling stays in the page via the `mutationSucceeded` + `notify`
|
|
21
20
|
* helpers; this shell owns layout and the submit/cancel controls only.
|
|
22
21
|
*/
|
|
23
|
-
export declare function EntityFormShell({ title, description, purpose, backLabel, onBack, onSubmit, submitLabel, savingLabel: savingLabelProp, saving, submitDisabled, children, }: EntityFormShellProps): import(
|
|
22
|
+
export declare function EntityFormShell({ title, description, purpose, backLabel, onBack, onSubmit, submitLabel, savingLabel: savingLabelProp, saving, submitDisabled, children, }: EntityFormShellProps): import('react').JSX.Element;
|
|
24
23
|
export default EntityFormShell;
|
|
25
24
|
//# sourceMappingURL=EntityFormShell.d.ts.map
|
|
@@ -15,6 +15,6 @@ export interface EntityTagsFieldProps {
|
|
|
15
15
|
* imports microfe-tags or hits a tag service. The parent form owns the array and
|
|
16
16
|
* passes it straight into the entity's create/update input.
|
|
17
17
|
*/
|
|
18
|
-
export declare function EntityTagsField({ value, onChange, label, placeholder, disabled, className, }: EntityTagsFieldProps): import(
|
|
18
|
+
export declare function EntityTagsField({ value, onChange, label, placeholder, disabled, className, }: EntityTagsFieldProps): import('react').JSX.Element;
|
|
19
19
|
export default EntityTagsField;
|
|
20
20
|
//# sourceMappingURL=EntityTagsField.d.ts.map
|
|
@@ -9,6 +9,6 @@ export interface ErrorStateProps {
|
|
|
9
9
|
* Token-styled error surface for failed queries. Uses the semantic status-error
|
|
10
10
|
* token family (never raw red) so it stays theme-correct and accessible.
|
|
11
11
|
*/
|
|
12
|
-
export declare function ErrorState({ title: titleProp, message: messageProp, onRetry, retryLabel: retryLabelProp, className, }: ErrorStateProps): import(
|
|
12
|
+
export declare function ErrorState({ title: titleProp, message: messageProp, onRetry, retryLabel: retryLabelProp, className, }: ErrorStateProps): import('react').JSX.Element;
|
|
13
13
|
export default ErrorState;
|
|
14
14
|
//# sourceMappingURL=ErrorState.d.ts.map
|
|
@@ -16,6 +16,6 @@ export interface FacetPanelProps {
|
|
|
16
16
|
onClear?: () => void;
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare function FacetPanel({ groups, selected, onToggle, onClear, className }: FacetPanelProps): import(
|
|
19
|
+
export declare function FacetPanel({ groups, selected, onToggle, onClear, className }: FacetPanelProps): import('react').JSX.Element;
|
|
20
20
|
export default FacetPanel;
|
|
21
21
|
//# sourceMappingURL=FacetPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacetPanel.js","names":[],"sources":["../../../src/cosmicintersection/components/FacetPanel.tsx"],"sourcesContent":["/**\n * FacetPanel — a grouped, multi-select facet filter with live result counts.\n *\n * Presentational only: the parent owns the selection state and computes the\n * per-option counts (typically by cross-filtering the current search pool). Each\n * option renders a checkbox, a label and a right-aligned tabular count. Styling is\n * token-only so it reads correctly in every theme. Zero-count options render\n * disabled + dimmed rather than disappearing, so the facet layout stays stable as\n * the user refines a search.\n *\n * Used by the DiscoveryPage (mockup 05) — Instrument / Access / Format /\n * Mission-Survey groups over the federated dataset catalog.\n */\nimport { Checkbox } from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../utils/cn';\n\nexport interface FacetOption {\n value: string;\n label: string;\n count: number;\n}\n\nexport interface FacetGroup {\n key: string;\n label: string;\n options: FacetOption[];\n}\n\nexport interface FacetPanelProps {\n groups: FacetGroup[];\n /** Selected values per group key. */\n selected: Record<string, string[]>;\n onToggle: (groupKey: string, value: string) => void;\n onClear?: () => void;\n className?: string;\n}\n\nexport function FacetPanel({ groups, selected, onToggle, onClear, className }: FacetPanelProps) {\n const totalSelected = Object.values(selected).reduce((sum, values) => sum + values.length, 0);\n\n return (\n <div className={cn('flex flex-col gap-6', className)}>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n Facet\n </span>\n {onClear && totalSelected > 0 ? (\n <button\n type=\"button\"\n onClick={onClear}\n className=\"rounded-button text-xs font-medium text-text-link transition-colors hover:text-text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus\"\n >\n Clear ({totalSelected})\n </button>\n ) : null}\n </div>\n\n {groups.map((group) => {\n const groupSelected = selected[group.key] ?? [];\n return (\n <div key={group.key} className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">{group.label}</h3>\n {group.options.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">No values yet</p>\n ) : (\n <ul className=\"space-y-0.5\">\n {group.options.map((option) => {\n const checked = groupSelected.includes(option.value);\n const disabled = option.count === 0 && !checked;\n return (\n <li key={option.value}>\n <label\n className={cn(\n 'flex cursor-pointer items-center gap-2 rounded-button px-2 py-1.5 text-sm transition-colors hover:bg-bg-sunken',\n disabled && 'cursor-not-allowed opacity-50 hover:bg-transparent'\n )}\n >\n <Checkbox\n checked={checked}\n disabled={disabled}\n onCheckedChange={() => onToggle(group.key, option.value)}\n aria-label={`${option.label} (${option.count})`}\n />\n <span className=\"min-w-0 flex-1 truncate text-text-primary\">\n {option.label}\n </span>\n <span className=\"shrink-0 tabular-nums text-xs text-text-secondary\">\n {option.count}\n </span>\n </label>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default FacetPanel;\n"],"mappings":";;;;AAsCA,SAAgB,EAAW,EAAE,WAAQ,aAAU,aAAU,YAAS,gBAA8B;CAC9F,IAAM,IAAgB,OAAO,OAAO,CAAQ,
|
|
1
|
+
{"version":3,"file":"FacetPanel.js","names":[],"sources":["../../../src/cosmicintersection/components/FacetPanel.tsx"],"sourcesContent":["/**\n * FacetPanel — a grouped, multi-select facet filter with live result counts.\n *\n * Presentational only: the parent owns the selection state and computes the\n * per-option counts (typically by cross-filtering the current search pool). Each\n * option renders a checkbox, a label and a right-aligned tabular count. Styling is\n * token-only so it reads correctly in every theme. Zero-count options render\n * disabled + dimmed rather than disappearing, so the facet layout stays stable as\n * the user refines a search.\n *\n * Used by the DiscoveryPage (mockup 05) — Instrument / Access / Format /\n * Mission-Survey groups over the federated dataset catalog.\n */\nimport { Checkbox } from '@burdenoff/fe-libs/ui';\n\nimport { cn } from '../utils/cn';\n\nexport interface FacetOption {\n value: string;\n label: string;\n count: number;\n}\n\nexport interface FacetGroup {\n key: string;\n label: string;\n options: FacetOption[];\n}\n\nexport interface FacetPanelProps {\n groups: FacetGroup[];\n /** Selected values per group key. */\n selected: Record<string, string[]>;\n onToggle: (groupKey: string, value: string) => void;\n onClear?: () => void;\n className?: string;\n}\n\nexport function FacetPanel({ groups, selected, onToggle, onClear, className }: FacetPanelProps) {\n const totalSelected = Object.values(selected).reduce((sum, values) => sum + values.length, 0);\n\n return (\n <div className={cn('flex flex-col gap-6', className)}>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n Facet\n </span>\n {onClear && totalSelected > 0 ? (\n <button\n type=\"button\"\n onClick={onClear}\n className=\"rounded-button text-xs font-medium text-text-link transition-colors hover:text-text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus\"\n >\n Clear ({totalSelected})\n </button>\n ) : null}\n </div>\n\n {groups.map((group) => {\n const groupSelected = selected[group.key] ?? [];\n return (\n <div key={group.key} className=\"space-y-2\">\n <h3 className=\"text-sm font-semibold text-text-primary\">{group.label}</h3>\n {group.options.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">No values yet</p>\n ) : (\n <ul className=\"space-y-0.5\">\n {group.options.map((option) => {\n const checked = groupSelected.includes(option.value);\n const disabled = option.count === 0 && !checked;\n return (\n <li key={option.value}>\n <label\n className={cn(\n 'flex cursor-pointer items-center gap-2 rounded-button px-2 py-1.5 text-sm transition-colors hover:bg-bg-sunken',\n disabled && 'cursor-not-allowed opacity-50 hover:bg-transparent'\n )}\n >\n <Checkbox\n checked={checked}\n disabled={disabled}\n onCheckedChange={() => onToggle(group.key, option.value)}\n aria-label={`${option.label} (${option.count})`}\n />\n <span className=\"min-w-0 flex-1 truncate text-text-primary\">\n {option.label}\n </span>\n <span className=\"shrink-0 tabular-nums text-xs text-text-secondary\">\n {option.count}\n </span>\n </label>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\nexport default FacetPanel;\n"],"mappings":";;;;AAsCA,SAAgB,EAAW,EAA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+1,4 @@
|
|
|
1
1
|
import { useQuery } from '@apollo/client/react';
|
|
2
|
-
|
|
3
2
|
export declare const GET_FILE_DOWNLOAD_URL: import('graphql').DocumentNode;
|
|
4
3
|
interface DownloadUrlResponse {
|
|
5
4
|
getFileDownloadUrl?: string | null;
|
|
@@ -30,6 +29,6 @@ export interface FileUploadFieldProps {
|
|
|
30
29
|
disabled?: boolean;
|
|
31
30
|
className?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare function FileUploadField({ value, onChange, label, hint, folderId, accept, disabled, className, }: FileUploadFieldProps): import(
|
|
32
|
+
export declare function FileUploadField({ value, onChange, label, hint, folderId, accept, disabled, className, }: FileUploadFieldProps): import('react').JSX.Element;
|
|
34
33
|
export default FileUploadField;
|
|
35
34
|
//# sourceMappingURL=FileUploadField.d.ts.map
|
|
@@ -143,6 +143,6 @@ function x({ value: p, onChange: h, label: v, hint: y, folderId: x, accept: S, d
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
146
|
-
export {
|
|
146
|
+
export { x as FileUploadField, x as default, v as GET_FILE_DOWNLOAD_URL, b as useFileDownloadUrl };
|
|
147
147
|
|
|
148
148
|
//# sourceMappingURL=FileUploadField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadField.js","names":[],"sources":["../../../src/cosmicintersection/components/FileUploadField.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useApolloClient, useQuery } from '@apollo/client/react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { Download, FileUp, Loader2, Paperclip, X } from 'lucide-react';\nimport { useId, useRef, useState } from 'react';\n\nimport { notify } from '../lib/toast';\nimport { useTr } from '../../shared/hooks/useTr';\n\n/**\n * Generic artifact uploader backed by wspace-files-svc.\n *\n * Dataset/notebook/analysis blobs are NOT stored by this MFE — they live in\n * wspace-files as `File` records, and the Cos entities only hold the returned\n * `fileId` (CosDataset.fileId / CosNotebook.fileId / cosCompleteAnalysis.outputFileId).\n * This control performs the shared 3-step presigned upload (initiateUpload → PUT\n * → completeUpload) inline — the same protocol microfe-files uses — and hands the\n * resulting `fileId` back via `onChange`. It never keeps a local blob store and\n * accepts any file type.\n */\n\n// initiateUpload returns a presigned PUT URL + the upload session id.\nconst INITIATE_UPLOAD = gql`\n mutation CosInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n session {\n id\n }\n uploadUrl\n }\n }\n`;\n\n// completeUpload finalizes the session and returns the committed File id.\nconst COMPLETE_UPLOAD = gql`\n mutation CosCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file {\n id\n }\n }\n }\n`;\n\n// Presigned, time-limited download URL for a stored File — used to render a\n// \"Download\" affordance for an already-attached artifact.\nexport const GET_FILE_DOWNLOAD_URL = gql`\n query CosGetFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }\n`;\n\n// One hour — artifact links are resolved on demand when a detail page renders.\nconst DOWNLOAD_URL_TTL_SECONDS = 3_600;\n\ninterface InitiateUploadResponse {\n initiateUpload?: { session?: { id: string } | null; uploadUrl?: string | null } | null;\n}\n\ninterface CompleteUploadResponse {\n completeUpload?: { fileId?: string | null; file?: { id: string } | null } | null;\n}\n\ninterface DownloadUrlResponse {\n getFileDownloadUrl?: string | null;\n}\n\n/**\n * Resolve a presigned download URL for an attached File id. Skips when no id is\n * present. Detail pages use this to render a \"Download\" link for a dataset/\n * notebook/analysis artifact.\n */\nexport function useFileDownloadUrl(fileId: string | null | undefined) {\n return useQuery<DownloadUrlResponse, { id: string; expiresIn: number }>(GET_FILE_DOWNLOAD_URL, {\n variables: { id: fileId ?? '', expiresIn: DOWNLOAD_URL_TTL_SECONDS },\n skip: !fileId,\n fetchPolicy: 'no-cache',\n });\n}\n\nexport interface FileUploadFieldProps {\n /** Current attached wspace-files File id, if any. */\n value?: string | null;\n /** Called with the new File id once an upload completes, or '' when cleared. */\n onChange: (fileId: string) => void | Promise<void>;\n label: string;\n hint?: string;\n /** Optional wspace-files folder id; when omitted the file lands in the root. */\n folderId?: string;\n /** `accept` attribute for the file input; defaults to any file type. */\n accept?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport function FileUploadField({\n value,\n onChange,\n label,\n hint,\n folderId,\n accept,\n disabled = false,\n className,\n}: FileUploadFieldProps) {\n const tr = useTr();\n const client = useApolloClient();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputId = useId();\n const [uploading, setUploading] = useState(false);\n const [fileName, setFileName] = useState<string | null>(null);\n\n const download = useFileDownloadUrl(uploading ? null : value);\n const downloadUrl = download.data?.getFileDownloadUrl ?? null;\n\n const handleSelect = async (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n // Reset the input so selecting the same file again re-triggers change.\n event.target.value = '';\n if (!file) {\n return;\n }\n\n setUploading(true);\n try {\n const extension = file.name.includes('.')\n ? file.name.substring(file.name.lastIndexOf('.') + 1)\n : '';\n const mimeType = file.type || 'application/octet-stream';\n\n const initiate = await client.mutate<InitiateUploadResponse>({\n mutation: INITIATE_UPLOAD,\n variables: {\n input: {\n fileName: file.name,\n fileSize: String(file.size),\n extension,\n mimeType,\n ...(folderId ? { folderId } : {}),\n },\n },\n });\n const session = initiate.data?.initiateUpload?.session;\n const uploadUrl = initiate.data?.initiateUpload?.uploadUrl;\n if (!session || !uploadUrl) {\n throw new Error(\n initiate.error?.message ??\n tr('cosmicintersection.common.uploadStartError', 'Could not start the upload.')\n );\n }\n\n await new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.addEventListener('load', () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`Upload failed with status ${xhr.status}`));\n }\n });\n xhr.addEventListener('error', () => reject(new Error('Upload network error')));\n xhr.addEventListener('abort', () => reject(new Error('Upload aborted')));\n xhr.open('PUT', uploadUrl);\n xhr.setRequestHeader('Content-Type', mimeType);\n xhr.send(file);\n });\n\n const complete = await client.mutate<CompleteUploadResponse>({\n mutation: COMPLETE_UPLOAD,\n variables: {\n input: {\n sessionId: session.id,\n fileSize: String(file.size),\n ...(folderId ? { folderId } : {}),\n },\n },\n });\n const uploadedId =\n complete.data?.completeUpload?.fileId ?? complete.data?.completeUpload?.file?.id;\n if (!uploadedId) {\n throw new Error(\n complete.error?.message ??\n tr(\n 'cosmicintersection.common.uploadConfirmError',\n 'The file was uploaded but not confirmed.'\n )\n );\n }\n\n setFileName(file.name);\n await onChange(uploadedId);\n notify.success(tr('cosmicintersection.common.uploadSuccess', 'File uploaded'));\n } catch (error) {\n notify.error(\n tr('cosmicintersection.common.uploadFailed', 'Upload failed'),\n error instanceof Error\n ? error.message\n : tr('cosmicintersection.common.uploadTryAgain', 'Please try again.')\n );\n } finally {\n setUploading(false);\n }\n };\n\n const clear = async () => {\n setFileName(null);\n await onChange('');\n };\n\n return (\n <div className={className}>\n <div className=\"flex flex-wrap items-center gap-3\">\n <div className=\"flex size-12 shrink-0 items-center justify-center rounded-card border border-dashed border-border-default bg-bg-sunken text-text-secondary\">\n <Paperclip className=\"size-5\" aria-hidden=\"true\" />\n </div>\n <div className=\"space-y-1\">\n <div className=\"flex items-center gap-2\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={disabled || uploading}\n onClick={() => inputRef.current?.click()}\n >\n {uploading ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <FileUp className=\"size-4\" />\n )}\n {uploading\n ? tr('cosmicintersection.common.uploading', 'Uploading…')\n : value\n ? tr('cosmicintersection.common.replaceFile', 'Replace file')\n : label}\n </Button>\n {value && !uploading ? (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => void clear()}\n disabled={disabled}\n >\n <X className=\"size-4\" />\n {tr('cosmicintersection.common.remove', 'Remove')}\n </Button>\n ) : null}\n </div>\n {value ? (\n <div className=\"flex flex-wrap items-center gap-2 text-xs text-text-secondary\">\n <span className=\"max-w-[16rem] truncate\">{fileName ?? `File ${value}`}</span>\n {downloadUrl ? (\n <a\n href={downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-text-primary underline-offset-2 hover:underline\"\n >\n <Download className=\"size-3.5\" aria-hidden=\"true\" />\n {tr('cosmicintersection.common.download', 'Download')}\n </a>\n ) : null}\n </div>\n ) : hint ? (\n <p className=\"text-xs text-text-secondary\">{hint}</p>\n ) : null}\n </div>\n </div>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n accept={accept}\n className=\"sr-only\"\n aria-label={label}\n onChange={(event) => void handleSelect(event)}\n />\n </div>\n );\n}\n\nexport default FileUploadField;\n"],"mappings":";;;;;;;;;AAsBA,IAAM,IAAkB,CAAG;;;;;;;;;GAYrB,IAAkB,CAAG;;;;;;;;;GAad,IAAwB,CAAG;;;;GAOlC,IAA2B;AAmBjC,SAAgB,EAAmB,GAAmC;CACpE,OAAO,EAAiE,GAAuB;EAC7F,WAAW;GAAE,IAAI,KAAU;GAAI,WAAW;EAAyB;EACnE,MAAM,CAAC;EACP,aAAa;CACf,CAAC;AACH;AAiBA,SAAgB,EAAgB,EAC9B,UACA,aACA,UACA,SACA,aACA,WACA,cAAW,IACX,gBACuB;CACvB,IAAM,IAAK,EAAM,GACX,IAAS,EAAgB,GACzB,IAAW,EAAgC,IAAI,GAC/C,IAAU,EAAM,GAChB,CAAC,GAAW,KAAgB,EAAS,EAAK,GAC1C,CAAC,GAAU,KAAe,EAAwB,IAAI,GAGtD,IADW,EAAmB,IAAY,OAAO,CACnC,EAAS,MAAM,sBAAsB,MAEnD,IAAe,OAAO,MAA+C;EACzE,IAAM,IAAO,EAAM,OAAO,QAAQ;EAElC,MAAM,OAAO,QAAQ,IAChB,GAIL;KAAa,EAAI;GACjB,IAAI;IACF,IAAM,IAAY,EAAK,KAAK,SAAS,GAAG,IACpC,EAAK,KAAK,UAAU,EAAK,KAAK,YAAY,G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,EAAG,sCAAsC,UAAU,CACnD;UACD,IACD;SACH,IACF,kBAAC,KAAD;KAAG,WAAU;eAA+B;IAAQ,CAAA,IAClD,IACD;KACF;MACL,kBAAC,SAAD;GACE,KAAK;GACL,IAAI;GACJ,MAAK;GACG;GACR,WAAU;GACV,cAAY;GACZ,WAAW,MAAU,KAAK,EAAa,CAAK;EAC7C,CAAA,CACE;;AAET"}
|
|
1
|
+
{"version":3,"file":"FileUploadField.js","names":[],"sources":["../../../src/cosmicintersection/components/FileUploadField.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useApolloClient, useQuery } from '@apollo/client/react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { Download, FileUp, Loader2, Paperclip, X } from 'lucide-react';\nimport { useId, useRef, useState } from 'react';\n\nimport { notify } from '../lib/toast';\nimport { useTr } from '../../shared/hooks/useTr';\n\n/**\n * Generic artifact uploader backed by wspace-files-svc.\n *\n * Dataset/notebook/analysis blobs are NOT stored by this MFE — they live in\n * wspace-files as `File` records, and the Cos entities only hold the returned\n * `fileId` (CosDataset.fileId / CosNotebook.fileId / cosCompleteAnalysis.outputFileId).\n * This control performs the shared 3-step presigned upload (initiateUpload → PUT\n * → completeUpload) inline — the same protocol microfe-files uses — and hands the\n * resulting `fileId` back via `onChange`. It never keeps a local blob store and\n * accepts any file type.\n */\n\n// initiateUpload returns a presigned PUT URL + the upload session id.\nconst INITIATE_UPLOAD = gql`\n mutation CosInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n session {\n id\n }\n uploadUrl\n }\n }\n`;\n\n// completeUpload finalizes the session and returns the committed File id.\nconst COMPLETE_UPLOAD = gql`\n mutation CosCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file {\n id\n }\n }\n }\n`;\n\n// Presigned, time-limited download URL for a stored File — used to render a\n// \"Download\" affordance for an already-attached artifact.\nexport const GET_FILE_DOWNLOAD_URL = gql`\n query CosGetFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }\n`;\n\n// One hour — artifact links are resolved on demand when a detail page renders.\nconst DOWNLOAD_URL_TTL_SECONDS = 3_600;\n\ninterface InitiateUploadResponse {\n initiateUpload?: { session?: { id: string } | null; uploadUrl?: string | null } | null;\n}\n\ninterface CompleteUploadResponse {\n completeUpload?: { fileId?: string | null; file?: { id: string } | null } | null;\n}\n\ninterface DownloadUrlResponse {\n getFileDownloadUrl?: string | null;\n}\n\n/**\n * Resolve a presigned download URL for an attached File id. Skips when no id is\n * present. Detail pages use this to render a \"Download\" link for a dataset/\n * notebook/analysis artifact.\n */\nexport function useFileDownloadUrl(fileId: string | null | undefined) {\n return useQuery<DownloadUrlResponse, { id: string; expiresIn: number }>(GET_FILE_DOWNLOAD_URL, {\n variables: { id: fileId ?? '', expiresIn: DOWNLOAD_URL_TTL_SECONDS },\n skip: !fileId,\n fetchPolicy: 'no-cache',\n });\n}\n\nexport interface FileUploadFieldProps {\n /** Current attached wspace-files File id, if any. */\n value?: string | null;\n /** Called with the new File id once an upload completes, or '' when cleared. */\n onChange: (fileId: string) => void | Promise<void>;\n label: string;\n hint?: string;\n /** Optional wspace-files folder id; when omitted the file lands in the root. */\n folderId?: string;\n /** `accept` attribute for the file input; defaults to any file type. */\n accept?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport function FileUploadField({\n value,\n onChange,\n label,\n hint,\n folderId,\n accept,\n disabled = false,\n className,\n}: FileUploadFieldProps) {\n const tr = useTr();\n const client = useApolloClient();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputId = useId();\n const [uploading, setUploading] = useState(false);\n const [fileName, setFileName] = useState<string | null>(null);\n\n const download = useFileDownloadUrl(uploading ? null : value);\n const downloadUrl = download.data?.getFileDownloadUrl ?? null;\n\n const handleSelect = async (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n // Reset the input so selecting the same file again re-triggers change.\n event.target.value = '';\n if (!file) {\n return;\n }\n\n setUploading(true);\n try {\n const extension = file.name.includes('.')\n ? file.name.substring(file.name.lastIndexOf('.') + 1)\n : '';\n const mimeType = file.type || 'application/octet-stream';\n\n const initiate = await client.mutate<InitiateUploadResponse>({\n mutation: INITIATE_UPLOAD,\n variables: {\n input: {\n fileName: file.name,\n fileSize: String(file.size),\n extension,\n mimeType,\n ...(folderId ? { folderId } : {}),\n },\n },\n });\n const session = initiate.data?.initiateUpload?.session;\n const uploadUrl = initiate.data?.initiateUpload?.uploadUrl;\n if (!session || !uploadUrl) {\n throw new Error(\n initiate.error?.message ??\n tr('cosmicintersection.common.uploadStartError', 'Could not start the upload.')\n );\n }\n\n await new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.addEventListener('load', () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`Upload failed with status ${xhr.status}`));\n }\n });\n xhr.addEventListener('error', () => reject(new Error('Upload network error')));\n xhr.addEventListener('abort', () => reject(new Error('Upload aborted')));\n xhr.open('PUT', uploadUrl);\n xhr.setRequestHeader('Content-Type', mimeType);\n xhr.send(file);\n });\n\n const complete = await client.mutate<CompleteUploadResponse>({\n mutation: COMPLETE_UPLOAD,\n variables: {\n input: {\n sessionId: session.id,\n fileSize: String(file.size),\n ...(folderId ? { folderId } : {}),\n },\n },\n });\n const uploadedId =\n complete.data?.completeUpload?.fileId ?? complete.data?.completeUpload?.file?.id;\n if (!uploadedId) {\n throw new Error(\n complete.error?.message ??\n tr(\n 'cosmicintersection.common.uploadConfirmError',\n 'The file was uploaded but not confirmed.'\n )\n );\n }\n\n setFileName(file.name);\n await onChange(uploadedId);\n notify.success(tr('cosmicintersection.common.uploadSuccess', 'File uploaded'));\n } catch (error) {\n notify.error(\n tr('cosmicintersection.common.uploadFailed', 'Upload failed'),\n error instanceof Error\n ? error.message\n : tr('cosmicintersection.common.uploadTryAgain', 'Please try again.')\n );\n } finally {\n setUploading(false);\n }\n };\n\n const clear = async () => {\n setFileName(null);\n await onChange('');\n };\n\n return (\n <div className={className}>\n <div className=\"flex flex-wrap items-center gap-3\">\n <div className=\"flex size-12 shrink-0 items-center justify-center rounded-card border border-dashed border-border-default bg-bg-sunken text-text-secondary\">\n <Paperclip className=\"size-5\" aria-hidden=\"true\" />\n </div>\n <div className=\"space-y-1\">\n <div className=\"flex items-center gap-2\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={disabled || uploading}\n onClick={() => inputRef.current?.click()}\n >\n {uploading ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <FileUp className=\"size-4\" />\n )}\n {uploading\n ? tr('cosmicintersection.common.uploading', 'Uploading…')\n : value\n ? tr('cosmicintersection.common.replaceFile', 'Replace file')\n : label}\n </Button>\n {value && !uploading ? (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => void clear()}\n disabled={disabled}\n >\n <X className=\"size-4\" />\n {tr('cosmicintersection.common.remove', 'Remove')}\n </Button>\n ) : null}\n </div>\n {value ? (\n <div className=\"flex flex-wrap items-center gap-2 text-xs text-text-secondary\">\n <span className=\"max-w-[16rem] truncate\">{fileName ?? `File ${value}`}</span>\n {downloadUrl ? (\n <a\n href={downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-text-primary underline-offset-2 hover:underline\"\n >\n <Download className=\"size-3.5\" aria-hidden=\"true\" />\n {tr('cosmicintersection.common.download', 'Download')}\n </a>\n ) : null}\n </div>\n ) : hint ? (\n <p className=\"text-xs text-text-secondary\">{hint}</p>\n ) : null}\n </div>\n </div>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n accept={accept}\n className=\"sr-only\"\n aria-label={label}\n onChange={(event) => void handleSelect(event)}\n />\n </div>\n );\n}\n\nexport default FileUploadField;\n"],"mappings":";;;;;;;;;AAsBA,IAAM,IAAkB,CAAG;;;;;;;;;GAYrB,IAAkB,CAAG;;;;;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,GAAD;MACE,MAAK;MACL,SAAQ;MACR,MAAK;MACL,UAAU,KAAY;MACtB,eAAe,EAAS,SAAS,MAAM;gBALzC,CAOG,IACC,kBAAC,GAAD,EAAS,WAAU,sBAAuB,CAAA,IAE1C,kBAAC,GAAD,EAAQ,WAAU,SAAU,CAAA,GAE7B,IACG,EAAG,uCAAuC,YAAY,IACtD,IACE,EAAG,yCAAyC,cAAc,IAC1D,CACA;SACP,KAAS,CAAC,IACT,kBAAC,GAAD;MACE,MAAK;MACL,SAAQ;MACR,MAAK;MACL,eAAe,KAAK,EAAM;MAChB;gBALZ,CAOE,kBAAC,GAAD,EAAG,WAAU,SAAU,CAAA,GACtB,EAAG,oCAAoC,QAAQ,CAC1C;UACN,IACD;QACJ,IACC,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD;MAAM,WAAU;gBAA0B,KAAY,QAAQ;KAAc,CAAA,GAC3E,IACC,kBAAC,KAAD;MACE,MAAM;MACN,QAAO;MACP,KAAI;MACJ,WAAU;gBAJZ,CAME,kBAAC,GAAD;OAAU,WAAU;OAAW,eAAY;MAAQ,CAAA,GAClD,EAAG,sCAAsC,UAAU,CACnD;UACD,IACD;SACH,IACF,kBAAC,KAAD;KAAG,WAAU;eAA+B;IAAQ,CAAA,IAClD,IACD;KACF;MACL,kBAAC,SAAD;GACE,KAAK;GACL,IAAI;GACJ,MAAK;GACG;GACR,WAAU;GACV,cAAY;GACZ,WAAW,MAAU,KAAK,EAAa,CAAK;EAC7C,CAAA,CACE;;AAET"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CosAnalysis, CosCollection, CosDataset, CosNotebook, CosPipeline, CosPipelineRun, CosRelease, CosSource } from '../api/cosmicApi';
|
|
2
|
-
|
|
3
2
|
export type LineageNodeType = 'source' | 'collection' | 'dataset' | 'run' | 'notebook' | 'analysis' | 'release';
|
|
4
3
|
export interface LineageNode {
|
|
5
4
|
/** Stable, unique within a model (e.g. `ds:<uuid>`). */
|
|
@@ -59,6 +58,6 @@ export interface LineageGraphProps {
|
|
|
59
58
|
onNavigate?: (route: string) => void;
|
|
60
59
|
className?: string;
|
|
61
60
|
}
|
|
62
|
-
export declare function LineageGraph({ model, mode, onNavigate, className }: LineageGraphProps): import(
|
|
61
|
+
export declare function LineageGraph({ model, mode, onNavigate, className }: LineageGraphProps): import('react').JSX.Element | null;
|
|
63
62
|
export default LineageGraph;
|
|
64
63
|
//# sourceMappingURL=LineageGraph.d.ts.map
|
|
@@ -383,6 +383,6 @@ function T({ model: a, mode: o = "full", onNavigate: s, className: c }) {
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
//#endregion
|
|
386
|
-
export {
|
|
386
|
+
export { T as LineageGraph, T as default, y as buildDatasetLineage, b as buildReleaseLineage };
|
|
387
387
|
|
|
388
388
|
//# sourceMappingURL=LineageGraph.js.map
|