@tinywork/glass 0.0.43 → 0.0.45
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 +55 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,9 +50,63 @@ 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
|
+
};
|
|
68
|
+
export type Plan = {
|
|
69
|
+
id: string;
|
|
70
|
+
versionId: string;
|
|
71
|
+
name: string;
|
|
72
|
+
desc?: string;
|
|
73
|
+
origin: string;
|
|
74
|
+
prefix: string;
|
|
75
|
+
params?: string;
|
|
76
|
+
headers?: string;
|
|
77
|
+
body?: string;
|
|
78
|
+
/** 校验结果的ts类型声明 */
|
|
79
|
+
assert?: string;
|
|
80
|
+
};
|
|
53
81
|
export type MockMode = 'None' | 'Local' | 'Advance';
|
|
54
82
|
export type ActionMode = 'Modify' | 'Add' | 'Remove';
|
|
55
83
|
export type ActionTarget = 'Origin';
|
|
84
|
+
export type ContextMenuType = 'log' | 'group' | 'doc' | 'rule' | 'project' | 'version' | 'plan' | 'case';
|
|
85
|
+
export type ContextMenuParams = {
|
|
86
|
+
type: 'log';
|
|
87
|
+
data: NetLog;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'group';
|
|
90
|
+
data: GroupSchema;
|
|
91
|
+
} | {
|
|
92
|
+
type: 'doc';
|
|
93
|
+
data: DocSchema;
|
|
94
|
+
} | {
|
|
95
|
+
type: 'rule';
|
|
96
|
+
data: RuleSchema;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'project';
|
|
99
|
+
data: Project;
|
|
100
|
+
} | {
|
|
101
|
+
type: 'version';
|
|
102
|
+
data: Version;
|
|
103
|
+
} | {
|
|
104
|
+
type: 'plan';
|
|
105
|
+
data: Plan;
|
|
106
|
+
} | {
|
|
107
|
+
type: 'case';
|
|
108
|
+
data: Case;
|
|
109
|
+
};
|
|
56
110
|
export type MockModelSchema = {
|
|
57
111
|
id: string;
|
|
58
112
|
ruleId?: string;
|
|
@@ -239,7 +293,7 @@ export interface IGlassExtension {
|
|
|
239
293
|
onDocCliUpdate?(context: IGlassContext, id: string): Promise<void>;
|
|
240
294
|
onGroupChange?(context: IGlassContext, group: GroupSchema | null, originGroup: GroupSchema | null): Promise<boolean>;
|
|
241
295
|
/** 右键请求日志 */
|
|
242
|
-
|
|
296
|
+
onContextMenu?(context: IGlassContext, params: ContextMenuParams, menus?: MenuItemConstructorOptions[]): Promise<void>;
|
|
243
297
|
getDefaultRule?(context: IGlassContext, docs: DocSchema[], log: NetLog, rule?: {
|
|
244
298
|
id: string;
|
|
245
299
|
mode: 'None';
|