@tinywork/glass 0.0.24 → 0.0.25

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 +23 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -7,6 +7,23 @@ 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 = {
20
+ $schema?: string;
21
+ $id?: string;
22
+ title?: string;
23
+ properties?: {
24
+ [key: string]: JSONPropertySchema;
25
+ };
26
+ };
10
27
  export type DocSchema = {
11
28
  apiId: string;
12
29
  groupId: string;
@@ -20,6 +37,11 @@ export type DocSchema = {
20
37
  status: boolean;
21
38
  prefix?: string;
22
39
  };
40
+ export type DocFullSchema = DocSchema & {
41
+ external: {
42
+ group: string;
43
+ };
44
+ };
23
45
  export type GroupSchema = {
24
46
  id: string;
25
47
  parentId: string | null;
@@ -83,6 +105,7 @@ export interface IGlassContext {
83
105
  type?: 'success' | 'info' | 'error';
84
106
  }) => Promise<void>;
85
107
  showProgress: () => IProgress;
108
+ transformDocToJsonSchema: (doc: DocFullSchema) => JSONSchema;
86
109
  postMessage: (message: Partial<NetLog>) => Promise<void>;
87
110
  }
88
111
  export interface IGlassExtension {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinywork/glass",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [