feat: reorganize admin settings with tabbed interface and documentation
- Reorganized admin settings into tabbed interface (General, Security, Payment Methods) - Vertical tabs on desktop, horizontal scrollable on mobile - Moved Payment Methods from separate menu to Settings tab - Fixed admin profile reuse and dashboard blocking - Fixed maintenance mode guard to use AppConfig model - Added admin auto-redirect after login (admins → /admin, users → /) - Reorganized documentation into docs/ folder structure - Created comprehensive README and documentation index - Added PWA and Web Push notifications to to-do list
This commit is contained in:
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
||||
const auth_guard_1 = require("../auth/auth.guard");
|
||||
const admin_guard_1 = require("./guards/admin.guard");
|
||||
const admin_config_service_1 = require("./admin-config.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let AdminConfigController = class AdminConfigController {
|
||||
service;
|
||||
constructor(service) {
|
||||
@@ -78,6 +79,7 @@ __decorate([
|
||||
exports.AdminConfigController = AdminConfigController = __decorate([
|
||||
(0, common_1.Controller)('admin/config'),
|
||||
(0, common_1.UseGuards)(auth_guard_1.AuthGuard, admin_guard_1.AdminGuard),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__metadata("design:paramtypes", [admin_config_service_1.AdminConfigService])
|
||||
], AdminConfigController);
|
||||
//# sourceMappingURL=admin-config.controller.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"admin-config.controller.js","sourceRoot":"","sources":["../../src/admin/admin-config.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,mDAA+C;AAC/C,sDAAkD;AAClD,iEAA4D;AAUrD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACH;IAA7B,YAA6B,OAA2B;QAA3B,YAAO,GAAP,OAAO,CAAoB;IAAG,CAAC;IAG5D,OAAO,CAAoB,QAAiB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IAGD,aAAa;QACX,OA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ACP,WAAA,IAAA,cAAK,EAAC,KAAK,CAAC,CAAA;;;;mDAEnB;gCA9BU,qBAAqB;IAHjC,IAAA,mBAAU,EAAC,cAAc,CAAC;IAC1B,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;IAChC,IAAA,4CAAe,GAAE;qCAEsB,yCAAkB;GAD7C,qBAAqB,CA+BjC"}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"admin-config.service.js","sourceRoot":"","sources":["../../src/admin/admin-config.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAyD;AAGlD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACA;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAEtD,KAAK,CAAC,OAAO,CAAC,QAAiB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;YACpC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;YAC1C,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC7B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;YACtC,KAAK,EAAE,EAAE,GAAG,EAAE;SACf,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAW,EAAE,IAAS,EAAE,SAAiB;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YAClC,KAAK,EAAE,EAAE,GAAG,EAAE;YACd,MAAM,EAAE;gBACN,GAAG,IAAI;gBACP,SAAS;gBACT,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB;YACD,MAAM,EAAE;gBACN,GAAG;gBACH,GAAG,IAAI;gBACP,SAAS;aACV;SACF,C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ACjB,CAAC;CACF,CAAA;AAvDY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAE0B,8BAAa;GADvC,kBAAkB,CAuD9B"}
|
||||
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
||||
const auth_guard_1 = require("../auth/auth.guard");
|
||||
const admin_guard_1 = require("./guards/admin.guard");
|
||||
const admin_payment_methods_service_1 = require("./admin-payment-methods.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let AdminPaymentMethodsController = class AdminPaymentMethodsController {
|
||||
service;
|
||||
constructor(service) {
|
||||
@@ -87,6 +88,7 @@ __decorate([
|
||||
exports.AdminPaymentMethodsController = AdminPaymentMethodsController = __decorate([
|
||||
(0, common_1.Controller)('admin/payment-methods'),
|
||||
(0, common_1.UseGuards)(auth_guard_1.AuthGuard, admin_guard_1.AdminGuard),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__metadata("design:paramtypes", [admin_payment_methods_service_1.AdminPaymentMethodsService])
|
||||
], AdminPaymentMethodsController);
|
||||
//# sourceMappingURL=admin-payment-methods.controller.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"admin-payment-methods.controller.js","sourceRoot":"","sources":["../../src/admin/admin-payment-methods.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,mDAA+C;AAC/C,sDAAkD;AAClD,mFAA6E;AAItE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IACX;IAA7B,YAA6B,OAAmC;QAAnC,YAAO,GAAP,OAAO,CAA4B;IAAG,CAAC;IAGpE,OAAO;QACL,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;IAGD,OAAO,CAAc,EAAU;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAGD,MAAM,CAAS,IAAS;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAGD,MAAM,CAAc,EAAU,EAAU,IAAS;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;IAGD,MAAM,CAAc,EAAU;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAGD,OAAO,CAAS,IAA6B;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;CACF,CAAA;AAhCY,sEAA6B;AAIxC;IADC,IAAA,YAAG,GAAE;;;;4DAGL;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;4DAEnB;AAGD;IADC,IAAA,aAAI,GAAE;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;;;2DAEb;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACH,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;2DAEtC;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;2DAElB;AAGD;IADC,IAAA,aAAI,EAAC,SAAS,CAAC;IACP,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAEd;wCA/BU,6BAA6B;IAFzC,IAAA,mBAAU,EAAC,uBAAuB,CAAC;IACnC,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;qCAEO,0DAA0B;GADrD,6BAA6B,CAgCzC"}
|
||||
{"version":3,"file":"admin-payment-methods.controller.js","sourceRoot":"","sources":["../../src/admin/admin-payment-methods.controller.ts"],"names":[],"mappings":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,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;2DAElB;AAGD;IADC,IAAA,aAAI,EAAC,SAAS,CAAC;IACP,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAEd;wCA/BU,6BAA6B;IAHzC,IAAA,mBAAU,EAAC,uBAAuB,CAAC;IACnC,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;IAChC,IAAA,4CAAe,GAAE;qCAEsB,0DAA0B;GADrD,6BAA6B,CAgCzC"}
|
||||
@@ -16,10 +16,10 @@ export declare class AdminPaymentsController {
|
||||
subscription: ({
|
||||
plan: {
|
||||
id: string;
|
||||
currency: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
@@ -42,10 +42,10 @@ export declare class AdminPaymentsController {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
userId: string;
|
||||
status: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
userId: string;
|
||||
planId: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
@@ -56,19 +56,21 @@ export declare class AdminPaymentsController {
|
||||
}) | null;
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -79,8 +81,6 @@ export declare class AdminPaymentsController {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
})[]>;
|
||||
getPendingCount(): Promise<number>;
|
||||
getMonthlyRevenue(): Promise<{
|
||||
@@ -97,10 +97,10 @@ export declare class AdminPaymentsController {
|
||||
subscription: ({
|
||||
plan: {
|
||||
id: string;
|
||||
currency: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
@@ -123,10 +123,10 @@ export declare class AdminPaymentsController {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
userId: string;
|
||||
status: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
userId: string;
|
||||
planId: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
@@ -137,19 +137,21 @@ export declare class AdminPaymentsController {
|
||||
}) | null;
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -160,24 +162,24 @@ export declare class AdminPaymentsController {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}) | null>;
|
||||
verify(id: string, req: RequestWithUser): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -188,26 +190,26 @@ export declare class AdminPaymentsController {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
reject(id: string, req: RequestWithUser, body: {
|
||||
reason: string;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -218,8 +220,6 @@ export declare class AdminPaymentsController {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
}
|
||||
export {};
|
||||
|
||||
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
||||
const auth_guard_1 = require("../auth/auth.guard");
|
||||
const admin_guard_1 = require("./guards/admin.guard");
|
||||
const admin_payments_service_1 = require("./admin-payments.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let AdminPaymentsController = class AdminPaymentsController {
|
||||
service;
|
||||
constructor(service) {
|
||||
@@ -88,6 +89,7 @@ __decorate([
|
||||
exports.AdminPaymentsController = AdminPaymentsController = __decorate([
|
||||
(0, common_1.Controller)('admin/payments'),
|
||||
(0, common_1.UseGuards)(auth_guard_1.AuthGuard, admin_guard_1.AdminGuard),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__metadata("design:paramtypes", [admin_payments_service_1.AdminPaymentsService])
|
||||
], AdminPaymentsController);
|
||||
//# sourceMappingURL=admin-payments.controller.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"admin-payments.controller.js","sourceRoot":"","sources":["../../src/admin/admin-payments.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,mDAA+C;AAC/C,sDAAkD;AAClD,qEAAgE;AAUzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACL;IAA7B,YAA6B,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IAG9D,OAAO,CAAkB,MAAe;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAGD,eAAe;QACb,OAAO,IAA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IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAC5B,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;qCAEO,6CAAoB;GAD/C,uBAAuB,CAoCnC"}
|
||||
{"version":3,"file":"admin-payments.controller.js","sourceRoot":"","sources":["../../src/admin/admin-payments.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,mDAA+C;AAC/C,sDAAkD;AAClD,qEAAgE;AAChE,gGAAkF;AAW3E,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACL;IAA7B,YAA6B,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IAG9D,OAAO,CAAkB,MAAe;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAGD,eAAe;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;IACxC,CAAC;IAGD,iBAAiB;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAC1C,CAAC;IAGD,OAAO,CAAc,EAAU;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAGD,MAAM,CAAc,EAAU,EAAS,GAAoB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAGD,MAAM,CACS,EAAU,EAChB,GAAoB,EACnB,IAAwB;QAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;CACF,CAAA;AApCY,0DAAuB;AAIlC;IADC,IAAA,YAAG,GAAE;IACG,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;sDAEvB;AAGD;IADC,IAAA,YAAG,EAAC,eAAe,CAAC;;;;8DAGpB;AAGD;IADC,IAAA,YAAG,EAAC,iBAAiB,CAAC;;;;gEAGtB;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;sDAEnB;AAGD;IADC,IAAA,aAAI,EAAC,YAAY,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,YAAG,GAAE,CAAA;;;;qDAErC;AAGD;IADC,IAAA,aAAI,EAAC,YAAY,CAAC;IAEhB,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;qDAGR;kCAnCU,uBAAuB;IAHnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAC5B,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;IAChC,IAAA,4CAAe,GAAE;qCAEsB,6CAAoB;GAD/C,uBAAuB,CAoCnC"}
|
||||
60
apps/api/dist/admin/admin-payments.service.d.ts
vendored
60
apps/api/dist/admin/admin-payments.service.d.ts
vendored
@@ -11,10 +11,10 @@ export declare class AdminPaymentsService {
|
||||
subscription: ({
|
||||
plan: {
|
||||
id: string;
|
||||
currency: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
@@ -37,10 +37,10 @@ export declare class AdminPaymentsService {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
userId: string;
|
||||
status: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
userId: string;
|
||||
planId: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
@@ -51,19 +51,21 @@ export declare class AdminPaymentsService {
|
||||
}) | null;
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -74,8 +76,6 @@ export declare class AdminPaymentsService {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
})[]>;
|
||||
findOne(id: string): Promise<({
|
||||
user: {
|
||||
@@ -86,10 +86,10 @@ export declare class AdminPaymentsService {
|
||||
subscription: ({
|
||||
plan: {
|
||||
id: string;
|
||||
currency: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
@@ -112,10 +112,10 @@ export declare class AdminPaymentsService {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
userId: string;
|
||||
status: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
userId: string;
|
||||
planId: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
@@ -126,19 +126,21 @@ export declare class AdminPaymentsService {
|
||||
}) | null;
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -149,24 +151,24 @@ export declare class AdminPaymentsService {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}) | null>;
|
||||
verify(id: string, adminUserId: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -177,24 +179,24 @@ export declare class AdminPaymentsService {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
reject(id: string, adminUserId: string, reason: string): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
status: string;
|
||||
method: string;
|
||||
userId: string;
|
||||
currency: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
subscriptionId: string | null;
|
||||
invoiceNumber: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
method: string;
|
||||
tripayReference: string | null;
|
||||
tripayFee: import("@prisma/client/runtime/library").Decimal | null;
|
||||
totalAmount: import("@prisma/client/runtime/library").Decimal;
|
||||
paymentChannel: string | null;
|
||||
paymentUrl: string | null;
|
||||
qrUrl: string | null;
|
||||
status: string;
|
||||
proofImageUrl: string | null;
|
||||
transferDate: Date | null;
|
||||
verifiedBy: string | null;
|
||||
@@ -205,8 +207,6 @@ export declare class AdminPaymentsService {
|
||||
notes: string | null;
|
||||
expiresAt: Date | null;
|
||||
paidAt: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
getPendingCount(): Promise<number>;
|
||||
getMonthlyRevenue(): Promise<{
|
||||
|
||||
15
apps/api/dist/admin/admin-payments.service.js
vendored
15
apps/api/dist/admin/admin-payments.service.js
vendored
@@ -123,7 +123,20 @@ let AdminPaymentsService = class AdminPaymentsService {
|
||||
},
|
||||
});
|
||||
const monthlyData = {};
|
||||
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
const months = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'Apr',
|
||||
'May',
|
||||
'Jun',
|
||||
'Jul',
|
||||
'Aug',
|
||||
'Sep',
|
||||
'Oct',
|
||||
'Nov',
|
||||
'Dec',
|
||||
];
|
||||
payments.forEach((payment) => {
|
||||
if (payment.paidAt) {
|
||||
const date = new Date(payment.paidAt);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"admin-payments.service.js","sourceRoot":"","sources":["../../src/admin/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,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC3B,WAAW,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;gBACnD,CAAC;gBAED,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBACxD,WAAW,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;QAGH,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;aACvC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YACvB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;aACF,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEb,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAxKY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAE0B,8BAAa;GADvC,oBAAoB,CAwKhC"}
|
||||
30
apps/api/dist/admin/admin-plans.controller.d.ts
vendored
30
apps/api/dist/admin/admin-plans.controller.d.ts
vendored
@@ -8,11 +8,13 @@ export declare class AdminPlansController {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -29,8 +31,6 @@ export declare class AdminPlansController {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
})[]>;
|
||||
findOne(id: string): Promise<({
|
||||
_count: {
|
||||
@@ -38,11 +38,13 @@ export declare class AdminPlansController {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -59,16 +61,16 @@ export declare class AdminPlansController {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}) | null>;
|
||||
create(data: any): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -85,16 +87,16 @@ export declare class AdminPlansController {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
update(id: string, data: any): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -111,8 +113,6 @@ export declare class AdminPlansController {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
delete(id: string): Promise<{
|
||||
success: boolean;
|
||||
@@ -120,11 +120,13 @@ export declare class AdminPlansController {
|
||||
action: string;
|
||||
plan: {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -141,8 +143,6 @@ export declare class AdminPlansController {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
};
|
||||
} | {
|
||||
success: boolean;
|
||||
|
||||
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
||||
const auth_guard_1 = require("../auth/auth.guard");
|
||||
const admin_guard_1 = require("./guards/admin.guard");
|
||||
const admin_plans_service_1 = require("./admin-plans.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let AdminPlansController = class AdminPlansController {
|
||||
plansService;
|
||||
constructor(plansService) {
|
||||
@@ -87,6 +88,7 @@ __decorate([
|
||||
exports.AdminPlansController = AdminPlansController = __decorate([
|
||||
(0, common_1.Controller)('admin/plans'),
|
||||
(0, common_1.UseGuards)(auth_guard_1.AuthGuard, admin_guard_1.AdminGuard),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__metadata("design:paramtypes", [admin_plans_service_1.AdminPlansService])
|
||||
], AdminPlansController);
|
||||
//# sourceMappingURL=admin-plans.controller.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"admin-plans.controller.js","sourceRoot":"","sources":["../../src/admin/admin-plans.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,mDAA+C;AAC/C,sDAA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;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;mDAEnB;AAGD;IADC,IAAA,aAAI,GAAE;IACC,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kDAEb;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IACH,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kDAEtC;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;kDAElB;AAGD;IADC,IAAA,aAAI,EAAC,SAAS,CAAC;IACP,WAAA,IAAA,aAAI,GAAE,CAAA;;;;mDAEd;+BA/BU,oBAAoB;IAHhC,IAAA,mBAAU,EAAC,aAAa,CAAC;IACzB,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;IAChC,IAAA,4CAAe,GAAE;qCAE2B,uCAAiB;GADjD,oBAAoB,CAgChC"}
|
||||
30
apps/api/dist/admin/admin-plans.service.d.ts
vendored
30
apps/api/dist/admin/admin-plans.service.d.ts
vendored
@@ -8,11 +8,13 @@ export declare class AdminPlansService {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -29,8 +31,6 @@ export declare class AdminPlansService {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
})[]>;
|
||||
findOne(id: string): Promise<({
|
||||
_count: {
|
||||
@@ -38,11 +38,13 @@ export declare class AdminPlansService {
|
||||
};
|
||||
} & {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -59,16 +61,16 @@ export declare class AdminPlansService {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}) | null>;
|
||||
create(data: any): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -85,16 +87,16 @@ export declare class AdminPlansService {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
update(id: string, data: any): Promise<{
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -111,8 +113,6 @@ export declare class AdminPlansService {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}>;
|
||||
delete(id: string): Promise<{
|
||||
success: boolean;
|
||||
@@ -120,11 +120,13 @@ export declare class AdminPlansService {
|
||||
action: string;
|
||||
plan: {
|
||||
id: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
name: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
price: import("@prisma/client/runtime/library").Decimal;
|
||||
currency: string;
|
||||
durationType: string;
|
||||
durationDays: number | null;
|
||||
trialDays: number;
|
||||
@@ -141,8 +143,6 @@ export declare class AdminPlansService {
|
||||
maxTeamMembers: number | null;
|
||||
apiEnabled: boolean;
|
||||
apiRateLimit: number | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
};
|
||||
} | {
|
||||
success: boolean;
|
||||
|
||||
28
apps/api/dist/admin/admin-users.controller.d.ts
vendored
28
apps/api/dist/admin/admin-users.controller.d.ts
vendored
@@ -177,4 +177,32 @@ export declare class AdminUsersController {
|
||||
cancelledAt: Date | null;
|
||||
cancellationReason: string | null;
|
||||
}>;
|
||||
create(body: {
|
||||
email: string;
|
||||
password: string;
|
||||
name?: string;
|
||||
role?: string;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
email: string;
|
||||
createdAt: Date;
|
||||
emailVerified: boolean;
|
||||
name: string | null;
|
||||
role: string;
|
||||
}>;
|
||||
update(id: string, body: {
|
||||
email?: string;
|
||||
name?: string;
|
||||
role?: string;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
email: string;
|
||||
createdAt: Date;
|
||||
emailVerified: boolean;
|
||||
name: string | null;
|
||||
role: string;
|
||||
}>;
|
||||
delete(id: string): Promise<{
|
||||
message: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
33
apps/api/dist/admin/admin-users.controller.js
vendored
33
apps/api/dist/admin/admin-users.controller.js
vendored
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
||||
const auth_guard_1 = require("../auth/auth.guard");
|
||||
const admin_guard_1 = require("./guards/admin.guard");
|
||||
const admin_users_service_1 = require("./admin-users.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let AdminUsersController = class AdminUsersController {
|
||||
service;
|
||||
constructor(service) {
|
||||
@@ -43,6 +44,15 @@ let AdminUsersController = class AdminUsersController {
|
||||
grantProAccess(id, body) {
|
||||
return this.service.grantProAccess(id, body.planSlug, body.durationDays);
|
||||
}
|
||||
create(body) {
|
||||
return this.service.create(body);
|
||||
}
|
||||
update(id, body) {
|
||||
return this.service.update(id, body);
|
||||
}
|
||||
delete(id) {
|
||||
return this.service.delete(id);
|
||||
}
|
||||
};
|
||||
exports.AdminUsersController = AdminUsersController;
|
||||
__decorate([
|
||||
@@ -96,9 +106,32 @@ __decorate([
|
||||
__metadata("design:paramtypes", [String, Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AdminUsersController.prototype, "grantProAccess", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AdminUsersController.prototype, "create", null);
|
||||
__decorate([
|
||||
(0, common_1.Put)(':id'),
|
||||
__param(0, (0, common_1.Param)('id')),
|
||||
__param(1, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String, Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AdminUsersController.prototype, "update", null);
|
||||
__decorate([
|
||||
(0, common_1.Delete)(':id'),
|
||||
__param(0, (0, common_1.Param)('id')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AdminUsersController.prototype, "delete", null);
|
||||
exports.AdminUsersController = AdminUsersController = __decorate([
|
||||
(0, common_1.Controller)('admin/users'),
|
||||
(0, common_1.UseGuards)(auth_guard_1.AuthGuard, admin_guard_1.AdminGuard),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__metadata("design:paramtypes", [admin_users_service_1.AdminUsersService])
|
||||
], AdminUsersController);
|
||||
//# sourceMappingURL=admin-users.controller.js.map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AAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;mDAEnB;AAGD;IADC,IAAA,YAAG,EAAC,UAAU,CAAC;IACJ,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;sDAE1C;AAGD;IADC,IAAA,aAAI,EAAC,aAAa,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;mDAEvC;AAGD;IADC,IAAA,aAAI,EAAC,eAAe,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;qDAErB;AAGD;IADC,IAAA,aAAI,EAAC,eAAe,CAAC;IAEnB,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,aAAI,GAAE,CAAA;;;;0DAGR;AAGD;IADC,IAAA,aAAI,GAAE;IAEJ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kDASR;AAGD;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;IAER,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kDAGR;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;kDAElB;+BAjEU,oBAAoB;IAHhC,IAAA,mBAAU,EAAC,aAAa,CAAC;IACzB,IAAA,kBAAS,EAAC,sBAAS,EAAE,wBAAU,CAAC;IAChC,IAAA,4CAAe,GAAE;qCAEsB,uCAAiB;GAD5C,oBAAoB,CAkEhC"}
|
||||
28
apps/api/dist/admin/admin-users.service.d.ts
vendored
28
apps/api/dist/admin/admin-users.service.d.ts
vendored
@@ -170,4 +170,32 @@ export declare class AdminUsersService {
|
||||
activeSubscriptions: number;
|
||||
suspendedUsers: number;
|
||||
}>;
|
||||
create(data: {
|
||||
email: string;
|
||||
password: string;
|
||||
name?: string;
|
||||
role?: string;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
email: string;
|
||||
createdAt: Date;
|
||||
emailVerified: boolean;
|
||||
name: string | null;
|
||||
role: string;
|
||||
}>;
|
||||
update(id: string, data: {
|
||||
email?: string;
|
||||
name?: string;
|
||||
role?: string;
|
||||
}): Promise<{
|
||||
id: string;
|
||||
email: string;
|
||||
createdAt: Date;
|
||||
emailVerified: boolean;
|
||||
name: string | null;
|
||||
role: string;
|
||||
}>;
|
||||
delete(id: string): Promise<{
|
||||
message: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
104
apps/api/dist/admin/admin-users.service.js
vendored
104
apps/api/dist/admin/admin-users.service.js
vendored
@@ -1,10 +1,43 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
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 __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
@@ -12,6 +45,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AdminUsersService = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../prisma/prisma.service");
|
||||
const bcrypt = __importStar(require("bcrypt"));
|
||||
let AdminUsersService = class AdminUsersService {
|
||||
prisma;
|
||||
constructor(prisma) {
|
||||
@@ -139,6 +173,76 @@ let AdminUsersService = class AdminUsersService {
|
||||
suspendedUsers,
|
||||
};
|
||||
}
|
||||
async create(data) {
|
||||
const existing = await this.prisma.user.findUnique({
|
||||
where: { email: data.email },
|
||||
});
|
||||
if (existing) {
|
||||
throw new common_1.ConflictException('User with this email already exists');
|
||||
}
|
||||
const hashedPassword = await bcrypt.hash(data.password, 10);
|
||||
return this.prisma.user.create({
|
||||
data: {
|
||||
email: data.email,
|
||||
passwordHash: hashedPassword,
|
||||
name: data.name || null,
|
||||
role: data.role || 'user',
|
||||
emailVerified: true,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
email: true,
|
||||
name: true,
|
||||
role: true,
|
||||
emailVerified: true,
|
||||
createdAt: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
async update(id, data) {
|
||||
const user = await this.prisma.user.findUnique({
|
||||
where: { id },
|
||||
});
|
||||
if (!user) {
|
||||
throw new common_1.NotFoundException('User not found');
|
||||
}
|
||||
if (data.email && data.email !== user.email) {
|
||||
const existing = await this.prisma.user.findUnique({
|
||||
where: { email: data.email },
|
||||
});
|
||||
if (existing) {
|
||||
throw new common_1.ConflictException('Email already in use');
|
||||
}
|
||||
}
|
||||
return this.prisma.user.update({
|
||||
where: { id },
|
||||
data: {
|
||||
...(data.email && { email: data.email }),
|
||||
...(data.name !== undefined && { name: data.name }),
|
||||
...(data.role && { role: data.role }),
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
email: true,
|
||||
name: true,
|
||||
role: true,
|
||||
emailVerified: true,
|
||||
createdAt: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
async delete(id) {
|
||||
const user = await this.prisma.user.findUnique({
|
||||
where: { id },
|
||||
});
|
||||
if (!user) {
|
||||
throw new common_1.NotFoundException('User not found');
|
||||
}
|
||||
await this.prisma.user.delete({
|
||||
where: { id },
|
||||
});
|
||||
return { message: 'User deleted successfully' };
|
||||
}
|
||||
};
|
||||
exports.AdminUsersService = AdminUsersService;
|
||||
exports.AdminUsersService = AdminUsersService = __decorate([
|
||||
|
||||
File diff suppressed because one or more lines are too long
9
apps/api/dist/app.module.js
vendored
9
apps/api/dist/app.module.js
vendored
@@ -42,6 +42,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AppModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const config_1 = require("@nestjs/config");
|
||||
const core_1 = require("@nestjs/core");
|
||||
const path = __importStar(require("path"));
|
||||
const prisma_module_1 = require("./prisma/prisma.module");
|
||||
const auth_module_1 = require("./auth/auth.module");
|
||||
@@ -52,6 +53,7 @@ const transactions_module_1 = require("./transactions/transactions.module");
|
||||
const categories_module_1 = require("./categories/categories.module");
|
||||
const otp_module_1 = require("./otp/otp.module");
|
||||
const admin_module_1 = require("./admin/admin.module");
|
||||
const maintenance_guard_1 = require("./common/guards/maintenance.guard");
|
||||
let AppModule = class AppModule {
|
||||
};
|
||||
exports.AppModule = AppModule;
|
||||
@@ -75,7 +77,12 @@ exports.AppModule = AppModule = __decorate([
|
||||
admin_module_1.AdminModule,
|
||||
],
|
||||
controllers: [health_controller_1.HealthController],
|
||||
providers: [],
|
||||
providers: [
|
||||
{
|
||||
provide: core_1.APP_GUARD,
|
||||
useClass: maintenance_guard_1.MaintenanceGuard,
|
||||
},
|
||||
],
|
||||
})
|
||||
], AppModule);
|
||||
//# sourceMappingURL=app.module.js.map
|
||||
2
apps/api/dist/app.module.js.map
vendored
2
apps/api/dist/app.module.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,2CAA6B;AAC7B,0DAAsD;AACtD,oDAAgD;AAChD,kEAA8D;AAC9D,uDAAmD;AACnD,6DAAyD;AACzD,4EAAwE;AACxE,sEAAkE;AAClE,iDAA6C;AAC7C,uDAAmD;AAuB5C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IArBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC;gBACnB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE;oBACX,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC;oBACnC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC;iBAC1C;aACF,CAAC;YACF,4BAAY;YACZ,wBAAU;YACV,0BAAW;YACX,8BAAa;YACb,wCAAkB;YAClB,oCAAgB;YAChB,sBAAS;YACT,0BAAW;SACZ;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,EAAE;KACd,CAAC;GACW,SAAS,CAAG"}
|
||||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,uCAAyC;AACzC,2CAA6B;AAC7B,0DAAsD;AACtD,oDAAgD;AAChD,kEAA8D;AAC9D,uDAAmD;AACnD,6DAAyD;AACzD,4EAAwE;AACxE,sEAAkE;AAClE,iDAA6C;AAC7C,uDAAmD;AACnD,yEAAqE;AA4B9D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IA1BrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC;gBACnB,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE;oBACX,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC;oBACnC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC;iBAC1C;aACF,CAAC;YACF,4BAAY;YACZ,wBAAU;YACV,0BAAW;YACX,8BAAa;YACb,wCAAkB;YAClB,oCAAgB;YAChB,sBAAS;YACT,0BAAW;SACZ;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,oCAAgB;aAC3B;SACF;KACF,CAAC;GACW,SAAS,CAAG"}
|
||||
6
apps/api/dist/auth/auth.controller.js
vendored
6
apps/api/dist/auth/auth.controller.js
vendored
@@ -17,6 +17,7 @@ const common_1 = require("@nestjs/common");
|
||||
const auth_guard_1 = require("./auth.guard");
|
||||
const passport_1 = require("@nestjs/passport");
|
||||
const auth_service_1 = require("./auth.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let AuthController = class AuthController {
|
||||
authService;
|
||||
constructor(authService) {
|
||||
@@ -53,6 +54,7 @@ let AuthController = class AuthController {
|
||||
exports.AuthController = AuthController;
|
||||
__decorate([
|
||||
(0, common_1.Post)('register'),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
@@ -60,6 +62,7 @@ __decorate([
|
||||
], AuthController.prototype, "register", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('login'),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
@@ -67,6 +70,7 @@ __decorate([
|
||||
], AuthController.prototype, "login", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('verify-otp'),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
@@ -74,6 +78,7 @@ __decorate([
|
||||
], AuthController.prototype, "verifyOtp", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('google'),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
(0, common_1.UseGuards)((0, passport_1.AuthGuard)('google')),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
@@ -81,6 +86,7 @@ __decorate([
|
||||
], AuthController.prototype, "googleAuth", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('google/callback'),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
(0, common_1.UseGuards)((0, passport_1.AuthGuard)('google')),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__param(1, (0, common_1.Res)()),
|
||||
|
||||
2
apps/api/dist/auth/auth.controller.js.map
vendored
2
apps/api/dist/auth/auth.controller.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,6CAAyD;AACzD,+CAA6C;AAC7C,iDAA6C;AAWtC,IAAM,cAAc,GAApB,MAAM,cAAc;IACL;IAApB,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAG1C,AAAN,KAAK,CAAC,QAAQ,CACJ,IAAwD;QAEhE,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACzE,CAAC;IAGK,AAAN,KAAK,CAAC,KAAK,CAAS,IAAyC;QAC3D,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAEb,IAIC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,iBAAiB,CACvC,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,UAAU;IAEhB,CAAC;IAIK,AAAN,KAAK,CAAC,kBAAkB,CAAQ,GAAQ,EAAS,GAAa;QAE5D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAG5D,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,uBAAuB,CAAC;QAEvE,IAAI,MAA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AElB;AAIK;IAFL,IAAA,aAAI,EAAC,YAAY,CAAC;IAClB,IAAA,4CAAe,GAAE;IAEf,WAAA,IAAA,aAAI,GAAE,CAAA;;;;+CAYR;AAKK;IAHL,IAAA,YAAG,EAAC,QAAQ,CAAC;IACb,IAAA,4CAAe,GAAE;IACjB,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,QAAQ,CAAC,CAAC;;;;gDAG9B;AAKK;IAHL,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACtB,IAAA,4CAAe,GAAE;IACjB,IAAA,kBAAS,EAAC,IAAA,oBAAS,EAAC,QAAQ,CAAC,CAAC;IACL,WAAA,IAAA,YAAG,GAAE,CAAA;IAAY,WAAA,IAAA,YAAG,GAAE,CAAA;;;;wDAgB/C;AAIK;IAFL,IAAA,YAAG,EAAC,IAAI,CAAC;IACT,IAAA,kBAAS,EAAC,sBAAY,CAAC;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;;;;gDAEtB;AAIK;IAFL,IAAA,aAAI,EAAC,iBAAiB,CAAC;IACvB,IAAA,kBAAS,EAAC,sBAAY,CAAC;IAErB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;oDAaR;yBArFU,cAAc;IAD1B,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAEgB,0BAAW;GADjC,cAAc,CAsF1B"}
|
||||
2
apps/api/dist/auth/auth.module.js
vendored
2
apps/api/dist/auth/auth.module.js
vendored
@@ -32,7 +32,7 @@ exports.AuthModule = AuthModule = __decorate([
|
||||
],
|
||||
controllers: [auth_controller_1.AuthController],
|
||||
providers: [auth_service_1.AuthService, jwt_strategy_1.JwtStrategy, google_strategy_1.GoogleStrategy],
|
||||
exports: [auth_service_1.AuthService],
|
||||
exports: [auth_service_1.AuthService, jwt_1.JwtModule],
|
||||
})
|
||||
], AuthModule);
|
||||
//# sourceMappingURL=auth.module.js.map
|
||||
2
apps/api/dist/auth/auth.module.js.map
vendored
2
apps/api/dist/auth/auth.module.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,qCAAwC;AACxC,+CAAkD;AAClD,uDAAmD;AACnD,iDAA6C;AAC7C,iDAA6C;AAC7C,uDAAmD;AACnD,2DAAuD;AACvD,kDAA8C;AAgBvC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IAdtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,4BAAY;YACZ,yBAAc;YACd,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAS,CAAC;YAC3B,eAAS,CAAC,QAAQ,CAAC;gBACjB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,iBAAiB;gBACnD,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;aACjC,CAAC;SACH;QACD,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE,CAAC,0BAAW,EAAE,0BAAW,EAAE,gCAAc,CAAC;QACrD,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
|
||||
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,qCAAwC;AACxC,+CAAkD;AAClD,uDAAmD;AACnD,iDAA6C;AAC7C,iDAA6C;AAC7C,uDAAmD;AACnD,2DAAuD;AACvD,kDAA8C;AAgBvC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IAdtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,4BAAY;YACZ,yBAAc;YACd,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAS,CAAC;YAC3B,eAAS,CAAC,QAAQ,CAAC;gBACjB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,iBAAiB;gBACnD,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;aACjC,CAAC;SACH;QACD,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE,CAAC,0BAAW,EAAE,0BAAW,EAAE,gCAAc,CAAC;QACrD,OAAO,EAAE,CAAC,0BAAW,EAAE,eAAS,CAAC;KAClC,CAAC;GACW,UAAU,CAAG"}
|
||||
2
apps/api/dist/auth/jwt.strategy.js
vendored
2
apps/api/dist/auth/jwt.strategy.js
vendored
@@ -25,7 +25,7 @@ let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(pas
|
||||
return {
|
||||
userId: payload.sub,
|
||||
email: payload.email,
|
||||
role: payload.role || 'user'
|
||||
role: payload.role || 'user',
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"categories.controller.js","sourceRoot":"","sources":["../../src/categories/categories.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4F;AAC5F,yEAAqE;AACrE,+EAA0E;AAC1E,mDAA+C;AAUxC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,MAAM,CAAQ,GAAoB,EAAU,iBAAoC;QAC9E,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YACnC,GAAG,iBAAiB;YACpB,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAGD,OAAO,CAAQ,GAAoB;QACjC,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAGD,MAAM,CAAQ,GAAoB,EAAe,EAAU;QACzD,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;CACF,CAAA;AApBY,oDAAoB;AAI/B;IADC,IAAA,aAAI,GAAE;IACC,WAAA,IAAA,YAAG,GAAE,CAAA;IAAwB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAoB,uCAAiB;;kDAK/E;AAGD;IADC,IAAA,YAAG,GAAE;IACG,WAAA,IAAA,YAAG,GAAE,CAAA;;;;mDAEb;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;IAAwB,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;kDAE/C;+BAnBU,oBAAoB;IAFhC,IAAA,mBAAU,EAAC,YAAY,CAAC;IACxB,IAAA,kBAAS,EAAC,sBAAS,CAAC;qCAE6B,sCAAiB;GADtD,oBAAoB,CAoBhC"}
|
||||
{"version":3,"file":"categories.controller.js","sourceRoot":"","sources":["../../src/categories/categories.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,yEAAqE;AACrE,+EAA0E;AAC1E,mDAA+C;AAUxC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACF;IAA7B,YAA6B,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAAG,CAAC;IAGrE,MAAM,CACG,GAAoB,EACnB,iBAAoC;QAE5C,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YACnC,GAAG,iBAAiB;YACpB,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;IAGD,OAAO,CAAQ,GAAoB;QACjC,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAGD,MAAM,CAAQ,GAAoB,EAAe,EAAU;QACzD,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;CACF,CAAA;AAvBY,oDAAoB;AAI/B;IADC,IAAA,aAAI,GAAE;IAEJ,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAoB,uCAAiB;;kDAM7C;AAGD;IADC,IAAA,YAAG,GAAE;IACG,WAAA,IAAA,YAAG,GAAE,CAAA;;;;mDAEb;AAGD;IADC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;IAAwB,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;kDAE/C;+BAtBU,oBAAoB;IAFhC,IAAA,mBAAU,EAAC,YAAY,CAAC;IACxB,IAAA,kBAAS,EAAC,sBAAS,CAAC;qCAE6B,sCAAiB;GADtD,oBAAoB,CAuBhC"}
|
||||
1
apps/api/dist/common/decorators/skip-maintenance.decorator.d.ts
vendored
Normal file
1
apps/api/dist/common/decorators/skip-maintenance.decorator.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const SkipMaintenance: () => import("@nestjs/common").CustomDecorator<string>;
|
||||
7
apps/api/dist/common/decorators/skip-maintenance.decorator.js
vendored
Normal file
7
apps/api/dist/common/decorators/skip-maintenance.decorator.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SkipMaintenance = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const SkipMaintenance = () => (0, common_1.SetMetadata)('skipMaintenance', true);
|
||||
exports.SkipMaintenance = SkipMaintenance;
|
||||
//# sourceMappingURL=skip-maintenance.decorator.js.map
|
||||
1
apps/api/dist/common/decorators/skip-maintenance.decorator.js.map
vendored
Normal file
1
apps/api/dist/common/decorators/skip-maintenance.decorator.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skip-maintenance.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/skip-maintenance.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAEtC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAA,oBAAW,EAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAA7D,QAAA,eAAe,mBAA8C"}
|
||||
11
apps/api/dist/common/guards/maintenance.guard.d.ts
vendored
Normal file
11
apps/api/dist/common/guards/maintenance.guard.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
||||
import { Reflector } from '@nestjs/core';
|
||||
import { PrismaService } from '../../prisma/prisma.service';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
export declare class MaintenanceGuard implements CanActivate {
|
||||
private reflector;
|
||||
private prisma;
|
||||
private jwtService;
|
||||
constructor(reflector: Reflector, prisma: PrismaService, jwtService: JwtService);
|
||||
canActivate(context: ExecutionContext): Promise<boolean>;
|
||||
}
|
||||
71
apps/api/dist/common/guards/maintenance.guard.js
vendored
Normal file
71
apps/api/dist/common/guards/maintenance.guard.js
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
"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.MaintenanceGuard = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const core_1 = require("@nestjs/core");
|
||||
const prisma_service_1 = require("../../prisma/prisma.service");
|
||||
const jwt_1 = require("@nestjs/jwt");
|
||||
let MaintenanceGuard = class MaintenanceGuard {
|
||||
reflector;
|
||||
prisma;
|
||||
jwtService;
|
||||
constructor(reflector, prisma, jwtService) {
|
||||
this.reflector = reflector;
|
||||
this.prisma = prisma;
|
||||
this.jwtService = jwtService;
|
||||
}
|
||||
async canActivate(context) {
|
||||
const isExempt = this.reflector.get('skipMaintenance', context.getHandler());
|
||||
const isControllerExempt = this.reflector.get('skipMaintenance', context.getClass());
|
||||
if (isExempt || isControllerExempt) {
|
||||
return true;
|
||||
}
|
||||
const maintenanceConfig = await this.prisma.appConfig.findUnique({
|
||||
where: { key: 'maintenance_mode' },
|
||||
});
|
||||
const isMaintenanceMode = maintenanceConfig?.value === 'true';
|
||||
if (!isMaintenanceMode) {
|
||||
return true;
|
||||
}
|
||||
const request = context.switchToHttp().getRequest();
|
||||
const authHeader = request.headers.authorization;
|
||||
if (authHeader && authHeader.startsWith('Bearer ')) {
|
||||
try {
|
||||
const token = authHeader.substring(7);
|
||||
const payload = this.jwtService.verify(token);
|
||||
if (payload.role === 'admin') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
}
|
||||
}
|
||||
const messageConfig = await this.prisma.appConfig.findUnique({
|
||||
where: { key: 'maintenance_message' },
|
||||
});
|
||||
const message = messageConfig?.value ||
|
||||
'System is under maintenance. Please try again later.';
|
||||
throw new common_1.ServiceUnavailableException({
|
||||
statusCode: 503,
|
||||
message: message,
|
||||
maintenanceMode: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.MaintenanceGuard = MaintenanceGuard;
|
||||
exports.MaintenanceGuard = MaintenanceGuard = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__metadata("design:paramtypes", [core_1.Reflector,
|
||||
prisma_service_1.PrismaService,
|
||||
jwt_1.JwtService])
|
||||
], MaintenanceGuard);
|
||||
//# sourceMappingURL=maintenance.guard.js.map
|
||||
1
apps/api/dist/common/guards/maintenance.guard.js.map
vendored
Normal file
1
apps/api/dist/common/guards/maintenance.guard.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"maintenance.guard.js","sourceRoot":"","sources":["../../../src/common/guards/maintenance.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AACxB,uCAAyC;AACzC,gEAA4D;AAC5D,qCAAyC;AAGlC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAEjB;IACA;IACA;IAHV,YACU,SAAoB,EACpB,MAAqB,EACrB,UAAsB;QAFtB,cAAS,GAAT,SAAS,CAAW;QACpB,WAAM,GAAN,MAAM,CAAe;QACrB,eAAU,GAAV,UAAU,CAAY;IAC7B,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;QAEzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAU,iBAAiB,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;QACtF,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAU,iBAAiB,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE9F,IAAI,QAAQ,IAAI,kBAAkB,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAGD,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;YAC/D,KAAK,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE;SACnC,CAAC,CAAC;QAEH,MAAM,iBAAiB,GAAG,iBAAiB,EAAE,KAAK,KAAK,MAAM,CAAC;QAE9D,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAGD,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;QACpD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;QAEjD,IAAI,UAAU,IAAI,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBACtC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAG9C,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;oBAC7B,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;YAEjB,CAAC;QACH,CAAC;QAGD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;YAC3D,KAAK,EAAE,EAAE,GAAG,EAAE,qBAAqB,EAAE;SACtC,CAAC,CAAC;QAEH,MAAM,OAAO,GACX,aAAa,EAAE,KAAK;YACpB,sDAAsD,CAAC;QAEzD,MAAM,IAAI,oCAA2B,CAAC;YACpC,UAAU,EAAE,GAAG;YACf,OAAO,EAAE,OAAO;YAChB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAGU,gBAAS;QACZ,8BAAa;QACT,gBAAU;GAJrB,gBAAgB,CA4D5B"}
|
||||
2
apps/api/dist/health/health.controller.js
vendored
2
apps/api/dist/health/health.controller.js
vendored
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HealthController = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const prisma_service_1 = require("../prisma/prisma.service");
|
||||
const skip_maintenance_decorator_1 = require("../common/decorators/skip-maintenance.decorator");
|
||||
let HealthController = class HealthController {
|
||||
prisma;
|
||||
constructor(prisma) {
|
||||
@@ -40,6 +41,7 @@ __decorate([
|
||||
], HealthController.prototype, "db", null);
|
||||
exports.HealthController = HealthController = __decorate([
|
||||
(0, common_1.Controller)('health'),
|
||||
(0, skip_maintenance_decorator_1.SkipMaintenance)(),
|
||||
__metadata("design:paramtypes", [prisma_service_1.PrismaService])
|
||||
], HealthController);
|
||||
//# sourceMappingURL=health.controller.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../src/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6DAAyD;AAGlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACE;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAGtD,EAAE;QACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1B,CAAC;IAGK,AAAN,KAAK,CAAC,EAAE;QAEN,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA,UAAU,CAAC;QACtC,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC;IAC7B,CAAC;CACF,CAAA;AAdY,4CAAgB;AAI3B;IADC,IAAA,YAAG,GAAE;;;;0CAGL;AAGK;IADL,IAAA,YAAG,EAAC,IAAI,CAAC;;;;0CAKT;2BAbU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCAEkB,8BAAa;GADvC,gBAAgB,CAc5B"}
|
||||
{"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../src/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6DAAyD;AACzD,gGAAkF;AAI3E,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACE;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAGtD,EAAE;QACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1B,CAAC;IAGK,AAAN,KAAK,CAAC,EAAE;QAEN,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA,UAAU,CAAC;QACtC,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC;IAC7B,CAAC;CACF,CAAA;AAdY,4CAAgB;AAI3B;IADC,IAAA,YAAG,GAAE;;;;0CAGL;AAGK;IADL,IAAA,YAAG,EAAC,IAAI,CAAC;;;;0CAKT;2BAbU,gBAAgB;IAF5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;IACpB,IAAA,4CAAe,GAAE;qCAEqB,8BAAa;GADvC,gBAAgB,CAc5B"}
|
||||
2
apps/api/dist/otp/otp.service.js.map
vendored
2
apps/api/dist/otp/otp.service.js.map
vendored
File diff suppressed because one or more lines are too long
54
apps/api/dist/seed.js
vendored
54
apps/api/dist/seed.js
vendored
@@ -107,10 +107,22 @@ async function main() {
|
||||
features: {
|
||||
wallets: { limit: null, label: 'Unlimited wallets' },
|
||||
goals: { limit: null, label: 'Unlimited goals' },
|
||||
team: { enabled: true, maxMembers: 10, label: 'Team feature (10 members)' },
|
||||
api: { enabled: true, rateLimit: 1000, label: 'API access (1000 req/hr)' },
|
||||
team: {
|
||||
enabled: true,
|
||||
maxMembers: 10,
|
||||
label: 'Team feature (10 members)',
|
||||
},
|
||||
api: {
|
||||
enabled: true,
|
||||
rateLimit: 1000,
|
||||
label: 'API access (1000 req/hr)',
|
||||
},
|
||||
support: { level: 'priority', label: 'Priority support' },
|
||||
export: { enabled: true, formats: ['csv', 'excel', 'pdf'], label: 'All export formats' },
|
||||
export: {
|
||||
enabled: true,
|
||||
formats: ['csv', 'excel', 'pdf'],
|
||||
label: 'All export formats',
|
||||
},
|
||||
},
|
||||
badge: 'Popular',
|
||||
badgeColor: 'blue',
|
||||
@@ -141,10 +153,22 @@ async function main() {
|
||||
features: {
|
||||
wallets: { limit: null, label: 'Unlimited wallets' },
|
||||
goals: { limit: null, label: 'Unlimited goals' },
|
||||
team: { enabled: true, maxMembers: 10, label: 'Team feature (10 members)' },
|
||||
api: { enabled: true, rateLimit: 1000, label: 'API access (1000 req/hr)' },
|
||||
team: {
|
||||
enabled: true,
|
||||
maxMembers: 10,
|
||||
label: 'Team feature (10 members)',
|
||||
},
|
||||
api: {
|
||||
enabled: true,
|
||||
rateLimit: 1000,
|
||||
label: 'API access (1000 req/hr)',
|
||||
},
|
||||
support: { level: 'priority', label: 'Priority support' },
|
||||
export: { enabled: true, formats: ['csv', 'excel', 'pdf'], label: 'All export formats' },
|
||||
export: {
|
||||
enabled: true,
|
||||
formats: ['csv', 'excel', 'pdf'],
|
||||
label: 'All export formats',
|
||||
},
|
||||
discount: { value: '17%', label: 'Save 17% (2 months free)' },
|
||||
},
|
||||
badge: 'Best Value',
|
||||
@@ -161,7 +185,11 @@ async function main() {
|
||||
apiRateLimit: 1000,
|
||||
},
|
||||
});
|
||||
console.log('✅ Plans created:', [freePlan.name, proMonthly.name, proYearly.name]);
|
||||
console.log('✅ Plans created:', [
|
||||
freePlan.name,
|
||||
proMonthly.name,
|
||||
proYearly.name,
|
||||
]);
|
||||
console.log('\n💳 Creating default payment methods...');
|
||||
const bcaMethod = await prisma.paymentMethod.upsert({
|
||||
where: { id: 'bca-method' },
|
||||
@@ -211,7 +239,11 @@ async function main() {
|
||||
sortOrder: 3,
|
||||
},
|
||||
});
|
||||
console.log('✅ Payment methods created:', [bcaMethod.displayName, mandiriMethod.displayName, gopayMethod.displayName]);
|
||||
console.log('✅ Payment methods created:', [
|
||||
bcaMethod.displayName,
|
||||
mandiriMethod.displayName,
|
||||
gopayMethod.displayName,
|
||||
]);
|
||||
console.log('\n⚙️ Creating app config...');
|
||||
await prisma.appConfig.upsert({
|
||||
where: { key: 'MAINTENANCE_MODE' },
|
||||
@@ -253,7 +285,11 @@ async function main() {
|
||||
console.log(' Admin Email:', ADMIN_EMAIL);
|
||||
console.log(' Admin Password:', ADMIN_PASSWORD);
|
||||
console.log(' Plans:', [freePlan.name, proMonthly.name, proYearly.name].join(', '));
|
||||
console.log(' Payment Methods:', [bcaMethod.displayName, mandiriMethod.displayName, gopayMethod.displayName].join(', '));
|
||||
console.log(' Payment Methods:', [
|
||||
bcaMethod.displayName,
|
||||
mandiriMethod.displayName,
|
||||
gopayMethod.displayName,
|
||||
].join(', '));
|
||||
console.log('\n⚠️ IMPORTANT: Change admin password after first login!');
|
||||
console.log('\n🔗 Login at: http://localhost:5174/auth/login');
|
||||
}
|
||||
|
||||
2
apps/api/dist/seed.js.map
vendored
2
apps/api/dist/seed.js.map
vendored
File diff suppressed because one or more lines are too long
2
apps/api/dist/tsconfig.build.tsbuildinfo
vendored
2
apps/api/dist/tsconfig.build.tsbuildinfo
vendored
File diff suppressed because one or more lines are too long
2
apps/api/dist/users/users.controller.js.map
vendored
2
apps/api/dist/users/users.controller.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"users.controller.js","sourceRoot":"","sources":["../../src/users/users.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoF;AACpF,mDAA+C;AAC/C,mDAA+C;AAWxC,IAAM,eAAe,GAArB,MAAM,eAAe;IACG;IAA7B,YAA6B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAGpD,EAAE;QACA,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa,CACV,GAAoB,EACnB,IAAuC;QAE/C,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CAAQ,GAAoB;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC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AC;IACzD,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CAAQ,GAAoB;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa,CACV,GAAoB,EACnB,IAA0B;QAElC,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;CACF,CAAA;AA5BY,0CAAe;AAI1B;IADC,IAAA,YAAG,EAAC,IAAI,CAAC;;;;yCAGT;AAGK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;IAEZ,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;oDAGR;AAGK;IADL,IAAA,YAAG,EAAC,WAAW,CAAC;IACE,WAAA,IAAA,YAAG,GAAE,CAAA;;;;kDAEvB;AAGK;IADL,IAAA,eAAM,EAAC,SAAS,CAAC;IAEf,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;oDAGR;0BA3BU,eAAe;IAF3B,IAAA,mBAAU,EAAC,OAAO,CAAC;IACnB,IAAA,kBAAS,EAAC,sBAAS,CAAC;qCAEiB,4BAAY;GADrC,eAAe,CA4B3B"}
|
||||
2
apps/api/dist/users/users.service.js.map
vendored
2
apps/api/dist/users/users.service.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"users.service.js","sourceRoot":"","sources":["../../src/users/users.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwF;AACxF,6DAAyD;AACzD,mDAAoD;AACpD,+CAAiC;AAG1B,IAAM,YAAY,GAAlB,MAAM,YAAY;IACH;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,M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QAED,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,MAAM,IAAI,4BAAmB,CAC3B,sEAAsE,CACvE,CAAC;QACJ,CAAC;QAGD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAClE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,8BAAqB,CAAC,oBAAoB,CAAC,CAAC;QACxD,CAAC;QAID,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;YACvC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;SAC1B,CAAC,CAAC;QAMH,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC5B,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;SACtB,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,8BAA8B;SACxC,CAAC;IACJ,CAAC;CACF,CAAA;AAxGY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEiB,8BAAa;GAD9B,YAAY,CAwGxB"}
|
||||
28
apps/api/dist/wallets/wallets.controller.d.ts
vendored
28
apps/api/dist/wallets/wallets.controller.d.ts
vendored
@@ -11,11 +11,11 @@ export declare class WalletsController {
|
||||
constructor(wallets: WalletsService, transactions: TransactionsService);
|
||||
list(req: RequestWithUser): import("@prisma/client").Prisma.PrismaPromise<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -23,15 +23,15 @@ export declare class WalletsController {
|
||||
deletedAt: Date | null;
|
||||
}[]>;
|
||||
getAllTransactions(req: RequestWithUser): Promise<{
|
||||
category: string | null;
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
walletId: string;
|
||||
date: Date;
|
||||
userId: string;
|
||||
amount: import("@prisma/client/runtime/library").Decimal;
|
||||
direction: string;
|
||||
category: string | null;
|
||||
date: Date;
|
||||
memo: string | null;
|
||||
walletId: string;
|
||||
recurrenceId: string | null;
|
||||
}[]>;
|
||||
create(req: RequestWithUser, body: {
|
||||
@@ -43,11 +43,11 @@ export declare class WalletsController {
|
||||
pricePerUnit?: number;
|
||||
}): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -65,11 +65,11 @@ export declare class WalletsController {
|
||||
pricePerUnit?: number;
|
||||
}): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -86,11 +86,11 @@ export declare class WalletsController {
|
||||
updated: number;
|
||||
wallets: {
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -102,11 +102,11 @@ export declare class WalletsController {
|
||||
};
|
||||
delete(req: RequestWithUser, id: string): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
|
||||
20
apps/api/dist/wallets/wallets.service.d.ts
vendored
20
apps/api/dist/wallets/wallets.service.d.ts
vendored
@@ -4,11 +4,11 @@ export declare class WalletsService {
|
||||
constructor(prisma: PrismaService);
|
||||
list(userId: string): import("@prisma/client").Prisma.PrismaPromise<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -24,11 +24,11 @@ export declare class WalletsService {
|
||||
pricePerUnit?: number;
|
||||
}): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -44,11 +44,11 @@ export declare class WalletsService {
|
||||
pricePerUnit?: number;
|
||||
}): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -63,11 +63,11 @@ export declare class WalletsService {
|
||||
updated: number;
|
||||
wallets: {
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
@@ -77,11 +77,11 @@ export declare class WalletsService {
|
||||
}>;
|
||||
delete(userId: string, id: string): import("@prisma/client").Prisma.Prisma__WalletClient<{
|
||||
id: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
kind: string;
|
||||
name: string;
|
||||
userId: string;
|
||||
kind: string;
|
||||
currency: string | null;
|
||||
unit: string | null;
|
||||
initialAmount: import("@prisma/client/runtime/library").Decimal | null;
|
||||
|
||||
Reference in New Issue
Block a user