@budibase/types 3.24.5 → 3.24.7

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,3 +1,4 @@
1
+ import { Optional } from "../../../shared";
1
2
  import { Agent, AgentFile, ChatApp, ChatConversation, ChatConversationRequest, CreateChatConversationRequest } from "../../../documents";
2
3
  export type ChatAgentRequest = ChatConversationRequest;
3
4
  export type FetchAgentHistoryResponse = ChatConversation[];
@@ -7,7 +8,7 @@ export type UpdateChatAppRequest = Omit<ChatApp, "createdAt" | "updatedAt">;
7
8
  export interface FetchAgentsResponse {
8
9
  agents: Agent[];
9
10
  }
10
- export type CreateAgentRequest = Omit<Agent, "_id" | "_rev" | "createdAt" | "updatedAt">;
11
+ export type CreateAgentRequest = Optional<Omit<Agent, "_id" | "_rev" | "createdAt" | "updatedAt">, "aiconfig">;
11
12
  export type CreateAgentResponse = Agent;
12
13
  export type UpdateAgentRequest = Omit<Agent, "createdAt" | "updatedAt">;
13
14
  export type UpdateAgentResponse = Agent;
@@ -2,3 +2,21 @@ import { CustomAIProviderConfig } from "../../../documents";
2
2
  export type AIConfigListResponse = CustomAIProviderConfig[];
3
3
  export type CreateAIConfigRequest = Omit<CustomAIProviderConfig, "_id" | "_rev" | "_deleted">;
4
4
  export type UpdateAIConfigRequest = CustomAIProviderConfig;
5
+ export interface LLMProviderField {
6
+ key: string;
7
+ label: string;
8
+ placeholder?: string | null;
9
+ tooltip?: string | null;
10
+ required?: boolean;
11
+ field_type?: string;
12
+ options?: string[] | null;
13
+ default_value?: string | null;
14
+ }
15
+ export interface LLMProvider {
16
+ id: string;
17
+ displayName: string;
18
+ externalProvider: string;
19
+ defaultModelPlaceholder?: string;
20
+ credentialFields: LLMProviderField[];
21
+ }
22
+ export type LLMProvidersResponse = LLMProvider[];
@@ -6,10 +6,8 @@ export declare enum AIConfigType {
6
6
  export interface CustomAIProviderConfig extends Document {
7
7
  name: string;
8
8
  provider: string;
9
- isDefault: boolean;
10
- baseUrl: string;
9
+ credentialsFields: Record<string, string>;
11
10
  model: string;
12
- apiKey?: string;
13
11
  liteLLMModelId: string;
14
12
  webSearchConfig?: WebSearchConfig;
15
13
  configType: AIConfigType;
@@ -18,6 +18,7 @@ export interface ChatConversationRequest extends Document {
18
18
  agentId: string;
19
19
  title?: string;
20
20
  messages: UIMessage<AgentMessageMetadata>[];
21
+ transient?: boolean;
21
22
  }
22
23
  export type CreateChatConversationRequest = Pick<ChatConversationRequest, "chatAppId" | "agentId" | "title">;
23
24
  export type DraftChatConversation = Omit<ChatConversationRequest, "agentId"> & {
@@ -30,6 +30,7 @@ export type RequiredKeys<T> = {
30
30
  [K in keyof Required<T>]: T[K];
31
31
  };
32
32
  export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
33
+ export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
33
34
  export type WithoutDocMetadata<T extends Document> = Omit<T, "_id" | "_rev" | "createdAt" | "updatedAt">;
34
35
  export type WithDocMetadata<T extends Document> = WithRequired<T, "_id" | "_rev" | "createdAt" | "updatedAt">;
35
36
  export type ToDocCreateMetadata<T extends Document> = Omit<WithRequired<T, "_id">, "_rev" | "_deleted" | "createdAt" | "updatedAt">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/types",
3
- "version": "3.24.5",
3
+ "version": "3.24.7",
4
4
  "description": "Budibase types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,5 +27,5 @@
27
27
  "dependencies": {
28
28
  "scim-patch": "^0.8.1"
29
29
  },
30
- "gitHead": "79041368c407955016c5460b5813243dc02b3627"
30
+ "gitHead": "9c57745f7886ced1ce7f20d92a776144ff7eeec4"
31
31
  }