@budibase/types 3.24.4 → 3.24.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.
@@ -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;
@@ -6,7 +6,6 @@ export declare enum AIConfigType {
6
6
  export interface CustomAIProviderConfig extends Document {
7
7
  name: string;
8
8
  provider: string;
9
- isDefault: boolean;
10
9
  baseUrl: string;
11
10
  model: string;
12
11
  apiKey?: string;
@@ -1,20 +1,28 @@
1
1
  import { AgentMessageMetadata, Document } from "../../";
2
2
  import type { UIMessage } from "ai";
3
+ export interface ChatAppEnabledAgent {
4
+ agentId: string;
5
+ default?: boolean;
6
+ }
3
7
  export interface ChatApp extends Document {
4
8
  title?: string;
5
9
  greeting?: string;
6
10
  description?: string;
7
11
  theme?: string;
8
- agentId: string;
12
+ enabledAgents: ChatAppEnabledAgent[];
9
13
  live?: boolean;
10
14
  settings?: Record<string, any>;
11
15
  }
12
16
  export interface ChatConversationRequest extends Document {
13
17
  chatAppId: string;
18
+ agentId: string;
14
19
  title?: string;
15
20
  messages: UIMessage<AgentMessageMetadata>[];
16
21
  }
17
- export type CreateChatConversationRequest = Pick<ChatConversationRequest, "chatAppId" | "title">;
22
+ export type CreateChatConversationRequest = Pick<ChatConversationRequest, "chatAppId" | "agentId" | "title">;
23
+ export type DraftChatConversation = Omit<ChatConversationRequest, "agentId"> & {
24
+ agentId?: string;
25
+ };
18
26
  export interface ChatConversation extends ChatConversationRequest {
19
27
  userId: string;
20
28
  }
@@ -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/dist/ui/rest.d.ts CHANGED
@@ -22,17 +22,20 @@ export interface RestTemplate {
22
22
  description: string;
23
23
  specs: RestTemplateSpec[];
24
24
  icon: string;
25
+ operationsCount: number;
25
26
  verified?: true;
26
27
  }
27
28
  export interface RestTemplateWithoutIcon<Name> {
28
29
  name: Name;
29
30
  description: string;
30
31
  specs: RestTemplateSpec[];
32
+ operationsCount: number;
31
33
  }
32
34
  export interface RestTemplateGroup<TemplateGroupName extends keyof RestTemplateGroups> {
33
35
  name: TemplateGroupName;
34
36
  description: string;
35
37
  icon: string;
38
+ operationsCount: number;
36
39
  verified?: true;
37
40
  templates: RestTemplateWithoutIcon<RestTemplateGroups[TemplateGroupName]>[];
38
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/types",
3
- "version": "3.24.4",
3
+ "version": "3.24.6",
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": "6d1812ff9a22270318eaf1f61f4e9af51bbac383"
30
+ "gitHead": "e346f36cee24c74adbfeb31800d5b9f3ebe692c0"
31
31
  }