@lightdash/common 0.1341.0 → 0.1342.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/authorization/organizationMemberAbility.js +6 -0
- package/dist/authorization/projectMemberAbility.js +6 -0
- package/dist/authorization/types.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/catalog.d.ts +5 -0
- package/dist/types/tags.d.ts +13 -0
- package/dist/types/tags.js +2 -0
- package/package.json +1 -1
@@ -60,6 +60,9 @@ exports.organizationMemberAbilities = {
|
|
60
60
|
can('view', 'DashboardComments', {
|
61
61
|
organizationUuid: member.organizationUuid,
|
62
62
|
});
|
63
|
+
can('view', 'Tags', {
|
64
|
+
organizationUuid: member.organizationUuid,
|
65
|
+
});
|
63
66
|
},
|
64
67
|
interactive_viewer(member, { can }) {
|
65
68
|
exports.organizationMemberAbilities.viewer(member, { can });
|
@@ -159,6 +162,9 @@ exports.organizationMemberAbilities = {
|
|
159
162
|
can('manage', 'SemanticViewer', {
|
160
163
|
organizationUuid: member.organizationUuid,
|
161
164
|
});
|
165
|
+
can('manage', 'Tags', {
|
166
|
+
organizationUuid: member.organizationUuid,
|
167
|
+
});
|
162
168
|
},
|
163
169
|
developer(member, { can }) {
|
164
170
|
exports.organizationMemberAbilities.editor(member, { can });
|
@@ -48,6 +48,9 @@ exports.projectMemberAbilities = {
|
|
48
48
|
can('view', 'DashboardComments', {
|
49
49
|
projectUuid: member.projectUuid,
|
50
50
|
});
|
51
|
+
can('view', 'Tags', {
|
52
|
+
projectUuid: member.projectUuid,
|
53
|
+
});
|
51
54
|
},
|
52
55
|
interactive_viewer(member, { can }) {
|
53
56
|
exports.projectMemberAbilities.viewer(member, { can });
|
@@ -145,6 +148,9 @@ exports.projectMemberAbilities = {
|
|
145
148
|
can('manage', 'SemanticViewer', {
|
146
149
|
projectUuid: member.projectUuid,
|
147
150
|
});
|
151
|
+
can('manage', 'Tags', {
|
152
|
+
projectUuid: member.projectUuid,
|
153
|
+
});
|
148
154
|
},
|
149
155
|
developer(member, { can }) {
|
150
156
|
exports.projectMemberAbilities.editor(member, { can });
|
@@ -8,7 +8,7 @@ interface Project {
|
|
8
8
|
interface Organization {
|
9
9
|
organizationUuid: string;
|
10
10
|
}
|
11
|
-
type Subject = Project | Organization | OrganizationMemberProfile | 'Project' | 'Organization' | 'OrganizationMemberProfile' | 'Dashboard' | 'Space' | 'SavedChart' | 'InviteLink' | 'Job' | 'SqlRunner' | 'Analytics' | 'Explore' | 'UnderlyingData' | 'ExportCsv' | 'CsvJobResult' | 'PinnedItems' | 'Validation' | 'Group' | 'ChangeCsvResults' | 'ScheduledDeliveries' | 'DashboardComments' | 'CustomSql' | 'CompileProject' | 'SemanticViewer' | 'VirtualView' | 'all';
|
11
|
+
type Subject = Project | Organization | OrganizationMemberProfile | 'Project' | 'Organization' | 'OrganizationMemberProfile' | 'Dashboard' | 'Space' | 'SavedChart' | 'InviteLink' | 'Job' | 'SqlRunner' | 'Analytics' | 'Explore' | 'UnderlyingData' | 'ExportCsv' | 'CsvJobResult' | 'PinnedItems' | 'Validation' | 'Group' | 'ChangeCsvResults' | 'ScheduledDeliveries' | 'DashboardComments' | 'CustomSql' | 'CompileProject' | 'SemanticViewer' | 'VirtualView' | 'Tags' | 'all';
|
12
12
|
type PossibleAbilities = [
|
13
13
|
AbilityAction,
|
14
14
|
Subject | ForcedSubject<Exclude<Subject, 'all'>>
|
package/dist/index.d.ts
CHANGED
@@ -107,6 +107,7 @@ export * from './types/space';
|
|
107
107
|
export * from './types/sqlRunner';
|
108
108
|
export * from './types/SshKeyPair';
|
109
109
|
export * from './types/table';
|
110
|
+
export * from './types/tags';
|
110
111
|
export * from './types/timeFrames';
|
111
112
|
export * from './types/timezone';
|
112
113
|
export * from './types/user';
|
package/dist/index.js
CHANGED
@@ -79,6 +79,7 @@ tslib_1.__exportStar(require("./types/space"), exports);
|
|
79
79
|
tslib_1.__exportStar(require("./types/sqlRunner"), exports);
|
80
80
|
tslib_1.__exportStar(require("./types/SshKeyPair"), exports);
|
81
81
|
tslib_1.__exportStar(require("./types/table"), exports);
|
82
|
+
tslib_1.__exportStar(require("./types/tags"), exports);
|
82
83
|
tslib_1.__exportStar(require("./types/timeFrames"), exports);
|
83
84
|
tslib_1.__exportStar(require("./types/timezone"), exports);
|
84
85
|
tslib_1.__exportStar(require("./types/user"), exports);
|
package/dist/types/catalog.d.ts
CHANGED
@@ -3,6 +3,7 @@ import { type CompiledDimension, type CompiledMetric, type Dimension, type Field
|
|
3
3
|
import type { KnexPaginatedData } from './knex-paginate';
|
4
4
|
import { type ChartSummary } from './savedCharts';
|
5
5
|
import { type TableBase } from './table';
|
6
|
+
import type { Tag } from './tags';
|
6
7
|
export declare enum CatalogType {
|
7
8
|
Table = "table",
|
8
9
|
Field = "field"
|
@@ -23,18 +24,22 @@ export type ApiCatalogSearch = {
|
|
23
24
|
filter?: CatalogFilter;
|
24
25
|
};
|
25
26
|
export type CatalogField = Pick<Field, 'name' | 'label' | 'fieldType' | 'tableLabel' | 'description'> & Pick<Dimension, 'requiredAttributes'> & {
|
27
|
+
catalogSearchUuid: string;
|
26
28
|
type: CatalogType.Field;
|
27
29
|
basicType?: string;
|
28
30
|
tableName: string;
|
29
31
|
tableGroupLabel?: string;
|
30
32
|
tags?: string[];
|
33
|
+
catalogTags: Pick<Tag, 'name' | 'color' | 'tagUuid'>[];
|
31
34
|
chartUsage: number | undefined;
|
32
35
|
};
|
33
36
|
export type CatalogTable = Pick<TableBase, 'name' | 'label' | 'groupLabel' | 'description' | 'requiredAttributes'> & {
|
37
|
+
catalogSearchUuid: string;
|
34
38
|
errors?: InlineError[];
|
35
39
|
type: CatalogType.Table;
|
36
40
|
groupLabel?: string;
|
37
41
|
tags?: string[];
|
42
|
+
catalogTags: Pick<Tag, 'name' | 'color' | 'tagUuid'>[];
|
38
43
|
joinedTables?: CompiledExploreJoin[];
|
39
44
|
chartUsage: number | undefined;
|
40
45
|
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { LightdashUser } from './user';
|
2
|
+
export type Tag = {
|
3
|
+
tagUuid: string;
|
4
|
+
projectUuid: string;
|
5
|
+
name: string;
|
6
|
+
color: string;
|
7
|
+
createdAt: Date;
|
8
|
+
createdBy: Pick<LightdashUser, 'userUuid' | 'firstName' | 'lastName'> | null;
|
9
|
+
};
|
10
|
+
export type ApiGetTagsResponse = {
|
11
|
+
status: 'ok';
|
12
|
+
results: Tag[];
|
13
|
+
};
|