Browse Source

fix: types

pull/8281/head
Pranav C 3 months ago
parent
commit
cac6bd9ae6
  1. 16
      packages/nocodb/src/controllers/view-columns.controller.ts
  2. 1
      packages/nocodb/src/models/KanbanViewColumn.ts
  3. 2
      packages/nocodb/src/models/MapViewColumn.ts
  4. 1294
      packages/nocodb/src/schema/swagger-v3.json
  5. 4
      packages/nocodb/src/services/view-columns.service.ts

16
packages/nocodb/src/controllers/view-columns.controller.ts

@ -9,7 +9,14 @@ import {
Req, Req,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { APIContext, ViewColumnReqType } from 'nocodb-sdk' import {
APIContext, CalendarColumnReqType,
FormColumnReqType,
GalleryColumnReqType,
GridColumnReqType,
KanbanColumnReqType,
ViewColumnReqType,
} from 'nocodb-sdk'
import { GlobalGuard } from '~/guards/global/global.guard'; import { GlobalGuard } from '~/guards/global/global.guard';
import { PagedResponseImpl } from '~/helpers/PagedResponse'; import { PagedResponseImpl } from '~/helpers/PagedResponse';
import { ViewColumnsService } from '~/services/view-columns.service'; import { ViewColumnsService } from '~/services/view-columns.service';
@ -79,7 +86,10 @@ export class ViewColumnsController {
async viewColumnUpdate( async viewColumnUpdate(
@Req() req, @Req() req,
@Param('viewId') viewId: string, @Param('viewId') viewId: string,
@Body() body: ViewColumnReqType[] | Record<APIContext.VIEW_COLUMNS, Record<string, ViewColumnReqType>>, @Body()
body:
| GridColumnReqType | GalleryColumnReqType | KanbanColumnReqType | FormColumnReqType | CalendarColumnReqType[]
| Record<APIContext.VIEW_COLUMNS, Record<string, GridColumnReqType | GalleryColumnReqType | KanbanColumnReqType | FormColumnReqType | CalendarColumnReqType>>,
) { ) {
return new PagedResponseImpl( return new PagedResponseImpl(
await this.viewColumnsService.columnsUpdate({ await this.viewColumnsService.columnsUpdate({
@ -97,7 +107,7 @@ export class ViewColumnsController {
[APIContext.VIEW_COLUMNS]: await this.viewColumnsService.viewColumnList({ [APIContext.VIEW_COLUMNS]: await this.viewColumnsService.viewColumnList({
viewId, viewId,
req, req,
}) }),
}; };
} }
} }

1
packages/nocodb/src/models/KanbanViewColumn.ts

@ -113,7 +113,6 @@ export default class KanbanViewColumn implements KanbanColumnType {
return views?.map((v) => new KanbanViewColumn(v)); return views?.map((v) => new KanbanViewColumn(v));
} }
// todo: update prop names // todo: update prop names
static async update( static async update(
columnId: string, columnId: string,

2
packages/nocodb/src/models/MapViewColumn.ts

@ -3,7 +3,7 @@ import View from '~/models/View';
import Noco from '~/Noco'; import Noco from '~/Noco';
import NocoCache from '~/cache/NocoCache'; import NocoCache from '~/cache/NocoCache';
import { CacheGetType, CacheScope, MetaTable } from '~/utils/globals'; import { CacheGetType, CacheScope, MetaTable } from '~/utils/globals';
import {extractProps} from "~/helpers/extractProps"; import { extractProps } from '~/helpers/extractProps';
export default class MapViewColumn { export default class MapViewColumn {
id: string; id: string;

1294
packages/nocodb/src/schema/swagger-v3.json

File diff suppressed because it is too large Load Diff

4
packages/nocodb/src/services/view-columns.service.ts

@ -75,8 +75,8 @@ export class ViewColumnsService {
async columnsUpdate(param: { async columnsUpdate(param: {
viewId: string; viewId: string;
columns: columns:
| ViewColumnReqType[] | GridColumnReqType | GalleryColumnReqType | KanbanColumnReqType | FormColumnReqType | CalendarColumnReqType[]
| Record<APIContext.VIEW_COLUMNS, Record<string, ViewColumnReqType>>; | Record<APIContext.VIEW_COLUMNS, Record<string, GridColumnReqType | GalleryColumnReqType | KanbanColumnReqType | FormColumnReqType | CalendarColumnReqType>>;
req: any; req: any;
}) { }) {
const { viewId } = param; const { viewId } = param;

Loading…
Cancel
Save