refactor(nestjs): auth module

This commit is contained in:
Ahmed Bouhuolia
2025-04-01 09:13:12 +02:00
parent 88f66f1c1c
commit ed81d4c1e0
63 changed files with 321 additions and 181 deletions

View File

@@ -4,11 +4,9 @@ import { IAPAgingSummaryQuery } from './APAgingSummary.types';
import { AcceptType } from '@/constants/accept-type';
import { Response } from 'express';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('reports/payable-aging-summary')
@ApiTags('reports')
@PublicRoute()
export class APAgingSummaryController {
constructor(private readonly APAgingSummaryApp: APAgingSummaryApplication) {}

View File

@@ -4,12 +4,10 @@ import { Query, Res } from '@nestjs/common';
import { ARAgingSummaryApplication } from './ARAgingSummaryApplication';
import { AcceptType } from '@/constants/accept-type';
import { Response } from 'express';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
@Controller('reports/receivable-aging-summary')
@ApiTags('reports')
@PublicRoute()
export class ARAgingSummaryController {
constructor(private readonly ARAgingSummaryApp: ARAgingSummaryApplication) {}

View File

@@ -3,11 +3,9 @@ import { Controller, Get, Headers, Query, Res } from '@nestjs/common';
import { ICashFlowStatementQuery } from './Cashflow.types';
import { AcceptType } from '@/constants/accept-type';
import { CashflowSheetApplication } from './CashflowSheetApplication';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
@Controller('reports/cashflow-statement')
@PublicRoute()
@ApiTags('reports')
export class CashflowController {
constructor(private readonly cashflowSheetApp: CashflowSheetApplication) {}

View File

@@ -4,11 +4,9 @@ import { Controller, Get, Headers, Query, Res } from '@nestjs/common';
import { ICustomerBalanceSummaryQuery } from './CustomerBalanceSummary.types';
import { CustomerBalanceSummaryApplication } from './CustomerBalanceSummaryApplication';
import { AcceptType } from '@/constants/accept-type';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('/reports/customer-balance-summary')
@ApiTags('reports')
@PublicRoute()
export class CustomerBalanceSummaryController {
constructor(
private readonly customerBalanceSummaryApp: CustomerBalanceSummaryApplication,

View File

@@ -4,11 +4,9 @@ import { Controller, Get, Headers, Query, Res } from '@nestjs/common';
import { IGeneralLedgerSheetQuery } from './GeneralLedger.types';
import { GeneralLedgerApplication } from './GeneralLedgerApplication';
import { AcceptType } from '@/constants/accept-type';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('/reports/general-ledger')
@ApiTags('reports')
@PublicRoute()
export class GeneralLedgerController {
constructor(
private readonly generalLedgerApplication: GeneralLedgerApplication,

View File

@@ -3,11 +3,9 @@ import { InventoryItemDetailsApplication } from './InventoryItemDetailsApplicati
import { IInventoryDetailsQuery } from './InventoryItemDetails.types';
import { AcceptType } from '@/constants/accept-type';
import { Response } from 'express';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
@Controller('reports/inventory-item-details')
@PublicRoute()
@ApiTags('reports')
export class InventoryItemDetailsController {
constructor(

View File

@@ -4,10 +4,8 @@ import { Controller, Get, Headers, Query, Res } from '@nestjs/common';
import { InventoryValuationSheetApplication } from './InventoryValuationSheetApplication';
import { IInventoryValuationReportQuery } from './InventoryValuationSheet.types';
import { AcceptType } from '@/constants/accept-type';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('reports/inventory-valuation')
@PublicRoute()
@ApiTags('reports')
export class InventoryValuationController {
constructor(

View File

@@ -4,11 +4,9 @@ import { Response } from 'express';
import { AcceptType } from '@/constants/accept-type';
import { JournalSheetApplication } from './JournalSheetApplication';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('/reports/journal')
@ApiTags('reports')
@PublicRoute()
export class JournalSheetController {
constructor(private readonly journalSheetApp: JournalSheetApplication) {}

View File

@@ -3,12 +3,10 @@ import { Controller, Get, Headers, Query, Res } from '@nestjs/common';
import { IProfitLossSheetQuery } from './ProfitLossSheet.types';
import { ProfitLossSheetApplication } from './ProfitLossSheetApplication';
import { AcceptType } from '@/constants/accept-type';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
@Controller('/reports/profit-loss-sheet')
@ApiTags('reports')
@PublicRoute()
export class ProfitLossSheetController {
constructor(
private readonly profitLossSheetApp: ProfitLossSheetApplication,

View File

@@ -3,16 +3,9 @@ import { Controller, Get, Headers, Query, Res } from '@nestjs/common';
import { PurchasesByItemsApplication } from './PurchasesByItemsApplication';
import { IPurchasesByItemsReportQuery } from './types/PurchasesByItems.types';
import { AcceptType } from '@/constants/accept-type';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import {
ApiOperation,
ApiResponse,
ApiResponseProperty,
ApiTags,
} from '@nestjs/swagger';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
@Controller('/reports/purchases-by-items')
@PublicRoute()
@ApiTags('reports')
export class PurchasesByItemReportController {
constructor(

View File

@@ -3,12 +3,10 @@ import { SalesTaxLiabilitySummaryQuery } from './SalesTaxLiability.types';
import { AcceptType } from '@/constants/accept-type';
import { SalesTaxLiabilitySummaryApplication } from './SalesTaxLiabilitySummaryApplication';
import { Response } from 'express';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
@Controller('/reports/sales-tax-liability-summary')
@ApiTags('reports')
@PublicRoute()
export class SalesTaxLiabilitySummaryController {
constructor(
private readonly salesTaxLiabilitySummaryApp: SalesTaxLiabilitySummaryApplication,

View File

@@ -4,11 +4,9 @@ import { ITransactionsByCustomersFilter } from './TransactionsByCustomer.types';
import { TransactionsByCustomerApplication } from './TransactionsByCustomersApplication';
import { AcceptType } from '@/constants/accept-type';
import { Response } from 'express';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('/reports/transactions-by-customers')
@ApiTags('reports')
@PublicRoute()
export class TransactionsByCustomerController {
constructor(
private readonly transactionsByCustomersApp: TransactionsByCustomerApplication,

View File

@@ -1,12 +1,10 @@
import { Controller, Get, Query } from '@nestjs/common';
import { TransactionsByReferenceApplication } from './TransactionsByReferenceApplication';
import { ITransactionsByReferenceQuery } from './TransactionsByReference.types';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
@Controller('reports/transactions-by-reference')
@ApiTags('reports')
@PublicRoute()
export class TransactionsByReferenceController {
constructor(
private readonly transactionsByReferenceApp: TransactionsByReferenceApplication,

View File

@@ -4,11 +4,9 @@ import { AcceptType } from '@/constants/accept-type';
import { Response } from 'express';
import { TransactionsByVendorApplication } from './TransactionsByVendorApplication';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('/reports/transactions-by-vendors')
@ApiTags('reports')
@PublicRoute()
export class TransactionsByVendorController {
constructor(
private readonly transactionsByVendorsApp: TransactionsByVendorApplication,

View File

@@ -5,11 +5,9 @@ import { Response } from 'express';
import { ITrialBalanceSheetQuery } from './TrialBalanceSheet.types';
import { AcceptType } from '@/constants/accept-type';
import { TrialBalanceSheetApplication } from './TrialBalanceSheetApplication';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('reports/trial-balance-sheet')
@ApiTags('reports')
@PublicRoute()
export class TrialBalanceSheetController {
constructor(
private readonly trialBalanceSheetApp: TrialBalanceSheetApplication,

View File

@@ -4,11 +4,9 @@ import { VendorBalanceSummaryApplication } from './VendorBalanceSummaryApplicati
import { Response } from 'express';
import { AcceptType } from '@/constants/accept-type';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { PublicRoute } from '@/modules/Auth/guards/Jwt.local';
@Controller('/reports/vendor-balance-summary')
@ApiTags('reports')
@PublicRoute()
export class VendorBalanceSummaryController {
constructor(
private readonly vendorBalanceSummaryApp: VendorBalanceSummaryApplication,