mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
78 changed files with 430 additions and 430 deletions
@ -1,11 +1,11 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { OrgUserRoles } from 'nocodb-sdk'; |
||||
import { Tele } from 'nc-help'; |
||||
import { NcError } from '../helpers/catchError'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import ApiToken from '../../models/ApiToken'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import { NcError } from '../meta/helpers/catchError'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import ApiToken from '../models/ApiToken'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function apiTokenList(req: Request, res: Response) { |
||||
res.json(await ApiToken.list(req['user'].id)); |
@ -1,12 +1,12 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import Audit from '../../models/Audit'; |
||||
import Audit from '../models/Audit'; |
||||
import { AuditOperationSubTypes, AuditOperationTypes } from 'nocodb-sdk'; |
||||
import Model from '../../models/Model'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import Model from '../models/Model'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
|
||||
import DOMPurify from 'isomorphic-dompurify'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function commentRow(req: Request<any, any>, res) { |
||||
res.json( |
@ -1,13 +1,13 @@
|
||||
import { Request, Response } from 'express'; |
||||
import Project from '../../models/Project'; |
||||
import Project from '../models/Project'; |
||||
import { BaseListType } from 'nocodb-sdk'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { syncBaseMigration } from '../helpers/syncMigration'; |
||||
import Base from '../../models/Base'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import { syncBaseMigration } from '../meta/helpers/syncMigration'; |
||||
import Base from '../models/Base'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { Tele } from 'nc-help'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw, populateMeta } from './helpers'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw, populateMeta } from '../meta/api/helpers'; |
||||
|
||||
export async function baseGet( |
||||
req: Request<any, any, any>, |
@ -1,5 +1,5 @@
|
||||
import catchError from '../helpers/catchError'; |
||||
import NocoCache from '../../cache/NocoCache'; |
||||
import catchError from '../meta/helpers/catchError'; |
||||
import NocoCache from '../cache/NocoCache'; |
||||
import { Router } from 'express'; |
||||
|
||||
export async function cacheGet(_, res) { |
@ -1,11 +1,11 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { BaseModelSqlv2 } from '../../../db/sql-data-mapper/lib/sql/BaseModelSqlv2'; |
||||
import Model from '../../../models/Model'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import { BaseModelSqlv2 } from '../../db/sql-data-mapper/lib/sql/BaseModelSqlv2'; |
||||
import Model from '../../models/Model'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import { getViewAndModelFromRequestByAliasOrId } from './helpers'; |
||||
import apiMetrics from '../../helpers/apiMetrics'; |
||||
import apiMetrics from '../../meta/helpers/apiMetrics'; |
||||
|
||||
type BulkOperation = |
||||
| 'bulkInsert' |
@ -1,16 +1,16 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import Model from '../../../models/Model'; |
||||
import Model from '../../models/Model'; |
||||
import { nocoExecute } from 'nc-help'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import { NcError } from '../../helpers/catchError'; |
||||
import { PagedResponseImpl } from '../../helpers/PagedResponse'; |
||||
import View from '../../../models/View'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import { NcError } from '../../meta/helpers/catchError'; |
||||
import { PagedResponseImpl } from '../../meta/helpers/PagedResponse'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import { getViewAndModelFromRequestByAliasOrId } from './helpers'; |
||||
import apiMetrics from '../../helpers/apiMetrics'; |
||||
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import { parseHrtimeToSeconds } from '../helpers'; |
||||
import apiMetrics from '../../meta/helpers/apiMetrics'; |
||||
import getAst from '../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import { parseHrtimeToSeconds } from '../../meta/api/helpers'; |
||||
|
||||
// todo: Handle the error case where view doesnt belong to model
|
||||
async function dataList(req: Request, res: Response) { |
@ -1,13 +1,13 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import * as XLSX from 'xlsx'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import { |
||||
extractCsvData, |
||||
extractXlsxData, |
||||
getViewAndModelFromRequestByAliasOrId, |
||||
} from './helpers'; |
||||
import apiMetrics from '../../helpers/apiMetrics'; |
||||
import View from '../../../models/View'; |
||||
import apiMetrics from '../../meta/helpers/apiMetrics'; |
||||
import View from '../../models/View'; |
||||
|
||||
async function excelDataExport(req: Request, res: Response) { |
||||
const { model, view } = await getViewAndModelFromRequestByAliasOrId(req); |
@ -1,15 +1,15 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import Model from '../../../models/Model'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import { PagedResponseImpl } from '../../helpers/PagedResponse'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import Model from '../../models/Model'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import { PagedResponseImpl } from '../../meta/helpers/PagedResponse'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import { |
||||
getColumnByIdOrName, |
||||
getViewAndModelFromRequestByAliasOrId, |
||||
} from './helpers'; |
||||
import { NcError } from '../../helpers/catchError'; |
||||
import apiMetrics from '../../helpers/apiMetrics'; |
||||
import { NcError } from '../../meta/helpers/catchError'; |
||||
import apiMetrics from '../../meta/helpers/apiMetrics'; |
||||
|
||||
// todo: handle case where the given column is not ltar
|
||||
export async function mmList(req: Request, res: Response, next) { |
@ -1,14 +1,14 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import Model from '../../../models/Model'; |
||||
import Model from '../../models/Model'; |
||||
import { nocoExecute } from 'nc-help'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import { PagedResponseImpl } from '../../helpers/PagedResponse'; |
||||
import View from '../../../models/View'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import { NcError } from '../../helpers/catchError'; |
||||
import apiMetrics from '../../helpers/apiMetrics'; |
||||
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import { PagedResponseImpl } from '../../meta/helpers/PagedResponse'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import { NcError } from '../../meta/helpers/catchError'; |
||||
import apiMetrics from '../../meta/helpers/apiMetrics'; |
||||
import getAst from '../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
|
||||
export async function dataList(req: Request, res: Response, next) { |
||||
const view = await View.get(req.params.viewId); |
@ -1,20 +1,20 @@
|
||||
import Project from '../../../models/Project'; |
||||
import Model from '../../../models/Model'; |
||||
import View from '../../../models/View'; |
||||
import { NcError } from '../../helpers/catchError'; |
||||
import Project from '../../models/Project'; |
||||
import Model from '../../models/Model'; |
||||
import View from '../../models/View'; |
||||
import { NcError } from '../../meta/helpers/catchError'; |
||||
import { Request } from 'express'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import { isSystemColumn, UITypes } from 'nocodb-sdk'; |
||||
|
||||
import { nocoExecute } from 'nc-help'; |
||||
import * as XLSX from 'xlsx'; |
||||
import Column from '../../../models/Column'; |
||||
import LookupColumn from '../../../models/LookupColumn'; |
||||
import LinkToAnotherRecordColumn from '../../../models/LinkToAnotherRecordColumn'; |
||||
import Column from '../../models/Column'; |
||||
import LookupColumn from '../../models/LookupColumn'; |
||||
import LinkToAnotherRecordColumn from '../../models/LinkToAnotherRecordColumn'; |
||||
|
||||
import papaparse from 'papaparse'; |
||||
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import getAst from '../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
export async function getViewAndModelFromRequestByAliasOrId( |
||||
req: |
||||
| Request<{ projectName: string; tableName: string; viewName?: string }> |
@ -1,14 +1,14 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import Model from '../../../models/Model'; |
||||
import Model from '../../models/Model'; |
||||
import { nocoExecute } from 'nc-help'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import View from '../../../models/View'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import Project from '../../../models/Project'; |
||||
import { NcError } from '../../helpers/catchError'; |
||||
import apiMetrics from '../../helpers/apiMetrics'; |
||||
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import Project from '../../models/Project'; |
||||
import { NcError } from '../../meta/helpers/catchError'; |
||||
import apiMetrics from '../../meta/helpers/apiMetrics'; |
||||
import getAst from '../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
|
||||
export async function dataList(req: Request, res: Response) { |
||||
const { model, view } = await getViewAndModelFromRequest(req); |
@ -1,6 +1,6 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import View from '../models/View'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { extractCsvData } from './dataApis/helpers'; |
||||
|
||||
async function exportCsv(req: Request, res: Response) { |
@ -1,19 +1,19 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
// @ts-ignore
|
||||
import Model from '../../models/Model'; |
||||
import Model from '../models/Model'; |
||||
import { Tele } from 'nc-help'; |
||||
// @ts-ignore
|
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
// @ts-ignore
|
||||
import { Table, TableList, TableListParams, TableReq } from 'nocodb-sdk'; |
||||
// @ts-ignore
|
||||
import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; |
||||
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; |
||||
// @ts-ignore
|
||||
import Project from '../../models/Project'; |
||||
import Filter from '../../models/Filter'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import Project from '../models/Project'; |
||||
import Filter from '../models/Filter'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
// @ts-ignore
|
||||
export async function filterGet(req: Request, res: Response, next) { |
@ -1,19 +1,19 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
// @ts-ignore
|
||||
import Model from '../../models/Model'; |
||||
import Model from '../models/Model'; |
||||
import { Tele } from 'nc-help'; |
||||
// @ts-ignore
|
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import { FormType, ViewTypes } from 'nocodb-sdk'; |
||||
// @ts-ignore
|
||||
import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; |
||||
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; |
||||
// @ts-ignore
|
||||
import Project from '../../models/Project'; |
||||
import View from '../../models/View'; |
||||
import FormView from '../../models/FormView'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import Project from '../models/Project'; |
||||
import View from '../models/View'; |
||||
import FormView from '../models/FormView'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
// @ts-ignore
|
||||
export async function formViewGet(req: Request, res: Response<FormType>) { |
@ -1,9 +1,9 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import FormViewColumn from '../../models/FormViewColumn'; |
||||
import FormViewColumn from '../models/FormViewColumn'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function columnUpdate(req: Request, res: Response) { |
||||
Tele.emit('evt', { evt_type: 'formViewColumn:updated' }); |
@ -1,11 +1,11 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { GalleryType, ViewTypes } from 'nocodb-sdk'; |
||||
import View from '../../models/View'; |
||||
import GalleryView from '../../models/GalleryView'; |
||||
import View from '../models/View'; |
||||
import GalleryView from '../models/GalleryView'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
export async function galleryViewGet(req: Request, res: Response<GalleryType>) { |
||||
res.json(await GalleryView.get(req.params.galleryViewId)); |
||||
} |
@ -1,19 +1,19 @@
|
||||
import { Request, Router } from 'express'; |
||||
// @ts-ignore
|
||||
import Model from '../../models/Model'; |
||||
import Model from '../models/Model'; |
||||
import { Tele } from 'nc-help'; |
||||
// @ts-ignore
|
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import { ViewTypes } from 'nocodb-sdk'; |
||||
// @ts-ignore
|
||||
import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; |
||||
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; |
||||
// @ts-ignore
|
||||
import Project from '../../models/Project'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import GridView from '../../models/GridView'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import Project from '../models/Project'; |
||||
import View from '../models/View'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import GridView from '../models/GridView'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
// @ts-ignore
|
||||
export async function gridViewCreate(req: Request<any, any>, res) { |
@ -1,9 +1,9 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import GridViewColumn from '../../models/GridViewColumn'; |
||||
import GridViewColumn from '../models/GridViewColumn'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function columnList(req: Request, res: Response) { |
||||
res.json(await GridViewColumn.list(req.params.gridViewId)); |
@ -1,15 +1,15 @@
|
||||
import { Tele } from 'nc-help'; |
||||
import catchError from '../helpers/catchError'; |
||||
import catchError from '../meta/helpers/catchError'; |
||||
import { Request, Response, Router } from 'express'; |
||||
import Hook from '../../models/Hook'; |
||||
import Hook from '../models/Hook'; |
||||
import { HookListType, HookType } from 'nocodb-sdk'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { invokeWebhook } from '../helpers/webhookHelpers'; |
||||
import Model from '../../models/Model'; |
||||
import populateSamplePayload from '../helpers/populateSamplePayload'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import { invokeWebhook } from '../meta/helpers/webhookHelpers'; |
||||
import Model from '../models/Model'; |
||||
import populateSamplePayload from '../meta/helpers/populateSamplePayload'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function hookList( |
||||
req: Request<any, any, any>, |
@ -1,19 +1,19 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
// @ts-ignore
|
||||
import Model from '../../models/Model'; |
||||
import Model from '../models/Model'; |
||||
import { Tele } from 'nc-help'; |
||||
// @ts-ignore
|
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
// @ts-ignore
|
||||
import { Table, TableList, TableListParams, TableReq } from 'nocodb-sdk'; |
||||
// @ts-ignore
|
||||
import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; |
||||
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; |
||||
// @ts-ignore
|
||||
import Project from '../../models/Project'; |
||||
import Filter from '../../models/Filter'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import Project from '../models/Project'; |
||||
import Filter from '../models/Filter'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
// @ts-ignore
|
||||
export async function filterGet(req: Request, res: Response, next) { |
@ -1,11 +1,11 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { KanbanType, ViewTypes } from 'nocodb-sdk'; |
||||
import View from '../../models/View'; |
||||
import KanbanView from '../../models/KanbanView'; |
||||
import View from '../models/View'; |
||||
import KanbanView from '../models/KanbanView'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function kanbanViewGet(req: Request, res: Response<KanbanType>) { |
||||
res.json(await KanbanView.get(req.params.kanbanViewId)); |
@ -1,10 +1,10 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { MapType, ViewTypes } from 'nocodb-sdk'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import View from '../models/View'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { Tele } from 'nc-help'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import MapView from '../../models/MapView'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import MapView from '../models/MapView'; |
||||
|
||||
export async function mapViewGet(req: Request, res: Response<MapType>) { |
||||
res.json(await MapView.get(req.params.mapViewId)); |
@ -1,22 +1,22 @@
|
||||
// // Project CRUD
|
||||
|
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import Model from '../../models/Model'; |
||||
import Project from '../../models/Project'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import Model from '../models/Model'; |
||||
import Project from '../models/Project'; |
||||
import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2'; |
||||
import { isVirtualCol, ModelTypes, RelationTypes, UITypes } from 'nocodb-sdk'; |
||||
import { Router } from 'express'; |
||||
import Base from '../../models/Base'; |
||||
import ModelXcMetaFactory from '../../db/sql-mgr/code/models/xc/ModelXcMetaFactory'; |
||||
import Column from '../../models/Column'; |
||||
import LinkToAnotherRecordColumn from '../../models/LinkToAnotherRecordColumn'; |
||||
import { getUniqueColumnAliasName } from '../helpers/getUniqueName'; |
||||
import NcHelp from '../../utils/NcHelp'; |
||||
import getTableNameAlias, { getColumnNameAlias } from '../helpers/getTableName'; |
||||
import mapDefaultDisplayValue from '../helpers/mapDefaultDisplayValue'; |
||||
import getColumnUiType from '../helpers/getColumnUiType'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import Base from '../models/Base'; |
||||
import ModelXcMetaFactory from '../db/sql-mgr/code/models/xc/ModelXcMetaFactory'; |
||||
import Column from '../models/Column'; |
||||
import LinkToAnotherRecordColumn from '../models/LinkToAnotherRecordColumn'; |
||||
import { getUniqueColumnAliasName } from '../meta/helpers/getUniqueName'; |
||||
import NcHelp from '../utils/NcHelp'; |
||||
import getTableNameAlias, { getColumnNameAlias } from '../meta/helpers/getTableName'; |
||||
import mapDefaultDisplayValue from '../meta/helpers/mapDefaultDisplayValue'; |
||||
import getColumnUiType from '../meta/helpers/getColumnUiType'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
|
||||
export enum MetaDiffType { |
||||
TABLE_NEW = 'TABLE_NEW', |
@ -1,10 +1,10 @@
|
||||
import Model from '../../models/Model'; |
||||
import ModelRoleVisibility from '../../models/ModelRoleVisibility'; |
||||
import Model from '../models/Model'; |
||||
import ModelRoleVisibility from '../models/ModelRoleVisibility'; |
||||
import { Router } from 'express'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
async function xcVisibilityMetaSetAll(req, res) { |
||||
Tele.emit('evt', { evt_type: 'uiAcl:updated' }); |
||||
for (const d of req.body) { |
@ -1,11 +1,11 @@
|
||||
import { Router } from 'express'; |
||||
import { OrgUserRoles } from 'nocodb-sdk'; |
||||
import { NC_LICENSE_KEY } from '../../constants'; |
||||
import Store from '../../models/Store'; |
||||
import Noco from '../../Noco'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import { NC_LICENSE_KEY } from '../constants'; |
||||
import Store from '../models/Store'; |
||||
import Noco from '../Noco'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
async function licenseGet(_req, res) { |
||||
const license = await Store.get(NC_LICENSE_KEY); |
@ -1,14 +1,14 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { OrgUserRoles } from 'nocodb-sdk'; |
||||
import ApiToken from '../../models/ApiToken'; |
||||
import ApiToken from '../models/ApiToken'; |
||||
import { Tele } from 'nc-help'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { NcError } from '../helpers/catchError'; |
||||
import getHandler from '../helpers/getHandler'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { apiTokenListEE } from './ee/orgTokenApis'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { NcError } from '../meta/helpers/catchError'; |
||||
import getHandler from '../meta/helpers/getHandler'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import { apiTokenListEE } from '../meta/api/ee/orgTokenApis'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
async function apiTokenList(req, res) { |
||||
const fk_user_id = req.user.id; |
@ -1,12 +1,12 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import { Tele } from 'nc-help'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import Plugin from '../../models/Plugin'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import Plugin from '../models/Plugin'; |
||||
import { PluginType } from 'nocodb-sdk'; |
||||
import NcPluginMgrv2 from '../helpers/NcPluginMgrv2'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import NcPluginMgrv2 from '../meta/helpers/NcPluginMgrv2'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
export async function pluginList(_req: Request, res: Response) { |
||||
res.json(new PagedResponseImpl(await Plugin.list())); |
@ -1,25 +1,25 @@
|
||||
import { Request, Response } from 'express'; |
||||
import { OrgUserRoles, ProjectType } from 'nocodb-sdk'; |
||||
import Project from '../../models/Project'; |
||||
import Project from '../models/Project'; |
||||
import { ProjectListType } from 'nocodb-sdk'; |
||||
import DOMPurify from 'isomorphic-dompurify'; |
||||
import { packageVersion } from '../../utils/packageVersion'; |
||||
import { packageVersion } from '../utils/packageVersion'; |
||||
import { Tele } from 'nc-help'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import syncMigration from '../helpers/syncMigration'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import ProjectUser from '../../models/ProjectUser'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import syncMigration from '../meta/helpers/syncMigration'; |
||||
import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import ProjectUser from '../models/ProjectUser'; |
||||
import { customAlphabet } from 'nanoid'; |
||||
import Noco from '../../Noco'; |
||||
import Noco from '../Noco'; |
||||
import isDocker from 'is-docker'; |
||||
import { NcError } from '../helpers/catchError'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { extractPropsAndSanitize } from '../helpers/extractProps'; |
||||
import NcConfigFactory from '../../utils/NcConfigFactory'; |
||||
import { NcError } from '../meta/helpers/catchError'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { extractPropsAndSanitize } from '../meta/helpers/extractProps'; |
||||
import NcConfigFactory from '../utils/NcConfigFactory'; |
||||
import { promisify } from 'util'; |
||||
import { getAjvValidatorMw, populateMeta } from './helpers'; |
||||
import Filter from '../../models/Filter'; |
||||
import { getAjvValidatorMw, populateMeta } from '../meta/api/helpers'; |
||||
import Filter from '../models/Filter'; |
||||
|
||||
const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 4); |
||||
|
@ -1,23 +1,23 @@
|
||||
import { OrgUserRoles } from 'nocodb-sdk'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { Router } from 'express'; |
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import ProjectUser from '../../models/ProjectUser'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import ProjectUser from '../models/ProjectUser'; |
||||
import validator from 'validator'; |
||||
import { NcError } from '../helpers/catchError'; |
||||
import { NcError } from '../meta/helpers/catchError'; |
||||
import { v4 as uuidv4 } from 'uuid'; |
||||
import User from '../../models/User'; |
||||
import Audit from '../../models/Audit'; |
||||
import NocoCache from '../../cache/NocoCache'; |
||||
import { CacheGetType, CacheScope, MetaTable } from '../../utils/globals'; |
||||
import User from '../models/User'; |
||||
import Audit from '../models/Audit'; |
||||
import NocoCache from '../cache/NocoCache'; |
||||
import { CacheGetType, CacheScope, MetaTable } from '../utils/globals'; |
||||
import * as ejs from 'ejs'; |
||||
import NcPluginMgrv2 from '../helpers/NcPluginMgrv2'; |
||||
import Noco from '../../Noco'; |
||||
import NcPluginMgrv2 from '../meta/helpers/NcPluginMgrv2'; |
||||
import Noco from '../Noco'; |
||||
import { PluginCategory } from 'nocodb-sdk'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { randomTokenString } from '../helpers/stringHelpers'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { randomTokenString } from '../meta/helpers/stringHelpers'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
async function userList(req, res) { |
||||
res.json({ |
@ -1,24 +1,24 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import Model from '../../../models/Model'; |
||||
import Model from '../../models/Model'; |
||||
import { nocoExecute } from 'nc-help'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import { PagedResponseImpl } from '../../helpers/PagedResponse'; |
||||
import View from '../../../models/View'; |
||||
import catchError, { NcError } from '../../helpers/catchError'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import { PagedResponseImpl } from '../../meta/helpers/PagedResponse'; |
||||
import View from '../../models/View'; |
||||
import catchError, { NcError } from '../../meta/helpers/catchError'; |
||||
import multer from 'multer'; |
||||
import { ErrorMessages, UITypes, ViewTypes } from 'nocodb-sdk'; |
||||
import Column from '../../../models/Column'; |
||||
import LinkToAnotherRecordColumn from '../../../models/LinkToAnotherRecordColumn'; |
||||
import NcPluginMgrv2 from '../../helpers/NcPluginMgrv2'; |
||||
import Column from '../../models/Column'; |
||||
import LinkToAnotherRecordColumn from '../../models/LinkToAnotherRecordColumn'; |
||||
import NcPluginMgrv2 from '../../meta/helpers/NcPluginMgrv2'; |
||||
import path from 'path'; |
||||
import { nanoid } from 'nanoid'; |
||||
import { mimeIcons } from '../../../utils/mimeTypes'; |
||||
import { mimeIcons } from '../../utils/mimeTypes'; |
||||
import slash from 'slash'; |
||||
import { sanitizeUrlPath } from '../attachmentApis'; |
||||
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import getAst from '../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import { getColumnByIdOrName } from '../dataApis/helpers'; |
||||
import { NC_ATTACHMENT_FIELD_SIZE } from '../../../constants'; |
||||
import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants'; |
||||
|
||||
export async function dataList(req: Request, res: Response) { |
||||
try { |
@ -1,17 +1,17 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import * as XLSX from 'xlsx'; |
||||
import View from '../../../models/View'; |
||||
import Model from '../../../models/Model'; |
||||
import Base from '../../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; |
||||
import View from '../../models/View'; |
||||
import Model from '../../models/Model'; |
||||
import Base from '../../models/Base'; |
||||
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; |
||||
import { nocoExecute } from 'nc-help'; |
||||
import papaparse from 'papaparse'; |
||||
import { ErrorMessages, isSystemColumn, UITypes, ViewTypes } from 'nocodb-sdk'; |
||||
import Column from '../../../models/Column'; |
||||
import LinkToAnotherRecordColumn from '../../../models/LinkToAnotherRecordColumn'; |
||||
import LookupColumn from '../../../models/LookupColumn'; |
||||
import catchError, { NcError } from '../../helpers/catchError'; |
||||
import getAst from '../../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
import Column from '../../models/Column'; |
||||
import LinkToAnotherRecordColumn from '../../models/LinkToAnotherRecordColumn'; |
||||
import LookupColumn from '../../models/LookupColumn'; |
||||
import catchError, { NcError } from '../../meta/helpers/catchError'; |
||||
import getAst from '../../db/sql-data-mapper/lib/sql/helpers/getAst'; |
||||
|
||||
async function exportExcel(req: Request, res: Response) { |
||||
const view = await View.getByUUID(req.params.publicDataUuid); |
@ -1,17 +1,17 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import catchError, { NcError } from '../../helpers/catchError'; |
||||
import View from '../../../models/View'; |
||||
import Model from '../../../models/Model'; |
||||
import catchError, { NcError } from '../../meta/helpers/catchError'; |
||||
import View from '../../models/View'; |
||||
import Model from '../../models/Model'; |
||||
import { |
||||
ErrorMessages, |
||||
LinkToAnotherRecordType, |
||||
RelationTypes, |
||||
UITypes, |
||||
} from 'nocodb-sdk'; |
||||
import Column from '../../../models/Column'; |
||||
import Base from '../../../models/Base'; |
||||
import Project from '../../../models/Project'; |
||||
import LinkToAnotherRecordColumn from '../../../models/LinkToAnotherRecordColumn'; |
||||
import Column from '../../models/Column'; |
||||
import Base from '../../models/Base'; |
||||
import Project from '../../models/Project'; |
||||
import LinkToAnotherRecordColumn from '../../models/LinkToAnotherRecordColumn'; |
||||
|
||||
export async function viewMetaGet(req: Request, res: Response) { |
||||
const view: View & { |
@ -1,10 +1,10 @@
|
||||
import { Router } from 'express'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { v4 as uuidv4 } from 'uuid'; |
||||
import Project from '../../models/Project'; |
||||
import { NcError } from '../helpers/catchError'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import Project from '../models/Project'; |
||||
import { NcError } from '../meta/helpers/catchError'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
// todo: load from config
|
||||
const config = { |
||||
dashboardPath: '/nc', |
@ -1,18 +1,18 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
// @ts-ignore
|
||||
import Model from '../../models/Model'; |
||||
import Model from '../models/Model'; |
||||
import { Tele } from 'nc-help'; |
||||
// @ts-ignore
|
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
import { SortListType, SortType, TableType } from 'nocodb-sdk'; |
||||
// @ts-ignore
|
||||
import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; |
||||
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; |
||||
// @ts-ignore
|
||||
import Project from '../../models/Project'; |
||||
import Sort from '../../models/Sort'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from './helpers'; |
||||
import Project from '../models/Project'; |
||||
import Sort from '../models/Sort'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
import { getAjvValidatorMw } from '../meta/api/helpers'; |
||||
|
||||
// @ts-ignore
|
||||
export async function sortGet(req: Request, res: Response<TableType>) {} |
@ -1,6 +1,6 @@
|
||||
import Noco from '../../../../Noco'; |
||||
import Model from '../../../../models/Model'; |
||||
import Project from '../../../../models/Project'; |
||||
import Noco from '../../../Noco'; |
||||
import Model from '../../../models/Model'; |
||||
import Project from '../../../models/Project'; |
||||
import { getModelPaths, getViewPaths } from './templates/paths'; |
||||
import { SwaggerColumn } from './getSwaggerColumnMetas'; |
||||
import { SwaggerView } from './getSwaggerJSON'; |
@ -1,6 +1,6 @@
|
||||
import Noco from '../../../../Noco'; |
||||
import Model from '../../../../models/Model'; |
||||
import Project from '../../../../models/Project'; |
||||
import Noco from '../../../Noco'; |
||||
import Model from '../../../models/Model'; |
||||
import Project from '../../../models/Project'; |
||||
import { getModelSchemas, getViewSchemas } from './templates/schemas'; |
||||
import { SwaggerColumn } from './getSwaggerColumnMetas'; |
||||
import { SwaggerView } from './getSwaggerJSON'; |
@ -1,9 +1,9 @@
|
||||
import { UITypes } from 'nocodb-sdk'; |
||||
import LinkToAnotherRecordColumn from '../../../../models/LinkToAnotherRecordColumn'; |
||||
import SwaggerTypes from '../../../../db/sql-mgr/code/routers/xc-ts/SwaggerTypes'; |
||||
import Column from '../../../../models/Column'; |
||||
import Noco from '../../../../Noco'; |
||||
import Project from '../../../../models/Project'; |
||||
import LinkToAnotherRecordColumn from '../../../models/LinkToAnotherRecordColumn'; |
||||
import SwaggerTypes from '../../../db/sql-mgr/code/routers/xc-ts/SwaggerTypes'; |
||||
import Column from '../../../models/Column'; |
||||
import Noco from '../../../Noco'; |
||||
import Project from '../../../models/Project'; |
||||
|
||||
export default async ( |
||||
columns: Column[], |
@ -1,15 +1,15 @@
|
||||
import FormViewColumn from '../../../../models/FormViewColumn'; |
||||
import GalleryViewColumn from '../../../../models/GalleryViewColumn'; |
||||
import Noco from '../../../../Noco'; |
||||
import Model from '../../../../models/Model'; |
||||
import FormViewColumn from '../../../models/FormViewColumn'; |
||||
import GalleryViewColumn from '../../../models/GalleryViewColumn'; |
||||
import Noco from '../../../Noco'; |
||||
import Model from '../../../models/Model'; |
||||
import swaggerBase from './swagger-base.json'; |
||||
import getPaths from './getPaths'; |
||||
import getSchemas from './getSchemas'; |
||||
import Project from '../../../../models/Project'; |
||||
import Project from '../../../models/Project'; |
||||
import getSwaggerColumnMetas from './getSwaggerColumnMetas'; |
||||
import { ViewTypes } from 'nocodb-sdk'; |
||||
import GridViewColumn from '../../../../models/GridViewColumn'; |
||||
import View from '../../../../models/View'; |
||||
import GridViewColumn from '../../../models/GridViewColumn'; |
||||
import View from '../../../models/View'; |
||||
|
||||
export default async function getSwaggerJSON( |
||||
project: Project, |
@ -1,6 +1,6 @@
|
||||
import { SwaggerColumn } from '../getSwaggerColumnMetas'; |
||||
import { RelationTypes, UITypes } from 'nocodb-sdk'; |
||||
import LinkToAnotherRecordColumn from '../../../../../models/LinkToAnotherRecordColumn'; |
||||
import LinkToAnotherRecordColumn from '../../../../models/LinkToAnotherRecordColumn'; |
||||
|
||||
export const rowIdParam = { |
||||
schema: { |
@ -1,10 +1,10 @@
|
||||
// @ts-ignore
|
||||
import catchError, { NcError } from '../../helpers/catchError'; |
||||
import catchError, { NcError } from '../../meta/helpers/catchError'; |
||||
import { Router } from 'express'; |
||||
import Model from '../../../models/Model'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import Model from '../../models/Model'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import getSwaggerJSON from './helpers/getSwaggerJSON'; |
||||
import Project from '../../../models/Project'; |
||||
import Project from '../../models/Project'; |
||||
import getSwaggerHtml from './swaggerHtml'; |
||||
import getRedocHtml from './redocHtml'; |
||||
|
@ -1,12 +1,12 @@
|
||||
import { Request, Router } from 'express'; |
||||
// import { Queue } from 'bullmq';
|
||||
// import axios from 'axios';
|
||||
import catchError, { NcError } from '../../helpers/catchError'; |
||||
import catchError, { NcError } from '../../meta/helpers/catchError'; |
||||
import { Server } from 'socket.io'; |
||||
import NocoJobs from '../../../jobs/NocoJobs'; |
||||
import NocoJobs from '../../jobs/NocoJobs'; |
||||
import job, { AirtableSyncConfig } from './helpers/job'; |
||||
import SyncSource from '../../../models/SyncSource'; |
||||
import Noco from '../../../Noco'; |
||||
import SyncSource from '../../models/SyncSource'; |
||||
import Noco from '../../Noco'; |
||||
import { genJwt } from '../userApi/helpers'; |
||||
const AIRTABLE_IMPORT_JOB = 'AIRTABLE_IMPORT_JOB'; |
||||
const AIRTABLE_PROGRESS_JOB = 'AIRTABLE_PROGRESS_JOB'; |
@ -1,10 +1,10 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
|
||||
import SyncSource from '../../../models/SyncSource'; |
||||
import SyncSource from '../../models/SyncSource'; |
||||
import { Tele } from 'nc-help'; |
||||
import { PagedResponseImpl } from '../../helpers/PagedResponse'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import Project from '../../../models/Project'; |
||||
import { PagedResponseImpl } from '../../meta/helpers/PagedResponse'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import Project from '../../models/Project'; |
||||
|
||||
export async function syncSourceList(req: Request, res: Response) { |
||||
// todo: pagination
|
@ -1,5 +1,5 @@
|
||||
import { Request, Router } from 'express'; |
||||
import { TestResetService } from '../../services/test/TestResetService'; |
||||
import { TestResetService } from '../services/test/TestResetService'; |
||||
|
||||
export async function reset(req: Request<any, any>, res) { |
||||
const service = new TestResetService({ |
@ -1,7 +1,7 @@
|
||||
import * as jwt from 'jsonwebtoken'; |
||||
import crypto from 'crypto'; |
||||
import User from '../../../models/User'; |
||||
import { NcConfig } from '../../../../interface/config'; |
||||
import User from '../../models/User'; |
||||
import { NcConfig } from '../../../interface/config'; |
||||
|
||||
export function genJwt(user: User, config: NcConfig) { |
||||
return jwt.sign( |
@ -1,14 +1,14 @@
|
||||
import User from '../../../models/User'; |
||||
import User from '../../models/User'; |
||||
import { v4 as uuidv4 } from 'uuid'; |
||||
import { promisify } from 'util'; |
||||
|
||||
import bcrypt from 'bcryptjs'; |
||||
import Noco from '../../../Noco'; |
||||
import { CacheScope, MetaTable } from '../../../utils/globals'; |
||||
import ProjectUser from '../../../models/ProjectUser'; |
||||
import Noco from '../../Noco'; |
||||
import { CacheScope, MetaTable } from '../../utils/globals'; |
||||
import ProjectUser from '../../models/ProjectUser'; |
||||
import { validatePassword } from 'nocodb-sdk'; |
||||
import boxen from 'boxen'; |
||||
import NocoCache from '../../../cache/NocoCache'; |
||||
import NocoCache from '../../cache/NocoCache'; |
||||
import { Tele } from 'nc-help'; |
||||
|
||||
const { isEmail } = require('validator'); |
@ -1,30 +1,30 @@
|
||||
import { Request, Response } from 'express'; |
||||
import { TableType, validatePassword } from 'nocodb-sdk'; |
||||
import { OrgUserRoles } from 'nocodb-sdk'; |
||||
import { NC_APP_SETTINGS } from '../../../constants'; |
||||
import Store from '../../../models/Store'; |
||||
import { NC_APP_SETTINGS } from '../../constants'; |
||||
import Store from '../../models/Store'; |
||||
import { Tele } from 'nc-help'; |
||||
import catchError, { NcError } from '../../helpers/catchError'; |
||||
import catchError, { NcError } from '../../meta/helpers/catchError'; |
||||
|
||||
const { isEmail } = require('validator'); |
||||
import * as ejs from 'ejs'; |
||||
|
||||
import bcrypt from 'bcryptjs'; |
||||
import { promisify } from 'util'; |
||||
import User from '../../../models/User'; |
||||
import User from '../../models/User'; |
||||
|
||||
const { v4: uuidv4 } = require('uuid'); |
||||
import Audit from '../../../models/Audit'; |
||||
import NcPluginMgrv2 from '../../helpers/NcPluginMgrv2'; |
||||
import Audit from '../../models/Audit'; |
||||
import NcPluginMgrv2 from '../../meta/helpers/NcPluginMgrv2'; |
||||
|
||||
import passport from 'passport'; |
||||
import extractProjectIdAndAuthenticate from '../../helpers/extractProjectIdAndAuthenticate'; |
||||
import ncMetaAclMw from '../../helpers/ncMetaAclMw'; |
||||
import { MetaTable } from '../../../utils/globals'; |
||||
import Noco from '../../../Noco'; |
||||
import { getAjvValidatorMw } from '../helpers'; |
||||
import extractProjectIdAndAuthenticate from '../../meta/helpers/extractProjectIdAndAuthenticate'; |
||||
import ncMetaAclMw from '../../meta/helpers/ncMetaAclMw'; |
||||
import { MetaTable } from '../../utils/globals'; |
||||
import Noco from '../../Noco'; |
||||
import { getAjvValidatorMw } from '../../meta/api/helpers'; |
||||
import { genJwt } from './helpers'; |
||||
import { randomTokenString } from '../../helpers/stringHelpers'; |
||||
import { randomTokenString } from '../../meta/helpers/stringHelpers'; |
||||
|
||||
export async function registerNewUserIfAllowed({ |
||||
firstname, |
@ -1,19 +1,19 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
// @ts-ignore
|
||||
import Model from '../../models/Model'; |
||||
import Model from '../models/Model'; |
||||
import { Tele } from 'nc-help'; |
||||
// @ts-ignore
|
||||
import { PagedResponseImpl } from '../helpers/PagedResponse'; |
||||
import { PagedResponseImpl } from '../meta/helpers/PagedResponse'; |
||||
// @ts-ignore
|
||||
import { Table, TableReq, ViewList } from 'nocodb-sdk'; |
||||
// @ts-ignore
|
||||
import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; |
||||
import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; |
||||
// @ts-ignore
|
||||
import Project from '../../models/Project'; |
||||
import View from '../../models/View'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import Project from '../models/Project'; |
||||
import View from '../models/View'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { xcVisibilityMetaGet } from './modelVisibilityApis'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
// @ts-ignore
|
||||
export async function viewGet(req: Request, res: Response<Table>) {} |
||||
|
@ -1,8 +1,8 @@
|
||||
import { Request, Response, Router } from 'express'; |
||||
import View from '../../models/View'; |
||||
import View from '../models/View'; |
||||
import { Tele } from 'nc-help'; |
||||
import ncMetaAclMw from '../helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../helpers/apiMetrics'; |
||||
import ncMetaAclMw from '../meta/helpers/ncMetaAclMw'; |
||||
import { metaApiMetrics } from '../meta/helpers/apiMetrics'; |
||||
|
||||
export async function columnList(req: Request, res: Response) { |
||||
res.json(await View.getColumns(req.params.viewId)); |
Loading…
Reference in new issue