@xpert-ai/contracts 3.15.17 → 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 (64) hide show
  1. package/index.cjs.js +269 -467
  2. package/index.esm.js +247 -461
  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/middleware.model.d.ts +13 -1
  10. package/src/ai/model-access.model.d.ts +229 -0
  11. package/src/ai/model-gateway.model.d.ts +159 -0
  12. package/src/ai/role-permissions.d.ts +8 -0
  13. package/src/ai/sandbox-terminal.model.d.ts +4 -0
  14. package/src/ai/xpert.model.d.ts +8 -0
  15. package/src/api-key.model.d.ts +4 -0
  16. package/src/{analytics/data-source-type.d.ts → data-source-type.model.d.ts} +1 -1
  17. package/src/{analytics/data-source.d.ts → data-source.model.d.ts} +4 -7
  18. package/src/feature.model.d.ts +3 -1
  19. package/src/index.d.ts +4 -1
  20. package/src/plugin.d.ts +9 -7
  21. package/src/referral.model.d.ts +36 -0
  22. package/src/role-permission.model.d.ts +5 -3
  23. package/src/role.model.d.ts +0 -1
  24. package/src/runtime-control.d.ts +3 -3
  25. package/src/secret-token.model.d.ts +14 -0
  26. package/src/tenant.model.d.ts +5 -0
  27. package/src/user.model.d.ts +1 -0
  28. package/src/utils.d.ts +5 -0
  29. package/src/analytics/ai.d.ts +0 -73
  30. package/src/analytics/approval-policy.model.d.ts +0 -30
  31. package/src/analytics/business-area-user.model.d.ts +0 -35
  32. package/src/analytics/business-area.d.ts +0 -17
  33. package/src/analytics/certification.model.d.ts +0 -11
  34. package/src/analytics/chatbi-conversation.model.d.ts +0 -15
  35. package/src/analytics/chatbi-model.model.d.ts +0 -18
  36. package/src/analytics/collection.model.d.ts +0 -6
  37. package/src/analytics/comment.model.d.ts +0 -10
  38. package/src/analytics/favorite.d.ts +0 -14
  39. package/src/analytics/features.d.ts +0 -23
  40. package/src/analytics/feed-model.d.ts +0 -13
  41. package/src/analytics/gateway.d.ts +0 -28
  42. package/src/analytics/index.d.ts +0 -38
  43. package/src/analytics/indicator-app.d.ts +0 -44
  44. package/src/analytics/indicator-market.d.ts +0 -4
  45. package/src/analytics/indicator.d.ts +0 -105
  46. package/src/analytics/model-query-log.model.d.ts +0 -41
  47. package/src/analytics/model-query.d.ts +0 -21
  48. package/src/analytics/notification-destination.d.ts +0 -10
  49. package/src/analytics/permission-approval-user.model.d.ts +0 -10
  50. package/src/analytics/permission-approval.model.d.ts +0 -47
  51. package/src/analytics/project.model.d.ts +0 -50
  52. package/src/analytics/role-permissions.d.ts +0 -28
  53. package/src/analytics/schema.d.ts +0 -262
  54. package/src/analytics/screenshot.model.d.ts +0 -24
  55. package/src/analytics/semantic-model-entity.d.ts +0 -38
  56. package/src/analytics/semantic-model-member.d.ts +0 -27
  57. package/src/analytics/semantic-model.d.ts +0 -183
  58. package/src/analytics/story-point.d.ts +0 -11
  59. package/src/analytics/story-template.model.d.ts +0 -28
  60. package/src/analytics/story-widget.d.ts +0 -12
  61. package/src/analytics/story.d.ts +0 -93
  62. package/src/analytics/subscription.d.ts +0 -38
  63. package/src/analytics/visit.model.d.ts +0 -34
  64. package/src/analytics/webSocket.d.ts +0 -48
@@ -0,0 +1,159 @@
1
+ import { AiModelTypeEnum } from '../agent';
2
+ import { ModelFeature } from './ai-model.model';
3
+ import { IModelAccessRequest, IUserModelGrant, ModelAccessUnavailableReasonEnum } from './model-access.model';
4
+ import { IBasePerTenantAndOrganizationEntityModel, IBasePerTenantEntityModel } from '../base-entity.model';
5
+ export declare enum ModelGatewayApiKeyStatusEnum {
6
+ Active = "active",
7
+ Expired = "expired",
8
+ Revoked = "revoked"
9
+ }
10
+ export declare enum ModelGatewayApiKeyLifetimeEnum {
11
+ Days30 = "30_days",
12
+ Days90 = "90_days",
13
+ Days180 = "180_days",
14
+ Permanent = "permanent"
15
+ }
16
+ export declare enum ModelGatewayCallStatusEnum {
17
+ Started = "started",
18
+ SettlementPending = "settlement_pending",
19
+ Succeeded = "succeeded",
20
+ Failed = "failed"
21
+ }
22
+ export declare enum ModelGatewayUsageSourceEnum {
23
+ Provider = "provider",
24
+ Estimated = "estimated",
25
+ None = "none"
26
+ }
27
+ export declare enum ModelGatewayUsageChannelEnum {
28
+ Xpert = "xpert",
29
+ ExternalApi = "external_api"
30
+ }
31
+ export declare const MODEL_GATEWAY_REQUESTS_PER_MINUTE_SETTING = "modelGatewayRequestsPerMinute";
32
+ export declare const DEFAULT_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 60;
33
+ export declare const MIN_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 1;
34
+ export declare const MAX_MODEL_GATEWAY_REQUESTS_PER_MINUTE = 10000;
35
+ export declare const MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS_SETTING = "modelGatewayMaxConcurrentRequests";
36
+ export declare const DEFAULT_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS = 5;
37
+ export declare const MIN_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS = 1;
38
+ export declare const MAX_MODEL_GATEWAY_MAX_CONCURRENT_REQUESTS = 100;
39
+ export declare const DEFAULT_MODEL_GATEWAY_BODY_RETENTION_DAYS = 7;
40
+ export declare const MIN_MODEL_GATEWAY_BODY_RETENTION_DAYS = 1;
41
+ export declare const MAX_MODEL_GATEWAY_BODY_RETENTION_DAYS = 3650;
42
+ export declare const MODEL_GATEWAY_CALL_RETENTION_ENABLED_SETTING = "modelGatewayCallRetentionEnabled";
43
+ export declare const MODEL_GATEWAY_CALL_RETENTION_DAYS_SETTING = "modelGatewayCallRetentionDays";
44
+ export declare const DEFAULT_MODEL_GATEWAY_CALL_RETENTION_DAYS = 60;
45
+ export declare const MIN_MODEL_GATEWAY_CALL_RETENTION_DAYS = 1;
46
+ export declare const MAX_MODEL_GATEWAY_CALL_RETENTION_DAYS = 3650;
47
+ export interface IModelGatewayPublication extends IBasePerTenantAndOrganizationEntityModel {
48
+ copilotId: string;
49
+ copilotModelId: string;
50
+ provider: string;
51
+ modelType: AiModelTypeEnum;
52
+ model: string;
53
+ externalModelId: string;
54
+ capabilities: ModelFeature[];
55
+ }
56
+ export interface IModelGatewayApiKey extends IBasePerTenantAndOrganizationEntityModel {
57
+ userId: string;
58
+ userName?: string | null;
59
+ name: string;
60
+ prefix: string;
61
+ secret?: string;
62
+ status: ModelGatewayApiKeyStatusEnum;
63
+ validUntil?: Date | string | null;
64
+ lastUsedAt?: Date | string | null;
65
+ revokedAt?: Date | string | null;
66
+ revokedById?: string | null;
67
+ revokeReason?: string | null;
68
+ }
69
+ export interface IModelGatewayApiKeyCreated extends IModelGatewayApiKey {
70
+ secret: string;
71
+ }
72
+ export interface IModelGatewaySettings extends IBasePerTenantEntityModel {
73
+ storeBodies: boolean;
74
+ bodyRetentionDays: number;
75
+ }
76
+ export interface IModelGatewayAdminSettings extends IModelGatewaySettings {
77
+ requestsPerMinute: number;
78
+ maxConcurrentRequests: number;
79
+ }
80
+ export interface IModelGatewayCall extends IBasePerTenantAndOrganizationEntityModel {
81
+ requestId: string;
82
+ userId: string;
83
+ userName?: string | null;
84
+ apiKeyId: string;
85
+ publicationId: string;
86
+ externalModelId: string;
87
+ provider: string;
88
+ model: string;
89
+ status: ModelGatewayCallStatusEnum;
90
+ startedAt: Date | string;
91
+ completedAt?: Date | string | null;
92
+ durationMs?: number | null;
93
+ inputTokens: number;
94
+ outputTokens: number;
95
+ totalTokens: number;
96
+ chargedPoints: number;
97
+ excessPoints: number;
98
+ usageSource: ModelGatewayUsageSourceEnum;
99
+ errorCode?: string | null;
100
+ errorMessage?: string | null;
101
+ encryptedRequest?: string | null;
102
+ encryptedResponse?: string | null;
103
+ bodyExpiresAt?: Date | string | null;
104
+ }
105
+ export interface IModelGatewayCallBody {
106
+ request: unknown | null;
107
+ response: unknown | null;
108
+ expiresAt?: Date | string | null;
109
+ }
110
+ export interface IModelGatewayCatalogItem {
111
+ id: string;
112
+ copilotId: string;
113
+ copilotModelId: string;
114
+ provider: string;
115
+ modelType: AiModelTypeEnum;
116
+ model: string;
117
+ externalModelId: string;
118
+ capabilities: ModelFeature[];
119
+ deprecated: boolean;
120
+ allowed: boolean;
121
+ unavailableReason?: ModelAccessUnavailableReasonEnum | null;
122
+ requestable: boolean;
123
+ planIncluded: boolean;
124
+ multiplier: number;
125
+ pendingRequest?: IModelAccessRequest | null;
126
+ grant?: IUserModelGrant | null;
127
+ }
128
+ export interface IModelGatewayCatalog {
129
+ items: IModelGatewayCatalogItem[];
130
+ eligible: boolean;
131
+ tenantFeatureEnabled: boolean;
132
+ organizationFeatureEnabled: boolean;
133
+ }
134
+ export type TModelGatewayApiKeyCreateInput = {
135
+ name: string;
136
+ lifetime?: ModelGatewayApiKeyLifetimeEnum;
137
+ };
138
+ export type TModelGatewayApiKeyRevokeInput = {
139
+ reason?: string | null;
140
+ };
141
+ export type TModelGatewayExternalRequestCreateInput = {
142
+ copilotId: string;
143
+ copilotModelId: string;
144
+ modelType: AiModelTypeEnum;
145
+ reason: string;
146
+ };
147
+ export type TModelGatewaySettingsUpdateInput = {
148
+ storeBodies: boolean;
149
+ bodyRetentionDays?: number;
150
+ requestsPerMinute: number;
151
+ maxConcurrentRequests: number;
152
+ };
153
+ export interface IModelGatewayAdminQuery {
154
+ search?: string;
155
+ status?: string;
156
+ userId?: string;
157
+ take?: number;
158
+ skip?: number;
159
+ }
@@ -6,6 +6,14 @@ export declare enum AIPermissionsEnum {
6
6
  COPILOT_VIEW = "COPILOT_VIEW",
7
7
  COPILOT_EDIT = "COPILOT_EDIT",
8
8
  MEMBERSHIP_EDIT = "MEMBERSHIP_EDIT",
9
+ MEMBERSHIP_USE = "MEMBERSHIP_USE",
10
+ MODEL_ACCESS_REQUEST_VIEW = "MODEL_ACCESS_REQUEST_VIEW",
11
+ MODEL_ACCESS_REQUEST_EDIT = "MODEL_ACCESS_REQUEST_EDIT",
12
+ MODEL_GATEWAY_USE = "MODEL_GATEWAY_USE",
13
+ MODEL_GATEWAY_MANAGE = "MODEL_GATEWAY_MANAGE",
14
+ BILLING_PRODUCT_EDIT = "BILLING_PRODUCT_EDIT",
15
+ BILLING_REFUND = "BILLING_REFUND",
16
+ PAYMENT_PROVIDER_EDIT = "PAYMENT_PROVIDER_EDIT",
9
17
  /**
10
18
  * Create or edit Xperts in organization.
11
19
  */
@@ -49,6 +49,10 @@ export type SandboxTerminalResizeRequest = SandboxTerminalDimensions & {
49
49
  sessionId: string;
50
50
  };
51
51
  export type SandboxTerminalCloseRequest = {
52
+ requestId: string;
53
+ sessionId?: never;
54
+ } | {
55
+ requestId?: never;
52
56
  sessionId: string;
53
57
  };
54
58
  export type SandboxTerminalOpenedEvent = {
@@ -227,6 +227,14 @@ export interface IXpert extends IBasePerWorkspaceEntityModel, TXpert {
227
227
  */
228
228
  knowledgebase?: IKnowledgebase;
229
229
  }
230
+ export interface IXpertPrincipalReference {
231
+ id: string;
232
+ name: string;
233
+ title?: string;
234
+ organizationName?: string | null;
235
+ tenantName?: string | null;
236
+ workspaceName?: string | null;
237
+ }
230
238
  export type TXpertOptions = {
231
239
  bootstrap?: {
232
240
  source: 'template';
@@ -53,8 +53,12 @@ export interface IApiPrincipal extends IUser {
53
53
  apiKey?: IApiKey;
54
54
  /**
55
55
  * Binding target kind for short-lived client_secret principals.
56
+ * This is an authorization discriminator, not creator metadata: ownerUserId/
57
+ * createdById can be present for every binding type and must not be used to
58
+ * infer how secret_token.entityId should be resolved.
56
59
  * Examples:
57
60
  * - api_key => secret_token.entityId is the backing ApiKey id
61
+ * - user_xpert => secret_token.entityId is the user-authorized xpert id
58
62
  * - public_xpert => secret_token.entityId is the public xpert id
59
63
  */
60
64
  clientSecretBindingType?: SecretTokenBindingType | null;
@@ -1,4 +1,4 @@
1
- import { IBasePerTenantEntityModel } from '../base-entity.model';
1
+ import { IBasePerTenantEntityModel } from './base-entity.model';
2
2
  export interface IDataSourceType extends IBasePerTenantEntityModel {
3
3
  name?: string;
4
4
  type?: string;
@@ -1,15 +1,12 @@
1
- import { IBasePerTenantAndOrganizationEntityModel, IBasePerTenantEntityModel } from '../base-entity.model';
2
- import { IUser } from '../user.model';
3
- import { IDataSourceType } from './data-source-type';
4
- import { ISemanticModel } from './semantic-model';
1
+ import { IBasePerTenantAndOrganizationEntityModel, IBasePerTenantEntityModel } from './base-entity.model';
2
+ import { IDataSourceType } from './data-source-type.model';
3
+ import { IUser } from './user.model';
5
4
  export interface IDataSource extends IBasePerTenantAndOrganizationEntityModel {
6
5
  name?: string;
7
6
  typeId?: string;
8
7
  type?: IDataSourceType;
9
- useLocalAgent?: boolean;
10
8
  authType?: AuthenticationEnum;
11
9
  options?: Record<string, unknown>;
12
- models?: ISemanticModel[];
13
10
  authentications?: IDataSourceAuthentication[];
14
11
  }
15
12
  export interface IDataSourceAuthentication extends IBasePerTenantEntityModel {
@@ -56,7 +53,7 @@ export interface IColumnDef {
56
53
  nullable?: boolean;
57
54
  position?: number;
58
55
  /**
59
- * 应该等同于 label
56
+ * Should be equivalent to label
60
57
  */
61
58
  comment?: string;
62
59
  }
@@ -83,6 +83,7 @@ export declare enum FeatureEnum {
83
83
  FEATURE_USER = "FEATURE_USER",
84
84
  FEATURE_USERS = "FEATURE_USERS",
85
85
  FEATURE_USER_GROUPS = "FEATURE_USER_GROUPS",
86
+ FEATURE_REFERRAL = "FEATURE_REFERRAL",
86
87
  FEATURE_ORGANIZATIONS = "FEATURE_ORGANIZATIONS",
87
88
  FEATURE_SETTING = "FEATURE_SETTING",
88
89
  FEATURE_EMAIL_HISTORY = "FEATURE_EMAIL_HISTORY",
@@ -91,5 +92,6 @@ export declare enum FeatureEnum {
91
92
  FEATURE_SMS_GATEWAY = "FEATURE_SMS_GATEWAY",
92
93
  FEATURE_SMTP = "FEATURE_SMTP",
93
94
  FEATURE_ROLES_PERMISSION = "FEATURE_ROLES_PERMISSION",
94
- FEATURE_INTEGRATION = "FEATURE_INTEGRATION"
95
+ FEATURE_INTEGRATION = "FEATURE_INTEGRATION",
96
+ FEATURE_DATA_SOURCE = "FEATURE_DATA_SOURCE"
95
97
  }
package/src/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './types';
2
+ export * from './utils';
2
3
  export type { I18nObject, I18nText } from './i18n.model';
3
4
  export { resolveI18nText } from './i18n.model';
4
5
  export * from './contact.model';
@@ -22,6 +23,7 @@ export * from './organization-team-employee-model';
22
23
  export * from './organization-team-model';
23
24
  export * from './organization.model';
24
25
  export * from './role-permission.model';
26
+ export * from './referral.model';
25
27
  export * from './seed.model';
26
28
  export * from './tag-entity.model';
27
29
  export * from './tenant.model';
@@ -33,9 +35,10 @@ export * from './user-organization.model';
33
35
  export * from './user-group.model';
34
36
  export * from './user-me-context.model';
35
37
  export * from './user.model';
36
- export * from './analytics/index';
37
38
  export * from './custom-smtp.model';
38
39
  export * from './date-picker.model';
40
+ export * from './data-source.model';
41
+ export * from './data-source-type.model';
39
42
  export * from './integration.model';
40
43
  export * from './invite.model';
41
44
  export * from './organization-projects.model';
package/src/plugin.d.ts CHANGED
@@ -7,6 +7,7 @@ import { IconDefinition, I18nObject } from './types';
7
7
  export type PluginName = string;
8
8
  export declare const PLUGIN_LEVEL: {
9
9
  readonly SYSTEM: "system";
10
+ readonly TENANT: "tenant";
10
11
  readonly ORGANIZATION: "organization";
11
12
  };
12
13
  export declare const PLUGIN_SOURCE: {
@@ -63,6 +64,7 @@ export declare const PLUGIN_RESOURCE_INSTALLATION_STATUS: {
63
64
  /**
64
65
  * Classifies plugin scope and governance.
65
66
  * - `system`: built-in/platform-managed plugin that users cannot install/uninstall from org APIs.
67
+ * - `tenant`: tenant-owned plugin that may register process-global runtime artifacts and is activated after an API restart.
66
68
  * - `organization`: tenant/org-managed plugin that can be installed and removed per organization.
67
69
  */
68
70
  export type PluginLevel = (typeof PLUGIN_LEVEL)[keyof typeof PLUGIN_LEVEL];
@@ -318,8 +320,8 @@ export interface PluginMeta {
318
320
  deprecationMessage?: I18nObject;
319
321
  icon?: IconDefinition;
320
322
  category: 'set' | 'doc-source' | 'agent' | 'tools' | 'model' | 'vlm' | 'vector-store' | 'integration' | 'datasource' | 'database' | 'middleware';
321
- displayName: string;
322
- description: string;
323
+ displayName: string | I18nObject;
324
+ description: string | I18nObject;
323
325
  keywords?: string[];
324
326
  author: string;
325
327
  homepage?: string;
@@ -361,8 +363,8 @@ export interface PluginMarketplaceRegistryItem {
361
363
  * When omitted, marketplace views may derive a default from the package name.
362
364
  */
363
365
  artifactNamespace?: string | null;
364
- displayName: string;
365
- description: string;
366
+ displayName: string | I18nObject;
367
+ description: string | I18nObject;
366
368
  category: string;
367
369
  author: string;
368
370
  icon?: IconDefinition | null;
@@ -390,8 +392,8 @@ export interface PluginMarketplaceRegistryItemInput {
390
392
  * Keep it aligned with the plugin manifest/meta when the plugin declares one.
391
393
  */
392
394
  artifactNamespace?: string | null;
393
- displayName?: string;
394
- description?: string;
395
+ displayName?: string | I18nObject;
396
+ description?: string | I18nObject;
395
397
  category?: string;
396
398
  author?: string;
397
399
  icon?: IconDefinition | null;
@@ -516,7 +518,7 @@ export interface IPluginInstallResult {
516
518
  currentVersion?: string;
517
519
  /**
518
520
  * The plugin package was installed and persisted, but the running API process
519
- * intentionally did not activate it. System-level plugins require a graceful
521
+ * intentionally did not activate it. Process-level system and tenant plugins require a graceful
520
522
  * API restart (or a blue-green process replacement) before this version takes effect.
521
523
  */
522
524
  restartRequired?: boolean;
@@ -0,0 +1,36 @@
1
+ import { IBasePerTenantEntityModel } from './base-entity.model';
2
+ import { IUser } from './user.model';
3
+ export interface IReferralCode extends IBasePerTenantEntityModel {
4
+ code: string;
5
+ userId?: string | null;
6
+ user?: IUser | null;
7
+ }
8
+ export interface IReferralRelation extends IBasePerTenantEntityModel {
9
+ referrerUserId?: string | null;
10
+ referrerUser?: IUser | null;
11
+ referredUserId?: string | null;
12
+ referredUser?: IUser | null;
13
+ usedCode: string;
14
+ boundAt: Date;
15
+ }
16
+ export interface IReferralAccountView {
17
+ id?: string | null;
18
+ name?: string | null;
19
+ email?: string | null;
20
+ deleted: boolean;
21
+ }
22
+ export interface IReferralRelationView {
23
+ id: string;
24
+ referrer: IReferralAccountView;
25
+ referred: IReferralAccountView;
26
+ usedCode: string;
27
+ boundAt: Date;
28
+ }
29
+ export interface IReferralCodeView {
30
+ code: string;
31
+ }
32
+ export interface IReferralRelationQuery {
33
+ search?: string;
34
+ skip?: number;
35
+ take?: number;
36
+ }
@@ -1,4 +1,3 @@
1
- import { AnalyticsPermissionsEnum } from './analytics/index';
2
1
  import { AIPermissionsEnum } from './ai/index';
3
2
  import { IBasePerTenantEntityModel } from './base-entity.model';
4
3
  import { IRole } from './role.model';
@@ -48,14 +47,17 @@ export declare enum PermissionsEnum {
48
47
  ORG_DEMO_EDIT = "ORG_DEMO_EDIT",// Orgnization demo edit permission
49
48
  INTEGRATION_EDIT = "INTEGRATION_EDIT",
50
49
  INTEGRATION_VIEW = "INTEGRATION_VIEW",
50
+ DATA_SOURCE_VIEW = "DATA_SOURCE_VIEW",
51
+ DATA_SOURCE_EDIT = "DATA_SOURCE_EDIT",
51
52
  FILE_STORAGE_VIEW = "FILE_STORAGE_VIEW",
52
53
  SMS_GATEWAY_VIEW = "SMS_GATEWAY_VIEW",
53
54
  CUSTOM_SMTP_VIEW = "CUSTOM_SMTP_VIEW",
54
55
  VIEW_ALL_ACCOUNTING_TEMPLATES = "VIEW_ALL_ACCOUNTING_TEMPLATES",
55
56
  ACCESS_DELETE_ACCOUNT = "ACCESS_DELETE_ACCOUNT",
56
- ACCESS_DELETE_ALL_DATA = "ACCESS_DELETE_ALL_DATA"
57
+ ACCESS_DELETE_ALL_DATA = "ACCESS_DELETE_ALL_DATA",
58
+ REFERRAL_VIEW = "REFERRAL_VIEW"
57
59
  }
58
60
  export declare const PermissionGroups: {
59
- GENERAL: (PermissionsEnum | AIPermissionsEnum | AnalyticsPermissionsEnum)[];
61
+ GENERAL: (PermissionsEnum | AIPermissionsEnum)[];
60
62
  ADMINISTRATION: PermissionsEnum[];
61
63
  };
@@ -13,7 +13,6 @@ export declare enum RolesEnum {
13
13
  SUPER_ADMIN = "SUPER_ADMIN",
14
14
  ADMIN = "ADMIN",
15
15
  AI_BUILDER = "AI_BUILDER",
16
- ANALYTICS_BUILDER = "ANALYTICS_BUILDER",
17
16
  VIEWER = "VIEWER",
18
17
  TRIAL = "TRIAL"
19
18
  }
@@ -1,6 +1,6 @@
1
1
  export declare const RUNTIME_RESTART_CONFIRMATION: "RESTART";
2
- export type RuntimeRestartMode = 'disabled' | 'self-signal';
3
- export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required' | 'restart-disabled';
2
+ export type RuntimeRestartMode = 'self-signal';
3
+ export type RuntimeRestartCapabilityReason = 'allowed' | 'interactive-auth-required' | 'super-admin-required' | 'default-tenant-required';
4
4
  export interface IRuntimeRestartCapability {
5
5
  allowed: boolean;
6
6
  mode: RuntimeRestartMode;
@@ -15,7 +15,7 @@ export interface IRuntimeRestartRequest {
15
15
  export interface IRuntimeRestartResponse {
16
16
  accepted: true;
17
17
  restartId: string;
18
- mode: Exclude<RuntimeRestartMode, 'disabled'>;
18
+ mode: RuntimeRestartMode;
19
19
  instanceId: string;
20
20
  requestedAt: string;
21
21
  signalAfterMs: number;
@@ -1,10 +1,24 @@
1
1
  import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
2
+ /**
3
+ * Selects how an opaque client secret is authorized and how entityId is
4
+ * interpreted. createdById only records provenance; it does not distinguish
5
+ * an API-key grant, a delegated user session, or a public assistant session.
6
+ */
2
7
  export declare enum SecretTokenBindingType {
8
+ /** entityId is an ApiKey id and the request runs as that API principal. */
3
9
  API_KEY = "api_key",
10
+ /**
11
+ * entityId is the only Xpert this session may access; createdById is loaded
12
+ * as the acting business user for the interactive ChatKit run.
13
+ */
14
+ USER_XPERT = "user_xpert",
15
+ /** entityId is a public Xpert id and public-app access rules apply. */
4
16
  PUBLIC_XPERT = "public_xpert"
5
17
  }
6
18
  export interface ISecretToken extends IBasePerTenantAndOrganizationEntityModel {
19
+ /** Polymorphic binding id; interpret it only through type. */
7
20
  entityId?: string;
21
+ /** Explicit grant/binding semantics for this opaque token. */
8
22
  type?: SecretTokenBindingType;
9
23
  token: string;
10
24
  validUntil?: Date;
@@ -33,6 +33,11 @@ export interface ITenantSetting extends S3FileStorageProviderConfig {
33
33
  fileStorageProvider?: string;
34
34
  copilotCheckpointRetentionEnabled?: string | null;
35
35
  copilotCheckpointRetentionDays?: string | null;
36
+ modelGatewayCallRetentionEnabled?: string | null;
37
+ modelGatewayCallRetentionDays?: string | null;
38
+ membershipTokensPerPoint?: string | null;
39
+ modelGatewayRequestsPerMinute?: string | null;
40
+ modelGatewayMaxConcurrentRequests?: string | null;
36
41
  tenant_title?: string;
37
42
  tenant_title_en?: string;
38
43
  tenant_enable_feishu?: boolean;
@@ -60,6 +60,7 @@ export interface IUserRegistrationInput {
60
60
  user: IUser;
61
61
  password?: string;
62
62
  confirmPassword?: string;
63
+ referralCode?: string;
63
64
  originalUrl?: string;
64
65
  organizationId?: string;
65
66
  createdById?: string;
package/src/utils.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export declare function isNil(value: unknown): value is null | undefined;
2
+ export declare function nonNullable<T>(value: T): value is NonNullable<T>;
3
+ export declare function isString(value: unknown): value is string;
4
+ export declare function isBlank(value: unknown): boolean;
5
+ export declare function nonBlank<T>(value: T): value is NonNullable<T>;
@@ -1,73 +0,0 @@
1
- export declare enum ChatDashboardMessageType {
2
- /**
3
- * Display data preview using analytical card event
4
- */
5
- AnalyticalCard = "AnalyticalCard",
6
- /**
7
- * Create or edit a cube event
8
- */
9
- Cube = "Cube",
10
- /**
11
- * Edit a virtual cube event
12
- */
13
- VirtualCube = "VirtualCube",
14
- /**
15
- * Create or edit members (calculated members or dimension sets) event
16
- */
17
- Members = "Members",
18
- /**
19
- * List indicators event
20
- */
21
- ListIndicators = "ListIndicators",
22
- /**
23
- * Create or edit an indicator event
24
- */
25
- Indicator = "Indicator",
26
- Indicators = "Indicators"
27
- }
28
- export declare enum BIInterruptMessageType {
29
- SwitchProject = "switch_project",
30
- SwitchSemanticModel = "switch_semantic_model",
31
- DeleteArtifact = "delete_artifact"
32
- }
33
- export type TMessageContentCube = {
34
- type: ChatDashboardMessageType.Cube;
35
- data: {
36
- modelId: string;
37
- cubeName: string;
38
- };
39
- };
40
- export type TMessageContentVirtualCube = {
41
- type: ChatDashboardMessageType.VirtualCube;
42
- data: {
43
- modelId: string;
44
- cubeName: string;
45
- };
46
- };
47
- export type TMessageContentMembers = {
48
- type: ChatDashboardMessageType.Members;
49
- data: {
50
- modelId: string;
51
- cubeName: string;
52
- members: {
53
- __id__: string;
54
- name: string;
55
- label?: string;
56
- caption?: string;
57
- description?: string;
58
- formula: string;
59
- formatting?: {
60
- unit?: string;
61
- decimal?: number;
62
- };
63
- }[];
64
- };
65
- };
66
- export type TMessageContentIndicator = {
67
- type: ChatDashboardMessageType.Indicator;
68
- data: {
69
- modelId?: string;
70
- cubeName?: string;
71
- indicatorId: string;
72
- };
73
- };
@@ -1,30 +0,0 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from "../base-entity.model";
2
- export interface IApprovalPolicy extends IBasePerTenantAndOrganizationEntityModel {
3
- name: string;
4
- description: string;
5
- approvalType: string;
6
- }
7
- export interface IApprovalPolicyFindInput extends IBasePerTenantAndOrganizationEntityModel {
8
- name?: string;
9
- description?: string;
10
- approvalType?: string;
11
- }
12
- export interface IApprovalPolicyCreateInput extends IApprovalPolicyFindInput {
13
- name?: string;
14
- }
15
- export interface IApprovalPolicyUpdateInput extends IApprovalPolicyCreateInput {
16
- id?: string;
17
- }
18
- export declare enum ApprovalPolicyTypesEnum {
19
- TIME_OFF = 1,
20
- EQUIPMENT_SHARING = 2,
21
- BUSINESS_TRIP = 3
22
- }
23
- export declare enum ApprovalPolicyTypesStringEnum {
24
- TIME_OFF = "TIME_OFF",
25
- EQUIPMENT_SHARING = "EQUIPMENT_SHARING",
26
- BUSINESS_TRIP = "BUSINESS_TRIP",
27
- INDICATOR = "INDICATOR",
28
- STORY = "STORY",
29
- BUSINESS_AREA = "BUSINESS_AREA"
30
- }
@@ -1,35 +0,0 @@
1
- import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
- import { LanguagesEnum, IUser } from '../user.model';
3
- import { IBusinessArea } from './business-area';
4
- export declare enum BusinessAreaRole {
5
- Adminer = 0,
6
- Modeler = 1,
7
- Viewer = 2
8
- }
9
- export interface IBusinessAreaUser extends IBasePerTenantAndOrganizationEntityModel {
10
- businessAreaId: string;
11
- businessArea?: IBusinessArea;
12
- userId: string;
13
- isDefault: boolean;
14
- isActive: boolean;
15
- user?: IUser;
16
- role: BusinessAreaRole;
17
- }
18
- export interface IBusinessAreaUserFindInput extends IBasePerTenantAndOrganizationEntityModel {
19
- businessAreaId?: string;
20
- id?: string;
21
- userId?: string;
22
- isDefault?: boolean;
23
- isActive?: boolean;
24
- }
25
- export interface IBusinessAreaUserCreateInput extends IBasePerTenantAndOrganizationEntityModel {
26
- businessAreaId: string;
27
- userId: string;
28
- isDefault?: boolean;
29
- isActive?: boolean;
30
- }
31
- export interface IBusinessAreaUserDeleteInput {
32
- userbusinessAreaId: string;
33
- requestingUser: IUser;
34
- language?: LanguagesEnum;
35
- }
@@ -1,17 +0,0 @@
1
- import { IBasePerTenantEntityModel } from "../base-entity.model";
2
- import { ITag } from "../tag-entity.model";
3
- import { IStory } from "./story";
4
- export interface IBusinessArea extends IBasePerTenantEntityModel {
5
- type?: BusinessType;
6
- name?: string;
7
- parentId?: string;
8
- level?: number;
9
- tags?: ITag[];
10
- stories?: Array<IStory>;
11
- children?: Array<IBusinessArea>;
12
- }
13
- export declare enum BusinessType {
14
- SEMANTIC_MODEL = "SEMANTIC_MODEL",
15
- STORY = "STORY",
16
- INDICATOR = "INDICATOR"
17
- }
@@ -1,11 +0,0 @@
1
- import { IBasePerTenantEntityModel } from '../base-entity.model';
2
- import { IUser } from '../user.model';
3
- export interface ICertification extends IBasePerTenantEntityModel {
4
- name?: string;
5
- description?: string;
6
- /**
7
- * Certification owner
8
- */
9
- owner?: IUser;
10
- ownerId?: string;
11
- }