@budibase/types 2.33.1 → 2.33.3
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.
- package/dist/api/web/role.d.ts +4 -2
- package/dist/documents/app/app.d.ts +1 -0
- package/dist/documents/app/automation/automation.d.ts +1 -0
- package/dist/documents/app/role.d.ts +1 -1
- package/dist/documents/app/row.d.ts +7 -0
- package/dist/documents/app/table/constants.d.ts +2 -1
- package/dist/documents/app/table/schema.d.ts +12 -2
- package/dist/documents/global/user.d.ts +9 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +4 -4
- package/dist/index.js.meta.json +1 -1
- package/dist/sdk/ai.d.ts +74 -0
- package/dist/sdk/automations/index.d.ts +2 -1
- package/dist/sdk/events/role.d.ts +3 -3
- package/dist/sdk/featureFlag.d.ts +5 -1
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/koa.d.ts +7 -0
- package/dist/sdk/search.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
package/dist/api/web/role.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Role, RoleUIMetadata } from "../../documents";
|
|
2
|
+
import { PermissionLevel } from "../../sdk";
|
|
2
3
|
export interface SaveRoleRequest {
|
|
3
4
|
_id?: string;
|
|
4
5
|
_rev?: string;
|
|
5
6
|
name: string;
|
|
6
|
-
inherits
|
|
7
|
+
inherits?: string | string[];
|
|
7
8
|
permissionId: string;
|
|
8
|
-
|
|
9
|
+
permissions?: Record<string, PermissionLevel[]>;
|
|
10
|
+
version?: string;
|
|
9
11
|
uiMetadata?: RoleUIMetadata;
|
|
10
12
|
}
|
|
11
13
|
export interface SaveRoleResponse extends Role {
|
|
@@ -75,6 +75,13 @@ export declare enum FieldType {
|
|
|
75
75
|
* that is part of the initial formula definition, the formula will be live evaluated in the browser.
|
|
76
76
|
*/
|
|
77
77
|
AUTO = "auto",
|
|
78
|
+
/**
|
|
79
|
+
* A complex type, called an AI column within Budibase. This type is only supported against internal tables
|
|
80
|
+
* and calculates the output based on a chosen operation (summarise text, translation etc) which passes to
|
|
81
|
+
* the configured Budibase Large Language Model to retrieve the output and write it back into the row.
|
|
82
|
+
* AI fields function in a similar fashion to static formulas, and possess many of the same characteristics.
|
|
83
|
+
*/
|
|
84
|
+
AI = "ai",
|
|
78
85
|
/**
|
|
79
86
|
* a JSON type, called JSON within Budibase. This type allows any arbitrary JSON to be input to this column
|
|
80
87
|
* type, which will be represented as a JSON object in the row. This type depends on a schema being
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldType } from "../row";
|
|
2
2
|
import { AutoFieldSubType, AutoReason, BBReferenceFieldSubType, FormulaType, JsonFieldSubType, RelationshipType } from "./constants";
|
|
3
|
+
import { AIOperationEnum } from "../../../sdk/ai";
|
|
3
4
|
export interface UIFieldMetadata {
|
|
4
5
|
order?: number;
|
|
5
6
|
width?: number;
|
|
@@ -80,6 +81,15 @@ export interface FormulaFieldMetadata extends BaseFieldSchema {
|
|
|
80
81
|
formula: string;
|
|
81
82
|
formulaType?: FormulaType;
|
|
82
83
|
}
|
|
84
|
+
export interface AIFieldMetadata extends BaseFieldSchema {
|
|
85
|
+
type: FieldType.AI;
|
|
86
|
+
operation: AIOperationEnum;
|
|
87
|
+
columns?: string[];
|
|
88
|
+
column?: string;
|
|
89
|
+
categories?: string[];
|
|
90
|
+
prompt?: string;
|
|
91
|
+
language?: string;
|
|
92
|
+
}
|
|
83
93
|
export interface BBReferenceFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
|
|
84
94
|
type: FieldType.BB_REFERENCE;
|
|
85
95
|
subtype: BBReferenceFieldSubType;
|
|
@@ -141,9 +151,9 @@ interface BaseFieldSchema extends UIFieldMetadata {
|
|
|
141
151
|
subtype?: never;
|
|
142
152
|
}
|
|
143
153
|
interface OtherFieldMetadata extends BaseFieldSchema {
|
|
144
|
-
type: Exclude<FieldType, FieldType.DATETIME | FieldType.LINK | FieldType.AUTO | FieldType.FORMULA | FieldType.NUMBER | FieldType.LONGFORM | FieldType.BB_REFERENCE | FieldType.BB_REFERENCE_SINGLE | FieldType.ATTACHMENTS | FieldType.STRING | FieldType.ARRAY | FieldType.OPTIONS>;
|
|
154
|
+
type: Exclude<FieldType, FieldType.DATETIME | FieldType.LINK | FieldType.AUTO | FieldType.FORMULA | FieldType.AI | FieldType.NUMBER | FieldType.LONGFORM | FieldType.BB_REFERENCE | FieldType.BB_REFERENCE_SINGLE | FieldType.ATTACHMENTS | FieldType.STRING | FieldType.ARRAY | FieldType.OPTIONS>;
|
|
145
155
|
}
|
|
146
|
-
export type FieldSchema = OtherFieldMetadata | DateFieldMetadata | RelationshipFieldMetadata | AutoColumnFieldMetadata | FormulaFieldMetadata | NumberFieldMetadata | LongFormFieldMetadata | StringFieldMetadata | BBReferenceFieldMetadata | JsonFieldMetadata | AttachmentFieldMetadata | BBReferenceSingleFieldMetadata | ArrayFieldMetadata | OptionsFieldMetadata;
|
|
156
|
+
export type FieldSchema = OtherFieldMetadata | DateFieldMetadata | RelationshipFieldMetadata | AutoColumnFieldMetadata | FormulaFieldMetadata | AIFieldMetadata | NumberFieldMetadata | LongFormFieldMetadata | StringFieldMetadata | BBReferenceFieldMetadata | JsonFieldMetadata | AttachmentFieldMetadata | BBReferenceSingleFieldMetadata | ArrayFieldMetadata | OptionsFieldMetadata;
|
|
147
157
|
export interface TableSchema {
|
|
148
158
|
[key: string]: FieldSchema;
|
|
149
159
|
}
|
|
@@ -56,6 +56,15 @@ export interface User extends Document {
|
|
|
56
56
|
ssoId?: string;
|
|
57
57
|
appSort?: string;
|
|
58
58
|
}
|
|
59
|
+
export interface UserBindings extends Document {
|
|
60
|
+
firstName?: string;
|
|
61
|
+
lastName?: string;
|
|
62
|
+
email?: string;
|
|
63
|
+
status?: string;
|
|
64
|
+
roleId?: string | null;
|
|
65
|
+
globalId?: string;
|
|
66
|
+
userId?: string;
|
|
67
|
+
}
|
|
59
68
|
export declare enum UserStatus {
|
|
60
69
|
ACTIVE = "active",
|
|
61
70
|
INACTIVE = "inactive"
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
+
AIOperationEnum: () => AIOperationEnum,
|
|
23
24
|
APP_QUOTA_NAMES: () => APP_QUOTA_NAMES,
|
|
24
25
|
AUDIT_LOG_TYPE: () => AUDIT_LOG_TYPE,
|
|
25
26
|
AccountSSOProvider: () => AccountSSOProvider,
|
|
@@ -86,6 +87,7 @@ __export(src_exports, {
|
|
|
86
87
|
LockName: () => LockName,
|
|
87
88
|
LockType: () => LockType,
|
|
88
89
|
LogicalOperator: () => LogicalOperator,
|
|
90
|
+
LoginMethod: () => LoginMethod,
|
|
89
91
|
LoopStepType: () => LoopStepType,
|
|
90
92
|
MaintenanceType: () => MaintenanceType,
|
|
91
93
|
MigrationName: () => MigrationName,
|
|
@@ -93,6 +95,7 @@ __export(src_exports, {
|
|
|
93
95
|
MonthlyQuotaName: () => MonthlyQuotaName,
|
|
94
96
|
NumericTypes: () => NumericTypes,
|
|
95
97
|
Operation: () => Operation,
|
|
98
|
+
OperationFieldTypeEnum: () => OperationFieldTypeEnum,
|
|
96
99
|
PASSWORD_REPLACEMENT: () => PASSWORD_REPLACEMENT,
|
|
97
100
|
PLUGIN_TYPE_ARR: () => PLUGIN_TYPE_ARR,
|
|
98
101
|
PermissionLevel: () => PermissionLevel,
|
|
@@ -166,6 +169,24 @@ __export(src_exports, {
|
|
|
166
169
|
});
|
|
167
170
|
module.exports = __toCommonJS(src_exports);
|
|
168
171
|
|
|
172
|
+
// src/sdk/ai.ts
|
|
173
|
+
var AIOperationEnum = /* @__PURE__ */ ((AIOperationEnum2) => {
|
|
174
|
+
AIOperationEnum2["SUMMARISE_TEXT"] = "SUMMARISE_TEXT";
|
|
175
|
+
AIOperationEnum2["CLEAN_DATA"] = "CLEAN_DATA";
|
|
176
|
+
AIOperationEnum2["TRANSLATE"] = "TRANSLATE";
|
|
177
|
+
AIOperationEnum2["CATEGORISE_TEXT"] = "CATEGORISE_TEXT";
|
|
178
|
+
AIOperationEnum2["SENTIMENT_ANALYSIS"] = "SENTIMENT_ANALYSIS";
|
|
179
|
+
AIOperationEnum2["PROMPT"] = "PROMPT";
|
|
180
|
+
AIOperationEnum2["SEARCH_WEB"] = "SEARCH_WEB";
|
|
181
|
+
return AIOperationEnum2;
|
|
182
|
+
})(AIOperationEnum || {});
|
|
183
|
+
var OperationFieldTypeEnum = /* @__PURE__ */ ((OperationFieldTypeEnum2) => {
|
|
184
|
+
OperationFieldTypeEnum2["MULTI_COLUMN"] = "columns";
|
|
185
|
+
OperationFieldTypeEnum2["COLUMN"] = "column";
|
|
186
|
+
OperationFieldTypeEnum2["BINDABLE_TEXT"] = "prompt";
|
|
187
|
+
return OperationFieldTypeEnum2;
|
|
188
|
+
})(OperationFieldTypeEnum || {});
|
|
189
|
+
|
|
169
190
|
// src/sdk/hosting.ts
|
|
170
191
|
var Hosting = /* @__PURE__ */ ((Hosting2) => {
|
|
171
192
|
Hosting2["CLOUD"] = "cloud";
|
|
@@ -744,6 +765,13 @@ var SqlClient = /* @__PURE__ */ ((SqlClient2) => {
|
|
|
744
765
|
return SqlClient2;
|
|
745
766
|
})(SqlClient || {});
|
|
746
767
|
|
|
768
|
+
// src/sdk/koa.ts
|
|
769
|
+
var LoginMethod = /* @__PURE__ */ ((LoginMethod2) => {
|
|
770
|
+
LoginMethod2["API_KEY"] = "api_key";
|
|
771
|
+
LoginMethod2["COOKIE"] = "cookie";
|
|
772
|
+
return LoginMethod2;
|
|
773
|
+
})(LoginMethod || {});
|
|
774
|
+
|
|
747
775
|
// src/sdk/locks.ts
|
|
748
776
|
var LockType = /* @__PURE__ */ ((LockType2) => {
|
|
749
777
|
LockType2["TRY_ONCE"] = "try_once";
|
|
@@ -796,9 +824,13 @@ var TenantResolutionStrategy = /* @__PURE__ */ ((TenantResolutionStrategy2) => {
|
|
|
796
824
|
var FeatureFlag = /* @__PURE__ */ ((FeatureFlag2) => {
|
|
797
825
|
FeatureFlag2["PER_CREATOR_PER_USER_PRICE"] = "PER_CREATOR_PER_USER_PRICE";
|
|
798
826
|
FeatureFlag2["PER_CREATOR_PER_USER_PRICE_ALERT"] = "PER_CREATOR_PER_USER_PRICE_ALERT";
|
|
827
|
+
FeatureFlag2["AUTOMATION_BRANCHING"] = "AUTOMATION_BRANCHING";
|
|
828
|
+
FeatureFlag2["SQS"] = "SQS";
|
|
799
829
|
FeatureFlag2["AI_CUSTOM_CONFIGS"] = "AI_CUSTOM_CONFIGS";
|
|
830
|
+
FeatureFlag2["DEFAULT_VALUES"] = "DEFAULT_VALUES";
|
|
800
831
|
FeatureFlag2["ENRICHED_RELATIONSHIPS"] = "ENRICHED_RELATIONSHIPS";
|
|
801
832
|
FeatureFlag2["TABLES_DEFAULT_ADMIN"] = "TABLES_DEFAULT_ADMIN";
|
|
833
|
+
FeatureFlag2["BUDIBASE_AI"] = "BUDIBASE_AI";
|
|
802
834
|
return FeatureFlag2;
|
|
803
835
|
})(FeatureFlag || {});
|
|
804
836
|
|
|
@@ -1059,6 +1091,7 @@ var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
|
1059
1091
|
FieldType2["LINK"] = "link";
|
|
1060
1092
|
FieldType2["FORMULA"] = "formula";
|
|
1061
1093
|
FieldType2["AUTO"] = "auto";
|
|
1094
|
+
FieldType2["AI"] = "ai";
|
|
1062
1095
|
FieldType2["JSON"] = "json";
|
|
1063
1096
|
FieldType2["INTERNAL"] = "internal";
|
|
1064
1097
|
FieldType2["BARCODEQR"] = "barcodeqr";
|
|
@@ -1119,6 +1152,7 @@ var JsonFieldSubType = /* @__PURE__ */ ((JsonFieldSubType3) => {
|
|
|
1119
1152
|
var FormulaType = /* @__PURE__ */ ((FormulaType3) => {
|
|
1120
1153
|
FormulaType3["STATIC"] = "static";
|
|
1121
1154
|
FormulaType3["DYNAMIC"] = "dynamic";
|
|
1155
|
+
FormulaType3["AI"] = "ai";
|
|
1122
1156
|
return FormulaType3;
|
|
1123
1157
|
})(FormulaType || {});
|
|
1124
1158
|
var BBReferenceFieldSubType = /* @__PURE__ */ ((BBReferenceFieldSubType3) => {
|
|
@@ -1416,6 +1450,7 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
|
|
|
1416
1450
|
})(MaintenanceType || {});
|
|
1417
1451
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1418
1452
|
0 && (module.exports = {
|
|
1453
|
+
AIOperationEnum,
|
|
1419
1454
|
APP_QUOTA_NAMES,
|
|
1420
1455
|
AUDIT_LOG_TYPE,
|
|
1421
1456
|
AccountSSOProvider,
|
|
@@ -1482,6 +1517,7 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
|
|
|
1482
1517
|
LockName,
|
|
1483
1518
|
LockType,
|
|
1484
1519
|
LogicalOperator,
|
|
1520
|
+
LoginMethod,
|
|
1485
1521
|
LoopStepType,
|
|
1486
1522
|
MaintenanceType,
|
|
1487
1523
|
MigrationName,
|
|
@@ -1489,6 +1525,7 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
|
|
|
1489
1525
|
MonthlyQuotaName,
|
|
1490
1526
|
NumericTypes,
|
|
1491
1527
|
Operation,
|
|
1528
|
+
OperationFieldTypeEnum,
|
|
1492
1529
|
PASSWORD_REPLACEMENT,
|
|
1493
1530
|
PLUGIN_TYPE_ARR,
|
|
1494
1531
|
PermissionLevel,
|