@xpert-ai/contracts 3.15.18 → 3.16.0

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.
Files changed (59) hide show
  1. package/index.cjs.js +257 -464
  2. package/index.esm.js +235 -458
  3. package/package.json +1 -1
  4. package/src/ai/assistant-binding.model.d.ts +0 -1
  5. package/src/ai/feature.model.d.ts +3 -1
  6. package/src/ai/index.d.ts +2 -0
  7. package/src/ai/knowledge-retrieval-log.model.d.ts +2 -2
  8. package/src/ai/membership.model.d.ts +188 -4
  9. package/src/ai/model-access.model.d.ts +229 -0
  10. package/src/ai/model-gateway.model.d.ts +159 -0
  11. package/src/ai/role-permissions.d.ts +8 -0
  12. package/src/ai/sandbox-terminal.model.d.ts +4 -0
  13. package/src/ai/xpert.model.d.ts +8 -0
  14. package/src/{analytics/data-source-type.d.ts → data-source-type.model.d.ts} +1 -1
  15. package/src/{analytics/data-source.d.ts → data-source.model.d.ts} +4 -7
  16. package/src/feature.model.d.ts +3 -1
  17. package/src/index.d.ts +4 -1
  18. package/src/referral.model.d.ts +36 -0
  19. package/src/role-permission.model.d.ts +5 -3
  20. package/src/role.model.d.ts +0 -1
  21. package/src/tenant.model.d.ts +5 -0
  22. package/src/user.model.d.ts +1 -0
  23. package/src/utils.d.ts +5 -0
  24. package/src/analytics/ai.d.ts +0 -73
  25. package/src/analytics/approval-policy.model.d.ts +0 -30
  26. package/src/analytics/business-area-user.model.d.ts +0 -35
  27. package/src/analytics/business-area.d.ts +0 -17
  28. package/src/analytics/certification.model.d.ts +0 -11
  29. package/src/analytics/chatbi-conversation.model.d.ts +0 -15
  30. package/src/analytics/chatbi-model.model.d.ts +0 -18
  31. package/src/analytics/collection.model.d.ts +0 -6
  32. package/src/analytics/comment.model.d.ts +0 -10
  33. package/src/analytics/favorite.d.ts +0 -14
  34. package/src/analytics/features.d.ts +0 -23
  35. package/src/analytics/feed-model.d.ts +0 -13
  36. package/src/analytics/gateway.d.ts +0 -28
  37. package/src/analytics/index.d.ts +0 -38
  38. package/src/analytics/indicator-app.d.ts +0 -44
  39. package/src/analytics/indicator-market.d.ts +0 -4
  40. package/src/analytics/indicator.d.ts +0 -105
  41. package/src/analytics/model-query-log.model.d.ts +0 -41
  42. package/src/analytics/model-query.d.ts +0 -21
  43. package/src/analytics/notification-destination.d.ts +0 -10
  44. package/src/analytics/permission-approval-user.model.d.ts +0 -10
  45. package/src/analytics/permission-approval.model.d.ts +0 -47
  46. package/src/analytics/project.model.d.ts +0 -50
  47. package/src/analytics/role-permissions.d.ts +0 -28
  48. package/src/analytics/schema.d.ts +0 -262
  49. package/src/analytics/screenshot.model.d.ts +0 -24
  50. package/src/analytics/semantic-model-entity.d.ts +0 -38
  51. package/src/analytics/semantic-model-member.d.ts +0 -27
  52. package/src/analytics/semantic-model.d.ts +0 -183
  53. package/src/analytics/story-point.d.ts +0 -11
  54. package/src/analytics/story-template.model.d.ts +0 -28
  55. package/src/analytics/story-widget.d.ts +0 -12
  56. package/src/analytics/story.d.ts +0 -93
  57. package/src/analytics/subscription.d.ts +0 -38
  58. package/src/analytics/visit.model.d.ts +0 -34
  59. package/src/analytics/webSocket.d.ts +0 -48
@@ -1,24 +0,0 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
- export interface IScreenshot extends IBasePerTenantAndOrganizationEntityModel {
3
- file: string;
4
- url?: string;
5
- thumb?: string;
6
- /**
7
- * @deprecated use url
8
- */
9
- fileUrl?: string;
10
- thumbUrl?: string;
11
- recordedAt?: Date;
12
- size?: number;
13
- storageProvider?: string;
14
- }
15
- export interface IUpdateScreenshotInput extends ICreateScreenshotInput {
16
- id: string;
17
- }
18
- export interface ICreateScreenshotInput extends IBasePerTenantAndOrganizationEntityModel {
19
- activityTimestamp: string;
20
- employeeId?: string;
21
- file: string;
22
- thumb?: string;
23
- recordedAt: Date | string;
24
- }
@@ -1,38 +0,0 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
- import { ScheduleTaskStatus, TScheduleOptions } from '../schedule';
3
- export type SemanticModelEntityOptions = {
4
- vector: {
5
- dimensions: string[];
6
- };
7
- members?: Record<string, number>;
8
- };
9
- export declare enum ModelEntityType {
10
- Cube = "cube",
11
- Dimension = "dimension"
12
- }
13
- /**
14
- * Job info
15
- */
16
- export type SemanticModelEntityJob = {
17
- id: string | number;
18
- status?: 'completed' | 'failed' | 'processing' | 'cancel';
19
- progress?: number;
20
- error?: string;
21
- createdAt?: Date;
22
- endAt?: Date;
23
- tokens?: number;
24
- };
25
- export interface ISemanticModelEntity extends IBasePerTenantAndOrganizationEntityModel {
26
- name?: string;
27
- caption?: string;
28
- type?: ModelEntityType;
29
- /**
30
- * Schedule sync job into queue
31
- */
32
- schedule?: TScheduleOptions;
33
- timeZone?: string;
34
- status?: ScheduleTaskStatus;
35
- modelId?: string;
36
- options?: SemanticModelEntityOptions;
37
- job?: SemanticModelEntityJob;
38
- }
@@ -1,27 +0,0 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from "../base-entity.model";
2
- import { ISemanticModel } from "./semantic-model";
3
- import { ISemanticModelEntity } from "./semantic-model-entity";
4
- export interface ISemanticModelMember extends IBasePerTenantAndOrganizationEntityModel {
5
- modelId?: string;
6
- model?: ISemanticModel;
7
- entityId?: string;
8
- entity?: ISemanticModelEntity;
9
- cube: string;
10
- dimension: string;
11
- hierarchy: string;
12
- level: string;
13
- language: string;
14
- memberUniqueName: string;
15
- memberKey?: string;
16
- memberName: string;
17
- memberCaption: string;
18
- memberOrdinal: number;
19
- memberType: number;
20
- levelNumber: number;
21
- parentUniqueName: string;
22
- metadata?: {
23
- tokens: number;
24
- };
25
- vector?: boolean;
26
- }
27
- export declare function embeddingCubeCollectionName(modelKey: string, cube: string, isDraft?: boolean): string;
@@ -1,183 +0,0 @@
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
- * Data agent types
14
- */
15
- export declare enum AgentType {
16
- Local = "local",
17
- Browser = "browser",
18
- Server = "server",
19
- Wasm = "wasm"
20
- }
21
- /**
22
- * Preferences of semantic model
23
- */
24
- export interface ISemanticModelPreferences {
25
- enableCache?: boolean;
26
- expires?: number;
27
- language?: string;
28
- exposeXmla?: boolean;
29
- }
30
- /**
31
- * Model Schema Structured Data
32
- */
33
- export type TSemanticModelOptions<T = any> = {
34
- /**
35
- * The schema for MDX cube, dimension and virtual cube
36
- */
37
- schema?: T;
38
- settings?: TSemanticModelSettings;
39
- /**
40
- * Is embedded members of every `cube:dimension`
41
- * Be cleaned up when publish
42
- */
43
- embedded?: Record<string, Record<string, boolean>>;
44
- };
45
- export type TSemanticModel = {
46
- key?: string;
47
- name?: string;
48
- description?: string;
49
- type?: string;
50
- agentType?: AgentType;
51
- dataSourceId?: string;
52
- businessAreaId?: string;
53
- catalog?: string;
54
- cube?: string;
55
- options?: TSemanticModelOptions<any>;
56
- roles?: Array<IModelRole>;
57
- };
58
- /**
59
- * Common settings for semantic model space
60
- */
61
- export type TSemanticModelSettings = {
62
- canvas?: {
63
- position: IPoint;
64
- scale: number;
65
- };
66
- nodes?: {
67
- key: string;
68
- position?: IPoint;
69
- size?: ISize;
70
- }[];
71
- /**
72
- * @experimental A hierarchy of intermediate states that are not yet fixed
73
- */
74
- hierarchies?: any[];
75
- /**
76
- * Ignore unknown property when query model in story
77
- */
78
- ignoreUnknownProperty?: boolean;
79
- };
80
- export type TSemanticModelDraft<T = any> = TSemanticModel & {
81
- schema?: T;
82
- settings?: TSemanticModelSettings;
83
- savedAt?: Date;
84
- checklist?: ChecklistItem[];
85
- version?: number;
86
- /**
87
- * @legacy Table defination for wasm database
88
- */
89
- tables?: any[];
90
- /**
91
- * @legacy DB Initialization for wasm database
92
- */
93
- dbInitialization?: string;
94
- embedded?: Record<string, Record<string, boolean>>;
95
- };
96
- export interface ISemanticModel extends IBasePerTenantAndOrganizationEntityModel, TSemanticModel {
97
- /**
98
- * Draft on current version
99
- */
100
- draft?: TSemanticModelDraft;
101
- /**
102
- * Publish date of latest
103
- */
104
- publishAt?: Date;
105
- releaseNotes?: string;
106
- tags?: ITag[];
107
- dataSource?: IDataSource;
108
- businessArea?: IBusinessArea;
109
- preferences?: ISemanticModelPreferences;
110
- visibility?: Visibility;
111
- status?: SemanticModelStatusEnum;
112
- /**
113
- * Model owner, can be transfered
114
- */
115
- owner?: IUser;
116
- ownerId?: string;
117
- members?: IUser[];
118
- stories?: Array<IStory>;
119
- indicators?: Array<IIndicator>;
120
- queries?: Array<IModelQuery>;
121
- version?: number;
122
- }
123
- /**
124
- * Types of semantic model
125
- */
126
- export declare enum ModelTypeEnum {
127
- XMLA = "XMLA",
128
- SQL = "SQL"
129
- }
130
- /**
131
- * Role in semantic model
132
- */
133
- export interface IModelRole extends IBasePerTenantAndOrganizationEntityModel {
134
- modelId: string;
135
- model?: ISemanticModel;
136
- key: string;
137
- name: string;
138
- type?: null | '' | RoleTypeEnum;
139
- options: MDX.Role;
140
- index?: number;
141
- users?: IUser[];
142
- }
143
- /**
144
- * Role types
145
- */
146
- export declare enum RoleTypeEnum {
147
- single = "single",
148
- union = "union"
149
- }
150
- /**
151
- * Status of semantic model
152
- */
153
- export declare enum SemanticModelStatusEnum {
154
- /**
155
- * Using
156
- */
157
- Progressing = "progressing",
158
- /**
159
- * Archived
160
- */
161
- Archived = "archived"
162
- }
163
- export interface ISemanticModelCache extends IBasePerTenantAndOrganizationEntityModel {
164
- key: string;
165
- language?: string;
166
- modelId?: string;
167
- model?: ISemanticModel;
168
- query?: string;
169
- data?: string;
170
- }
171
- /**
172
- * @deprecated Equivalent to `VirtualCube` in the ocap framework
173
- */
174
- export type TVirtualCube = {
175
- name: string;
176
- caption?: string;
177
- description?: string;
178
- cubeUsages: MDX.CubeUsage[];
179
- virtualCubeDimensions: MDX.VirtualCubeDimension[];
180
- virtualCubeMeasures: MDX.VirtualCubeMeasure[];
181
- calculatedMembers: MDX.CalculatedMember[];
182
- };
183
- export declare function extractSemanticModelDraft<S>(model: TSemanticModel): TSemanticModelDraft<S>;
@@ -1,11 +0,0 @@
1
- import { IStoryWidget } from './story-widget';
2
- import { IBasePerTenantEntityModel } from '../base-entity.model';
3
- import { IStory } from './story';
4
- export interface IStoryPoint extends IBasePerTenantEntityModel {
5
- key?: string;
6
- name?: string;
7
- storyId: string;
8
- story?: IStory;
9
- options?: Record<string, unknown>;
10
- widgets?: IStoryWidget[];
11
- }
@@ -1,28 +0,0 @@
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
- export interface IStoryTemplate extends IBasePerTenantAndOrganizationEntityModel {
6
- key?: string;
7
- name?: string;
8
- description?: string;
9
- type?: StoryTemplateType;
10
- isPublic?: boolean;
11
- tags?: ITag[];
12
- options?: {
13
- story?: {
14
- options?: Record<string, unknown>;
15
- };
16
- pages?: any[];
17
- };
18
- storyId?: string;
19
- story?: IStory;
20
- previewId?: string;
21
- preview?: IScreenshot;
22
- thumbnail?: string;
23
- storyCount?: number;
24
- }
25
- export declare enum StoryTemplateType {
26
- Template = "Template",
27
- Theme = "Theme"
28
- }
@@ -1,12 +0,0 @@
1
- import { IBasePerTenantEntityModel } from '../base-entity.model';
2
- import { IStory } from './story';
3
- import { IStoryPoint } from './story-point';
4
- export interface IStoryWidget extends IBasePerTenantEntityModel {
5
- key?: string;
6
- name?: string;
7
- storyId: string;
8
- story?: IStory;
9
- pointId: string;
10
- point?: IStoryPoint;
11
- options?: Record<string, unknown>;
12
- }
@@ -1,93 +0,0 @@
1
- import { ITag } from '../tag-entity.model';
2
- import { Visibility } from '../visibility.model';
3
- import { IBusinessArea } from './business-area';
4
- import { ICollection } from './collection.model';
5
- import { IFavorite } from './favorite';
6
- import { IBasePerProjectEntityModel } from './project.model';
7
- import { IScreenshot } from './screenshot.model';
8
- import { ISemanticModel } from './semantic-model';
9
- import { IStoryPoint } from './story-point';
10
- import { IStoryTemplate } from './story-template.model';
11
- export interface IStory extends IBasePerProjectEntityModel {
12
- name?: string;
13
- description?: string;
14
- tags?: ITag[];
15
- status?: StoryStatusEnum;
16
- collection?: ICollection;
17
- collectionId?: string;
18
- /**
19
- * Released story destination
20
- */
21
- businessArea?: IBusinessArea;
22
- businessAreaId?: string;
23
- modelId?: string;
24
- /**
25
- * Story's models space
26
- */
27
- model?: ISemanticModel;
28
- /**
29
- * Story relative models
30
- */
31
- models?: ISemanticModel[];
32
- visibility?: Visibility;
33
- points?: IStoryPoint[];
34
- options?: Record<string, unknown>;
35
- thumbnail?: string;
36
- previewId?: string;
37
- preview?: IScreenshot;
38
- templateId?: string;
39
- template?: IStoryTemplate;
40
- asTemplate?: IStoryTemplate;
41
- pv?: number;
42
- }
43
- export declare enum StoryStatusEnum {
44
- /**
45
- * 草稿
46
- */
47
- DRAFT = "DRAFT",
48
- /**
49
- * 重新编辑
50
- */
51
- CHANGING = "CHANGING",
52
- /**
53
- * 审阅中
54
- */
55
- REVIEW = "REVIEW",
56
- /**
57
- * 通过
58
- */
59
- APPROVED = "APPROVED",
60
- /**
61
- * 退回
62
- */
63
- REJECTED = "REJECTED",
64
- /**
65
- * 已发布
66
- */
67
- RELEASED = "RELEASED",
68
- /**
69
- * 下线存档
70
- */
71
- ARCHIVED = "ARCHIVED"
72
- }
73
- export interface Accessibility {
74
- access?: AccessEnum;
75
- bookmark?: IFavorite;
76
- }
77
- /**
78
- * 用户对某个实体的访问权限
79
- */
80
- export declare enum AccessEnum {
81
- /**
82
- * 可看到
83
- */
84
- View = "View",
85
- /**
86
- * 可读取详情
87
- */
88
- Read = "Read",
89
- /**
90
- * 可编辑
91
- */
92
- Write = "Write"
93
- }
@@ -1,38 +0,0 @@
1
- import { IBasePerTenantEntityModel } from "../base-entity.model";
2
- import { INotificationDestination } from "./notification-destination";
3
- import { IStory } from "./story";
4
- export interface ISubscription extends IBasePerTenantEntityModel {
5
- name: string;
6
- type: SubscriptionType;
7
- description?: string;
8
- /**
9
- * 启动订阅
10
- */
11
- enable?: boolean;
12
- storyId?: string;
13
- story?: IStory;
14
- pointId?: string;
15
- widgetId?: string;
16
- destinationId?: string;
17
- /**
18
- * 目的地
19
- */
20
- destination?: INotificationDestination;
21
- selectedDateType?: string;
22
- sendDate?: string;
23
- sendTime?: string;
24
- miOffice?: boolean;
25
- selectedUser?: string;
26
- selectedGroup?: string;
27
- notifyEveryone?: boolean;
28
- subscriptionDetail?: string;
29
- navigationButton?: boolean;
30
- buttonDesc?: string;
31
- linkSetting?: string;
32
- linkUrl?: string;
33
- options?: Record<string, unknown>;
34
- }
35
- export declare enum SubscriptionType {
36
- CHART = "CHART",
37
- INDICATOR = "INDICATOR"
38
- }
@@ -1,34 +0,0 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
- import { IIndicator } from './indicator';
3
- import { ISemanticModel } from './semantic-model';
4
- import { IStory } from './story';
5
- export interface IVisit extends IBasePerTenantAndOrganizationEntityModel {
6
- type: VisitTypeEnum;
7
- entity: VisitEntityEnum;
8
- entityId: string;
9
- entityName?: string;
10
- businessAreaId?: string;
11
- visitAt?: number;
12
- visits?: number;
13
- story?: IStory;
14
- model?: ISemanticModel;
15
- indicator?: IIndicator;
16
- }
17
- export declare enum VisitEntityEnum {
18
- DataSource = "DataSource",
19
- SemanticModel = "SemanticModel",
20
- Story = "Story",
21
- Widget = "Widget",
22
- Indicator = "Indicator"
23
- }
24
- export declare enum VisitTypeEnum {
25
- View = "View",
26
- Data = "Data"
27
- }
28
- export interface IEntityVisits {
29
- entity?: VisitEntityEnum;
30
- entityId: string;
31
- entityName: string;
32
- pv?: number;
33
- uv?: number;
34
- }
@@ -1,48 +0,0 @@
1
- import { ISemanticModel } from "./semantic-model";
2
- export interface AgentEventRequest {
3
- url?: string;
4
- headers: {
5
- [key: string]: string[];
6
- };
7
- body?: any;
8
- catalog?: string;
9
- table?: string;
10
- forceRefresh?: boolean;
11
- auth?: {
12
- username: string;
13
- password: string;
14
- };
15
- }
16
- export interface AgentEventResponse extends AgentEventRequest {
17
- status: number;
18
- statusText: string;
19
- }
20
- export declare enum AgentEventType {
21
- request = "request",
22
- response = "response",
23
- error = "error"
24
- }
25
- export interface AgentEvent {
26
- type?: 'connected';
27
- id: string;
28
- event: AgentEventType;
29
- data: {
30
- organizationId?: string;
31
- dataSource?: {
32
- id: string;
33
- name: string;
34
- type: string;
35
- updatedAt?: Date;
36
- };
37
- modelId?: string;
38
- semanticModel?: ISemanticModel;
39
- request: AgentEventRequest;
40
- response?: AgentEventResponse;
41
- error?: string;
42
- };
43
- }
44
- export declare enum LocalAgentType {
45
- TENANT = 0,
46
- USER = 1
47
- }
48
- export declare const TENANT_AGENT_LOCAL_URL = "agent-local-url";