update product full

This commit is contained in:
2026-03-26 12:25:46 +03:00
parent f2b5f7006b
commit 4f5b557085
31733 changed files with 2762883 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
export declare class AuthOtp {
id: string;
phone: string;
codeHash: string;
purpose: string;
expiresAt: Date;
usedAt?: Date | null;
attemptCount: number;
createdAt: Date;
updatedAt: Date;
}

View File

@@ -0,0 +1,66 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthOtp = void 0;
const typeorm_1 = require("typeorm");
let AuthOtp = class AuthOtp {
id;
phone;
codeHash;
purpose;
expiresAt;
usedAt;
attemptCount;
createdAt;
updatedAt;
};
exports.AuthOtp = AuthOtp;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], AuthOtp.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Index)(),
(0, typeorm_1.Column)({ length: 20 }),
__metadata("design:type", String)
], AuthOtp.prototype, "phone", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'code_hash', length: 255 }),
__metadata("design:type", String)
], AuthOtp.prototype, "codeHash", void 0);
__decorate([
(0, typeorm_1.Column)({ length: 30, default: 'login' }),
__metadata("design:type", String)
], AuthOtp.prototype, "purpose", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'expires_at', type: 'timestamp with time zone' }),
__metadata("design:type", Date)
], AuthOtp.prototype, "expiresAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'used_at', type: 'timestamp with time zone', nullable: true }),
__metadata("design:type", Object)
], AuthOtp.prototype, "usedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'attempt_count', type: 'int', default: 0 }),
__metadata("design:type", Number)
], AuthOtp.prototype, "attemptCount", void 0);
__decorate([
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
__metadata("design:type", Date)
], AuthOtp.prototype, "createdAt", void 0);
__decorate([
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
__metadata("design:type", Date)
], AuthOtp.prototype, "updatedAt", void 0);
exports.AuthOtp = AuthOtp = __decorate([
(0, typeorm_1.Entity)({ name: 'auth_otps' })
], AuthOtp);
//# sourceMappingURL=auth-otp.entity.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"auth-otp.entity.js","sourceRoot":"","sources":["../../../../src/modules/auth/entities/auth-otp.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AAGV,IAAM,OAAO,GAAb,MAAM,OAAO;IAElB,EAAE,CAAS;IAIX,KAAK,CAAS;IAGd,QAAQ,CAAS;IAGjB,OAAO,CAAS;IAGhB,SAAS,CAAO;IAGhB,MAAM,CAAe;IAGrB,YAAY,CAAS;IAGrB,SAAS,CAAO;IAGhB,SAAS,CAAO;CACjB,CAAA;AA5BY,0BAAO;AAElB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;mCACpB;AAIX;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;sCACT;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;yCAC1B;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;wCACzB;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;8BACtD,IAAI;0CAAC;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACzD;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;6CACtC;AAGrB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC9B,IAAI;0CAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC9B,IAAI;0CAAC;kBA3BL,OAAO;IADnB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;GACjB,OAAO,CA4BnB"}

View File

@@ -0,0 +1,12 @@
import { User } from '../../users/entities/user.entity';
export declare class UserSession {
id: string;
user: User;
refreshTokenHash: string;
expiresAt: Date;
revokedAt?: Date | null;
deviceInfo?: string | null;
ipAddress?: string | null;
createdAt: Date;
updatedAt: Date;
}

View File

@@ -0,0 +1,67 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserSession = void 0;
const typeorm_1 = require("typeorm");
const user_entity_1 = require("../../users/entities/user.entity");
let UserSession = class UserSession {
id;
user;
refreshTokenHash;
expiresAt;
revokedAt;
deviceInfo;
ipAddress;
createdAt;
updatedAt;
};
exports.UserSession = UserSession;
__decorate([
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
__metadata("design:type", String)
], UserSession.prototype, "id", void 0);
__decorate([
(0, typeorm_1.Index)(),
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.sessions, { onDelete: 'CASCADE' }),
__metadata("design:type", user_entity_1.User)
], UserSession.prototype, "user", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'refresh_token_hash', length: 255 }),
__metadata("design:type", String)
], UserSession.prototype, "refreshTokenHash", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'expires_at', type: 'timestamp with time zone' }),
__metadata("design:type", Date)
], UserSession.prototype, "expiresAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'revoked_at', type: 'timestamp with time zone', nullable: true }),
__metadata("design:type", Object)
], UserSession.prototype, "revokedAt", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'device_info', type: 'varchar', length: 255, nullable: true }),
__metadata("design:type", Object)
], UserSession.prototype, "deviceInfo", void 0);
__decorate([
(0, typeorm_1.Column)({ name: 'ip_address', type: 'varchar', length: 64, nullable: true }),
__metadata("design:type", Object)
], UserSession.prototype, "ipAddress", void 0);
__decorate([
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
__metadata("design:type", Date)
], UserSession.prototype, "createdAt", void 0);
__decorate([
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
__metadata("design:type", Date)
], UserSession.prototype, "updatedAt", void 0);
exports.UserSession = UserSession = __decorate([
(0, typeorm_1.Entity)({ name: 'user_sessions' })
], UserSession);
//# sourceMappingURL=user-session.entity.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"user-session.entity.js","sourceRoot":"","sources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