@wecode-team/cms-supabase-api 0.1.46 → 0.1.48
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/config/feishu-alert.d.ts +4 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.esm.js +203 -288
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +205 -290
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/utils/feishu-alert.d.ts +13 -0
- package/dist/utils/route-helpers.d.ts +0 -1
- package/package.json +1 -1
- package/dist/handlers/analytics.d.ts +0 -11
- package/dist/handlers/configs.d.ts +0 -23
package/dist/types/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export interface SchemaField {
|
|
|
46
46
|
name: string;
|
|
47
47
|
/**
|
|
48
48
|
* 字段类型
|
|
49
|
-
* - 基础类型: string, text, integer, float, boolean, date, datetime, json, jsonb, email
|
|
49
|
+
* - 基础类型: string, text, richText, integer, float, boolean, date, datetime, json, jsonb, email
|
|
50
50
|
* - 关系类型: relation (需要配置 relation 属性)
|
|
51
51
|
*/
|
|
52
52
|
type: string;
|
|
@@ -116,6 +116,7 @@ export interface SupabaseFilter {
|
|
|
116
116
|
export interface FieldTypeMapping {
|
|
117
117
|
string: "text";
|
|
118
118
|
text: "text";
|
|
119
|
+
richText: "text";
|
|
119
120
|
integer: "int4";
|
|
120
121
|
float: "float8";
|
|
121
122
|
boolean: "bool";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
type CmsCrudAction = "create" | "read" | "update" | "delete";
|
|
3
|
+
type CmsCrudAlertOptions = {
|
|
4
|
+
action: CmsCrudAction;
|
|
5
|
+
target: "data" | "model";
|
|
6
|
+
tableName?: string;
|
|
7
|
+
modelId?: number | string;
|
|
8
|
+
recordId?: number | string;
|
|
9
|
+
error: unknown;
|
|
10
|
+
};
|
|
11
|
+
export declare function notifyCmsCrudErrorToFeishu(c: Context, options: CmsCrudAlertOptions): Promise<void>;
|
|
12
|
+
export declare function reportCmsCrudErrorToFeishu(c: Context, options: CmsCrudAlertOptions): void;
|
|
13
|
+
export {};
|
|
@@ -5,5 +5,4 @@ export declare function createDynamicDataRoute(app: Hono): Hono<import("hono/typ
|
|
|
5
5
|
export declare function createDynamicAuthRoute(app: Hono): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
6
6
|
export declare function createAuthRoute(app: Hono, tableName: string): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
7
7
|
export declare function createOssUploadRoute(app: Hono): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
8
|
-
export declare function createConfigRoute(app: Hono): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
9
8
|
export declare function createCmsRoutes(app: Hono): Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Context } from "hono";
|
|
2
|
-
/**
|
|
3
|
-
* 聚合查询 API
|
|
4
|
-
* GET /data/:tableName/aggregate
|
|
5
|
-
*/
|
|
6
|
-
export declare function getAggregateData(c: Context): Promise<Response>;
|
|
7
|
-
/**
|
|
8
|
-
* 时间序列查询 API
|
|
9
|
-
* GET /data/:tableName/timeseries
|
|
10
|
-
*/
|
|
11
|
-
export declare function getTimeSeriesData(c: Context): Promise<Response>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Context } from "hono";
|
|
2
|
-
export declare function getConfig(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
3
|
-
success: boolean;
|
|
4
|
-
message?: string | undefined;
|
|
5
|
-
data?: any;
|
|
6
|
-
error?: string | undefined;
|
|
7
|
-
}, 200, "json">) | (Response & import("hono").TypedResponse<{
|
|
8
|
-
success: boolean;
|
|
9
|
-
message?: string | undefined;
|
|
10
|
-
data?: any;
|
|
11
|
-
error?: string | undefined;
|
|
12
|
-
}, 500, "json">)>;
|
|
13
|
-
export declare function updateConfig(c: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
14
|
-
success: boolean;
|
|
15
|
-
message?: string | undefined;
|
|
16
|
-
data?: any;
|
|
17
|
-
error?: string | undefined;
|
|
18
|
-
}, 200, "json">) | (Response & import("hono").TypedResponse<{
|
|
19
|
-
success: boolean;
|
|
20
|
-
message?: string | undefined;
|
|
21
|
-
data?: any;
|
|
22
|
-
error?: string | undefined;
|
|
23
|
-
}, 500, "json">)>;
|