-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
Added edge case to handle empty columns while importing (#242)
- Loading branch information
Showing
7 changed files
with
145 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
apps/api/src/app/template/dtos/widget-templates-response.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { IsDefined, IsNumber, IsOptional, IsString } from 'class-validator'; | ||
|
||
export class WidgetTemplateResponseDto { | ||
@ApiPropertyOptional({ | ||
description: 'Id of the template', | ||
}) | ||
@IsString() | ||
@IsDefined() | ||
_id?: string; | ||
|
||
@ApiProperty({ | ||
description: 'Name of the template', | ||
}) | ||
@IsString() | ||
@IsDefined() | ||
name: string; | ||
|
||
@ApiProperty({ | ||
description: 'Callback URL of the template, gets called when sending data to the application', | ||
}) | ||
@IsString() | ||
@IsOptional() | ||
callbackUrl: string; | ||
|
||
@ApiProperty({ | ||
description: 'Name of the header that gets sent to the application', | ||
}) | ||
@IsString() | ||
@IsOptional() | ||
authHeaderName: string; | ||
|
||
@ApiProperty({ | ||
description: 'Size of data in rows that gets sent to the application', | ||
}) | ||
@IsNumber() | ||
@IsDefined() | ||
chunkSize: number; | ||
|
||
@ApiProperty({ | ||
description: 'URL to download samle csv file', | ||
}) | ||
@IsString() | ||
@IsDefined() | ||
sampleFileUrl: string; | ||
|
||
@ApiProperty({ | ||
description: 'Id of project related to the template', | ||
}) | ||
@IsString() | ||
@IsDefined() | ||
_projectId: string; | ||
|
||
@ApiProperty({ | ||
description: 'Total columns available', | ||
}) | ||
@IsNumber() | ||
@IsDefined() | ||
totalColumns: number; | ||
|
||
@ApiProperty({ | ||
description: 'Total number of imports', | ||
}) | ||
@IsNumber() | ||
@IsDefined() | ||
totalUploads: number; | ||
|
||
@ApiProperty({ | ||
description: 'Total number of imported records', | ||
}) | ||
@IsNumber() | ||
@IsDefined() | ||
totalRecords: number; | ||
|
||
@ApiProperty({ | ||
description: 'Total number of invalid records', | ||
}) | ||
@IsNumber() | ||
@IsDefined() | ||
totalInvalidRecords: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters