@xpert-ai/plugin-live-dashboard 0.6.0 → 0.6.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/plugin-live-dashboard",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "level": "system",
5
5
  "artifactNamespace": "live_dashboard",
6
6
  "sandboxActions": "./dist/sandbox-actions/action.json",
@@ -8,6 +8,7 @@ export declare const dashboardSummarySchema: z.ZodObject<{
8
8
  draftRevision: z.ZodOptional<z.ZodNumber>;
9
9
  canDelete: z.ZodOptional<z.ZodBoolean>;
10
10
  isDraft: z.ZodOptional<z.ZodBoolean>;
11
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
11
12
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
13
  }, "strip", z.ZodTypeAny, {
13
14
  artifactId: string;
@@ -19,6 +20,7 @@ export declare const dashboardSummarySchema: z.ZodObject<{
19
20
  isDraft?: boolean | undefined;
20
21
  updatedAt?: string | undefined;
21
22
  canDelete?: boolean | undefined;
23
+ isEmpty?: boolean | undefined;
22
24
  }, {
23
25
  artifactId: string;
24
26
  title?: string | null | undefined;
@@ -29,6 +31,7 @@ export declare const dashboardSummarySchema: z.ZodObject<{
29
31
  isDraft?: boolean | undefined;
30
32
  updatedAt?: string | undefined;
31
33
  canDelete?: boolean | undefined;
34
+ isEmpty?: boolean | undefined;
32
35
  }>;
33
36
  export declare const dashboardPickerPageSchema: z.ZodObject<{
34
37
  items: z.ZodArray<z.ZodObject<{
@@ -40,6 +43,7 @@ export declare const dashboardPickerPageSchema: z.ZodObject<{
40
43
  draftRevision: z.ZodOptional<z.ZodNumber>;
41
44
  canDelete: z.ZodOptional<z.ZodBoolean>;
42
45
  isDraft: z.ZodOptional<z.ZodBoolean>;
46
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
43
47
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
48
  }, "strip", z.ZodTypeAny, {
45
49
  artifactId: string;
@@ -51,6 +55,7 @@ export declare const dashboardPickerPageSchema: z.ZodObject<{
51
55
  isDraft?: boolean | undefined;
52
56
  updatedAt?: string | undefined;
53
57
  canDelete?: boolean | undefined;
58
+ isEmpty?: boolean | undefined;
54
59
  }, {
55
60
  artifactId: string;
56
61
  title?: string | null | undefined;
@@ -61,6 +66,7 @@ export declare const dashboardPickerPageSchema: z.ZodObject<{
61
66
  isDraft?: boolean | undefined;
62
67
  updatedAt?: string | undefined;
63
68
  canDelete?: boolean | undefined;
69
+ isEmpty?: boolean | undefined;
64
70
  }>, "many">;
65
71
  page: z.ZodNumber;
66
72
  hasMore: z.ZodBoolean;
@@ -79,6 +85,7 @@ export declare const dashboardPickerPageSchema: z.ZodObject<{
79
85
  isDraft?: boolean | undefined;
80
86
  updatedAt?: string | undefined;
81
87
  canDelete?: boolean | undefined;
88
+ isEmpty?: boolean | undefined;
82
89
  }[];
83
90
  hasMore: boolean;
84
91
  mode?: "draft" | "published" | undefined;
@@ -94,6 +101,7 @@ export declare const dashboardPickerPageSchema: z.ZodObject<{
94
101
  isDraft?: boolean | undefined;
95
102
  updatedAt?: string | undefined;
96
103
  canDelete?: boolean | undefined;
104
+ isEmpty?: boolean | undefined;
97
105
  }[];
98
106
  hasMore: boolean;
99
107
  mode?: "draft" | "published" | undefined;
@@ -108,6 +116,7 @@ export declare const dashboardSavedSchema: z.ZodObject<{
108
116
  draftRevision: z.ZodOptional<z.ZodNumber>;
109
117
  canDelete: z.ZodOptional<z.ZodBoolean>;
110
118
  isDraft: z.ZodOptional<z.ZodBoolean>;
119
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
111
120
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
121
  } & {
113
122
  manifest: z.ZodEffects<z.ZodObject<{
@@ -561,6 +570,7 @@ export declare const dashboardSavedSchema: z.ZodObject<{
561
570
  isDraft?: boolean | undefined;
562
571
  updatedAt?: string | undefined;
563
572
  canDelete?: boolean | undefined;
573
+ isEmpty?: boolean | undefined;
564
574
  }, {
565
575
  manifest: {
566
576
  title: string;
@@ -633,6 +643,7 @@ export declare const dashboardSavedSchema: z.ZodObject<{
633
643
  isDraft?: boolean | undefined;
634
644
  updatedAt?: string | undefined;
635
645
  canDelete?: boolean | undefined;
646
+ isEmpty?: boolean | undefined;
636
647
  }>;
637
648
  export declare const dashboardViewDataSchema: z.ZodObject<{
638
649
  meta: z.ZodObject<{
@@ -699,6 +710,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
699
710
  draftRevision: z.ZodOptional<z.ZodNumber>;
700
711
  canDelete: z.ZodOptional<z.ZodBoolean>;
701
712
  isDraft: z.ZodOptional<z.ZodBoolean>;
713
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
702
714
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
703
715
  }, "strip", z.ZodTypeAny, {
704
716
  artifactId: string;
@@ -710,6 +722,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
710
722
  isDraft?: boolean | undefined;
711
723
  updatedAt?: string | undefined;
712
724
  canDelete?: boolean | undefined;
725
+ isEmpty?: boolean | undefined;
713
726
  }, {
714
727
  artifactId: string;
715
728
  title?: string | null | undefined;
@@ -720,6 +733,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
720
733
  isDraft?: boolean | undefined;
721
734
  updatedAt?: string | undefined;
722
735
  canDelete?: boolean | undefined;
736
+ isEmpty?: boolean | undefined;
723
737
  }>, "many">;
724
738
  selectedDashboard: z.ZodOptional<z.ZodObject<{
725
739
  artifactId: z.ZodString;
@@ -730,6 +744,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
730
744
  draftRevision: z.ZodOptional<z.ZodNumber>;
731
745
  canDelete: z.ZodOptional<z.ZodBoolean>;
732
746
  isDraft: z.ZodOptional<z.ZodBoolean>;
747
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
733
748
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
734
749
  }, "strip", z.ZodTypeAny, {
735
750
  artifactId: string;
@@ -741,6 +756,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
741
756
  isDraft?: boolean | undefined;
742
757
  updatedAt?: string | undefined;
743
758
  canDelete?: boolean | undefined;
759
+ isEmpty?: boolean | undefined;
744
760
  }, {
745
761
  artifactId: string;
746
762
  title?: string | null | undefined;
@@ -751,6 +767,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
751
767
  isDraft?: boolean | undefined;
752
768
  updatedAt?: string | undefined;
753
769
  canDelete?: boolean | undefined;
770
+ isEmpty?: boolean | undefined;
754
771
  }>>;
755
772
  sources: z.ZodArray<z.ZodObject<{
756
773
  source: z.ZodType<import("@xpert-ai/contracts").AnalyticsSourceRef, z.ZodTypeDef, import("@xpert-ai/contracts").AnalyticsSourceRef>;
@@ -771,6 +788,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
771
788
  draftRevision: z.ZodOptional<z.ZodNumber>;
772
789
  canDelete: z.ZodOptional<z.ZodBoolean>;
773
790
  isDraft: z.ZodOptional<z.ZodBoolean>;
791
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
774
792
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
775
793
  } & {
776
794
  manifest: z.ZodEffects<z.ZodObject<{
@@ -1224,6 +1242,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1224
1242
  isDraft?: boolean | undefined;
1225
1243
  updatedAt?: string | undefined;
1226
1244
  canDelete?: boolean | undefined;
1245
+ isEmpty?: boolean | undefined;
1227
1246
  }, {
1228
1247
  manifest: {
1229
1248
  title: string;
@@ -1296,6 +1315,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1296
1315
  isDraft?: boolean | undefined;
1297
1316
  updatedAt?: string | undefined;
1298
1317
  canDelete?: boolean | undefined;
1318
+ isEmpty?: boolean | undefined;
1299
1319
  }>>;
1300
1320
  versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1301
1321
  artifactId: z.ZodString;
@@ -1306,6 +1326,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1306
1326
  draftRevision: z.ZodOptional<z.ZodNumber>;
1307
1327
  canDelete: z.ZodOptional<z.ZodBoolean>;
1308
1328
  isDraft: z.ZodOptional<z.ZodBoolean>;
1329
+ isEmpty: z.ZodOptional<z.ZodBoolean>;
1309
1330
  baseVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1310
1331
  }, "strip", z.ZodTypeAny, {
1311
1332
  artifactId: string;
@@ -1317,6 +1338,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1317
1338
  isDraft?: boolean | undefined;
1318
1339
  updatedAt?: string | undefined;
1319
1340
  canDelete?: boolean | undefined;
1341
+ isEmpty?: boolean | undefined;
1320
1342
  }, {
1321
1343
  artifactId: string;
1322
1344
  title?: string | null | undefined;
@@ -1327,6 +1349,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1327
1349
  isDraft?: boolean | undefined;
1328
1350
  updatedAt?: string | undefined;
1329
1351
  canDelete?: boolean | undefined;
1352
+ isEmpty?: boolean | undefined;
1330
1353
  }>, "many">>;
1331
1354
  }, "strip", z.ZodTypeAny, {
1332
1355
  sources: {
@@ -1343,6 +1366,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1343
1366
  isDraft?: boolean | undefined;
1344
1367
  updatedAt?: string | undefined;
1345
1368
  canDelete?: boolean | undefined;
1369
+ isEmpty?: boolean | undefined;
1346
1370
  }[];
1347
1371
  mode?: "draft" | "published" | undefined;
1348
1372
  saved?: {
@@ -1404,6 +1428,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1404
1428
  isDraft?: boolean | undefined;
1405
1429
  updatedAt?: string | undefined;
1406
1430
  canDelete?: boolean | undefined;
1431
+ isEmpty?: boolean | undefined;
1407
1432
  } | undefined;
1408
1433
  access?: {
1409
1434
  project: boolean;
@@ -1436,6 +1461,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1436
1461
  isDraft?: boolean | undefined;
1437
1462
  updatedAt?: string | undefined;
1438
1463
  canDelete?: boolean | undefined;
1464
+ isEmpty?: boolean | undefined;
1439
1465
  } | undefined;
1440
1466
  versions?: {
1441
1467
  artifactId: string;
@@ -1447,6 +1473,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1447
1473
  isDraft?: boolean | undefined;
1448
1474
  updatedAt?: string | undefined;
1449
1475
  canDelete?: boolean | undefined;
1476
+ isEmpty?: boolean | undefined;
1450
1477
  }[] | undefined;
1451
1478
  }, {
1452
1479
  sources: {
@@ -1463,6 +1490,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1463
1490
  isDraft?: boolean | undefined;
1464
1491
  updatedAt?: string | undefined;
1465
1492
  canDelete?: boolean | undefined;
1493
+ isEmpty?: boolean | undefined;
1466
1494
  }[];
1467
1495
  mode?: "draft" | "published" | undefined;
1468
1496
  saved?: {
@@ -1537,6 +1565,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1537
1565
  isDraft?: boolean | undefined;
1538
1566
  updatedAt?: string | undefined;
1539
1567
  canDelete?: boolean | undefined;
1568
+ isEmpty?: boolean | undefined;
1540
1569
  } | undefined;
1541
1570
  access?: {
1542
1571
  project: boolean;
@@ -1569,6 +1598,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1569
1598
  isDraft?: boolean | undefined;
1570
1599
  updatedAt?: string | undefined;
1571
1600
  canDelete?: boolean | undefined;
1601
+ isEmpty?: boolean | undefined;
1572
1602
  } | undefined;
1573
1603
  versions?: {
1574
1604
  artifactId: string;
@@ -1580,6 +1610,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1580
1610
  isDraft?: boolean | undefined;
1581
1611
  updatedAt?: string | undefined;
1582
1612
  canDelete?: boolean | undefined;
1613
+ isEmpty?: boolean | undefined;
1583
1614
  }[] | undefined;
1584
1615
  }>;
1585
1616
  }, "strip", z.ZodTypeAny, {
@@ -1598,6 +1629,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1598
1629
  isDraft?: boolean | undefined;
1599
1630
  updatedAt?: string | undefined;
1600
1631
  canDelete?: boolean | undefined;
1632
+ isEmpty?: boolean | undefined;
1601
1633
  }[];
1602
1634
  mode?: "draft" | "published" | undefined;
1603
1635
  saved?: {
@@ -1659,6 +1691,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1659
1691
  isDraft?: boolean | undefined;
1660
1692
  updatedAt?: string | undefined;
1661
1693
  canDelete?: boolean | undefined;
1694
+ isEmpty?: boolean | undefined;
1662
1695
  } | undefined;
1663
1696
  access?: {
1664
1697
  project: boolean;
@@ -1691,6 +1724,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1691
1724
  isDraft?: boolean | undefined;
1692
1725
  updatedAt?: string | undefined;
1693
1726
  canDelete?: boolean | undefined;
1727
+ isEmpty?: boolean | undefined;
1694
1728
  } | undefined;
1695
1729
  versions?: {
1696
1730
  artifactId: string;
@@ -1702,6 +1736,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1702
1736
  isDraft?: boolean | undefined;
1703
1737
  updatedAt?: string | undefined;
1704
1738
  canDelete?: boolean | undefined;
1739
+ isEmpty?: boolean | undefined;
1705
1740
  }[] | undefined;
1706
1741
  };
1707
1742
  }, {
@@ -1720,6 +1755,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1720
1755
  isDraft?: boolean | undefined;
1721
1756
  updatedAt?: string | undefined;
1722
1757
  canDelete?: boolean | undefined;
1758
+ isEmpty?: boolean | undefined;
1723
1759
  }[];
1724
1760
  mode?: "draft" | "published" | undefined;
1725
1761
  saved?: {
@@ -1794,6 +1830,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1794
1830
  isDraft?: boolean | undefined;
1795
1831
  updatedAt?: string | undefined;
1796
1832
  canDelete?: boolean | undefined;
1833
+ isEmpty?: boolean | undefined;
1797
1834
  } | undefined;
1798
1835
  access?: {
1799
1836
  project: boolean;
@@ -1826,6 +1863,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1826
1863
  isDraft?: boolean | undefined;
1827
1864
  updatedAt?: string | undefined;
1828
1865
  canDelete?: boolean | undefined;
1866
+ isEmpty?: boolean | undefined;
1829
1867
  } | undefined;
1830
1868
  versions?: {
1831
1869
  artifactId: string;
@@ -1837,6 +1875,7 @@ export declare const dashboardViewDataSchema: z.ZodObject<{
1837
1875
  isDraft?: boolean | undefined;
1838
1876
  updatedAt?: string | undefined;
1839
1877
  canDelete?: boolean | undefined;
1878
+ isEmpty?: boolean | undefined;
1840
1879
  }[] | undefined;
1841
1880
  };
1842
1881
  }>;
@@ -7,7 +7,7 @@ const artifact_document_1 = require("@xpert-ai/plugin-sdk/artifact-document");
7
7
  const projects_schema_1 = require("./projects.schema");
8
8
  const dashboard_schema_1 = require("./dashboard.schema");
9
9
  const dashboard_navigation_1 = require("./dashboard-navigation");
10
- exports.dashboardSummarySchema = v3_1.z.object({ artifactId: v3_1.z.string(), versionId: v3_1.z.string().nullish(), versionNumber: v3_1.z.number().optional(), title: v3_1.z.string().nullish(), updatedAt: v3_1.z.string().optional(), draftRevision: v3_1.z.number().optional(), canDelete: v3_1.z.boolean().optional(), isDraft: v3_1.z.boolean().optional(), baseVersionId: v3_1.z.string().nullish() });
10
+ exports.dashboardSummarySchema = v3_1.z.object({ artifactId: v3_1.z.string(), versionId: v3_1.z.string().nullish(), versionNumber: v3_1.z.number().optional(), title: v3_1.z.string().nullish(), updatedAt: v3_1.z.string().optional(), draftRevision: v3_1.z.number().optional(), canDelete: v3_1.z.boolean().optional(), isDraft: v3_1.z.boolean().optional(), isEmpty: v3_1.z.boolean().optional(), baseVersionId: v3_1.z.string().nullish() });
11
11
  exports.dashboardPickerPageSchema = v3_1.z.object({ items: v3_1.z.array(exports.dashboardSummarySchema), page: v3_1.z.number().int().positive(), hasMore: v3_1.z.boolean(), canEdit: v3_1.z.boolean().default(false), mode: v3_1.z.enum(['draft', 'published']).optional() });
12
12
  exports.dashboardSavedSchema = exports.dashboardSummarySchema.extend({ manifest: dashboard_schema_1.dashboardSchema, dependencies: artifact_document_1.artifactDocumentDependencyAssets.optional() });
13
13
  // Source identities belong to Analytics, including immutable Definitions and Artifacts.
@@ -25,7 +25,9 @@ export declare class DashboardService {
25
25
  title: string | null | undefined;
26
26
  draftRevision?: number | undefined;
27
27
  updatedAt: string | Date | undefined;
28
+ isEmpty: boolean;
28
29
  canDelete: boolean;
30
+ isDraft: boolean;
29
31
  artifactId: string;
30
32
  versionId: string | null | undefined;
31
33
  versionNumber: number | undefined;
@@ -39,7 +41,9 @@ export declare class DashboardService {
39
41
  title: string | null | undefined;
40
42
  draftRevision?: number | undefined;
41
43
  updatedAt: string | Date | undefined;
44
+ isEmpty: boolean;
42
45
  canDelete: boolean;
46
+ isDraft: boolean;
43
47
  artifactId: string;
44
48
  versionId: string | null | undefined;
45
49
  versionNumber: number | undefined;
@@ -53,7 +57,9 @@ export declare class DashboardService {
53
57
  title: string | null | undefined;
54
58
  draftRevision?: number | undefined;
55
59
  updatedAt: string | Date | undefined;
60
+ isEmpty: boolean;
56
61
  canDelete: boolean;
62
+ isDraft: boolean;
57
63
  artifactId: string;
58
64
  versionId: string | null | undefined;
59
65
  versionNumber: number | undefined;
@@ -64,12 +70,15 @@ export declare class DashboardService {
64
70
  selectedSummary(context: XpertResolvedViewHostContext, artifactId: string): Promise<{
65
71
  title: string | null | undefined;
66
72
  draftRevision?: number | undefined;
73
+ updatedAt: string | Date | undefined;
74
+ isEmpty: boolean;
67
75
  canDelete: boolean;
76
+ isDraft: boolean;
68
77
  artifactId: string;
69
78
  versionId: string | null | undefined;
70
79
  versionNumber: number | undefined;
71
- updatedAt: string | Date | undefined;
72
80
  } | undefined>;
81
+ private pickerSummary;
73
82
  trash(context: XpertResolvedViewHostContext, artifactId: string, expectedRevision: number): Promise<{
74
83
  artifactId: string;
75
84
  }>;
@@ -70,11 +70,7 @@ let DashboardService = class DashboardService {
70
70
  const result = await this.runtime.require(plugin_sdk_1.ArtifactsRuntimeCapability).listArtifacts({ pluginName: exports.PLUGIN_NAME, resourceType: RESOURCE_TYPE, resourceIdPrefix: hostPrefix(context), status: 'active', page, pageSize, includeCurrentVersion: true });
71
71
  const items = result.items.filter((item) => item.resourceId.startsWith(hostPrefix(context)) && (item.userId === context.userId || !item.userId && item.projectId === projectId(context)));
72
72
  const drafts = new Map((access.canReadDraft ? await this.runtime.require(plugin_sdk_1.ArtifactDraftsRuntimeCapability).list(items.map(item => item.id)) : []).map(draft => [draft.artifactId, draft]));
73
- return { page, pageSize, hasMore: page * pageSize < result.total, items: items.filter(item => access.canReadDraft || !!item.currentVersionId).map(item => {
74
- const draft = drafts.get(item.id);
75
- return { ...summary(item), canDelete: !!draft && access.canManage,
76
- ...(draft ? { title: draft.title ?? item.title, draftRevision: draft.revision, updatedAt: draft.updatedAt ?? item.updatedAt } : {}) };
77
- }) };
73
+ return { page, pageSize, hasMore: page * pageSize < result.total, items: await Promise.all(items.filter(item => access.canReadDraft || !!item.currentVersionId).map(item => this.pickerSummary(item, drafts.get(item.id), access))) };
78
74
  }
79
75
  async searchPage(context, input) {
80
76
  // Search the authorized display titles, including editor drafts. Filtering a stored
@@ -99,8 +95,14 @@ let DashboardService = class DashboardService {
99
95
  if (!access.canReadDraft && !artifact.currentVersionId)
100
96
  return undefined;
101
97
  const draft = access.canReadDraft ? (await this.runtime.require(plugin_sdk_1.ArtifactDraftsRuntimeCapability).list([artifactId]))[0] : undefined;
102
- return { ...summary(artifact), canDelete: !!draft && access.canManage,
103
- ...(draft ? { title: draft.title ?? artifact.title, draftRevision: draft.revision } : {}) };
98
+ return this.pickerSummary(artifact, draft, access);
99
+ }
100
+ async pickerSummary(artifact, draft, access) {
101
+ const isEmpty = access.canReadDraft && !draft && !artifact.currentVersionId &&
102
+ !(await this.runtime.require(plugin_sdk_1.ArtifactsRuntimeCapability).listArtifactVersions({ artifactId: artifact.id })).length;
103
+ return { ...summary(artifact), isEmpty, canDelete: access.canManage && !!draft,
104
+ isDraft: !!draft && draft.revision !== draft.publishedRevision,
105
+ ...(draft ? { title: draft.title ?? artifact.title, draftRevision: draft.revision, updatedAt: draft.updatedAt ?? artifact.updatedAt } : {}) };
104
106
  }
105
107
  async trash(context, artifactId, expectedRevision) {
106
108
  await this.authorizeProject(context, 'manage');
@@ -38,7 +38,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
38
38
  title: string | null | undefined;
39
39
  draftRevision?: number | undefined;
40
40
  updatedAt: string | Date | undefined;
41
+ isEmpty: boolean;
41
42
  canDelete: boolean;
43
+ isDraft: boolean;
42
44
  artifactId: string;
43
45
  versionId: string | null | undefined;
44
46
  versionNumber: number | undefined;
@@ -47,7 +49,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
47
49
  title: string | null | undefined;
48
50
  draftRevision?: number | undefined;
49
51
  updatedAt: string | Date | undefined;
52
+ isEmpty: boolean;
50
53
  canDelete: boolean;
54
+ isDraft: boolean;
51
55
  artifactId: string;
52
56
  versionId: string | null | undefined;
53
57
  versionNumber: number | undefined;
@@ -142,7 +146,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
142
146
  title: string | null | undefined;
143
147
  draftRevision?: number | undefined;
144
148
  updatedAt: string | Date | undefined;
149
+ isEmpty: boolean;
145
150
  canDelete: boolean;
151
+ isDraft: boolean;
146
152
  artifactId: string;
147
153
  versionId: string | null | undefined;
148
154
  versionNumber: number | undefined;
@@ -151,7 +157,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
151
157
  title: string | null | undefined;
152
158
  draftRevision?: number | undefined;
153
159
  updatedAt: string | Date | undefined;
160
+ isEmpty: boolean;
154
161
  canDelete: boolean;
162
+ isDraft: boolean;
155
163
  artifactId: string;
156
164
  versionId: string | null | undefined;
157
165
  versionNumber: number | undefined;
@@ -177,7 +185,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
177
185
  title: string | null | undefined;
178
186
  draftRevision?: number | undefined;
179
187
  updatedAt: string | Date | undefined;
188
+ isEmpty: boolean;
180
189
  canDelete: boolean;
190
+ isDraft: boolean;
181
191
  artifactId: string;
182
192
  versionId: string | null | undefined;
183
193
  versionNumber: number | undefined;
@@ -186,7 +196,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
186
196
  title: string | null | undefined;
187
197
  draftRevision?: number | undefined;
188
198
  updatedAt: string | Date | undefined;
199
+ isEmpty: boolean;
189
200
  canDelete: boolean;
201
+ isDraft: boolean;
190
202
  artifactId: string;
191
203
  versionId: string | null | undefined;
192
204
  versionNumber: number | undefined;
@@ -251,7 +263,9 @@ export declare class DashboardViewProvider implements IXpertViewExtensionProvide
251
263
  title: string | null | undefined;
252
264
  draftRevision?: number | undefined;
253
265
  updatedAt: string | Date | undefined;
266
+ isEmpty: boolean;
254
267
  canDelete: boolean;
268
+ isDraft: boolean;
255
269
  artifactId: string;
256
270
  versionId: string | null | undefined;
257
271
  versionNumber: number | undefined;