tt-entities 0.1.3 → 0.1.5
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/libs/tatayab-entities-library/entities/PasswordResetOtp.d.ts +7 -0
- package/dist/libs/tatayab-entities-library/entities/PasswordResetOtp.js +33 -0
- package/dist/libs/tatayab-entities-library/entities/PasswordResetOtp.js.map +1 -0
- package/dist/libs/tatayab-entities-library/index.d.ts +1 -0
- package/dist/libs/tatayab-entities-library/index.js +6 -2
- package/dist/libs/tatayab-entities-library/index.js.map +1 -1
- package/libs/tatayab-entities-library/src/entities/PasswordResetOtp.ts +16 -0
- package/libs/tatayab-entities-library/src/index.ts +3 -0
- package/package.json +1 -1
- package/src/database/migrations/20260704100000-create-password-reset-otps.ts.js +54 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PasswordResetOtp = void 0;
|
|
13
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
+
class PasswordResetOtp extends sequelize_typescript_1.Model {
|
|
15
|
+
}
|
|
16
|
+
exports.PasswordResetOtp = PasswordResetOtp;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING, allowNull: false }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], PasswordResetOtp.prototype, "email", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.STRING(6), allowNull: false }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], PasswordResetOtp.prototype, "otp", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: false }),
|
|
27
|
+
__metadata("design:type", Date)
|
|
28
|
+
], PasswordResetOtp.prototype, "expiresAt", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.DATE, allowNull: true }),
|
|
31
|
+
__metadata("design:type", Date)
|
|
32
|
+
], PasswordResetOtp.prototype, "usedAt", void 0);
|
|
33
|
+
//# sourceMappingURL=PasswordResetOtp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordResetOtp.js","sourceRoot":"","sources":["../../../../libs/tatayab-entities-library/src/entities/PasswordResetOtp.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+DAA+D;AAE/D,MAAa,gBAAiB,SAAQ,4BAAK;CAY1C;AAZD,4CAYC;AAVC;IADC,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;+CACtC;AAGd;IADC,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6CAC3C;AAGZ;IADC,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8BACvC,IAAI;mDAAC;AAGhB;IADC,IAAA,6BAAM,EAAC,EAAE,IAAI,EAAE,+BAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8BACzC,IAAI;gDAAQ"}
|
|
@@ -15,6 +15,7 @@ export { RunSheet, RunSheetStatus } from './entities/run-sheet.entity';
|
|
|
15
15
|
export { RunSheetOrder, RunSheetOrderStatus, } from './entities/run-sheet-order.entity';
|
|
16
16
|
export { Refund, RefundMethod, RefundStatus } from './entities/refund.entity';
|
|
17
17
|
export { UserWalletBalance } from './entities/user-wallet-balance.entity';
|
|
18
|
+
export { PasswordResetOtp } from './entities/PasswordResetOtp';
|
|
18
19
|
export { Category } from './entities/category.entity';
|
|
19
20
|
export { Brand } from './entities/brand.entity';
|
|
20
21
|
export { VariantType } from './entities/variant-type.entity';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.MarketingFeed = exports.OrderEditItem = exports.OrderEditSession = exports.OrderPaymentType = exports.OrderPaymentStatus = exports.OrderPayment = exports.OrderEditScenario = exports.OrderItemChangeLog = exports.PurchaseOrderReceiptItem = exports.PurchaseOrderReceipt = exports.PurchaseOrderOrderItem = exports.TransactionCategory = exports.TransactionType = exports.UserTransaction = exports.OrderStatusHistory = exports.OrderItemBundleSelection = exports.OrderItemFulfillmentStatus = exports.OrderItemType = exports.OrderItem = exports.Order = exports.OrderStatusCode = exports.OrderStatus = exports.CouponUser = exports.CouponProduct = exports.CouponStore = exports.CouponOsTarget = exports.CouponAppliesTo = exports.CouponDiscountType = exports.Coupon = exports.CartItemBundleSelection = exports.CartItemType = exports.CartItem = exports.CartStatus = exports.Cart = exports.StorePaymentMethod = exports.PaymentMethodCountry = exports.PaymentMethodType = exports.PaymentMethod = exports.PaymentGatewayType = exports.PaymentGateway = exports.RolePermission = void 0;
|
|
3
|
+
exports.PurchaseOrderItemStatus = exports.PurchaseOrderItem = exports.PurchaseOrder = exports.VendorProduct = exports.Vendor = exports.ShippingRule = exports.StockMovement = exports.InventoryStock = exports.StoreInventory = exports.Inventory = exports.ProductStore = exports.Store = exports.BundleStore = exports.BundleProduct = exports.Bundle = exports.ProductTag = exports.Tag = exports.ProductVariantOption = exports.ProductVariant = exports.MediaType = exports.ProductMedia = exports.Product = exports.VariantOption = exports.VariantType = exports.Brand = exports.Category = exports.PasswordResetOtp = exports.UserWalletBalance = exports.RefundStatus = exports.RefundMethod = exports.Refund = exports.RunSheetOrderStatus = exports.RunSheetOrder = exports.RunSheetStatus = exports.RunSheet = exports.AppConfig = exports.BannerStatus = exports.BannerPlacement = exports.Banner = exports.FavoriteCatalogItemType = exports.UserFavoriteCatalog = exports.UserFavorite = exports.UserAddress = exports.UserDevice = exports.User = exports.SysUser = exports.SysRole = exports.Area = exports.Country = exports.ApiKey = void 0;
|
|
4
|
+
exports.StockMovementType = exports.PurchaseOrderStatus = exports.Gender = exports.Status = exports.Language = exports.VersionType = exports.ProductApp = exports.OsName = exports.MarketingFeed = exports.OrderEditItem = exports.OrderEditSession = exports.OrderPaymentType = exports.OrderPaymentStatus = exports.OrderPayment = exports.OrderEditScenario = exports.OrderItemChangeLog = exports.PurchaseOrderReceiptItem = exports.PurchaseOrderReceipt = exports.PurchaseOrderOrderItem = exports.TransactionCategory = exports.TransactionType = exports.UserTransaction = exports.OrderStatusHistory = exports.OrderItemBundleSelection = exports.OrderItemFulfillmentStatus = exports.OrderItemType = exports.OrderItem = exports.Order = exports.OrderStatusCode = exports.OrderStatus = exports.CouponUser = exports.CouponProduct = exports.CouponStore = exports.CouponOsTarget = exports.CouponAppliesTo = exports.CouponDiscountType = exports.Coupon = exports.CartItemBundleSelection = exports.CartItemType = exports.CartItem = exports.CartStatus = exports.Cart = exports.StorePaymentMethod = exports.PaymentMethodCountry = exports.PaymentMethodType = exports.PaymentMethod = exports.PaymentGatewayType = exports.PaymentGateway = exports.RolePermission = exports.Permission = void 0;
|
|
5
5
|
exports.getDbModels = getDbModels;
|
|
6
6
|
const country_entity_1 = require("./entities/country.entity");
|
|
7
7
|
const area_entity_1 = require("./entities/area.entity");
|
|
@@ -70,6 +70,7 @@ const order_payment_entity_1 = require("./entities/order-payment.entity");
|
|
|
70
70
|
const order_edit_session_entity_1 = require("./entities/order-edit-session.entity");
|
|
71
71
|
const order_edit_item_entity_1 = require("./entities/order-edit-item.entity");
|
|
72
72
|
const marketing_feed_entity_1 = require("./entities/marketing-feed.entity");
|
|
73
|
+
const PasswordResetOtp_1 = require("./entities/PasswordResetOtp");
|
|
73
74
|
var apikey_entity_2 = require("./entities/apikey.entity");
|
|
74
75
|
Object.defineProperty(exports, "ApiKey", { enumerable: true, get: function () { return apikey_entity_2.ApiKey; } });
|
|
75
76
|
var country_entity_2 = require("./entities/country.entity");
|
|
@@ -109,6 +110,8 @@ Object.defineProperty(exports, "RefundMethod", { enumerable: true, get: function
|
|
|
109
110
|
Object.defineProperty(exports, "RefundStatus", { enumerable: true, get: function () { return refund_entity_2.RefundStatus; } });
|
|
110
111
|
var user_wallet_balance_entity_2 = require("./entities/user-wallet-balance.entity");
|
|
111
112
|
Object.defineProperty(exports, "UserWalletBalance", { enumerable: true, get: function () { return user_wallet_balance_entity_2.UserWalletBalance; } });
|
|
113
|
+
var PasswordResetOtp_2 = require("./entities/PasswordResetOtp");
|
|
114
|
+
Object.defineProperty(exports, "PasswordResetOtp", { enumerable: true, get: function () { return PasswordResetOtp_2.PasswordResetOtp; } });
|
|
112
115
|
var category_entity_2 = require("./entities/category.entity");
|
|
113
116
|
Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return category_entity_2.Category; } });
|
|
114
117
|
var brand_entity_2 = require("./entities/brand.entity");
|
|
@@ -313,6 +316,7 @@ function getDbModels() {
|
|
|
313
316
|
order_edit_session_entity_1.OrderEditSession,
|
|
314
317
|
order_edit_item_entity_1.OrderEditItem,
|
|
315
318
|
marketing_feed_entity_1.MarketingFeed,
|
|
319
|
+
PasswordResetOtp_1.PasswordResetOtp,
|
|
316
320
|
];
|
|
317
321
|
}
|
|
318
322
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/tatayab-entities-library/src/index.ts"],"names":[],"mappings":";;;;AAmPA,kCAiGC;AAjVD,8DAAoD;AACpD,wDAA8C;AAC9C,gEAAqD;AACrD,gEAAqD;AACrD,wDAA8C;AAC9C,oEAA0D;AAC1D,4DAAkD;AAClD,wEAA6D;AAC7D,0EAA+D;AAC/D,0FAA8E;AAC9E,4DAAkD;AAClD,oEAAyD;AAGzD,gEAAsD;AACtD,0DAAgD;AAChD,wEAA6D;AAC7D,4EAAiE;AACjE,8DAAoD;AACpD,0EAA+D;AAC/D,8EAAmE;AACnE,4FAAgF;AAChF,sDAA4C;AAC5C,sEAA2D;AAC3D,4DAAkD;AAClD,4EAAiE;AACjE,wEAA6D;AAG7D,0DAAgD;AAChD,0EAA+D;AAG/D,kEAAwD;AACxD,8EAAmE;AACnE,8EAAmE;AACnE,4EAAiE;AACjE,0EAA+D;AAG/D,4DAAkD;AAClD,4EAAiE;AACjE,4EAAiE;AACjE,sFAA0E;AAG1E,oEAA0D;AAC1D,8EAAmE;AAGnE,8EAAmE;AACnE,4EAAiE;AACjE,4FAAgF;AAChF,wFAA4E;AAG5E,wDAA8C;AAC9C,kEAAuD;AACvD,oGAAuF;AAGvF,4DAAkD;AAClD,wEAA6D;AAC7D,4EAAiE;AACjE,sEAA2D;AAG3D,wEAA6D;AAC7D,0DAAgD;AAChD,oEAAyD;AACz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ACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// tt-entities/src/models/PasswordResetOtp.ts
|
|
2
|
+
import { Column, Model, DataType } from 'sequelize-typescript';
|
|
3
|
+
|
|
4
|
+
export class PasswordResetOtp extends Model {
|
|
5
|
+
@Column({ type: DataType.STRING, allowNull: false })
|
|
6
|
+
email: string;
|
|
7
|
+
|
|
8
|
+
@Column({ type: DataType.STRING(6), allowNull: false })
|
|
9
|
+
otp: string;
|
|
10
|
+
|
|
11
|
+
@Column({ type: DataType.DATE, allowNull: false })
|
|
12
|
+
expiresAt: Date;
|
|
13
|
+
|
|
14
|
+
@Column({ type: DataType.DATE, allowNull: true })
|
|
15
|
+
usedAt: Date | null;
|
|
16
|
+
}
|
|
@@ -86,6 +86,7 @@ import { OrderPayment } from './entities/order-payment.entity';
|
|
|
86
86
|
import { OrderEditSession } from './entities/order-edit-session.entity';
|
|
87
87
|
import { OrderEditItem } from './entities/order-edit-item.entity';
|
|
88
88
|
import { MarketingFeed } from './entities/marketing-feed.entity';
|
|
89
|
+
import { PasswordResetOtp } from './entities/PasswordResetOtp';
|
|
89
90
|
|
|
90
91
|
// =============================================================================
|
|
91
92
|
// EXPORTS
|
|
@@ -120,6 +121,7 @@ export {
|
|
|
120
121
|
|
|
121
122
|
export { Refund, RefundMethod, RefundStatus } from './entities/refund.entity';
|
|
122
123
|
export { UserWalletBalance } from './entities/user-wallet-balance.entity';
|
|
124
|
+
export { PasswordResetOtp } from './entities/PasswordResetOtp';
|
|
123
125
|
|
|
124
126
|
// ─── Catalogue ────────────────────────────────────────────────────────────────
|
|
125
127
|
export { Category } from './entities/category.entity';
|
|
@@ -334,5 +336,6 @@ export function getDbModels(): ModelCtor[] {
|
|
|
334
336
|
OrderEditItem,
|
|
335
337
|
|
|
336
338
|
MarketingFeed,
|
|
339
|
+
PasswordResetOtp,
|
|
337
340
|
];
|
|
338
341
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
await queryInterface.createTable('PasswordResetOtps', {
|
|
6
|
+
id: {
|
|
7
|
+
type: Sequelize.INTEGER,
|
|
8
|
+
autoIncrement: true,
|
|
9
|
+
primaryKey: true,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
},
|
|
12
|
+
email: {
|
|
13
|
+
type: Sequelize.STRING(255),
|
|
14
|
+
allowNull: false,
|
|
15
|
+
},
|
|
16
|
+
otp: {
|
|
17
|
+
type: Sequelize.STRING(8),
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
expires_at: {
|
|
21
|
+
type: Sequelize.DATE,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
used_at: {
|
|
25
|
+
type: Sequelize.DATE,
|
|
26
|
+
allowNull: true,
|
|
27
|
+
},
|
|
28
|
+
createdAt: {
|
|
29
|
+
type: Sequelize.DATE,
|
|
30
|
+
allowNull: false,
|
|
31
|
+
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
32
|
+
},
|
|
33
|
+
updatedAt: {
|
|
34
|
+
type: Sequelize.DATE,
|
|
35
|
+
allowNull: false,
|
|
36
|
+
defaultValue: Sequelize.literal(
|
|
37
|
+
'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
|
|
38
|
+
),
|
|
39
|
+
},
|
|
40
|
+
deletedAt: {
|
|
41
|
+
type: Sequelize.DATE,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
defaultValue: null,
|
|
44
|
+
comment: 'Soft delete',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
await queryInterface.addIndex('PasswordResetOtps', ['email']);
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
down: async (queryInterface) => {
|
|
52
|
+
await queryInterface.dropTable('PasswordResetOtps');
|
|
53
|
+
},
|
|
54
|
+
};
|