@r2wa-org/eden 0.0.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/README.md +28 -0
- package/dist/src/admin/index.d.ts +4793 -0
- package/dist/src/auth/better-auth.d.ts +2915 -0
- package/dist/src/auth/better-hooks.d.ts +16 -0
- package/dist/src/auth/db.schemas.d.ts +2076 -0
- package/dist/src/auth/permissions.d.ts +155 -0
- package/dist/src/auth/roles.d.ts +376 -0
- package/dist/src/auth/router.d.ts +385 -0
- package/dist/src/auth/schema.d.ts +1080 -0
- package/dist/src/bank-account/admin.router.d.ts +880 -0
- package/dist/src/bank-account/db.schemas.d.ts +1032 -0
- package/dist/src/bank-account/dto.schemas.d.ts +572 -0
- package/dist/src/bank-account/index.d.ts +8 -0
- package/dist/src/bank-account/permissions.d.ts +10 -0
- package/dist/src/bank-account/router.d.ts +680 -0
- package/dist/src/bank-account/schema.d.ts +535 -0
- package/dist/src/bank-account/seed.d.ts +4 -0
- package/dist/src/bank-account/service.d.ts +359 -0
- package/dist/src/check-in/admin.router.d.ts +533 -0
- package/dist/src/check-in/db.schemas.d.ts +312 -0
- package/dist/src/check-in/dto.schemas.d.ts +544 -0
- package/dist/src/check-in/errors/index.d.ts +13 -0
- package/dist/src/check-in/errors/locales/zh.d.ts +10 -0
- package/dist/src/check-in/index.d.ts +7 -0
- package/dist/src/check-in/permissions.d.ts +6 -0
- package/dist/src/check-in/router.d.ts +619 -0
- package/dist/src/check-in/schema.d.ts +168 -0
- package/dist/src/check-in/service.d.ts +99 -0
- package/dist/src/cors/index.d.ts +30 -0
- package/dist/src/cron/index.d.ts +76 -0
- package/dist/src/db/columns.helpers.d.ts +13 -0
- package/dist/src/db/enums.d.ts +1 -0
- package/dist/src/db/index.d.ts +4 -0
- package/dist/src/db/schemas.d.ts +24 -0
- package/dist/src/db/transaction.d.ts +3 -0
- package/dist/src/db/typebox.d.ts +19 -0
- package/dist/src/deposit/admin.router.d.ts +633 -0
- package/dist/src/deposit/db.schemas.d.ts +550 -0
- package/dist/src/deposit/dto.schemas.d.ts +707 -0
- package/dist/src/deposit/errors/index.d.ts +33 -0
- package/dist/src/deposit/errors/locales/zh.d.ts +18 -0
- package/dist/src/deposit/index.d.ts +7 -0
- package/dist/src/deposit/permissions.d.ts +9 -0
- package/dist/src/deposit/router.d.ts +621 -0
- package/dist/src/deposit/schema.d.ts +287 -0
- package/dist/src/deposit/service.d.ts +278 -0
- package/dist/src/dynamic-env/admin.router.d.ts +637 -0
- package/dist/src/dynamic-env/cache.d.ts +35 -0
- package/dist/src/dynamic-env/db.schemas.d.ts +182 -0
- package/dist/src/dynamic-env/dto.schema.d.ts +17 -0
- package/dist/src/dynamic-env/index.d.ts +3 -0
- package/dist/src/dynamic-env/schema.d.ts +96 -0
- package/dist/src/dynamic-env/service.d.ts +93 -0
- package/dist/src/eden/index.d.ts +57 -0
- package/dist/src/email/index.d.ts +2 -0
- package/dist/src/env/client.d.ts +2 -0
- package/dist/src/env/index.d.ts +2 -0
- package/dist/src/env/server.d.ts +50 -0
- package/dist/src/env/typebox-env.d.ts +7 -0
- package/dist/src/error/errorcode.d.ts +9 -0
- package/dist/src/error/index.d.ts +120 -0
- package/dist/src/error/locales/zh.d.ts +2 -0
- package/dist/src/error/messages.d.ts +10 -0
- package/dist/src/external/dto.schemas.d.ts +173 -0
- package/dist/src/external/errors/index.d.ts +13 -0
- package/dist/src/external/errors/locales/zh.d.ts +10 -0
- package/dist/src/external/index.d.ts +4 -0
- package/dist/src/external/router.d.ts +105 -0
- package/dist/src/external/service.d.ts +31 -0
- package/dist/src/file-storage/admin.router.d.ts +601 -0
- package/dist/src/file-storage/db.schemas.d.ts +1026 -0
- package/dist/src/file-storage/dto.schemas.d.ts +1238 -0
- package/dist/src/file-storage/errors/index.d.ts +19 -0
- package/dist/src/file-storage/errors/locales/zh.d.ts +18 -0
- package/dist/src/file-storage/index.d.ts +6 -0
- package/dist/src/file-storage/permissions.d.ts +5 -0
- package/dist/src/file-storage/router.d.ts +588 -0
- package/dist/src/file-storage/s3.client.d.ts +284 -0
- package/dist/src/file-storage/schema.d.ts +538 -0
- package/dist/src/file-storage/service.d.ts +264 -0
- package/dist/src/file-storage/share.router.d.ts +564 -0
- package/dist/src/index.d.ts +8664 -0
- package/dist/src/ledger/admin.router.d.ts +524 -0
- package/dist/src/ledger/db.schemas.d.ts +486 -0
- package/dist/src/ledger/dto.schemas.d.ts +160 -0
- package/dist/src/ledger/errors/index.d.ts +22 -0
- package/dist/src/ledger/errors/locales/zh.d.ts +14 -0
- package/dist/src/ledger/index.d.ts +6 -0
- package/dist/src/ledger/permissions.d.ts +8 -0
- package/dist/src/ledger/router.d.ts +486 -0
- package/dist/src/ledger/schema.d.ts +259 -0
- package/dist/src/ledger/service.d.ts +208 -0
- package/dist/src/nanoid/index.d.ts +2 -0
- package/dist/src/news/admin.router.d.ts +824 -0
- package/dist/src/news/db.schemas.d.ts +1150 -0
- package/dist/src/news/dto.schemas.d.ts +233 -0
- package/dist/src/news/errors/index.d.ts +20 -0
- package/dist/src/news/errors/locales/zh.d.ts +13 -0
- package/dist/src/news/index.d.ts +6 -0
- package/dist/src/news/permissions.d.ts +4 -0
- package/dist/src/news/router.d.ts +620 -0
- package/dist/src/news/schema.d.ts +616 -0
- package/dist/src/news/service.d.ts +495 -0
- package/dist/src/news-category/admin.router.d.ts +207 -0
- package/dist/src/news-category/constants.d.ts +1 -0
- package/dist/src/news-category/db.schemas.d.ts +324 -0
- package/dist/src/news-category/dto.schemas.d.ts +57 -0
- package/dist/src/news-category/errors/index.d.ts +19 -0
- package/dist/src/news-category/errors/locales/zh.d.ts +13 -0
- package/dist/src/news-category/index.d.ts +7 -0
- package/dist/src/news-category/permissions.d.ts +4 -0
- package/dist/src/news-category/router.d.ts +460 -0
- package/dist/src/news-category/schema.d.ts +173 -0
- package/dist/src/news-category/seed.d.ts +12 -0
- package/dist/src/news-category/service.d.ts +105 -0
- package/dist/src/notification/admin.router.d.ts +582 -0
- package/dist/src/notification/db.schemas.d.ts +624 -0
- package/dist/src/notification/dto.schemas.d.ts +457 -0
- package/dist/src/notification/errors/index.d.ts +19 -0
- package/dist/src/notification/errors/locales/zh.d.ts +13 -0
- package/dist/src/notification/index.d.ts +7 -0
- package/dist/src/notification/permissions.d.ts +6 -0
- package/dist/src/notification/router.d.ts +626 -0
- package/dist/src/notification/schema.d.ts +347 -0
- package/dist/src/notification/service.d.ts +195 -0
- package/dist/src/receipt-method/admin.router.d.ts +579 -0
- package/dist/src/receipt-method/db.schemas.d.ts +380 -0
- package/dist/src/receipt-method/dto.schemas.d.ts +418 -0
- package/dist/src/receipt-method/index.d.ts +7 -0
- package/dist/src/receipt-method/permissions.d.ts +4 -0
- package/dist/src/receipt-method/router.d.ts +602 -0
- package/dist/src/receipt-method/schema.d.ts +205 -0
- package/dist/src/receipt-method/service.d.ts +152 -0
- package/dist/src/referral/admin.router.d.ts +562 -0
- package/dist/src/referral/db.schemas.d.ts +420 -0
- package/dist/src/referral/dto.schemas.d.ts +665 -0
- package/dist/src/referral/errors/index.d.ts +14 -0
- package/dist/src/referral/errors/locales/zh.d.ts +13 -0
- package/dist/src/referral/index.d.ts +6 -0
- package/dist/src/referral/permissions.d.ts +8 -0
- package/dist/src/referral/router.d.ts +579 -0
- package/dist/src/referral/schema.d.ts +235 -0
- package/dist/src/referral/service.d.ts +42 -0
- package/dist/src/referral-depth-config/admin.router.d.ts +646 -0
- package/dist/src/referral-depth-config/db.schemas.d.ts +176 -0
- package/dist/src/referral-depth-config/dto.schemas.d.ts +208 -0
- package/dist/src/referral-depth-config/errors/index.d.ts +11 -0
- package/dist/src/referral-depth-config/errors/locales/zh.d.ts +10 -0
- package/dist/src/referral-depth-config/index.d.ts +5 -0
- package/dist/src/referral-depth-config/permissions.d.ts +8 -0
- package/dist/src/referral-depth-config/schema.d.ts +99 -0
- package/dist/src/referral-depth-config/service.d.ts +56 -0
- package/dist/src/server-test/errors/index.d.ts +10 -0
- package/dist/src/server-test/errors/locales/zh.d.ts +9 -0
- package/dist/src/server-test/index.d.ts +486 -0
- package/dist/src/shipping-address/admin.router.d.ts +507 -0
- package/dist/src/shipping-address/db.schemas.d.ts +278 -0
- package/dist/src/shipping-address/dto.schemas.d.ts +303 -0
- package/dist/src/shipping-address/index.d.ts +7 -0
- package/dist/src/shipping-address/permissions.d.ts +4 -0
- package/dist/src/shipping-address/router.d.ts +621 -0
- package/dist/src/shipping-address/schema.d.ts +150 -0
- package/dist/src/shipping-address/service.d.ts +109 -0
- package/dist/src/sms/index.d.ts +5 -0
- package/dist/src/subscription/admin.router.d.ts +818 -0
- package/dist/src/subscription/cron.d.ts +53 -0
- package/dist/src/subscription/db.schemas.d.ts +896 -0
- package/dist/src/subscription/dto.schemas.d.ts +1942 -0
- package/dist/src/subscription/errors/index.d.ts +21 -0
- package/dist/src/subscription/errors/locales/zh.d.ts +20 -0
- package/dist/src/subscription/index.d.ts +7 -0
- package/dist/src/subscription/permissions.d.ts +5 -0
- package/dist/src/subscription/router.d.ts +625 -0
- package/dist/src/subscription/schema.d.ts +475 -0
- package/dist/src/subscription/service.d.ts +306 -0
- package/dist/src/team/admin.router.d.ts +569 -0
- package/dist/src/team/dto.schemas.d.ts +2110 -0
- package/dist/src/team/errors/index.d.ts +12 -0
- package/dist/src/team/errors/locales/zh.d.ts +11 -0
- package/dist/src/team/index.d.ts +5 -0
- package/dist/src/team/permissions.d.ts +7 -0
- package/dist/src/team/router.d.ts +737 -0
- package/dist/src/team/service.d.ts +40 -0
- package/dist/src/transfer/admin.router.d.ts +595 -0
- package/dist/src/transfer/db.schemas.d.ts +318 -0
- package/dist/src/transfer/dto.schemas.d.ts +4209 -0
- package/dist/src/transfer/errors/index.d.ts +32 -0
- package/dist/src/transfer/errors/locales/zh.d.ts +19 -0
- package/dist/src/transfer/index.d.ts +8 -0
- package/dist/src/transfer/permissions.d.ts +8 -0
- package/dist/src/transfer/router.d.ts +597 -0
- package/dist/src/transfer/schema.d.ts +169 -0
- package/dist/src/transfer/service.d.ts +232 -0
- package/dist/src/user/admin.router.d.ts +827 -0
- package/dist/src/user/db.schemas.d.ts +1038 -0
- package/dist/src/user/dto.schemas.d.ts +1446 -0
- package/dist/src/user/errors/index.d.ts +38 -0
- package/dist/src/user/errors/locales/zh.d.ts +22 -0
- package/dist/src/user/index.d.ts +7 -0
- package/dist/src/user/permissions.d.ts +7 -0
- package/dist/src/user/router.d.ts +560 -0
- package/dist/src/user/schema.d.ts +541 -0
- package/dist/src/user/service.d.ts +294 -0
- package/dist/src/user-kyc/admin.router.d.ts +669 -0
- package/dist/src/user-kyc/db.schemas.d.ts +896 -0
- package/dist/src/user-kyc/dto.schemas.d.ts +939 -0
- package/dist/src/user-kyc/errors/index.d.ts +21 -0
- package/dist/src/user-kyc/errors/locales/zh.d.ts +14 -0
- package/dist/src/user-kyc/index.d.ts +8 -0
- package/dist/src/user-kyc/permissions.d.ts +6 -0
- package/dist/src/user-kyc/router.d.ts +602 -0
- package/dist/src/user-kyc/schema.d.ts +474 -0
- package/dist/src/user-kyc/service.d.ts +170 -0
- package/dist/src/user-security/admin.router.d.ts +493 -0
- package/dist/src/user-security/db.schemas.d.ts +414 -0
- package/dist/src/user-security/dto.schemas.d.ts +36 -0
- package/dist/src/user-security/index.d.ts +6 -0
- package/dist/src/user-security/router.d.ts +547 -0
- package/dist/src/user-security/schema.d.ts +215 -0
- package/dist/src/user-security/service.d.ts +51 -0
- package/dist/src/utils/date.d.ts +21 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/order.d.ts +6 -0
- package/dist/src/utils/pagination.d.ts +113 -0
- package/dist/src/utils/password.d.ts +8 -0
- package/dist/src/wallet/admin.router.d.ts +616 -0
- package/dist/src/wallet/db.schemas.d.ts +278 -0
- package/dist/src/wallet/dto.schemas.d.ts +1690 -0
- package/dist/src/wallet/ensure.d.ts +11 -0
- package/dist/src/wallet/index.d.ts +6 -0
- package/dist/src/wallet/router.d.ts +654 -0
- package/dist/src/wallet/schema.d.ts +152 -0
- package/dist/src/wallet/service.d.ts +225 -0
- package/dist/src/wallet-import/admin.router.d.ts +690 -0
- package/dist/src/wallet-import/db.schemas.d.ts +1070 -0
- package/dist/src/wallet-import/dto.schemas.d.ts +1119 -0
- package/dist/src/wallet-import/errors/index.d.ts +17 -0
- package/dist/src/wallet-import/errors/locales/zh.d.ts +16 -0
- package/dist/src/wallet-import/index.d.ts +8 -0
- package/dist/src/wallet-import/permissions.d.ts +7 -0
- package/dist/src/wallet-import/schema.d.ts +566 -0
- package/dist/src/wallet-import/service.d.ts +101 -0
- package/dist/src/wallet-import/worker.d.ts +1 -0
- package/dist/src/wallet-transfer/dto.schemas.d.ts +64 -0
- package/dist/src/wallet-transfer/errors/index.d.ts +25 -0
- package/dist/src/wallet-transfer/errors/locales/zh.d.ts +16 -0
- package/dist/src/wallet-transfer/index.d.ts +4 -0
- package/dist/src/wallet-transfer/router.d.ts +465 -0
- package/dist/src/wallet-transfer/service.d.ts +26 -0
- package/dist/src/wallet-type/admin.router.d.ts +767 -0
- package/dist/src/wallet-type/constants.d.ts +4 -0
- package/dist/src/wallet-type/db.schemas.d.ts +794 -0
- package/dist/src/wallet-type/dto.schemas.d.ts +160 -0
- package/dist/src/wallet-type/errors/index.d.ts +25 -0
- package/dist/src/wallet-type/errors/locales/zh.d.ts +16 -0
- package/dist/src/wallet-type/index.d.ts +7 -0
- package/dist/src/wallet-type/permissions.d.ts +5 -0
- package/dist/src/wallet-type/schema.d.ts +408 -0
- package/dist/src/wallet-type/seed.d.ts +4 -0
- package/dist/src/wallet-type/service.d.ts +208 -0
- package/dist/src/withdraw/admin.router.d.ts +654 -0
- package/dist/src/withdraw/db.schemas.d.ts +516 -0
- package/dist/src/withdraw/dto.schemas.d.ts +816 -0
- package/dist/src/withdraw/errors/index.d.ts +41 -0
- package/dist/src/withdraw/errors/locales/zh.d.ts +22 -0
- package/dist/src/withdraw/index.d.ts +7 -0
- package/dist/src/withdraw/permissions.d.ts +9 -0
- package/dist/src/withdraw/router.d.ts +522 -0
- package/dist/src/withdraw/schema.d.ts +272 -0
- package/dist/src/withdraw/service.d.ts +143 -0
- package/package.json +19 -0
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通知查询响应(组合 notification + inbox 数据)
|
|
3
|
+
*/
|
|
4
|
+
export declare const notificationResponseSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
+
createdAt: import("@sinclair/typebox").TDate;
|
|
6
|
+
updatedAt: import("@sinclair/typebox").TDate;
|
|
7
|
+
id: import("@sinclair/typebox").TString;
|
|
8
|
+
userId: import("@sinclair/typebox").TString;
|
|
9
|
+
status: import("@sinclair/typebox").TEnum<{
|
|
10
|
+
archived: "archived";
|
|
11
|
+
unread: "unread";
|
|
12
|
+
read: "read";
|
|
13
|
+
deleted: "deleted";
|
|
14
|
+
}>;
|
|
15
|
+
archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
16
|
+
readAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
17
|
+
notificationId: import("@sinclair/typebox").TString;
|
|
18
|
+
notification: import("drizzle-typebox").BuildSchema<"select", {
|
|
19
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
20
|
+
name: "created_at";
|
|
21
|
+
tableName: "notification";
|
|
22
|
+
dataType: "date";
|
|
23
|
+
columnType: "PgTimestamp";
|
|
24
|
+
data: Date;
|
|
25
|
+
driverParam: string;
|
|
26
|
+
notNull: true;
|
|
27
|
+
hasDefault: true;
|
|
28
|
+
isPrimaryKey: false;
|
|
29
|
+
isAutoincrement: false;
|
|
30
|
+
hasRuntimeDefault: false;
|
|
31
|
+
enumValues: undefined;
|
|
32
|
+
baseColumn: never;
|
|
33
|
+
identity: undefined;
|
|
34
|
+
generated: undefined;
|
|
35
|
+
}, {}, {}>;
|
|
36
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
37
|
+
name: "updated_at";
|
|
38
|
+
tableName: "notification";
|
|
39
|
+
dataType: "date";
|
|
40
|
+
columnType: "PgTimestamp";
|
|
41
|
+
data: Date;
|
|
42
|
+
driverParam: string;
|
|
43
|
+
notNull: true;
|
|
44
|
+
hasDefault: true;
|
|
45
|
+
isPrimaryKey: false;
|
|
46
|
+
isAutoincrement: false;
|
|
47
|
+
hasRuntimeDefault: false;
|
|
48
|
+
enumValues: undefined;
|
|
49
|
+
baseColumn: never;
|
|
50
|
+
identity: undefined;
|
|
51
|
+
generated: undefined;
|
|
52
|
+
}, {}, {}>;
|
|
53
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
54
|
+
name: "id";
|
|
55
|
+
tableName: "notification";
|
|
56
|
+
dataType: "string";
|
|
57
|
+
columnType: "PgUUID";
|
|
58
|
+
data: string;
|
|
59
|
+
driverParam: string;
|
|
60
|
+
notNull: true;
|
|
61
|
+
hasDefault: true;
|
|
62
|
+
isPrimaryKey: true;
|
|
63
|
+
isAutoincrement: false;
|
|
64
|
+
hasRuntimeDefault: false;
|
|
65
|
+
enumValues: undefined;
|
|
66
|
+
baseColumn: never;
|
|
67
|
+
identity: undefined;
|
|
68
|
+
generated: undefined;
|
|
69
|
+
}, {}, {}>;
|
|
70
|
+
type: import("drizzle-orm/pg-core").PgColumn<{
|
|
71
|
+
name: "type";
|
|
72
|
+
tableName: "notification";
|
|
73
|
+
dataType: "string";
|
|
74
|
+
columnType: "PgEnumColumn";
|
|
75
|
+
data: "system" | "transaction" | "activity" | "security";
|
|
76
|
+
driverParam: string;
|
|
77
|
+
notNull: true;
|
|
78
|
+
hasDefault: false;
|
|
79
|
+
isPrimaryKey: false;
|
|
80
|
+
isAutoincrement: false;
|
|
81
|
+
hasRuntimeDefault: false;
|
|
82
|
+
enumValues: ["system", "transaction", "activity", "security"];
|
|
83
|
+
baseColumn: never;
|
|
84
|
+
identity: undefined;
|
|
85
|
+
generated: undefined;
|
|
86
|
+
}, {}, {}>;
|
|
87
|
+
category: import("drizzle-orm/pg-core").PgColumn<{
|
|
88
|
+
name: "category";
|
|
89
|
+
tableName: "notification";
|
|
90
|
+
dataType: "string";
|
|
91
|
+
columnType: "PgText";
|
|
92
|
+
data: string;
|
|
93
|
+
driverParam: string;
|
|
94
|
+
notNull: true;
|
|
95
|
+
hasDefault: false;
|
|
96
|
+
isPrimaryKey: false;
|
|
97
|
+
isAutoincrement: false;
|
|
98
|
+
hasRuntimeDefault: false;
|
|
99
|
+
enumValues: [string, ...string[]];
|
|
100
|
+
baseColumn: never;
|
|
101
|
+
identity: undefined;
|
|
102
|
+
generated: undefined;
|
|
103
|
+
}, {}, {}>;
|
|
104
|
+
title: import("drizzle-orm/pg-core").PgColumn<{
|
|
105
|
+
name: "title";
|
|
106
|
+
tableName: "notification";
|
|
107
|
+
dataType: "string";
|
|
108
|
+
columnType: "PgText";
|
|
109
|
+
data: string;
|
|
110
|
+
driverParam: string;
|
|
111
|
+
notNull: true;
|
|
112
|
+
hasDefault: false;
|
|
113
|
+
isPrimaryKey: false;
|
|
114
|
+
isAutoincrement: false;
|
|
115
|
+
hasRuntimeDefault: false;
|
|
116
|
+
enumValues: [string, ...string[]];
|
|
117
|
+
baseColumn: never;
|
|
118
|
+
identity: undefined;
|
|
119
|
+
generated: undefined;
|
|
120
|
+
}, {}, {}>;
|
|
121
|
+
content: import("drizzle-orm/pg-core").PgColumn<{
|
|
122
|
+
name: "content";
|
|
123
|
+
tableName: "notification";
|
|
124
|
+
dataType: "string";
|
|
125
|
+
columnType: "PgText";
|
|
126
|
+
data: string;
|
|
127
|
+
driverParam: string;
|
|
128
|
+
notNull: true;
|
|
129
|
+
hasDefault: false;
|
|
130
|
+
isPrimaryKey: false;
|
|
131
|
+
isAutoincrement: false;
|
|
132
|
+
hasRuntimeDefault: false;
|
|
133
|
+
enumValues: [string, ...string[]];
|
|
134
|
+
baseColumn: never;
|
|
135
|
+
identity: undefined;
|
|
136
|
+
generated: undefined;
|
|
137
|
+
}, {}, {}>;
|
|
138
|
+
priority: import("drizzle-orm/pg-core").PgColumn<{
|
|
139
|
+
name: "priority";
|
|
140
|
+
tableName: "notification";
|
|
141
|
+
dataType: "string";
|
|
142
|
+
columnType: "PgEnumColumn";
|
|
143
|
+
data: "normal" | "low" | "high" | "urgent";
|
|
144
|
+
driverParam: string;
|
|
145
|
+
notNull: true;
|
|
146
|
+
hasDefault: true;
|
|
147
|
+
isPrimaryKey: false;
|
|
148
|
+
isAutoincrement: false;
|
|
149
|
+
hasRuntimeDefault: false;
|
|
150
|
+
enumValues: ["low", "normal", "high", "urgent"];
|
|
151
|
+
baseColumn: never;
|
|
152
|
+
identity: undefined;
|
|
153
|
+
generated: undefined;
|
|
154
|
+
}, {}, {}>;
|
|
155
|
+
isBroadcast: import("drizzle-orm/pg-core").PgColumn<{
|
|
156
|
+
name: "is_broadcast";
|
|
157
|
+
tableName: "notification";
|
|
158
|
+
dataType: "boolean";
|
|
159
|
+
columnType: "PgBoolean";
|
|
160
|
+
data: boolean;
|
|
161
|
+
driverParam: boolean;
|
|
162
|
+
notNull: true;
|
|
163
|
+
hasDefault: true;
|
|
164
|
+
isPrimaryKey: false;
|
|
165
|
+
isAutoincrement: false;
|
|
166
|
+
hasRuntimeDefault: false;
|
|
167
|
+
enumValues: undefined;
|
|
168
|
+
baseColumn: never;
|
|
169
|
+
identity: undefined;
|
|
170
|
+
generated: undefined;
|
|
171
|
+
}, {}, {}>;
|
|
172
|
+
expiresAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
173
|
+
name: "expires_at";
|
|
174
|
+
tableName: "notification";
|
|
175
|
+
dataType: "date";
|
|
176
|
+
columnType: "PgTimestamp";
|
|
177
|
+
data: Date;
|
|
178
|
+
driverParam: string;
|
|
179
|
+
notNull: false;
|
|
180
|
+
hasDefault: false;
|
|
181
|
+
isPrimaryKey: false;
|
|
182
|
+
isAutoincrement: false;
|
|
183
|
+
hasRuntimeDefault: false;
|
|
184
|
+
enumValues: undefined;
|
|
185
|
+
baseColumn: never;
|
|
186
|
+
identity: undefined;
|
|
187
|
+
generated: undefined;
|
|
188
|
+
}, {}, {}>;
|
|
189
|
+
}, undefined>;
|
|
190
|
+
}>;
|
|
191
|
+
export type NotificationResponseType = typeof notificationResponseSchema.static;
|
|
192
|
+
/** 通知列表响应(带分页) */
|
|
193
|
+
export declare const notificationListResponseSchema: import("@sinclair/typebox").TObject<{
|
|
194
|
+
data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
195
|
+
createdAt: import("@sinclair/typebox").TDate;
|
|
196
|
+
updatedAt: import("@sinclair/typebox").TDate;
|
|
197
|
+
id: import("@sinclair/typebox").TString;
|
|
198
|
+
userId: import("@sinclair/typebox").TString;
|
|
199
|
+
status: import("@sinclair/typebox").TEnum<{
|
|
200
|
+
archived: "archived";
|
|
201
|
+
unread: "unread";
|
|
202
|
+
read: "read";
|
|
203
|
+
deleted: "deleted";
|
|
204
|
+
}>;
|
|
205
|
+
archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
206
|
+
readAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
207
|
+
notificationId: import("@sinclair/typebox").TString;
|
|
208
|
+
notification: import("drizzle-typebox").BuildSchema<"select", {
|
|
209
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
210
|
+
name: "created_at";
|
|
211
|
+
tableName: "notification";
|
|
212
|
+
dataType: "date";
|
|
213
|
+
columnType: "PgTimestamp";
|
|
214
|
+
data: Date;
|
|
215
|
+
driverParam: string;
|
|
216
|
+
notNull: true;
|
|
217
|
+
hasDefault: true;
|
|
218
|
+
isPrimaryKey: false;
|
|
219
|
+
isAutoincrement: false;
|
|
220
|
+
hasRuntimeDefault: false;
|
|
221
|
+
enumValues: undefined;
|
|
222
|
+
baseColumn: never;
|
|
223
|
+
identity: undefined;
|
|
224
|
+
generated: undefined;
|
|
225
|
+
}, {}, {}>;
|
|
226
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
227
|
+
name: "updated_at";
|
|
228
|
+
tableName: "notification";
|
|
229
|
+
dataType: "date";
|
|
230
|
+
columnType: "PgTimestamp";
|
|
231
|
+
data: Date;
|
|
232
|
+
driverParam: string;
|
|
233
|
+
notNull: true;
|
|
234
|
+
hasDefault: true;
|
|
235
|
+
isPrimaryKey: false;
|
|
236
|
+
isAutoincrement: false;
|
|
237
|
+
hasRuntimeDefault: false;
|
|
238
|
+
enumValues: undefined;
|
|
239
|
+
baseColumn: never;
|
|
240
|
+
identity: undefined;
|
|
241
|
+
generated: undefined;
|
|
242
|
+
}, {}, {}>;
|
|
243
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
244
|
+
name: "id";
|
|
245
|
+
tableName: "notification";
|
|
246
|
+
dataType: "string";
|
|
247
|
+
columnType: "PgUUID";
|
|
248
|
+
data: string;
|
|
249
|
+
driverParam: string;
|
|
250
|
+
notNull: true;
|
|
251
|
+
hasDefault: true;
|
|
252
|
+
isPrimaryKey: true;
|
|
253
|
+
isAutoincrement: false;
|
|
254
|
+
hasRuntimeDefault: false;
|
|
255
|
+
enumValues: undefined;
|
|
256
|
+
baseColumn: never;
|
|
257
|
+
identity: undefined;
|
|
258
|
+
generated: undefined;
|
|
259
|
+
}, {}, {}>;
|
|
260
|
+
type: import("drizzle-orm/pg-core").PgColumn<{
|
|
261
|
+
name: "type";
|
|
262
|
+
tableName: "notification";
|
|
263
|
+
dataType: "string";
|
|
264
|
+
columnType: "PgEnumColumn";
|
|
265
|
+
data: "system" | "transaction" | "activity" | "security";
|
|
266
|
+
driverParam: string;
|
|
267
|
+
notNull: true;
|
|
268
|
+
hasDefault: false;
|
|
269
|
+
isPrimaryKey: false;
|
|
270
|
+
isAutoincrement: false;
|
|
271
|
+
hasRuntimeDefault: false;
|
|
272
|
+
enumValues: ["system", "transaction", "activity", "security"];
|
|
273
|
+
baseColumn: never;
|
|
274
|
+
identity: undefined;
|
|
275
|
+
generated: undefined;
|
|
276
|
+
}, {}, {}>;
|
|
277
|
+
category: import("drizzle-orm/pg-core").PgColumn<{
|
|
278
|
+
name: "category";
|
|
279
|
+
tableName: "notification";
|
|
280
|
+
dataType: "string";
|
|
281
|
+
columnType: "PgText";
|
|
282
|
+
data: string;
|
|
283
|
+
driverParam: string;
|
|
284
|
+
notNull: true;
|
|
285
|
+
hasDefault: false;
|
|
286
|
+
isPrimaryKey: false;
|
|
287
|
+
isAutoincrement: false;
|
|
288
|
+
hasRuntimeDefault: false;
|
|
289
|
+
enumValues: [string, ...string[]];
|
|
290
|
+
baseColumn: never;
|
|
291
|
+
identity: undefined;
|
|
292
|
+
generated: undefined;
|
|
293
|
+
}, {}, {}>;
|
|
294
|
+
title: import("drizzle-orm/pg-core").PgColumn<{
|
|
295
|
+
name: "title";
|
|
296
|
+
tableName: "notification";
|
|
297
|
+
dataType: "string";
|
|
298
|
+
columnType: "PgText";
|
|
299
|
+
data: string;
|
|
300
|
+
driverParam: string;
|
|
301
|
+
notNull: true;
|
|
302
|
+
hasDefault: false;
|
|
303
|
+
isPrimaryKey: false;
|
|
304
|
+
isAutoincrement: false;
|
|
305
|
+
hasRuntimeDefault: false;
|
|
306
|
+
enumValues: [string, ...string[]];
|
|
307
|
+
baseColumn: never;
|
|
308
|
+
identity: undefined;
|
|
309
|
+
generated: undefined;
|
|
310
|
+
}, {}, {}>;
|
|
311
|
+
content: import("drizzle-orm/pg-core").PgColumn<{
|
|
312
|
+
name: "content";
|
|
313
|
+
tableName: "notification";
|
|
314
|
+
dataType: "string";
|
|
315
|
+
columnType: "PgText";
|
|
316
|
+
data: string;
|
|
317
|
+
driverParam: string;
|
|
318
|
+
notNull: true;
|
|
319
|
+
hasDefault: false;
|
|
320
|
+
isPrimaryKey: false;
|
|
321
|
+
isAutoincrement: false;
|
|
322
|
+
hasRuntimeDefault: false;
|
|
323
|
+
enumValues: [string, ...string[]];
|
|
324
|
+
baseColumn: never;
|
|
325
|
+
identity: undefined;
|
|
326
|
+
generated: undefined;
|
|
327
|
+
}, {}, {}>;
|
|
328
|
+
priority: import("drizzle-orm/pg-core").PgColumn<{
|
|
329
|
+
name: "priority";
|
|
330
|
+
tableName: "notification";
|
|
331
|
+
dataType: "string";
|
|
332
|
+
columnType: "PgEnumColumn";
|
|
333
|
+
data: "normal" | "low" | "high" | "urgent";
|
|
334
|
+
driverParam: string;
|
|
335
|
+
notNull: true;
|
|
336
|
+
hasDefault: true;
|
|
337
|
+
isPrimaryKey: false;
|
|
338
|
+
isAutoincrement: false;
|
|
339
|
+
hasRuntimeDefault: false;
|
|
340
|
+
enumValues: ["low", "normal", "high", "urgent"];
|
|
341
|
+
baseColumn: never;
|
|
342
|
+
identity: undefined;
|
|
343
|
+
generated: undefined;
|
|
344
|
+
}, {}, {}>;
|
|
345
|
+
isBroadcast: import("drizzle-orm/pg-core").PgColumn<{
|
|
346
|
+
name: "is_broadcast";
|
|
347
|
+
tableName: "notification";
|
|
348
|
+
dataType: "boolean";
|
|
349
|
+
columnType: "PgBoolean";
|
|
350
|
+
data: boolean;
|
|
351
|
+
driverParam: boolean;
|
|
352
|
+
notNull: true;
|
|
353
|
+
hasDefault: true;
|
|
354
|
+
isPrimaryKey: false;
|
|
355
|
+
isAutoincrement: false;
|
|
356
|
+
hasRuntimeDefault: false;
|
|
357
|
+
enumValues: undefined;
|
|
358
|
+
baseColumn: never;
|
|
359
|
+
identity: undefined;
|
|
360
|
+
generated: undefined;
|
|
361
|
+
}, {}, {}>;
|
|
362
|
+
expiresAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
363
|
+
name: "expires_at";
|
|
364
|
+
tableName: "notification";
|
|
365
|
+
dataType: "date";
|
|
366
|
+
columnType: "PgTimestamp";
|
|
367
|
+
data: Date;
|
|
368
|
+
driverParam: string;
|
|
369
|
+
notNull: false;
|
|
370
|
+
hasDefault: false;
|
|
371
|
+
isPrimaryKey: false;
|
|
372
|
+
isAutoincrement: false;
|
|
373
|
+
hasRuntimeDefault: false;
|
|
374
|
+
enumValues: undefined;
|
|
375
|
+
baseColumn: never;
|
|
376
|
+
identity: undefined;
|
|
377
|
+
generated: undefined;
|
|
378
|
+
}, {}, {}>;
|
|
379
|
+
}, undefined>;
|
|
380
|
+
}>>;
|
|
381
|
+
pagination: import("@sinclair/typebox").TObject<{
|
|
382
|
+
pageSize: import("@sinclair/typebox").TNumber;
|
|
383
|
+
pageIndex: import("@sinclair/typebox").TNumber;
|
|
384
|
+
total: import("@sinclair/typebox").TNumber;
|
|
385
|
+
totalPages: import("@sinclair/typebox").TNumber;
|
|
386
|
+
hasNextPage: import("@sinclair/typebox").TBoolean;
|
|
387
|
+
}>;
|
|
388
|
+
}>;
|
|
389
|
+
/**
|
|
390
|
+
* 创建通知请求(管理员用)
|
|
391
|
+
*/
|
|
392
|
+
export declare const notificationCreateSchema: import("@sinclair/typebox").TObject<{
|
|
393
|
+
expiresAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>>;
|
|
394
|
+
title: import("@sinclair/typebox").TString;
|
|
395
|
+
content: import("@sinclair/typebox").TString;
|
|
396
|
+
category: import("@sinclair/typebox").TString;
|
|
397
|
+
type: import("@sinclair/typebox").TEnum<{
|
|
398
|
+
system: "system";
|
|
399
|
+
transaction: "transaction";
|
|
400
|
+
activity: "activity";
|
|
401
|
+
security: "security";
|
|
402
|
+
}>;
|
|
403
|
+
priority: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
404
|
+
normal: "normal";
|
|
405
|
+
low: "low";
|
|
406
|
+
high: "high";
|
|
407
|
+
urgent: "urgent";
|
|
408
|
+
}>>;
|
|
409
|
+
isBroadcast: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
410
|
+
userIds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
411
|
+
}>;
|
|
412
|
+
export type NotificationCreateInputType = typeof notificationCreateSchema.static;
|
|
413
|
+
/** 列表查询参数 */
|
|
414
|
+
export declare const notificationListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
415
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
416
|
+
archived: "archived";
|
|
417
|
+
unread: "unread";
|
|
418
|
+
read: "read";
|
|
419
|
+
deleted: "deleted";
|
|
420
|
+
}>>;
|
|
421
|
+
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
422
|
+
system: "system";
|
|
423
|
+
transaction: "transaction";
|
|
424
|
+
activity: "activity";
|
|
425
|
+
security: "security";
|
|
426
|
+
}>>;
|
|
427
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
428
|
+
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
429
|
+
pageSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
430
|
+
pageIndex: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
431
|
+
}>;
|
|
432
|
+
export type NotificationListQueryType = typeof notificationListQuerySchema.static;
|
|
433
|
+
/** 未读数量响应 */
|
|
434
|
+
export declare const notificationUnreadCountSchema: import("@sinclair/typebox").TObject<{
|
|
435
|
+
count: import("@sinclair/typebox").TInteger;
|
|
436
|
+
}>;
|
|
437
|
+
export type NotificationUnreadCountResponseType = typeof notificationUnreadCountSchema.static;
|
|
438
|
+
/** 批量已读请求 */
|
|
439
|
+
export declare const notificationBatchReadSchema: import("@sinclair/typebox").TObject<{
|
|
440
|
+
/** 通知 ID 列表(为空则标记所有未读为已读) */
|
|
441
|
+
ids: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
442
|
+
}>;
|
|
443
|
+
export type NotificationBatchReadInputType = typeof notificationBatchReadSchema.static;
|
|
444
|
+
/** 管理员统计响应 */
|
|
445
|
+
export declare const notificationStatsSchema: import("@sinclair/typebox").TObject<{
|
|
446
|
+
/** 总发送量(inbox 记录数) */
|
|
447
|
+
totalSent: import("@sinclair/typebox").TInteger;
|
|
448
|
+
/** 系统广播数 */
|
|
449
|
+
broadcastCount: import("@sinclair/typebox").TInteger;
|
|
450
|
+
/** 个人通知数 */
|
|
451
|
+
personalCount: import("@sinclair/typebox").TInteger;
|
|
452
|
+
/** 总阅读量 */
|
|
453
|
+
totalRead: import("@sinclair/typebox").TInteger;
|
|
454
|
+
/** 阅读率 */
|
|
455
|
+
readRate: import("@sinclair/typebox").TNumber;
|
|
456
|
+
}>;
|
|
457
|
+
export type NotificationStatsResponseType = typeof notificationStatsSchema.static;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./locales/zh";
|
|
2
|
+
export declare const NotificationErrorCodes: {
|
|
3
|
+
/** 通知不存在 */
|
|
4
|
+
readonly NOTIFICATION_NOT_FOUND: "NOTIFICATION_NOT_FOUND";
|
|
5
|
+
/** 无权访问该通知 */
|
|
6
|
+
readonly NOTIFICATION_ACCESS_DENIED: "NOTIFICATION_ACCESS_DENIED";
|
|
7
|
+
/** 通知已读,无需重复操作 */
|
|
8
|
+
readonly NOTIFICATION_ALREADY_READ: "NOTIFICATION_ALREADY_READ";
|
|
9
|
+
/** 用户ID不能为空 */
|
|
10
|
+
readonly NOTIFICATION_USER_ID_REQUIRED: "NOTIFICATION_USER_ID_REQUIRED";
|
|
11
|
+
/** 通知ID不能为空 */
|
|
12
|
+
readonly NOTIFICATION_ID_REQUIRED: "NOTIFICATION_ID_REQUIRED";
|
|
13
|
+
};
|
|
14
|
+
type NotificationErrorCodesType = typeof NotificationErrorCodes;
|
|
15
|
+
export type NotificationErrorCode = keyof NotificationErrorCodesType;
|
|
16
|
+
declare module "../../error/errorcode" {
|
|
17
|
+
interface ErrorCodeRegistry extends NotificationErrorCodesType {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const zh: {
|
|
2
|
+
NOTIFICATION_NOT_FOUND: string;
|
|
3
|
+
NOTIFICATION_ACCESS_DENIED: string;
|
|
4
|
+
NOTIFICATION_ALREADY_READ: string;
|
|
5
|
+
NOTIFICATION_USER_ID_REQUIRED: string;
|
|
6
|
+
NOTIFICATION_ID_REQUIRED: string;
|
|
7
|
+
};
|
|
8
|
+
type ZHType = typeof zh;
|
|
9
|
+
declare module "../../../error/messages" {
|
|
10
|
+
interface ErrorMessageRegistry extends ZHType {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** 通知模块权限(Access Control: 资源 -> 操作列表) */
|
|
2
|
+
export declare const notificationPermissions: {
|
|
3
|
+
readonly "notification:notification": readonly ["read", "update", "list"];
|
|
4
|
+
readonly "notification:admin": readonly ["create", "read", "list", "stats"];
|
|
5
|
+
};
|
|
6
|
+
export type NotificationPermission = keyof typeof notificationPermissions;
|