Expire Telegram login button in bot
All checks were successful
Build and deploy Backend / build (push) Successful in 27s
All checks were successful
Build and deploy Backend / build (push) Successful in 27s
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "TelegramLoginRequest" ADD COLUMN "telegramChatId" TEXT,
|
||||||
|
ADD COLUMN "telegramMessageId" INTEGER;
|
||||||
|
|
||||||
@@ -58,6 +58,8 @@ model TelegramLoginRequest {
|
|||||||
tokenHash String @unique
|
tokenHash String @unique
|
||||||
status String @default("PENDING")
|
status String @default("PENDING")
|
||||||
sessionToken String?
|
sessionToken String?
|
||||||
|
telegramChatId String?
|
||||||
|
telegramMessageId Int?
|
||||||
userId String?
|
userId String?
|
||||||
user User? @relation(fields: [userId], references: [id])
|
user User? @relation(fields: [userId], references: [id])
|
||||||
expiresAt DateTime
|
expiresAt DateTime
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ type TelegramFile = {
|
|||||||
file_path: string;
|
file_path: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type TelegramSentMessage = {
|
||||||
|
message_id: number;
|
||||||
|
};
|
||||||
|
|
||||||
const loginPrefix = 'login_';
|
const loginPrefix = 'login_';
|
||||||
|
const loginTimerHandles = new Map<string, ReturnType<typeof setTimeout>>();
|
||||||
|
|
||||||
function randomToken() {
|
function randomToken() {
|
||||||
return randomBytes(32).toString('base64url');
|
return randomBytes(32).toString('base64url');
|
||||||
@@ -112,36 +117,108 @@ export async function fetchTelegramPhoto(fileId: string) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatLoginLifetime() {
|
function formatRemaining(expiresAt: Date) {
|
||||||
const minutes = Math.ceil(config.botLoginMaxAgeSeconds / 60);
|
const seconds = Math.max(0, Math.ceil((expiresAt.getTime() - Date.now()) / 1000));
|
||||||
return `${minutes} мин`;
|
const minutes = Math.floor(seconds / 60).toString();
|
||||||
|
const rest = (seconds % 60).toString().padStart(2, '0');
|
||||||
|
return `${minutes}:${rest}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function loginReplyMarkup(token: string, expiresAt: Date) {
|
||||||
|
return {
|
||||||
|
inline_keyboard: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
text: `Открыть MapFlow · ${formatRemaining(expiresAt)}`,
|
||||||
|
url: `${config.webAppUrl}?telegram_login=${encodeURIComponent(token)}`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendLoginMessage(
|
async function sendLoginMessage(
|
||||||
chatId: number,
|
chatId: number,
|
||||||
text: string,
|
text: string,
|
||||||
token?: string,
|
token?: string,
|
||||||
|
expiresAt?: Date,
|
||||||
) {
|
) {
|
||||||
const replyMarkup = token
|
const replyMarkup = token && expiresAt ? loginReplyMarkup(token, expiresAt) : undefined;
|
||||||
? {
|
|
||||||
inline_keyboard: [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
text: `Открыть MapFlow · ${formatLoginLifetime()}`,
|
|
||||||
url: `${config.webAppUrl}?telegram_login=${encodeURIComponent(token)}`,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
}
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
await callTelegram('sendMessage', {
|
return callTelegram<TelegramSentMessage>('sendMessage', {
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
text,
|
text,
|
||||||
reply_markup: replyMarkup,
|
reply_markup: replyMarkup,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function editLoginMessage(
|
||||||
|
chatId: string,
|
||||||
|
messageId: number,
|
||||||
|
text: string,
|
||||||
|
token?: string,
|
||||||
|
expiresAt?: Date,
|
||||||
|
) {
|
||||||
|
const replyMarkup = token && expiresAt
|
||||||
|
? loginReplyMarkup(token, expiresAt)
|
||||||
|
: { inline_keyboard: [] };
|
||||||
|
await callTelegram('editMessageText', {
|
||||||
|
chat_id: chatId,
|
||||||
|
message_id: messageId,
|
||||||
|
text,
|
||||||
|
reply_markup: replyMarkup,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduleLoginMessageTimer(
|
||||||
|
requestId: string,
|
||||||
|
token: string,
|
||||||
|
chatId: string,
|
||||||
|
messageId: number,
|
||||||
|
expiresAt: Date,
|
||||||
|
) {
|
||||||
|
const existingHandle = loginTimerHandles.get(requestId);
|
||||||
|
if (existingHandle) {
|
||||||
|
clearTimeout(existingHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
const tick = async () => {
|
||||||
|
const request = await prisma.telegramLoginRequest.findUnique({
|
||||||
|
where: { id: requestId },
|
||||||
|
select: { status: true },
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!request || request.status !== 'CONFIRMED') {
|
||||||
|
loginTimerHandles.delete(requestId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expiresAt <= new Date()) {
|
||||||
|
const updated = await prisma.telegramLoginRequest.updateMany({
|
||||||
|
where: { id: requestId, status: 'CONFIRMED' },
|
||||||
|
data: { status: 'EXPIRED' },
|
||||||
|
});
|
||||||
|
|
||||||
|
loginTimerHandles.delete(requestId);
|
||||||
|
if (updated.count > 0) {
|
||||||
|
await editLoginMessage(chatId, messageId, 'Ссылка входа устарела.');
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await editLoginMessage(chatId, messageId, 'MapFlow', token, expiresAt);
|
||||||
|
const handle = setTimeout(() => {
|
||||||
|
void tick();
|
||||||
|
}, 1000);
|
||||||
|
loginTimerHandles.set(requestId, handle);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handle = setTimeout(() => {
|
||||||
|
void tick();
|
||||||
|
}, 1000);
|
||||||
|
loginTimerHandles.set(requestId, handle);
|
||||||
|
}
|
||||||
|
|
||||||
export async function createTelegramBotLogin() {
|
export async function createTelegramBotLogin() {
|
||||||
const token = randomToken();
|
const token = randomToken();
|
||||||
const expiresAt = expiresIn(config.botLoginMaxAgeSeconds);
|
const expiresAt = expiresIn(config.botLoginMaxAgeSeconds);
|
||||||
@@ -182,6 +259,18 @@ export async function completeTelegramBotLogin(token: string) {
|
|||||||
throw new Error('Telegram login is not confirmed.');
|
throw new Error('Telegram login is not confirmed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await prisma.telegramLoginRequest.update({
|
||||||
|
where: { id: request.id },
|
||||||
|
data: { status: 'USED' },
|
||||||
|
});
|
||||||
|
if (request.telegramChatId && request.telegramMessageId) {
|
||||||
|
await editLoginMessage(
|
||||||
|
request.telegramChatId,
|
||||||
|
request.telegramMessageId,
|
||||||
|
'Вход выполнен.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sessionToken: request.sessionToken,
|
sessionToken: request.sessionToken,
|
||||||
user: request.user,
|
user: request.user,
|
||||||
@@ -233,14 +322,24 @@ export async function handleTelegramBotWebhook(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const sentMessage = await sendLoginMessage(chatId, 'MapFlow', token, request.expiresAt);
|
||||||
|
|
||||||
await prisma.telegramLoginRequest.update({
|
await prisma.telegramLoginRequest.update({
|
||||||
where: { id: request.id },
|
where: { id: request.id },
|
||||||
data: {
|
data: {
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
sessionToken,
|
sessionToken,
|
||||||
|
telegramChatId: chatId.toString(),
|
||||||
|
telegramMessageId: sentMessage.message_id,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
await sendLoginMessage(chatId, 'MapFlow', token);
|
scheduleLoginMessageTimer(
|
||||||
|
request.id,
|
||||||
|
token,
|
||||||
|
chatId.toString(),
|
||||||
|
sentMessage.message_id,
|
||||||
|
request.expiresAt,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -157,6 +157,8 @@ exports.Prisma.TelegramLoginRequestScalarFieldEnum = {
|
|||||||
tokenHash: 'tokenHash',
|
tokenHash: 'tokenHash',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
sessionToken: 'sessionToken',
|
sessionToken: 'sessionToken',
|
||||||
|
telegramChatId: 'telegramChatId',
|
||||||
|
telegramMessageId: 'telegramMessageId',
|
||||||
userId: 'userId',
|
userId: 'userId',
|
||||||
expiresAt: 'expiresAt',
|
expiresAt: 'expiresAt',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
|
|||||||
180
src/generated/prisma/index.d.ts
vendored
180
src/generated/prisma/index.d.ts
vendored
@@ -4743,15 +4743,27 @@ export namespace Prisma {
|
|||||||
|
|
||||||
export type AggregateTelegramLoginRequest = {
|
export type AggregateTelegramLoginRequest = {
|
||||||
_count: TelegramLoginRequestCountAggregateOutputType | null
|
_count: TelegramLoginRequestCountAggregateOutputType | null
|
||||||
|
_avg: TelegramLoginRequestAvgAggregateOutputType | null
|
||||||
|
_sum: TelegramLoginRequestSumAggregateOutputType | null
|
||||||
_min: TelegramLoginRequestMinAggregateOutputType | null
|
_min: TelegramLoginRequestMinAggregateOutputType | null
|
||||||
_max: TelegramLoginRequestMaxAggregateOutputType | null
|
_max: TelegramLoginRequestMaxAggregateOutputType | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type TelegramLoginRequestAvgAggregateOutputType = {
|
||||||
|
telegramMessageId: number | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TelegramLoginRequestSumAggregateOutputType = {
|
||||||
|
telegramMessageId: number | null
|
||||||
|
}
|
||||||
|
|
||||||
export type TelegramLoginRequestMinAggregateOutputType = {
|
export type TelegramLoginRequestMinAggregateOutputType = {
|
||||||
id: string | null
|
id: string | null
|
||||||
tokenHash: string | null
|
tokenHash: string | null
|
||||||
status: string | null
|
status: string | null
|
||||||
sessionToken: string | null
|
sessionToken: string | null
|
||||||
|
telegramChatId: string | null
|
||||||
|
telegramMessageId: number | null
|
||||||
userId: string | null
|
userId: string | null
|
||||||
expiresAt: Date | null
|
expiresAt: Date | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
@@ -4763,6 +4775,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string | null
|
tokenHash: string | null
|
||||||
status: string | null
|
status: string | null
|
||||||
sessionToken: string | null
|
sessionToken: string | null
|
||||||
|
telegramChatId: string | null
|
||||||
|
telegramMessageId: number | null
|
||||||
userId: string | null
|
userId: string | null
|
||||||
expiresAt: Date | null
|
expiresAt: Date | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
@@ -4774,6 +4788,8 @@ export namespace Prisma {
|
|||||||
tokenHash: number
|
tokenHash: number
|
||||||
status: number
|
status: number
|
||||||
sessionToken: number
|
sessionToken: number
|
||||||
|
telegramChatId: number
|
||||||
|
telegramMessageId: number
|
||||||
userId: number
|
userId: number
|
||||||
expiresAt: number
|
expiresAt: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
@@ -4782,11 +4798,21 @@ export namespace Prisma {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export type TelegramLoginRequestAvgAggregateInputType = {
|
||||||
|
telegramMessageId?: true
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TelegramLoginRequestSumAggregateInputType = {
|
||||||
|
telegramMessageId?: true
|
||||||
|
}
|
||||||
|
|
||||||
export type TelegramLoginRequestMinAggregateInputType = {
|
export type TelegramLoginRequestMinAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
tokenHash?: true
|
tokenHash?: true
|
||||||
status?: true
|
status?: true
|
||||||
sessionToken?: true
|
sessionToken?: true
|
||||||
|
telegramChatId?: true
|
||||||
|
telegramMessageId?: true
|
||||||
userId?: true
|
userId?: true
|
||||||
expiresAt?: true
|
expiresAt?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
@@ -4798,6 +4824,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: true
|
tokenHash?: true
|
||||||
status?: true
|
status?: true
|
||||||
sessionToken?: true
|
sessionToken?: true
|
||||||
|
telegramChatId?: true
|
||||||
|
telegramMessageId?: true
|
||||||
userId?: true
|
userId?: true
|
||||||
expiresAt?: true
|
expiresAt?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
@@ -4809,6 +4837,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: true
|
tokenHash?: true
|
||||||
status?: true
|
status?: true
|
||||||
sessionToken?: true
|
sessionToken?: true
|
||||||
|
telegramChatId?: true
|
||||||
|
telegramMessageId?: true
|
||||||
userId?: true
|
userId?: true
|
||||||
expiresAt?: true
|
expiresAt?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
@@ -4851,6 +4881,18 @@ export namespace Prisma {
|
|||||||
* Count returned TelegramLoginRequests
|
* Count returned TelegramLoginRequests
|
||||||
**/
|
**/
|
||||||
_count?: true | TelegramLoginRequestCountAggregateInputType
|
_count?: true | TelegramLoginRequestCountAggregateInputType
|
||||||
|
/**
|
||||||
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||||
|
*
|
||||||
|
* Select which fields to average
|
||||||
|
**/
|
||||||
|
_avg?: TelegramLoginRequestAvgAggregateInputType
|
||||||
|
/**
|
||||||
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||||
|
*
|
||||||
|
* Select which fields to sum
|
||||||
|
**/
|
||||||
|
_sum?: TelegramLoginRequestSumAggregateInputType
|
||||||
/**
|
/**
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
||||||
*
|
*
|
||||||
@@ -4884,6 +4926,8 @@ export namespace Prisma {
|
|||||||
take?: number
|
take?: number
|
||||||
skip?: number
|
skip?: number
|
||||||
_count?: TelegramLoginRequestCountAggregateInputType | true
|
_count?: TelegramLoginRequestCountAggregateInputType | true
|
||||||
|
_avg?: TelegramLoginRequestAvgAggregateInputType
|
||||||
|
_sum?: TelegramLoginRequestSumAggregateInputType
|
||||||
_min?: TelegramLoginRequestMinAggregateInputType
|
_min?: TelegramLoginRequestMinAggregateInputType
|
||||||
_max?: TelegramLoginRequestMaxAggregateInputType
|
_max?: TelegramLoginRequestMaxAggregateInputType
|
||||||
}
|
}
|
||||||
@@ -4893,11 +4937,15 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status: string
|
status: string
|
||||||
sessionToken: string | null
|
sessionToken: string | null
|
||||||
|
telegramChatId: string | null
|
||||||
|
telegramMessageId: number | null
|
||||||
userId: string | null
|
userId: string | null
|
||||||
expiresAt: Date
|
expiresAt: Date
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
_count: TelegramLoginRequestCountAggregateOutputType | null
|
_count: TelegramLoginRequestCountAggregateOutputType | null
|
||||||
|
_avg: TelegramLoginRequestAvgAggregateOutputType | null
|
||||||
|
_sum: TelegramLoginRequestSumAggregateOutputType | null
|
||||||
_min: TelegramLoginRequestMinAggregateOutputType | null
|
_min: TelegramLoginRequestMinAggregateOutputType | null
|
||||||
_max: TelegramLoginRequestMaxAggregateOutputType | null
|
_max: TelegramLoginRequestMaxAggregateOutputType | null
|
||||||
}
|
}
|
||||||
@@ -4921,6 +4969,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: boolean
|
tokenHash?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
sessionToken?: boolean
|
sessionToken?: boolean
|
||||||
|
telegramChatId?: boolean
|
||||||
|
telegramMessageId?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
expiresAt?: boolean
|
expiresAt?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
@@ -4933,6 +4983,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: boolean
|
tokenHash?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
sessionToken?: boolean
|
sessionToken?: boolean
|
||||||
|
telegramChatId?: boolean
|
||||||
|
telegramMessageId?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
expiresAt?: boolean
|
expiresAt?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
@@ -4945,6 +4997,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: boolean
|
tokenHash?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
sessionToken?: boolean
|
sessionToken?: boolean
|
||||||
|
telegramChatId?: boolean
|
||||||
|
telegramMessageId?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
expiresAt?: boolean
|
expiresAt?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
@@ -4957,13 +5011,15 @@ export namespace Prisma {
|
|||||||
tokenHash?: boolean
|
tokenHash?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
sessionToken?: boolean
|
sessionToken?: boolean
|
||||||
|
telegramChatId?: boolean
|
||||||
|
telegramMessageId?: boolean
|
||||||
userId?: boolean
|
userId?: boolean
|
||||||
expiresAt?: boolean
|
expiresAt?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TelegramLoginRequestOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "tokenHash" | "status" | "sessionToken" | "userId" | "expiresAt" | "createdAt" | "updatedAt", ExtArgs["result"]["telegramLoginRequest"]>
|
export type TelegramLoginRequestOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"id" | "tokenHash" | "status" | "sessionToken" | "telegramChatId" | "telegramMessageId" | "userId" | "expiresAt" | "createdAt" | "updatedAt", ExtArgs["result"]["telegramLoginRequest"]>
|
||||||
export type TelegramLoginRequestInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
export type TelegramLoginRequestInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
||||||
user?: boolean | TelegramLoginRequest$userArgs<ExtArgs>
|
user?: boolean | TelegramLoginRequest$userArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
@@ -4984,6 +5040,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status: string
|
status: string
|
||||||
sessionToken: string | null
|
sessionToken: string | null
|
||||||
|
telegramChatId: string | null
|
||||||
|
telegramMessageId: number | null
|
||||||
userId: string | null
|
userId: string | null
|
||||||
expiresAt: Date
|
expiresAt: Date
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
@@ -5416,6 +5474,8 @@ export namespace Prisma {
|
|||||||
readonly tokenHash: FieldRef<"TelegramLoginRequest", 'String'>
|
readonly tokenHash: FieldRef<"TelegramLoginRequest", 'String'>
|
||||||
readonly status: FieldRef<"TelegramLoginRequest", 'String'>
|
readonly status: FieldRef<"TelegramLoginRequest", 'String'>
|
||||||
readonly sessionToken: FieldRef<"TelegramLoginRequest", 'String'>
|
readonly sessionToken: FieldRef<"TelegramLoginRequest", 'String'>
|
||||||
|
readonly telegramChatId: FieldRef<"TelegramLoginRequest", 'String'>
|
||||||
|
readonly telegramMessageId: FieldRef<"TelegramLoginRequest", 'Int'>
|
||||||
readonly userId: FieldRef<"TelegramLoginRequest", 'String'>
|
readonly userId: FieldRef<"TelegramLoginRequest", 'String'>
|
||||||
readonly expiresAt: FieldRef<"TelegramLoginRequest", 'DateTime'>
|
readonly expiresAt: FieldRef<"TelegramLoginRequest", 'DateTime'>
|
||||||
readonly createdAt: FieldRef<"TelegramLoginRequest", 'DateTime'>
|
readonly createdAt: FieldRef<"TelegramLoginRequest", 'DateTime'>
|
||||||
@@ -7103,6 +7163,8 @@ export namespace Prisma {
|
|||||||
tokenHash: 'tokenHash',
|
tokenHash: 'tokenHash',
|
||||||
status: 'status',
|
status: 'status',
|
||||||
sessionToken: 'sessionToken',
|
sessionToken: 'sessionToken',
|
||||||
|
telegramChatId: 'telegramChatId',
|
||||||
|
telegramMessageId: 'telegramMessageId',
|
||||||
userId: 'userId',
|
userId: 'userId',
|
||||||
expiresAt: 'expiresAt',
|
expiresAt: 'expiresAt',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
@@ -7482,6 +7544,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFilter<"TelegramLoginRequest"> | string
|
tokenHash?: StringFilter<"TelegramLoginRequest"> | string
|
||||||
status?: StringFilter<"TelegramLoginRequest"> | string
|
status?: StringFilter<"TelegramLoginRequest"> | string
|
||||||
sessionToken?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
sessionToken?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramChatId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramMessageId?: IntNullableFilter<"TelegramLoginRequest"> | number | null
|
||||||
userId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
userId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
expiresAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
expiresAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
||||||
createdAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
createdAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
||||||
@@ -7494,6 +7558,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: SortOrder
|
tokenHash?: SortOrder
|
||||||
status?: SortOrder
|
status?: SortOrder
|
||||||
sessionToken?: SortOrderInput | SortOrder
|
sessionToken?: SortOrderInput | SortOrder
|
||||||
|
telegramChatId?: SortOrderInput | SortOrder
|
||||||
|
telegramMessageId?: SortOrderInput | SortOrder
|
||||||
userId?: SortOrderInput | SortOrder
|
userId?: SortOrderInput | SortOrder
|
||||||
expiresAt?: SortOrder
|
expiresAt?: SortOrder
|
||||||
createdAt?: SortOrder
|
createdAt?: SortOrder
|
||||||
@@ -7509,6 +7575,8 @@ export namespace Prisma {
|
|||||||
NOT?: TelegramLoginRequestWhereInput | TelegramLoginRequestWhereInput[]
|
NOT?: TelegramLoginRequestWhereInput | TelegramLoginRequestWhereInput[]
|
||||||
status?: StringFilter<"TelegramLoginRequest"> | string
|
status?: StringFilter<"TelegramLoginRequest"> | string
|
||||||
sessionToken?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
sessionToken?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramChatId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramMessageId?: IntNullableFilter<"TelegramLoginRequest"> | number | null
|
||||||
userId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
userId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
expiresAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
expiresAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
||||||
createdAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
createdAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
||||||
@@ -7521,13 +7589,17 @@ export namespace Prisma {
|
|||||||
tokenHash?: SortOrder
|
tokenHash?: SortOrder
|
||||||
status?: SortOrder
|
status?: SortOrder
|
||||||
sessionToken?: SortOrderInput | SortOrder
|
sessionToken?: SortOrderInput | SortOrder
|
||||||
|
telegramChatId?: SortOrderInput | SortOrder
|
||||||
|
telegramMessageId?: SortOrderInput | SortOrder
|
||||||
userId?: SortOrderInput | SortOrder
|
userId?: SortOrderInput | SortOrder
|
||||||
expiresAt?: SortOrder
|
expiresAt?: SortOrder
|
||||||
createdAt?: SortOrder
|
createdAt?: SortOrder
|
||||||
updatedAt?: SortOrder
|
updatedAt?: SortOrder
|
||||||
_count?: TelegramLoginRequestCountOrderByAggregateInput
|
_count?: TelegramLoginRequestCountOrderByAggregateInput
|
||||||
|
_avg?: TelegramLoginRequestAvgOrderByAggregateInput
|
||||||
_max?: TelegramLoginRequestMaxOrderByAggregateInput
|
_max?: TelegramLoginRequestMaxOrderByAggregateInput
|
||||||
_min?: TelegramLoginRequestMinOrderByAggregateInput
|
_min?: TelegramLoginRequestMinOrderByAggregateInput
|
||||||
|
_sum?: TelegramLoginRequestSumOrderByAggregateInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TelegramLoginRequestScalarWhereWithAggregatesInput = {
|
export type TelegramLoginRequestScalarWhereWithAggregatesInput = {
|
||||||
@@ -7538,6 +7610,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringWithAggregatesFilter<"TelegramLoginRequest"> | string
|
tokenHash?: StringWithAggregatesFilter<"TelegramLoginRequest"> | string
|
||||||
status?: StringWithAggregatesFilter<"TelegramLoginRequest"> | string
|
status?: StringWithAggregatesFilter<"TelegramLoginRequest"> | string
|
||||||
sessionToken?: StringNullableWithAggregatesFilter<"TelegramLoginRequest"> | string | null
|
sessionToken?: StringNullableWithAggregatesFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramChatId?: StringNullableWithAggregatesFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramMessageId?: IntNullableWithAggregatesFilter<"TelegramLoginRequest"> | number | null
|
||||||
userId?: StringNullableWithAggregatesFilter<"TelegramLoginRequest"> | string | null
|
userId?: StringNullableWithAggregatesFilter<"TelegramLoginRequest"> | string | null
|
||||||
expiresAt?: DateTimeWithAggregatesFilter<"TelegramLoginRequest"> | Date | string
|
expiresAt?: DateTimeWithAggregatesFilter<"TelegramLoginRequest"> | Date | string
|
||||||
createdAt?: DateTimeWithAggregatesFilter<"TelegramLoginRequest"> | Date | string
|
createdAt?: DateTimeWithAggregatesFilter<"TelegramLoginRequest"> | Date | string
|
||||||
@@ -7873,6 +7947,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status?: string
|
status?: string
|
||||||
sessionToken?: string | null
|
sessionToken?: string | null
|
||||||
|
telegramChatId?: string | null
|
||||||
|
telegramMessageId?: number | null
|
||||||
expiresAt: Date | string
|
expiresAt: Date | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -7884,6 +7960,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status?: string
|
status?: string
|
||||||
sessionToken?: string | null
|
sessionToken?: string | null
|
||||||
|
telegramChatId?: string | null
|
||||||
|
telegramMessageId?: number | null
|
||||||
userId?: string | null
|
userId?: string | null
|
||||||
expiresAt: Date | string
|
expiresAt: Date | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -7895,6 +7973,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -7906,6 +7986,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
userId?: NullableStringFieldUpdateOperationsInput | string | null
|
userId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -7917,6 +7999,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status?: string
|
status?: string
|
||||||
sessionToken?: string | null
|
sessionToken?: string | null
|
||||||
|
telegramChatId?: string | null
|
||||||
|
telegramMessageId?: number | null
|
||||||
userId?: string | null
|
userId?: string | null
|
||||||
expiresAt: Date | string
|
expiresAt: Date | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -7928,6 +8012,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -7938,6 +8024,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
userId?: NullableStringFieldUpdateOperationsInput | string | null
|
userId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -8303,6 +8391,17 @@ export namespace Prisma {
|
|||||||
createdAt?: SortOrder
|
createdAt?: SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type IntNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
||||||
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: NestedIntNullableFilter<$PrismaModel> | number | null
|
||||||
|
}
|
||||||
|
|
||||||
export type UserNullableScalarRelationFilter = {
|
export type UserNullableScalarRelationFilter = {
|
||||||
is?: UserWhereInput | null
|
is?: UserWhereInput | null
|
||||||
isNot?: UserWhereInput | null
|
isNot?: UserWhereInput | null
|
||||||
@@ -8313,17 +8412,25 @@ export namespace Prisma {
|
|||||||
tokenHash?: SortOrder
|
tokenHash?: SortOrder
|
||||||
status?: SortOrder
|
status?: SortOrder
|
||||||
sessionToken?: SortOrder
|
sessionToken?: SortOrder
|
||||||
|
telegramChatId?: SortOrder
|
||||||
|
telegramMessageId?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
expiresAt?: SortOrder
|
expiresAt?: SortOrder
|
||||||
createdAt?: SortOrder
|
createdAt?: SortOrder
|
||||||
updatedAt?: SortOrder
|
updatedAt?: SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type TelegramLoginRequestAvgOrderByAggregateInput = {
|
||||||
|
telegramMessageId?: SortOrder
|
||||||
|
}
|
||||||
|
|
||||||
export type TelegramLoginRequestMaxOrderByAggregateInput = {
|
export type TelegramLoginRequestMaxOrderByAggregateInput = {
|
||||||
id?: SortOrder
|
id?: SortOrder
|
||||||
tokenHash?: SortOrder
|
tokenHash?: SortOrder
|
||||||
status?: SortOrder
|
status?: SortOrder
|
||||||
sessionToken?: SortOrder
|
sessionToken?: SortOrder
|
||||||
|
telegramChatId?: SortOrder
|
||||||
|
telegramMessageId?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
expiresAt?: SortOrder
|
expiresAt?: SortOrder
|
||||||
createdAt?: SortOrder
|
createdAt?: SortOrder
|
||||||
@@ -8335,12 +8442,34 @@ export namespace Prisma {
|
|||||||
tokenHash?: SortOrder
|
tokenHash?: SortOrder
|
||||||
status?: SortOrder
|
status?: SortOrder
|
||||||
sessionToken?: SortOrder
|
sessionToken?: SortOrder
|
||||||
|
telegramChatId?: SortOrder
|
||||||
|
telegramMessageId?: SortOrder
|
||||||
userId?: SortOrder
|
userId?: SortOrder
|
||||||
expiresAt?: SortOrder
|
expiresAt?: SortOrder
|
||||||
createdAt?: SortOrder
|
createdAt?: SortOrder
|
||||||
updatedAt?: SortOrder
|
updatedAt?: SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type TelegramLoginRequestSumOrderByAggregateInput = {
|
||||||
|
telegramMessageId?: SortOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
||||||
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||||
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_avg?: NestedFloatNullableFilter<$PrismaModel>
|
||||||
|
_sum?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_max?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type IntFilter<$PrismaModel = never> = {
|
export type IntFilter<$PrismaModel = never> = {
|
||||||
equals?: number | IntFieldRefInput<$PrismaModel>
|
equals?: number | IntFieldRefInput<$PrismaModel>
|
||||||
in?: number[] | ListIntFieldRefInput<$PrismaModel>
|
in?: number[] | ListIntFieldRefInput<$PrismaModel>
|
||||||
@@ -8701,6 +8830,14 @@ export namespace Prisma {
|
|||||||
connect?: UserWhereUniqueInput
|
connect?: UserWhereUniqueInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NullableIntFieldUpdateOperationsInput = {
|
||||||
|
set?: number | null
|
||||||
|
increment?: number
|
||||||
|
decrement?: number
|
||||||
|
multiply?: number
|
||||||
|
divide?: number
|
||||||
|
}
|
||||||
|
|
||||||
export type UserUpdateOneWithoutLoginRequestsNestedInput = {
|
export type UserUpdateOneWithoutLoginRequestsNestedInput = {
|
||||||
create?: XOR<UserCreateWithoutLoginRequestsInput, UserUncheckedCreateWithoutLoginRequestsInput>
|
create?: XOR<UserCreateWithoutLoginRequestsInput, UserUncheckedCreateWithoutLoginRequestsInput>
|
||||||
connectOrCreate?: UserCreateOrConnectWithoutLoginRequestsInput
|
connectOrCreate?: UserCreateOrConnectWithoutLoginRequestsInput
|
||||||
@@ -8889,6 +9026,33 @@ export namespace Prisma {
|
|||||||
_max?: NestedDateTimeFilter<$PrismaModel>
|
_max?: NestedDateTimeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | IntFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
||||||
|
notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||||
|
_count?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_avg?: NestedFloatNullableFilter<$PrismaModel>
|
||||||
|
_sum?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_max?: NestedIntNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | FloatFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
|
||||||
|
notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
|
||||||
|
lt?: number | FloatFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | FloatFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | FloatFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | FloatFieldRefInput<$PrismaModel>
|
||||||
|
not?: NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumVoiceExperienceStatusFilter<$PrismaModel = never> = {
|
export type NestedEnumVoiceExperienceStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.VoiceExperienceStatus | EnumVoiceExperienceStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.VoiceExperienceStatus | EnumVoiceExperienceStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.VoiceExperienceStatus[] | ListEnumVoiceExperienceStatusFieldRefInput<$PrismaModel>
|
in?: $Enums.VoiceExperienceStatus[] | ListEnumVoiceExperienceStatusFieldRefInput<$PrismaModel>
|
||||||
@@ -9040,6 +9204,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status?: string
|
status?: string
|
||||||
sessionToken?: string | null
|
sessionToken?: string | null
|
||||||
|
telegramChatId?: string | null
|
||||||
|
telegramMessageId?: number | null
|
||||||
expiresAt: Date | string
|
expiresAt: Date | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -9050,6 +9216,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status?: string
|
status?: string
|
||||||
sessionToken?: string | null
|
sessionToken?: string | null
|
||||||
|
telegramChatId?: string | null
|
||||||
|
telegramMessageId?: number | null
|
||||||
expiresAt: Date | string
|
expiresAt: Date | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -9150,6 +9318,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFilter<"TelegramLoginRequest"> | string
|
tokenHash?: StringFilter<"TelegramLoginRequest"> | string
|
||||||
status?: StringFilter<"TelegramLoginRequest"> | string
|
status?: StringFilter<"TelegramLoginRequest"> | string
|
||||||
sessionToken?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
sessionToken?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramChatId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
|
telegramMessageId?: IntNullableFilter<"TelegramLoginRequest"> | number | null
|
||||||
userId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
userId?: StringNullableFilter<"TelegramLoginRequest"> | string | null
|
||||||
expiresAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
expiresAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
||||||
createdAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
createdAt?: DateTimeFilter<"TelegramLoginRequest"> | Date | string
|
||||||
@@ -9512,6 +9682,8 @@ export namespace Prisma {
|
|||||||
tokenHash: string
|
tokenHash: string
|
||||||
status?: string
|
status?: string
|
||||||
sessionToken?: string | null
|
sessionToken?: string | null
|
||||||
|
telegramChatId?: string | null
|
||||||
|
telegramMessageId?: number | null
|
||||||
expiresAt: Date | string
|
expiresAt: Date | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -9555,6 +9727,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -9565,6 +9739,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -9575,6 +9751,8 @@ export namespace Prisma {
|
|||||||
tokenHash?: StringFieldUpdateOperationsInput | string
|
tokenHash?: StringFieldUpdateOperationsInput | string
|
||||||
status?: StringFieldUpdateOperationsInput | string
|
status?: StringFieldUpdateOperationsInput | string
|
||||||
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
sessionToken?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramChatId?: NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
telegramMessageId?: NullableIntFieldUpdateOperationsInput | number | null
|
||||||
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "prisma-client-65e4a069edb4c226fb6f3923aad6c1fb21050c52278da483488af11504ab8aa3",
|
"name": "prisma-client-410efc9d12118d43a80a319e7db6d1bb75111f120bc5d6445b1056062f5567cd",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"browser": "default.js",
|
"browser": "default.js",
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ model TelegramLoginRequest {
|
|||||||
tokenHash String @unique
|
tokenHash String @unique
|
||||||
status String @default("PENDING")
|
status String @default("PENDING")
|
||||||
sessionToken String?
|
sessionToken String?
|
||||||
|
telegramChatId String?
|
||||||
|
telegramMessageId Int?
|
||||||
userId String?
|
userId String?
|
||||||
user User? @relation(fields: [userId], references: [id])
|
user User? @relation(fields: [userId], references: [id])
|
||||||
expiresAt DateTime
|
expiresAt DateTime
|
||||||
|
|||||||
Reference in New Issue
Block a user