Skip to content

Commit d5d8777

Browse files
authored
chore: Revert "feat(custom apis): adds missing properties to custom apis" (#22)
1 parent ace9ac6 commit d5d8777

File tree

1 file changed

+5
-32
lines changed

1 file changed

+5
-32
lines changed

src/types/custom-apis.ts

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface CustomApiBase {
1313
api_type: string
1414
type: string
1515
slug: string
16-
allow_upserts: boolean
1716
}
1817

1918
export interface CustomApi extends Identifiable, CustomApiBase {
@@ -29,44 +28,18 @@ export interface CustomApi extends Identifiable, CustomApiBase {
2928
}
3029

3130
export type CustomFieldValidation =
32-
| { string: {
33-
min_length?: number | null,
34-
max_length?: number | null,
35-
regex?: string | null,
36-
allow_null_values?: boolean,
37-
immutable?: boolean,
38-
unique: "yes" | "no",
39-
unique_case_insensitivity?: boolean
40-
}
41-
}
42-
| { integer: {
43-
min_value?: number | null,
44-
max_value?: number | null,
45-
allow_null_values?: boolean,
46-
immutable?: boolean
47-
}
48-
}
49-
| { float: {
50-
min_value?: number | null,
51-
max_value?: number | null,
52-
allow_null_values?: boolean,
53-
immutable?: boolean
54-
}
55-
}
56-
| { boolean: {
57-
allow_null_values?: boolean,
58-
immutable?: boolean
59-
}
60-
}
31+
| { string: { min_length?: number, max_length?: number, regex?: string, allow_null_values?: boolean } }
32+
| { integer: { min_value?: number, max_value?: number, allow_null_values?: boolean } }
33+
| { float: { min_value?: number, max_value?: number, allow_null_values?: boolean } }
34+
| { boolean: { allow_null_values?: boolean } }
6135

6236
export interface CustomApiFieldBase {
6337
name: string
6438
description: string
6539
field_type: string
6640
type: string
6741
slug: string
68-
validation?: CustomFieldValidation,
69-
use_as_url_slug: boolean
42+
validation?: CustomFieldValidation
7043
}
7144

7245
export interface CustomApiField extends Identifiable, CustomApiFieldBase {

0 commit comments

Comments
 (0)