@wecode-team/cms-supabase-api 0.1.47 → 0.1.49

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.
@@ -0,0 +1,4 @@
1
+ export type FeishuAlertConfig = {
2
+ crudErrorWebhookUrls: string[];
3
+ };
4
+ export declare const feishuAlertConfig: FeishuAlertConfig;
@@ -4,6 +4,14 @@ export interface LoginRequest {
4
4
  username: string;
5
5
  password: string;
6
6
  }
7
+ export interface ForgotPasswordRequest {
8
+ username: string;
9
+ }
10
+ export interface ResetPasswordRequest {
11
+ username: string;
12
+ code: string;
13
+ password: string;
14
+ }
7
15
  export interface LoginResponse {
8
16
  token: string;
9
17
  user: {
@@ -13,6 +21,28 @@ export interface LoginResponse {
13
21
  session_id?: string;
14
22
  };
15
23
  }
24
+ export declare function forgotPassword(c: Context, tableName: string): Promise<(Response & import("hono").TypedResponse<{
25
+ success: boolean;
26
+ message?: string | undefined;
27
+ data?: any;
28
+ error?: string | undefined;
29
+ }, 200, "json">) | (Response & import("hono").TypedResponse<{
30
+ success: boolean;
31
+ message?: string | undefined;
32
+ data?: any;
33
+ error?: string | undefined;
34
+ }, 500, "json">)>;
35
+ export declare function resetPassword(c: Context, tableName: string): Promise<(Response & import("hono").TypedResponse<{
36
+ success: boolean;
37
+ message?: string | undefined;
38
+ data?: any;
39
+ error?: string | undefined;
40
+ }, 200, "json">) | (Response & import("hono").TypedResponse<{
41
+ success: boolean;
42
+ message?: string | undefined;
43
+ data?: any;
44
+ error?: string | undefined;
45
+ }, 500, "json">)>;
16
46
  export declare function login(c: Context, tableName: string): Promise<(Response & import("hono").TypedResponse<{
17
47
  success: boolean;
18
48
  message?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export { initializeSupabase, getSupabase, testConnection, initializeCmsSystem, executeSupabaseSetup, getSupabaseSetupSQL, closeSupabase, initializeSupabase as initializeDatabase, getSupabase as getDatabase, initializeCmsSystem as syncDatabase, closeSupabase as closeDatabase, } from "./config/database";
2
+ export type { FeishuAlertConfig, } from "./config/feishu-alert";
3
+ export { feishuAlertConfig, } from "./config/feishu-alert";
2
4
  export { default as CmsModelService, getCmsModelService, initializeCmsModel, } from "./models/cms-model";
3
5
  export { getCmsModelService as CmsModel } from "./models/cms-model";
4
6
  export { DynamicTableService, getDynamicTableService, } from "./services/dynamic-table.service";
@@ -8,8 +10,8 @@ export { getModels, createModel, updateModel, deleteModel, } from "./handlers/mo
8
10
  export { getTableData, createTableData, updateTableData, deleteTableData, getRelationOptions, getTableDataWithRelations, dropForeignKeys, } from "./handlers/data";
9
11
  export { login, signup, signupStatus, verifyAuth, getCurrentUser, requireAuth, } from "./handlers/auth";
10
12
  export { uploadToOss, } from "./handlers/upload";
11
- export { getConfig, updateConfig, } from "./handlers/configs";
12
13
  export type { SchemaField, JsonSchema, CmsModelAttributes, CmsModelCreationAttributes, ApiResponse, PaginatedResponse, SupabaseConfig, DatabaseConfig, TableDataOptions, SupabaseFilter, FieldTypeMapping, RelationType, RelationConfig, RelationOption, GetRelationOptionsParams, } from "./types";
13
14
  export type { User, UserInfo, LoginRequest, LoginResponse, } from "./handlers/auth";
14
- export { createCmsRoutes, createModelRoute, createDynamicDataRoute, createDynamicAuthRoute, createDataRoute, createAuthRoute, createOssUploadRoute, createConfigRoute, } from "./utils/route-helpers";
15
+ export { createCmsRoutes, createModelRoute, createDynamicDataRoute, createDynamicAuthRoute, createDataRoute, createAuthRoute, createOssUploadRoute, } from "./utils/route-helpers";
16
+ export { notifyCmsCrudErrorToFeishu, reportCmsCrudErrorToFeishu, } from "./utils/feishu-alert";
15
17
  export type { OssUploadProvider, OssUploadReturnMode, OssUploadConfig, NormalizedOssUploadConfig, OssUploadInput, OssUploadResult, UploadRouteResponse, } from "./types/upload";