@xpert-ai/plugin-live-dashboard 0.6.2 → 0.7.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/.xpertai-plugin/plugin.json +1 -1
- package/README.md +14 -2
- package/assets/explore/PROVENANCE.md +9 -0
- package/assets/explore/category-contribution.webp +0 -0
- package/assets/explore/ecommerce-operations.webp +0 -0
- package/assets/explore/extensions.svg +1 -0
- package/assets/explore/generation-prompts.json +107 -0
- package/assets/explore/global-assets.webp +0 -0
- package/assets/explore/hotel-cancellation.webp +0 -0
- package/assets/explore/hotel-operations.webp +0 -0
- package/assets/explore/insights.svg +1 -0
- package/assets/explore/knowledge.svg +1 -0
- package/assets/explore/legal-defense.webp +0 -0
- package/assets/explore/order-promotion.webp +0 -0
- package/assets/explore/outbound-travel.webp +0 -0
- package/assets/explore/schedule.svg +1 -0
- package/assets/explore/steam-market.webp +0 -0
- package/assets/explore/weather-alerts.webp +0 -0
- package/assets/library/catalog/README.md +11 -0
- package/assets/library/catalog/analysis-template-conversion-diagnosis.svg +1 -0
- package/assets/library/catalog/analysis-template-customer-lifecycle.svg +1 -0
- package/assets/library/catalog/analysis-template-growth-attribution.svg +1 -0
- package/assets/library/catalog/analysis-template-multi-criteria.svg +1 -0
- package/assets/library/catalog/analysis-template-regional-flow.svg +1 -0
- package/assets/library/catalog/analysis-template-risk-monitoring.svg +1 -0
- package/assets/library/catalog/component-analysis-note.svg +1 -0
- package/assets/library/catalog/component-box-plot.svg +1 -0
- package/assets/library/catalog/component-bullet.svg +1 -0
- package/assets/library/catalog/component-calendar-heatmap.svg +1 -0
- package/assets/library/catalog/component-collapsible-panel.svg +1 -0
- package/assets/library/catalog/component-combo-chart.svg +1 -0
- package/assets/library/catalog/component-content-panel.svg +1 -0
- package/assets/library/catalog/component-date-range.svg +1 -0
- package/assets/library/catalog/component-detail-table.svg +1 -0
- package/assets/library/catalog/component-donut.svg +1 -0
- package/assets/library/catalog/component-dumbbell.svg +1 -0
- package/assets/library/catalog/component-event-timeline.svg +1 -0
- package/assets/library/catalog/component-funnel.svg +1 -0
- package/assets/library/catalog/component-histogram.svg +1 -0
- package/assets/library/catalog/component-keyword-filter.svg +1 -0
- package/assets/library/catalog/component-matrix-heatmap.svg +1 -0
- package/assets/library/catalog/component-metric-card.svg +1 -0
- package/assets/library/catalog/component-metric-group.svg +1 -0
- package/assets/library/catalog/component-multi-series.svg +1 -0
- package/assets/library/catalog/component-number-range.svg +1 -0
- package/assets/library/catalog/component-option-filter.svg +1 -0
- package/assets/library/catalog/component-pareto.svg +1 -0
- package/assets/library/catalog/component-percent-stacked.svg +1 -0
- package/assets/library/catalog/component-pivot-table.svg +1 -0
- package/assets/library/catalog/component-radar.svg +1 -0
- package/assets/library/catalog/component-ranking.svg +1 -0
- package/assets/library/catalog/component-sankey.svg +1 -0
- package/assets/library/catalog/component-scatter-bubble.svg +1 -0
- package/assets/library/catalog/component-segmented-filter.svg +1 -0
- package/assets/library/catalog/component-small-multiples.svg +1 -0
- package/assets/library/catalog/component-sunburst.svg +1 -0
- package/assets/library/catalog/component-tabbed-panel.svg +1 -0
- package/assets/library/catalog/component-target-progress.svg +1 -0
- package/assets/library/catalog/component-toggle-filter.svg +1 -0
- package/assets/library/catalog/component-treemap.svg +1 -0
- package/assets/library/catalog/component-trend-comparison.svg +1 -0
- package/assets/library/catalog/component-waterfall.svg +1 -0
- package/assets/library/catalog/provenance.json +524 -0
- package/assets/library/catalog/visual-theme-amber-sunset.svg +1 -0
- package/assets/library/catalog/visual-theme-art-deco.svg +1 -0
- package/assets/library/catalog/visual-theme-bauhaus.svg +1 -0
- package/assets/library/catalog/visual-theme-burgundy-night.svg +1 -0
- package/assets/library/catalog/visual-theme-cinematic.svg +1 -0
- package/assets/library/catalog/visual-theme-clarity-blue.svg +1 -0
- package/assets/library/catalog/visual-theme-clay.svg +1 -0
- package/assets/library/catalog/visual-theme-cobalt-diagonal.svg +1 -0
- package/assets/library/catalog/visual-theme-coral-cream.svg +1 -0
- package/assets/library/catalog/visual-theme-crimson-black.svg +1 -0
- package/assets/library/catalog/visual-theme-cyberpunk.svg +1 -0
- package/assets/library/catalog/visual-theme-dark-olive.svg +1 -0
- package/assets/library/catalog/visual-theme-dark-tech.svg +1 -0
- package/assets/library/catalog/visual-theme-deep-sea-blue.svg +1 -0
- package/assets/library/catalog/visual-theme-deep-sea-mist.svg +1 -0
- package/assets/library/catalog/visual-theme-financial-trading.svg +1 -0
- package/assets/library/catalog/visual-theme-flat.svg +1 -0
- package/assets/library/catalog/visual-theme-frosted-tech.svg +1 -0
- package/assets/library/catalog/visual-theme-golden-eye.svg +1 -0
- package/assets/library/catalog/visual-theme-hand-drawn.svg +1 -0
- package/assets/library/catalog/visual-theme-industrial.svg +1 -0
- package/assets/library/catalog/visual-theme-layered-paper.svg +1 -0
- package/assets/library/catalog/visual-theme-material.svg +1 -0
- package/assets/library/catalog/visual-theme-maximalism.svg +1 -0
- package/assets/library/catalog/visual-theme-midnight-emerald.svg +1 -0
- package/assets/library/catalog/visual-theme-minimal-modern.svg +1 -0
- package/assets/library/catalog/visual-theme-misty-green.svg +1 -0
- package/assets/library/catalog/visual-theme-misty-rose.svg +1 -0
- package/assets/library/catalog/visual-theme-natural-terrain.svg +1 -0
- package/assets/library/catalog/visual-theme-neo-brutalism.svg +1 -0
- package/assets/library/catalog/visual-theme-newsprint.svg +1 -0
- package/assets/library/catalog/visual-theme-olive-terracotta.svg +1 -0
- package/assets/library/catalog/visual-theme-paper-journal.svg +1 -0
- package/assets/library/catalog/visual-theme-pastel-matrix.svg +1 -0
- package/assets/library/catalog/visual-theme-pixel-dashboard.svg +1 -0
- package/assets/library/catalog/visual-theme-premium-business.svg +1 -0
- package/assets/library/catalog/visual-theme-redline-brief.svg +1 -0
- package/assets/library/catalog/visual-theme-sage.svg +1 -0
- package/assets/library/catalog/visual-theme-soft-porcelain.svg +1 -0
- package/assets/library/catalog/visual-theme-swiss-grid.svg +1 -0
- package/assets/library/catalog/visual-theme-tdesign-enterprise.svg +1 -0
- package/assets/library/catalog/visual-theme-terminal-green.svg +1 -0
- package/assets/library/catalog/visual-theme-warm-sand.svg +1 -0
- package/dist/lib/agent.schema.d.ts +514 -32
- package/dist/lib/analysis-scene-chart.d.ts +8 -0
- package/dist/lib/analysis-scene-chart.js +61 -0
- package/dist/lib/analysis-scene-tool.d.ts +87 -0
- package/dist/lib/analysis-scene-tool.js +33 -0
- package/dist/lib/analysis-scene-widget.d.ts +6 -0
- package/dist/lib/analysis-scene-widget.js +107 -0
- package/dist/lib/analysis-scene.schema.d.ts +66 -0
- package/dist/lib/analysis-scene.schema.js +20 -0
- package/dist/lib/archive.service.d.ts +35 -0
- package/dist/lib/artifact-type.provider.d.ts +1 -0
- package/dist/lib/artifact-type.provider.js +18 -0
- package/dist/lib/bundled-example-source.d.ts +11 -0
- package/dist/lib/bundled-example-source.js +60 -0
- package/dist/lib/certification.schema.d.ts +4 -0
- package/dist/lib/certification.schema.js +14 -0
- package/dist/lib/content-capability.js +1 -0
- package/dist/lib/content-type.d.ts +2 -0
- package/dist/lib/content-type.js +5 -0
- package/dist/lib/content.provider.js +5 -3
- package/dist/lib/dashboard-archive.d.ts +35 -0
- package/dist/lib/dashboard-artifact.d.ts +93 -0
- package/dist/lib/dashboard-artifact.js +24 -0
- package/dist/lib/dashboard-delivery.d.ts +11 -0
- package/dist/lib/dashboard-delivery.js +55 -0
- package/dist/lib/dashboard-discovery.schema.d.ts +446 -0
- package/dist/lib/dashboard-discovery.schema.js +35 -0
- package/dist/lib/dashboard-navigation.d.ts +22 -21
- package/dist/lib/dashboard-navigation.js +5 -4
- package/dist/lib/dashboard-queries.d.ts +2 -2
- package/dist/lib/dashboard-queries.js +2 -2
- package/dist/lib/dashboard-receipt.js +1 -1
- package/dist/lib/dashboard-view.schema.d.ts +964 -64
- package/dist/lib/dashboard.schema.d.ts +738 -23
- package/dist/lib/dashboard.schema.js +8 -2
- package/dist/lib/dashboard.service.d.ts +155 -2
- package/dist/lib/dashboard.service.js +38 -4
- package/dist/lib/dataset-artifact.provider.d.ts +13 -0
- package/dist/lib/dataset-artifact.provider.js +57 -0
- package/dist/lib/dataset.schema.d.ts +195 -0
- package/dist/lib/dataset.schema.js +23 -0
- package/dist/lib/dataset.service.d.ts +54 -0
- package/dist/lib/dataset.service.js +119 -0
- package/dist/lib/definition-tools.d.ts +14 -54
- package/dist/lib/definition-tools.js +29 -9
- package/dist/lib/document-package.d.ts +35 -0
- package/dist/lib/editing.d.ts +552 -2
- package/dist/lib/evidence/evidence-diff.d.ts +17 -0
- package/dist/lib/evidence/evidence-diff.js +30 -0
- package/dist/lib/evidence/evidence-transfers.d.ts +14 -0
- package/dist/lib/evidence/evidence-transfers.js +41 -0
- package/dist/lib/evidence/evidence-view.provider.d.ts +91 -0
- package/dist/lib/evidence/evidence-view.provider.js +92 -0
- package/dist/lib/evidence/evidence.entity.d.ts +14 -0
- package/dist/lib/evidence/evidence.entity.js +62 -0
- package/dist/lib/evidence/evidence.provider.d.ts +43 -0
- package/dist/lib/evidence/evidence.provider.js +91 -0
- package/dist/lib/evidence/evidence.service.d.ts +67 -0
- package/dist/lib/evidence/evidence.service.js +218 -0
- package/dist/lib/explore-catalog.d.ts +15 -0
- package/dist/lib/explore-catalog.js +51 -0
- package/dist/lib/explore-catalog.json +131 -0
- package/dist/lib/explore.schema.d.ts +69 -0
- package/dist/lib/explore.schema.js +9 -0
- package/dist/lib/group-sharing.d.ts +17 -0
- package/dist/lib/group-sharing.js +39 -0
- package/dist/lib/hotel-document.d.ts +3 -0
- package/dist/lib/hotel-document.js +26 -0
- package/dist/lib/hotel-template.d.ts +246 -0
- package/dist/lib/hotel-template.js +77 -0
- package/dist/lib/library/access.d.ts +9 -0
- package/dist/lib/library/access.js +14 -0
- package/dist/lib/library/actions.d.ts +7 -0
- package/dist/lib/library/actions.js +55 -0
- package/dist/lib/library/archive.d.ts +13 -0
- package/dist/lib/library/archive.js +123 -0
- package/dist/lib/library/asset-validation.d.ts +4 -0
- package/dist/lib/library/asset-validation.js +77 -0
- package/dist/lib/library/catalog-blueprints.json +3225 -0
- package/dist/lib/library/catalog.service.d.ts +2427 -0
- package/dist/lib/library/catalog.service.js +270 -0
- package/dist/lib/library/dataset-binding.service.d.ts +65 -0
- package/dist/lib/library/dataset-binding.service.js +152 -0
- package/dist/lib/library/directory-contract.d.ts +161 -0
- package/dist/lib/library/directory-contract.js +19 -0
- package/dist/lib/library/directory.service.d.ts +33 -0
- package/dist/lib/library/directory.service.js +69 -0
- package/dist/lib/library/entities.d.ts +80 -0
- package/dist/lib/library/entities.js +280 -0
- package/dist/lib/library/execution-contract.d.ts +200 -0
- package/dist/lib/library/execution-contract.js +19 -0
- package/dist/lib/library/execution-resolution.d.ts +2490 -0
- package/dist/lib/library/execution-resolution.js +101 -0
- package/dist/lib/library/file-artifact.provider.d.ts +7 -0
- package/dist/lib/library/file-artifact.provider.js +35 -0
- package/dist/lib/library/files.service.d.ts +20 -0
- package/dist/lib/library/files.service.js +112 -0
- package/dist/lib/library/origin.schema.d.ts +171 -0
- package/dist/lib/library/origin.schema.js +14 -0
- package/dist/lib/library/resource-contract.d.ts +2779 -0
- package/dist/lib/library/resource-contract.js +167 -0
- package/dist/lib/library/resource-json.d.ts +11 -0
- package/dist/lib/library/resource-json.js +53 -0
- package/dist/lib/library/task-preparation.service.d.ts +14 -0
- package/dist/lib/library/task-preparation.service.js +85 -0
- package/dist/lib/library/template-compiler.d.ts +19 -0
- package/dist/lib/library/template-compiler.js +73 -0
- package/dist/lib/library/template-execution.service.d.ts +79 -0
- package/dist/lib/library/template-execution.service.js +135 -0
- package/dist/lib/library/transfers.service.d.ts +94 -0
- package/dist/lib/library/transfers.service.js +193 -0
- package/dist/lib/library/zip-container.d.ts +10 -0
- package/dist/lib/library/zip-container.js +79 -0
- package/dist/lib/library-view.provider.d.ts +88 -0
- package/dist/lib/library-view.provider.js +164 -0
- package/dist/lib/library.schema.d.ts +347 -0
- package/dist/lib/library.schema.js +41 -0
- package/dist/lib/middleware.d.ts +8 -2
- package/dist/lib/middleware.js +119 -11
- package/dist/lib/monitor.js +2 -2
- package/dist/lib/plugin.js +21 -1
- package/dist/lib/presentation.provider.d.ts +35 -0
- package/dist/lib/presentation.provider.js +4 -15
- package/dist/lib/projects.schema.d.ts +4 -4
- package/dist/lib/query-session.d.ts +1 -1
- package/dist/lib/query-session.js +13 -8
- package/dist/lib/remote-entry.d.ts +1 -1
- package/dist/lib/remote-entry.js +2 -2
- package/dist/lib/resource.schema.d.ts +1067 -0
- package/dist/lib/resource.schema.js +76 -0
- package/dist/lib/runtime-context.d.ts +2 -0
- package/dist/lib/runtime-context.js +22 -0
- package/dist/lib/sharing.service.d.ts +12 -0
- package/dist/lib/sharing.service.js +4 -0
- package/dist/lib/source-executions.d.ts +69 -51
- package/dist/lib/source-executions.js +2 -1
- package/dist/lib/template.schema.d.ts +36 -0
- package/dist/lib/template.schema.js +17 -0
- package/dist/lib/template.service.d.ts +21 -0
- package/dist/lib/template.service.js +56 -0
- package/dist/lib/templates.js +5 -5
- package/dist/lib/view.provider.d.ts +129 -4
- package/dist/lib/view.provider.js +61 -35
- package/dist/remote/app.css +1 -1
- package/dist/remote/app.js +54 -53
- package/dist/remote/build-manifest.json +238 -46
- package/dist/sandbox-actions/action.json +1 -1
- package/dist/sandbox-actions/bundle/host.js +2 -2
- package/docs/content-packages.mdx +43 -0
- package/docs/dashboard-starter.mdx +22 -0
- package/docs/data-view.mdx +30 -0
- package/docs/dataset-generation.mdx +32 -0
- package/docs/dataset-storage.mdx +29 -0
- package/docs/docs.json +15 -0
- package/docs/editing.mdx +6 -0
- package/docs/html-mode.md +1 -1
- package/docs/index.mdx +8 -0
- package/docs/inline-analysis.mdx +62 -0
- package/docs/library-browser-verification.mdx +46 -0
- package/docs/library-detail-ui.mdx +21 -0
- package/docs/library-directory-ui.mdx +24 -0
- package/docs/library-execution.mdx +49 -0
- package/docs/library-import-ui.mdx +20 -0
- package/docs/library-storage.mdx +63 -0
- package/docs/proposals/resource-sharing-decoupling.mdx +83 -0
- package/docs/standard-theme.mdx +28 -0
- package/docs/template-agent-handoff.mdx +37 -0
- package/docs/verification.mdx +4 -0
- package/package.json +9 -5
- package/skills/live-dashboard/SKILL.md +41 -1
- package/skills/live-dashboard/examples/README.md +2 -2
- package/skills/live-dashboard/examples/production-quality/README.md +2 -2
- package/skills/live-dashboard/examples/regional-sales/README.md +3 -3
- package/skills/live-dashboard/examples/regional-sales/query.json +49 -1
- package/skills/live-dashboard/examples/sales-overview/README.md +2 -2
- package/skills/live-dashboard/references/attribution-analysis.md +8 -0
- package/skills/live-dashboard/references/pareto-analysis.md +8 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.directoryPageSchema = exports.directoryItemSchema = exports.directoryQuerySchema = void 0;
|
|
4
|
+
const v3_1 = require("zod/v3");
|
|
5
|
+
const resource_contract_1 = require("./resource-contract");
|
|
6
|
+
/** @beta A paged projection of display blueprints and authorized fixed V2 versions. */
|
|
7
|
+
exports.directoryQuerySchema = v3_1.z.object({
|
|
8
|
+
audience: v3_1.z.enum(['catalog', 'mine', 'public']).default('catalog'), kind: resource_contract_1.kindSchema,
|
|
9
|
+
page: v3_1.z.number().int().min(1).max(100000).default(1), pageSize: v3_1.z.number().int().min(1).max(50).default(24),
|
|
10
|
+
search: v3_1.z.string().max(100).default(''), category: v3_1.z.string().max(80).default(''),
|
|
11
|
+
appearance: v3_1.z.enum(['all', 'light', 'dark']).default('all'), locale: v3_1.z.enum(['en', 'zh-Hans', 'zh-Hant']).default('en')
|
|
12
|
+
}).strict();
|
|
13
|
+
exports.directoryItemSchema = v3_1.z.object({
|
|
14
|
+
id: v3_1.z.string(), kind: resource_contract_1.kindSchema, title: v3_1.z.string(), description: v3_1.z.string(), categories: v3_1.z.array(v3_1.z.string()),
|
|
15
|
+
state: v3_1.z.enum(['planned', 'not-installed', 'released']), releaseId: v3_1.z.string().uuid().nullable(), version: v3_1.z.string().nullable(),
|
|
16
|
+
coverKey: v3_1.z.string().optional(), coverAssetId: v3_1.z.string().optional(), features: v3_1.z.array(v3_1.z.string()).default([]),
|
|
17
|
+
dataMode: v3_1.z.enum(['demo', 'web', 'external']).optional(), requirements: v3_1.z.array(v3_1.z.string()).default([])
|
|
18
|
+
}).strict();
|
|
19
|
+
exports.directoryPageSchema = v3_1.z.object({ items: v3_1.z.array(exports.directoryItemSchema), page: v3_1.z.number(), pageSize: v3_1.z.number(), total: v3_1.z.number() }).strict();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { XpertResolvedViewHostContext } from '@xpert-ai/contracts';
|
|
2
|
+
import { z } from 'zod/v3';
|
|
3
|
+
import { LibraryCatalogService } from './catalog.service';
|
|
4
|
+
import { directoryQuerySchema } from './directory-contract';
|
|
5
|
+
/** @beta Display-only blueprints are not releases or official certification. Uploaded data lives exclusively in V2. */
|
|
6
|
+
export declare class LibraryDirectoryService {
|
|
7
|
+
private readonly catalog;
|
|
8
|
+
constructor(catalog: LibraryCatalogService);
|
|
9
|
+
list(context: XpertResolvedViewHostContext, input: z.input<typeof directoryQuerySchema>): Promise<{
|
|
10
|
+
page: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
items: {
|
|
13
|
+
title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
kind: "example-task" | "analysis-template" | "visual-theme" | "component" | "public-dataset";
|
|
17
|
+
version: string | null;
|
|
18
|
+
categories: string[];
|
|
19
|
+
requirements: string[];
|
|
20
|
+
state: "planned" | "not-installed" | "released";
|
|
21
|
+
releaseId: string | null;
|
|
22
|
+
features: string[];
|
|
23
|
+
coverAssetId?: string | undefined;
|
|
24
|
+
coverKey?: string | undefined;
|
|
25
|
+
dataMode?: "demo" | "web" | "external" | undefined;
|
|
26
|
+
}[];
|
|
27
|
+
total: number;
|
|
28
|
+
}>;
|
|
29
|
+
private item;
|
|
30
|
+
thumbnail(context: XpertResolvedViewHostContext, releaseId: string, assetId: string): Promise<{
|
|
31
|
+
src: string;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.LibraryDirectoryService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const v3_1 = require("zod/v3");
|
|
18
|
+
const catalog_blueprints_json_1 = __importDefault(require("./catalog-blueprints.json"));
|
|
19
|
+
const catalog_service_1 = require("./catalog.service");
|
|
20
|
+
const directory_contract_1 = require("./directory-contract");
|
|
21
|
+
const metadata = v3_1.z.object({ presentation: v3_1.z.object({ coverAssetId: v3_1.z.string().optional() }).optional(),
|
|
22
|
+
taskData: v3_1.z.object({ mode: v3_1.z.enum(['demo', 'web', 'external']), tools: v3_1.z.array(v3_1.z.string()) }).optional(),
|
|
23
|
+
translations: v3_1.z.record(v3_1.z.object({ title: v3_1.z.string(), description: v3_1.z.string() })).optional() });
|
|
24
|
+
/** @beta Display-only blueprints are not releases or official certification. Uploaded data lives exclusively in V2. */
|
|
25
|
+
let LibraryDirectoryService = class LibraryDirectoryService {
|
|
26
|
+
constructor(catalog) {
|
|
27
|
+
this.catalog = catalog;
|
|
28
|
+
}
|
|
29
|
+
async list(context, input) {
|
|
30
|
+
const query = directory_contract_1.directoryQuerySchema.parse(input);
|
|
31
|
+
await this.catalog.actor(context);
|
|
32
|
+
if (query.audience !== 'catalog') {
|
|
33
|
+
const page = await this.catalog.list(context, { ...query, category: query.category || undefined,
|
|
34
|
+
// Directory-only filters never leak into the canonical resource query.
|
|
35
|
+
appearance: query.appearance, locale: query.locale, audience: query.audience });
|
|
36
|
+
return directory_contract_1.directoryPageSchema.parse({ ...page, items: page.items.map(row => this.item(row, query.locale)) });
|
|
37
|
+
}
|
|
38
|
+
// This bounded metadata set contains no dataset rows, prompts or runnable template definitions.
|
|
39
|
+
const filtered = catalog_blueprints_json_1.default.filter(item => item.kind === query.kind && (!query.category || item.categories.includes(query.category))
|
|
40
|
+
&& (query.appearance === 'all' || 'appearance' in item && item.appearance === query.appearance)
|
|
41
|
+
&& (!query.search || [item.translations[query.locale].title, item.translations[query.locale].description,
|
|
42
|
+
...item.translations[query.locale].features].join(' ').toLocaleLowerCase().includes(query.search.trim().toLocaleLowerCase())));
|
|
43
|
+
const page = filtered.slice((query.page - 1) * query.pageSize, query.page * query.pageSize);
|
|
44
|
+
const rows = page.length ? await this.catalog.matchOwned(context, page.map(item => ({ logicalId: item.logicalId, kind: item.kind }))) : [];
|
|
45
|
+
const items = page.map(item => {
|
|
46
|
+
const row = rows.find(row => row.logicalId === item.logicalId && row.kind === item.kind);
|
|
47
|
+
const text = item.translations[query.locale];
|
|
48
|
+
const display = { id: item.key, kind: item.kind, ...text, categories: item.categories, coverKey: item.coverKey,
|
|
49
|
+
...('dataMode' in item ? { dataMode: item.dataMode, requirements: item.requirements } : {}) };
|
|
50
|
+
return row ? { ...display, ...this.item((0, catalog_service_1.versionItem)(row), query.locale), id: item.key } :
|
|
51
|
+
{ ...display, state: item.state, releaseId: null, version: null };
|
|
52
|
+
});
|
|
53
|
+
return directory_contract_1.directoryPageSchema.parse({ items, total: filtered.length, page: query.page, pageSize: query.pageSize });
|
|
54
|
+
}
|
|
55
|
+
item(row, locale) {
|
|
56
|
+
const details = metadata.parse(row), text = details.translations?.[locale];
|
|
57
|
+
return { id: row.releaseId, releaseId: row.releaseId, kind: row.kind, title: text?.title ?? row.title,
|
|
58
|
+
description: text?.description ?? row.description, categories: row.categories, version: row.version, state: 'released',
|
|
59
|
+
features: [], requirements: details.taskData?.tools ?? [], ...(details.taskData ? { dataMode: details.taskData.mode } : {}), ...(details.presentation?.coverAssetId ? { coverAssetId: details.presentation.coverAssetId } : {}) };
|
|
60
|
+
}
|
|
61
|
+
thumbnail(context, releaseId, assetId) {
|
|
62
|
+
return this.catalog.thumbnail(context, releaseId, assetId);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.LibraryDirectoryService = LibraryDirectoryService;
|
|
66
|
+
exports.LibraryDirectoryService = LibraryDirectoryService = __decorate([
|
|
67
|
+
(0, common_1.Injectable)(),
|
|
68
|
+
__metadata("design:paramtypes", [catalog_service_1.LibraryCatalogService])
|
|
69
|
+
], LibraryDirectoryService);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { WorkspacePortableFileReference } from '@xpert-ai/plugin-sdk';
|
|
2
|
+
import { type ResourceDocumentV2, type AssetDescriptor } from './resource-contract';
|
|
3
|
+
import type { DashboardManifest } from '../dashboard.schema';
|
|
4
|
+
import type { DashboardSaveRequests } from '../save-requests';
|
|
5
|
+
/** @beta Library V2 tables are additive. Existing V1 releases and Dashboard versions are not rewritten. */
|
|
6
|
+
export declare class LibraryOwnedRecord {
|
|
7
|
+
id: string;
|
|
8
|
+
tenantId: string;
|
|
9
|
+
organizationId: string;
|
|
10
|
+
ownerId: string;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export declare class LibraryResourceRecord extends LibraryOwnedRecord {
|
|
14
|
+
logicalId: string;
|
|
15
|
+
kind: ResourceDocumentV2['kind'];
|
|
16
|
+
currentVersionId: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare class LibraryDraftRecord extends LibraryOwnedRecord {
|
|
19
|
+
resourceId: string;
|
|
20
|
+
revision: number;
|
|
21
|
+
document: ResourceDocumentV2;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}
|
|
24
|
+
export declare class LibraryVersionRecord extends LibraryOwnedRecord {
|
|
25
|
+
resourceId: string;
|
|
26
|
+
logicalId: string;
|
|
27
|
+
version: string;
|
|
28
|
+
kind: ResourceDocumentV2['kind'];
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
categories: string[];
|
|
32
|
+
catalogMetadata: Pick<ResourceDocumentV2, 'locale' | 'translations' | 'tags' | 'license' | 'presentation'> & {
|
|
33
|
+
taskData?: {
|
|
34
|
+
mode: 'demo' | 'web' | 'external';
|
|
35
|
+
tools: string[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
document: ResourceDocumentV2;
|
|
39
|
+
sha256: string;
|
|
40
|
+
state: 'staging' | 'ready';
|
|
41
|
+
jobId: string | null;
|
|
42
|
+
}
|
|
43
|
+
export declare class LibraryPublicationRecord extends LibraryOwnedRecord {
|
|
44
|
+
versionId: string;
|
|
45
|
+
active: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare class LibraryFileRecord extends LibraryOwnedRecord {
|
|
48
|
+
sha256: string;
|
|
49
|
+
size: number;
|
|
50
|
+
mimeType: AssetDescriptor['mimeType'];
|
|
51
|
+
fileName: string;
|
|
52
|
+
artifactId: string | null;
|
|
53
|
+
artifactVersionId: string | null;
|
|
54
|
+
state: 'pending' | 'ready';
|
|
55
|
+
}
|
|
56
|
+
export declare class LibraryTransferRecord extends LibraryOwnedRecord {
|
|
57
|
+
requestId: string;
|
|
58
|
+
sha256: string;
|
|
59
|
+
file: WorkspacePortableFileReference;
|
|
60
|
+
mode: 'reuse' | 'copy';
|
|
61
|
+
identityMap: Record<string, string>;
|
|
62
|
+
releaseIds: string[];
|
|
63
|
+
status: 'prepared' | 'running' | 'failed' | 'complete' | 'cancelled';
|
|
64
|
+
leaseToken: string | null;
|
|
65
|
+
leaseUntil: Date | null;
|
|
66
|
+
failureCode: string | null;
|
|
67
|
+
filesClearedAt: Date | null;
|
|
68
|
+
updatedAt: Date;
|
|
69
|
+
}
|
|
70
|
+
/** @beta Binds a creation intent to one prepared manifest and the existing durable save pipeline. */
|
|
71
|
+
export declare class LibraryExecutionRecord extends LibraryOwnedRecord {
|
|
72
|
+
requestId: string;
|
|
73
|
+
scopeHash: string;
|
|
74
|
+
inputHash: string;
|
|
75
|
+
manifestId: string;
|
|
76
|
+
manifest: DashboardManifest | null;
|
|
77
|
+
saveRequestId: string | null;
|
|
78
|
+
result: Awaited<ReturnType<DashboardSaveRequests['get']>> | null;
|
|
79
|
+
}
|
|
80
|
+
export declare const LIBRARY_V2_ENTITIES: (typeof LibraryResourceRecord | typeof LibraryDraftRecord | typeof LibraryVersionRecord | typeof LibraryPublicationRecord | typeof LibraryFileRecord | typeof LibraryTransferRecord | typeof LibraryExecutionRecord)[];
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LIBRARY_V2_ENTITIES = exports.LibraryExecutionRecord = exports.LibraryTransferRecord = exports.LibraryFileRecord = exports.LibraryPublicationRecord = exports.LibraryVersionRecord = exports.LibraryDraftRecord = exports.LibraryResourceRecord = exports.LibraryOwnedRecord = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const resource_contract_1 = require("./resource-contract");
|
|
15
|
+
/** @beta Library V2 tables are additive. Existing V1 releases and Dashboard versions are not rewritten. */
|
|
16
|
+
class LibraryOwnedRecord {
|
|
17
|
+
}
|
|
18
|
+
exports.LibraryOwnedRecord = LibraryOwnedRecord;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], LibraryOwnedRecord.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], LibraryOwnedRecord.prototype, "tenantId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], LibraryOwnedRecord.prototype, "organizationId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], LibraryOwnedRecord.prototype, "ownerId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamptz' }),
|
|
37
|
+
__metadata("design:type", Date)
|
|
38
|
+
], LibraryOwnedRecord.prototype, "createdAt", void 0);
|
|
39
|
+
let LibraryResourceRecord = class LibraryResourceRecord extends LibraryOwnedRecord {
|
|
40
|
+
};
|
|
41
|
+
exports.LibraryResourceRecord = LibraryResourceRecord;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], LibraryResourceRecord.prototype, "logicalId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], LibraryResourceRecord.prototype, "kind", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], LibraryResourceRecord.prototype, "currentVersionId", void 0);
|
|
54
|
+
exports.LibraryResourceRecord = LibraryResourceRecord = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_v2')),
|
|
56
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'logicalId'], { unique: true })
|
|
57
|
+
], LibraryResourceRecord);
|
|
58
|
+
let LibraryDraftRecord = class LibraryDraftRecord extends LibraryOwnedRecord {
|
|
59
|
+
};
|
|
60
|
+
exports.LibraryDraftRecord = LibraryDraftRecord;
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], LibraryDraftRecord.prototype, "resourceId", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], LibraryDraftRecord.prototype, "revision", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], LibraryDraftRecord.prototype, "document", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'timestamptz' }),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], LibraryDraftRecord.prototype, "updatedAt", void 0);
|
|
77
|
+
exports.LibraryDraftRecord = LibraryDraftRecord = __decorate([
|
|
78
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_draft_v2')),
|
|
79
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'resourceId'], { unique: true })
|
|
80
|
+
], LibraryDraftRecord);
|
|
81
|
+
let LibraryVersionRecord = class LibraryVersionRecord extends LibraryOwnedRecord {
|
|
82
|
+
};
|
|
83
|
+
exports.LibraryVersionRecord = LibraryVersionRecord;
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], LibraryVersionRecord.prototype, "resourceId", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], LibraryVersionRecord.prototype, "logicalId", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], LibraryVersionRecord.prototype, "version", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], LibraryVersionRecord.prototype, "kind", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], LibraryVersionRecord.prototype, "title", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], LibraryVersionRecord.prototype, "description", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
110
|
+
__metadata("design:type", Array)
|
|
111
|
+
], LibraryVersionRecord.prototype, "categories", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], LibraryVersionRecord.prototype, "catalogMetadata", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], LibraryVersionRecord.prototype, "document", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], LibraryVersionRecord.prototype, "sha256", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: 'staging' }),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], LibraryVersionRecord.prototype, "state", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
130
|
+
__metadata("design:type", Object)
|
|
131
|
+
], LibraryVersionRecord.prototype, "jobId", void 0);
|
|
132
|
+
exports.LibraryVersionRecord = LibraryVersionRecord = __decorate([
|
|
133
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_version_v2')),
|
|
134
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'logicalId', 'version'], { unique: true }),
|
|
135
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'state', 'createdAt'])
|
|
136
|
+
], LibraryVersionRecord);
|
|
137
|
+
let LibraryPublicationRecord = class LibraryPublicationRecord extends LibraryOwnedRecord {
|
|
138
|
+
};
|
|
139
|
+
exports.LibraryPublicationRecord = LibraryPublicationRecord;
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], LibraryPublicationRecord.prototype, "versionId", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
146
|
+
__metadata("design:type", Boolean)
|
|
147
|
+
], LibraryPublicationRecord.prototype, "active", void 0);
|
|
148
|
+
exports.LibraryPublicationRecord = LibraryPublicationRecord = __decorate([
|
|
149
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_publication_v2')),
|
|
150
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'versionId'], { unique: true }),
|
|
151
|
+
(0, typeorm_1.Index)(['active', 'versionId'])
|
|
152
|
+
], LibraryPublicationRecord);
|
|
153
|
+
let LibraryFileRecord = class LibraryFileRecord extends LibraryOwnedRecord {
|
|
154
|
+
};
|
|
155
|
+
exports.LibraryFileRecord = LibraryFileRecord;
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], LibraryFileRecord.prototype, "sha256", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
162
|
+
__metadata("design:type", Number)
|
|
163
|
+
], LibraryFileRecord.prototype, "size", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
166
|
+
__metadata("design:type", Object)
|
|
167
|
+
], LibraryFileRecord.prototype, "mimeType", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
170
|
+
__metadata("design:type", String)
|
|
171
|
+
], LibraryFileRecord.prototype, "fileName", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
174
|
+
__metadata("design:type", Object)
|
|
175
|
+
], LibraryFileRecord.prototype, "artifactId", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
178
|
+
__metadata("design:type", Object)
|
|
179
|
+
], LibraryFileRecord.prototype, "artifactVersionId", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: 'pending' }),
|
|
182
|
+
__metadata("design:type", String)
|
|
183
|
+
], LibraryFileRecord.prototype, "state", void 0);
|
|
184
|
+
exports.LibraryFileRecord = LibraryFileRecord = __decorate([
|
|
185
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_file_v2')),
|
|
186
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'sha256'], { unique: true })
|
|
187
|
+
], LibraryFileRecord);
|
|
188
|
+
let LibraryTransferRecord = class LibraryTransferRecord extends LibraryOwnedRecord {
|
|
189
|
+
};
|
|
190
|
+
exports.LibraryTransferRecord = LibraryTransferRecord;
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
193
|
+
__metadata("design:type", String)
|
|
194
|
+
], LibraryTransferRecord.prototype, "requestId", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
197
|
+
__metadata("design:type", String)
|
|
198
|
+
], LibraryTransferRecord.prototype, "sha256", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
201
|
+
__metadata("design:type", Object)
|
|
202
|
+
], LibraryTransferRecord.prototype, "file", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
205
|
+
__metadata("design:type", String)
|
|
206
|
+
], LibraryTransferRecord.prototype, "mode", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
209
|
+
__metadata("design:type", Object)
|
|
210
|
+
], LibraryTransferRecord.prototype, "identityMap", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
(0, typeorm_1.Column)({ type: 'jsonb', default: [] }),
|
|
213
|
+
__metadata("design:type", Array)
|
|
214
|
+
], LibraryTransferRecord.prototype, "releaseIds", void 0);
|
|
215
|
+
__decorate([
|
|
216
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: 'prepared' }),
|
|
217
|
+
__metadata("design:type", String)
|
|
218
|
+
], LibraryTransferRecord.prototype, "status", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
221
|
+
__metadata("design:type", Object)
|
|
222
|
+
], LibraryTransferRecord.prototype, "leaseToken", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
225
|
+
__metadata("design:type", Object)
|
|
226
|
+
], LibraryTransferRecord.prototype, "leaseUntil", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
229
|
+
__metadata("design:type", Object)
|
|
230
|
+
], LibraryTransferRecord.prototype, "failureCode", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
(0, typeorm_1.Column)({ type: 'timestamptz', nullable: true }),
|
|
233
|
+
__metadata("design:type", Object)
|
|
234
|
+
], LibraryTransferRecord.prototype, "filesClearedAt", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'timestamptz' }),
|
|
237
|
+
__metadata("design:type", Date)
|
|
238
|
+
], LibraryTransferRecord.prototype, "updatedAt", void 0);
|
|
239
|
+
exports.LibraryTransferRecord = LibraryTransferRecord = __decorate([
|
|
240
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_transfer_v2')),
|
|
241
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'requestId'], { unique: true })
|
|
242
|
+
], LibraryTransferRecord);
|
|
243
|
+
/** @beta Binds a creation intent to one prepared manifest and the existing durable save pipeline. */
|
|
244
|
+
let LibraryExecutionRecord = class LibraryExecutionRecord extends LibraryOwnedRecord {
|
|
245
|
+
};
|
|
246
|
+
exports.LibraryExecutionRecord = LibraryExecutionRecord;
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
249
|
+
__metadata("design:type", String)
|
|
250
|
+
], LibraryExecutionRecord.prototype, "requestId", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
253
|
+
__metadata("design:type", String)
|
|
254
|
+
], LibraryExecutionRecord.prototype, "scopeHash", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
257
|
+
__metadata("design:type", String)
|
|
258
|
+
], LibraryExecutionRecord.prototype, "inputHash", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
261
|
+
__metadata("design:type", String)
|
|
262
|
+
], LibraryExecutionRecord.prototype, "manifestId", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
265
|
+
__metadata("design:type", Object)
|
|
266
|
+
], LibraryExecutionRecord.prototype, "manifest", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
269
|
+
__metadata("design:type", Object)
|
|
270
|
+
], LibraryExecutionRecord.prototype, "saveRequestId", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
273
|
+
__metadata("design:type", Object)
|
|
274
|
+
], LibraryExecutionRecord.prototype, "result", void 0);
|
|
275
|
+
exports.LibraryExecutionRecord = LibraryExecutionRecord = __decorate([
|
|
276
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('resource_execution_v2')),
|
|
277
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'ownerId', 'requestId'], { unique: true })
|
|
278
|
+
], LibraryExecutionRecord);
|
|
279
|
+
exports.LIBRARY_V2_ENTITIES = [LibraryResourceRecord, LibraryDraftRecord, LibraryVersionRecord,
|
|
280
|
+
LibraryPublicationRecord, LibraryFileRecord, LibraryTransferRecord, LibraryExecutionRecord];
|