@tinywork/glass 1.0.16 → 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 +7 -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<{
|
|
@@ -22,7 +22,7 @@ declare global {
|
|
|
22
22
|
|
|
23
23
|
type Cookie = {
|
|
24
24
|
name: string;
|
|
25
|
-
|
|
25
|
+
domain?: string;
|
|
26
26
|
path?: string;
|
|
27
27
|
value?: string;
|
|
28
28
|
};
|
|
@@ -306,6 +306,11 @@ declare global {
|
|
|
306
306
|
/** url为null时表示break了请求 */
|
|
307
307
|
url: string | null;
|
|
308
308
|
originUrl?: string | null;
|
|
309
|
+
response?: {
|
|
310
|
+
statusCode?: number;
|
|
311
|
+
headers?: OutgoingHttpHeaders;
|
|
312
|
+
body?: any;
|
|
313
|
+
};
|
|
309
314
|
isLocal?: boolean;
|
|
310
315
|
}>;
|
|
311
316
|
/** 在执行请求用例时触发,用于修改config */
|
|
@@ -385,20 +390,6 @@ declare global {
|
|
|
385
390
|
getItem<T>(key: string): IGlassExtensionInvokeResponse<T>;
|
|
386
391
|
setItem<T>(key: string, value: T): IGlassExtensionInvokeResponse<void>;
|
|
387
392
|
|
|
388
|
-
/** 保存cookie */
|
|
389
|
-
setCookie(params: {
|
|
390
|
-
name: string;
|
|
391
|
-
origin?: string;
|
|
392
|
-
path?: string;
|
|
393
|
-
value: string;
|
|
394
|
-
}): IGlassExtensionInvokeResponse<void>;
|
|
395
|
-
|
|
396
|
-
/** 获取cookie */
|
|
397
|
-
getCookie(params: {
|
|
398
|
-
name: string;
|
|
399
|
-
origin?: string;
|
|
400
|
-
path?: string;
|
|
401
|
-
}): IGlassExtensionInvokeResponse<string>;
|
|
402
393
|
/** 保存文档组 */
|
|
403
394
|
saveGroup(group: GroupSchema): IGlassExtensionInvokeResponse<void>;
|
|
404
395
|
/** 批量保存文档组 */
|