@windrun-huaiin/backend-core 10.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/LICENSE +21 -0
- package/dist/app/api/stripe/checkout/route.d.ts +19 -0
- package/dist/app/api/stripe/checkout/route.d.ts.map +1 -0
- package/dist/app/api/stripe/checkout/route.js +120 -0
- package/dist/app/api/stripe/checkout/route.mjs +118 -0
- package/dist/app/api/stripe/customer-portal/route.d.ts +11 -0
- package/dist/app/api/stripe/customer-portal/route.d.ts.map +1 -0
- package/dist/app/api/stripe/customer-portal/route.js +73 -0
- package/dist/app/api/stripe/customer-portal/route.mjs +71 -0
- package/dist/app/api/user/anonymous/init/route.d.ts +7 -0
- package/dist/app/api/user/anonymous/init/route.d.ts.map +1 -0
- package/dist/app/api/user/anonymous/init/route.js +210 -0
- package/dist/app/api/user/anonymous/init/route.mjs +208 -0
- package/dist/app/api/webhook/clerk/user/route.d.ts +7 -0
- package/dist/app/api/webhook/clerk/user/route.d.ts.map +1 -0
- package/dist/app/api/webhook/clerk/user/route.js +202 -0
- package/dist/app/api/webhook/clerk/user/route.mjs +200 -0
- package/dist/app/api/webhook/stripe/route.d.ts +8 -0
- package/dist/app/api/webhook/stripe/route.d.ts.map +1 -0
- package/dist/app/api/webhook/stripe/route.js +70 -0
- package/dist/app/api/webhook/stripe/route.mjs +67 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +83 -0
- package/dist/index.mjs +18 -0
- package/dist/lib/auth-utils.d.ts +46 -0
- package/dist/lib/auth-utils.d.ts.map +1 -0
- package/dist/lib/auth-utils.js +107 -0
- package/dist/lib/auth-utils.mjs +102 -0
- package/dist/lib/credit-init.d.ts +8 -0
- package/dist/lib/credit-init.d.ts.map +1 -0
- package/dist/lib/credit-init.js +16 -0
- package/dist/lib/credit-init.mjs +10 -0
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +31 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/money-price-config.d.ts +51 -0
- package/dist/lib/money-price-config.d.ts.map +1 -0
- package/dist/lib/money-price-config.js +156 -0
- package/dist/lib/money-price-config.mjs +151 -0
- package/dist/lib/stripe-config.d.ts +31 -0
- package/dist/lib/stripe-config.d.ts.map +1 -0
- package/dist/lib/stripe-config.js +278 -0
- package/dist/lib/stripe-config.mjs +268 -0
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js +48 -0
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs +45 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js +54 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.mjs +51 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js +44 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.mjs +35 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js +31 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.mjs +18 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js +587 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.mjs +527 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js +447 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.mjs +399 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js +245 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.mjs +232 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js +68 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.mjs +62 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js +39 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.mjs +37 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js +80 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.mjs +75 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js +101 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.mjs +86 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js +102 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.mjs +76 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js +56 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.mjs +52 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js +1205 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.mjs +1157 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js +407 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.mjs +374 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.mjs +7 -0
- package/dist/prisma/client.d.ts +2 -0
- package/dist/prisma/client.d.ts.map +1 -0
- package/dist/prisma/client.js +12 -0
- package/dist/prisma/client.mjs +1 -0
- package/dist/prisma/index.d.ts +4 -0
- package/dist/prisma/index.d.ts.map +1 -0
- package/dist/prisma/index.js +10 -0
- package/dist/prisma/index.mjs +2 -0
- package/dist/prisma/prisma-transaction-util.d.ts +3 -0
- package/dist/prisma/prisma-transaction-util.d.ts.map +1 -0
- package/dist/prisma/prisma-transaction-util.js +29 -0
- package/dist/prisma/prisma-transaction-util.mjs +27 -0
- package/dist/prisma/prisma.d.ts +4 -0
- package/dist/prisma/prisma.d.ts.map +1 -0
- package/dist/prisma/prisma.js +109 -0
- package/dist/prisma/prisma.mjs +106 -0
- package/dist/services/aggregate/billing.aggregate.service.d.ts +83 -0
- package/dist/services/aggregate/billing.aggregate.service.d.ts.map +1 -0
- package/dist/services/aggregate/billing.aggregate.service.js +308 -0
- package/dist/services/aggregate/billing.aggregate.service.mjs +306 -0
- package/dist/services/aggregate/index.d.ts +3 -0
- package/dist/services/aggregate/index.d.ts.map +1 -0
- package/dist/services/aggregate/index.js +9 -0
- package/dist/services/aggregate/index.mjs +2 -0
- package/dist/services/aggregate/user.aggregate.service.d.ts +34 -0
- package/dist/services/aggregate/user.aggregate.service.d.ts.map +1 -0
- package/dist/services/aggregate/user.aggregate.service.js +136 -0
- package/dist/services/aggregate/user.aggregate.service.mjs +133 -0
- package/dist/services/context/index.d.ts +2 -0
- package/dist/services/context/index.d.ts.map +1 -0
- package/dist/services/context/index.js +13 -0
- package/dist/services/context/index.mjs +1 -0
- package/dist/services/context/user-context-service.d.ts +30 -0
- package/dist/services/context/user-context-service.d.ts.map +1 -0
- package/dist/services/context/user-context-service.js +170 -0
- package/dist/services/context/user-context-service.mjs +162 -0
- package/dist/services/database/apilog.service.d.ts +39 -0
- package/dist/services/database/apilog.service.d.ts.map +1 -0
- package/dist/services/database/apilog.service.js +174 -0
- package/dist/services/database/apilog.service.mjs +170 -0
- package/dist/services/database/constants.d.ts +73 -0
- package/dist/services/database/constants.d.ts.map +1 -0
- package/dist/services/database/constants.js +135 -0
- package/dist/services/database/constants.mjs +117 -0
- package/dist/services/database/credit.service.d.ts +107 -0
- package/dist/services/database/credit.service.d.ts.map +1 -0
- package/dist/services/database/credit.service.js +515 -0
- package/dist/services/database/credit.service.mjs +512 -0
- package/dist/services/database/creditAuditLog.service.d.ts +73 -0
- package/dist/services/database/creditAuditLog.service.d.ts.map +1 -0
- package/dist/services/database/creditAuditLog.service.js +305 -0
- package/dist/services/database/creditAuditLog.service.mjs +302 -0
- package/dist/services/database/index.d.ts +10 -0
- package/dist/services/database/index.d.ts.map +1 -0
- package/dist/services/database/index.js +38 -0
- package/dist/services/database/index.mjs +8 -0
- package/dist/services/database/prisma-model-type.d.ts +3 -0
- package/dist/services/database/prisma-model-type.d.ts.map +1 -0
- package/dist/services/database/subscription.service.d.ts +48 -0
- package/dist/services/database/subscription.service.d.ts.map +1 -0
- package/dist/services/database/subscription.service.js +267 -0
- package/dist/services/database/subscription.service.mjs +264 -0
- package/dist/services/database/transaction.service.d.ts +92 -0
- package/dist/services/database/transaction.service.d.ts.map +1 -0
- package/dist/services/database/transaction.service.js +326 -0
- package/dist/services/database/transaction.service.mjs +323 -0
- package/dist/services/database/user.service.d.ts +45 -0
- package/dist/services/database/user.service.d.ts.map +1 -0
- package/dist/services/database/user.service.js +180 -0
- package/dist/services/database/user.service.mjs +177 -0
- package/dist/services/database/userBackup.service.d.ts +45 -0
- package/dist/services/database/userBackup.service.d.ts.map +1 -0
- package/dist/services/database/userBackup.service.js +249 -0
- package/dist/services/database/userBackup.service.mjs +246 -0
- package/dist/services/stripe/index.d.ts +2 -0
- package/dist/services/stripe/index.d.ts.map +1 -0
- package/dist/services/stripe/index.js +7 -0
- package/dist/services/stripe/index.mjs +1 -0
- package/dist/services/stripe/webhook-handler.d.ts +6 -0
- package/dist/services/stripe/webhook-handler.d.ts.map +1 -0
- package/dist/services/stripe/webhook-handler.js +537 -0
- package/dist/services/stripe/webhook-handler.mjs +535 -0
- package/migrations/create.sql +176 -0
- package/migrations/db.init.sql +13 -0
- package/migrations/init-schema.sql +19 -0
- package/migrations/purge.sql +27 -0
- package/migrations/test-check.sql +167 -0
- package/package.json +123 -0
- package/prisma/schema.prisma +191 -0
- package/src/app/api/stripe/checkout/route.ts +145 -0
- package/src/app/api/stripe/customer-portal/route.ts +83 -0
- package/src/app/api/user/anonymous/init/route.ts +284 -0
- package/src/app/api/webhook/clerk/user/route.ts +249 -0
- package/src/app/api/webhook/stripe/route.ts +93 -0
- package/src/index.ts +6 -0
- package/src/lib/auth-utils.ts +101 -0
- package/src/lib/credit-init.ts +9 -0
- package/src/lib/index.ts +4 -0
- package/src/lib/money-price-config.ts +168 -0
- package/src/lib/stripe-config.ts +333 -0
- package/src/prisma/client.ts +2 -0
- package/src/prisma/index.ts +3 -0
- package/src/prisma/prisma-transaction-util.ts +24 -0
- package/src/prisma/prisma.ts +122 -0
- package/src/services/aggregate/billing.aggregate.service.ts +498 -0
- package/src/services/aggregate/index.ts +2 -0
- package/src/services/aggregate/user.aggregate.service.ts +168 -0
- package/src/services/context/index.ts +1 -0
- package/src/services/context/user-context-service.ts +200 -0
- package/src/services/database/apilog.service.ts +185 -0
- package/src/services/database/constants.ts +148 -0
- package/src/services/database/credit.service.ts +747 -0
- package/src/services/database/creditAuditLog.service.ts +402 -0
- package/src/services/database/index.ts +41 -0
- package/src/services/database/prisma-model-type.ts +13 -0
- package/src/services/database/subscription.service.ts +319 -0
- package/src/services/database/transaction.service.ts +447 -0
- package/src/services/database/user.service.ts +218 -0
- package/src/services/database/userBackup.service.ts +290 -0
- package/src/services/stripe/index.ts +1 -0
- package/src/services/stripe/webhook-handler.ts +648 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Prisma } from './prisma-model-type';
|
|
2
|
+
import type { User } from './prisma-model-type';
|
|
3
|
+
export declare class UserService {
|
|
4
|
+
createUser(data: {
|
|
5
|
+
fingerprintId?: string;
|
|
6
|
+
sourceRef?: Prisma.InputJsonValue;
|
|
7
|
+
clerkUserId?: string;
|
|
8
|
+
stripeCusId?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
userName?: string;
|
|
11
|
+
status?: string;
|
|
12
|
+
}, tx?: Prisma.TransactionClient): Promise<User>;
|
|
13
|
+
findByUserId(userId: string, tx?: Prisma.TransactionClient): Promise<User | null>;
|
|
14
|
+
findByEmail(email: string, tx?: Prisma.TransactionClient): Promise<User | null>;
|
|
15
|
+
findListByFingerprintId(fingerprintId: string, tx?: Prisma.TransactionClient): Promise<User[]>;
|
|
16
|
+
findByClerkUserId(clerkUserId: string, tx?: Prisma.TransactionClient): Promise<User | null>;
|
|
17
|
+
updateUser(userId: string, data: Prisma.UserUpdateInput, tx?: Prisma.TransactionClient): Promise<User>;
|
|
18
|
+
updateStripeCustomerId(userId: string, stripeCusId: string | null, tx?: Prisma.TransactionClient): Promise<User>;
|
|
19
|
+
upgradeToRegistered(userId: string, data: {
|
|
20
|
+
email: string;
|
|
21
|
+
clerkUserId: string;
|
|
22
|
+
userName?: string;
|
|
23
|
+
}, tx?: Prisma.TransactionClient): Promise<User>;
|
|
24
|
+
unregister(userId: string, tx?: Prisma.TransactionClient): Promise<User>;
|
|
25
|
+
listUsers(params: {
|
|
26
|
+
skip?: number;
|
|
27
|
+
take?: number;
|
|
28
|
+
status?: string;
|
|
29
|
+
orderBy?: Prisma.UserOrderByWithRelationInput;
|
|
30
|
+
}, tx?: Prisma.TransactionClient): Promise<{
|
|
31
|
+
users: User[];
|
|
32
|
+
total: number;
|
|
33
|
+
}>;
|
|
34
|
+
createBatchAnonymousUsers(fingerprintIds: string[], tx?: Prisma.TransactionClient): Promise<number>;
|
|
35
|
+
exists(userId: string, tx?: Prisma.TransactionClient): Promise<boolean>;
|
|
36
|
+
getUserStats(tx?: Prisma.TransactionClient): Promise<{
|
|
37
|
+
total: number;
|
|
38
|
+
anonymous: number;
|
|
39
|
+
registered: number;
|
|
40
|
+
frozen: number;
|
|
41
|
+
deleted: number;
|
|
42
|
+
}>;
|
|
43
|
+
}
|
|
44
|
+
export declare const userService: UserService;
|
|
45
|
+
//# sourceMappingURL=user.service.d.ts.map
|
|
@@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EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CAYH;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
|
|
4
|
+
var constants = require('./constants.js');
|
|
5
|
+
var prisma = require('../../prisma/prisma.js');
|
|
6
|
+
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8
|
+
class UserService {
|
|
9
|
+
// Create user
|
|
10
|
+
createUser(data, tx) {
|
|
11
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
13
|
+
return yield client.user.create({
|
|
14
|
+
data: {
|
|
15
|
+
fingerprintId: data.fingerprintId,
|
|
16
|
+
sourceRef: data.sourceRef,
|
|
17
|
+
clerkUserId: data.clerkUserId,
|
|
18
|
+
stripeCusId: data.stripeCusId,
|
|
19
|
+
email: data.email,
|
|
20
|
+
userName: data.userName,
|
|
21
|
+
status: data.status || constants.UserStatus.ANONYMOUS,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
// Find user by ID
|
|
27
|
+
findByUserId(userId, tx) {
|
|
28
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
30
|
+
return yield client.user.findUnique({
|
|
31
|
+
where: { userId },
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Find user by email
|
|
36
|
+
findByEmail(email, tx) {
|
|
37
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
39
|
+
return yield client.user.findFirst({
|
|
40
|
+
where: { email },
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
// Find users by Fingerprint ID, fp_id can be used for multi user_ids
|
|
45
|
+
findListByFingerprintId(fingerprintId, tx) {
|
|
46
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
48
|
+
return yield client.user.findMany({
|
|
49
|
+
where: {
|
|
50
|
+
fingerprintId,
|
|
51
|
+
status: {
|
|
52
|
+
not: constants.UserStatus.DELETED
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
orderBy: { createdAt: 'desc' },
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// Find user by Clerk user ID
|
|
60
|
+
findByClerkUserId(clerkUserId, tx) {
|
|
61
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
63
|
+
// DB的部分索引与这里的状态查询相对应,因而可以使用findUnique
|
|
64
|
+
return yield client.user.findUnique({
|
|
65
|
+
where: {
|
|
66
|
+
clerkUserId,
|
|
67
|
+
status: {
|
|
68
|
+
not: constants.UserStatus.DELETED
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// Update user
|
|
75
|
+
updateUser(userId, data, tx) {
|
|
76
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
78
|
+
return yield client.user.update({
|
|
79
|
+
where: { userId },
|
|
80
|
+
data,
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
updateStripeCustomerId(userId, stripeCusId, tx) {
|
|
85
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
87
|
+
return yield client.user.update({
|
|
88
|
+
where: { userId },
|
|
89
|
+
data: { stripeCusId },
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Upgrade anonymous user to registered user
|
|
94
|
+
upgradeToRegistered(userId, data, tx) {
|
|
95
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
97
|
+
return yield client.user.update({
|
|
98
|
+
where: { userId },
|
|
99
|
+
data: {
|
|
100
|
+
email: data.email,
|
|
101
|
+
clerkUserId: data.clerkUserId,
|
|
102
|
+
userName: data.userName || undefined,
|
|
103
|
+
status: constants.UserStatus.REGISTERED,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
unregister(userId, tx) {
|
|
109
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
111
|
+
return yield client.user.update({
|
|
112
|
+
where: { userId },
|
|
113
|
+
data: {
|
|
114
|
+
status: constants.UserStatus.DELETED,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
// Get user list
|
|
120
|
+
listUsers(params, tx) {
|
|
121
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
123
|
+
const { skip = 0, take = 10, status, orderBy = { createdAt: 'desc' } } = params;
|
|
124
|
+
const where = status ? { status } : {};
|
|
125
|
+
const [users, total] = yield Promise.all([
|
|
126
|
+
client.user.findMany({
|
|
127
|
+
where,
|
|
128
|
+
skip,
|
|
129
|
+
take,
|
|
130
|
+
orderBy,
|
|
131
|
+
}),
|
|
132
|
+
client.user.count({ where }),
|
|
133
|
+
]);
|
|
134
|
+
return { users, total };
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
// 批量创建匿名用户
|
|
138
|
+
createBatchAnonymousUsers(fingerprintIds, tx) {
|
|
139
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
141
|
+
const data = fingerprintIds.map((fingerprintId) => ({
|
|
142
|
+
fingerprintId,
|
|
143
|
+
status: constants.UserStatus.ANONYMOUS,
|
|
144
|
+
}));
|
|
145
|
+
const result = yield client.user.createMany({
|
|
146
|
+
data,
|
|
147
|
+
skipDuplicates: true,
|
|
148
|
+
});
|
|
149
|
+
return result.count;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
// Check if user exists
|
|
153
|
+
exists(userId, tx) {
|
|
154
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
156
|
+
const count = yield client.user.count({
|
|
157
|
+
where: { userId },
|
|
158
|
+
});
|
|
159
|
+
return count > 0;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
// Get user statistics
|
|
163
|
+
getUserStats(tx) {
|
|
164
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const client = prisma.checkAndFallbackWithNonTCClient(tx);
|
|
166
|
+
const [total, anonymous, registered, frozen, deleted] = yield Promise.all([
|
|
167
|
+
client.user.count(),
|
|
168
|
+
client.user.count({ where: { status: constants.UserStatus.ANONYMOUS } }),
|
|
169
|
+
client.user.count({ where: { status: constants.UserStatus.REGISTERED } }),
|
|
170
|
+
client.user.count({ where: { status: constants.UserStatus.FROZEN } }),
|
|
171
|
+
client.user.count({ where: { status: constants.UserStatus.DELETED } }),
|
|
172
|
+
]);
|
|
173
|
+
return { total, anonymous, registered, frozen, deleted };
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const userService = new UserService();
|
|
178
|
+
|
|
179
|
+
exports.UserService = UserService;
|
|
180
|
+
exports.userService = userService;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { __awaiter } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
|
|
2
|
+
import { UserStatus } from './constants.mjs';
|
|
3
|
+
import { checkAndFallbackWithNonTCClient } from '../../prisma/prisma.mjs';
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
+
class UserService {
|
|
7
|
+
// Create user
|
|
8
|
+
createUser(data, tx) {
|
|
9
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
11
|
+
return yield client.user.create({
|
|
12
|
+
data: {
|
|
13
|
+
fingerprintId: data.fingerprintId,
|
|
14
|
+
sourceRef: data.sourceRef,
|
|
15
|
+
clerkUserId: data.clerkUserId,
|
|
16
|
+
stripeCusId: data.stripeCusId,
|
|
17
|
+
email: data.email,
|
|
18
|
+
userName: data.userName,
|
|
19
|
+
status: data.status || UserStatus.ANONYMOUS,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// Find user by ID
|
|
25
|
+
findByUserId(userId, tx) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
28
|
+
return yield client.user.findUnique({
|
|
29
|
+
where: { userId },
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// Find user by email
|
|
34
|
+
findByEmail(email, tx) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
37
|
+
return yield client.user.findFirst({
|
|
38
|
+
where: { email },
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
// Find users by Fingerprint ID, fp_id can be used for multi user_ids
|
|
43
|
+
findListByFingerprintId(fingerprintId, tx) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
46
|
+
return yield client.user.findMany({
|
|
47
|
+
where: {
|
|
48
|
+
fingerprintId,
|
|
49
|
+
status: {
|
|
50
|
+
not: UserStatus.DELETED
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
orderBy: { createdAt: 'desc' },
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
// Find user by Clerk user ID
|
|
58
|
+
findByClerkUserId(clerkUserId, tx) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
61
|
+
// DB的部分索引与这里的状态查询相对应,因而可以使用findUnique
|
|
62
|
+
return yield client.user.findUnique({
|
|
63
|
+
where: {
|
|
64
|
+
clerkUserId,
|
|
65
|
+
status: {
|
|
66
|
+
not: UserStatus.DELETED
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
// Update user
|
|
73
|
+
updateUser(userId, data, tx) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
76
|
+
return yield client.user.update({
|
|
77
|
+
where: { userId },
|
|
78
|
+
data,
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
updateStripeCustomerId(userId, stripeCusId, tx) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
85
|
+
return yield client.user.update({
|
|
86
|
+
where: { userId },
|
|
87
|
+
data: { stripeCusId },
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// Upgrade anonymous user to registered user
|
|
92
|
+
upgradeToRegistered(userId, data, tx) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
95
|
+
return yield client.user.update({
|
|
96
|
+
where: { userId },
|
|
97
|
+
data: {
|
|
98
|
+
email: data.email,
|
|
99
|
+
clerkUserId: data.clerkUserId,
|
|
100
|
+
userName: data.userName || undefined,
|
|
101
|
+
status: UserStatus.REGISTERED,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
unregister(userId, tx) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
109
|
+
return yield client.user.update({
|
|
110
|
+
where: { userId },
|
|
111
|
+
data: {
|
|
112
|
+
status: UserStatus.DELETED,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
// Get user list
|
|
118
|
+
listUsers(params, tx) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
121
|
+
const { skip = 0, take = 10, status, orderBy = { createdAt: 'desc' } } = params;
|
|
122
|
+
const where = status ? { status } : {};
|
|
123
|
+
const [users, total] = yield Promise.all([
|
|
124
|
+
client.user.findMany({
|
|
125
|
+
where,
|
|
126
|
+
skip,
|
|
127
|
+
take,
|
|
128
|
+
orderBy,
|
|
129
|
+
}),
|
|
130
|
+
client.user.count({ where }),
|
|
131
|
+
]);
|
|
132
|
+
return { users, total };
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// 批量创建匿名用户
|
|
136
|
+
createBatchAnonymousUsers(fingerprintIds, tx) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
139
|
+
const data = fingerprintIds.map((fingerprintId) => ({
|
|
140
|
+
fingerprintId,
|
|
141
|
+
status: UserStatus.ANONYMOUS,
|
|
142
|
+
}));
|
|
143
|
+
const result = yield client.user.createMany({
|
|
144
|
+
data,
|
|
145
|
+
skipDuplicates: true,
|
|
146
|
+
});
|
|
147
|
+
return result.count;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
// Check if user exists
|
|
151
|
+
exists(userId, tx) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
154
|
+
const count = yield client.user.count({
|
|
155
|
+
where: { userId },
|
|
156
|
+
});
|
|
157
|
+
return count > 0;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
// Get user statistics
|
|
161
|
+
getUserStats(tx) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
const client = checkAndFallbackWithNonTCClient(tx);
|
|
164
|
+
const [total, anonymous, registered, frozen, deleted] = yield Promise.all([
|
|
165
|
+
client.user.count(),
|
|
166
|
+
client.user.count({ where: { status: UserStatus.ANONYMOUS } }),
|
|
167
|
+
client.user.count({ where: { status: UserStatus.REGISTERED } }),
|
|
168
|
+
client.user.count({ where: { status: UserStatus.FROZEN } }),
|
|
169
|
+
client.user.count({ where: { status: UserStatus.DELETED } }),
|
|
170
|
+
]);
|
|
171
|
+
return { total, anonymous, registered, frozen, deleted };
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const userService = new UserService();
|
|
176
|
+
|
|
177
|
+
export { UserService, userService };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Prisma } from './prisma-model-type';
|
|
2
|
+
import type { UserBackup } from './prisma-model-type';
|
|
3
|
+
export declare class UserBackupService {
|
|
4
|
+
createBackup(data: {
|
|
5
|
+
originalUserId: string;
|
|
6
|
+
fingerprintId?: string;
|
|
7
|
+
clerkUserId?: string;
|
|
8
|
+
stripeCusId?: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
userName?: string;
|
|
11
|
+
status?: string;
|
|
12
|
+
backupData?: any;
|
|
13
|
+
}, tx?: Prisma.TransactionClient): Promise<UserBackup>;
|
|
14
|
+
backupUserData(userId: string, tx?: Prisma.TransactionClient): Promise<UserBackup>;
|
|
15
|
+
findByOriginalUserId(originalUserId: string, tx?: Prisma.TransactionClient): Promise<UserBackup[]>;
|
|
16
|
+
findByEmail(email: string, tx?: Prisma.TransactionClient): Promise<UserBackup[]>;
|
|
17
|
+
findByFingerprintId(fingerprintId: string, tx?: Prisma.TransactionClient): Promise<UserBackup[]>;
|
|
18
|
+
findByClerkUserId(clerkUserId: string, tx?: Prisma.TransactionClient): Promise<UserBackup[]>;
|
|
19
|
+
getBackupById(id: bigint, tx?: Prisma.TransactionClient): Promise<UserBackup | null>;
|
|
20
|
+
restoreUserData(backupId: bigint, tx?: Prisma.TransactionClient): Promise<{
|
|
21
|
+
user: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
listBackups(params: {
|
|
24
|
+
skip?: number;
|
|
25
|
+
take?: number;
|
|
26
|
+
startDate?: Date;
|
|
27
|
+
endDate?: Date;
|
|
28
|
+
orderBy?: Prisma.UserBackupOrderByWithRelationInput;
|
|
29
|
+
}, tx?: Prisma.TransactionClient): Promise<{
|
|
30
|
+
backups: UserBackup[];
|
|
31
|
+
total: number;
|
|
32
|
+
}>;
|
|
33
|
+
deleteOldBackups(daysToKeep?: number, tx?: Prisma.TransactionClient): Promise<number>;
|
|
34
|
+
getBackupStats(tx?: Prisma.TransactionClient): Promise<{
|
|
35
|
+
totalBackups: number;
|
|
36
|
+
last24Hours: number;
|
|
37
|
+
last7Days: number;
|
|
38
|
+
last30Days: number;
|
|
39
|
+
avgBackupSize: number;
|
|
40
|
+
}>;
|
|
41
|
+
exportBackup(backupId: bigint, tx?: Prisma.TransactionClient): Promise<string>;
|
|
42
|
+
batchBackupUsers(userIds: string[], tx?: Prisma.TransactionClient): Promise<number>;
|
|
43
|
+
}
|
|
44
|
+
export declare const userBackupService: UserBackupService;
|
|
45
|
+
//# sourceMappingURL=userBackup.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userBackup.service.d.ts","sourceRoot":"","sources":["../../../src/services/database/userBackup.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,qBAAa,iBAAiB;IAGtB,YAAY,CAAC,IAAI,EAAE;QACvB,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,GAAG,CAAC;KAClB,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;IAkBhD,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;IAgClF,oBAAoB,CACxB,cAAc,EAAE,MAAM,EACtB,EAAE,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAC5B,OAAO,CAAC,UAAU,EAAE,CAAC;IAUlB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAUhF,mBAAmB,CACvB,aAAa,EAAE,MAAM,EACrB,EAAE,CAAC,EAAE,MAAM,CAAC,iBAAiB,GAC5B,OAAO,CAAC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