• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8387093605

22 Mar 2024 07:48AM CUT coverage: 28.027% (-0.2%) from 28.222%
8387093605

Pull #484

github

web-flow
Merge 174ef76f7 into a06c6afb1
Pull Request #484: feat: support increment import

2099 of 3218 branches covered (65.23%)

24 of 703 new or added lines in 18 files covered. (3.41%)

49 existing lines in 6 files now uncovered.

25815 of 92109 relevant lines covered (28.03%)

5.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/nestjs-backend/src/features/import/open-api/import-open-api.controller.ts
1
/* eslint-disable sonarjs/no-duplicate-string */
×
NEW
2
import { Controller, Get, UseGuards, Query, Post, Body, Param, Patch } from '@nestjs/common';
×
3
import type { IAnalyzeVo, ITableFullVo } from '@teable/core';
×
NEW
4
import {
×
NEW
5
  analyzeRoSchema,
×
NEW
6
  IAnalyzeRo,
×
NEW
7
  IImportOptionRo,
×
NEW
8
  importOptionRoSchema,
×
NEW
9
  IInplaceImportOptionRo,
×
NEW
10
  inplaceImportOptionRoSchema,
×
NEW
11
} from '@teable/core';
×
12
import { ZodValidationPipe } from '../../../zod.validation.pipe';
×
13
import { PermissionGuard } from '../../auth/guard/permission.guard';
×
14
import { ImportOpenApiService } from './import-open-api.service';
×
15

×
16
@Controller('api/import')
×
17
@UseGuards(PermissionGuard)
×
18
export class ImportController {
×
19
  constructor(private readonly importOpenService: ImportOpenApiService) {}
×
20
  @Get('/analyze')
×
21
  async analyzeSheetFromFile(
×
22
    @Query(new ZodValidationPipe(analyzeRoSchema)) analyzeRo: IAnalyzeRo
×
23
  ): Promise<IAnalyzeVo> {
×
24
    return await this.importOpenService.analyze(analyzeRo);
×
25
  }
×
26

×
27
  @Post(':baseId')
×
28
  async createTableFromImport(
×
29
    @Param('baseId') baseId: string,
×
30
    @Body(new ZodValidationPipe(importOptionRoSchema)) importRo: IImportOptionRo
×
31
  ): Promise<ITableFullVo[]> {
×
32
    return await this.importOpenService.createTableFromImport(baseId, importRo);
×
33
  }
×
NEW
34

×
NEW
35
  @Patch(':tableId')
×
NEW
36
  async inplaceImportTable(
×
NEW
37
    @Param('tableId') tableId: string,
×
NEW
38
    @Body(new ZodValidationPipe(inplaceImportOptionRoSchema))
×
NEW
39
    inplaceImportRo: IInplaceImportOptionRo
×
NEW
40
  ): Promise<void> {
×
NEW
41
    return await this.importOpenService.inplaceImportTable(tableId, inplaceImportRo);
×
NEW
42
  }
×
UNCOV
43
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc