@xpert-ai/contracts 3.9.0-beta.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.
Files changed (157) hide show
  1. package/README.md +3 -0
  2. package/index.cjs.js +4945 -0
  3. package/index.d.ts +1 -0
  4. package/index.esm.js +4792 -0
  5. package/package.json +25 -0
  6. package/src/agent/ai-model.d.ts +9 -0
  7. package/src/agent/graph.d.ts +182 -0
  8. package/src/agent/index.d.ts +6 -0
  9. package/src/agent/interrupt.d.ts +51 -0
  10. package/src/agent/token.d.ts +21 -0
  11. package/src/agent/utils.d.ts +19 -0
  12. package/src/agent/variables.d.ts +16 -0
  13. package/src/ai/ai-model.model.d.ts +198 -0
  14. package/src/ai/ai-provider.model.d.ts +43 -0
  15. package/src/ai/ai.model.d.ts +82 -0
  16. package/src/ai/assistant-binding.model.d.ts +81 -0
  17. package/src/ai/chat-event.model.d.ts +8 -0
  18. package/src/ai/chat-message-feedback.model.d.ts +24 -0
  19. package/src/ai/chat-message.model.d.ts +93 -0
  20. package/src/ai/chat.model.d.ts +191 -0
  21. package/src/ai/copilot-checkpoint.model.d.ts +23 -0
  22. package/src/ai/copilot-example.model.d.ts +19 -0
  23. package/src/ai/copilot-model.model.d.ts +30 -0
  24. package/src/ai/copilot-organization.model.d.ts +17 -0
  25. package/src/ai/copilot-provider.model.d.ts +31 -0
  26. package/src/ai/copilot-role.model.d.ts +43 -0
  27. package/src/ai/copilot-store.model.d.ts +29 -0
  28. package/src/ai/copilot-user.model.d.ts +27 -0
  29. package/src/ai/copilot.model.d.ts +36 -0
  30. package/src/ai/environment.model.d.ts +16 -0
  31. package/src/ai/feature.model.d.ts +10 -0
  32. package/src/ai/index.d.ts +84 -0
  33. package/src/ai/knowledge-doc-chunk.model.d.ts +61 -0
  34. package/src/ai/knowledge-doc-page.model.d.ts +15 -0
  35. package/src/ai/knowledge-doc.model.d.ts +222 -0
  36. package/src/ai/knowledge-pipeline.d.ts +107 -0
  37. package/src/ai/knowledge-retrieval-log.model.d.ts +10 -0
  38. package/src/ai/knowledgebase-task.model.d.ts +39 -0
  39. package/src/ai/knowledgebase.model.d.ts +174 -0
  40. package/src/ai/message-content.utils.d.ts +58 -0
  41. package/src/ai/middleware.model.d.ts +24 -0
  42. package/src/ai/rag-web.d.ts +26 -0
  43. package/src/ai/rag.d.ts +24 -0
  44. package/src/ai/role-permissions.d.ts +13 -0
  45. package/src/ai/sandbox.d.ts +8 -0
  46. package/src/ai/skill.model.d.ts +241 -0
  47. package/src/ai/types.d.ts +77 -0
  48. package/src/ai/xpert-agent-execution.model.d.ts +105 -0
  49. package/src/ai/xpert-agent.model.d.ts +194 -0
  50. package/src/ai/xpert-chat.model.d.ts +66 -0
  51. package/src/ai/xpert-project.model.d.ts +89 -0
  52. package/src/ai/xpert-table.model.d.ts +84 -0
  53. package/src/ai/xpert-task.model.d.ts +26 -0
  54. package/src/ai/xpert-template.model.d.ts +47 -0
  55. package/src/ai/xpert-tool-mcp.model.d.ts +91 -0
  56. package/src/ai/xpert-tool.model.d.ts +154 -0
  57. package/src/ai/xpert-toolset.model.d.ts +200 -0
  58. package/src/ai/xpert-workflow-task.prompt.d.ts +2 -0
  59. package/src/ai/xpert-workflow.model.d.ts +445 -0
  60. package/src/ai/xpert-workspace.model.d.ts +37 -0
  61. package/src/ai/xpert.model.d.ts +513 -0
  62. package/src/ai/xpert.utils.d.ts +87 -0
  63. package/src/analytics/ai.d.ts +73 -0
  64. package/src/analytics/approval-policy.model.d.ts +30 -0
  65. package/src/analytics/business-area-user.model.d.ts +35 -0
  66. package/src/analytics/business-area.d.ts +17 -0
  67. package/src/analytics/certification.model.d.ts +11 -0
  68. package/src/analytics/chatbi-conversation.model.d.ts +15 -0
  69. package/src/analytics/chatbi-model.model.d.ts +18 -0
  70. package/src/analytics/collection.model.d.ts +6 -0
  71. package/src/analytics/comment.model.d.ts +10 -0
  72. package/src/analytics/data-source-type.d.ts +16 -0
  73. package/src/analytics/data-source.d.ts +62 -0
  74. package/src/analytics/favorite.d.ts +14 -0
  75. package/src/analytics/features.d.ts +19 -0
  76. package/src/analytics/feed-model.d.ts +13 -0
  77. package/src/analytics/gateway.d.ts +28 -0
  78. package/src/analytics/index.d.ts +38 -0
  79. package/src/analytics/indicator-app.d.ts +44 -0
  80. package/src/analytics/indicator-market.d.ts +4 -0
  81. package/src/analytics/indicator.d.ts +105 -0
  82. package/src/analytics/model-query-log.model.d.ts +41 -0
  83. package/src/analytics/model-query.d.ts +21 -0
  84. package/src/analytics/notification-destination.d.ts +10 -0
  85. package/src/analytics/permission-approval-user.model.d.ts +10 -0
  86. package/src/analytics/permission-approval.model.d.ts +47 -0
  87. package/src/analytics/project.model.d.ts +50 -0
  88. package/src/analytics/role-permissions.d.ts +25 -0
  89. package/src/analytics/schema.d.ts +262 -0
  90. package/src/analytics/screenshot.model.d.ts +24 -0
  91. package/src/analytics/semantic-model-entity.d.ts +38 -0
  92. package/src/analytics/semantic-model-member.d.ts +27 -0
  93. package/src/analytics/semantic-model.d.ts +183 -0
  94. package/src/analytics/story-point.d.ts +11 -0
  95. package/src/analytics/story-template.model.d.ts +28 -0
  96. package/src/analytics/story-widget.d.ts +12 -0
  97. package/src/analytics/story.d.ts +93 -0
  98. package/src/analytics/subscription.d.ts +38 -0
  99. package/src/analytics/visit.model.d.ts +34 -0
  100. package/src/analytics/webSocket.d.ts +48 -0
  101. package/src/api-key.model.d.ts +68 -0
  102. package/src/base-entity.model.d.ts +27 -0
  103. package/src/contact.model.d.ts +41 -0
  104. package/src/core.model.d.ts +97 -0
  105. package/src/country.model.d.ts +5 -0
  106. package/src/currency.model.d.ts +579 -0
  107. package/src/custom-smtp.model.d.ts +23 -0
  108. package/src/date-picker.model.d.ts +5 -0
  109. package/src/email-template.model.d.ts +39 -0
  110. package/src/email.model.d.ts +36 -0
  111. package/src/employee.model.d.ts +128 -0
  112. package/src/entity-with-members.model.d.ts +13 -0
  113. package/src/feature.model.d.ts +93 -0
  114. package/src/file-asset.model.d.ts +77 -0
  115. package/src/file-provider.d.ts +31 -0
  116. package/src/http-status.enum.d.ts +57 -0
  117. package/src/import-export.model.d.ts +36 -0
  118. package/src/index.d.ts +53 -0
  119. package/src/integration/dingtalk.d.ts +2 -0
  120. package/src/integration/firecrawl.d.ts +2 -0
  121. package/src/integration/github.d.ts +69 -0
  122. package/src/integration/index.d.ts +4 -0
  123. package/src/integration/lark.d.ts +5 -0
  124. package/src/integration/wecom.d.ts +2 -0
  125. package/src/integration.model.d.ts +92 -0
  126. package/src/invite.model.d.ts +125 -0
  127. package/src/language.model.d.ts +19 -0
  128. package/src/organization-contact.model.d.ts +72 -0
  129. package/src/organization-department.model.d.ts +20 -0
  130. package/src/organization-language.model.d.ts +18 -0
  131. package/src/organization-projects.model.d.ts +80 -0
  132. package/src/organization-team-employee-model.d.ts +12 -0
  133. package/src/organization-team-model.d.ts +19 -0
  134. package/src/organization.model.d.ts +238 -0
  135. package/src/password-reset.model.d.ts +18 -0
  136. package/src/plain-object.model.d.ts +13 -0
  137. package/src/plugin.d.ts +116 -0
  138. package/src/role-permission.model.d.ts +61 -0
  139. package/src/role.model.d.ts +25 -0
  140. package/src/schedule.d.ts +27 -0
  141. package/src/scope.model.d.ts +9 -0
  142. package/src/secret-token.model.d.ts +11 -0
  143. package/src/seed.model.d.ts +37 -0
  144. package/src/storage-file.model.d.ts +39 -0
  145. package/src/tag-entity.model.d.ts +20 -0
  146. package/src/tenant.model.d.ts +40 -0
  147. package/src/tools/index.d.ts +1 -0
  148. package/src/tools/sandbox.d.ts +5 -0
  149. package/src/translation.model.d.ts +26 -0
  150. package/src/types.d.ts +248 -0
  151. package/src/user-group.model.d.ts +7 -0
  152. package/src/user-me-context.model.d.ts +9 -0
  153. package/src/user-organization.model.d.ts +28 -0
  154. package/src/user.model.d.ts +131 -0
  155. package/src/view-extension/index.d.ts +1 -0
  156. package/src/view-extension/model.d.ts +183 -0
  157. package/src/visibility.model.d.ts +6 -0
@@ -0,0 +1,9 @@
1
+ import { IFeatureOrganization } from './feature.model';
2
+ export interface IUserMeOrganizationFeatures {
3
+ organizationId: string;
4
+ featureOrganizations: IFeatureOrganization[];
5
+ }
6
+ export interface IUserMeFeatures {
7
+ tenantFeatureOrganizations: IFeatureOrganization[];
8
+ organizationFeatures: IUserMeOrganizationFeatures[];
9
+ }
@@ -0,0 +1,28 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ import { LanguagesEnum, IUser } from './user.model';
3
+ export interface IUserOrganizationPreferences {
4
+ defaultWorkspaceId?: string | null;
5
+ }
6
+ export interface IUserOrganization extends IBasePerTenantAndOrganizationEntityModel {
7
+ userId: string;
8
+ isDefault: boolean;
9
+ isActive: boolean;
10
+ preferences?: IUserOrganizationPreferences | null;
11
+ user?: IUser;
12
+ }
13
+ export interface IUserOrganizationFindInput extends IBasePerTenantAndOrganizationEntityModel {
14
+ id?: string;
15
+ userId?: string;
16
+ isDefault?: boolean;
17
+ isActive?: boolean;
18
+ }
19
+ export interface IUserOrganizationCreateInput extends IBasePerTenantAndOrganizationEntityModel {
20
+ userId: string;
21
+ isDefault?: boolean;
22
+ isActive?: boolean;
23
+ }
24
+ export interface IUserOrganizationDeleteInput {
25
+ userOrganizationId: string;
26
+ requestingUser: IUser;
27
+ language?: LanguagesEnum;
28
+ }
@@ -0,0 +1,131 @@
1
+ import { IRole } from './role.model';
2
+ import { IBasePerTenantEntityModel } from './base-entity.model';
3
+ import { ITag } from './tag-entity.model';
4
+ import { IEmployee } from './employee.model';
5
+ import { IUserOrganization } from './user-organization.model';
6
+ export declare enum UserType {
7
+ USER = "user",// Regular user
8
+ COMMUNICATION = "communication"
9
+ }
10
+ export interface IUser extends IBasePerTenantEntityModel {
11
+ thirdPartyId?: string;
12
+ name?: string;
13
+ firstName?: string;
14
+ lastName?: string;
15
+ email?: string;
16
+ mobile?: string;
17
+ username?: string;
18
+ timeZone?: string;
19
+ type?: UserType;
20
+ role?: IRole;
21
+ roleId?: string;
22
+ hash?: string;
23
+ imageUrl?: string;
24
+ employee?: IEmployee;
25
+ employeeId?: string;
26
+ tags?: ITag[];
27
+ preferredLanguage?: string;
28
+ paymentsId?: string;
29
+ fullName?: string;
30
+ organizations?: IUserOrganization[];
31
+ isImporting?: boolean;
32
+ sourceId?: string;
33
+ emailVerified?: boolean;
34
+ emailVerification?: IEmailVerification;
35
+ deletedAt?: Date;
36
+ }
37
+ export interface IEmailVerification extends IBasePerTenantEntityModel {
38
+ token: string;
39
+ userId: string;
40
+ user?: IUser;
41
+ validUntil: Date;
42
+ }
43
+ export interface IUserEmailInput {
44
+ email: string;
45
+ }
46
+ export interface IUserFindInput {
47
+ thirdPartyId?: string;
48
+ firstName?: string;
49
+ lastName?: string;
50
+ email?: string;
51
+ username?: string;
52
+ role?: IRole;
53
+ roleId?: string;
54
+ hash?: string;
55
+ imageUrl?: string;
56
+ tags?: ITag[];
57
+ preferredLanguage?: LanguagesEnum;
58
+ }
59
+ export interface IUserRegistrationInput {
60
+ user: IUser;
61
+ password?: string;
62
+ confirmPassword?: string;
63
+ originalUrl?: string;
64
+ organizationId?: string;
65
+ createdById?: string;
66
+ isImporting?: boolean;
67
+ sourceId?: string;
68
+ timeZone?: string;
69
+ }
70
+ export interface IUserLoginInput {
71
+ email: string;
72
+ password: string;
73
+ }
74
+ export interface IAuthResponse {
75
+ user: IUser;
76
+ token: string;
77
+ refreshToken: string;
78
+ }
79
+ export interface IUserCreateInput {
80
+ type?: UserType;
81
+ firstName?: string;
82
+ lastName?: string;
83
+ email?: string;
84
+ username?: string;
85
+ role?: IRole;
86
+ roleId?: string;
87
+ hash?: string;
88
+ imageUrl?: string;
89
+ tags?: ITag[];
90
+ preferredLanguage?: LanguagesEnum;
91
+ timeZone?: string;
92
+ thirdPartyId?: string;
93
+ roleName?: string;
94
+ }
95
+ export interface IUserUpdateInput extends Omit<IUserCreateInput, 'type'> {
96
+ password?: string;
97
+ confirmPassword?: string;
98
+ }
99
+ export interface IUserPasswordInput {
100
+ hash?: string;
101
+ password?: string;
102
+ confirmPassword?: string;
103
+ }
104
+ /**
105
+ * Browser http header `Language`
106
+ */
107
+ export declare enum LanguagesEnum {
108
+ Chinese = "zh-CN",
109
+ SimplifiedChinese = "zh-Hans",
110
+ TraditionalChinese = "zh-Hant",
111
+ English = "en"
112
+ }
113
+ export declare const LanguagesMap: {
114
+ 'zh-CN': LanguagesEnum;
115
+ 'zh-Hans': LanguagesEnum;
116
+ zh: LanguagesEnum;
117
+ };
118
+ export declare enum ProviderEnum {
119
+ GOOGLE = "google",
120
+ FACEBOOK = "facebook"
121
+ }
122
+ export interface IUserViewModel extends IBasePerTenantEntityModel {
123
+ fullName: string;
124
+ email: string;
125
+ bonus?: number;
126
+ endWork?: any;
127
+ id: string;
128
+ roleName?: string;
129
+ role?: string;
130
+ tags?: ITag[];
131
+ }
@@ -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
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum Visibility {
2
+ Public = "public",
3
+ Internal = "internal",
4
+ Secret = "secret",
5
+ Private = "private"
6
+ }