Browse Source

fix: replace oneOf with anyOf - update all the places

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5174/head
Pranav C 2 years ago
parent
commit
dbcc489c0d
  1. 32
      packages/nocodb-sdk/src/lib/Api.ts
  2. 8
      scripts/sdk/swagger.json

32
packages/nocodb-sdk/src/lib/Api.ts

@ -276,7 +276,13 @@ export interface ColumnType {
| RollupType | RollupType
| LookupType | LookupType
| SelectOptionsType | SelectOptionsType
| object; | object
| (LinkToAnotherRecordType &
FormulaType &
RollupType &
LookupType &
SelectOptionsType &
object);
} }
export interface ColumnListType { export interface ColumnListType {
@ -808,11 +814,16 @@ export interface FormulaColumnReqType {
} }
export type ColumnReqType = ( export type ColumnReqType = (
| NormalColumnRequestType
| LinkToAnotherColumnReqType | LinkToAnotherColumnReqType
| RollupColumnReqType | RollupColumnReqType
| FormulaColumnReqType | FormulaColumnReqType
| LookupColumnReqType | LookupColumnReqType
| NormalColumnRequestType
| (LinkToAnotherColumnReqType &
RollupColumnReqType &
FormulaColumnReqType &
LookupColumnReqType &
NormalColumnRequestType)
) & { ) & {
column_name?: string; column_name?: string;
title?: string; title?: string;
@ -4262,11 +4273,11 @@ export class Api<
relatedMetas?: any, relatedMetas?: any,
client?: string, client?: string,
base_id?: string, base_id?: string,
columns?: ((GridColumnType | FormColumnType | GalleryColumnType) & ColumnType), columns?: ((GridColumnType | FormColumnType | GalleryColumnType | (GridColumnType & FormColumnType & GalleryColumnType)) & ColumnType),
model?: TableType, model?: TableType,
} & { } & {
view?: (FormType | GridType | GalleryType), view?: (FormType | GridType | GalleryType | (FormType & GridType & GalleryType)),
})` OK })` OK
*/ */
@ -4276,11 +4287,20 @@ export class Api<
relatedMetas?: any; relatedMetas?: any;
client?: string; client?: string;
base_id?: string; base_id?: string;
columns?: (GridColumnType | FormColumnType | GalleryColumnType) & columns?: (
| GridColumnType
| FormColumnType
| GalleryColumnType
| (GridColumnType & FormColumnType & GalleryColumnType)
) &
ColumnType; ColumnType;
model?: TableType; model?: TableType;
} & { } & {
view?: FormType | GridType | GalleryType; view?:
| FormType
| GridType
| GalleryType
| (FormType & GridType & GalleryType);
}, },
any any
>({ >({

8
scripts/sdk/swagger.json

@ -5713,7 +5713,7 @@
"columns": { "columns": {
"allOf": [ "allOf": [
{ {
"oneOf": [ "anyOf": [
{ {
"$ref": "#/components/schemas/GridColumn" "$ref": "#/components/schemas/GridColumn"
}, },
@ -5739,7 +5739,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"view": { "view": {
"oneOf": [ "anyOf": [
{ {
"$ref": "#/components/schemas/Form" "$ref": "#/components/schemas/Form"
}, },
@ -7787,7 +7787,7 @@
"type": "number" "type": "number"
}, },
"view": { "view": {
"oneOf": [ "anyOf": [
{ {
"$ref": "#/components/schemas/Form" "$ref": "#/components/schemas/Form"
}, },
@ -8471,7 +8471,7 @@
}, },
"meta": {}, "meta": {},
"colOptions": { "colOptions": {
"oneOf": [ "anyOf": [
{ {
"$ref": "#/components/schemas/LinkToAnotherRecord" "$ref": "#/components/schemas/LinkToAnotherRecord"
}, },

Loading…
Cancel
Save