@budibase/types 2.23.4 → 2.23.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,6 +68,7 @@ export declare enum AccountSSOProvider {
68
68
  }
69
69
  export declare function isVerifiableSSOProvider(provider: AccountSSOProvider): boolean;
70
70
  export interface AccountSSO {
71
+ ssoId?: string;
71
72
  provider: AccountSSOProvider;
72
73
  providerType: AccountSSOProviderType;
73
74
  oauth2?: OAuthTokens;
@@ -1,21 +1,110 @@
1
1
  import { Document } from "../document";
2
2
  export declare enum FieldType {
3
+ /**
4
+ * a primitive type, stores a string, called Text within Budibase. This is one of the default
5
+ * types of Budibase, if an external type is not fully understood, we will treat it as text.
6
+ */
3
7
  STRING = "string",
8
+ /**
9
+ * similar to string type, called Long Form Text within Budibase. This is mainly a frontend
10
+ * orientated type which enables a larger text input area. This can also be used
11
+ * in conjunction with the 'useRichText' option to support a markdown editor/viewer.
12
+ */
4
13
  LONGFORM = "longform",
14
+ /**
15
+ * similar to string type, called Options within Budibase. This works very similarly to
16
+ * the string type within the backend, but is validated to a list of options. This will
17
+ * display a <select> input within the builder/client.
18
+ */
5
19
  OPTIONS = "options",
20
+ /**
21
+ * a primitive type, stores a number, as a floating point, called Number within Budibase.
22
+ * this type will always represent numbers as reals/floating point - there is no integer only
23
+ * type within Budibase.
24
+ */
6
25
  NUMBER = "number",
26
+ /**
27
+ * a primitive type, stores a boolean, called Boolean within Budibase. This is often represented
28
+ * as a toggle or checkbox within forms/grids.
29
+ */
7
30
  BOOLEAN = "boolean",
31
+ /**
32
+ * a JSON type, this type is always an array of strings, called Multi-select within Budibase.
33
+ * This type can be compared to the options type, as it functions similarly, but allows picking
34
+ * multiple options rather than a single option.
35
+ */
8
36
  ARRAY = "array",
37
+ /**
38
+ * a string type, this is always a string when input/returned from the API, called Date/Time within
39
+ * Budibase. We utilise ISO date strings for representing dates, this type has a range of subtypes
40
+ * to restrict it to date only, time only and ignore timezone capabilities.
41
+ */
9
42
  DATETIME = "datetime",
43
+ /**
44
+ * a JSON type, an array of metadata about files held in object storage, called Attachment List within
45
+ * Budibase. To utilise this type there is an API for uploading files to Budibase, which returns metadata
46
+ * that can be stored against columns of this type. Currently this is not supported on external databases.
47
+ */
10
48
  ATTACHMENTS = "attachment",
49
+ /**
50
+ * a JSON type, similar to the attachments type, called Attachment within Budibase. This type functions
51
+ * much the same as the attachment list, but only holds a single attachment metadata as an object.
52
+ * This simplifies the binding experience of using this column type.
53
+ */
11
54
  ATTACHMENT_SINGLE = "attachment_single",
55
+ /**
56
+ * a complex type, called Relationships within Budibase. This is the most complex type of Budibase,
57
+ * nothing should be stored against rows under link columns; this type simply represents the
58
+ * relationship between tables as part of the table schema. When rows are input to the Budibase API
59
+ * relationships to be made are represented as a list of row IDs to link. When rows are returned
60
+ * from the Budibase API it will contain a list of row IDs and display column values of the related rows.
61
+ */
12
62
  LINK = "link",
63
+ /**
64
+ * a complex type, called Formulas within Budibase. This type has two variants, static and dynamic, with
65
+ * static only being supported against internal tables. Dynamic formulas calculate a provided HBS/JS binding
66
+ * based on the row context and enrich it when rows are being returned from the API. Static bindings calculate
67
+ * this when rows are being stored, so that the formula output can be searched upon within the DB.
68
+ */
13
69
  FORMULA = "formula",
70
+ /**
71
+ * a complex type, called Auto Column within Budibase. This type has a few variants, with options such as a
72
+ * date for created at/updated at, an auto ID column with auto-increments as rows are saved and a user
73
+ * relationship type which stores the created by/updated by user details. These subtypes all depend on the
74
+ * date, number of link types respectively. There is one case where these will be executed in the browser,
75
+ * that is part of the initial formula definition, the formula will be live evaluated in the browser.
76
+ */
14
77
  AUTO = "auto",
78
+ /**
79
+ * a JSON type, called JSON within Budibase. This type allows any arbitrary JSON to be input to this column
80
+ * type, which will be represented as a JSON object in the row. This type depends on a schema being
81
+ * provided to make the JSON searchable/bindable, the JSON cannot be fully dynamic.
82
+ */
15
83
  JSON = "json",
84
+ /**
85
+ * @deprecated an internal type, this is an old deprecated type which is no longer used - still represented to note it
86
+ * could appear in very old tables.
87
+ */
16
88
  INTERNAL = "internal",
89
+ /**
90
+ * a string type, called Barcode/QR within Budibase. This type is used to denote to forms to that this column
91
+ * should be filled in using a camera to read a barcode, there is a form component which will be used when this
92
+ * type is found. The column will contain the contents of any barcode scanned.
93
+ */
17
94
  BARCODEQR = "barcodeqr",
95
+ /**
96
+ * a string type, this allows representing very large integers, but they are held/managed within Budibase as
97
+ * strings. When stored in external databases Budibase will attempt to use a real big integer type and depend
98
+ * on the database parsing the string to this type as part of saving.
99
+ */
18
100
  BIGINT = "bigint",
101
+ /**
102
+ * a JSON type, called User within Budibase. This type is used to represent a link to an internal Budibase
103
+ * resource, like a user or group, today only users are supported. This type will be represented as an
104
+ * array of internal resource IDs (e.g. user IDs) within the row - this ID list will be enriched with
105
+ * the full resources when rows are returned from the API. The full resources can be input to the API, or
106
+ * an array of resource IDs, the API will squash these down and validate them before saving the row.
107
+ */
19
108
  BB_REFERENCE = "bb_reference"
20
109
  }
21
110
  export interface RowAttachment {
@@ -5,20 +5,18 @@ export declare enum SQLiteType {
5
5
  BLOB = "BLOB",
6
6
  NUMERIC = "NUMERIC"
7
7
  }
8
+ export type SQLiteTable = Record<string, SQLiteType | {
9
+ field: string;
10
+ type: SQLiteType;
11
+ }>;
12
+ export type SQLiteTables = Record<string, {
13
+ fields: SQLiteTable;
14
+ }>;
8
15
  export interface SQLiteDefinition {
9
16
  _id: string;
10
17
  language: string;
11
18
  sql: {
12
- tables: {
13
- [tableName: string]: {
14
- fields: {
15
- [key: string]: SQLiteType | {
16
- field: string;
17
- type: SQLiteType;
18
- };
19
- };
20
- };
21
- };
19
+ tables: SQLiteTables;
22
20
  options: {
23
21
  table_name: string;
24
22
  };