@budibase/types 3.28.0 → 3.28.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,5 +1,6 @@
1
1
  import openai from "openai";
2
2
  import { EnrichedBinding } from "../../ui";
3
+ import { ModelMessage } from "ai";
3
4
  export type UserContent = string | openai.ChatCompletionContentPart[];
4
5
  export interface SystemMessage {
5
6
  role: "system";
@@ -21,6 +22,11 @@ export interface ToolMessage {
21
22
  }
22
23
  export type Message = SystemMessage | UserMessage | AssistantMessage | ToolMessage;
23
24
  export type ResponseFormat = "text" | "json" | openai.ResponseFormatJSONSchema;
25
+ export interface ChatCompletionRequestV2 {
26
+ messages: ModelMessage[];
27
+ model: string;
28
+ stream?: boolean;
29
+ }
24
30
  export interface ChatCompletionRequest {
25
31
  messages: Message[];
26
32
  format?: ResponseFormat;
@@ -29,6 +35,9 @@ export interface ChatCompletionResponse {
29
35
  messages: Message[];
30
36
  tokensUsed: number;
31
37
  }
38
+ export interface AIQuotaUsageResponse {
39
+ monthlyCredits: number;
40
+ }
32
41
  export interface GenerateJsRequest {
33
42
  prompt: string;
34
43
  bindings?: EnrichedBinding[];
@@ -10,6 +10,7 @@ export interface FetchAgentsResponse {
10
10
  }
11
11
  export type CreateAgentRequest = Optional<Omit<Agent, "_id" | "_rev" | "createdAt" | "updatedAt">, "aiconfig">;
12
12
  export type CreateAgentResponse = Agent;
13
+ export type DuplicateAgentResponse = Agent;
13
14
  export type UpdateAgentRequest = Omit<Agent, "createdAt" | "updatedAt" | "_deleted" | "createdBy">;
14
15
  export type UpdateAgentResponse = Agent;
15
16
  export interface FetchAgentFilesResponse {
@@ -59,6 +59,7 @@ export interface AgentFile extends Document {
59
59
  filename: string;
60
60
  mimetype?: string;
61
61
  size?: number;
62
+ objectStoreKey: string;
62
63
  ragSourceId: string;
63
64
  status: AgentFileStatus;
64
65
  chunkCount: number;
@@ -2,9 +2,9 @@ import type { PublishResourceState } from "../../api";
2
2
  import type { Agent, WorkspaceFavourite } from "../../documents";
3
3
  import type { UIAutomation } from "../stores/automations";
4
4
  import type { UIWorkspaceApp } from "../workspaceApps";
5
- export type HomeType = "all" | "app" | "automation" | "agent" | "chat";
5
+ export type HomeType = "all" | "app" | "automation" | "agent";
6
6
  export type HomeRowType = "app" | "automation" | "agent";
7
- export type HomeSortColumn = "name" | "type" | "status" | "created";
7
+ export type HomeSortColumn = "name" | "type" | "status" | "updated";
8
8
  export type HomeSortOrder = "asc" | "desc";
9
9
  interface HomeRowBase {
10
10
  _id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/types",
3
- "version": "3.28.0",
3
+ "version": "3.28.2",
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": "b57235144ae6ed94b1b54d9ea73335106feedc02"
30
+ "gitHead": "b2bb9e6fcbd6ae283ab41464e5552af68f3a12a1"
31
31
  }