@windrun-huaiin/backend-core 28.0.0 → 29.0.0
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/app/api/stripe/checkout/route.js +0 -1
- package/dist/app/api/stripe/checkout/route.mjs +0 -1
- package/dist/app/api/stripe/customer-portal/route.js +0 -1
- package/dist/app/api/stripe/customer-portal/route.mjs +0 -1
- package/dist/app/api/user/credit-overview/route.d.ts +13 -0
- package/dist/app/api/user/credit-overview/route.d.ts.map +1 -0
- package/dist/app/api/user/credit-overview/route.js +32 -0
- package/dist/app/api/user/credit-overview/route.mjs +30 -0
- package/dist/app/api/user/pricing-context/route.d.ts +3 -0
- package/dist/app/api/user/pricing-context/route.d.ts.map +1 -0
- package/dist/app/api/user/pricing-context/route.js +19 -0
- package/dist/app/api/user/pricing-context/route.mjs +17 -0
- package/dist/app/api/webhook/clerk/user/route.js +0 -1
- package/dist/app/api/webhook/clerk/user/route.mjs +0 -1
- package/dist/auth/auth-utils.js +0 -1
- package/dist/auth/auth-utils.mjs +0 -1
- package/dist/credit/server.d.ts +1 -0
- package/dist/credit/server.d.ts.map +1 -1
- package/dist/credit/server.js +2 -0
- package/dist/credit/server.mjs +1 -0
- package/dist/index.js +0 -3
- package/dist/index.mjs +0 -3
- package/dist/lib/credit-overview.d.ts +17 -0
- package/dist/lib/credit-overview.d.ts.map +1 -0
- package/dist/lib/credit-overview.js +116 -0
- package/dist/lib/credit-overview.mjs +114 -0
- package/dist/lib/stripe-config.js +0 -1
- package/dist/lib/stripe-config.mjs +0 -1
- package/dist/prisma/index.d.ts +2 -2
- package/dist/prisma/index.d.ts.map +1 -1
- package/dist/prisma/index.js +0 -3
- package/dist/prisma/index.mjs +0 -3
- package/dist/prisma/prisma-transaction-util.d.ts +1 -1
- package/dist/prisma/prisma-transaction-util.d.ts.map +1 -1
- package/dist/prisma/prisma.d.ts +6 -6
- package/dist/prisma/prisma.d.ts.map +1 -1
- package/dist/prisma/prisma.js +4 -37
- package/dist/prisma/prisma.mjs +4 -37
- package/dist/services/aggregate/anonymous.aggregate.service.d.ts +2 -3
- package/dist/services/aggregate/anonymous.aggregate.service.d.ts.map +1 -1
- package/dist/services/aggregate/anonymous.aggregate.service.js +2 -8
- package/dist/services/aggregate/anonymous.aggregate.service.mjs +2 -8
- package/dist/services/aggregate/billing.aggregate.service.js +0 -1
- package/dist/services/aggregate/billing.aggregate.service.mjs +0 -1
- package/dist/services/aggregate/user.aggregate.service.d.ts +3 -3
- package/dist/services/aggregate/user.aggregate.service.d.ts.map +1 -1
- package/dist/services/aggregate/user.aggregate.service.js +0 -1
- package/dist/services/aggregate/user.aggregate.service.mjs +0 -1
- package/dist/services/context/user-context-service.js +0 -1
- package/dist/services/context/user-context-service.mjs +0 -1
- package/dist/services/database/apilog.service.js +0 -1
- package/dist/services/database/apilog.service.mjs +0 -1
- package/dist/services/database/core-entities.d.ts +123 -0
- package/dist/services/database/core-entities.d.ts.map +1 -0
- package/dist/services/database/credit.service.d.ts +1 -1
- package/dist/services/database/credit.service.d.ts.map +1 -1
- package/dist/services/database/credit.service.js +3 -8
- package/dist/services/database/credit.service.mjs +3 -8
- package/dist/services/database/creditAuditLog.service.d.ts +1 -1
- package/dist/services/database/creditAuditLog.service.d.ts.map +1 -1
- package/dist/services/database/creditAuditLog.service.js +6 -6
- package/dist/services/database/creditAuditLog.service.mjs +6 -6
- package/dist/services/database/prisma-model-type.d.ts +28 -2
- package/dist/services/database/prisma-model-type.d.ts.map +1 -1
- package/dist/services/database/subscription.service.js +1 -2
- package/dist/services/database/subscription.service.mjs +1 -2
- package/dist/services/database/transaction.service.d.ts +1 -1
- package/dist/services/database/transaction.service.d.ts.map +1 -1
- package/dist/services/database/transaction.service.js +14 -19
- package/dist/services/database/transaction.service.mjs +14 -19
- package/dist/services/database/user.service.d.ts +13 -4
- package/dist/services/database/user.service.d.ts.map +1 -1
- package/dist/services/database/user.service.js +5 -3
- package/dist/services/database/user.service.mjs +5 -3
- package/dist/services/database/userBackup.service.js +0 -1
- package/dist/services/database/userBackup.service.mjs +0 -1
- package/dist/services/stripe/webhook-handler.js +0 -1
- package/dist/services/stripe/webhook-handler.mjs +0 -1
- package/package.json +18 -15
- package/src/app/api/user/anonymous/init/route.ts +2 -2
- package/src/app/api/user/credit-overview/route.ts +43 -0
- package/src/app/api/user/pricing-context/route.ts +14 -0
- package/src/credit/server.ts +1 -0
- package/src/lib/credit-overview.ts +153 -0
- package/src/prisma/index.ts +6 -2
- package/src/prisma/prisma-transaction-util.ts +1 -1
- package/src/prisma/prisma.ts +14 -47
- package/src/services/aggregate/anonymous.aggregate.service.ts +7 -9
- package/src/services/aggregate/user.aggregate.service.ts +3 -3
- package/src/services/database/core-entities.ts +128 -0
- package/src/services/database/credit.service.ts +7 -8
- package/src/services/database/creditAuditLog.service.ts +11 -9
- package/src/services/database/prisma-model-type.ts +33 -4
- package/src/services/database/subscription.service.ts +2 -2
- package/src/services/database/transaction.service.ts +22 -23
- package/src/services/database/user.service.ts +23 -6
- package/dist/core-prisma/browser.d.ts +0 -40
- package/dist/core-prisma/browser.d.ts.map +0 -1
- package/dist/core-prisma/client.d.ts +0 -57
- package/dist/core-prisma/client.d.ts.map +0 -1
- package/dist/core-prisma/client.js +0 -55
- package/dist/core-prisma/client.mjs +0 -33
- package/dist/core-prisma/commonInputTypes.d.ts +0 -495
- package/dist/core-prisma/commonInputTypes.d.ts.map +0 -1
- package/dist/core-prisma/enums.d.ts +0 -2
- package/dist/core-prisma/enums.d.ts.map +0 -1
- package/dist/core-prisma/internal/class.d.ts +0 -193
- package/dist/core-prisma/internal/class.d.ts.map +0 -1
- package/dist/core-prisma/internal/class.js +0 -108
- package/dist/core-prisma/internal/class.mjs +0 -87
- package/dist/core-prisma/internal/prismaNamespace.d.ts +0 -1180
- package/dist/core-prisma/internal/prismaNamespace.d.ts.map +0 -1
- package/dist/core-prisma/internal/prismaNamespace.js +0 -278
- package/dist/core-prisma/internal/prismaNamespace.mjs +0 -226
- package/dist/core-prisma/internal/prismaNamespaceBrowser.d.ts +0 -233
- package/dist/core-prisma/internal/prismaNamespaceBrowser.d.ts.map +0 -1
- package/dist/core-prisma/models/Apilog.d.ts +0 -1088
- package/dist/core-prisma/models/Apilog.d.ts.map +0 -1
- package/dist/core-prisma/models/Credit.d.ts +0 -1554
- package/dist/core-prisma/models/Credit.d.ts.map +0 -1
- package/dist/core-prisma/models/CreditAuditLog.d.ts +0 -1362
- package/dist/core-prisma/models/CreditAuditLog.d.ts.map +0 -1
- package/dist/core-prisma/models/Subscription.d.ts +0 -1441
- package/dist/core-prisma/models/Subscription.d.ts.map +0 -1
- package/dist/core-prisma/models/Transaction.d.ts +0 -2222
- package/dist/core-prisma/models/Transaction.d.ts.map +0 -1
- package/dist/core-prisma/models/User.d.ts +0 -1775
- package/dist/core-prisma/models/User.d.ts.map +0 -1
- package/dist/core-prisma/models/UserBackup.d.ts +0 -1228
- package/dist/core-prisma/models/UserBackup.d.ts.map +0 -1
- package/dist/core-prisma/models.d.ts +0 -9
- package/dist/core-prisma/models.d.ts.map +0 -1
- package/migrations/create.sql +0 -176
- package/migrations/init-schema.sql +0 -20
- package/prisma/schema.prisma +0 -193
- package/src/core-prisma/browser.ts +0 -54
- package/src/core-prisma/client.ts +0 -78
- package/src/core-prisma/commonInputTypes.ts +0 -565
- package/src/core-prisma/enums.ts +0 -15
- package/src/core-prisma/internal/class.ts +0 -293
- package/src/core-prisma/internal/prismaNamespace.ts +0 -1419
- package/src/core-prisma/internal/prismaNamespaceBrowser.ts +0 -259
- package/src/core-prisma/models/Apilog.ts +0 -1244
- package/src/core-prisma/models/Credit.ts +0 -1722
- package/src/core-prisma/models/CreditAuditLog.ts +0 -1536
- package/src/core-prisma/models/Subscription.ts +0 -1610
- package/src/core-prisma/models/Transaction.ts +0 -2398
- package/src/core-prisma/models/User.ts +0 -1982
- package/src/core-prisma/models/UserBackup.ts +0 -1384
- package/src/core-prisma/models.ts +0 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
|
|
3
|
-
import { Prisma } from '@core/db/prisma-model-type';
|
|
3
|
+
import type { Prisma } from '@core/db/prisma-model-type';
|
|
4
4
|
import type { Transaction } from '@core/db/prisma-model-type';
|
|
5
5
|
import { OrderStatus, TransactionType, PaySupplier, PaymentStatus } from '@core/db/constants';
|
|
6
6
|
import { checkAndFallbackWithNonTCClient } from '@core/prisma/index';
|
|
@@ -363,20 +363,20 @@ export class TransactionService {
|
|
|
363
363
|
|
|
364
364
|
// Calculate statistics
|
|
365
365
|
const totalRevenue = successfulTransactions.reduce(
|
|
366
|
-
(sum, t) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0),
|
|
366
|
+
(sum: number, t: any) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0),
|
|
367
367
|
0
|
|
368
368
|
);
|
|
369
369
|
|
|
370
370
|
const subscriptionRevenue = successfulTransactions
|
|
371
|
-
.filter(t => t.type === TransactionType.SUBSCRIPTION)
|
|
372
|
-
.reduce((sum, t) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0), 0);
|
|
371
|
+
.filter((t: any) => t.type === TransactionType.SUBSCRIPTION)
|
|
372
|
+
.reduce((sum: number, t: any) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0), 0);
|
|
373
373
|
|
|
374
374
|
const oneTimeRevenue = successfulTransactions
|
|
375
|
-
.filter(t => t.type === TransactionType.ONE_TIME)
|
|
376
|
-
.reduce((sum, t) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0), 0);
|
|
375
|
+
.filter((t: any) => t.type === TransactionType.ONE_TIME)
|
|
376
|
+
.reduce((sum: number, t: any) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0), 0);
|
|
377
377
|
|
|
378
378
|
const refundedAmount = refundedTransactions.reduce(
|
|
379
|
-
(sum, t) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0),
|
|
379
|
+
(sum: number, t: any) => sum + (t.amount ? parseFloat(t.amount.toString()) : 0),
|
|
380
380
|
0
|
|
381
381
|
);
|
|
382
382
|
|
|
@@ -399,22 +399,21 @@ export class TransactionService {
|
|
|
399
399
|
|
|
400
400
|
const client = checkAndFallbackWithNonTCClient(tx);
|
|
401
401
|
|
|
402
|
-
const
|
|
403
|
-
SELECT
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
const result = await client.$queryRaw(query);
|
|
402
|
+
const result = await client.$queryRawUnsafe(
|
|
403
|
+
`SELECT
|
|
404
|
+
DATE(paid_at) as date,
|
|
405
|
+
COUNT(*) as transactions,
|
|
406
|
+
SUM(amount) as revenue,
|
|
407
|
+
SUM(CASE WHEN type = 'subscription' THEN amount ELSE 0 END) as subscription_revenue,
|
|
408
|
+
SUM(CASE WHEN type = 'one_time' THEN amount ELSE 0 END) as onetime_revenue
|
|
409
|
+
FROM transactions
|
|
410
|
+
WHERE order_status = 'success'
|
|
411
|
+
AND deleted = 0
|
|
412
|
+
AND paid_at >= $1
|
|
413
|
+
GROUP BY DATE(paid_at)
|
|
414
|
+
ORDER BY date DESC`,
|
|
415
|
+
startDate,
|
|
416
|
+
);
|
|
418
417
|
|
|
419
418
|
return result as any[];
|
|
420
419
|
}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
|
|
3
3
|
import type { Prisma } from '@core/db/prisma-model-type';
|
|
4
|
-
import type { User } from '@core/db/prisma-model-type';
|
|
4
|
+
import type { CoreJsonValue, User } from '@core/db/prisma-model-type';
|
|
5
5
|
import { UserStatus } from '@core/db/constants';
|
|
6
6
|
import { checkAndFallbackWithNonTCClient } from '@core/prisma/index';
|
|
7
7
|
|
|
8
|
+
export interface UpdateUserInput {
|
|
9
|
+
fingerprintId?: string | null;
|
|
10
|
+
sourceRef?: CoreJsonValue | null;
|
|
11
|
+
clerkUserId?: string | null;
|
|
12
|
+
stripeCusId?: string | null;
|
|
13
|
+
email?: string | null;
|
|
14
|
+
userName?: string | null;
|
|
15
|
+
status?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function toPrismaJsonValue(value: CoreJsonValue | null | undefined) {
|
|
19
|
+
return value === undefined ? undefined : value;
|
|
20
|
+
}
|
|
21
|
+
|
|
8
22
|
export class UserService {
|
|
9
23
|
|
|
10
24
|
// Create user
|
|
11
25
|
async createUser(data: {
|
|
12
26
|
fingerprintId?: string;
|
|
13
|
-
sourceRef?:
|
|
27
|
+
sourceRef?: CoreJsonValue;
|
|
14
28
|
clerkUserId?: string;
|
|
15
29
|
stripeCusId?: string;
|
|
16
30
|
email?: string;
|
|
@@ -22,7 +36,7 @@ export class UserService {
|
|
|
22
36
|
return await client.user.create({
|
|
23
37
|
data: {
|
|
24
38
|
fingerprintId: data.fingerprintId,
|
|
25
|
-
sourceRef: data.sourceRef,
|
|
39
|
+
sourceRef: toPrismaJsonValue(data.sourceRef),
|
|
26
40
|
clerkUserId: data.clerkUserId,
|
|
27
41
|
stripeCusId: data.stripeCusId,
|
|
28
42
|
email: data.email,
|
|
@@ -83,14 +97,17 @@ export class UserService {
|
|
|
83
97
|
// Update user
|
|
84
98
|
async updateUser(
|
|
85
99
|
userId: string,
|
|
86
|
-
data:
|
|
100
|
+
data: UpdateUserInput,
|
|
87
101
|
tx?: Prisma.TransactionClient
|
|
88
102
|
): Promise<User> {
|
|
89
103
|
const client = checkAndFallbackWithNonTCClient(tx);
|
|
90
104
|
|
|
91
105
|
return await client.user.update({
|
|
92
106
|
where: { userId },
|
|
93
|
-
data
|
|
107
|
+
data: {
|
|
108
|
+
...data,
|
|
109
|
+
sourceRef: toPrismaJsonValue(data.sourceRef),
|
|
110
|
+
},
|
|
94
111
|
});
|
|
95
112
|
}
|
|
96
113
|
|
|
@@ -146,7 +163,7 @@ export class UserService {
|
|
|
146
163
|
skip?: number;
|
|
147
164
|
take?: number;
|
|
148
165
|
status?: string;
|
|
149
|
-
orderBy?:
|
|
166
|
+
orderBy?: Record<string, 'asc' | 'desc'>;
|
|
150
167
|
}, tx?: Prisma.TransactionClient): Promise<{ users: User[]; total: number }> {
|
|
151
168
|
const client = checkAndFallbackWithNonTCClient(tx);
|
|
152
169
|
const { skip = 0, take = 10, status, orderBy = { createdAt: 'desc' } } = params;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as Prisma from './internal/prismaNamespaceBrowser';
|
|
2
|
-
export { Prisma };
|
|
3
|
-
export * as $Enums from './enums';
|
|
4
|
-
export * from './enums';
|
|
5
|
-
/**
|
|
6
|
-
* Model User
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export type User = Prisma.UserModel;
|
|
10
|
-
/**
|
|
11
|
-
* Model Subscription
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
export type Subscription = Prisma.SubscriptionModel;
|
|
15
|
-
/**
|
|
16
|
-
* Model Credit
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export type Credit = Prisma.CreditModel;
|
|
20
|
-
/**
|
|
21
|
-
* Model Transaction
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export type Transaction = Prisma.TransactionModel;
|
|
25
|
-
/**
|
|
26
|
-
* Model CreditAuditLog
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
export type CreditAuditLog = Prisma.CreditAuditLogModel;
|
|
30
|
-
/**
|
|
31
|
-
* Model UserBackup
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
export type UserBackup = Prisma.UserBackupModel;
|
|
35
|
-
/**
|
|
36
|
-
* Model Apilog
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
export type Apilog = Prisma.ApilogModel;
|
|
40
|
-
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/core-prisma/browser.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,KAAK,MAAM,MAAM,SAAS,CAAA;AACjC,cAAc,SAAS,CAAC;AACxB;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAA;AACnC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,iBAAiB,CAAA;AACnD;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAA;AACvC;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,gBAAgB,CAAA;AACjD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAA;AACvD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAA;AAC/C;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAA"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as runtime from "@prisma/client/runtime/client";
|
|
2
|
-
import * as $Class from "./internal/class";
|
|
3
|
-
import * as Prisma from "./internal/prismaNamespace";
|
|
4
|
-
export * as $Enums from './enums';
|
|
5
|
-
export * from "./enums";
|
|
6
|
-
/**
|
|
7
|
-
* ## Prisma Client
|
|
8
|
-
*
|
|
9
|
-
* Type-safe database client for TypeScript
|
|
10
|
-
* @example
|
|
11
|
-
* ```
|
|
12
|
-
* const prisma = new PrismaClient()
|
|
13
|
-
* // Fetch zero or more Users
|
|
14
|
-
* const users = await prisma.user.findMany()
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
18
|
-
*/
|
|
19
|
-
export declare const PrismaClient: $Class.PrismaClientConstructor;
|
|
20
|
-
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>;
|
|
21
|
-
export { Prisma };
|
|
22
|
-
/**
|
|
23
|
-
* Model User
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
export type User = Prisma.UserModel;
|
|
27
|
-
/**
|
|
28
|
-
* Model Subscription
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
export type Subscription = Prisma.SubscriptionModel;
|
|
32
|
-
/**
|
|
33
|
-
* Model Credit
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
export type Credit = Prisma.CreditModel;
|
|
37
|
-
/**
|
|
38
|
-
* Model Transaction
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export type Transaction = Prisma.TransactionModel;
|
|
42
|
-
/**
|
|
43
|
-
* Model CreditAuditLog
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
export type CreditAuditLog = Prisma.CreditAuditLogModel;
|
|
47
|
-
/**
|
|
48
|
-
* Model UserBackup
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
export type UserBackup = Prisma.UserBackupModel;
|
|
52
|
-
/**
|
|
53
|
-
* Model Apilog
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export type Apilog = Prisma.ApilogModel;
|
|
57
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core-prisma/client.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAA;AAExD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAA;AAEpD,OAAO,KAAK,MAAM,MAAM,SAAS,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,gCAAyC,CAAA;AAClE,MAAM,MAAM,YAAY,CAAC,OAAO,SAAS,MAAM,CAAC,QAAQ,GAAG,KAAK,EAAE,QAAQ,SAAS,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,OAAO,SAAS,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,IAAI,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;AAC3S,OAAO,EAAE,MAAM,EAAE,CAAA;AAIjB;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAA;AACnC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,iBAAiB,CAAA;AACnD;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAA;AACvC;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,gBAAgB,CAAA;AACjD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAA;AACvD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAA;AAC/C;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAA"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var path = require('node:path');
|
|
4
|
-
var node_url = require('node:url');
|
|
5
|
-
var _class = require('./internal/class.js');
|
|
6
|
-
var prismaNamespace = require('./internal/prismaNamespace.js');
|
|
7
|
-
|
|
8
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
9
|
-
function _interopNamespaceDefault(e) {
|
|
10
|
-
var n = Object.create(null);
|
|
11
|
-
if (e) {
|
|
12
|
-
Object.keys(e).forEach(function (k) {
|
|
13
|
-
if (k !== 'default') {
|
|
14
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return e[k]; }
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
n.default = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
27
|
-
|
|
28
|
-
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
29
|
-
/* eslint-disable */
|
|
30
|
-
// biome-ignore-all lint: generated file
|
|
31
|
-
// @ts-nocheck
|
|
32
|
-
/*
|
|
33
|
-
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
|
34
|
-
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
|
|
35
|
-
*
|
|
36
|
-
* 🟢 You can import this file directly.
|
|
37
|
-
*/
|
|
38
|
-
globalThis['__dirname'] = path__namespace.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('core-prisma/client.js', document.baseURI).href))));
|
|
39
|
-
/**
|
|
40
|
-
* ## Prisma Client
|
|
41
|
-
*
|
|
42
|
-
* Type-safe database client for TypeScript
|
|
43
|
-
* @example
|
|
44
|
-
* ```
|
|
45
|
-
* const prisma = new PrismaClient()
|
|
46
|
-
* // Fetch zero or more Users
|
|
47
|
-
* const users = await prisma.user.findMany()
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
51
|
-
*/
|
|
52
|
-
const PrismaClient = _class.getPrismaClientClass(__dirname);
|
|
53
|
-
|
|
54
|
-
exports.Prisma = prismaNamespace;
|
|
55
|
-
exports.PrismaClient = PrismaClient;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as path from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { getPrismaClientClass } from './internal/class.mjs';
|
|
4
|
-
import * as prismaNamespace from './internal/prismaNamespace.mjs';
|
|
5
|
-
export { prismaNamespace as Prisma };
|
|
6
|
-
|
|
7
|
-
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
8
|
-
/* eslint-disable */
|
|
9
|
-
// biome-ignore-all lint: generated file
|
|
10
|
-
// @ts-nocheck
|
|
11
|
-
/*
|
|
12
|
-
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
|
13
|
-
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
|
|
14
|
-
*
|
|
15
|
-
* 🟢 You can import this file directly.
|
|
16
|
-
*/
|
|
17
|
-
globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url));
|
|
18
|
-
/**
|
|
19
|
-
* ## Prisma Client
|
|
20
|
-
*
|
|
21
|
-
* Type-safe database client for TypeScript
|
|
22
|
-
* @example
|
|
23
|
-
* ```
|
|
24
|
-
* const prisma = new PrismaClient()
|
|
25
|
-
* // Fetch zero or more Users
|
|
26
|
-
* const users = await prisma.user.findMany()
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
30
|
-
*/
|
|
31
|
-
const PrismaClient = getPrismaClientClass(__dirname);
|
|
32
|
-
|
|
33
|
-
export { PrismaClient };
|