@metad/contracts 3.6.2 → 3.6.7
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/.babelrc +5 -0
- package/.eslintrc.json +18 -0
- package/babel.config.json +1 -0
- package/index.cjs.js +5 -4233
- package/jest.config.ts +16 -0
- package/package.json +2 -2
- package/project.json +53 -0
- package/src/agent/{ai-model.d.ts → ai-model.ts} +2 -2
- package/src/agent/graph.ts +275 -0
- package/src/agent/index.ts +5 -0
- package/src/agent/token.ts +23 -0
- package/src/agent/utils.spec.ts +283 -0
- package/src/agent/utils.ts +122 -0
- package/src/agent/variables.ts +66 -0
- package/src/ai/ai-model.model.ts +232 -0
- package/src/ai/ai-provider.model.ts +53 -0
- package/src/ai/ai.model.ts +87 -0
- package/src/ai/chat-message-feedback.model.ts +31 -0
- package/src/ai/chat-message.model.ts +277 -0
- package/src/ai/chat.model.ts +207 -0
- package/src/ai/copilot-checkpoint.model.ts +25 -0
- package/src/ai/copilot-example.model.ts +23 -0
- package/src/ai/copilot-model.model.ts +31 -0
- package/src/ai/copilot-organization.model.ts +21 -0
- package/src/ai/copilot-provider.model.ts +46 -0
- package/src/ai/copilot-role.model.ts +48 -0
- package/src/ai/copilot-store.model.ts +34 -0
- package/src/ai/copilot-user.model.ts +24 -0
- package/src/ai/copilot.model.ts +47 -0
- package/src/ai/{environment.model.d.ts → environment.model.ts} +12 -10
- package/src/ai/feature.model.ts +6 -0
- package/src/ai/index.ts +40 -0
- package/src/ai/knowledge-doc-chunk.model.ts +123 -0
- package/src/ai/knowledge-doc-chunk.spec.ts +47 -0
- package/src/ai/knowledge-doc-page.model.ts +20 -0
- package/src/ai/knowledge-doc.model.ts +364 -0
- package/src/ai/knowledge-pipeline.ts +138 -0
- package/src/ai/knowledge-retrieval-log.model.ts +19 -0
- package/src/ai/knowledgebase-task.model.ts +46 -0
- package/src/ai/knowledgebase.model.ts +205 -0
- package/src/ai/rag-web.ts +54 -0
- package/src/ai/rag.ts +24 -0
- package/src/ai/role-permissions.ts +13 -0
- package/src/ai/types.ts +83 -0
- package/src/ai/xpert-agent-execution.model.ts +115 -0
- package/src/ai/xpert-agent.model.ts +264 -0
- package/src/ai/xpert-project.model.ts +103 -0
- package/src/ai/xpert-table.model.ts +100 -0
- package/src/ai/xpert-task.model.ts +32 -0
- package/src/ai/xpert-template.model.ts +53 -0
- package/src/ai/xpert-tool-mcp.model.ts +77 -0
- package/src/ai/xpert-tool.model.ts +216 -0
- package/src/ai/xpert-toolset.model.ts +220 -0
- package/src/ai/xpert-workflow-task.prompt.ts +71 -0
- package/src/ai/xpert-workflow.model.ts +502 -0
- package/src/ai/xpert-workspace.model.ts +42 -0
- package/src/ai/xpert.model.ts +637 -0
- package/src/ai/xpert.utils.ts +214 -0
- package/src/analytics/ai.ts +79 -0
- package/src/analytics/approval-policy.model.ts +40 -0
- package/src/analytics/business-area-user.model.ts +43 -0
- package/src/analytics/business-area.ts +20 -0
- package/src/analytics/certification.model.ts +12 -0
- package/src/analytics/chatbi-conversation.model.ts +16 -0
- package/src/analytics/chatbi-model.model.ts +22 -0
- package/src/analytics/collection.model.ts +8 -0
- package/src/analytics/comment.model.ts +14 -0
- package/src/analytics/data-source-type.ts +19 -0
- package/src/analytics/data-source.ts +72 -0
- package/src/analytics/favorite.ts +18 -0
- package/src/analytics/features.ts +19 -0
- package/src/analytics/feed-model.ts +15 -0
- package/src/analytics/gateway.ts +31 -0
- package/src/analytics/index.ts +39 -0
- package/src/analytics/indicator-app.ts +49 -0
- package/src/analytics/{indicator-market.d.ts → indicator-market.ts} +6 -2
- package/src/analytics/indicator.ts +143 -0
- package/src/analytics/model-query-log.model.ts +45 -0
- package/src/analytics/model-query.ts +22 -0
- package/src/analytics/{notification-destination.d.ts → notification-destination.ts} +9 -5
- package/src/analytics/{permission-approval-user.model.d.ts → permission-approval-user.model.ts} +10 -8
- package/src/analytics/permission-approval.model.ts +58 -0
- package/src/analytics/project.model.ts +56 -0
- package/src/analytics/role-permissions.ts +36 -0
- package/src/analytics/schema.ts +300 -0
- package/src/analytics/screenshot.model.ts +28 -0
- package/src/analytics/semantic-model-entity.ts +50 -0
- package/src/analytics/semantic-model-member.ts +49 -0
- package/src/analytics/semantic-model.ts +237 -0
- package/src/analytics/{story-point.d.ts → story-point.ts} +11 -6
- package/src/analytics/story-template.model.ts +34 -0
- package/src/analytics/story-widget.ts +15 -0
- package/src/analytics/story.ts +109 -0
- package/src/analytics/subscription.ts +43 -0
- package/src/analytics/visit.model.ts +39 -0
- package/src/analytics/webSocket.ts +53 -0
- package/src/api-key.model.ts +11 -0
- package/src/base-entity.model.ts +34 -0
- package/src/contact.model.ts +45 -0
- package/src/core.model.ts +103 -0
- package/src/{country.model.d.ts → country.model.ts} +3 -2
- package/src/currency.model.ts +582 -0
- package/src/{custom-smtp.model.d.ts → custom-smtp.model.ts} +21 -17
- package/src/date-picker.model.ts +5 -0
- package/src/email-template.model.ts +50 -0
- package/src/email.model.ts +46 -0
- package/src/employee.model.ts +199 -0
- package/src/entity-with-members.model.ts +16 -0
- package/src/feature.model.ts +108 -0
- package/src/file-provider.ts +37 -0
- package/src/help-center-article.model.ts +35 -0
- package/src/help-center.model.ts +33 -0
- package/src/http-status.enum.ts +58 -0
- package/src/import-export.model.ts +42 -0
- package/src/index.ts +60 -0
- package/src/integration/dify.ts +31 -0
- package/src/integration/dingtalk.ts +16 -0
- package/src/integration/fastgpt.ts +32 -0
- package/src/integration/firecrawl.ts +46 -0
- package/src/integration/github.ts +149 -0
- package/src/integration/index.ts +15 -0
- package/src/integration/lark.ts +79 -0
- package/src/integration/wecom.ts +16 -0
- package/src/integration.model.ts +119 -0
- package/src/invite.model.ts +144 -0
- package/src/language.model.ts +22 -0
- package/src/organization-contact.model.ts +84 -0
- package/src/{organization-department.model.d.ts → organization-department.model.ts} +16 -10
- package/src/organization-language.model.ts +24 -0
- package/src/organization-projects.model.ts +99 -0
- package/src/organization-team-employee-model.ts +14 -0
- package/src/organization-team-model.ts +25 -0
- package/src/organization.model.ts +266 -0
- package/src/{password-reset.model.d.ts → password-reset.model.ts} +14 -10
- package/src/{plain-object.model.d.ts → plain-object.model.ts} +1 -1
- package/src/plugin.ts +15 -0
- package/src/role-permission.model.ts +123 -0
- package/src/role.model.ts +31 -0
- package/src/schedule.ts +71 -0
- package/src/secret-token.model.ts +15 -0
- package/src/seed.model.ts +50 -0
- package/src/storage-file.model.ts +46 -0
- package/src/tag-entity.model.ts +23 -0
- package/src/tenant.model.ts +52 -0
- package/src/tools/index.ts +1 -0
- package/src/tools/sandbox.ts +5 -0
- package/src/translation.model.ts +37 -0
- package/src/types.ts +277 -0
- package/src/user-organization.model.ts +31 -0
- package/src/user.model.ts +151 -0
- package/src/visibility.model.ts +6 -0
- package/tsconfig.json +22 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +9 -0
- package/index.cjs.d.ts +0 -1
- package/index.esm.d.ts +0 -1
- package/index.esm.js +0 -4129
- package/src/agent/graph.d.ts +0 -148
- package/src/agent/index.d.ts +0 -5
- package/src/agent/token.d.ts +0 -21
- package/src/agent/utils.d.ts +0 -19
- package/src/agent/variables.d.ts +0 -14
- package/src/ai/ai-model.model.d.ts +0 -198
- package/src/ai/ai-provider.model.d.ts +0 -43
- package/src/ai/ai.model.d.ts +0 -82
- package/src/ai/chat-message-feedback.model.d.ts +0 -24
- package/src/ai/chat-message.model.d.ts +0 -222
- package/src/ai/chat.model.d.ts +0 -189
- package/src/ai/copilot-checkpoint.model.d.ts +0 -23
- package/src/ai/copilot-example.model.d.ts +0 -19
- package/src/ai/copilot-model.model.d.ts +0 -26
- package/src/ai/copilot-organization.model.d.ts +0 -17
- package/src/ai/copilot-provider.model.d.ts +0 -31
- package/src/ai/copilot-role.model.d.ts +0 -43
- package/src/ai/copilot-store.model.d.ts +0 -29
- package/src/ai/copilot-user.model.d.ts +0 -20
- package/src/ai/copilot.model.d.ts +0 -36
- package/src/ai/feature.model.d.ts +0 -6
- package/src/ai/index.d.ts +0 -39
- package/src/ai/knowledge-doc-chunk.model.d.ts +0 -60
- package/src/ai/knowledge-doc-page.model.d.ts +0 -15
- package/src/ai/knowledge-doc.model.d.ts +0 -192
- package/src/ai/knowledge-pipeline.d.ts +0 -107
- package/src/ai/knowledge-retrieval-log.model.d.ts +0 -10
- package/src/ai/knowledgebase-task.model.d.ts +0 -39
- package/src/ai/knowledgebase.model.d.ts +0 -162
- package/src/ai/rag-web.d.ts +0 -26
- package/src/ai/rag.d.ts +0 -24
- package/src/ai/role-permissions.d.ts +0 -13
- package/src/ai/types.d.ts +0 -39
- package/src/ai/xpert-agent-execution.model.d.ts +0 -96
- package/src/ai/xpert-agent.model.d.ts +0 -192
- package/src/ai/xpert-project.model.d.ts +0 -86
- package/src/ai/xpert-task.model.d.ts +0 -26
- package/src/ai/xpert-template.model.d.ts +0 -47
- package/src/ai/xpert-tool-mcp.model.d.ts +0 -67
- package/src/ai/xpert-tool.model.d.ts +0 -147
- package/src/ai/xpert-toolset.model.d.ts +0 -200
- package/src/ai/xpert-workflow-task.prompt.d.ts +0 -2
- package/src/ai/xpert-workflow.model.d.ts +0 -366
- package/src/ai/xpert-workspace.model.d.ts +0 -32
- package/src/ai/xpert.model.d.ts +0 -529
- package/src/ai/xpert.utils.d.ts +0 -80
- package/src/analytics/ai.d.ts +0 -73
- package/src/analytics/approval-policy.model.d.ts +0 -30
- package/src/analytics/business-area-user.model.d.ts +0 -35
- package/src/analytics/business-area.d.ts +0 -17
- package/src/analytics/certification.model.d.ts +0 -11
- package/src/analytics/chatbi-conversation.model.d.ts +0 -15
- package/src/analytics/chatbi-model.model.d.ts +0 -18
- package/src/analytics/collection.model.d.ts +0 -6
- package/src/analytics/comment.model.d.ts +0 -10
- package/src/analytics/data-source-type.d.ts +0 -16
- package/src/analytics/data-source.d.ts +0 -62
- package/src/analytics/favorite.d.ts +0 -14
- package/src/analytics/features.d.ts +0 -19
- package/src/analytics/feed-model.d.ts +0 -13
- package/src/analytics/gateway.d.ts +0 -27
- package/src/analytics/index.d.ts +0 -38
- package/src/analytics/indicator-app.d.ts +0 -44
- package/src/analytics/indicator.d.ts +0 -106
- package/src/analytics/model-query-log.model.d.ts +0 -41
- package/src/analytics/model-query.d.ts +0 -21
- package/src/analytics/permission-approval.model.d.ts +0 -47
- package/src/analytics/project.model.d.ts +0 -50
- package/src/analytics/role-permissions.d.ts +0 -25
- package/src/analytics/schema.d.ts +0 -262
- package/src/analytics/screenshot.model.d.ts +0 -25
- package/src/analytics/semantic-model-entity.d.ts +0 -37
- package/src/analytics/semantic-model-member.d.ts +0 -24
- package/src/analytics/semantic-model.d.ts +0 -175
- package/src/analytics/story-template.model.d.ts +0 -28
- package/src/analytics/story-widget.d.ts +0 -12
- package/src/analytics/story.d.ts +0 -93
- package/src/analytics/subscription.d.ts +0 -38
- package/src/analytics/visit.model.d.ts +0 -34
- package/src/analytics/webSocket.d.ts +0 -48
- package/src/api-key.model.d.ts +0 -10
- package/src/base-entity.model.d.ts +0 -27
- package/src/contact.model.d.ts +0 -41
- package/src/core.model.d.ts +0 -97
- package/src/currency.model.d.ts +0 -579
- package/src/date-picker.model.d.ts +0 -5
- package/src/email-template.model.d.ts +0 -39
- package/src/email.model.d.ts +0 -36
- package/src/employee.model.d.ts +0 -128
- package/src/entity-with-members.model.d.ts +0 -13
- package/src/feature.model.d.ts +0 -93
- package/src/file-provider.d.ts +0 -33
- package/src/help-center-article.model.d.ts +0 -0
- package/src/help-center.model.d.ts +0 -0
- package/src/http-status.enum.d.ts +0 -57
- package/src/import-export.model.d.ts +0 -36
- package/src/index.d.ts +0 -48
- package/src/integration/dify.d.ts +0 -0
- package/src/integration/dingtalk.d.ts +0 -2
- package/src/integration/fastgpt.d.ts +0 -0
- package/src/integration/firecrawl.d.ts +0 -2
- package/src/integration/github.d.ts +0 -69
- package/src/integration/index.d.ts +0 -4
- package/src/integration/lark.d.ts +0 -11
- package/src/integration/wecom.d.ts +0 -2
- package/src/integration.model.d.ts +0 -90
- package/src/invite.model.d.ts +0 -123
- package/src/language.model.d.ts +0 -19
- package/src/organization-contact.model.d.ts +0 -73
- package/src/organization-language.model.d.ts +0 -18
- package/src/organization-projects.model.d.ts +0 -80
- package/src/organization-team-employee-model.d.ts +0 -12
- package/src/organization-team-model.d.ts +0 -19
- package/src/organization.model.d.ts +0 -239
- package/src/plugin.d.ts +0 -13
- package/src/role-permission.model.d.ts +0 -61
- package/src/role.model.d.ts +0 -26
- package/src/schedule.d.ts +0 -27
- package/src/secret-token.model.d.ts +0 -11
- package/src/seed.model.d.ts +0 -37
- package/src/storage-file.model.d.ts +0 -40
- package/src/tag-entity.model.d.ts +0 -20
- package/src/tenant.model.d.ts +0 -40
- package/src/tools/index.d.ts +0 -1
- package/src/tools/sandbox.d.ts +0 -5
- package/src/translation.model.d.ts +0 -26
- package/src/types.d.ts +0 -241
- package/src/user-organization.model.d.ts +0 -24
- package/src/user.model.d.ts +0 -131
- package/src/visibility.model.d.ts +0 -6
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Here is the intermediate type definition converted from the actual schema type to the xmla file format.
|
|
3
|
+
* But the type definition here can also be referenced by the actual schema definition.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface Schema {
|
|
7
|
+
name: string
|
|
8
|
+
description?: string
|
|
9
|
+
Cube: Cube[]
|
|
10
|
+
VirtualCube?: VirtualCube[]
|
|
11
|
+
Dimension?: Dimension[]
|
|
12
|
+
Role?: Role[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Cube {
|
|
16
|
+
__id__?: string
|
|
17
|
+
name: string
|
|
18
|
+
caption?: string
|
|
19
|
+
Table: Table[] | Table
|
|
20
|
+
View: View[] | View
|
|
21
|
+
DimensionUsage?: DimensionUsage[]
|
|
22
|
+
Dimension: Dimension[]
|
|
23
|
+
Measure: Measure[]
|
|
24
|
+
CalculatedMember?: CalculatedMember[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Table {
|
|
28
|
+
name: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface View extends SQLExpression {
|
|
32
|
+
alias: string
|
|
33
|
+
_?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Mondrian 仅支持三种 Dimension 类型,
|
|
38
|
+
* 更丰富的语义可以通过 Semantics 来定义
|
|
39
|
+
*/
|
|
40
|
+
export enum DimensionType {
|
|
41
|
+
StandardDimension = 'StandardDimension',
|
|
42
|
+
TimeDimension = 'TimeDimension',
|
|
43
|
+
MeasuresDimension = 'MeasuresDimension'
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface Dimension {
|
|
47
|
+
__id__?: string
|
|
48
|
+
name: string
|
|
49
|
+
label?: string
|
|
50
|
+
foreignKey?: string
|
|
51
|
+
type?: DimensionType
|
|
52
|
+
caption?: string
|
|
53
|
+
description?: string
|
|
54
|
+
Hierarchy: Hierarchy[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface DimensionUsage {
|
|
58
|
+
__id__?: string
|
|
59
|
+
name: string
|
|
60
|
+
source: string
|
|
61
|
+
foreignKey: string
|
|
62
|
+
caption?: string
|
|
63
|
+
description?: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface Hierarchy {
|
|
67
|
+
__id__?: string
|
|
68
|
+
name?: string
|
|
69
|
+
label?: string
|
|
70
|
+
hasAll: boolean
|
|
71
|
+
allMemberName?: string
|
|
72
|
+
defaultMember?: string
|
|
73
|
+
primaryKey: string
|
|
74
|
+
primaryKeyTable?: string
|
|
75
|
+
Table?: Table[] | Table
|
|
76
|
+
Level?: Level[]
|
|
77
|
+
Join?: Join
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface Level {
|
|
81
|
+
__id__?: string
|
|
82
|
+
name: string
|
|
83
|
+
label?: string
|
|
84
|
+
column: string
|
|
85
|
+
nameColumn?: string
|
|
86
|
+
ordinalColumn?: string
|
|
87
|
+
parentColumn?: string
|
|
88
|
+
nullParentValue?: number
|
|
89
|
+
uniqueMembers: boolean
|
|
90
|
+
type?: string
|
|
91
|
+
table?: string
|
|
92
|
+
Closure?: Closure
|
|
93
|
+
KeyExpression?: KeyExpression
|
|
94
|
+
NameExpression?: NameExpression
|
|
95
|
+
CaptionExpression?: CaptionExpression
|
|
96
|
+
OrdinalExpression?: OrdinalExpression
|
|
97
|
+
ParentExpression?: ParentExpression
|
|
98
|
+
Property?: Property[]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface SQLExpression {
|
|
102
|
+
SQL: SQL | SQL[]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface KeyExpression {
|
|
106
|
+
SQL: SQL
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface NameExpression {
|
|
110
|
+
SQL: SQL
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface CaptionExpression {
|
|
114
|
+
SQL: SQL
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface OrdinalExpression {
|
|
118
|
+
SQL: SQL
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface ParentExpression {
|
|
122
|
+
SQL: SQL
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface SQL {
|
|
126
|
+
dialect: string
|
|
127
|
+
_?: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface Property {
|
|
131
|
+
name: string
|
|
132
|
+
column: string
|
|
133
|
+
PropertyExpression?: SQLExpression
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface Closure {
|
|
137
|
+
parentColumn: string
|
|
138
|
+
childColumn: string
|
|
139
|
+
Table: Table
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface Measure {
|
|
143
|
+
__id__?: string
|
|
144
|
+
name: string
|
|
145
|
+
caption?: string
|
|
146
|
+
label?: string
|
|
147
|
+
column: string
|
|
148
|
+
aggregator: string
|
|
149
|
+
formatString?: string
|
|
150
|
+
MeasureExpression?: MeasureExpression
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface MeasureExpression {
|
|
154
|
+
SQL: SQL
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface CalculatedMember {
|
|
158
|
+
__id__?: string
|
|
159
|
+
name: string
|
|
160
|
+
caption?: string
|
|
161
|
+
description?: string
|
|
162
|
+
dimension?: string
|
|
163
|
+
hierarchy?: string
|
|
164
|
+
// formula: string
|
|
165
|
+
Formula?: string | string[]
|
|
166
|
+
parent?: string
|
|
167
|
+
visible?: boolean
|
|
168
|
+
CalculatedMemberProperty?: CalculatedMemberProperty[]
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface CalculatedMemberProperty {
|
|
172
|
+
name: string
|
|
173
|
+
caption?: string
|
|
174
|
+
description?: string
|
|
175
|
+
expression?: string
|
|
176
|
+
value: string
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface NamedSet {
|
|
180
|
+
name: string
|
|
181
|
+
caption?: string
|
|
182
|
+
description?: string
|
|
183
|
+
formula?: string
|
|
184
|
+
Formula?: string[]
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface Join {
|
|
188
|
+
leftKey?: string
|
|
189
|
+
rightAlias?: string
|
|
190
|
+
rightKey?: string
|
|
191
|
+
Table?: Table | Table[]
|
|
192
|
+
Join?: Join
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// VirtualCube
|
|
196
|
+
export interface VirtualCube {
|
|
197
|
+
name: string
|
|
198
|
+
caption?: string
|
|
199
|
+
description?: string
|
|
200
|
+
CubeUsages: {
|
|
201
|
+
CubeUsage: CubeUsage[] | CubeUsage
|
|
202
|
+
}
|
|
203
|
+
VirtualCubeDimension: VirtualCubeDimension[] | VirtualCubeDimension
|
|
204
|
+
VirtualCubeMeasure: VirtualCubeMeasure[] | VirtualCubeMeasure
|
|
205
|
+
CalculatedMember: CalculatedMember[] | CalculatedMember
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface CubeUsage {
|
|
209
|
+
cubeName: string
|
|
210
|
+
ignoreUnrelatedDimensions?: boolean
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface VirtualCubeDimension {
|
|
214
|
+
cubeName: string
|
|
215
|
+
cubeCaption?: string
|
|
216
|
+
__shared__?: boolean
|
|
217
|
+
name: string
|
|
218
|
+
/**
|
|
219
|
+
* @deprecated use caption
|
|
220
|
+
*/
|
|
221
|
+
label?: string
|
|
222
|
+
caption?: string
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface VirtualCubeMeasure {
|
|
226
|
+
cubeName: string
|
|
227
|
+
cubeCaption?: string
|
|
228
|
+
name: string
|
|
229
|
+
/**
|
|
230
|
+
* @deprecated use caption
|
|
231
|
+
*/
|
|
232
|
+
label?: string
|
|
233
|
+
caption?: string
|
|
234
|
+
visible: boolean
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface Role {
|
|
238
|
+
name: string
|
|
239
|
+
SchemaGrant?: SchemaGrant[]
|
|
240
|
+
schemaGrant?: SchemaGrant
|
|
241
|
+
// Union roles
|
|
242
|
+
roleUsages?: string[]
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* enumerates the allowable access rights.
|
|
247
|
+
*/
|
|
248
|
+
export enum Access {
|
|
249
|
+
/**
|
|
250
|
+
* No access to an object and its children.
|
|
251
|
+
*/
|
|
252
|
+
none = 'none',
|
|
253
|
+
/**
|
|
254
|
+
* A grant that covers none of the children unless explicitly granted.
|
|
255
|
+
*/
|
|
256
|
+
custom = 'custom',
|
|
257
|
+
/**
|
|
258
|
+
* Access to all shared dimensions (applies to schema grant).
|
|
259
|
+
*/
|
|
260
|
+
all_dimensions = 'all_dimensions',
|
|
261
|
+
/**
|
|
262
|
+
* All access to an object and its children.
|
|
263
|
+
*/
|
|
264
|
+
all = 'all',
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export enum RollupPolicy {
|
|
268
|
+
full = 'full',
|
|
269
|
+
partial = 'partial',
|
|
270
|
+
hidden = 'hidden'
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface SchemaGrant {
|
|
274
|
+
access: Access
|
|
275
|
+
cubeGrants: CubeGrant[]
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export interface CubeGrant {
|
|
279
|
+
cube: string
|
|
280
|
+
access: Access
|
|
281
|
+
hierarchyGrants: HierarchyGrant[]
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export interface HierarchyGrant {
|
|
285
|
+
hierarchy: string
|
|
286
|
+
caption?: string
|
|
287
|
+
access: Access
|
|
288
|
+
rollupPolicy: RollupPolicy
|
|
289
|
+
topLevel: string
|
|
290
|
+
topLevelCaption?: string
|
|
291
|
+
bottomLevel: string
|
|
292
|
+
bottomLevelCaption?: string
|
|
293
|
+
memberGrants: MemberGrant[]
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface MemberGrant {
|
|
297
|
+
member: string
|
|
298
|
+
caption?: string
|
|
299
|
+
access: Access
|
|
300
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
|
|
2
|
+
import { FileStorageProviderEnum } from '../file-provider'
|
|
3
|
+
|
|
4
|
+
export interface IScreenshot extends IBasePerTenantAndOrganizationEntityModel {
|
|
5
|
+
file: string
|
|
6
|
+
url?: string
|
|
7
|
+
thumb?: string
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated use url
|
|
10
|
+
*/
|
|
11
|
+
fileUrl?: string
|
|
12
|
+
thumbUrl?: string
|
|
13
|
+
recordedAt?: Date
|
|
14
|
+
size?: number
|
|
15
|
+
storageProvider?: FileStorageProviderEnum
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IUpdateScreenshotInput extends ICreateScreenshotInput {
|
|
19
|
+
id: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ICreateScreenshotInput extends IBasePerTenantAndOrganizationEntityModel {
|
|
23
|
+
activityTimestamp: string
|
|
24
|
+
employeeId?: string
|
|
25
|
+
file: string
|
|
26
|
+
thumb?: string
|
|
27
|
+
recordedAt: Date | string
|
|
28
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
|
|
2
|
+
import { ScheduleTaskStatus, TScheduleOptions } from '../schedule';
|
|
3
|
+
|
|
4
|
+
export type SemanticModelEntityOptions = {
|
|
5
|
+
vector: {
|
|
6
|
+
dimensions: string[];
|
|
7
|
+
// /**
|
|
8
|
+
// * @deprecated use dimensions
|
|
9
|
+
// */
|
|
10
|
+
// hierarchies?: string[];
|
|
11
|
+
};
|
|
12
|
+
members?: Record<string, number>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum ModelEntityType {
|
|
16
|
+
Cube = 'cube',
|
|
17
|
+
Dimension = 'dimension'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Job info
|
|
22
|
+
*/
|
|
23
|
+
export type SemanticModelEntityJob = {
|
|
24
|
+
id: string | number
|
|
25
|
+
status?: 'completed' | 'failed' | 'processing' | 'cancel'
|
|
26
|
+
progress?: number
|
|
27
|
+
error?: string
|
|
28
|
+
createdAt?: Date
|
|
29
|
+
endAt?: Date
|
|
30
|
+
tokens?: number
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ISemanticModelEntity extends IBasePerTenantAndOrganizationEntityModel {
|
|
34
|
+
name?: string
|
|
35
|
+
caption?: string
|
|
36
|
+
type?: ModelEntityType
|
|
37
|
+
/**
|
|
38
|
+
* Schedule sync job into queue
|
|
39
|
+
*/
|
|
40
|
+
schedule?: TScheduleOptions
|
|
41
|
+
timeZone?: string
|
|
42
|
+
status?: ScheduleTaskStatus
|
|
43
|
+
|
|
44
|
+
modelId?: string
|
|
45
|
+
|
|
46
|
+
// Storing semantic metadata
|
|
47
|
+
options?: SemanticModelEntityOptions
|
|
48
|
+
|
|
49
|
+
job?: SemanticModelEntityJob
|
|
50
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from "../base-entity.model"
|
|
2
|
+
import { ISemanticModel } from "./semantic-model"
|
|
3
|
+
import { ISemanticModelEntity } from "./semantic-model-entity"
|
|
4
|
+
|
|
5
|
+
export interface ISemanticModelMember extends IBasePerTenantAndOrganizationEntityModel {
|
|
6
|
+
|
|
7
|
+
modelId?: string
|
|
8
|
+
model?: ISemanticModel
|
|
9
|
+
|
|
10
|
+
entityId?: string
|
|
11
|
+
entity?: ISemanticModelEntity
|
|
12
|
+
|
|
13
|
+
cube: string
|
|
14
|
+
|
|
15
|
+
dimension: string
|
|
16
|
+
|
|
17
|
+
hierarchy: string
|
|
18
|
+
|
|
19
|
+
level: string
|
|
20
|
+
|
|
21
|
+
language: string
|
|
22
|
+
|
|
23
|
+
memberUniqueName: string
|
|
24
|
+
|
|
25
|
+
memberKey?: string
|
|
26
|
+
|
|
27
|
+
memberName: string
|
|
28
|
+
|
|
29
|
+
memberCaption: string
|
|
30
|
+
|
|
31
|
+
memberOrdinal: number
|
|
32
|
+
|
|
33
|
+
memberType: number
|
|
34
|
+
|
|
35
|
+
levelNumber: number
|
|
36
|
+
|
|
37
|
+
parentUniqueName: string
|
|
38
|
+
|
|
39
|
+
metadata?: {
|
|
40
|
+
tokens: number
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Has Vector
|
|
44
|
+
vector?: boolean
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function embeddingCubeCollectionName(modelKey: string, cube: string, isDraft?: boolean): string {
|
|
48
|
+
return `${modelKey}:${cube}${isDraft ? ':draft' : ''}`
|
|
49
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
|
|
2
|
+
import { ITag } from '../tag-entity.model'
|
|
3
|
+
import { ChecklistItem, IPoint, ISize } from '../types'
|
|
4
|
+
import { IUser } from '../user.model'
|
|
5
|
+
import { Visibility } from '../visibility.model'
|
|
6
|
+
import { IBusinessArea } from './business-area'
|
|
7
|
+
import { IDataSource } from './data-source'
|
|
8
|
+
import { IIndicator } from './indicator'
|
|
9
|
+
import { IModelQuery } from './model-query'
|
|
10
|
+
import * as MDX from './schema'
|
|
11
|
+
import { IStory } from './story'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Data agent types
|
|
15
|
+
*/
|
|
16
|
+
export enum AgentType {
|
|
17
|
+
Local = 'local',
|
|
18
|
+
Browser = 'browser',
|
|
19
|
+
Server = 'server',
|
|
20
|
+
Wasm = 'wasm'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Preferences of semantic model
|
|
25
|
+
*/
|
|
26
|
+
export interface ISemanticModelPreferences {
|
|
27
|
+
// Cache
|
|
28
|
+
enableCache?: boolean
|
|
29
|
+
expires?: number
|
|
30
|
+
// preferred Language
|
|
31
|
+
language?: string
|
|
32
|
+
// Expose Xmla service for Semantic Model
|
|
33
|
+
exposeXmla?: boolean
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Model Schema Structured Data
|
|
38
|
+
*/
|
|
39
|
+
export type TSemanticModelOptions<T = any /*Schema*/> = {
|
|
40
|
+
/**
|
|
41
|
+
* The schema for MDX cube, dimension and virtual cube
|
|
42
|
+
*/
|
|
43
|
+
schema?: T
|
|
44
|
+
settings?: TSemanticModelSettings
|
|
45
|
+
/**
|
|
46
|
+
* Is embedded members of every `cube:dimension`
|
|
47
|
+
* Be cleaned up when publish
|
|
48
|
+
*/
|
|
49
|
+
embedded?: Record<string, Record<string, boolean>>
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type TSemanticModel = {
|
|
53
|
+
key?: string
|
|
54
|
+
name?: string
|
|
55
|
+
description?: string
|
|
56
|
+
type?: string
|
|
57
|
+
agentType?: AgentType
|
|
58
|
+
|
|
59
|
+
dataSourceId?: string
|
|
60
|
+
businessAreaId?: string
|
|
61
|
+
|
|
62
|
+
catalog?: string
|
|
63
|
+
cube?: string
|
|
64
|
+
// Storing semantic metadata
|
|
65
|
+
options?: TSemanticModelOptions<any>
|
|
66
|
+
|
|
67
|
+
// Roles
|
|
68
|
+
roles?: Array<IModelRole>
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Common settings for semantic model space
|
|
73
|
+
*/
|
|
74
|
+
export type TSemanticModelSettings = {
|
|
75
|
+
canvas?: {
|
|
76
|
+
position: IPoint
|
|
77
|
+
scale: number
|
|
78
|
+
};
|
|
79
|
+
nodes?: {key: string; position?: IPoint; size?: ISize}[]
|
|
80
|
+
/**
|
|
81
|
+
* @experimental A hierarchy of intermediate states that are not yet fixed
|
|
82
|
+
*/
|
|
83
|
+
hierarchies?: any[] // PropertyHierarchy[]
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Ignore unknown property when query model in story
|
|
87
|
+
*/
|
|
88
|
+
ignoreUnknownProperty?: boolean
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type TSemanticModelDraft<T = any> = TSemanticModel & {
|
|
92
|
+
schema?: T
|
|
93
|
+
settings?: TSemanticModelSettings
|
|
94
|
+
savedAt?: Date
|
|
95
|
+
checklist?: ChecklistItem[]
|
|
96
|
+
version?: number
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @legacy Table defination for wasm database
|
|
100
|
+
*/
|
|
101
|
+
tables?: any[] // Array<TableEntity>
|
|
102
|
+
/**
|
|
103
|
+
* @legacy DB Initialization for wasm database
|
|
104
|
+
*/
|
|
105
|
+
dbInitialization?: string
|
|
106
|
+
|
|
107
|
+
// Is embedded every `cube:dimension`
|
|
108
|
+
embedded?: Record<string, Record<string, boolean>>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface ISemanticModel extends IBasePerTenantAndOrganizationEntityModel, TSemanticModel {
|
|
112
|
+
/**
|
|
113
|
+
* Draft on current version
|
|
114
|
+
*/
|
|
115
|
+
draft?: TSemanticModelDraft
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Publish date of latest
|
|
119
|
+
*/
|
|
120
|
+
publishAt?: Date
|
|
121
|
+
releaseNotes?: string
|
|
122
|
+
|
|
123
|
+
tags?: ITag[]
|
|
124
|
+
|
|
125
|
+
dataSource?: IDataSource
|
|
126
|
+
|
|
127
|
+
businessArea?: IBusinessArea
|
|
128
|
+
|
|
129
|
+
// Storing model configuration
|
|
130
|
+
preferences?: ISemanticModelPreferences
|
|
131
|
+
|
|
132
|
+
visibility?: Visibility
|
|
133
|
+
|
|
134
|
+
status?: SemanticModelStatusEnum
|
|
135
|
+
/**
|
|
136
|
+
* Model owner, can be transfered
|
|
137
|
+
*/
|
|
138
|
+
owner?: IUser
|
|
139
|
+
ownerId?: string
|
|
140
|
+
|
|
141
|
+
members?: IUser[]
|
|
142
|
+
// Stories
|
|
143
|
+
stories?: Array<IStory>
|
|
144
|
+
// Indicators
|
|
145
|
+
indicators?: Array<IIndicator>
|
|
146
|
+
// Query
|
|
147
|
+
queries?: Array<IModelQuery>
|
|
148
|
+
|
|
149
|
+
version?: number
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Types of semantic model
|
|
154
|
+
*/
|
|
155
|
+
export enum ModelTypeEnum {
|
|
156
|
+
XMLA = 'XMLA',
|
|
157
|
+
SQL = 'SQL'
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Role in semantic model
|
|
162
|
+
*/
|
|
163
|
+
export interface IModelRole extends IBasePerTenantAndOrganizationEntityModel {
|
|
164
|
+
modelId: string
|
|
165
|
+
model?: ISemanticModel
|
|
166
|
+
key: string
|
|
167
|
+
name: string
|
|
168
|
+
type?: null | '' | RoleTypeEnum
|
|
169
|
+
options: MDX.Role
|
|
170
|
+
index?: number
|
|
171
|
+
users?: IUser[]
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Role types
|
|
176
|
+
*/
|
|
177
|
+
export enum RoleTypeEnum {
|
|
178
|
+
single = 'single',
|
|
179
|
+
union = 'union'
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Status of semantic model
|
|
184
|
+
*/
|
|
185
|
+
export enum SemanticModelStatusEnum {
|
|
186
|
+
/**
|
|
187
|
+
* Using
|
|
188
|
+
*/
|
|
189
|
+
Progressing = 'progressing',
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Archived
|
|
193
|
+
*/
|
|
194
|
+
Archived = 'archived'
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ISemanticModelCache extends IBasePerTenantAndOrganizationEntityModel {
|
|
198
|
+
key: string
|
|
199
|
+
language?: string
|
|
200
|
+
modelId?: string
|
|
201
|
+
model?: ISemanticModel
|
|
202
|
+
query?: string
|
|
203
|
+
data?: string
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @deprecated Equivalent to `VirtualCube` in the ocap framework
|
|
209
|
+
*/
|
|
210
|
+
export type TVirtualCube = {
|
|
211
|
+
name: string
|
|
212
|
+
caption?: string
|
|
213
|
+
description?: string
|
|
214
|
+
cubeUsages: MDX.CubeUsage[]
|
|
215
|
+
virtualCubeDimensions: MDX.VirtualCubeDimension[]
|
|
216
|
+
virtualCubeMeasures: MDX.VirtualCubeMeasure[]
|
|
217
|
+
calculatedMembers: MDX.CalculatedMember[]
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function extractSemanticModelDraft<S>(model: TSemanticModel): TSemanticModelDraft<S> {
|
|
221
|
+
return {
|
|
222
|
+
key: model.key,
|
|
223
|
+
name: model.name,
|
|
224
|
+
description: model.description,
|
|
225
|
+
type: model.type,
|
|
226
|
+
agentType: model.agentType,
|
|
227
|
+
|
|
228
|
+
dataSourceId: model.dataSourceId,
|
|
229
|
+
businessAreaId: model.businessAreaId,
|
|
230
|
+
|
|
231
|
+
catalog: model.catalog,
|
|
232
|
+
cube: model.cube,
|
|
233
|
+
schema: model.options?.schema as S,
|
|
234
|
+
settings: model.options?.settings,
|
|
235
|
+
roles: model.roles,
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { IStoryWidget } from './story-widget';
|
|
2
2
|
import { IBasePerTenantEntityModel } from '../base-entity.model';
|
|
3
3
|
import { IStory } from './story';
|
|
4
|
+
|
|
5
|
+
|
|
4
6
|
export interface IStoryPoint extends IBasePerTenantEntityModel {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
key?: string
|
|
8
|
+
name?: string
|
|
9
|
+
|
|
10
|
+
storyId: string
|
|
11
|
+
story?: IStory
|
|
12
|
+
|
|
13
|
+
options?: Record<string, unknown>
|
|
14
|
+
|
|
15
|
+
widgets?: IStoryWidget[]
|
|
11
16
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
|
|
2
|
+
import { ITag } from '../tag-entity.model'
|
|
3
|
+
import { IScreenshot } from './screenshot.model'
|
|
4
|
+
import { IStory } from './story'
|
|
5
|
+
|
|
6
|
+
export interface IStoryTemplate extends IBasePerTenantAndOrganizationEntityModel {
|
|
7
|
+
key?: string
|
|
8
|
+
name?: string
|
|
9
|
+
description?: string
|
|
10
|
+
type?: StoryTemplateType
|
|
11
|
+
isPublic?: boolean
|
|
12
|
+
|
|
13
|
+
tags?: ITag[]
|
|
14
|
+
|
|
15
|
+
options?: {
|
|
16
|
+
story?: {
|
|
17
|
+
options?: Record<string, unknown>
|
|
18
|
+
}
|
|
19
|
+
pages?: any[]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
storyId?: string
|
|
23
|
+
story?: IStory
|
|
24
|
+
previewId?: string
|
|
25
|
+
preview?: IScreenshot
|
|
26
|
+
thumbnail?: string
|
|
27
|
+
|
|
28
|
+
storyCount?: number
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum StoryTemplateType {
|
|
32
|
+
Template = 'Template',
|
|
33
|
+
Theme = 'Theme'
|
|
34
|
+
}
|