@tinywork/glass 1.0.15 → 1.0.17
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/index.d.ts +8 -16
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { OutgoingHttpHeaders } from "node:http";
|
|
2
2
|
|
|
3
3
|
type IGlassExtensionEvent<T> = (params: T) => Promise<T>;
|
|
4
4
|
type IGlassExtensionInvokeResponse<T> = Promise<{
|
|
@@ -14,6 +14,7 @@ declare global {
|
|
|
14
14
|
id: string;
|
|
15
15
|
label: string;
|
|
16
16
|
enabled?: boolean;
|
|
17
|
+
data?: Record<string, any>;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
/** 1-新增,2-修改,3-删除 */
|
|
@@ -21,7 +22,7 @@ declare global {
|
|
|
21
22
|
|
|
22
23
|
type Cookie = {
|
|
23
24
|
name: string;
|
|
24
|
-
|
|
25
|
+
domain?: string;
|
|
25
26
|
path?: string;
|
|
26
27
|
value?: string;
|
|
27
28
|
};
|
|
@@ -305,6 +306,11 @@ declare global {
|
|
|
305
306
|
/** url为null时表示break了请求 */
|
|
306
307
|
url: string | null;
|
|
307
308
|
originUrl?: string | null;
|
|
309
|
+
response?: {
|
|
310
|
+
statusCode?: number;
|
|
311
|
+
headers?: OutgoingHttpHeaders;
|
|
312
|
+
body?: any;
|
|
313
|
+
};
|
|
308
314
|
isLocal?: boolean;
|
|
309
315
|
}>;
|
|
310
316
|
/** 在执行请求用例时触发,用于修改config */
|
|
@@ -384,20 +390,6 @@ declare global {
|
|
|
384
390
|
getItem<T>(key: string): IGlassExtensionInvokeResponse<T>;
|
|
385
391
|
setItem<T>(key: string, value: T): IGlassExtensionInvokeResponse<void>;
|
|
386
392
|
|
|
387
|
-
/** 保存cookie */
|
|
388
|
-
setCookie(params: {
|
|
389
|
-
name: string;
|
|
390
|
-
origin?: string;
|
|
391
|
-
path?: string;
|
|
392
|
-
value: string;
|
|
393
|
-
}): IGlassExtensionInvokeResponse<void>;
|
|
394
|
-
|
|
395
|
-
/** 获取cookie */
|
|
396
|
-
getCookie(params: {
|
|
397
|
-
name: string;
|
|
398
|
-
origin?: string;
|
|
399
|
-
path?: string;
|
|
400
|
-
}): IGlassExtensionInvokeResponse<string>;
|
|
401
393
|
/** 保存文档组 */
|
|
402
394
|
saveGroup(group: GroupSchema): IGlassExtensionInvokeResponse<void>;
|
|
403
395
|
/** 批量保存文档组 */
|