@tinywork/glass 0.0.43 → 0.0.44
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.ts +39 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,9 +50,47 @@ export type GroupSchema = {
|
|
|
50
50
|
code?: string;
|
|
51
51
|
status: boolean;
|
|
52
52
|
};
|
|
53
|
+
export type Project = {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
desc?: string;
|
|
57
|
+
status: boolean;
|
|
58
|
+
actived?: boolean;
|
|
59
|
+
};
|
|
60
|
+
export type Version = {
|
|
61
|
+
id: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
name: string;
|
|
64
|
+
desc?: string;
|
|
65
|
+
status: boolean;
|
|
66
|
+
actived?: boolean;
|
|
67
|
+
};
|
|
53
68
|
export type MockMode = 'None' | 'Local' | 'Advance';
|
|
54
69
|
export type ActionMode = 'Modify' | 'Add' | 'Remove';
|
|
55
70
|
export type ActionTarget = 'Origin';
|
|
71
|
+
export type ContextMenuType = 'log' | 'case' | 'group' | 'doc' | 'rule' | 'project' | 'version';
|
|
72
|
+
export type ContextMenuParams = {
|
|
73
|
+
type: 'log';
|
|
74
|
+
data: NetLog;
|
|
75
|
+
} | {
|
|
76
|
+
type: 'case';
|
|
77
|
+
data: Case;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'group';
|
|
80
|
+
data: GroupSchema;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'doc';
|
|
83
|
+
data: DocSchema;
|
|
84
|
+
} | {
|
|
85
|
+
type: 'rule';
|
|
86
|
+
data: RuleSchema;
|
|
87
|
+
} | {
|
|
88
|
+
type: 'project';
|
|
89
|
+
data: Project;
|
|
90
|
+
} | {
|
|
91
|
+
type: 'version';
|
|
92
|
+
data: Version;
|
|
93
|
+
};
|
|
56
94
|
export type MockModelSchema = {
|
|
57
95
|
id: string;
|
|
58
96
|
ruleId?: string;
|
|
@@ -239,7 +277,7 @@ export interface IGlassExtension {
|
|
|
239
277
|
onDocCliUpdate?(context: IGlassContext, id: string): Promise<void>;
|
|
240
278
|
onGroupChange?(context: IGlassContext, group: GroupSchema | null, originGroup: GroupSchema | null): Promise<boolean>;
|
|
241
279
|
/** 右键请求日志 */
|
|
242
|
-
|
|
280
|
+
onContextMenu?(context: IGlassContext, params: ContextMenuParams, menus?: MenuItemConstructorOptions[]): Promise<void>;
|
|
243
281
|
getDefaultRule?(context: IGlassContext, docs: DocSchema[], log: NetLog, rule?: {
|
|
244
282
|
id: string;
|
|
245
283
|
mode: 'None';
|