diff --git a/src/dto/carnet-application/carnet-application-property.dto.ts b/src/dto/carnet-application/carnet-application-property.dto.ts new file mode 100644 index 0000000..0224a8b --- /dev/null +++ b/src/dto/carnet-application/carnet-application-property.dto.ts @@ -0,0 +1,287 @@ + + +import { ApiProperty } from "@nestjs/swagger"; +import { Transform, Type } from "class-transformer"; +import { + IsArray, IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsOptional, IsString, + Length, Matches, Max, MaxLength, Min, ValidateNested +} from "class-validator"; + +export enum YON { + YES = "Y", + NO = "N", +} + +export class CARNETSTATUS_DTO { + @ApiProperty({ required: true }) + @Length(0, 20, { + message: 'Property P_CARNETSTATUS must be between 0 to 20 characters', + }) + @IsString() + @IsDefined({ message: 'Property P_CARNETSTATUS is required' }) + P_CARNETSTATUS: string; +} + +export class HEADERID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { + message: 'Property P_HEADERID must not exceed 999999999', + }) + @Min(0, { message: 'Property P_HEADERID must be at least 0 or more' }) + @IsInt({ message: 'Property P_HEADERID allows only whole numbers' }) + @IsNumber({}, { message: 'Property P_HEADERID must be a number' }) + @IsDefined({ message: 'Property P_HEADERID is required' }) + P_HEADERID: number; +} + +export class APPLICATIONNAME_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_APPLICATIONNAME must be a string' }) + @IsDefined({ message: 'Property P_APPLICATIONNAME is required' }) + P_APPLICATIONNAME: string; +} + +export class COMMERCIAL_SAMPLE_FLAG_DTO { + @ApiProperty({ required: true, enum: YON }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(YON, { message: 'P_COMMERCIALSAMPLEFLAG must be either "Y" or "N"' }) + @Length(1, 1, { message: 'P_COMMERCIALSAMPLEFLAG must be 1 character' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_COMMERCIALSAMPLEFLAG: YON; +} + +export class PROF_EQUIPMENT_FLAG_DTO { + @ApiProperty({ required: true, enum: YON }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(YON, { message: 'P_PROFEQUIMENTFLAG must be either "Y" or "N"' }) + @Length(1, 1, { message: 'P_PROFEQUIMENTFLAG must be 1 character' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_PROFEQUIPMENTFLAG: YON; +} + +export class EXIBITIONS_FAIR_FLAG_DTO { + @ApiProperty({ required: true, enum: YON }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(YON, { message: 'P_EXIBITIONSFAIRFLAG must be either "Y" or "N"' }) + @Length(1, 1, { message: 'P_EXIBITIONSFAIRFLAG must be 1 character' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_EXHIBITIONSFAIRFLAG: YON; +} + +export class AUTO_FLAG_DTO { + @ApiProperty({ required: true, enum: YON }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(YON, { message: 'P_AUTOFLAG must be either "Y" or "N"' }) + @Length(1, 1, { message: 'P_AUTOFLAG must be 1 character' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_AUTOFLAG: YON; +} + +export class HORSE_FLAG_DTO { + @ApiProperty({ required: true, enum: YON }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(YON, { message: 'P_HORSEFLAG must be either "Y" or "N"' }) + @Length(1, 1, { message: 'P_HORSEFLAG must be 1 character' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_HORSEFLAG: YON; +} + +export class AUTHREP_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_AUTHREP must be a string' }) + @IsDefined({ message: 'Property P_AUTHREP is required' }) + P_AUTHREP: string; +} + +export class GLTABLE_ROW_DTO { + @ApiProperty({ required: true }) + @Max(99999, { message: 'Property ITEMNO must not exceed 99999' }) + @Min(0, { message: 'Property ITEMNO must be at least 0 or more' }) + @IsInt({ message: 'Property ITEMNO allows only whole numbers' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property ITEMNO must be a number' }) + @IsDefined({ message: 'Property ITEMNO is required' }) + ITEMNO: number; + + @ApiProperty({ required: true }) + @MaxLength(200, { message: 'Property ITEMDESCRIPTION must not exceed 200 characters' }) + @IsString({ message: 'Property ITEMDESCRIPTION must be a string' }) + @IsDefined({ message: 'Property ITEMDESCRIPTION is required' }) + ITEMDESCRIPTION: string; + + @ApiProperty({ required: true }) + @Max(999999999.99, { message: 'Property ITEMVALUE must not exceed 999999999.99' }) + @Min(0, { message: 'Property ITEMVALUE must be at least 0 or more' }) + @Transform(({ value }) => Number(value)) + @IsNumber({ maxDecimalPlaces: 2 }, { message: 'Property ITEMVALUE must be a number' }) + @IsDefined({ message: 'Property ITEMVALUE is required' }) + ITEMVALUE: number; + + @ApiProperty({ required: true }) + @Max(99999, { message: 'Property NOOFPIECES must not exceed 99999' }) + @Min(0, { message: 'Property NOOFPIECES must be at least 0 or more' }) + @IsInt({ message: 'Property NOOFPIECES allows only whole numbers' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property NOOFPIECES must be a number' }) + @IsDefined({ message: 'Property NOOFPIECES is required' }) + NOOFPIECES: number; + + @ApiProperty({ required: true }) + @Max(99999.9999, { message: 'Property ITEMVALUE must not exceed 999999999.99' }) + @Min(0, { message: 'Property ITEMVALUE must be at least 0 or more' }) + @Transform(({ value }) => Number(value)) + @IsNumber({ maxDecimalPlaces: 2 }, { message: 'Property ITEMVALUE must be a number' }) + @IsDefined({ message: 'Property ITEMVALUE is required' }) + ITEMWEIGHT: number; + + @ApiProperty({ required: true }) + @MaxLength(10, { message: 'Property ITEMWEIGHTUOM must not exceed 10 characters' }) + @IsString({ message: 'Property ITEMWEIGHTUOM must be a string' }) + @IsDefined({ message: 'Property ITEMWEIGHTUOM is required' }) + ITEMWEIGHTUOM: string; + + @ApiProperty({ required: true }) + @MaxLength(2, { message: 'Property GOODSORIGINCOUNTRY must not exceed 2 characters' }) + @IsString({ message: 'Property GOODSORIGINCOUNTRY must be a string' }) + @IsDefined({ message: 'Property GOODSORIGINCOUNTRY is required' }) + GOODSORIGINCOUNTRY: string; +} + +export class GLTABLE_DTO { + @ApiProperty({ required: true, type: () => [GLTABLE_ROW_DTO] }) + @Type(() => GLTABLE_ROW_DTO) + @ValidateNested({ each: true }) + @IsArray({ message: 'Property P_GLTABLE allows only array type' }) + @IsDefined({ message: 'Property P_GLTABLE is required' }) + P_GLTABLE: GLTABLE_ROW_DTO[]; +} + +export class USSETS_DTO { + @ApiProperty({ required: true }) + // @Max(99999, { message: 'Property P_USSETS must not exceed 99999' }) + @Min(0, { message: 'Property P_USSETS must be at least 0 or more' }) + @IsInt({ message: 'Property P_USSETS allows only whole numbers' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property P_USSETS must be a number' }) + @IsDefined({ message: 'Property P_USSETS is required' }) + P_USSETS: number; +} + +export enum VOT { + V = "V", + T = "T", +} + +export class COUNTRYTABLE_ROW_DTO { + @ApiProperty({ required: true, enum: VOT }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(VOT, { message: 'P_VISISTTRANSITIND must be either "V" or "T"' }) + @Length(1, 1, { message: 'P_VISISTTRANSITIND must be 1 character' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_VISISTTRANSITIND: VOT; + + + @ApiProperty({ required: true }) + @MaxLength(2, { message: 'Property COUNTRYCODE must not exceed 2 characters' }) + @IsString({ message: 'Property COUNTRYCODE must be a string' }) + @IsDefined({ message: 'Property COUNTRYCODE is required' }) + COUNTRYCODE: string; + + @ApiProperty({ required: true }) + @Max(999, { message: 'Property NOOFTIMESENTLEAVE must not exceed 999' }) + @Min(0, { message: 'Property NOOFTIMESENTLEAVE must be at least 0 or more' }) + @IsInt({ message: 'Property NOOFTIMESENTLEAVE allows only whole numbers' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property NOOFTIMESENTLEAVE must be a number' }) + @IsDefined({ message: 'Property NOOFTIMESENTLEAVE is required' }) + NOOFTIMESENTLEAVE: number; +} + +export class COUNTRYTABLE_DTO { + @ApiProperty({ required: true, type: () => [COUNTRYTABLE_ROW_DTO] }) + @Type(() => COUNTRYTABLE_ROW_DTO) + @ValidateNested({ each: true }) + @IsArray({ message: 'Property P_COUNTRYTABLE allows only array type' }) + @IsDefined({ message: 'Property P_COUNTRYTABLE is required' }) + P_COUNTRYTABLE: COUNTRYTABLE_ROW_DTO[]; +} + +export class SHIPTOTYPE_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_SHIPTOTYPE must be a string' }) + @IsDefined({ message: 'Property P_SHIPTOTYPE is required' }) + P_SHIPTOTYPE: string; +} + +export class SHIPADDRID_DTO { + @ApiProperty({ required: true }) + // @Max(99999, { message: 'Property P_USSETS must not exceed 99999' }) + @Min(0, { message: 'Property P_SHIPADDRID must be at least 0 or more' }) + @IsInt({ message: 'Property P_SHIPADDRID allows only whole numbers' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property P_SHIPADDRID must be a number' }) + @IsDefined({ message: 'Property P_SHIPADDRID is required' }) + P_SHIPADDRID: number; +} + +export class FORMOFSECURITY_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_FORMOFSECURITY must be a string' }) + @IsDefined({ message: 'Property P_FORMOFSECURITY is required' }) + P_FORMOFSECURITY: string; +} + +export class INSPROTECTION_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_INSPROTECTION must be a string' }) + @IsDefined({ message: 'Property P_INSPROTECTION is required' }) + P_INSPROTECTION: string; +} + +export class LDIPROTECTION_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_LDIPROTECTION must be a string' }) + @IsDefined({ message: 'Property P_LDIPROTECTION is required' }) + P_LDIPROTECTION: string; +} + +export class DELIVERYTYPE_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_DELIVERYTYPE must be a string' }) + @IsDefined({ message: 'Property P_DELIVERYTYPE is required' }) + P_DELIVERYTYPE: string; +} + +export class DELIVERYMETHOD_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_DELIVERYTYPE must be a string' }) + @IsDefined({ message: 'Property P_DELIVERYTYPE is required' }) + P_DELIVERYMETHOD: string; +} + +export class PAYMENTMETHOD_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_PAYMENTMETHOD must be a string' }) + @IsDefined({ message: 'Property P_PAYMENTMETHOD is required' }) + P_PAYMENTMETHOD: string; +} + +export class CUSTCOURIERNO_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_CUSTCOURIERNO must be a string' }) + @IsDefined({ message: 'Property P_CUSTCOURIERNO is required' }) + P_CUSTCOURIERNO: string; +} + +export class REFNO_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_REFNO must be a string' }) + @IsDefined({ message: 'Property P_REFNO is required' }) + P_REFNO: string; +} \ No newline at end of file diff --git a/src/dto/carnet-application/carnet-application.dto.ts b/src/dto/carnet-application/carnet-application.dto.ts index f24f429..a18af2b 100644 --- a/src/dto/carnet-application/carnet-application.dto.ts +++ b/src/dto/carnet-application/carnet-application.dto.ts @@ -1,15 +1,18 @@ import { IntersectionType, PartialType } from "@nestjs/swagger"; + import { - APPLICATIONNAME_DTO, AUTHREP_DTO, AUTO_FLAG_DTO, CLIENTID_DTO, - COMMERCIAL_SAMPLE_FLAG_DTO, COUNTRYTABLE_DTO, CUSTCOURIERNO_DTO, - DELIVERYMETHOD_DTO, DELIVERYTYPE_DTO, EXIBITIONS_FAIR_FLAG_DTO, - FORMOFSECURITY_DTO, GLTABLE_DTO, HEADERID_DTO, HOLDERID_DTO, - HORSE_FLAG_DTO, INSPROTECTION_DTO, LDIPROTECTION_DTO, - LOCATIONID_DTO, NOTES_DTO, PAYMENTMETHOD_DTO, - PROF_EQUIPMENT_FLAG_DTO, REFNO_DTO, SHIPADDRID_DTO, - SHIPTOTYPE_DTO, USERID_DTO, USSETS_DTO -} from "../property.dto"; -import { SPID_DTO } from "../sp/sp-property.dto"; + APPLICATIONNAME_DTO, AUTHREP_DTO, AUTO_FLAG_DTO, COMMERCIAL_SAMPLE_FLAG_DTO, + COUNTRYTABLE_DTO, CUSTCOURIERNO_DTO, DELIVERYMETHOD_DTO, DELIVERYTYPE_DTO, + EXIBITIONS_FAIR_FLAG_DTO, FORMOFSECURITY_DTO, GLTABLE_DTO, HEADERID_DTO, + HORSE_FLAG_DTO, INSPROTECTION_DTO, LDIPROTECTION_DTO, PAYMENTMETHOD_DTO, + PROF_EQUIPMENT_FLAG_DTO, REFNO_DTO, SHIPADDRID_DTO, SHIPTOTYPE_DTO, USSETS_DTO +} from "./carnet-application-property.dto"; + +import { NOTES_DTO, SPID_DTO, USERID_DTO } from "../uscib-managed-sp/sp/sp-property.dto"; + +import { CLIENTID_DTO } from "../manage-clients/manage-clients-property.dto"; + +import { HOLDERID_DTO, LOCATIONID_DTO } from "../manage-holders/manage-holders-property.dto"; export class SaveCarnetApplicationDTO extends IntersectionType( @@ -48,5 +51,5 @@ export class TransmitApplicationtoProcessDTO extends IntersectionType( // processing [ PROCESSINGCENTER_PKG ] -export class CarnetProcessingCenterDTO extends(IntersectionType(USERID_DTO,HEADERID_DTO)){} +export class CarnetProcessingCenterDTO extends (IntersectionType(USERID_DTO, HEADERID_DTO)) { } diff --git a/src/dto/carnet/carnet.dto.ts b/src/dto/carnet/carnet.dto.ts deleted file mode 100644 index 88af58c..0000000 --- a/src/dto/carnet/carnet.dto.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IntersectionType } from "@nestjs/swagger"; -import { SPID_DTO } from "../sp/sp-property.dto"; -import { USERID_DTO } from "../property.dto"; -import { CARNETSTATUS_DTO } from "./carnet-property.dto"; - -export class GetCarnetDetailsbyCarnetStatusDTO extends IntersectionType( - SPID_DTO, - USERID_DTO, - CARNETSTATUS_DTO -) { } \ No newline at end of file diff --git a/src/dto/client/client-property.dto.ts b/src/dto/client/client-property.dto.ts deleted file mode 100644 index 3ee2bc9..0000000 --- a/src/dto/client/client-property.dto.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { ApiProperty } from "@nestjs/swagger"; -import { Type } from "class-transformer"; -import { IsArray, IsDefined, IsString, Length, ValidateNested } from "class-validator"; -import { CLIENTLOCADDRESSTABLE_ROW_DTO } from "./client.dto"; - - -export class CLIENTNAME_DTO { - @ApiProperty({ required: true }) - // @Max(999999999, { message: "Property P_CLIENTNAME must not exceed 999999999" }) - // @Min(0, { message: "Property P_CLIENTNAME must be at least 0 or more" }) - // @IsInt({ message: "Property P_CLIENTNAME allows only whole numbers" }) - // @IsNumber({}, { message: "Property P_CLIENTNAME must be a number" }) - // @IsDefined({ message: "Property P_CLIENTNAME is required" }) - @Length(0, 50, { - message: 'Property P_CLIENTNAME must be between 0 to 50 characters', - }) - @IsString({ message: 'Property P_CLIENTNAME must be a string' }) - @IsDefined({ message: 'Property P_CLIENTNAME is required' }) - P_CLIENTNAME: string; -} - -export class REVENUELOCATION_DTO { - @ApiProperty({ required: true }) - @Length(0, 2, { - message: 'Property P_REVENUELOCATION must be between 0 to 2 characters', - }) - @IsString({ message: 'Property P_REVENUELOCATION must be a string' }) - @IsDefined({ message: 'Property P_REVENUELOCATION is required' }) - P_REVENUELOCATION: string; -} - -export class PREPARERNAME_DTO { - @ApiProperty({ required: true }) - @Length(0, 50, { - message: 'Property P_PREPARERNAME must be between 0 to 50 characters', - }) - @IsString({ message: 'Property P_PREPARERNAME must be a string' }) - @IsDefined({ message: 'Property P_PREPARERNAME is required' }) - P_PREPARERNAME: string; -} - -export class STATUS_DTO { - @ApiProperty({ required: true }) - @Length(0, 10, { - message: 'Property P_STATUS must be between 0 to 10 characters', - }) - @IsString({ message: 'Property P_STATUS must be a string' }) - @IsDefined({ message: 'Property P_STATUS is required' }) - P_STATUS: string; -} - -export class CLIENTLOCADDRESSTABLE_DTO{ - @ApiProperty({ required: true, type: () => [CLIENTLOCADDRESSTABLE_ROW_DTO] }) - @Type(() => CLIENTLOCADDRESSTABLE_ROW_DTO) - @ValidateNested({ each: true }) - @IsArray({ - message: 'Property P_CLIENTLOCADDRESSTABLE allows only array type', - }) - @IsDefined({ message: 'Property P_CLIENTLOCADDRESSTABLE is required' }) - P_CLIENTLOCADDRESSTABLE: CLIENTLOCADDRESSTABLE_ROW_DTO[]; -} - diff --git a/src/dto/flag/flag-property.dto.ts b/src/dto/flag/flag-property.dto.ts deleted file mode 100644 index 92076e8..0000000 --- a/src/dto/flag/flag-property.dto.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ApiProperty } from "@nestjs/swagger"; -import { IsDefined, IsString, Length } from "class-validator"; - -export class USCIBMEMBERFLAG_DTO { - @ApiProperty({ required: true }) - @Length(0, 1, { message: 'Property P_USCIBMEMBERFLAG must be between 0 to 1 character' }) - @IsString({ message: 'Property P_USCIBMEMBERFLAG must be a string' }) - @IsDefined({ message: 'Property P_USCIBMEMBERFLAG is required' }) - P_USCIBMEMBERFLAG: string; -} - -export class GOVAGENCYFLAG_DTO { - @ApiProperty({ required: true }) - @Length(0, 1, { - message: 'Property P_GOVAGENCYFLAG must be between 0 to 1 character', - }) - @IsString({ message: 'Property P_GOVAGENCYFLAG must be a string' }) - @IsDefined({ message: 'Property P_GOVAGENCYFLAG is required' }) - P_GOVAGENCYFLAG: string; -} \ No newline at end of file diff --git a/src/dto/home-page/home-page-property.dto.ts b/src/dto/home-page/home-page-property.dto.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/dto/home-page/home-page.dto.ts b/src/dto/home-page/home-page.dto.ts new file mode 100644 index 0000000..fd5dc3c --- /dev/null +++ b/src/dto/home-page/home-page.dto.ts @@ -0,0 +1,12 @@ +import { IntersectionType } from "@nestjs/swagger"; + +import { SPID_DTO, USERID_DTO } from "../uscib-managed-sp/sp/sp-property.dto"; + +import { CARNETSTATUS_DTO } from "../carnet-application/carnet-application-property.dto"; + +// homepage +export class GetCarnetDetailsbyCarnetStatusDTO extends IntersectionType( + SPID_DTO, + USERID_DTO, + CARNETSTATUS_DTO +) { } \ No newline at end of file diff --git a/src/dto/location/location-property.dto.ts b/src/dto/location/location-property.dto.ts deleted file mode 100644 index 31178c1..0000000 --- a/src/dto/location/location-property.dto.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ApiProperty } from "@nestjs/swagger"; -import { IsDefined, IsInt, IsNumber, IsString, Length, Max, Min } from "class-validator"; - -export class CLIENTLOCATIONID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { - message: 'Property P_CLIENTLOCATIONID must not exceed 999999999', - }) - @Min(0, { message: 'Property P_CLIENTLOCATIONID must be at least 0 or more' }) - @IsInt({ message: 'Property P_CLIENTLOCATIONID allows only whole numbers' }) - @IsNumber({}, { message: 'Property P_CLIENTLOCATIONID must be a number' }) - @IsDefined({ message: 'Property P_CLIENTLOCATIONID is required' }) - P_CLIENTLOCATIONID: number; -} - -export class LOCATIONNAME_DTO { - @ApiProperty({ required: true }) - @Length(0, 50, { - message: 'Property P_LOCATIONNAME must be between 0 to 50 characters', - }) - @IsString({ message: 'Property P_LOCATIONNAME must be a string' }) - @IsDefined({ message: 'Property P_LOCATIONNAME is required' }) - P_LOCATIONNAME: string; -} \ No newline at end of file diff --git a/src/dto/manage-clients/manage-clients-property.dto.ts b/src/dto/manage-clients/manage-clients-property.dto.ts new file mode 100644 index 0000000..6fe6d4c --- /dev/null +++ b/src/dto/manage-clients/manage-clients-property.dto.ts @@ -0,0 +1,133 @@ +import { ApiProperty, IntersectionType, PartialType } from "@nestjs/swagger"; +import { Type } from "class-transformer"; +import { IsArray, IsDefined, IsInt, IsNumber, IsString, Length, Max, Min, ValidateNested } from "class-validator"; + +import { + ADDRESS1_DTO, ADDRESS2_DTO, CITY_DTO, COUNTRY_DTO, STATE_DTO, ZIP_DTO +} from "../uscib-managed-sp/sp/sp-property.dto"; + + + +export class CLIENTID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { + message: 'Property p_clientid must not exceed 999999999', + }) + @Min(0, { message: 'Property p_clientid must be at least 0 or more' }) + @IsInt({ message: 'Property p_clientid allows only whole numbers' }) + @IsNumber({}, { message: 'Property p_clientid must be a number' }) + @IsDefined({ message: 'Property p_clientid is required' }) + P_CLIENTID: number; +} + +export class CLIENT_CONTACTID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { + message: 'Property P_CLIENTCONTACTID must not exceed 999999999', + }) + @Min(0, { message: 'Property P_CLIENTCONTACTID must be at least 0 or more' }) + @IsInt({ message: 'Property P_CLIENTCONTACTID allows only whole numbers' }) + @IsNumber({}, { message: 'Property P_CLIENTCONTACTID must be a number' }) + @IsDefined({ message: 'Property P_CLIENTCONTACTID is required' }) + P_CLIENTCONTACTID: number; +} + + +export class NAMEOF_DTO { + @ApiProperty({ required: true }) + @Length(0, 50, { + message: 'Property Nameof must be between 0 to 50 characters', + }) + @IsString({ message: 'Property Nameof must be a string' }) + @IsDefined({ message: 'Property Nameof is required' }) + P_NAMEOF: string; +} + +export class CLIENTNAME_DTO { + @ApiProperty({ required: true }) + // @Max(999999999, { message: "Property P_CLIENTNAME must not exceed 999999999" }) + // @Min(0, { message: "Property P_CLIENTNAME must be at least 0 or more" }) + // @IsInt({ message: "Property P_CLIENTNAME allows only whole numbers" }) + // @IsNumber({}, { message: "Property P_CLIENTNAME must be a number" }) + // @IsDefined({ message: "Property P_CLIENTNAME is required" }) + @Length(0, 50, { + message: 'Property P_CLIENTNAME must be between 0 to 50 characters', + }) + @IsString({ message: 'Property P_CLIENTNAME must be a string' }) + @IsDefined({ message: 'Property P_CLIENTNAME is required' }) + P_CLIENTNAME: string; +} + +export class REVENUELOCATION_DTO { + @ApiProperty({ required: true }) + @Length(0, 2, { + message: 'Property P_REVENUELOCATION must be between 0 to 2 characters', + }) + @IsString({ message: 'Property P_REVENUELOCATION must be a string' }) + @IsDefined({ message: 'Property P_REVENUELOCATION is required' }) + P_REVENUELOCATION: string; +} + +export class PREPARERNAME_DTO { + @ApiProperty({ required: true }) + @Length(0, 50, { + message: 'Property P_PREPARERNAME must be between 0 to 50 characters', + }) + @IsString({ message: 'Property P_PREPARERNAME must be a string' }) + @IsDefined({ message: 'Property P_PREPARERNAME is required' }) + P_PREPARERNAME: string; +} + +export class STATUS_DTO { + @ApiProperty({ required: true }) + @Length(0, 10, { + message: 'Property P_STATUS must be between 0 to 10 characters', + }) + @IsString({ message: 'Property P_STATUS must be a string' }) + @IsDefined({ message: 'Property P_STATUS is required' }) + P_STATUS: string; +} + +export class CLIENTLOCADDRESSTABLE_ROW_DTO extends IntersectionType( + NAMEOF_DTO, + ADDRESS1_DTO, + PartialType(ADDRESS2_DTO), + CITY_DTO, + STATE_DTO, + ZIP_DTO, + COUNTRY_DTO +) { } + +export class CLIENTLOCADDRESSTABLE_DTO { + @ApiProperty({ required: true, type: () => [CLIENTLOCADDRESSTABLE_ROW_DTO] }) + @Type(() => CLIENTLOCADDRESSTABLE_ROW_DTO) + @ValidateNested({ each: true }) + @IsArray({ + message: 'Property P_CLIENTLOCADDRESSTABLE allows only array type', + }) + @IsDefined({ message: 'Property P_CLIENTLOCADDRESSTABLE is required' }) + P_CLIENTLOCADDRESSTABLE: CLIENTLOCADDRESSTABLE_ROW_DTO[]; +} + +export class CLIENTLOCATIONID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { + message: 'Property P_CLIENTLOCATIONID must not exceed 999999999', + }) + @Min(0, { message: 'Property P_CLIENTLOCATIONID must be at least 0 or more' }) + @IsInt({ message: 'Property P_CLIENTLOCATIONID allows only whole numbers' }) + @IsNumber({}, { message: 'Property P_CLIENTLOCATIONID must be a number' }) + @IsDefined({ message: 'Property P_CLIENTLOCATIONID is required' }) + P_CLIENTLOCATIONID: number; +} + +export class LOCATIONNAME_DTO { + @ApiProperty({ required: true }) + @Length(0, 50, { + message: 'Property P_LOCATIONNAME must be between 0 to 50 characters', + }) + @IsString({ message: 'Property P_LOCATIONNAME must be a string' }) + @IsDefined({ message: 'Property P_LOCATIONNAME is required' }) + P_LOCATIONNAME: string; +} + diff --git a/src/dto/client/client.dto.ts b/src/dto/manage-clients/manage-clients.dto.ts similarity index 66% rename from src/dto/client/client.dto.ts rename to src/dto/manage-clients/manage-clients.dto.ts index bc81433..4935656 100644 --- a/src/dto/client/client.dto.ts +++ b/src/dto/manage-clients/manage-clients.dto.ts @@ -1,20 +1,26 @@ import { IntersectionType, PartialType } from "@nestjs/swagger"; -import { ADDRESS1_DTO, ADDRESS2_DTO, CITY_DTO, CLIENT_CONTACTID_DTO, CLIENTID_DTO, COUNTRY_DTO, ISSUING_REGION_DTO, LOOKUP_CODE_DTO, NAME_DTO, NAMEOF_DTO, STATE_DTO, USERID_DTO, ZIP_DTO } from "../property.dto"; -import { SPID_DTO } from "../sp/sp-property.dto"; -import { CLIENTLOCADDRESSTABLE_DTO, CLIENTNAME_DTO, PREPARERNAME_DTO, REVENUELOCATION_DTO, STATUS_DTO } from "./client-property.dto"; -import { DEFAULT_CONTACT_FLAG_DTO, EMAIL_ADDRESS_DTO, FAX_NO_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, MOBILE_NO_DTO, PHONE_NO_DTO, TITLE_DTO } from "../contact/contact-property.dto"; -import { CLIENTLOCATIONID_DTO, LOCATIONNAME_DTO } from "../location/location-property.dto"; -import { CONTACTSTABLE_DTO } from "../holder/holder-property.dto"; -export class CLIENTLOCADDRESSTABLE_ROW_DTO extends IntersectionType( - NAMEOF_DTO, - ADDRESS1_DTO, - PartialType(ADDRESS2_DTO), - CITY_DTO, - STATE_DTO, - ZIP_DTO, - COUNTRY_DTO -) { } +import { CONTACTSTABLE_DTO } from "../manage-holders/manage-holders-property.dto"; + +import { + DEFAULT_CONTACT_FLAG_DTO, EMAIL_ADDRESS_DTO, FAX_NO_DTO, FIRSTNAME_DTO, LASTNAME_DTO, + MIDDLE_INITIAL_DTO, MOBILE_NO_DTO, PHONE_NO_DTO, TITLE_DTO +} from "../uscib-managed-sp/sp-contacts/sp-contacts-property.dto"; + +import { + CLIENT_CONTACTID_DTO, CLIENTID_DTO, CLIENTLOCADDRESSTABLE_DTO, CLIENTLOCATIONID_DTO, + CLIENTNAME_DTO, LOCATIONNAME_DTO, NAMEOF_DTO, PREPARERNAME_DTO, REVENUELOCATION_DTO, STATUS_DTO +} from "./manage-clients-property.dto"; + +import { + ADDRESS1_DTO, ADDRESS2_DTO, CITY_DTO, COUNTRY_DTO, ISSUING_REGION_DTO, LOOKUP_CODE_DTO, + NAME_DTO, SPID_DTO, STATE_DTO, USERID_DTO, ZIP_DTO +} from "../uscib-managed-sp/sp/sp-property.dto"; + + + + + export class CreateClientDataDTO extends IntersectionType( SPID_DTO, diff --git a/src/dto/fee/fee-property.dto.ts b/src/dto/manage-fee/manage-fee-property.dto.ts similarity index 100% rename from src/dto/fee/fee-property.dto.ts rename to src/dto/manage-fee/manage-fee-property.dto.ts diff --git a/src/dto/fee/fee.dto.ts b/src/dto/manage-fee/manage-fee.dto.ts similarity index 78% rename from src/dto/fee/fee.dto.ts rename to src/dto/manage-fee/manage-fee.dto.ts index bf41231..7d30861 100644 --- a/src/dto/fee/fee.dto.ts +++ b/src/dto/manage-fee/manage-fee.dto.ts @@ -1,11 +1,18 @@ import { IntersectionType } from "@nestjs/swagger"; -import { SPID_DTO } from "../sp/sp-property.dto"; -import { ACTIVE_INACTIVE_STATUS_DTO, DELIVERYTYPE_DTO, USERID_DTO } from "../property.dto"; -import { CARNET_TYPE_DTO, END_NUMBER_DTO, START_NUMBER_DTO } from "../carnet/carnet-property.dto"; -import { HOLDERTYPE_DTO } from "../holder/holder-property.dto"; -import { USCIBMEMBERFLAG_DTO } from "../flag/flag-property.dto"; -import { BASICFEESETUPID_DTO, BONDRATESETUPID_DTO, CARGORATESETUPID_DTO, CFFEESETUPID_DTO, COMMRATE_DTO, CSFEESETUPID_DTO, CUSTOMERTYPE_DTO, EFFDATE_DTO, EFFEESETUPID_DTO, ENDSETS_DTO, ENDTIME_DTO, FEECOMMID_DTO, FEES_DTO, RATE_DTO, SPCLCOMMODITY_DTO, SPCLCOUNTRY_DTO, STARTSETS_DTO, STARTTIME_DTO, TIMEZONE_DTO } from "./fee-property.dto"; +import { ACTIVE_INACTIVE_STATUS_DTO, SPID_DTO, USERID_DTO } from "../uscib-managed-sp/sp/sp-property.dto"; + +import { HOLDERTYPE_DTO, USCIBMEMBERFLAG_DTO } from "../manage-holders/manage-holders-property.dto"; + +import { + BASICFEESETUPID_DTO, BONDRATESETUPID_DTO, CARGORATESETUPID_DTO, CFFEESETUPID_DTO, + COMMRATE_DTO, CSFEESETUPID_DTO, CUSTOMERTYPE_DTO, EFFDATE_DTO, EFFEESETUPID_DTO, ENDSETS_DTO, + ENDTIME_DTO, FEECOMMID_DTO, FEES_DTO, RATE_DTO, SPCLCOMMODITY_DTO, SPCLCOUNTRY_DTO, + STARTSETS_DTO, STARTTIME_DTO, TIMEZONE_DTO +} from "./manage-fee-property.dto"; + import { PARAMID_DTO } from "../param-table/param-table-property.dto"; +import { CARNET_TYPE_DTO, END_NUMBER_DTO, START_NUMBER_DTO } from "../uscib-managed-sp/carnet-sequence/carnet-sequence-property.dto"; +import { DELIVERYTYPE_DTO } from "../carnet-application/carnet-application-property.dto"; export class GetFeeGeneralDTO extends IntersectionType( SPID_DTO, diff --git a/src/dto/holder/holder-property.dto.ts b/src/dto/manage-holders/manage-holders-property.dto.ts similarity index 51% rename from src/dto/holder/holder-property.dto.ts rename to src/dto/manage-holders/manage-holders-property.dto.ts index 5d56fe9..3391953 100644 --- a/src/dto/holder/holder-property.dto.ts +++ b/src/dto/manage-holders/manage-holders-property.dto.ts @@ -1,7 +1,52 @@ -import { ApiProperty } from "@nestjs/swagger"; +import { ApiProperty, IntersectionType, PartialType } from "@nestjs/swagger"; import { IsArray, IsDefined, IsInt, IsNumber, IsString, Length, Max, Min, ValidateNested } from "class-validator"; -import { CONTACTSTABLE_ROW_DTO } from "./holder.dto"; -import { Type } from "class-transformer"; +import { Transform, Type } from "class-transformer"; + +import { + EMAIL_ADDRESS_DTO, FAX_NO_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, + MOBILE_NO_DTO, PHONE_NO_DTO, TITLE_DTO +} from "../uscib-managed-sp/sp-contacts/sp-contacts-property.dto"; + +export class GOVAGENCYFLAG_DTO { + @ApiProperty({ required: true }) + @Length(0, 1, { + message: 'Property P_GOVAGENCYFLAG must be between 0 to 1 character', + }) + @IsString({ message: 'Property P_GOVAGENCYFLAG must be a string' }) + @IsDefined({ message: 'Property P_GOVAGENCYFLAG is required' }) + P_GOVAGENCYFLAG: string; +} + +export class USCIBMEMBERFLAG_DTO { + @ApiProperty({ required: true }) + @Length(0, 1, { message: 'Property P_USCIBMEMBERFLAG must be between 0 to 1 character' }) + @IsString({ message: 'Property P_USCIBMEMBERFLAG must be a string' }) + @IsDefined({ message: 'Property P_USCIBMEMBERFLAG is required' }) + P_USCIBMEMBERFLAG: string; +} + +export class LOCATIONID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { message: 'Property p_locationid must not exceed 999999999' }) + @Min(0, { message: 'Property p_locationid must be at least 0 or more' }) + @IsInt({ message: 'Property p_locationid allows only whole numbers' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property p_locationid must be a number' }) + @IsDefined({ message: 'Property p_locationid is required' }) + P_LOCATIONID: number; +} + +export class HOLDERID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { + message: 'Property P_HOLDERID must not exceed 999999999', + }) + @Min(0, { message: 'Property P_HOLDERID must be at least 0 or more' }) + @IsInt({ message: 'Property P_HOLDERID allows only whole numbers' }) + @IsNumber({}, { message: 'Property P_HOLDERID must be a number' }) + @IsDefined({ message: 'Property P_HOLDERID is required' }) + P_HOLDERID: number; +} export class HOLDERNO_DTO { @ApiProperty({ required: true }) @@ -45,6 +90,17 @@ export class ADDLNAME_DTO { P_ADDLNAME: string; } +export class CONTACTSTABLE_ROW_DTO extends IntersectionType( + FIRSTNAME_DTO, + LASTNAME_DTO, + PartialType(MIDDLE_INITIAL_DTO), + PartialType(TITLE_DTO), + EMAIL_ADDRESS_DTO, + PHONE_NO_DTO, + MOBILE_NO_DTO, + FAX_NO_DTO +) { } + export class CONTACTSTABLE_DTO { @ApiProperty({ required: true, type: () => [CONTACTSTABLE_ROW_DTO] }) @Type(() => CONTACTSTABLE_ROW_DTO) diff --git a/src/dto/holder/holder.dto.ts b/src/dto/manage-holders/manage-holders.dto.ts similarity index 62% rename from src/dto/holder/holder.dto.ts rename to src/dto/manage-holders/manage-holders.dto.ts index a776d0f..9126bc3 100644 --- a/src/dto/holder/holder.dto.ts +++ b/src/dto/manage-holders/manage-holders.dto.ts @@ -1,21 +1,21 @@ import { IntersectionType, PartialType } from "@nestjs/swagger"; -import { SPID_DTO } from "../sp/sp-property.dto"; -import { CLIENTLOCATIONID_DTO } from "../location/location-property.dto"; -import { ADDLNAME_DTO, CONTACTSTABLE_DTO, HOLDERCONTACTID_DTO, HOLDERNAME_DTO, HOLDERNO_DTO, HOLDERTYPE_DTO, NAMEQUALIFIER_DTO } from "./holder-property.dto"; -import { GOVAGENCYFLAG_DTO, USCIBMEMBERFLAG_DTO } from "../flag/flag-property.dto"; -import { ADDRESS1_DTO, ADDRESS2_DTO, CITY_DTO, COUNTRY_DTO, EMAIL_DTO, HOLDERID_DTO, LOCATIONID_DTO, STATE_DTO, USERID_DTO, ZIP_DTO } from "../property.dto"; -import { EMAIL_ADDRESS_DTO, FAX_NO_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, MOBILE_NO_DTO, PHONE_NO_DTO, TITLE_DTO } from "../contact/contact-property.dto"; +import { SPID_DTO } from "src/dto/property.dto"; +import { CLIENTLOCATIONID_DTO } from "src/dto/property.dto"; +import { + ADDLNAME_DTO, CONTACTSTABLE_DTO, HOLDERCONTACTID_DTO, HOLDERNAME_DTO, HOLDERNO_DTO, + HOLDERTYPE_DTO, NAMEQUALIFIER_DTO +} from "src/dto/property.dto"; +import { GOVAGENCYFLAG_DTO, USCIBMEMBERFLAG_DTO } from "src/dto/property.dto"; +import { + ADDRESS1_DTO, ADDRESS2_DTO, CITY_DTO, COUNTRY_DTO, EMAIL_DTO, HOLDERID_DTO, + LOCATIONID_DTO, STATE_DTO, USERID_DTO, ZIP_DTO +} from "src/dto/property.dto"; +import { + EMAIL_ADDRESS_DTO, FAX_NO_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, + MOBILE_NO_DTO, PHONE_NO_DTO, TITLE_DTO +} from "src/dto/property.dto"; + -export class CONTACTSTABLE_ROW_DTO extends IntersectionType( - FIRSTNAME_DTO, - LASTNAME_DTO, - PartialType(MIDDLE_INITIAL_DTO), - PartialType(TITLE_DTO), - EMAIL_ADDRESS_DTO, - PHONE_NO_DTO, - MOBILE_NO_DTO, - FAX_NO_DTO -) { } export class CreateHoldersDTO extends IntersectionType( diff --git a/src/dto/param-table/param-table.dto.ts b/src/dto/param-table/param-table.dto.ts index c4ad851..0dff27b 100644 --- a/src/dto/param-table/param-table.dto.ts +++ b/src/dto/param-table/param-table.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty, IntersectionType, PartialType } from "@nestjs/swagger"; import { IsDefined, IsNumber, IsOptional, IsString } from "class-validator"; import { USERID_DTO } from "../property.dto"; import { ADDPAAMVALUE1_DTO, ADDPAAMVALUE2_DTO, ADDPAAMVALUE3_DTO, ADDPAAMVALUE4_DTO, ADDPAAMVALUE5_DTO, PARAMDESC_DTO, PARAMID_DTO, PARAMTYPE_DTO, PARAMVALUE_DTO, SORTSEQ_DTO, TABLEFULLDESC_DTO } from "./param-table-property.dto"; -import { SPID_DTO } from "../sp/sp-property.dto"; +import { SPID_DTO } from "../uscib-managed-sp/sp/sp-property.dto"; export class CreateTableRecordDTO extends IntersectionType(USERID_DTO, TABLEFULLDESC_DTO) { } diff --git a/src/dto/property.dto.ts b/src/dto/property.dto.ts index 74ddeba..3974adb 100644 --- a/src/dto/property.dto.ts +++ b/src/dto/property.dto.ts @@ -1,535 +1,37 @@ -import { ApiProperty } from "@nestjs/swagger"; -import { Transform, Type } from "class-transformer"; -import { IsArray, IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsOptional, IsString, Length, Matches, Max, MaxLength, Min, ValidateNested } from "class-validator"; +export * from './carnet-application/carnet-application-property.dto' // ind +export * from './uscib-managed-sp/sp/sp-property.dto' // ind +export * from './manage-holders/manage-holders-property.dto' // dep c-a-p (YON) +export * from './user-maintenance/user-maintenance-property.dto' // dep c-a-p (YON) +export * from './uscib-managed-sp/sp-contacts/sp-contacts-property.dto' // ind +export * from './manage-clients/manage-clients-property.dto' // ind +export * from './param-table/param-table-property.dto' // ind +export * from './manage-fee/manage-fee-property.dto' // ind +export * from './uscib-managed-sp/carnet-sequence/carnet-sequence-property.dto' // ind +export * from './uscib-managed-sp/region/region-property.dto' // ind -// General -export class USERID_DTO { - @ApiProperty({ required: true }) - @Length(0, 50, { - message: 'Property P_USERID must be between 0 to 50 characters', - }) - @IsString({ message: 'Property P_USERID must be a string' }) - @IsDefined({ message: 'Property P_USERID is required' }) - P_USERID: string; -} +export * from './manage-clients/manage-clients.dto' -export class USER_ID_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_USER_ID must be a string' }) - @IsDefined({ message: 'Property P_USER_ID is required' }) - P_USER_ID: string; -} +export * from './carnet-application/carnet-application.dto' -export class EMAIL_DTO { +// export * from './home-page/home-page-property.dto' // NA - @ApiProperty({ required: true }) - @IsEmail({}, { message: "Invalid P_EMAILADDR property" }) - @Length(0, 50, { - message: 'Property P_EMAILADDR must be between 0 to 50 characters', - }) - @IsString({ message: 'P_EMAILADDR p_userid must be string' }) - @IsDefined({ message: 'P_EMAILADDR p_userid is required' }) - P_EMAILADDR: string; +export * from './home-page/home-page.dto' -} +export * from './manage-fee/manage-fee.dto' -export class LOOKUP_CODE_DTO { - @ApiProperty({ required: true }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_LOOKUPCODE: string; -} +export * from './param-table/param-table.dto' -export class PASSWORD_DTO { - @ApiProperty({ required: true }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_PASSWORD: string; -} +export * from './uscib-managed-sp/carnet-sequence/carnet-sequence.dto' -export enum YON { - YES = "Y", - NO = "N", -} +export * from './uscib-managed-sp/region/region.dto' -export class NAME_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_NAME must be a string' }) - @IsDefined({ message: 'Property P_NAME is required' }) - P_NAME: string; -} +export * from './uscib-managed-sp/sp/sp.dto' -export class ADDRESS1_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_ADDRESS1 must be a string' }) - @IsDefined({ message: 'Property P_ADDRESS1 is required' }) - P_ADDRESS1: string; -} +export * from './uscib-managed-sp/sp-contacts/sp-contacts.dto' -export class ADDRESS2_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_ADDRESS2 must be a string' }) - @IsDefined({ message: 'Property P_ADDRESS2 is required' }) - P_ADDRESS2: string; -} +export * from './user-maintenance/user-maintenance.dto' -export class CITY_DTO { - @ApiProperty({ required: true }) - @Length(0, 30, { - message: 'Property P_CITY must be between 0 to 30 characters', - }) - @IsString({ message: 'Property P_CITY must be a string' }) - @IsDefined({ message: 'Property P_CITY is required' }) - P_CITY: string; -} +export * from './manage-holders/manage-holders.dto' -export class STATE_DTO { - @ApiProperty({ required: true }) - @Length(0, 2, { - message: 'Property P_STATE must be between 0 to 2 characters', - }) - @IsString({ message: 'Property P_STATE must be a string' }) - @IsDefined({ message: 'Property P_STATE is required' }) - P_STATE: string; -} - -export class COUNTRY_DTO { - @ApiProperty({ required: true }) - @Length(0, 50, { - message: 'Property P_COUNTRY must be between 0 to 50 characters', - }) - @IsString({ message: 'Property P_COUNTRY must be a string' }) - @IsDefined({ message: 'Property P_COUNTRY is required' }) - P_COUNTRY: string; -} - -export class ZIP_DTO { - @ApiProperty({ required: true }) - @Length(0, 10, { - message: 'Property P_ZIP must be between 0 to 10 characters', - }) - @IsString({ message: 'Property P_ZIP must be a string' }) - @IsDefined({ message: 'Property P_ZIP is required' }) - P_ZIP: string; -} - -export class ISSUING_REGION_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_ISSUINGREGION must be a string' }) - @IsDefined({ message: 'Property P_ISSUINGREGION is required' }) - P_ISSUINGREGION: string; -} - -export class REPLACEMENT_REGION_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_REPLACEMENTREGION must be a string' }) - @IsDefined({ message: 'Property P_REPLACEMENTREGION is required' }) - P_REPLACEMENTREGION: string; -} - -export class BOND_SURETY_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_BONDSURETY must be a string' }) - @IsDefined({ message: 'Property P_BONDSURETY is required' }) - P_BONDSURETY: string; -} - -export class CARGO_POLICY_NO_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_CARGOPOLICYNO must be a string' }) - @IsDefined({ message: 'Property P_CARGOPOLICYNO is required' }) - P_CARGOPOLICYNO: string; -} - -export class CARGO_SURETY_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_CARGOSURETY must be a string' }) - @IsDefined({ message: 'Property P_CARGOSURETY is required' }) - P_CARGOSURETY: string; -} - -export class NOTES_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_NOTES must be a string' }) - P_NOTES: string; -} - -export class FILE_ID_DTO { - @ApiProperty({ required: false }) - @IsString({ message: 'Property P_FILEIDS must be a string' }) - @IsOptional() - P_FILEIDS?: string; -} - - -export class ACTIVE_INACTIVE_STATUS_DTO { - @ApiProperty({ required: true }) - @Matches(/^.{6}$|^.{8}$/, { - message: 'Property P_ACTIVE_INACTIVE is invalid', - }) - @IsString({ message: 'Property P_ACTIVE_INACTIVE must be a string' }) - @IsDefined({ message: 'Property P_ACTIVE_INACTIVE is required' }) - P_ACTIVE_INACTIVE: string; -} - - -// user maintenance - -export class ENABLE_PASSWORD_POLICY_DTO { - @ApiProperty({ required: true, enum: YON }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(YON, { message: 'P_ENABLEPASSWORDPOLICY must be either "Y" or "N"' }) - @Length(1, 1, { message: 'P_ENABLEPASSWORDPOLICY must be between 5 and 6 characters' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_ENABLEPASSWORDPOLICY: YON; -} - -export class DOMAIN_DTO { - @ApiProperty({ required: true }) - @Length(0, 50, { - message: 'Property P_DOMAIN must be between 0 to 50 characters', - }) - @IsString({ message: 'Property P_DOMAIN must be a string' }) - @IsDefined({ message: 'Property P_DOMAIN is required' }) - P_DOMAIN: string; -} - - -// client - -export class CLIENTID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { - message: 'Property p_clientid must not exceed 999999999', - }) - @Min(0, { message: 'Property p_clientid must be at least 0 or more' }) - @IsInt({ message: 'Property p_clientid allows only whole numbers' }) - @IsNumber({}, { message: 'Property p_clientid must be a number' }) - @IsDefined({ message: 'Property p_clientid is required' }) - P_CLIENTID: number; -} - -export class CLIENT_CONTACTID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { - message: 'Property P_CLIENTCONTACTID must not exceed 999999999', - }) - @Min(0, { message: 'Property P_CLIENTCONTACTID must be at least 0 or more' }) - @IsInt({ message: 'Property P_CLIENTCONTACTID allows only whole numbers' }) - @IsNumber({}, { message: 'Property P_CLIENTCONTACTID must be a number' }) - @IsDefined({ message: 'Property P_CLIENTCONTACTID is required' }) - P_CLIENTCONTACTID: number; -} - - -export class NAMEOF_DTO { - @ApiProperty({ required: true }) - @Length(0, 50, { - message: 'Property Nameof must be between 0 to 50 characters', - }) - @IsString({ message: 'Property Nameof must be a string' }) - @IsDefined({ message: 'Property Nameof is required' }) - P_NAMEOF: string; -} - - - - - - -//Location - -export class LOCATIONID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { message: 'Property p_locationid must not exceed 999999999' }) - @Min(0, { message: 'Property p_locationid must be at least 0 or more' }) - @IsInt({ message: 'Property p_locationid allows only whole numbers' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property p_locationid must be a number' }) - @IsDefined({ message: 'Property p_locationid is required' }) - P_LOCATIONID: number; -} - -// carnet-application - -export class HEADERID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { - message: 'Property P_HEADERID must not exceed 999999999', - }) - @Min(0, { message: 'Property P_HEADERID must be at least 0 or more' }) - @IsInt({ message: 'Property P_HEADERID allows only whole numbers' }) - @IsNumber({}, { message: 'Property P_HEADERID must be a number' }) - @IsDefined({ message: 'Property P_HEADERID is required' }) - P_HEADERID: number; -} - -export class APPLICATIONNAME_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_APPLICATIONNAME must be a string' }) - @IsDefined({ message: 'Property P_APPLICATIONNAME is required' }) - P_APPLICATIONNAME: string; -} - -export class COMMERCIAL_SAMPLE_FLAG_DTO { - @ApiProperty({ required: true, enum: YON }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(YON, { message: 'P_COMMERCIALSAMPLEFLAG must be either "Y" or "N"' }) - @Length(1, 1, { message: 'P_COMMERCIALSAMPLEFLAG must be 1 character' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_COMMERCIALSAMPLEFLAG: YON; -} - -export class PROF_EQUIPMENT_FLAG_DTO { - @ApiProperty({ required: true, enum: YON }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(YON, { message: 'P_PROFEQUIMENTFLAG must be either "Y" or "N"' }) - @Length(1, 1, { message: 'P_PROFEQUIMENTFLAG must be 1 character' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_PROFEQUIPMENTFLAG: YON; -} - -export class EXIBITIONS_FAIR_FLAG_DTO { - @ApiProperty({ required: true, enum: YON }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(YON, { message: 'P_EXIBITIONSFAIRFLAG must be either "Y" or "N"' }) - @Length(1, 1, { message: 'P_EXIBITIONSFAIRFLAG must be 1 character' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_EXHIBITIONSFAIRFLAG: YON; -} - -export class AUTO_FLAG_DTO { - @ApiProperty({ required: true, enum: YON }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(YON, { message: 'P_AUTOFLAG must be either "Y" or "N"' }) - @Length(1, 1, { message: 'P_AUTOFLAG must be 1 character' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_AUTOFLAG: YON; -} - -export class HORSE_FLAG_DTO { - @ApiProperty({ required: true, enum: YON }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(YON, { message: 'P_HORSEFLAG must be either "Y" or "N"' }) - @Length(1, 1, { message: 'P_HORSEFLAG must be 1 character' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_HORSEFLAG: YON; -} - -export class AUTHREP_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_AUTHREP must be a string' }) - @IsDefined({ message: 'Property P_AUTHREP is required' }) - P_AUTHREP: string; -} - -export class GLTABLE_ROW_DTO { - @ApiProperty({ required: true }) - @Max(99999, { message: 'Property ITEMNO must not exceed 99999' }) - @Min(0, { message: 'Property ITEMNO must be at least 0 or more' }) - @IsInt({ message: 'Property ITEMNO allows only whole numbers' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property ITEMNO must be a number' }) - @IsDefined({ message: 'Property ITEMNO is required' }) - ITEMNO: number; - - @ApiProperty({ required: true }) - @MaxLength(200, { message: 'Property ITEMDESCRIPTION must not exceed 200 characters' }) - @IsString({ message: 'Property ITEMDESCRIPTION must be a string' }) - @IsDefined({ message: 'Property ITEMDESCRIPTION is required' }) - ITEMDESCRIPTION: string; - - @ApiProperty({ required: true }) - @Max(999999999.99, { message: 'Property ITEMVALUE must not exceed 999999999.99' }) - @Min(0, { message: 'Property ITEMVALUE must be at least 0 or more' }) - @Transform(({ value }) => Number(value)) - @IsNumber({ maxDecimalPlaces: 2 }, { message: 'Property ITEMVALUE must be a number' }) - @IsDefined({ message: 'Property ITEMVALUE is required' }) - ITEMVALUE: number; - - @ApiProperty({ required: true }) - @Max(99999, { message: 'Property NOOFPIECES must not exceed 99999' }) - @Min(0, { message: 'Property NOOFPIECES must be at least 0 or more' }) - @IsInt({ message: 'Property NOOFPIECES allows only whole numbers' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property NOOFPIECES must be a number' }) - @IsDefined({ message: 'Property NOOFPIECES is required' }) - NOOFPIECES: number; - - @ApiProperty({ required: true }) - @Max(99999.9999, { message: 'Property ITEMVALUE must not exceed 999999999.99' }) - @Min(0, { message: 'Property ITEMVALUE must be at least 0 or more' }) - @Transform(({ value }) => Number(value)) - @IsNumber({ maxDecimalPlaces: 2 }, { message: 'Property ITEMVALUE must be a number' }) - @IsDefined({ message: 'Property ITEMVALUE is required' }) - ITEMWEIGHT: number; - - @ApiProperty({ required: true }) - @MaxLength(10, { message: 'Property ITEMWEIGHTUOM must not exceed 10 characters' }) - @IsString({ message: 'Property ITEMWEIGHTUOM must be a string' }) - @IsDefined({ message: 'Property ITEMWEIGHTUOM is required' }) - ITEMWEIGHTUOM: string; - - @ApiProperty({ required: true }) - @MaxLength(2, { message: 'Property GOODSORIGINCOUNTRY must not exceed 2 characters' }) - @IsString({ message: 'Property GOODSORIGINCOUNTRY must be a string' }) - @IsDefined({ message: 'Property GOODSORIGINCOUNTRY is required' }) - GOODSORIGINCOUNTRY: string; -} - -export class GLTABLE_DTO { - @ApiProperty({ required: true, type: () => [GLTABLE_ROW_DTO] }) - @Type(() => GLTABLE_ROW_DTO) - @ValidateNested({ each: true }) - @IsArray({ message: 'Property P_GLTABLE allows only array type' }) - @IsDefined({ message: 'Property P_GLTABLE is required' }) - P_GLTABLE: GLTABLE_ROW_DTO[]; -} - -export class USSETS_DTO { - @ApiProperty({ required: true }) - // @Max(99999, { message: 'Property P_USSETS must not exceed 99999' }) - @Min(0, { message: 'Property P_USSETS must be at least 0 or more' }) - @IsInt({ message: 'Property P_USSETS allows only whole numbers' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property P_USSETS must be a number' }) - @IsDefined({ message: 'Property P_USSETS is required' }) - P_USSETS: number; -} - -export enum VOT { - V = "V", - T = "T", -} - -export class COUNTRYTABLE_ROW_DTO { - @ApiProperty({ required: true, enum: VOT }) - @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) - @IsEnum(VOT, { message: 'P_VISISTTRANSITIND must be either "V" or "T"' }) - @Length(1, 1, { message: 'P_VISISTTRANSITIND must be 1 character' }) - @IsString() - @IsDefined({ message: "Invalid Request" }) - P_VISISTTRANSITIND: VOT; - - - @ApiProperty({ required: true }) - @MaxLength(2, { message: 'Property COUNTRYCODE must not exceed 2 characters' }) - @IsString({ message: 'Property COUNTRYCODE must be a string' }) - @IsDefined({ message: 'Property COUNTRYCODE is required' }) - COUNTRYCODE: string; - - @ApiProperty({ required: true }) - @Max(999, { message: 'Property NOOFTIMESENTLEAVE must not exceed 999' }) - @Min(0, { message: 'Property NOOFTIMESENTLEAVE must be at least 0 or more' }) - @IsInt({ message: 'Property NOOFTIMESENTLEAVE allows only whole numbers' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property NOOFTIMESENTLEAVE must be a number' }) - @IsDefined({ message: 'Property NOOFTIMESENTLEAVE is required' }) - NOOFTIMESENTLEAVE: number; -} - -export class COUNTRYTABLE_DTO { - @ApiProperty({ required: true, type: () => [COUNTRYTABLE_ROW_DTO] }) - @Type(() => COUNTRYTABLE_ROW_DTO) - @ValidateNested({ each: true }) - @IsArray({ message: 'Property P_COUNTRYTABLE allows only array type' }) - @IsDefined({ message: 'Property P_COUNTRYTABLE is required' }) - P_COUNTRYTABLE: COUNTRYTABLE_ROW_DTO[]; -} - -export class SHIPTOTYPE_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_SHIPTOTYPE must be a string' }) - @IsDefined({ message: 'Property P_SHIPTOTYPE is required' }) - P_SHIPTOTYPE: string; -} - -export class SHIPADDRID_DTO { - @ApiProperty({ required: true }) - // @Max(99999, { message: 'Property P_USSETS must not exceed 99999' }) - @Min(0, { message: 'Property P_SHIPADDRID must be at least 0 or more' }) - @IsInt({ message: 'Property P_SHIPADDRID allows only whole numbers' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property P_SHIPADDRID must be a number' }) - @IsDefined({ message: 'Property P_SHIPADDRID is required' }) - P_SHIPADDRID: number; -} - -export class FORMOFSECURITY_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_FORMOFSECURITY must be a string' }) - @IsDefined({ message: 'Property P_FORMOFSECURITY is required' }) - P_FORMOFSECURITY: string; -} - -export class INSPROTECTION_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_INSPROTECTION must be a string' }) - @IsDefined({ message: 'Property P_INSPROTECTION is required' }) - P_INSPROTECTION: string; -} - -export class LDIPROTECTION_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_LDIPROTECTION must be a string' }) - @IsDefined({ message: 'Property P_LDIPROTECTION is required' }) - P_LDIPROTECTION: string; -} - -export class DELIVERYTYPE_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_DELIVERYTYPE must be a string' }) - @IsDefined({ message: 'Property P_DELIVERYTYPE is required' }) - P_DELIVERYTYPE: string; -} - -export class DELIVERYMETHOD_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_DELIVERYTYPE must be a string' }) - @IsDefined({ message: 'Property P_DELIVERYTYPE is required' }) - P_DELIVERYMETHOD: string; -} - -export class PAYMENTMETHOD_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_PAYMENTMETHOD must be a string' }) - @IsDefined({ message: 'Property P_PAYMENTMETHOD is required' }) - P_PAYMENTMETHOD: string; -} - -export class CUSTCOURIERNO_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_CUSTCOURIERNO must be a string' }) - @IsDefined({ message: 'Property P_CUSTCOURIERNO is required' }) - P_CUSTCOURIERNO: string; -} - -export class REFNO_DTO { - @ApiProperty({ required: true }) - @IsString({ message: 'Property P_REFNO must be a string' }) - @IsDefined({ message: 'Property P_REFNO is required' }) - P_REFNO: string; -} - - -// Holder - -export class HOLDERID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { - message: 'Property P_HOLDERID must not exceed 999999999', - }) - @Min(0, { message: 'Property P_HOLDERID must be at least 0 or more' }) - @IsInt({ message: 'Property P_HOLDERID allows only whole numbers' }) - @IsNumber({}, { message: 'Property P_HOLDERID must be a number' }) - @IsDefined({ message: 'Property P_HOLDERID is required' }) - P_HOLDERID: number; -} diff --git a/src/dto/sp/sp-property.dto.ts b/src/dto/sp/sp-property.dto.ts deleted file mode 100644 index e6f0088..0000000 --- a/src/dto/sp/sp-property.dto.ts +++ /dev/null @@ -1,16 +0,0 @@ -// SP - -import { ApiProperty } from "@nestjs/swagger"; -import { Transform } from "class-transformer"; -import { IsDefined, IsInt, IsNumber, Max, Min } from "class-validator"; - -export class SPID_DTO { - @ApiProperty({ required: true }) - @Max(999999999, { message: 'Property P_SPID must not exceed 999999999' }) - @Min(0, { message: 'Property P_SPID must be at least 0' }) - @IsInt({ message: 'Property P_SPID must be a whole number' }) - @Transform(({ value }) => Number(value)) - @IsNumber({}, { message: 'Property P_SPID must be a number' }) - @IsDefined({ message: 'Property P_SPID is required' }) - P_SPID: number; -} \ No newline at end of file diff --git a/src/dto/carnet/carnet-property.dto.ts b/src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence-property.dto.ts similarity index 75% rename from src/dto/carnet/carnet-property.dto.ts rename to src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence-property.dto.ts index 367679a..423d478 100644 --- a/src/dto/carnet/carnet-property.dto.ts +++ b/src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence-property.dto.ts @@ -1,7 +1,3 @@ - - -// carnet - import { ApiProperty } from "@nestjs/swagger"; import { IsDefined, IsNumber, IsString, Length, Min } from "class-validator"; @@ -25,14 +21,3 @@ export class CARNET_TYPE_DTO { @IsDefined({ message: 'Property p_carnettype is required' }) P_CARNETTYPE: string; } - -export class CARNETSTATUS_DTO { - @ApiProperty({ required: true }) - @Length(0, 20, { - message: 'Property P_CARNETSTATUS must be between 0 to 20 characters', - }) - @IsString() - @IsDefined({ message: 'Property P_CARNETSTATUS is required' }) - P_CARNETSTATUS: string; -} - diff --git a/src/dto/carnet-sequence/carnet-sequence.dto.ts b/src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence.dto.ts similarity index 91% rename from src/dto/carnet-sequence/carnet-sequence.dto.ts rename to src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence.dto.ts index 1b73d16..2958bac 100644 --- a/src/dto/carnet-sequence/carnet-sequence.dto.ts +++ b/src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence.dto.ts @@ -1,5 +1,5 @@ import { IntersectionType } from '@nestjs/swagger'; -import { CARNET_TYPE_DTO, END_NUMBER_DTO, START_NUMBER_DTO } from '../carnet/carnet-property.dto'; +import { CARNET_TYPE_DTO, END_NUMBER_DTO, START_NUMBER_DTO } from './carnet-sequence-property.dto'; import { SPID_DTO } from '../sp/sp-property.dto'; import { REGIONID_DTO } from '../region/region-property.dto'; diff --git a/src/dto/region/region-property.dto.ts b/src/dto/uscib-managed-sp/region/region-property.dto.ts similarity index 100% rename from src/dto/region/region-property.dto.ts rename to src/dto/uscib-managed-sp/region/region-property.dto.ts diff --git a/src/dto/region/region.dto.ts b/src/dto/uscib-managed-sp/region/region.dto.ts similarity index 86% rename from src/dto/region/region.dto.ts rename to src/dto/uscib-managed-sp/region/region.dto.ts index 413b993..4e3144f 100644 --- a/src/dto/region/region.dto.ts +++ b/src/dto/uscib-managed-sp/region/region.dto.ts @@ -1,6 +1,6 @@ import { IntersectionType } from '@nestjs/swagger'; import { REGION_CODE_DTO, REGIONID_DTO } from './region-property.dto'; -import { NAME_DTO } from '../property.dto'; +import { NAME_DTO } from '../../property.dto'; export class InsertRegionsDto extends IntersectionType(REGION_CODE_DTO, NAME_DTO) { } diff --git a/src/dto/contact/contact-property.dto.ts b/src/dto/uscib-managed-sp/sp-contacts/sp-contacts-property.dto.ts similarity index 63% rename from src/dto/contact/contact-property.dto.ts rename to src/dto/uscib-managed-sp/sp-contacts/sp-contacts-property.dto.ts index 7b7ac9c..f0ff011 100644 --- a/src/dto/contact/contact-property.dto.ts +++ b/src/dto/uscib-managed-sp/sp-contacts/sp-contacts-property.dto.ts @@ -1,68 +1,7 @@ import { ApiProperty } from "@nestjs/swagger"; import { Transform } from "class-transformer"; import { IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsString, Length, Min } from "class-validator"; -import { YON } from "../property.dto"; - -// CONTACT -// export class SP_CONTACTID_DTO { -// @ApiProperty({ required: true }) -// @Min(0, { message: 'Property p_spcontactid must be at least 0' }) -// @IsInt({ message: 'Property p_SPid must be a whole number' }) -// @Transform(({ value }) => Number(value)) -// @IsNumber({}, { message: 'Property p_spcontactid must be a number' }) -// @IsDefined({ message: 'Property p_spcontactid is required' }) -// P_SPCONTACTID: number; -// } -// export class DEFAULT_CONTACT_FLAG_DTO { -// @ApiProperty({ required: true, enum: YON }) -// @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) -// @IsEnum(YON, { message: 'P_EnablePasswordPolicy must be either "Y" or "N"' }) -// @Length(1, 1, { message: 'P_EnablePasswordPolicy must be between 5 and 6 characters' }) -// @IsString() -// @IsDefined({ message: "Invalid Request" }) -// p_defcontactflag: YON; -// } -// export class FIRSTNAME_DTO { -// @ApiProperty({ required: true }) -// @IsString() -// p_firstname: string; -// } -// export class LASTNAME_DTO { -// @ApiProperty({ required: true }) -// @IsString() -// p_lastname: string; -// } -// export class MIDDLE_INITIAL_DTO { -// @ApiProperty({ required: false }) -// @IsString() -// P_MIDDLEINITIAL: string; -// } -// export class TITLE_DTO { -// @ApiProperty({ required: true }) -// @IsString() -// p_title: string; -// } -// export class PHONE_NO_DTO { -// @ApiProperty({ required: true }) -// @IsString() -// p_phoneno: string; -// } -// export class MOBILE_NO_DTO { -// @ApiProperty({ required: true }) -// @IsString() -// p_mobileno: string; -// } -// export class FAX_NO_DTO { -// @ApiProperty({ required: true }) -// @IsString() -// p_faxno: string; -// } -// export class EMAIL_ADDRESS_DTO { -// @ApiProperty({ required: true }) -// @IsEmail() -// p_emailaddress: string; -// } - +import { YON } from "src/dto/carnet-application/carnet-application-property.dto"; export class SP_CONTACTID_DTO { @ApiProperty({ required: true }) @@ -143,4 +82,4 @@ export class EMAIL_ADDRESS_DTO { @IsString({ message: 'Property P_EMAILADDRESS must be a string' }) @IsDefined({ message: 'Property P_EMAILADDRESS is required' }) P_EMAILADDRESS: string; -} +} \ No newline at end of file diff --git a/src/dto/sp-contacts/sp-contacts.dto.ts b/src/dto/uscib-managed-sp/sp-contacts/sp-contacts.dto.ts similarity index 88% rename from src/dto/sp-contacts/sp-contacts.dto.ts rename to src/dto/uscib-managed-sp/sp-contacts/sp-contacts.dto.ts index 52878db..7e6981b 100644 --- a/src/dto/sp-contacts/sp-contacts.dto.ts +++ b/src/dto/uscib-managed-sp/sp-contacts/sp-contacts.dto.ts @@ -4,8 +4,8 @@ import { DEFAULT_CONTACT_FLAG_DTO, EMAIL_ADDRESS_DTO, FAX_NO_DTO, FIRSTNAME_DTO, LASTNAME_DTO, MIDDLE_INITIAL_DTO, MOBILE_NO_DTO, PHONE_NO_DTO, SP_CONTACTID_DTO, TITLE_DTO -} from 'src/dto/contact/contact-property.dto'; -import { USER_ID_DTO } from '../property.dto'; +} from 'src/dto/property.dto'; +import { USER_ID_DTO } from '../../property.dto'; import { SPID_DTO } from '../sp/sp-property.dto'; export class InsertSPContactsDTO extends IntersectionType( diff --git a/src/dto/uscib-managed-sp/sp/sp-property.dto.ts b/src/dto/uscib-managed-sp/sp/sp-property.dto.ts new file mode 100644 index 0000000..02f0248 --- /dev/null +++ b/src/dto/uscib-managed-sp/sp/sp-property.dto.ts @@ -0,0 +1,183 @@ +// SP + +import { ApiProperty } from "@nestjs/swagger"; +import { Transform, Type } from "class-transformer"; +import { IsArray, IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsOptional, IsString, + Length, Matches, Max, MaxLength, Min, ValidateNested } from "class-validator"; + +export class SPID_DTO { + @ApiProperty({ required: true }) + @Max(999999999, { message: 'Property P_SPID must not exceed 999999999' }) + @Min(0, { message: 'Property P_SPID must be at least 0' }) + @IsInt({ message: 'Property P_SPID must be a whole number' }) + @Transform(({ value }) => Number(value)) + @IsNumber({}, { message: 'Property P_SPID must be a number' }) + @IsDefined({ message: 'Property P_SPID is required' }) + P_SPID: number; +} + +export class USERID_DTO { + @ApiProperty({ required: true }) + @Length(0, 50, { + message: 'Property P_USERID must be between 0 to 50 characters', + }) + @IsString({ message: 'Property P_USERID must be a string' }) + @IsDefined({ message: 'Property P_USERID is required' }) + P_USERID: string; +} + +export class USER_ID_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_USER_ID must be a string' }) + @IsDefined({ message: 'Property P_USER_ID is required' }) + P_USER_ID: string; +} + +export class EMAIL_DTO { + + @ApiProperty({ required: true }) + @IsEmail({}, { message: "Invalid P_EMAILADDR property" }) + @Length(0, 50, { + message: 'Property P_EMAILADDR must be between 0 to 50 characters', + }) + @IsString({ message: 'P_EMAILADDR p_userid must be string' }) + @IsDefined({ message: 'P_EMAILADDR p_userid is required' }) + P_EMAILADDR: string; + +} + +export class LOOKUP_CODE_DTO { + @ApiProperty({ required: true }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_LOOKUPCODE: string; +} + +export class PASSWORD_DTO { + @ApiProperty({ required: true }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_PASSWORD: string; +} + + + +export class NAME_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_NAME must be a string' }) + @IsDefined({ message: 'Property P_NAME is required' }) + P_NAME: string; +} + +export class ADDRESS1_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_ADDRESS1 must be a string' }) + @IsDefined({ message: 'Property P_ADDRESS1 is required' }) + P_ADDRESS1: string; +} + +export class ADDRESS2_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_ADDRESS2 must be a string' }) + @IsDefined({ message: 'Property P_ADDRESS2 is required' }) + P_ADDRESS2: string; +} + +export class CITY_DTO { + @ApiProperty({ required: true }) + @Length(0, 30, { + message: 'Property P_CITY must be between 0 to 30 characters', + }) + @IsString({ message: 'Property P_CITY must be a string' }) + @IsDefined({ message: 'Property P_CITY is required' }) + P_CITY: string; +} + +export class STATE_DTO { + @ApiProperty({ required: true }) + @Length(0, 2, { + message: 'Property P_STATE must be between 0 to 2 characters', + }) + @IsString({ message: 'Property P_STATE must be a string' }) + @IsDefined({ message: 'Property P_STATE is required' }) + P_STATE: string; +} + +export class COUNTRY_DTO { + @ApiProperty({ required: true }) + @Length(0, 50, { + message: 'Property P_COUNTRY must be between 0 to 50 characters', + }) + @IsString({ message: 'Property P_COUNTRY must be a string' }) + @IsDefined({ message: 'Property P_COUNTRY is required' }) + P_COUNTRY: string; +} + +export class ZIP_DTO { + @ApiProperty({ required: true }) + @Length(0, 10, { + message: 'Property P_ZIP must be between 0 to 10 characters', + }) + @IsString({ message: 'Property P_ZIP must be a string' }) + @IsDefined({ message: 'Property P_ZIP is required' }) + P_ZIP: string; +} + +export class ISSUING_REGION_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_ISSUINGREGION must be a string' }) + @IsDefined({ message: 'Property P_ISSUINGREGION is required' }) + P_ISSUINGREGION: string; +} + +export class REPLACEMENT_REGION_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_REPLACEMENTREGION must be a string' }) + @IsDefined({ message: 'Property P_REPLACEMENTREGION is required' }) + P_REPLACEMENTREGION: string; +} + +export class BOND_SURETY_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_BONDSURETY must be a string' }) + @IsDefined({ message: 'Property P_BONDSURETY is required' }) + P_BONDSURETY: string; +} + +export class CARGO_POLICY_NO_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_CARGOPOLICYNO must be a string' }) + @IsDefined({ message: 'Property P_CARGOPOLICYNO is required' }) + P_CARGOPOLICYNO: string; +} + +export class CARGO_SURETY_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_CARGOSURETY must be a string' }) + @IsDefined({ message: 'Property P_CARGOSURETY is required' }) + P_CARGOSURETY: string; +} + +export class NOTES_DTO { + @ApiProperty({ required: true }) + @IsString({ message: 'Property P_NOTES must be a string' }) + P_NOTES: string; +} + +export class FILE_ID_DTO { + @ApiProperty({ required: false }) + @IsString({ message: 'Property P_FILEIDS must be a string' }) + @IsOptional() + P_FILEIDS?: string; +} + + +export class ACTIVE_INACTIVE_STATUS_DTO { + @ApiProperty({ required: true }) + @Matches(/^.{6}$|^.{8}$/, { + message: 'Property P_ACTIVE_INACTIVE is invalid', + }) + @IsString({ message: 'Property P_ACTIVE_INACTIVE must be a string' }) + @IsDefined({ message: 'Property P_ACTIVE_INACTIVE is required' }) + P_ACTIVE_INACTIVE: string; +} \ No newline at end of file diff --git a/src/dto/sp/sp.dto.ts b/src/dto/uscib-managed-sp/sp/sp.dto.ts similarity index 100% rename from src/dto/sp/sp.dto.ts rename to src/dto/uscib-managed-sp/sp/sp.dto.ts diff --git a/src/dto/user-maintenance/user-maintenance-property.dto.ts b/src/dto/user-maintenance/user-maintenance-property.dto.ts new file mode 100644 index 0000000..198efce --- /dev/null +++ b/src/dto/user-maintenance/user-maintenance-property.dto.ts @@ -0,0 +1,29 @@ +import { ApiProperty } from "@nestjs/swagger"; +import { Transform, Type } from "class-transformer"; +import { IsArray, IsDefined, IsEmail, IsEnum, IsInt, IsNumber, IsOptional, IsString, + Length, Matches, Max, MaxLength, Min, ValidateNested } from "class-validator"; + +import { YON } from "../carnet-application/carnet-application-property.dto"; + + +// user maintenance + +export class ENABLE_PASSWORD_POLICY_DTO { + @ApiProperty({ required: true, enum: YON }) + @Transform(({ value }) => typeof value === 'string' ? value.trim().toUpperCase() : value) + @IsEnum(YON, { message: 'P_ENABLEPASSWORDPOLICY must be either "Y" or "N"' }) + @Length(1, 1, { message: 'P_ENABLEPASSWORDPOLICY must be between 5 and 6 characters' }) + @IsString() + @IsDefined({ message: "Invalid Request" }) + P_ENABLEPASSWORDPOLICY: YON; +} + +export class DOMAIN_DTO { + @ApiProperty({ required: true }) + @Length(0, 50, { + message: 'Property P_DOMAIN must be between 0 to 50 characters', + }) + @IsString({ message: 'Property P_DOMAIN must be a string' }) + @IsDefined({ message: 'Property P_DOMAIN is required' }) + P_DOMAIN: string; +} \ No newline at end of file diff --git a/src/dto/user-maintenance/user-maintenance.dto.ts b/src/dto/user-maintenance/user-maintenance.dto.ts index bb8d493..4741e4e 100644 --- a/src/dto/user-maintenance/user-maintenance.dto.ts +++ b/src/dto/user-maintenance/user-maintenance.dto.ts @@ -1,6 +1,8 @@ import { IntersectionType } from "@nestjs/swagger"; -import { CLIENT_CONTACTID_DTO, CLIENTID_DTO, DOMAIN_DTO, EMAIL_DTO, ENABLE_PASSWORD_POLICY_DTO, LOOKUP_CODE_DTO, PASSWORD_DTO, USERID_DTO } from "src/dto/property.dto"; -import { SPID_DTO } from "../sp/sp-property.dto"; +import { CLIENT_CONTACTID_DTO, CLIENTID_DTO, DOMAIN_DTO, + EMAIL_DTO, ENABLE_PASSWORD_POLICY_DTO, LOOKUP_CODE_DTO, PASSWORD_DTO, + USERID_DTO } from "src/dto/property.dto"; +import { SPID_DTO } from "../uscib-managed-sp/sp/sp-property.dto"; export class SPID_CLIENTID_DTO extends IntersectionType(SPID_DTO, CLIENTID_DTO) { } diff --git a/src/mssql/manage-clients/manage-clients.controller.ts b/src/mssql/manage-clients/manage-clients.controller.ts index a72037f..5d340ff 100644 --- a/src/mssql/manage-clients/manage-clients.controller.ts +++ b/src/mssql/manage-clients/manage-clients.controller.ts @@ -6,7 +6,7 @@ import { CreateClientContactsDTO, CreateClientDataDTO, CreateClientLocationsDTO, GetPreparerByClientidContactsByClientidLocByClientidDTO, GetPreparersDTO, UpdateClientContactsDTO, UpdateClientDTO, UpdateClientLocationsDTO -} from 'src/dto/client/client.dto'; +} from 'src/dto/manage-clients/manage-clients.dto'; @Controller('mssql') export class ManageClientsController { diff --git a/src/mssql/manage-clients/manage-clients.service.ts b/src/mssql/manage-clients/manage-clients.service.ts index 1afbbde..07eefb3 100644 --- a/src/mssql/manage-clients/manage-clients.service.ts +++ b/src/mssql/manage-clients/manage-clients.service.ts @@ -6,7 +6,7 @@ import { CreateClientContactsDTO, CreateClientDataDTO, CreateClientLocationsDTO, GetPreparerByClientidContactsByClientidLocByClientidDTO, GetPreparersDTO, UpdateClientContactsDTO, UpdateClientDTO, UpdateClientLocationsDTO -} from 'src/dto/client/client.dto'; +} from 'src/dto/manage-clients/manage-clients.dto'; @Injectable() export class ManageClientsService { diff --git a/src/mssql/manage-fee/manage-fee.controller.ts b/src/mssql/manage-fee/manage-fee.controller.ts index b69ec15..20bed06 100644 --- a/src/mssql/manage-fee/manage-fee.controller.ts +++ b/src/mssql/manage-fee/manage-fee.controller.ts @@ -5,7 +5,7 @@ import { CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO -} from 'src/dto/fee/fee.dto'; +} from 'src/dto/manage-fee/manage-fee.dto'; @Controller('mssql') export class ManageFeeController { diff --git a/src/mssql/manage-fee/manage-fee.service.ts b/src/mssql/manage-fee/manage-fee.service.ts index d549520..43f7d8a 100644 --- a/src/mssql/manage-fee/manage-fee.service.ts +++ b/src/mssql/manage-fee/manage-fee.service.ts @@ -8,7 +8,7 @@ import { CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO -} from 'src/dto/fee/fee.dto'; +} from 'src/dto/manage-fee/manage-fee.dto'; @Injectable() export class ManageFeeService { diff --git a/src/mssql/manage-holders/manage-holders.controller.ts b/src/mssql/manage-holders/manage-holders.controller.ts index a75a76e..f656ea0 100644 --- a/src/mssql/manage-holders/manage-holders.controller.ts +++ b/src/mssql/manage-holders/manage-holders.controller.ts @@ -1,7 +1,7 @@ import { BadRequestException, Body, Controller, Get, Param, ParseIntPipe, Patch, Post, Put } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { ManageHoldersService } from './manage-holders.service'; -import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/dto/holder/holder.dto'; +import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/dto/manage-holders/manage-holders.dto'; @Controller('mssql') export class ManageHoldersController { diff --git a/src/mssql/manage-holders/manage-holders.service.ts b/src/mssql/manage-holders/manage-holders.service.ts index 7cb3db6..32bd633 100644 --- a/src/mssql/manage-holders/manage-holders.service.ts +++ b/src/mssql/manage-holders/manage-holders.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { Connection, Request } from 'mssql'; import { MssqlDBService } from 'src/db/db.service'; import * as mssql from 'mssql'; -import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/dto/holder/holder.dto'; +import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/dto/manage-holders/manage-holders.dto'; @Injectable() export class ManageHoldersService { diff --git a/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts b/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts index cd453c8..bf3a953 100644 --- a/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts +++ b/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts @@ -1,8 +1,8 @@ import { Body, Controller, Get, Post, Query } from '@nestjs/common'; import { CarnetSequenceService } from './carnet-sequence.service'; import { ApiTags } from '@nestjs/swagger'; -import { CreateCarnetSequenceDTO } from 'src/dto/carnet-sequence/carnet-sequence.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; +import { CreateCarnetSequenceDTO } from 'src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence.dto'; +import { SPID_DTO } from 'src/dto/uscib-managed-sp/sp/sp-property.dto'; @ApiTags('Carnet Sequence - Mssql') @Controller('mssql') diff --git a/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts b/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts index 35b1c44..56689e0 100644 --- a/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts +++ b/src/mssql/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts @@ -2,8 +2,8 @@ import { Injectable } from '@nestjs/common'; import { Connection, Request } from 'mssql'; import { MssqlDBService } from 'src/db/db.service'; import * as mssql from 'mssql' -import { CreateCarnetSequenceDTO } from 'src/dto/carnet-sequence/carnet-sequence.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; +import { CreateCarnetSequenceDTO } from 'src/dto/uscib-managed-sp/carnet-sequence/carnet-sequence.dto'; +import { SPID_DTO } from 'src/dto/uscib-managed-sp/sp/sp-property.dto'; @Injectable() export class CarnetSequenceService { diff --git a/src/mssql/uscib-managed-sp/region/region.controller.ts b/src/mssql/uscib-managed-sp/region/region.controller.ts index 412a3b4..6d30f88 100644 --- a/src/mssql/uscib-managed-sp/region/region.controller.ts +++ b/src/mssql/uscib-managed-sp/region/region.controller.ts @@ -1,7 +1,7 @@ import { Body, Controller, Get, Patch, Post } from '@nestjs/common'; import { ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'; import { RegionService } from './region.service'; -import { InsertRegionsDto, UpdateRegionDto } from 'src/dto/region/region.dto'; +import { InsertRegionsDto, UpdateRegionDto } from 'src/dto/uscib-managed-sp/region/region.dto'; @Controller('mssql') export class RegionController { diff --git a/src/mssql/uscib-managed-sp/region/region.service.ts b/src/mssql/uscib-managed-sp/region/region.service.ts index 7905693..7e3b570 100644 --- a/src/mssql/uscib-managed-sp/region/region.service.ts +++ b/src/mssql/uscib-managed-sp/region/region.service.ts @@ -1,7 +1,7 @@ import { Injectable, InternalServerErrorException } from '@nestjs/common'; import { Connection, Request } from 'mssql'; import { MssqlDBService } from 'src/db/db.service'; -import { InsertRegionsDto, UpdateRegionDto } from 'src/dto/region/region.dto'; +import { InsertRegionsDto, UpdateRegionDto } from 'src/dto/uscib-managed-sp/region/region.dto'; import * as mssql from 'mssql'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; diff --git a/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts b/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts index 6cab5d4..48bfec2 100644 --- a/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts +++ b/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts @@ -1,9 +1,12 @@ import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common'; import { SpContactsService } from './sp-contacts.service'; import { ApiTags } from '@nestjs/swagger'; -import { InsertSPContactsDTO, UpdateSPContactsDTO } from 'src/dto/sp-contacts/sp-contacts.dto'; -import { SP_CONTACTID_DTO } from 'src/dto/contact/contact-property.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; + +import { + SPID_DTO, + SP_CONTACTID_DTO, + InsertSPContactsDTO, UpdateSPContactsDTO +} from 'src/dto/property.dto'; @Controller('mssql') export class SpContactsController { @@ -41,7 +44,7 @@ export class SpContactsController { return this.spContactsService.setSPDefaultcontact(body); } - @ApiTags('SPContacts - Mssql') + @ApiTags('SPContacts - Mssql') @Put('/UpdateSPContacts') updateSPContacts(@Body() body: UpdateSPContactsDTO) { return this.spContactsService.updateSPContacts(body); diff --git a/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.service.ts b/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.service.ts index b9d0f8c..c2fc568 100644 --- a/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.service.ts +++ b/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.service.ts @@ -2,9 +2,11 @@ import { Injectable } from '@nestjs/common'; import { MssqlDBService } from 'src/db/db.service'; import * as mssql from 'mssql' import { Connection, Request } from 'mssql'; -import { InsertSPContactsDTO, UpdateSPContactsDTO } from 'src/dto/sp-contacts/sp-contacts.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; -import { SP_CONTACTID_DTO } from 'src/dto/contact/contact-property.dto'; + +import { SP_CONTACTID_DTO, + SPID_DTO, + InsertSPContactsDTO, UpdateSPContactsDTO + } from 'src/dto/property.dto'; @Injectable() export class SpContactsService { diff --git a/src/mssql/uscib-managed-sp/sp/sp.controller.ts b/src/mssql/uscib-managed-sp/sp/sp.controller.ts index 7a76b69..1e8cc3c 100644 --- a/src/mssql/uscib-managed-sp/sp/sp.controller.ts +++ b/src/mssql/uscib-managed-sp/sp/sp.controller.ts @@ -1,8 +1,8 @@ import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { SpService } from './sp.service'; -import { InsertNewServiceProviderDTO, UpdateServiceProviderDTO } from 'src/dto/sp/sp.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; +import { InsertNewServiceProviderDTO, UpdateServiceProviderDTO } from 'src/dto/uscib-managed-sp/sp/sp.dto'; +import { SPID_DTO } from 'src/dto/uscib-managed-sp/sp/sp-property.dto'; @Controller('mssql') export class SpController { diff --git a/src/mssql/uscib-managed-sp/sp/sp.service.ts b/src/mssql/uscib-managed-sp/sp/sp.service.ts index d1b0e64..9bff441 100644 --- a/src/mssql/uscib-managed-sp/sp/sp.service.ts +++ b/src/mssql/uscib-managed-sp/sp/sp.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@nestjs/common'; import { Connection, Request } from 'mssql'; import { MssqlDBService } from 'src/db/db.service'; -import { InsertNewServiceProviderDTO, UpdateServiceProviderDTO } from 'src/dto/sp/sp.dto'; +import { InsertNewServiceProviderDTO, UpdateServiceProviderDTO } from 'src/dto/uscib-managed-sp/sp/sp.dto'; import * as mssql from 'mssql' -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; +import { SPID_DTO } from 'src/dto/uscib-managed-sp/sp/sp-property.dto'; @Injectable() export class SpService { diff --git a/src/oracle/carnet-application/carnet-application.controller.ts b/src/oracle/carnet-application/carnet-application.controller.ts index 4ef3497..62de76e 100644 --- a/src/oracle/carnet-application/carnet-application.controller.ts +++ b/src/oracle/carnet-application/carnet-application.controller.ts @@ -1,7 +1,12 @@ import { Body, Controller, Patch, Post } from '@nestjs/common'; import { CarnetApplicationService } from './carnet-application.service'; import { ApiTags } from '@nestjs/swagger'; -import { CarnetProcessingCenterDTO, SaveCarnetApplicationDTO, TransmitApplicationtoProcessDTO } from 'src/dto/carnet-application/carnet-application.dto'; + + +import { + CarnetProcessingCenterDTO, SaveCarnetApplicationDTO, TransmitApplicationtoProcessDTO +} from 'src/dto/property.dto'; + @ApiTags('Carnet Application - Oracle') @Controller('oracle') diff --git a/src/oracle/carnet-application/carnet-application.service.ts b/src/oracle/carnet-application/carnet-application.service.ts index b7f6ee3..22f3f87 100644 --- a/src/oracle/carnet-application/carnet-application.service.ts +++ b/src/oracle/carnet-application/carnet-application.service.ts @@ -1,10 +1,13 @@ import { Injectable, Logger } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; -import { CarnetProcessingCenterDTO, SaveCarnetApplicationDTO, TransmitApplicationtoProcessDTO } from 'src/dto/carnet-application/carnet-application.dto'; import * as oracledb from 'oracledb' import { InternalServerException } from 'src/exceptions/internalServerError.exception'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; -import { COUNTRYTABLE_DTO, COUNTRYTABLE_ROW_DTO, GLTABLE_DTO, GLTABLE_ROW_DTO } from 'src/dto/property.dto'; + +import { + COUNTRYTABLE_DTO, COUNTRYTABLE_ROW_DTO, GLTABLE_DTO, GLTABLE_ROW_DTO, + CarnetProcessingCenterDTO, SaveCarnetApplicationDTO, TransmitApplicationtoProcessDTO +} from 'src/dto/property.dto'; @Injectable() export class CarnetApplicationService { diff --git a/src/oracle/home-page/home-page.controller.ts b/src/oracle/home-page/home-page.controller.ts index db2127a..9c9e3b2 100644 --- a/src/oracle/home-page/home-page.controller.ts +++ b/src/oracle/home-page/home-page.controller.ts @@ -1,19 +1,17 @@ import { Get, - Post, - Body, Param, Controller, - ParseIntPipe, - BadRequestException, } from '@nestjs/common'; import { HomePageService } from './home-page.service'; import { ApiTags } from '@nestjs/swagger'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; -import { GetCarnetDetailsbyCarnetStatusDTO } from 'src/dto/carnet/carnet.dto'; -import { EMAIL_DTO, USERID_DTO } from 'src/dto/property.dto'; +import { + EMAIL_DTO, + GetCarnetDetailsbyCarnetStatusDTO, + SPID_DTO +} from 'src/dto/property.dto'; @ApiTags('HomePage - Oracle') @Controller('oracle') diff --git a/src/oracle/home-page/home-page.service.ts b/src/oracle/home-page/home-page.service.ts index 71df3be..0077a71 100644 --- a/src/oracle/home-page/home-page.service.ts +++ b/src/oracle/home-page/home-page.service.ts @@ -2,9 +2,12 @@ import { Injectable } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; import * as oracledb from 'oracledb'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; -import { GetCarnetDetailsbyCarnetStatusDTO } from 'src/dto/carnet/carnet.dto'; -import { EMAIL_DTO } from 'src/dto/property.dto'; + +import { + EMAIL_DTO, + GetCarnetDetailsbyCarnetStatusDTO, + SPID_DTO +} from 'src/dto/property.dto'; @Injectable() export class HomePageService { diff --git a/src/oracle/manage-clients/manage-clients.controller.ts b/src/oracle/manage-clients/manage-clients.controller.ts index 500e835..b4118fe 100644 --- a/src/oracle/manage-clients/manage-clients.controller.ts +++ b/src/oracle/manage-clients/manage-clients.controller.ts @@ -1,11 +1,12 @@ import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common'; import { ManageClientsService } from './manage-clients.service'; +import { ApiTags } from '@nestjs/swagger'; + import { CreateClientContactsDTO, CreateClientDataDTO, CreateClientLocationsDTO, GetPreparerByClientidContactsByClientidLocByClientidDTO, GetPreparersDTO, UpdateClientContactsDTO, UpdateClientDTO, UpdateClientLocationsDTO -} from 'src/dto/client/client.dto'; -import { ApiTags } from '@nestjs/swagger'; +} from 'src/dto/property.dto'; @Controller('oracle') export class ManageClientsController { diff --git a/src/oracle/manage-clients/manage-clients.service.ts b/src/oracle/manage-clients/manage-clients.service.ts index 1380f9c..d7ccb9c 100644 --- a/src/oracle/manage-clients/manage-clients.service.ts +++ b/src/oracle/manage-clients/manage-clients.service.ts @@ -4,13 +4,14 @@ import { OracleDBService } from 'src/db/db.service'; import * as oracledb from 'oracledb'; import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; -import { CONTACTSTABLE_ROW_DTO } from 'src/dto/holder/holder.dto'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; + import { CLIENTLOCADDRESSTABLE_ROW_DTO, CreateClientContactsDTO, CreateClientDataDTO, CreateClientLocationsDTO, GetPreparerByClientidContactsByClientidLocByClientidDTO, - GetPreparersDTO, UpdateClientContactsDTO, UpdateClientDTO, UpdateClientLocationsDTO -} from 'src/dto/client/client.dto'; + GetPreparersDTO, UpdateClientContactsDTO, UpdateClientDTO, UpdateClientLocationsDTO, + CONTACTSTABLE_ROW_DTO +} from 'src/dto/property.dto'; @Injectable() export class ManageClientsService { diff --git a/src/oracle/manage-fee/manage-fee.controller.ts b/src/oracle/manage-fee/manage-fee.controller.ts index d37a998..2861cd1 100644 --- a/src/oracle/manage-fee/manage-fee.controller.ts +++ b/src/oracle/manage-fee/manage-fee.controller.ts @@ -2,11 +2,15 @@ import { Body, Controller, Get, Patch, Post, Query } from '@nestjs/common'; import { ManageFeeService } from './manage-fee.service'; import { ApiTags } from '@nestjs/swagger'; -import { CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO } from 'src/dto/fee/fee.dto'; +import { + CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, + CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, + UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO +} from 'src/dto/property.dto'; @Controller('oracle') export class ManageFeeController { - constructor(private readonly manageFeeService: ManageFeeService) {} + constructor(private readonly manageFeeService: ManageFeeService) { } @ApiTags('Manage Fee - Oracle') @Get('/GetBasicFeeRates') diff --git a/src/oracle/manage-fee/manage-fee.service.ts b/src/oracle/manage-fee/manage-fee.service.ts index 921c0cc..250a515 100644 --- a/src/oracle/manage-fee/manage-fee.service.ts +++ b/src/oracle/manage-fee/manage-fee.service.ts @@ -4,12 +4,14 @@ import { OracleDBService } from 'src/db/db.service'; import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; + +import { closeOracleDbConnection, handleError } from 'src/utils/helper'; + import { CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO -} from 'src/dto/fee/fee.dto'; -import { closeOracleDbConnection, handleError } from 'src/utils/helper'; +} from 'src/dto/property.dto'; @Injectable() export class ManageFeeService { diff --git a/src/oracle/manage-holders/manage-holders.controller.ts b/src/oracle/manage-holders/manage-holders.controller.ts index 5f80a8a..5461cf4 100644 --- a/src/oracle/manage-holders/manage-holders.controller.ts +++ b/src/oracle/manage-holders/manage-holders.controller.ts @@ -11,7 +11,11 @@ import { } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { ManageHoldersService } from './manage-holders.service'; -import { CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/dto/holder/holder.dto'; + +import { + CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, + HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO +} from 'src/dto/property.dto'; @Controller('oracle') export class ManageHoldersController { diff --git a/src/oracle/manage-holders/manage-holders.service.ts b/src/oracle/manage-holders/manage-holders.service.ts index e7f1708..f22b059 100644 --- a/src/oracle/manage-holders/manage-holders.service.ts +++ b/src/oracle/manage-holders/manage-holders.service.ts @@ -2,10 +2,13 @@ import { Injectable, Logger } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; import * as oracledb from 'oracledb'; import { Connection, Result } from 'oracledb'; -import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; -import { CONTACTSTABLE_ROW_DTO, CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO } from 'src/dto/holder/holder.dto'; + +import { + CONTACTSTABLE_ROW_DTO, CreateHoldersDTO, GetHolderDTO, HolderActivateOrInactivateDTO, + HolderContactActivateOrInactivateDTO, UpdateHolderContactDTO, UpdateHolderDTO +} from 'src/dto/property.dto'; @Injectable() export class ManageHoldersService { diff --git a/src/oracle/param-table/param-table.controller.ts b/src/oracle/param-table/param-table.controller.ts index 9cd4104..a71e923 100644 --- a/src/oracle/param-table/param-table.controller.ts +++ b/src/oracle/param-table/param-table.controller.ts @@ -1,7 +1,9 @@ import { Body, Controller, Get, Patch, Post, Put, Query } from '@nestjs/common'; import { ApiQuery, ApiTags } from '@nestjs/swagger'; import { ParamTableService } from './param-table.service'; -import { ActivateOrInactivateParamRecordDTO, CreateParamRecordDTO, CreateTableRecordDTO, getParamValuesDTO, UpdateParamRecordDTO } from 'src/dto/param-table/param-table.dto'; + +import { ActivateOrInactivateParamRecordDTO, CreateParamRecordDTO, CreateTableRecordDTO, + getParamValuesDTO, UpdateParamRecordDTO } from 'src/dto/property.dto'; @ApiTags('Param Table - Oracle') @Controller('oracle') diff --git a/src/oracle/param-table/param-table.service.ts b/src/oracle/param-table/param-table.service.ts index 3394cb0..9afac1d 100644 --- a/src/oracle/param-table/param-table.service.ts +++ b/src/oracle/param-table/param-table.service.ts @@ -4,7 +4,12 @@ import * as oracledb from 'oracledb'; import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; -import { ActivateOrInactivateParamRecordDTO, CreateParamRecordDTO, CreateTableRecordDTO, getParamValuesDTO, UpdateParamRecordDTO } from 'src/dto/param-table/param-table.dto'; + + +import { + ActivateOrInactivateParamRecordDTO, CreateParamRecordDTO, CreateTableRecordDTO, + getParamValuesDTO, UpdateParamRecordDTO +} from 'src/dto/property.dto'; @Injectable() export class ParamTableService { diff --git a/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts b/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts index 00c1565..e0d859f 100644 --- a/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts +++ b/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.controller.ts @@ -1,10 +1,8 @@ import { Body, Controller, Get, Param, Post, Query } from '@nestjs/common'; -import { - CreateCarnetSequenceDTO -} from '../../../dto/carnet-sequence/carnet-sequence.dto'; import { ApiTags } from '@nestjs/swagger'; import { CarnetSequenceService } from './carnet-sequence.service'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; + +import { SPID_DTO, CreateCarnetSequenceDTO } from 'src/dto/property.dto'; @ApiTags('Carnet Sequence - Oracle') @Controller('oracle') diff --git a/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts b/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts index 833ffb2..302b3df 100644 --- a/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts +++ b/src/oracle/uscib-managed-sp/carnet-sequence/carnet-sequence.service.ts @@ -1,14 +1,11 @@ import { Injectable, Logger } from '@nestjs/common'; import * as oracledb from 'oracledb'; import { OracleDBService } from 'src/db/db.service'; -import { - CreateCarnetSequenceDTO, -} from '../../../dto/carnet-sequence/carnet-sequence.dto'; - import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; + +import { SPID_DTO, CreateCarnetSequenceDTO } from 'src/dto/property.dto'; @Injectable() export class CarnetSequenceService { diff --git a/src/oracle/uscib-managed-sp/region/region.controller.ts b/src/oracle/uscib-managed-sp/region/region.controller.ts index 1249585..01420a0 100644 --- a/src/oracle/uscib-managed-sp/region/region.controller.ts +++ b/src/oracle/uscib-managed-sp/region/region.controller.ts @@ -3,7 +3,8 @@ import { RegionService } from './region.service'; import { Get, Post, Body, Controller, Patch } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; -import { InsertRegionsDto, UpdateRegionDto } from '../../../dto/region/region.dto'; + +import { InsertRegionsDto, UpdateRegionDto } from 'src/dto/property.dto'; @ApiTags('Regions - Oracle') @Controller('oracle') diff --git a/src/oracle/uscib-managed-sp/region/region.service.ts b/src/oracle/uscib-managed-sp/region/region.service.ts index fc829ad..b6627fd 100644 --- a/src/oracle/uscib-managed-sp/region/region.service.ts +++ b/src/oracle/uscib-managed-sp/region/region.service.ts @@ -1,11 +1,12 @@ import { Injectable, Logger } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; import * as oracledb from 'oracledb'; -import { InsertRegionsDto, UpdateRegionDto } from '../../../dto/region/region.dto'; import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; +import { InsertRegionsDto, UpdateRegionDto } from 'src/dto/property.dto'; + @Injectable() export class RegionService { private readonly logger = new Logger(RegionService.name); diff --git a/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts b/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts index 009edf5..1ee2d88 100644 --- a/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts +++ b/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts @@ -1,12 +1,11 @@ import { SpContactsService } from './sp-contacts.service'; import { Body, Controller, Get, Param, Patch, Post, Put, Query } from '@nestjs/common'; -import { - InsertSPContactsDTO, - UpdateSPContactsDTO, -} from '../../../dto/sp-contacts/sp-contacts.dto'; import { ApiTags } from '@nestjs/swagger'; -import { SP_CONTACTID_DTO } from 'src/dto/contact/contact-property.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; + +import { SPID_DTO, + SP_CONTACTID_DTO, + InsertSPContactsDTO,UpdateSPContactsDTO + } from 'src/dto/property.dto'; @ApiTags('SPContacts - Oracle') @Controller('oracle') diff --git a/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts b/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts index 206d1ec..30e2b6f 100644 --- a/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts +++ b/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts @@ -1,16 +1,15 @@ import { Injectable, Logger } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; import * as oracledb from 'oracledb'; -import { - InsertSPContactsDTO, - UpdateSPContactsDTO, -} from '../../../dto/sp-contacts/sp-contacts.dto'; import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; -import { SP_CONTACTID_DTO } from 'src/dto/contact/contact-property.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; +import { SPID_DTO, + SP_CONTACTID_DTO, + InsertSPContactsDTO,UpdateSPContactsDTO + } from 'src/dto/property.dto'; + @Injectable() export class SpContactsService { private readonly logger = new Logger(SpContactsService.name); diff --git a/src/oracle/uscib-managed-sp/sp/sp.controller.ts b/src/oracle/uscib-managed-sp/sp/sp.controller.ts index 0157aee..a5c1921 100644 --- a/src/oracle/uscib-managed-sp/sp/sp.controller.ts +++ b/src/oracle/uscib-managed-sp/sp/sp.controller.ts @@ -1,11 +1,11 @@ import { Body, Controller, Get, Param, Post, Put, Query } from '@nestjs/common'; import { SpService } from './sp.service'; import { ApiTags } from '@nestjs/swagger'; + import { - InsertNewServiceProviderDTO, + SPID_DTO, InsertNewServiceProviderDTO, UpdateServiceProviderDTO, -} from '../../../dto/sp/sp.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; +} from 'src/dto/property.dto'; @ApiTags('SP - Oracle') @Controller('oracle') diff --git a/src/oracle/uscib-managed-sp/sp/sp.service.ts b/src/oracle/uscib-managed-sp/sp/sp.service.ts index bca421b..f8e72e4 100644 --- a/src/oracle/uscib-managed-sp/sp/sp.service.ts +++ b/src/oracle/uscib-managed-sp/sp/sp.service.ts @@ -1,15 +1,15 @@ import { Injectable, Logger } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; import * as oracledb from 'oracledb'; -import { - InsertNewServiceProviderDTO, - UpdateServiceProviderDTO, -} from '../../../dto/sp/sp.dto'; import { BadRequestException } from 'src/exceptions/badRequest.exception'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; +import { + SPID_DTO, InsertNewServiceProviderDTO, + UpdateServiceProviderDTO, +} from 'src/dto/property.dto'; + @Injectable() export class SpService { private readonly logger = new Logger(SpService.name); diff --git a/src/oracle/user-maintenance/user-maintenance.controller.ts b/src/oracle/user-maintenance/user-maintenance.controller.ts index ff56b32..a0c5e32 100644 --- a/src/oracle/user-maintenance/user-maintenance.controller.ts +++ b/src/oracle/user-maintenance/user-maintenance.controller.ts @@ -1,9 +1,12 @@ import { Body, Controller, Get, Param, Patch, Post, Query } from '@nestjs/common'; import { UserMaintenanceService } from './user-maintenance.service'; import { ApiTags } from '@nestjs/swagger'; -import { CreateClientLoginsDTO, CreateSPLoginsDTO, CreateUSCIBLoginsDTO, SPID_CLIENTID_DTO, SPID_EMAIL_DTO } from '../../dto/user-maintenance/user-maintenance.dto'; -import { EMAIL_DTO, USERID_DTO } from 'src/dto/property.dto'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; + +import { + SPID_DTO, + EMAIL_DTO, USERID_DTO, + CreateClientLoginsDTO, CreateSPLoginsDTO, CreateUSCIBLoginsDTO, SPID_CLIENTID_DTO, SPID_EMAIL_DTO +} from 'src/dto/property.dto'; @ApiTags('User Maintenance - Oracle') @Controller('oracle') diff --git a/src/oracle/user-maintenance/user-maintenance.service.ts b/src/oracle/user-maintenance/user-maintenance.service.ts index 6ec6eaa..553ca74 100644 --- a/src/oracle/user-maintenance/user-maintenance.service.ts +++ b/src/oracle/user-maintenance/user-maintenance.service.ts @@ -1,15 +1,14 @@ import { Injectable, Logger } from '@nestjs/common'; import { OracleDBService } from 'src/db/db.service'; -import { - CreateClientLoginsDTO, CreateSPLoginsDTO, CreateUSCIBLoginsDTO, SPID_CLIENTID_DTO, - SPID_EMAIL_DTO -} from '../../dto/user-maintenance/user-maintenance.dto'; import { InternalServerException } from 'src/exceptions/internalServerError.exception'; import * as oracledb from 'oracledb'; -import { BadRequestException } from 'src/exceptions/badRequest.exception'; -import { EMAIL_DTO, USERID_DTO } from 'src/dto/property.dto'; import { closeOracleDbConnection, fetchCursor, handleError } from 'src/utils/helper'; -import { SPID_DTO } from 'src/dto/sp/sp-property.dto'; + +import { + SPID_DTO, + EMAIL_DTO, USERID_DTO, + CreateClientLoginsDTO, CreateSPLoginsDTO, CreateUSCIBLoginsDTO, SPID_CLIENTID_DTO, SPID_EMAIL_DTO +} from 'src/dto/property.dto'; interface RoleDetail { [key: string]: any; }