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

teableio / teable / 8388153768

22 Mar 2024 09:25AM CUT coverage: 28.048% (-0.2%) from 28.208%
8388153768

Pull #484

github

web-flow
Merge 27e748d45 into a06c6afb1
Pull Request #484: feat: support increment import

2099 of 3215 branches covered (65.29%)

24 of 738 new or added lines in 21 files covered. (3.25%)

4 existing lines in 3 files now uncovered.

25814 of 92035 relevant lines covered (28.05%)

5.53 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';
×
NEW
3
import type { 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/openapi';
×
NEW
12
import type { IAnalyzeVo } from '@teable/openapi';
×
13
import { ZodValidationPipe } from '../../../zod.validation.pipe';
×
14
import { PermissionGuard } from '../../auth/guard/permission.guard';
×
15
import { ImportOpenApiService } from './import-open-api.service';
×
16

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

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

×
NEW
36
  @Patch(':tableId')
×
NEW
37
  async inplaceImportTable(
×
NEW
38
    @Param('tableId') tableId: string,
×
NEW
39
    @Body(new ZodValidationPipe(inplaceImportOptionRoSchema))
×
NEW
40
    inplaceImportRo: IInplaceImportOptionRo
×
NEW
41
  ): Promise<void> {
×
NEW
42
    return await this.importOpenService.inplaceImportTable(tableId, inplaceImportRo);
×
NEW
43
  }
×
UNCOV
44
}
×
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