@metad/contracts 3.8.3 → 3.9.0-beta.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.
- package/index.cjs.js +709 -310
- package/index.esm.js +695 -305
- package/package.json +6 -6
- package/src/agent/graph.d.ts +44 -29
- package/src/agent/token.d.ts +0 -17
- package/src/ai/assistant-binding.model.d.ts +74 -0
- package/src/ai/chat-event.model.d.ts +8 -0
- package/src/ai/chat-message.model.d.ts +1 -1
- package/src/ai/chat.model.d.ts +7 -1
- package/src/ai/feature.model.d.ts +5 -1
- package/src/ai/index.d.ts +40 -1
- package/src/ai/message-content.utils.d.ts +7 -1
- package/src/ai/sandbox.d.ts +3 -1
- package/src/ai/skill.model.d.ts +37 -18
- package/src/ai/xpert-agent-execution.model.d.ts +9 -0
- package/src/ai/xpert-agent.model.d.ts +3 -31
- package/src/ai/xpert-chat.model.d.ts +66 -0
- package/src/ai/xpert-project.model.d.ts +3 -0
- package/src/ai/xpert-workspace.model.d.ts +6 -1
- package/src/ai/xpert.model.d.ts +14 -4
- package/src/ai/xpert.utils.d.ts +8 -5
- package/src/api-key.model.d.ts +59 -1
- package/src/index.d.ts +3 -0
- package/src/integration.model.d.ts +7 -0
- package/src/invite.model.d.ts +2 -0
- package/src/plugin.d.ts +66 -1
- package/src/role.model.d.ts +3 -4
- package/src/scope.model.d.ts +9 -0
- package/src/types.d.ts +5 -2
- package/src/user-group.model.d.ts +7 -0
- package/src/view-extension/index.d.ts +1 -0
- package/src/view-extension/model.d.ts +183 -0
- package/index.esm.d.ts +0 -1
- package/src/help-center-article.model.d.ts +0 -0
- package/src/help-center.model.d.ts +0 -0
- package/src/integration/dify.d.ts +0 -0
- package/src/integration/fastgpt.d.ts +0 -0
- /package/{index.cjs.d.ts → index.d.ts} +0 -0
|
@@ -65,6 +65,9 @@ export interface IXpertProjectTaskLog extends IBasePerXpertProjectEntityModel {
|
|
|
65
65
|
logType: 'input' | 'output' | 'error';
|
|
66
66
|
content: string;
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated use CodeXpert instead
|
|
70
|
+
*/
|
|
68
71
|
export interface IXpertProjectVCS extends IBasePerXpertProjectEntityModel {
|
|
69
72
|
integrationId?: string;
|
|
70
73
|
integration?: IIntegration;
|
|
@@ -16,7 +16,12 @@ export interface IXpertWorkspace extends IBasePerTenantAndOrganizationEntityMode
|
|
|
16
16
|
environments?: IEnvironment[];
|
|
17
17
|
members?: IUser[];
|
|
18
18
|
}
|
|
19
|
-
export type TXpertWorkspaceSettings = {
|
|
19
|
+
export type TXpertWorkspaceSettings = {
|
|
20
|
+
system?: {
|
|
21
|
+
kind?: 'org-default' | 'user-default';
|
|
22
|
+
userId?: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
20
25
|
export type TXpertWorkspaceStatus = 'active' | 'deprecated' | 'archived';
|
|
21
26
|
export interface IBasePerWorkspaceEntityModel extends IBasePerTenantAndOrganizationEntityModel {
|
|
22
27
|
workspaceId?: string;
|
package/src/ai/xpert.model.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { RunnableToolLike } from '@langchain/core/runnables';
|
|
|
3
3
|
import { StructuredToolInterface } from '@langchain/core/tools';
|
|
4
4
|
import { ITag } from '../tag-entity.model';
|
|
5
5
|
import { IUser, LanguagesEnum } from '../user.model';
|
|
6
|
+
import { IUserGroup } from '../user-group.model';
|
|
6
7
|
import { ICopilotModel, TCopilotModel } from './copilot-model.model';
|
|
7
8
|
import { IKnowledgebase, TKBRecallParams } from './knowledgebase.model';
|
|
8
9
|
import { ChecklistItem, I18nObject, IPoint, ISize, TAvatar } from '../types';
|
|
@@ -159,9 +160,9 @@ export type TXpert = {
|
|
|
159
160
|
knowledgebases?: IKnowledgebase[];
|
|
160
161
|
toolsets?: IXpertToolset[];
|
|
161
162
|
/**
|
|
162
|
-
*
|
|
163
|
+
* User groups that are allowed to use this published digital expert.
|
|
163
164
|
*/
|
|
164
|
-
|
|
165
|
+
userGroups?: IUserGroup[];
|
|
165
166
|
/**
|
|
166
167
|
* Integrations for this xpert
|
|
167
168
|
*/
|
|
@@ -180,6 +181,11 @@ export interface IXpert extends IBasePerWorkspaceEntityModel, TXpert {
|
|
|
180
181
|
knowledgebase?: IKnowledgebase;
|
|
181
182
|
}
|
|
182
183
|
export type TXpertOptions = {
|
|
184
|
+
bootstrap?: {
|
|
185
|
+
source: 'template';
|
|
186
|
+
templateKey: string;
|
|
187
|
+
workspaceKind: 'org-default';
|
|
188
|
+
};
|
|
183
189
|
knowledge?: Record<string, {
|
|
184
190
|
position?: IPoint;
|
|
185
191
|
size?: ISize;
|
|
@@ -475,20 +481,24 @@ export type TChatOptions = {
|
|
|
475
481
|
*/
|
|
476
482
|
environment?: IEnvironment;
|
|
477
483
|
/**
|
|
478
|
-
*
|
|
484
|
+
* Specify a sandbox environment container to run in
|
|
479
485
|
*/
|
|
480
486
|
sandboxEnvironmentId?: string;
|
|
481
487
|
/**
|
|
482
488
|
* Specify additional tools
|
|
483
489
|
*/
|
|
484
490
|
tools?: (StructuredToolInterface | RunnableToolLike)[];
|
|
491
|
+
/**
|
|
492
|
+
* Per-request runtime context forwarded to agent middleware/tools.
|
|
493
|
+
*/
|
|
494
|
+
context?: Record<string, unknown>;
|
|
485
495
|
};
|
|
486
496
|
/**
|
|
487
497
|
* Knowledgebase retrieval settings
|
|
488
498
|
*/
|
|
489
499
|
export type TKBRetrievalSettings = {
|
|
490
500
|
metadata: {
|
|
491
|
-
filtering_mode:
|
|
501
|
+
filtering_mode: 'disabled' | 'automatic' | 'manual';
|
|
492
502
|
/**
|
|
493
503
|
* Conditions (filter) when mode is manual
|
|
494
504
|
*/
|
package/src/ai/xpert.utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IPoint } from '../types';
|
|
2
2
|
import { IXpertAgent } from './xpert-agent.model';
|
|
3
|
-
import { IXpert, TXpertTeamNode } from './xpert.model';
|
|
3
|
+
import { IXpert, TXpertTeamConnection, TXpertTeamDraft, TXpertTeamNode } from './xpert.model';
|
|
4
4
|
export declare function omitXpertRelations(xpert: Partial<IXpert>): {
|
|
5
5
|
environmentId?: string;
|
|
6
6
|
workspaceId?: string;
|
|
@@ -11,10 +11,10 @@ export declare function omitXpertRelations(xpert: Partial<IXpert>): {
|
|
|
11
11
|
organization?: import("..").IOrganization;
|
|
12
12
|
tenantId?: string;
|
|
13
13
|
tenant?: import("..").ITenant;
|
|
14
|
-
id?:
|
|
15
|
-
createdById?:
|
|
14
|
+
id?: import("../types").ID;
|
|
15
|
+
createdById?: import("../types").ID;
|
|
16
16
|
createdBy?: import("..").IUser;
|
|
17
|
-
updatedById?:
|
|
17
|
+
updatedById?: import("../types").ID;
|
|
18
18
|
updatedBy?: import("..").IUser;
|
|
19
19
|
createdAt?: Date;
|
|
20
20
|
updatedAt?: Date;
|
|
@@ -59,7 +59,7 @@ export declare function createXpertGraph(xpert: IXpert, position: IPoint): {
|
|
|
59
59
|
width: number;
|
|
60
60
|
height: number;
|
|
61
61
|
};
|
|
62
|
-
connections:
|
|
62
|
+
connections: TXpertTeamConnection[];
|
|
63
63
|
};
|
|
64
64
|
export declare function locateNodes(nodes: TXpertTeamNode[], position: IPoint): {
|
|
65
65
|
size: {
|
|
@@ -82,3 +82,6 @@ export declare function createXpertNodes(xpert: IXpert, position: IPoint): {
|
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
export declare function createAgentConnections(agent: IXpertAgent, collaborators: IXpert[]): any[];
|
|
85
|
+
export declare function replaceAgentInDraft(draft: TXpertTeamDraft, sourceKey: string, agent: Partial<IXpertAgent>, options?: {
|
|
86
|
+
requireNode?: boolean;
|
|
87
|
+
}): TXpertTeamDraft;
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -1,10 +1,68 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
import { IUser } from './user.model';
|
|
3
|
+
/**
|
|
4
|
+
* Represents an API key used for authentication and authorization.
|
|
5
|
+
*/
|
|
2
6
|
export interface IApiKey extends IBasePerTenantAndOrganizationEntityModel {
|
|
3
7
|
token: string;
|
|
4
8
|
name?: string;
|
|
5
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Stable binding kind for resolving the technical principal behind this key.
|
|
11
|
+
*/
|
|
12
|
+
type?: ApiKeyBindingType;
|
|
13
|
+
/**
|
|
14
|
+
* Stable binding target id/code. Examples:
|
|
15
|
+
* - assistant => xpertId
|
|
16
|
+
* - integration => integrationId
|
|
17
|
+
* - client => clientCode
|
|
18
|
+
*/
|
|
6
19
|
entityId?: string;
|
|
7
20
|
validUntil?: Date;
|
|
8
21
|
expired?: boolean;
|
|
9
22
|
lastUsedAt?: Date;
|
|
23
|
+
/**
|
|
24
|
+
* Explicit technical principal bound to this apiKey.
|
|
25
|
+
* When set, it takes precedence over type/entityId resolution.
|
|
26
|
+
*/
|
|
27
|
+
userId?: string;
|
|
28
|
+
user?: IUser;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Optional request header used by third-party callers to explicitly set the
|
|
32
|
+
* business user represented by the current request context.
|
|
33
|
+
*/
|
|
34
|
+
export declare const API_PRINCIPAL_USER_ID_HEADER = "x-principal-user-id";
|
|
35
|
+
/**
|
|
36
|
+
* Stable binding kinds used to resolve long-lived technical principals.
|
|
37
|
+
*/
|
|
38
|
+
export declare enum ApiKeyBindingType {
|
|
39
|
+
ASSISTANT = "assistant",
|
|
40
|
+
INTEGRATION = "integration",
|
|
41
|
+
CLIENT = "client",
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated legacy type, do not use for new keys. Will be resolved as assistant for backward compatibility.
|
|
44
|
+
*/
|
|
45
|
+
KNOWLEDGEBASE = "knowledgebase"
|
|
46
|
+
}
|
|
47
|
+
export type ApiPrincipalType = 'api_key' | 'client_secret';
|
|
48
|
+
export interface IApiPrincipal extends IUser {
|
|
49
|
+
apiKey: IApiKey;
|
|
50
|
+
principalType: ApiPrincipalType;
|
|
51
|
+
/**
|
|
52
|
+
* Resource owner / key creator. Used for audit and ownership metadata.
|
|
53
|
+
*/
|
|
54
|
+
ownerUserId?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Technical principal resolved from apiKey.userId or stable type/entityId binding.
|
|
57
|
+
*/
|
|
58
|
+
apiKeyUserId?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Explicit business user id requested by the caller via x-principal-user-id.
|
|
61
|
+
*/
|
|
62
|
+
requestedUserId?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Original organization context requested by the caller before api-key
|
|
65
|
+
* authentication normalized the request into tenant scope.
|
|
66
|
+
*/
|
|
67
|
+
requestedOrganizationId?: string | null;
|
|
10
68
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type { IBasePerTenantAndOrganizationEntityModel, IBasePerTenantEntityMode
|
|
|
28
28
|
export type { IBaseEntityModel as BaseEntityModel } from './base-entity.model';
|
|
29
29
|
export * from './role.model';
|
|
30
30
|
export * from './user-organization.model';
|
|
31
|
+
export * from './user-group.model';
|
|
31
32
|
export * from './user.model';
|
|
32
33
|
export * from './analytics/index';
|
|
33
34
|
export * from './custom-smtp.model';
|
|
@@ -39,6 +40,7 @@ export * from './password-reset.model';
|
|
|
39
40
|
export * from './secret-token.model';
|
|
40
41
|
export * from './storage-file.model';
|
|
41
42
|
export * from './visibility.model';
|
|
43
|
+
export * from './scope.model';
|
|
42
44
|
export * from './integration/index';
|
|
43
45
|
export * from './ai/index';
|
|
44
46
|
export * from './agent/index';
|
|
@@ -47,3 +49,4 @@ export * from './schedule';
|
|
|
47
49
|
export * from './tools/index';
|
|
48
50
|
export * from './plain-object.model';
|
|
49
51
|
export * from './plugin';
|
|
52
|
+
export * from './view-extension';
|
|
@@ -3,6 +3,7 @@ import { IOrganizationProjectsUpdateInput } from './organization-projects.model'
|
|
|
3
3
|
import { IOrganizationUpdateInput } from './organization.model';
|
|
4
4
|
import { ITag } from './tag-entity.model';
|
|
5
5
|
import { I18nObject, IconDefinition, TAvatar, TParameterSchema } from './types';
|
|
6
|
+
import { IUser } from './user.model';
|
|
6
7
|
export interface IIntegration<T = any> extends IBasePerTenantAndOrganizationEntityModel {
|
|
7
8
|
name: string;
|
|
8
9
|
description?: string;
|
|
@@ -21,6 +22,12 @@ export interface IIntegration<T = any> extends IBasePerTenantAndOrganizationEnti
|
|
|
21
22
|
*/
|
|
22
23
|
options?: T;
|
|
23
24
|
tags?: ITag[];
|
|
25
|
+
/**
|
|
26
|
+
* Stable technical principal for this integration.
|
|
27
|
+
* One integration should map to one long-lived communication user.
|
|
28
|
+
*/
|
|
29
|
+
userId?: string;
|
|
30
|
+
user?: IUser;
|
|
24
31
|
}
|
|
25
32
|
export interface IIntegrationFilter {
|
|
26
33
|
integrationTypeId: string;
|
package/src/invite.model.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ export interface ICreateEmailInvitesOutput {
|
|
|
60
60
|
}
|
|
61
61
|
export interface IInviteFindInput extends IBasePerTenantAndOrganizationEntityModel {
|
|
62
62
|
invitationType?: InvitationTypeEnum;
|
|
63
|
+
email?: string;
|
|
64
|
+
status?: InviteStatusEnum;
|
|
63
65
|
}
|
|
64
66
|
export interface IPublicInviteFindInput {
|
|
65
67
|
email: string;
|
package/src/plugin.d.ts
CHANGED
|
@@ -6,12 +6,39 @@ export declare const PLUGIN_LEVEL: {
|
|
|
6
6
|
readonly SYSTEM: "system";
|
|
7
7
|
readonly ORGANIZATION: "organization";
|
|
8
8
|
};
|
|
9
|
+
export declare const PLUGIN_SOURCE: {
|
|
10
|
+
readonly MARKETPLACE: "marketplace";
|
|
11
|
+
readonly LOCAL: "local";
|
|
12
|
+
readonly GIT: "git";
|
|
13
|
+
readonly URL: "url";
|
|
14
|
+
readonly NPM: "npm";
|
|
15
|
+
readonly CODE: "code";
|
|
16
|
+
readonly ENV: "env";
|
|
17
|
+
};
|
|
18
|
+
export declare const PLUGIN_CONFIGURATION_STATUS: {
|
|
19
|
+
readonly VALID: "valid";
|
|
20
|
+
readonly INVALID: "invalid";
|
|
21
|
+
};
|
|
22
|
+
export declare const PLUGIN_LOAD_STATUS: {
|
|
23
|
+
readonly LOADED: "loaded";
|
|
24
|
+
readonly FAILED: "failed";
|
|
25
|
+
};
|
|
9
26
|
/**
|
|
10
27
|
* Classifies plugin scope and governance.
|
|
11
28
|
* - `system`: built-in/platform-managed plugin that users cannot install/uninstall from org APIs.
|
|
12
29
|
* - `organization`: tenant/org-managed plugin that can be installed and removed per organization.
|
|
13
30
|
*/
|
|
14
31
|
export type PluginLevel = (typeof PLUGIN_LEVEL)[keyof typeof PLUGIN_LEVEL];
|
|
32
|
+
export type PluginSource = (typeof PLUGIN_SOURCE)[keyof typeof PLUGIN_SOURCE];
|
|
33
|
+
export type PluginConfigurationStatus = (typeof PLUGIN_CONFIGURATION_STATUS)[keyof typeof PLUGIN_CONFIGURATION_STATUS];
|
|
34
|
+
export type PluginLoadStatus = (typeof PLUGIN_LOAD_STATUS)[keyof typeof PLUGIN_LOAD_STATUS];
|
|
35
|
+
export type PluginScopeRelation = 'none' | 'overrides-global' | 'shadowed-by-organization';
|
|
36
|
+
export interface PluginCodeSourceConfig {
|
|
37
|
+
workspacePath?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PluginSourceConfig extends PluginCodeSourceConfig {
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
15
42
|
export interface PluginMeta {
|
|
16
43
|
name: PluginName;
|
|
17
44
|
version: string;
|
|
@@ -31,21 +58,59 @@ export interface IPlugin extends IBasePerTenantAndOrganizationEntityModel {
|
|
|
31
58
|
pluginName: string;
|
|
32
59
|
packageName: string;
|
|
33
60
|
version?: string;
|
|
34
|
-
source?:
|
|
61
|
+
source?: PluginSource;
|
|
62
|
+
sourceConfig?: PluginSourceConfig | null;
|
|
35
63
|
level?: PluginLevel;
|
|
36
64
|
config: Record<string, any>;
|
|
65
|
+
configurationStatus?: PluginConfigurationStatus | null;
|
|
66
|
+
configurationError?: string | null;
|
|
67
|
+
}
|
|
68
|
+
export interface IPluginInstallInput {
|
|
69
|
+
pluginName: PluginName;
|
|
70
|
+
version?: string;
|
|
71
|
+
source?: PluginSource;
|
|
72
|
+
config?: Record<string, any>;
|
|
73
|
+
sourceConfig?: PluginSourceConfig;
|
|
74
|
+
}
|
|
75
|
+
export interface IPluginInstallResult {
|
|
76
|
+
success: boolean;
|
|
77
|
+
name: PluginName;
|
|
78
|
+
packageName: string;
|
|
79
|
+
organizationId: string;
|
|
80
|
+
currentVersion?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface IPluginUpdateResult extends IPluginInstallResult {
|
|
83
|
+
latestVersion?: string;
|
|
84
|
+
updated: boolean;
|
|
85
|
+
previousVersion?: string;
|
|
37
86
|
}
|
|
38
87
|
export interface IPluginDescriptor {
|
|
39
88
|
organizationId?: string;
|
|
40
89
|
name: PluginName;
|
|
41
90
|
meta: PluginMeta;
|
|
91
|
+
packageName?: string;
|
|
92
|
+
source?: PluginSource;
|
|
93
|
+
currentVersion?: string;
|
|
94
|
+
latestVersion?: string;
|
|
42
95
|
isGlobal: boolean;
|
|
43
96
|
level: PluginLevel;
|
|
44
97
|
canConfigure?: boolean;
|
|
98
|
+
canRefresh?: boolean;
|
|
99
|
+
canUninstall?: boolean;
|
|
100
|
+
canUpdate?: boolean;
|
|
101
|
+
hasUpdate?: boolean;
|
|
45
102
|
configSchema?: JsonSchemaObjectType;
|
|
103
|
+
configurationStatus?: PluginConfigurationStatus | null;
|
|
104
|
+
configurationError?: string | null;
|
|
105
|
+
loadStatus?: PluginLoadStatus | null;
|
|
106
|
+
loadError?: string | null;
|
|
107
|
+
effectiveInCurrentScope: boolean;
|
|
108
|
+
scopeRelation?: PluginScopeRelation;
|
|
46
109
|
}
|
|
47
110
|
export interface IPluginConfiguration<TConfig extends Record<string, any> = Record<string, any>> {
|
|
48
111
|
pluginName: PluginName;
|
|
49
112
|
config: TConfig;
|
|
50
113
|
configSchema?: JsonSchemaObjectType;
|
|
114
|
+
configurationStatus?: PluginConfigurationStatus | null;
|
|
115
|
+
configurationError?: string | null;
|
|
51
116
|
}
|
package/src/role.model.d.ts
CHANGED
|
@@ -12,13 +12,12 @@ export interface IRoleCreateInput extends IBasePerTenantEntityModel {
|
|
|
12
12
|
export declare enum RolesEnum {
|
|
13
13
|
SUPER_ADMIN = "SUPER_ADMIN",
|
|
14
14
|
ADMIN = "ADMIN",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CANDIDATE = "CANDIDATE",
|
|
18
|
-
MANAGER = "MANAGER",
|
|
15
|
+
AI_BUILDER = "AI_BUILDER",
|
|
16
|
+
ANALYTICS_BUILDER = "ANALYTICS_BUILDER",
|
|
19
17
|
VIEWER = "VIEWER",
|
|
20
18
|
TRIAL = "TRIAL"
|
|
21
19
|
}
|
|
20
|
+
export declare const DEFAULT_SYSTEM_ROLES: RolesEnum[];
|
|
22
21
|
export interface IRoleMigrateInput extends IBasePerTenantEntityModel {
|
|
23
22
|
name: string;
|
|
24
23
|
isImporting: boolean;
|
package/src/types.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import ShortUniqueId from 'short-unique-id';
|
|
1
2
|
import type * as z3 from "zod/v3";
|
|
2
3
|
import type * as z4 from "zod/v4/core";
|
|
3
|
-
|
|
4
|
+
declare const uuidGenerator: ShortUniqueId;
|
|
5
|
+
export declare const uuid: (...args: Parameters<(typeof uuidGenerator)["randomUUID"]>) => string;
|
|
4
6
|
/**
|
|
5
7
|
* @description
|
|
6
8
|
* An entity ID. Represents a unique identifier as a string.
|
|
@@ -158,7 +160,7 @@ export type IconType = 'image' | 'svg' | 'font' | 'emoji' | 'lottie';
|
|
|
158
160
|
* |-----------|----------------------------------|-----------------|
|
|
159
161
|
* | `image` | Raster or Base64-encoded image | `"https://cdn.example.com/logo.png"` or `"data:image/png;base64,..."` |
|
|
160
162
|
* | `svg` | Inline SVG markup | `"<svg xmlns='http://www.w3.org/2000/svg'><path d='M12 2l4 20H8z'/></svg>"` |
|
|
161
|
-
* | `font` | Font icon class name | `"fa-solid fa-user"` or `"
|
|
163
|
+
* | `font` | Font icon class name | `"fa-solid fa-user"` or `"ri-home-line"` |
|
|
162
164
|
* | `emoji` | Unicode emoji character | `"🚀"` |
|
|
163
165
|
* | `lottie` | Lottie animation JSON URL | `"https://assets.lottiefiles.com/packages/lf20_abc123.json"` |
|
|
164
166
|
*
|
|
@@ -243,3 +245,4 @@ export interface IconDefinition {
|
|
|
243
245
|
export type ZodObjectV3 = z3.ZodObject<any, any, any, any>;
|
|
244
246
|
export type ZodObjectV4 = z4.$ZodObject;
|
|
245
247
|
export type InteropZodObject = ZodObjectV3 | ZodObjectV4;
|
|
248
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
+
import { IUser } from './user.model';
|
|
3
|
+
export interface IUserGroup extends IBasePerTenantAndOrganizationEntityModel {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string | null;
|
|
6
|
+
members?: IUser[];
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './model';
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { I18nObject } from '../types';
|
|
2
|
+
export type XpertViewHostType = 'integration' | 'knowledgebase' | 'agent' | 'project' | 'sandbox' | string;
|
|
3
|
+
export type XpertViewSlotMode = 'tabs' | 'sections' | 'widgets' | 'sidebar';
|
|
4
|
+
export type XpertViewSchemaType = 'stats' | 'table' | 'list' | 'detail' | 'raw_json';
|
|
5
|
+
export type XpertViewValueType = 'text' | 'number' | 'status' | 'datetime' | 'json';
|
|
6
|
+
export type XpertViewColumnDataType = 'text' | 'number' | 'date' | 'datetime' | 'status' | 'tag' | 'avatar' | 'link';
|
|
7
|
+
export type XpertViewActionPlacement = 'toolbar' | 'row';
|
|
8
|
+
export type XpertViewActionType = 'invoke' | 'navigate' | 'open_detail' | 'refresh';
|
|
9
|
+
export type XpertViewSortDirection = 'asc' | 'desc';
|
|
10
|
+
export type XpertViewFilterOperator = 'eq' | 'neq' | 'contains' | 'starts_with' | 'ends_with' | 'in' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
11
|
+
export type XpertViewScalar = string | number | boolean | null;
|
|
12
|
+
export interface XpertViewHostContext {
|
|
13
|
+
tenantId: string;
|
|
14
|
+
organizationId?: string | null;
|
|
15
|
+
workspaceId?: string | null;
|
|
16
|
+
userId: string;
|
|
17
|
+
hostType: XpertViewHostType;
|
|
18
|
+
hostId: string;
|
|
19
|
+
module?: string;
|
|
20
|
+
route?: string;
|
|
21
|
+
permissions?: string[];
|
|
22
|
+
locale?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface XpertResolvedViewHostContext extends XpertViewHostContext {
|
|
25
|
+
slots: XpertViewSlot[];
|
|
26
|
+
hostSnapshot?: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface XpertViewSlot {
|
|
29
|
+
key: string;
|
|
30
|
+
title?: I18nObject;
|
|
31
|
+
mode: XpertViewSlotMode;
|
|
32
|
+
order?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface XpertViewSource {
|
|
35
|
+
provider: string;
|
|
36
|
+
plugin?: string;
|
|
37
|
+
version?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface XpertViewBadge {
|
|
40
|
+
type: 'count' | 'status' | 'text';
|
|
41
|
+
value?: string | number;
|
|
42
|
+
}
|
|
43
|
+
export interface XpertViewPolling {
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
intervalMs?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface XpertViewCachePolicy {
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
ttlMs?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface XpertViewQuerySchema {
|
|
52
|
+
supportsPagination?: boolean;
|
|
53
|
+
supportsSearch?: boolean;
|
|
54
|
+
supportsSort?: boolean;
|
|
55
|
+
supportsFilter?: boolean;
|
|
56
|
+
supportsCursor?: boolean;
|
|
57
|
+
supportsSelection?: boolean;
|
|
58
|
+
defaultPageSize?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface XpertViewDataSource {
|
|
61
|
+
mode: 'platform';
|
|
62
|
+
querySchema?: XpertViewQuerySchema;
|
|
63
|
+
cache?: XpertViewCachePolicy;
|
|
64
|
+
polling?: XpertViewPolling;
|
|
65
|
+
}
|
|
66
|
+
export interface XpertViewFilter {
|
|
67
|
+
key: string;
|
|
68
|
+
operator?: XpertViewFilterOperator;
|
|
69
|
+
value: XpertViewScalar | XpertViewScalar[];
|
|
70
|
+
}
|
|
71
|
+
export interface XpertViewQuery {
|
|
72
|
+
page?: number;
|
|
73
|
+
pageSize?: number;
|
|
74
|
+
cursor?: string;
|
|
75
|
+
search?: string;
|
|
76
|
+
sortBy?: string;
|
|
77
|
+
sortDirection?: XpertViewSortDirection;
|
|
78
|
+
filters?: XpertViewFilter[];
|
|
79
|
+
selectionId?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface XpertStatsViewSchema {
|
|
82
|
+
type: 'stats';
|
|
83
|
+
items: Array<{
|
|
84
|
+
key: string;
|
|
85
|
+
label: I18nObject;
|
|
86
|
+
valueType?: XpertViewValueType;
|
|
87
|
+
}>;
|
|
88
|
+
}
|
|
89
|
+
export interface XpertTableViewSchema {
|
|
90
|
+
type: 'table';
|
|
91
|
+
columns: Array<{
|
|
92
|
+
key: string;
|
|
93
|
+
label: I18nObject;
|
|
94
|
+
dataType?: XpertViewColumnDataType;
|
|
95
|
+
width?: string;
|
|
96
|
+
sortable?: boolean;
|
|
97
|
+
searchable?: boolean;
|
|
98
|
+
}>;
|
|
99
|
+
pagination?: {
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
pageSize?: number;
|
|
102
|
+
};
|
|
103
|
+
search?: {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
placeholder?: I18nObject;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export interface XpertListViewSchema {
|
|
109
|
+
type: 'list';
|
|
110
|
+
item: {
|
|
111
|
+
titleKey: string;
|
|
112
|
+
subtitleKey?: string;
|
|
113
|
+
descriptionKey?: string;
|
|
114
|
+
metaKeys?: string[];
|
|
115
|
+
};
|
|
116
|
+
pagination?: {
|
|
117
|
+
enabled: boolean;
|
|
118
|
+
pageSize?: number;
|
|
119
|
+
};
|
|
120
|
+
search?: {
|
|
121
|
+
enabled: boolean;
|
|
122
|
+
placeholder?: I18nObject;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface XpertDetailViewSchema {
|
|
126
|
+
type: 'detail';
|
|
127
|
+
fields: Array<{
|
|
128
|
+
key: string;
|
|
129
|
+
label: I18nObject;
|
|
130
|
+
dataType?: XpertViewValueType;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
export interface XpertRawJsonViewSchema {
|
|
134
|
+
type: 'raw_json';
|
|
135
|
+
}
|
|
136
|
+
export type XpertViewSchema = XpertStatsViewSchema | XpertTableViewSchema | XpertListViewSchema | XpertDetailViewSchema | XpertRawJsonViewSchema;
|
|
137
|
+
export interface XpertViewActionDefinition {
|
|
138
|
+
key: string;
|
|
139
|
+
label: I18nObject;
|
|
140
|
+
icon?: string;
|
|
141
|
+
placement?: XpertViewActionPlacement;
|
|
142
|
+
actionType: XpertViewActionType;
|
|
143
|
+
confirm?: {
|
|
144
|
+
title?: I18nObject;
|
|
145
|
+
message?: I18nObject;
|
|
146
|
+
};
|
|
147
|
+
permissions?: string[];
|
|
148
|
+
}
|
|
149
|
+
export interface XpertExtensionViewManifest {
|
|
150
|
+
key: string;
|
|
151
|
+
title: I18nObject;
|
|
152
|
+
description?: I18nObject;
|
|
153
|
+
icon?: string;
|
|
154
|
+
hostType: XpertViewHostType;
|
|
155
|
+
slot: string;
|
|
156
|
+
order?: number;
|
|
157
|
+
visible?: boolean;
|
|
158
|
+
source: XpertViewSource;
|
|
159
|
+
permissions?: string[];
|
|
160
|
+
badge?: XpertViewBadge;
|
|
161
|
+
refreshable?: boolean;
|
|
162
|
+
polling?: XpertViewPolling;
|
|
163
|
+
view: XpertViewSchema;
|
|
164
|
+
dataSource: XpertViewDataSource;
|
|
165
|
+
actions?: XpertViewActionDefinition[];
|
|
166
|
+
}
|
|
167
|
+
export interface XpertViewActionRequest {
|
|
168
|
+
targetId?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface XpertViewDataResult<TItem = unknown, TSummary = unknown> {
|
|
171
|
+
items?: TItem[];
|
|
172
|
+
item?: TItem;
|
|
173
|
+
total?: number;
|
|
174
|
+
nextCursor?: string;
|
|
175
|
+
summary?: TSummary;
|
|
176
|
+
meta?: unknown;
|
|
177
|
+
}
|
|
178
|
+
export interface XpertViewActionResult<TData = unknown> {
|
|
179
|
+
success: boolean;
|
|
180
|
+
message?: I18nObject;
|
|
181
|
+
data?: TData;
|
|
182
|
+
refresh?: boolean;
|
|
183
|
+
}
|
package/index.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|