@budibase/types 3.8.0 → 3.8.2

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.
@@ -1,4 +1,14 @@
1
1
  import { EnrichedBinding } from "../../ui";
2
+ export interface Message {
3
+ role: "system" | "user";
4
+ content: string;
5
+ }
6
+ export interface ChatCompletionRequest {
7
+ messages: Message[];
8
+ }
9
+ export interface ChatCompletionResponse {
10
+ message?: string;
11
+ }
2
12
  export interface GenerateJsRequest {
3
13
  prompt: string;
4
14
  bindings?: EnrichedBinding[];
@@ -6,3 +16,9 @@ export interface GenerateJsRequest {
6
16
  export interface GenerateJsResponse {
7
17
  code: string;
8
18
  }
19
+ export interface GenerateCronRequest {
20
+ prompt: string;
21
+ }
22
+ export interface GenerateCronResponse {
23
+ message?: string;
24
+ }
@@ -1,4 +1,5 @@
1
1
  import { Document } from "../document";
2
+ import { FieldSchema } from "./table";
2
3
  export declare enum FieldType {
3
4
  /**
4
5
  * a primitive type, stores a string, called Text within Budibase. This is one of the default
@@ -127,6 +128,7 @@ export declare const JsonTypes: FieldType[];
127
128
  export type FormulaResponseType = FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
128
129
  export declare const NumericTypes: FieldType[];
129
130
  export declare function isNumeric(type: FieldType): boolean;
131
+ export declare function isNumericStaticFormula(schema: FieldSchema): boolean | undefined;
130
132
  export declare const GroupByTypes: FieldType[];
131
133
  export declare function canGroupBy(type: FieldType): boolean;
132
134
  export interface RowAttachment {
@@ -12,6 +12,9 @@ export interface ScreenRouting {
12
12
  roleId: string;
13
13
  homeScreen?: boolean;
14
14
  }
15
+ export declare enum ScreenVariant {
16
+ PDF = "pdf"
17
+ }
15
18
  export interface Screen extends Document {
16
19
  layoutId?: string;
17
20
  showNavigation?: boolean;
@@ -21,6 +24,7 @@ export interface Screen extends Document {
21
24
  name?: string;
22
25
  pluginAdded?: boolean;
23
26
  onLoad?: EventHandler[];
27
+ variant?: ScreenVariant;
24
28
  }
25
29
  export interface ScreenRoutesViewOutput extends Document {
26
30
  id: string;
@@ -158,6 +158,7 @@ export interface BaseFieldSchema extends UIFieldMetadata {
158
158
  autocolumn?: boolean;
159
159
  autoReason?: AutoReason.FOREIGN_KEY;
160
160
  subtype?: never;
161
+ nestedJSON?: boolean;
161
162
  }
162
163
  interface OtherFieldMetadata extends BaseFieldSchema {
163
164
  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 | FieldType.BOOLEAN | FieldType.BIGINT | FieldType.JSON>;
@@ -98,7 +98,7 @@ export interface SCIMInnerConfig {
98
98
  }
99
99
  export interface SCIMConfig extends Config<SCIMInnerConfig> {
100
100
  }
101
- export type AIProvider = "OpenAI" | "Anthropic" | "AzureOpenAI" | "TogetherAI" | "Custom";
101
+ export type AIProvider = "OpenAI" | "Anthropic" | "AzureOpenAI" | "TogetherAI" | "Custom" | "BudibaseAI";
102
102
  export interface ProviderConfig {
103
103
  provider: AIProvider;
104
104
  isDefault: boolean;