@djvlc/contracts-types 1.6.0 → 1.7.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.
- package/dist/index.d.mts +292 -214
- package/dist/index.d.ts +292 -214
- package/dist/index.js +103 -1
- package/dist/index.mjs +94 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -40,6 +40,39 @@ type JsonObject = Record<string, JsonValue>;
|
|
|
40
40
|
* 上下文类型定义
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* 操作者信息
|
|
45
|
+
*
|
|
46
|
+
* @description
|
|
47
|
+
* 用于审计日志、操作记录等场景,标识执行操作的用户。
|
|
48
|
+
* 适用于管理后台操作、API 调用等需要追踪操作者的场景。
|
|
49
|
+
*/
|
|
50
|
+
interface OperatorInfo {
|
|
51
|
+
/** 用户唯一标识 */
|
|
52
|
+
uid: string;
|
|
53
|
+
/** 用户名(显示名称) */
|
|
54
|
+
username: string;
|
|
55
|
+
/** 用户角色列表 */
|
|
56
|
+
roles?: string[];
|
|
57
|
+
/** 操作来源 IP */
|
|
58
|
+
ip?: string;
|
|
59
|
+
/** User Agent */
|
|
60
|
+
userAgent?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 部署环境类型
|
|
64
|
+
*
|
|
65
|
+
* @description
|
|
66
|
+
* 用于区分不同的部署环境,影响配置、日志级别、功能开关等。
|
|
67
|
+
*/
|
|
68
|
+
type Environment = 'development' | 'staging' | 'production';
|
|
69
|
+
/**
|
|
70
|
+
* 发布环境类型(页面发布使用)
|
|
71
|
+
*
|
|
72
|
+
* @description
|
|
73
|
+
* 页面可以发布到不同的环境,支持预览、灰度、正式等场景。
|
|
74
|
+
*/
|
|
75
|
+
type PublishEnvironment = 'preview' | 'staging' | 'prod';
|
|
43
76
|
/**
|
|
44
77
|
* 应用上下文
|
|
45
78
|
*/
|
|
@@ -178,6 +211,36 @@ declare enum ErrorCode {
|
|
|
178
211
|
* 错误码到 HTTP 状态码映射
|
|
179
212
|
*/
|
|
180
213
|
declare const ErrorCodeToHttpStatus: Record<ErrorCode, number>;
|
|
214
|
+
/**
|
|
215
|
+
* 错误码到消息映射
|
|
216
|
+
*/
|
|
217
|
+
declare const ErrorMessages: Record<ErrorCode, string>;
|
|
218
|
+
/**
|
|
219
|
+
* DJVLC 错误接口
|
|
220
|
+
*/
|
|
221
|
+
interface DjvlcError extends Error {
|
|
222
|
+
/** 错误码 */
|
|
223
|
+
code: ErrorCode | string;
|
|
224
|
+
/** HTTP 状态码 */
|
|
225
|
+
httpStatus: number;
|
|
226
|
+
/** 错误详情 */
|
|
227
|
+
details?: Record<string, unknown>;
|
|
228
|
+
/** 追踪 ID */
|
|
229
|
+
traceId?: string;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* 创建 DJVLC 错误
|
|
233
|
+
*
|
|
234
|
+
* @param code 错误码
|
|
235
|
+
* @param message 错误消息(可选,默认使用 ErrorMessages 中的消息)
|
|
236
|
+
* @param details 错误详情
|
|
237
|
+
* @returns DjvlcError 错误对象
|
|
238
|
+
*/
|
|
239
|
+
declare function createDjvlcError(code: ErrorCode, message?: string, details?: Record<string, unknown>): DjvlcError;
|
|
240
|
+
/**
|
|
241
|
+
* 判断是否为 DJVLC 错误
|
|
242
|
+
*/
|
|
243
|
+
declare function isDjvlcError(error: unknown): error is DjvlcError;
|
|
181
244
|
|
|
182
245
|
/**
|
|
183
246
|
* API 响应格式
|
|
@@ -286,6 +349,36 @@ declare enum VersionStatus {
|
|
|
286
349
|
/** 已阻断(禁止使用) */
|
|
287
350
|
BLOCKED = "blocked"
|
|
288
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* 版本状态类型(字符串字面量版本,用于 JSON/数据库存储)
|
|
354
|
+
*/
|
|
355
|
+
type VersionStatusType = 'draft' | 'stable' | 'deprecated' | 'blocked';
|
|
356
|
+
/**
|
|
357
|
+
* 页面状态枚举
|
|
358
|
+
*/
|
|
359
|
+
declare enum PageStatus {
|
|
360
|
+
/** 草稿状态 */
|
|
361
|
+
DRAFT = "draft",
|
|
362
|
+
/** 已发布 */
|
|
363
|
+
PUBLISHED = "published",
|
|
364
|
+
/** 已归档 */
|
|
365
|
+
ARCHIVED = "archived"
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* 页面状态类型(字符串字面量版本)
|
|
369
|
+
*/
|
|
370
|
+
type PageStatusType = 'draft' | 'published' | 'archived';
|
|
371
|
+
/**
|
|
372
|
+
* 组件状态类型
|
|
373
|
+
*
|
|
374
|
+
* @description
|
|
375
|
+
* 用于组件版本的生命周期管理。
|
|
376
|
+
* - draft: 开发中,仅内部可见
|
|
377
|
+
* - stable: 稳定版,推荐使用
|
|
378
|
+
* - deprecated: 已废弃,不推荐使用,但仍可用
|
|
379
|
+
* - blocked: 已阻断,禁止使用(安全原因)
|
|
380
|
+
*/
|
|
381
|
+
type ComponentStatus = 'draft' | 'stable' | 'deprecated' | 'blocked';
|
|
289
382
|
/**
|
|
290
383
|
* 发布渠道
|
|
291
384
|
*/
|
|
@@ -697,6 +790,116 @@ interface Expression {
|
|
|
697
790
|
returnType?: string;
|
|
698
791
|
};
|
|
699
792
|
}
|
|
793
|
+
/**
|
|
794
|
+
* 表达式求值上下文
|
|
795
|
+
*
|
|
796
|
+
* @description
|
|
797
|
+
* 表达式引擎在求值时可访问的上下文对象。
|
|
798
|
+
* 所有动态表达式(state/binding/context/template/computed)都从此上下文获取数据。
|
|
799
|
+
*
|
|
800
|
+
* 使用场景:
|
|
801
|
+
* - Runtime 表达式求值
|
|
802
|
+
* - 编辑器表达式预览
|
|
803
|
+
* - 表达式校验与调试
|
|
804
|
+
*
|
|
805
|
+
* @example
|
|
806
|
+
* ```typescript
|
|
807
|
+
* const ctx: ExpressionContext = {
|
|
808
|
+
* state: { count: 0, userInfo: { name: 'Alice' } },
|
|
809
|
+
* binding: { userList: [{ id: 1, name: 'Bob' }] },
|
|
810
|
+
* context: { item: { id: 1, name: 'Bob' }, index: 0 },
|
|
811
|
+
* };
|
|
812
|
+
*
|
|
813
|
+
* // 求值 { type: 'state', value: 'userInfo.name' } => 'Alice'
|
|
814
|
+
* // 求值 { type: 'context', value: 'item.name' } => 'Bob'
|
|
815
|
+
* ```
|
|
816
|
+
*/
|
|
817
|
+
interface ExpressionContext {
|
|
818
|
+
/**
|
|
819
|
+
* 页面状态
|
|
820
|
+
*
|
|
821
|
+
* @description
|
|
822
|
+
* 对应 PageState.fields 的运行时值。
|
|
823
|
+
* 表达式通过 { type: 'state', value: 'fieldName.path' } 访问。
|
|
824
|
+
*/
|
|
825
|
+
state: Record<string, unknown>;
|
|
826
|
+
/**
|
|
827
|
+
* 数据绑定结果
|
|
828
|
+
*
|
|
829
|
+
* @description
|
|
830
|
+
* 对应 DataBinding 查询的返回数据,按 bindingId 组织。
|
|
831
|
+
* 表达式通过 { type: 'binding', value: 'bindingId.path' } 访问。
|
|
832
|
+
*/
|
|
833
|
+
binding: Record<string, unknown>;
|
|
834
|
+
/**
|
|
835
|
+
* 局部上下文
|
|
836
|
+
*
|
|
837
|
+
* @description
|
|
838
|
+
* 包含循环变量、事件参数等临时作用域数据。
|
|
839
|
+
* 表达式通过 { type: 'context', value: 'item.path' } 访问。
|
|
840
|
+
*/
|
|
841
|
+
context: ExpressionLocalContext;
|
|
842
|
+
/**
|
|
843
|
+
* 组件属性(可选)
|
|
844
|
+
*
|
|
845
|
+
* @description
|
|
846
|
+
* 当前组件的 props 值,供组件内部表达式访问。
|
|
847
|
+
* 通常在组件内部求值时提供。
|
|
848
|
+
*/
|
|
849
|
+
props?: Record<string, unknown>;
|
|
850
|
+
/**
|
|
851
|
+
* 当前事件(可选)
|
|
852
|
+
*
|
|
853
|
+
* @description
|
|
854
|
+
* 事件处理器执行时的事件对象。
|
|
855
|
+
* 仅在事件处理链中可用。
|
|
856
|
+
*/
|
|
857
|
+
event?: ExpressionEventContext;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* 局部上下文(循环变量、事件参数等)
|
|
861
|
+
*/
|
|
862
|
+
interface ExpressionLocalContext {
|
|
863
|
+
/**
|
|
864
|
+
* 循环项(loop.itemName 指定的变量名)
|
|
865
|
+
*
|
|
866
|
+
* @description
|
|
867
|
+
* 在 loop 渲染中,当前迭代的数据项。
|
|
868
|
+
*/
|
|
869
|
+
item?: unknown;
|
|
870
|
+
/**
|
|
871
|
+
* 循环索引(loop.indexName 指定的变量名)
|
|
872
|
+
*
|
|
873
|
+
* @description
|
|
874
|
+
* 在 loop 渲染中,当前迭代的索引。
|
|
875
|
+
*/
|
|
876
|
+
index?: number;
|
|
877
|
+
/**
|
|
878
|
+
* 动态扩展字段
|
|
879
|
+
*
|
|
880
|
+
* @description
|
|
881
|
+
* 支持自定义局部变量,如嵌套循环的多个 item/index。
|
|
882
|
+
*/
|
|
883
|
+
[key: string]: unknown;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* 事件上下文
|
|
887
|
+
*/
|
|
888
|
+
interface ExpressionEventContext {
|
|
889
|
+
/** 事件类型 */
|
|
890
|
+
type: string;
|
|
891
|
+
/** 事件目标(组件实例 ID) */
|
|
892
|
+
target?: string;
|
|
893
|
+
/** 事件载荷(组件抛出的数据) */
|
|
894
|
+
payload?: unknown;
|
|
895
|
+
/** 原生事件(如 MouseEvent 的部分安全属性) */
|
|
896
|
+
nativeEvent?: {
|
|
897
|
+
clientX?: number;
|
|
898
|
+
clientY?: number;
|
|
899
|
+
key?: string;
|
|
900
|
+
keyCode?: number;
|
|
901
|
+
};
|
|
902
|
+
}
|
|
700
903
|
/**
|
|
701
904
|
* 任意值或表达式
|
|
702
905
|
*
|
|
@@ -712,6 +915,21 @@ type AnyValueOrExpression = Expression | string | number | boolean | null | AnyV
|
|
|
712
915
|
* @deprecated 使用 AnyValueOrExpression 代替
|
|
713
916
|
*/
|
|
714
917
|
type PropValue = AnyValueOrExpression;
|
|
918
|
+
/**
|
|
919
|
+
* 创建空的表达式上下文
|
|
920
|
+
*
|
|
921
|
+
* @description
|
|
922
|
+
* 用于初始化表达式求值环境,所有字段都有合理的默认值。
|
|
923
|
+
*/
|
|
924
|
+
declare function createExpressionContext(partial?: Partial<ExpressionContext>): ExpressionContext;
|
|
925
|
+
/**
|
|
926
|
+
* 创建带循环变量的局部上下文
|
|
927
|
+
*
|
|
928
|
+
* @param item - 当前循环项
|
|
929
|
+
* @param index - 当前循环索引
|
|
930
|
+
* @param extras - 额外的局部变量(如嵌套循环)
|
|
931
|
+
*/
|
|
932
|
+
declare function createLoopContext(item: unknown, index: number, extras?: Record<string, unknown>): ExpressionLocalContext;
|
|
715
933
|
/**
|
|
716
934
|
* 创建字面量表达式
|
|
717
935
|
* @deprecated V2 版本移除 literal 表达式类型,静态值请直接使用原始类型
|
|
@@ -1086,13 +1304,12 @@ declare const CURRENT_SCHEMA_VERSION = "2.0.0";
|
|
|
1086
1304
|
*/
|
|
1087
1305
|
type SchemaVersion = typeof CURRENT_SCHEMA_VERSION | '1.0.0' | '0.9.0';
|
|
1088
1306
|
/**
|
|
1089
|
-
* 页面 Schema
|
|
1307
|
+
* 页面 Schema Runtime Core(不可变版本的核心结构)
|
|
1090
1308
|
*
|
|
1091
1309
|
* @description
|
|
1092
1310
|
* 发布后的 pageVersion 中存储的完整页面定义。
|
|
1093
1311
|
* 一旦发布,此结构永不修改(只能新发版本)。
|
|
1094
1312
|
*
|
|
1095
|
-
* V2 版本核心变化:
|
|
1096
1313
|
* - 新增 pageId/pageVersion 独立标识
|
|
1097
1314
|
* - 新增 runtime 运行时规格
|
|
1098
1315
|
* - 状态管理扁平化(仅页面级状态)
|
|
@@ -4052,231 +4269,76 @@ interface LotteryState {
|
|
|
4052
4269
|
}
|
|
4053
4270
|
|
|
4054
4271
|
/**
|
|
4055
|
-
* @djvlc/contracts-types -
|
|
4272
|
+
* @djvlc/contracts-types - 版本管理核心类型
|
|
4056
4273
|
*
|
|
4057
|
-
*
|
|
4058
|
-
*
|
|
4059
|
-
* - CDN 刷新
|
|
4060
|
-
* - 静态发布
|
|
4061
|
-
* - 通知推送
|
|
4062
|
-
* - 数据同步
|
|
4274
|
+
* 定义版本对比、变更日志等公共类型
|
|
4275
|
+
* 注意:API 请求/响应类型由 OpenAPI 生成,不在此定义
|
|
4063
4276
|
*
|
|
4064
4277
|
* @packageDocumentation
|
|
4065
4278
|
*/
|
|
4066
4279
|
|
|
4067
4280
|
/**
|
|
4068
|
-
*
|
|
4281
|
+
* 变更日志项
|
|
4282
|
+
*
|
|
4283
|
+
* @description
|
|
4284
|
+
* 记录单个字段的变更,用于版本对比和审计
|
|
4069
4285
|
*/
|
|
4070
|
-
|
|
4286
|
+
interface ChangeLogItem {
|
|
4287
|
+
/** 旧值 */
|
|
4288
|
+
old: unknown;
|
|
4289
|
+
/** 新值 */
|
|
4290
|
+
new: unknown;
|
|
4291
|
+
/** 摘要描述 */
|
|
4292
|
+
summary?: string;
|
|
4293
|
+
}
|
|
4071
4294
|
/**
|
|
4072
|
-
*
|
|
4295
|
+
* 变更日志
|
|
4296
|
+
*
|
|
4297
|
+
* @description
|
|
4298
|
+
* 以字段路径为 key 的变更记录集合
|
|
4073
4299
|
*/
|
|
4074
|
-
type
|
|
4300
|
+
type ChangeLog = Record<string, ChangeLogItem>;
|
|
4075
4301
|
/**
|
|
4076
|
-
*
|
|
4302
|
+
* 版本信息
|
|
4303
|
+
*
|
|
4304
|
+
* @description
|
|
4305
|
+
* 页面/组件等资源的版本记录基础信息
|
|
4077
4306
|
*/
|
|
4078
|
-
interface
|
|
4079
|
-
/**
|
|
4080
|
-
|
|
4081
|
-
/**
|
|
4082
|
-
|
|
4083
|
-
/**
|
|
4084
|
-
|
|
4085
|
-
/**
|
|
4086
|
-
|
|
4087
|
-
/**
|
|
4088
|
-
|
|
4089
|
-
/**
|
|
4090
|
-
|
|
4091
|
-
/** 请求 ID */
|
|
4092
|
-
requestId: string;
|
|
4093
|
-
/** 操作者 */
|
|
4094
|
-
actor: EventActor;
|
|
4095
|
-
/** 事件状态 */
|
|
4096
|
-
status: OutboxEventStatus;
|
|
4097
|
-
/** 重试次数 */
|
|
4098
|
-
retryCount: number;
|
|
4099
|
-
/** 最大重试次数 */
|
|
4100
|
-
maxRetries: number;
|
|
4101
|
-
/** 下次重试时间 */
|
|
4102
|
-
nextRetryAt?: ISODateTime;
|
|
4307
|
+
interface VersionInfo {
|
|
4308
|
+
/** 版本唯一标识 */
|
|
4309
|
+
uid: UniqueId;
|
|
4310
|
+
/** 版本序号(自增) */
|
|
4311
|
+
versionNumber: number;
|
|
4312
|
+
/** 版本标签(如 v1.0.0) */
|
|
4313
|
+
versionLabel?: string;
|
|
4314
|
+
/** 版本描述 */
|
|
4315
|
+
description?: string;
|
|
4316
|
+
/** 是否自动保存的版本 */
|
|
4317
|
+
isAutoSave: boolean;
|
|
4318
|
+
/** 是否已发布 */
|
|
4319
|
+
isPublished: boolean;
|
|
4103
4320
|
/** 创建时间 */
|
|
4104
4321
|
createdAt: ISODateTime;
|
|
4105
|
-
/**
|
|
4106
|
-
|
|
4107
|
-
/**
|
|
4108
|
-
|
|
4109
|
-
/** 处理结果 */
|
|
4110
|
-
result?: Record<string, unknown>;
|
|
4111
|
-
}
|
|
4112
|
-
/**
|
|
4113
|
-
* 事件操作者
|
|
4114
|
-
*/
|
|
4115
|
-
interface EventActor {
|
|
4116
|
-
/** 操作者类型 */
|
|
4117
|
-
type: 'user' | 'system' | 'scheduler' | 'api';
|
|
4118
|
-
/** 操作者 ID */
|
|
4119
|
-
id: string;
|
|
4120
|
-
/** 操作者名称 */
|
|
4121
|
-
name?: string;
|
|
4122
|
-
/** IP 地址 */
|
|
4123
|
-
ip?: string;
|
|
4124
|
-
/** 用户代理 */
|
|
4125
|
-
userAgent?: string;
|
|
4126
|
-
}
|
|
4127
|
-
/**
|
|
4128
|
-
* 页面发布事件
|
|
4129
|
-
*/
|
|
4130
|
-
interface PagePublishedEvent extends OutboxEventBase {
|
|
4131
|
-
eventType: 'page.published';
|
|
4132
|
-
aggregateType: 'page';
|
|
4133
|
-
payload: {
|
|
4134
|
-
pageId: UniqueId;
|
|
4135
|
-
pageVersionId: UniqueId;
|
|
4136
|
-
manifestId: UniqueId;
|
|
4137
|
-
publishedBy: string;
|
|
4138
|
-
channel?: string;
|
|
4139
|
-
rolloutConfig?: Record<string, unknown>;
|
|
4140
|
-
};
|
|
4141
|
-
}
|
|
4142
|
-
/**
|
|
4143
|
-
* 页面回滚事件
|
|
4144
|
-
*/
|
|
4145
|
-
interface PageRolledBackEvent extends OutboxEventBase {
|
|
4146
|
-
eventType: 'page.rolled_back';
|
|
4147
|
-
aggregateType: 'page';
|
|
4148
|
-
payload: {
|
|
4149
|
-
pageId: UniqueId;
|
|
4150
|
-
fromVersionId: UniqueId;
|
|
4151
|
-
toVersionId: UniqueId;
|
|
4152
|
-
reason: string;
|
|
4153
|
-
rolledBackBy: string;
|
|
4154
|
-
};
|
|
4155
|
-
}
|
|
4156
|
-
/**
|
|
4157
|
-
* 组件阻断事件
|
|
4158
|
-
*/
|
|
4159
|
-
interface ComponentBlockedEvent extends OutboxEventBase {
|
|
4160
|
-
eventType: 'component.blocked';
|
|
4161
|
-
aggregateType: 'component';
|
|
4162
|
-
payload: {
|
|
4163
|
-
componentId: UniqueId;
|
|
4164
|
-
version: string;
|
|
4165
|
-
reason: string;
|
|
4166
|
-
blockedBy: string;
|
|
4167
|
-
urgent: boolean;
|
|
4168
|
-
affectedPages: UniqueId[];
|
|
4169
|
-
};
|
|
4170
|
-
}
|
|
4171
|
-
/**
|
|
4172
|
-
* 动作执行事件
|
|
4173
|
-
*/
|
|
4174
|
-
interface ActionExecutedEvent extends OutboxEventBase {
|
|
4175
|
-
eventType: 'action.executed';
|
|
4176
|
-
aggregateType: 'action';
|
|
4177
|
-
payload: {
|
|
4178
|
-
actionType: string;
|
|
4179
|
-
actionId?: UniqueId;
|
|
4180
|
-
pageVersionId: UniqueId;
|
|
4181
|
-
componentVersionId?: UniqueId;
|
|
4182
|
-
userId: string;
|
|
4183
|
-
params: Record<string, unknown>;
|
|
4184
|
-
result: Record<string, unknown>;
|
|
4185
|
-
durationMs: number;
|
|
4186
|
-
};
|
|
4187
|
-
}
|
|
4188
|
-
/**
|
|
4189
|
-
* CDN 失效事件
|
|
4190
|
-
*/
|
|
4191
|
-
interface CdnInvalidateEvent extends OutboxEventBase {
|
|
4192
|
-
eventType: 'cdn.invalidate';
|
|
4193
|
-
aggregateType: 'cdn';
|
|
4194
|
-
payload: {
|
|
4195
|
-
urls: string[];
|
|
4196
|
-
patterns?: string[];
|
|
4197
|
-
reason: string;
|
|
4198
|
-
priority: 'high' | 'normal' | 'low';
|
|
4199
|
-
};
|
|
4200
|
-
}
|
|
4201
|
-
/**
|
|
4202
|
-
* 审计高危动作事件
|
|
4203
|
-
*/
|
|
4204
|
-
interface AuditHighRiskEvent extends OutboxEventBase {
|
|
4205
|
-
eventType: 'audit.high_risk_action';
|
|
4206
|
-
aggregateType: 'audit';
|
|
4207
|
-
payload: {
|
|
4208
|
-
action: string;
|
|
4209
|
-
targetType: string;
|
|
4210
|
-
targetId: UniqueId;
|
|
4211
|
-
summary: Record<string, unknown>;
|
|
4212
|
-
riskLevel: 'high' | 'critical';
|
|
4213
|
-
requiresReview: boolean;
|
|
4214
|
-
};
|
|
4215
|
-
}
|
|
4216
|
-
/**
|
|
4217
|
-
* Outbox 事件(联合类型)
|
|
4218
|
-
*/
|
|
4219
|
-
type OutboxEvent = PagePublishedEvent | PageRolledBackEvent | ComponentBlockedEvent | ActionExecutedEvent | CdnInvalidateEvent | AuditHighRiskEvent;
|
|
4220
|
-
/**
|
|
4221
|
-
* 创建 Outbox 事件请求
|
|
4222
|
-
*/
|
|
4223
|
-
interface CreateOutboxEventRequest<T = Record<string, unknown>> {
|
|
4224
|
-
/** 事件类型 */
|
|
4225
|
-
eventType: OutboxEventType;
|
|
4226
|
-
/** 聚合类型 */
|
|
4227
|
-
aggregateType: string;
|
|
4228
|
-
/** 聚合 ID */
|
|
4229
|
-
aggregateId: UniqueId;
|
|
4230
|
-
/** 事件负载 */
|
|
4231
|
-
payload: T;
|
|
4232
|
-
/** 链路追踪 ID */
|
|
4233
|
-
traceId: string;
|
|
4234
|
-
/** 请求 ID */
|
|
4235
|
-
requestId: string;
|
|
4236
|
-
/** 操作者 */
|
|
4237
|
-
actor: EventActor;
|
|
4238
|
-
/** 延迟执行(秒) */
|
|
4239
|
-
delaySeconds?: number;
|
|
4240
|
-
/** 最大重试次数 */
|
|
4241
|
-
maxRetries?: number;
|
|
4322
|
+
/** 创建者 UID */
|
|
4323
|
+
createdBy: string;
|
|
4324
|
+
/** 创建者用户名 */
|
|
4325
|
+
createdByUsername: string;
|
|
4242
4326
|
}
|
|
4243
4327
|
/**
|
|
4244
|
-
*
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
result?: Record<string, unknown>;
|
|
4259
|
-
/** 是否需要重试 */
|
|
4260
|
-
shouldRetry?: boolean;
|
|
4261
|
-
}
|
|
4262
|
-
/**
|
|
4263
|
-
* Outbox 统计信息
|
|
4264
|
-
*/
|
|
4265
|
-
interface OutboxStats {
|
|
4266
|
-
/** 待处理数量 */
|
|
4267
|
-
pending: number;
|
|
4268
|
-
/** 处理中数量 */
|
|
4269
|
-
processing: number;
|
|
4270
|
-
/** 失败数量 */
|
|
4271
|
-
failed: number;
|
|
4272
|
-
/** 死信数量 */
|
|
4273
|
-
deadLetter: number;
|
|
4274
|
-
/** 最近 1 小时完成数量 */
|
|
4275
|
-
completedLastHour: number;
|
|
4276
|
-
/** 最近 1 小时失败数量 */
|
|
4277
|
-
failedLastHour: number;
|
|
4278
|
-
/** 平均处理时间(毫秒) */
|
|
4279
|
-
avgProcessingTimeMs: number;
|
|
4328
|
+
* 版本对比结果
|
|
4329
|
+
*
|
|
4330
|
+
* @description
|
|
4331
|
+
* 两个版本之间的差异摘要
|
|
4332
|
+
*/
|
|
4333
|
+
interface VersionDiff {
|
|
4334
|
+
/** 新增的内容(ID 或路径列表) */
|
|
4335
|
+
added: string[];
|
|
4336
|
+
/** 删除的内容 */
|
|
4337
|
+
removed: string[];
|
|
4338
|
+
/** 修改的内容 */
|
|
4339
|
+
modified: string[];
|
|
4340
|
+
/** 详细变更日志 */
|
|
4341
|
+
changeLog: ChangeLog;
|
|
4280
4342
|
}
|
|
4281
4343
|
|
|
4282
4344
|
/**
|
|
@@ -4293,10 +4355,26 @@ interface OutboxStats {
|
|
|
4293
4355
|
/**
|
|
4294
4356
|
* 包版本号
|
|
4295
4357
|
*/
|
|
4296
|
-
declare const VERSION = "2.
|
|
4358
|
+
declare const VERSION = "2.1.0";
|
|
4297
4359
|
/**
|
|
4298
4360
|
* 协议版本号
|
|
4299
4361
|
*/
|
|
4300
4362
|
declare const PROTOCOL_VERSION = "2.0.0";
|
|
4363
|
+
/**
|
|
4364
|
+
* PageSchema 当前版本
|
|
4365
|
+
*/
|
|
4366
|
+
declare const PAGE_SCHEMA_VERSION = "2.0.0";
|
|
4367
|
+
/**
|
|
4368
|
+
* ComponentMeta 当前版本
|
|
4369
|
+
*/
|
|
4370
|
+
declare const COMPONENT_META_SCHEMA_VERSION = "2.0.0";
|
|
4371
|
+
/**
|
|
4372
|
+
* ActionSpec 当前版本
|
|
4373
|
+
*/
|
|
4374
|
+
declare const ACTION_SPEC_VERSION = "2.0.0";
|
|
4375
|
+
/**
|
|
4376
|
+
* DataQuerySpec 当前版本
|
|
4377
|
+
*/
|
|
4378
|
+
declare const DATA_QUERY_SPEC_VERSION = "2.0.0";
|
|
4301
4379
|
|
|
4302
|
-
export { type ABTestRolloutConfig, ALLOWED_FUNCTION_NAMES, ALL_BUILTIN_FUNCTIONS, ARRAY_FUNCTIONS, type ActionClientContext, type ActionDefinition, type ActionDefinitionVersion, type ActionExecuteRequest, type ActionExecuteResponse, type
|
|
4380
|
+
export { type ABTestRolloutConfig, ACTION_SPEC_VERSION, ALLOWED_FUNCTION_NAMES, ALL_BUILTIN_FUNCTIONS, ARRAY_FUNCTIONS, type ActionClientContext, type ActionDefinition, type ActionDefinitionVersion, type ActionExecuteRequest, type ActionExecuteResponse, type ActionExecutor, type ActionPolicy, type ActionRef, type ActionResult, type ActionSheetItem, type ActionSheetOptions, type ActionSheetResult, type ActionSpec, ActionType, type Activity, type ActivityPrecondition, type ActivityRule, type ActivityStatus, type ActivityType, type AggregationDataSourceConfig, type AggregationQueryItem, type AnyValueOrExpression, type ApiErrorDetail, type ApiErrorResponse, type ApiResponse, type ApiSuccessResponse, type AppContext, AuditAction, type AuditConfig, type AuditLogEntry, type BackgroundConfig, type BaseActivityRule, type BlacklistRolloutConfig, type BlockedComponentInfo, type BrowserCompat, type BuiltinActionType, COMPONENT_META_SCHEMA_VERSION, CURRENT_ACTION_SPEC_VERSION, CURRENT_COMPONENT_META_VERSION, CURRENT_DATA_QUERY_SPEC_VERSION, CURRENT_SCHEMA_VERSION, type CacheConfig, type CacheLevel, type CanaryHealthCheck, type CanaryRolloutConfig, type CanaryStage, type CanvasType, type CapabilityDeclaration, type CapabilityName, type ChangeLog, type ChangeLogItem, type ClaimActivityRule, type ClaimPrize, type ClaimRecord, type ClaimState, type ClipboardApi, type CompatInfo, type Component, type ComponentCategory, type ComponentContext, type ComponentDependency, type ComponentIntegrity, type ComponentMeta, type ComponentNode, type ComponentQueryParams, type ComponentRegisterRequest, type ComponentStatus, type ComponentStatusChangeRequest, type ComponentVersion, type ConfirmOptions, type ConsecutiveReward, type CreateManifestRequest, type CumulativeReward, DATA_QUERY_SPEC_VERSION, DATE_FUNCTIONS, DEFAULT_EXPRESSION_VALIDATION_CONFIG, type DataBinding, type DataBindingErrorConfig, type DataLoadStrategy, type DataQueryDefinition, type DataQueryDefinitionVersion, type DataQueryRequest, type DataQueryResponse, type DataQuerySpec, type DataSourceConfig, type DataSourceType, type DatabaseDataSourceConfig, type DialogOptions, type DialogResult, type DjvlcError, type EditorComponent, type Environment, ErrorCategory, ErrorCode, ErrorCodeToHttpStatus, type ErrorMapping, ErrorMessages, type EventDeclaration, type EventHandler, type ExecutorContext, type ExecutorResult, type Expression, type ExpressionContext, type ExpressionEventContext, type ExpressionFunctionCategory, type ExpressionFunctionDefinition, type ExpressionLocalContext, type ExpressionType, type ExpressionValidationConfig, type ExpressionValidationError, type ExpressionValidationResult, type ExpressionValidationWarning, FORMAT_FUNCTIONS, type FallbackCondition, type FallbackConfig, type FeatureCondition, type FeatureRolloutConfig, type FieldPermission, type FieldPolicy, type FieldTransform, type FileIntegrity, type FunctionParamDefinition, type GraphQLDataSourceConfig, type HostApi, type HttpDataSourceConfig, type HttpRetryConfig, type I18nDetectionStrategy, type ISODateTime, type IdempotencyKeyStrategy, type IdempotencyRule, type IntegrityHash, type InternalDataSourceConfig, type InventoryConfig, type JsonObject, type JsonValue, LOGIC_FUNCTIONS, type LayoutConfig, type LayoutValues, type LoopConfig, type LotteryActivityRule, type LotteryCost, type LotteryPrize, type LotteryState, type Manifest, type ManifestEntry, type ManifestItem, type ManifestValidationError, type ManifestValidationResult, type ManifestValidationWarning, type MaskingConfig, type MaskingRule, type MaskingType, type MethodCategory, type MethodDeclaration, type MethodParam, NUMBER_FUNCTIONS, type NavigateOptions, type NodeStyleConfig, type OperatorInfo, type OrderByItem, PAGE_SCHEMA_VERSION, PROTOCOL_VERSION, type PageConfig, type PageDraft, type PageI18nConfig, type PageLifecycle, type PageManifest, type PageMeta, type PageResolveResponse, type PageSEO, type PageSchema, type PageState, PageStatus, type PageStatusType, type PageVersion, type PaginatedResponse, type PaginationMeta, type PaginationParams, type ParamPermission, type ParticipationLimit, type PercentageRolloutConfig, type PityConfig, type Precondition, type PreconditionType, type PreviewImageOptions, type ProbabilityConfig, type PropDefinition, type PropFormat, type PropGroup, type PropType, type PropValue, type PropsSchema, type PublishCdnConfig, PublishChannel, type PublishConfig, type PublishEnvironment, type PublishNotificationConfig, type PublishRecord, type PublishRolloutConfig, PublishStatus, type QueryPermissions, type RateLimitDimension, type RateLimitItem, type RateLimitRule, type RequestContext, type ResolvedManifest, type ResponsiveBreakpoints, type RetryPolicy, type RiskControlConfig, type RolloutConfig, type RolloutMatchRequest, type RolloutMatchResult, type RolloutStrategy, type RolloutStrategyConfig, type RolloutStrategyType, type RuntimeConfig, type RuntimeContext, type RuntimeSpec, type SHAIntegrity, STRING_FUNCTIONS, type ScanCodeResult, type SchemaVersion, type SemVer, type ShareOptions, type ShareResult, type SigninActivityRule, type SigninRecord, type SigninRewardRecord, type SigninState, type SlotCategory, type SlotDeclaration, type StateFieldDefinition, type StorageApi, type StorageOptions, type StyleConfig, type StyleIsolation, type TimeWindowRolloutConfig, type ToastOptions, type TrackEvent, type URLString, UTILITY_FUNCTIONS, type UniqueId, type UpsertRolloutRequest, type UserActivityState, type UserContext, VERSION, type ValidationRule, type VersionDiff, type VersionInfo, VersionStatus, type VersionStatusType, type WhitelistRolloutConfig, bindingRef, createDjvlcError, createExpressionContext, createLoopContext, isDjvlcError, literal, queryRef, stateRef, template };
|