@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.
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@wecode-team/cms-supabase-api",
3
- "version": "0.1.46",
3
+ "version": "0.1.48",
4
4
  "description": "A CMS API package using Hono framework with Supabase and dynamic table management",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -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">)>;