@tinywork/glass 0.0.48 → 0.0.50

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 (2) hide show
  1. package/dist/index.d.ts +16 -6
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -48,6 +48,7 @@ export type DocFullSchema = DocSchema & {
48
48
  };
49
49
  export type GroupSchema = {
50
50
  id: string;
51
+ orgId?: string | null;
51
52
  parentId: string | null;
52
53
  name: string;
53
54
  desc?: string;
@@ -58,6 +59,7 @@ export type GroupSchema = {
58
59
  };
59
60
  export type Project = {
60
61
  id: string;
62
+ orgId?: string | null;
61
63
  name: string;
62
64
  desc?: string;
63
65
  status: boolean;
@@ -104,10 +106,15 @@ export type CaseData = Omit<Case, "params" | "headers" | "body"> & {
104
106
  headers?: string;
105
107
  body?: string;
106
108
  };
109
+ export type Association = {
110
+ versionId: string;
111
+ apiId: string;
112
+ tags?: string[];
113
+ };
107
114
  export type MockMode = "None" | "Local" | "Advance";
108
115
  export type ActionMode = "Modify" | "Add" | "Remove";
109
116
  export type ActionTarget = "Origin";
110
- export type ContextMenuType = "log" | "group" | "doc" | "rule" | "project" | "version" | "plan" | "case";
117
+ export type ContextMenuType = "log" | "group" | "doc" | "rule" | "project" | "version" | "plan" | "case" | "association";
111
118
  export type ContextMenuParams = {
112
119
  type: "log";
113
120
  data: NetLog;
@@ -132,6 +139,9 @@ export type ContextMenuParams = {
132
139
  } | {
133
140
  type: "case";
134
141
  data: Case;
142
+ } | {
143
+ type: "association";
144
+ data: Association;
135
145
  };
136
146
  export type SyncDataType = "group" | "doc" | "rule" | "project" | "version" | "plan" | "case";
137
147
  export type SyncDataParams = {
@@ -315,9 +325,9 @@ export interface IGlassExtension {
315
325
  }[];
316
326
  }): Promise<void>;
317
327
  /** 远程服务同步数据至本机 */
318
- onSyncDownload?(context: IGlassContext, operation: Operation, params: SyncDataParams): Promise<void>;
328
+ onSyncDownload?(context: IGlassContext, operation: Operation, params: SyncDataParams, orgId?: string | null): Promise<void>;
319
329
  /** 本机变更同步数据至远程服务 */
320
- onSyncUpload?(context: IGlassContext, operation: Operation, params: SyncDataParams): Promise<void>;
330
+ onSyncUpload?(context: IGlassContext, operation: Operation, params: SyncDataParams, orgId?: string | null): Promise<void>;
321
331
  /** 在postMessage到页面之前 */
322
332
  onMessagePost?(context: IGlassContext, message: Partial<NetLog>): Promise<void>;
323
333
  onResponse?(context: IGlassContext, params: {
@@ -327,10 +337,10 @@ export interface IGlassExtension {
327
337
  }): Promise<void>;
328
338
  deactivate?(context: IGlassContext): Promise<void>;
329
339
  uninstall?(context: IGlassContext): Promise<void>;
330
- onDocChange?(context: IGlassContext, doc: DocFullSchema | null, originDoc: DocFullSchema | null): Promise<boolean>;
340
+ onDocChange?(context: IGlassContext, doc: DocFullSchema | null, originDoc: DocFullSchema | null, orgId?: string | null): Promise<boolean>;
341
+ onGroupChange?(context: IGlassContext, group: GroupSchema | null, originGroup: GroupSchema | null, orgId?: string | null): Promise<boolean>;
331
342
  /** glass cli拉取接口文档 */
332
- onDocCliUpdate?(context: IGlassContext, id: string): Promise<void>;
333
- onGroupChange?(context: IGlassContext, group: GroupSchema | null, originGroup: GroupSchema | null): Promise<boolean>;
343
+ onDocCliUpdate?(context: IGlassContext, id: string, orgId?: string | null): Promise<void>;
334
344
  /** 右键请求日志 */
335
345
  onContextMenu?(context: IGlassContext, params: ContextMenuParams, menus?: MenuItemConstructorOptions[]): Promise<void>;
336
346
  getDefaultRule?(context: IGlassContext, docs: DocSchema[], log: NetLog, rule?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinywork/glass",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [