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,
UseGuards,
} 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 { PagedResponseImpl } from '~/helpers/PagedResponse';
import { ViewColumnsService } from '~/services/view-columns.service';
@ -79,7 +86,10 @@ export class ViewColumnsController {
async viewColumnUpdate(
@Req() req,
@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(
await this.viewColumnsService.columnsUpdate({
@ -97,7 +107,7 @@ export class ViewColumnsController {
[APIContext.VIEW_COLUMNS]: await this.viewColumnsService.viewColumnList({
viewId,
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));
}
// todo: update prop names
static async update(
columnId: string,

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

@ -3,7 +3,7 @@ import View from '~/models/View';
import Noco from '~/Noco';
import NocoCache from '~/cache/NocoCache';
import { CacheGetType, CacheScope, MetaTable } from '~/utils/globals';
import {extractProps} from "~/helpers/extractProps";
import { extractProps } from '~/helpers/extractProps';
export default class MapViewColumn {
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: {
viewId: string;
columns:
| ViewColumnReqType[]
| Record<APIContext.VIEW_COLUMNS, Record<string, ViewColumnReqType>>;
| GridColumnReqType | GalleryColumnReqType | KanbanColumnReqType | FormColumnReqType | CalendarColumnReqType[]
| Record<APIContext.VIEW_COLUMNS, Record<string, GridColumnReqType | GalleryColumnReqType | KanbanColumnReqType | FormColumnReqType | CalendarColumnReqType>>;
req: any;
}) {
const { viewId } = param;

Loading…
Cancel
Save