@@ -13,6 +13,7 @@ export interface CustomApiBase {
13
13
api_type : string
14
14
type : string
15
15
slug : string
16
+ allow_upserts : boolean
16
17
}
17
18
18
19
export interface CustomApi extends Identifiable , CustomApiBase {
@@ -28,18 +29,44 @@ export interface CustomApi extends Identifiable, CustomApiBase {
28
29
}
29
30
30
31
export type CustomFieldValidation =
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 } }
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
+ }
35
61
36
62
export interface CustomApiFieldBase {
37
63
name : string
38
64
description : string
39
65
field_type : string
40
66
type : string
41
67
slug : string
42
- validation ?: CustomFieldValidation
68
+ validation ?: CustomFieldValidation ,
69
+ use_as_url_slug : boolean
43
70
}
44
71
45
72
export interface CustomApiField extends Identifiable , CustomApiFieldBase {
@@ -113,5 +140,4 @@ export interface CustomApisEndpoint {
113
140
) : Promise < ResponseBody >
114
141
115
142
DeleteEntry < T = any > ( customApiId : string , customApiEntryId : string ) : Promise < T >
116
-
117
143
}
0 commit comments