1
0
Fork 0
mirror of synced 2024-07-06 23:10:57 +12:00

When looking through the search parameters to build up information about validating search inputs better on the API (recently created linear issue) found the public docs weren't fully up to date - fixing this.

This commit is contained in:
mike12345567 2024-04-10 16:38:52 +01:00
parent fcd1113494
commit d51bbb7952
4 changed files with 109 additions and 4 deletions

View file

@ -853,6 +853,7 @@
"array",
"datetime",
"attachment",
"attachment_single",
"link",
"formula",
"auto",
@ -1059,6 +1060,7 @@
"array",
"datetime",
"attachment",
"attachment_single",
"link",
"formula",
"auto",
@ -1276,6 +1278,7 @@
"array",
"datetime",
"attachment",
"attachment_single",
"link",
"formula",
"auto",
@ -1752,7 +1755,7 @@
},
"fuzzy": {
"type": "object",
"description": "A fuzzy search, only supported by internal tables."
"description": "Searches for a sub-string within a string column, e.g. searching for 'dib' will match 'Budibase'."
},
"range": {
"type": "object",
@ -1786,6 +1789,36 @@
"oneOf": {
"type": "object",
"description": "Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2]."
},
"contains": {
"type": "object",
"description": "Searches for a value, or set of values in an array column types (such as a multi-select), if an array of search options is provided then it must match all.",
"example": {
"arrayColumn": [
"a",
"b"
]
}
},
"notContains": {
"type": "object",
"description": "As with the contains search, only functions for array column types, but searches for columns missing the supplied values.",
"example": {
"arrayColumn": [
"a",
"b"
]
}
},
"containsAny": {
"type": "object",
"description": "As with the contains search, only functions for array column types, but searches for any of the provided values when given an array.",
"example": {
"arrayColumn": [
"a",
"b"
]
}
}
}
},

View file

@ -775,6 +775,7 @@ components:
- array
- datetime
- attachment
- attachment_single
- link
- formula
- auto
@ -940,6 +941,7 @@ components:
- array
- datetime
- attachment
- attachment_single
- link
- formula
- auto
@ -1112,6 +1114,7 @@ components:
- array
- datetime
- attachment
- attachment_single
- link
- formula
- auto
@ -1492,7 +1495,8 @@ components:
description: The value to search for in the column.
fuzzy:
type: object
description: A fuzzy search, only supported by internal tables.
description: Searches for a sub-string within a string column, e.g. searching
for 'dib' will match 'Budibase'.
range:
type: object
description: Searches within a range, the format of this must be in the format
@ -1524,6 +1528,31 @@ components:
description: Searches for rows which have a column value that is any of the
specified values. The format of this must be columnName ->
[value1, value2].
contains:
type: object
description: Searches for a value, or set of values in an array column types
(such as a multi-select), if an array of search options is
provided then it must match all.
example:
arrayColumn:
- a
- b
notContains:
type: object
description: As with the contains search, only functions for array column types,
but searches for columns missing the supplied values.
example:
arrayColumn:
- a
- b
containsAny:
type: object
description: As with the contains search, only functions for array column types,
but searches for any of the provided values when given an array.
example:
arrayColumn:
- a
- b
paginate:
type: boolean
description: Enables pagination, by default this is disabled.

View file

@ -27,7 +27,8 @@ export default new Resource().setSchemas({
},
fuzzy: {
type: "object",
description: "A fuzzy search, only supported by internal tables.",
description:
"Searches for a sub-string within a string column, e.g. searching for 'dib' will match 'Budibase'.",
},
range: {
type: "object",
@ -67,6 +68,30 @@ export default new Resource().setSchemas({
description:
"Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2].",
},
contains: {
type: "object",
description:
"Searches for a value, or set of values in an array column types (such as a multi-select), if an array of search options is provided then it must match all.",
example: {
arrayColumn: ["a", "b"],
},
},
notContains: {
type: "object",
description:
"As with the contains search, only functions for array column types, but searches for columns missing the supplied values.",
example: {
arrayColumn: ["a", "b"],
},
},
containsAny: {
type: "object",
description:
"As with the contains search, only functions for array column types, but searches for any of the provided values when given an array.",
example: {
arrayColumn: ["a", "b"],
},
},
},
},
paginate: {

View file

@ -273,6 +273,7 @@ export interface components {
| "array"
| "datetime"
| "attachment"
| "attachment_single"
| "link"
| "formula"
| "auto"
@ -381,6 +382,7 @@ export interface components {
| "array"
| "datetime"
| "attachment"
| "attachment_single"
| "link"
| "formula"
| "auto"
@ -491,6 +493,7 @@ export interface components {
| "array"
| "datetime"
| "attachment"
| "attachment_single"
| "link"
| "formula"
| "auto"
@ -693,7 +696,7 @@ export interface components {
* @example [object Object]
*/
string?: { [key: string]: string };
/** @description A fuzzy search, only supported by internal tables. */
/** @description Searches for a sub-string within a string column, e.g. searching for 'dib' will match 'Budibase'. */
fuzzy?: { [key: string]: unknown };
/**
* @description Searches within a range, the format of this must be in the format of an object with a "low" and "high" property.
@ -713,6 +716,21 @@ export interface components {
notEmpty?: { [key: string]: unknown };
/** @description Searches for rows which have a column value that is any of the specified values. The format of this must be columnName -> [value1, value2]. */
oneOf?: { [key: string]: unknown };
/**
* @description Searches for a value, or set of values in an array column types (such as a multi-select), if an array of search options is provided then it must match all.
* @example [object Object]
*/
contains?: { [key: string]: unknown };
/**
* @description As with the contains search, only functions for array column types, but searches for columns missing the supplied values.
* @example [object Object]
*/
notContains?: { [key: string]: unknown };
/**
* @description As with the contains search, only functions for array column types, but searches for any of the provided values when given an array.
* @example [object Object]
*/
containsAny?: { [key: string]: unknown };
};
/** @description Enables pagination, by default this is disabled. */
paginate?: boolean;