xansql 1.0.0 → 1.0.1
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/core/type.d.ts +19 -1
- package/index.d.ts +3 -0
- package/package.json +18 -1
package/core/type.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ import Model from '../model/index.js';
|
|
|
3
3
|
import { FindArgsType, CreateArgsType, UpdateArgsType, DeleteArgsType, AggregateArgsType } from '../model/type.js';
|
|
4
4
|
import { ExecuteMetaData } from './ExcuteMeta.js';
|
|
5
5
|
|
|
6
|
+
type XansqlConnectionOptions = {
|
|
7
|
+
host: string;
|
|
8
|
+
user: string;
|
|
9
|
+
password: string;
|
|
10
|
+
database: string;
|
|
11
|
+
port: number;
|
|
12
|
+
};
|
|
6
13
|
type RowObject = {
|
|
7
14
|
[key: string]: any;
|
|
8
15
|
};
|
|
@@ -44,6 +51,16 @@ type XansqlOnFetchInfo = {
|
|
|
44
51
|
};
|
|
45
52
|
isAuthorized?: (info: XansqlFetchPermissionInfo) => Promise<boolean>;
|
|
46
53
|
};
|
|
54
|
+
type XansqlOnFetchResponse = {
|
|
55
|
+
status: number;
|
|
56
|
+
body: any;
|
|
57
|
+
headers?: {
|
|
58
|
+
[key: string]: string;
|
|
59
|
+
};
|
|
60
|
+
cookies?: {
|
|
61
|
+
[key: string]: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
47
64
|
type XansqlSocket = {
|
|
48
65
|
open: (socket: WebSocket) => Promise<void>;
|
|
49
66
|
message: (socket: WebSocket, data: any) => Promise<void>;
|
|
@@ -57,6 +74,7 @@ type XansqlCache<Row = object> = {
|
|
|
57
74
|
onUpdate: (model: Model, rows: Row[]) => Promise<void>;
|
|
58
75
|
onDelete: (model: Model, rows: Row[]) => Promise<void>;
|
|
59
76
|
};
|
|
77
|
+
type XansqlFileMeta = UploadFileMeta;
|
|
60
78
|
type XansqlFetchUrl = string;
|
|
61
79
|
type XansqlFetchConfig = {
|
|
62
80
|
url: XansqlFetchUrl;
|
|
@@ -114,4 +132,4 @@ type XansqlModelOptions = {
|
|
|
114
132
|
};
|
|
115
133
|
};
|
|
116
134
|
|
|
117
|
-
export type { ExecuterResult, ResultData, RowObject, XansqlCache, XansqlConfigType, XansqlConfigTypeRequired, XansqlDialect, XansqlDialectEngine, XansqlDialectSchemaColumn, XansqlDialectSchemaType, XansqlFetchConfig, XansqlFetchMethod, XansqlFetchPermissionInfo, XansqlFetchUrl, XansqlFileConfig, XansqlModelOptions, XansqlOnFetchInfo, XansqlSocket };
|
|
135
|
+
export type { ExecuterResult, ResultData, RowObject, XansqlCache, XansqlConfigType, XansqlConfigTypeRequired, XansqlConnectionOptions, XansqlDialect, XansqlDialectEngine, XansqlDialectSchemaColumn, XansqlDialectSchemaType, XansqlFetchConfig, XansqlFetchMethod, XansqlFetchPermissionInfo, XansqlFetchUrl, XansqlFileConfig, XansqlFileMeta, XansqlModelOptions, XansqlOnFetchInfo, XansqlOnFetchResponse, XansqlSocket };
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { default as Xansql } from './core/Xansql.js';
|
|
2
2
|
export { default as Model } from './model/index.js';
|
|
3
3
|
export { default as xt } from './Types/index.js';
|
|
4
|
+
export { ExecuterResult, ResultData, RowObject, XansqlCache, XansqlConfigType, XansqlConfigTypeRequired, XansqlConnectionOptions, XansqlDialect, XansqlDialectEngine, XansqlDialectSchemaColumn, XansqlDialectSchemaType, XansqlFetchConfig, XansqlFetchMethod, XansqlFetchPermissionInfo, XansqlFetchUrl, XansqlFileConfig, XansqlFileMeta, XansqlModelOptions, XansqlOnFetchInfo, XansqlOnFetchResponse, XansqlSocket } from './core/type.js';
|
|
5
|
+
export { AggregateArgsType, AggregateFunctions, AggregateSelectArgsColumnType, AggregateSelectArgsType, CreateArgsType, DataArgsType, DataValue, DeleteArgsType, DistinctArgsType, FindArgsAggregate, FindArgsType, LimitArgsType, OrderByArgsType, SelectArgsType, UpdateArgsType, UpdateDataArgsType, UpdateDataRelationArgs, WhereArgsType, WhereArgsTypeValue, WhereSubCondition } from './model/type.js';
|
|
6
|
+
export { XansqlSchemaObject, XqlFields } from './Types/types.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xansql",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"module": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -28,5 +28,22 @@
|
|
|
28
28
|
"react-dom": "^19.1.0",
|
|
29
29
|
"tslib": "^2.8.1",
|
|
30
30
|
"typescript": "^5.9.3"
|
|
31
|
+
},
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"import": "./index.js",
|
|
35
|
+
"require": "./index.js",
|
|
36
|
+
"types": "./index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./Dialect/*": {
|
|
39
|
+
"import": "./Dialect/*.js",
|
|
40
|
+
"require": "./Dialect/*.js",
|
|
41
|
+
"types": "./Dialect/*.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./FileHandler/*": {
|
|
44
|
+
"import": "./FileHandler/*.js",
|
|
45
|
+
"require": "./FileHandler/*.js",
|
|
46
|
+
"types": "./FileHandler/*.d.ts"
|
|
47
|
+
}
|
|
31
48
|
}
|
|
32
49
|
}
|