@tinywork/glass 0.0.24 → 0.0.26
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 +20 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,20 @@ import querystring from 'node:querystring';
|
|
|
7
7
|
import axios from 'axios';
|
|
8
8
|
import { BrowserWindow, type MenuItemConstructorOptions, type Session } from 'electron';
|
|
9
9
|
type ResourceType = 'Fetch/XHR' | 'JS' | 'CSS' | 'Img' | 'Media' | 'Font' | 'Doc' | 'WS' | 'Wasm' | 'Other';
|
|
10
|
+
export type JSONPropertySchema = {
|
|
11
|
+
type: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
items?: JSONPropertySchema;
|
|
14
|
+
properties?: {
|
|
15
|
+
[key: string]: JSONPropertySchema;
|
|
16
|
+
};
|
|
17
|
+
required?: string[];
|
|
18
|
+
};
|
|
19
|
+
export type JSONSchema = JSONPropertySchema & {
|
|
20
|
+
$schema?: string;
|
|
21
|
+
$id?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
};
|
|
10
24
|
export type DocSchema = {
|
|
11
25
|
apiId: string;
|
|
12
26
|
groupId: string;
|
|
@@ -20,6 +34,11 @@ export type DocSchema = {
|
|
|
20
34
|
status: boolean;
|
|
21
35
|
prefix?: string;
|
|
22
36
|
};
|
|
37
|
+
export type DocFullSchema = DocSchema & {
|
|
38
|
+
external: {
|
|
39
|
+
group: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
23
42
|
export type GroupSchema = {
|
|
24
43
|
id: string;
|
|
25
44
|
parentId: string | null;
|
|
@@ -83,6 +102,7 @@ export interface IGlassContext {
|
|
|
83
102
|
type?: 'success' | 'info' | 'error';
|
|
84
103
|
}) => Promise<void>;
|
|
85
104
|
showProgress: () => IProgress;
|
|
105
|
+
transformDocToJsonSchema: (doc: DocFullSchema) => JSONSchema;
|
|
86
106
|
postMessage: (message: Partial<NetLog>) => Promise<void>;
|
|
87
107
|
}
|
|
88
108
|
export interface IGlassExtension {
|