diff --git a/backend/src/admin/admin.controller.ts b/backend/src/admin/admin.controller.ts index 803535cd..d383687c 100644 --- a/backend/src/admin/admin.controller.ts +++ b/backend/src/admin/admin.controller.ts @@ -14,7 +14,7 @@ import { Param, Res, } from '@nestjs/common'; -import { ExportDataObject, SessionData, UserObject } from 'utils/types'; +import { ExportDataObject, SessionData, UserObject } from 'src/types'; import { AxiosRequestConfig } from 'axios'; import { AdminService } from './admin.service'; import { AuthenticationFilter } from 'src/authentication/authentication.filter'; diff --git a/backend/src/admin/admin.service.ts b/backend/src/admin/admin.service.ts index 71206898..008cd080 100644 --- a/backend/src/admin/admin.service.ts +++ b/backend/src/admin/admin.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import * as dotenv from 'dotenv'; import { HttpService } from '@nestjs/axios'; -import { SearchResultsItem, UserObject } from 'utils/types'; +import { SearchResultsItem, UserObject } from 'src/types'; import { DocumentTemplateService } from 'src/document_template/document_template.service'; import { ProvisionService } from 'src/provision/provision.service'; import { DocumentTypeService } from 'src/document_type/document_type.service'; diff --git a/backend/src/app.controller.ts b/backend/src/app.controller.ts index 2aa15911..fa952e81 100644 --- a/backend/src/app.controller.ts +++ b/backend/src/app.controller.ts @@ -1,7 +1,7 @@ import { Get, Controller, Render, Param, UseGuards, UseFilters, Session, Query, Res } from '@nestjs/common'; import { AppService } from '../src/app.service'; -import { NFR_VARIANTS, NFR_VARIANTS_ARRAY, PAGE_TITLES, REPORT_TYPES } from 'utils/constants'; -import { SessionData } from 'utils/types'; +import { NFR_VARIANTS, NFR_VARIANTS_ARRAY, PAGE_TITLES, REPORT_TYPES } from 'src/constants'; +import { SessionData } from 'src/types'; import { AuthenticationGuard } from './authentication/authentication.guard'; import { AuthenticationFilter } from './authentication/authentication.filter'; import { TTLSService } from './ttls/ttls.service'; @@ -11,7 +11,7 @@ import { firstValueFrom } from 'rxjs'; import { Req } from '@nestjs/common/decorators/http/route-params.decorator'; import { Request, Response } from 'express'; import { ReportService } from './report/report.service'; -import { nfrInterestedParties } from 'utils/util'; +import { nfrInterestedParties } from 'src/util'; // let requestUrl: string; diff --git a/backend/src/authentication/authentication.controller.ts b/backend/src/authentication/authentication.controller.ts index 2ac1a23a..557fe3aa 100644 --- a/backend/src/authentication/authentication.controller.ts +++ b/backend/src/authentication/authentication.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Post, Session, UseFilters, UseGuards } from '@nestjs/common'; -import { SessionData } from 'utils/types'; +import { SessionData } from 'src/types'; import { AuthenticationFilter } from './authentication.filter'; import { AuthenticationGuard } from './authentication.guard'; diff --git a/backend/src/authentication/authentication.guard.ts b/backend/src/authentication/authentication.guard.ts index 35f553c1..ea285071 100644 --- a/backend/src/authentication/authentication.guard.ts +++ b/backend/src/authentication/authentication.guard.ts @@ -3,7 +3,7 @@ import { CanActivate, ExecutionContext, Injectable, UnauthorizedException } from import { AuthenticationService } from './authentication.service'; import { Request } from 'express'; import { URL } from 'url'; -import { AccountObject, TokenObject } from 'utils/types'; +import { AccountObject, TokenObject } from 'src/types'; @Injectable() export class AuthenticationGuard implements CanActivate { diff --git a/backend/src/authentication/authentication.service.ts b/backend/src/authentication/authentication.service.ts index db397e9e..c8e1a7a0 100644 --- a/backend/src/authentication/authentication.service.ts +++ b/backend/src/authentication/authentication.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import * as base64 from 'base-64'; import { URLSearchParams } from 'url'; import jwt_decode from 'jwt-decode'; -import { AccountObject, TokenObject } from 'utils/types'; +import { AccountObject, TokenObject } from 'src/types'; const axios = require('axios'); export class AuthenticationError extends Error {} diff --git a/backend/utils/constants.ts b/backend/src/constants.ts similarity index 100% rename from backend/utils/constants.ts rename to backend/src/constants.ts diff --git a/backend/src/document_data/document_data.controller.ts b/backend/src/document_data/document_data.controller.ts index 8789d934..cff71bb8 100644 --- a/backend/src/document_data/document_data.controller.ts +++ b/backend/src/document_data/document_data.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common'; -import { ProvisionJSON, VariableJSON } from 'utils/types'; +import { ProvisionJSON, VariableJSON } from 'src/types'; import { CreateDocumentDataDto } from './dto/create-document_data.dto'; import { DocumentDataService } from './document_data.service'; diff --git a/backend/src/document_template/document_template.controller.ts b/backend/src/document_template/document_template.controller.ts index daa1ca7b..6d2ada4a 100644 --- a/backend/src/document_template/document_template.controller.ts +++ b/backend/src/document_template/document_template.controller.ts @@ -6,7 +6,7 @@ import { FileInterceptor } from '@nestjs/platform-express'; import { Express } from 'express'; import { Param } from '@nestjs/common/decorators'; import { DocumentTemplate } from './entities/document_template.entity'; -import { TrimmedDocumentTemplate } from '../../utils/types'; +import { TrimmedDocumentTemplate } from '../types'; @Controller('document-template') export class DocumentTemplateController { diff --git a/backend/src/document_type/document_type.controller.ts b/backend/src/document_type/document_type.controller.ts index a1908e4f..eb5d974c 100644 --- a/backend/src/document_type/document_type.controller.ts +++ b/backend/src/document_type/document_type.controller.ts @@ -3,7 +3,7 @@ import { AuthenticationFilter } from 'src/authentication/authentication.filter'; import { AuthenticationGuard } from 'src/authentication/authentication.guard'; import { GenerateReportGuard } from 'src/authentication/generate-report.guard'; import { DocumentTypeService } from './document_type.service'; -import { SessionData } from 'utils/types'; +import { SessionData } from 'src/types'; import { ProvisionGroup } from './entities/provision_group.entity'; // @UseFilters(AuthenticationFilter) diff --git a/backend/src/provision/provision.controller.ts b/backend/src/provision/provision.controller.ts index a91c909e..41e8777f 100644 --- a/backend/src/provision/provision.controller.ts +++ b/backend/src/provision/provision.controller.ts @@ -1,7 +1,7 @@ import { Body, Controller, Get, Param, Post, Session } from '@nestjs/common'; import { CreateProvisionDto } from './dto/create-provision.dto'; import { ProvisionService } from './provision.service'; -import { ManageDocTypeProvision, SessionData } from 'utils/types'; +import { ManageDocTypeProvision, SessionData } from 'src/types'; @Controller('provision') export class ProvisionController { diff --git a/backend/src/provision/provision.service.ts b/backend/src/provision/provision.service.ts index 72c08799..f132ae74 100644 --- a/backend/src/provision/provision.service.ts +++ b/backend/src/provision/provision.service.ts @@ -9,7 +9,7 @@ import { DocumentTypeService } from 'src/document_type/document_type.service'; import { DocumentType } from 'src/document_type/entities/document_type.entity'; import { DocumentTypeProvision } from './entities/document_type_provision'; import { ProvisionGroup } from 'src/document_type/entities/provision_group.entity'; -import { ManageDocTypeProvision } from 'utils/types'; +import { ManageDocTypeProvision } from 'src/types'; @Injectable() export class ProvisionService { diff --git a/backend/src/report/report.controller.ts b/backend/src/report/report.controller.ts index 520465fa..70e94e80 100644 --- a/backend/src/report/report.controller.ts +++ b/backend/src/report/report.controller.ts @@ -10,7 +10,7 @@ import { UseGuards, UseFilters, } from '@nestjs/common'; -import { ProvisionJSON, SessionData, VariableJSON } from 'utils/types'; +import { ProvisionJSON, SessionData, VariableJSON } from 'src/types'; import { TTLSService } from '../ttls/ttls.service'; import { AxiosRequestConfig } from 'axios'; import { AuthenticationFilter } from 'src/authentication/authentication.filter'; diff --git a/backend/src/report/report.service.ts b/backend/src/report/report.service.ts index d68cd8e3..9e5815dd 100644 --- a/backend/src/report/report.service.ts +++ b/backend/src/report/report.service.ts @@ -4,9 +4,9 @@ import { firstValueFrom } from 'rxjs'; import { DocumentTemplateService } from 'src/document_template/document_template.service'; import { ProvisionService } from 'src/provision/provision.service'; import { TTLSService } from 'src/ttls/ttls.service'; -import { GL_REPORT_TYPE, LUR_REPORT_TYPE, SL_REPORT_TYPE, numberWords, sectionTitles } from 'utils/constants'; -import { ProvisionJSON, VariableJSON } from 'utils/types'; -import { convertToSpecialCamelCase, formatMoney, grazingLeaseVariables, nfrAddressBuilder } from 'utils/util'; +import { GL_REPORT_TYPE, LUR_REPORT_TYPE, SL_REPORT_TYPE, numberWords, sectionTitles } from 'src/constants'; +import { ProvisionJSON, VariableJSON } from 'src/types'; +import { convertToSpecialCamelCase, formatMoney, grazingLeaseVariables, nfrAddressBuilder } from 'src/util'; import { DocumentDataService } from 'src/document_data/document_data.service'; import { DocumentDataLogService } from 'src/document_data_log/document_data_log.service'; import { DocumentTypeService } from 'src/document_type/document_type.service'; diff --git a/backend/src/ttls/ttls.service.ts b/backend/src/ttls/ttls.service.ts index c8ff3c48..ea6bd1d8 100644 --- a/backend/src/ttls/ttls.service.ts +++ b/backend/src/ttls/ttls.service.ts @@ -6,7 +6,7 @@ import { map } from 'rxjs/operators'; import { URLSearchParams } from 'url'; import * as dotenv from 'dotenv'; import * as base64 from 'base-64'; -import { formatPostalCode, getNFRMailingAddress } from 'utils/util'; +import { formatPostalCode, getNFRMailingAddress } from 'src/util'; declare const Buffer; const axios = require('axios'); diff --git a/backend/utils/types.ts b/backend/src/types.ts similarity index 100% rename from backend/utils/types.ts rename to backend/src/types.ts diff --git a/backend/utils/util.ts b/backend/src/util.ts similarity index 100% rename from backend/utils/util.ts rename to backend/src/util.ts