@budibase/types 3.9.0 → 3.9.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.
@@ -3,11 +3,16 @@ export interface Message {
3
3
  role: "system" | "user";
4
4
  content: string;
5
5
  }
6
+ export declare enum StructuredOutput {
7
+ }
8
+ export type ResponseFormat = "text" | "json" | StructuredOutput;
6
9
  export interface ChatCompletionRequest {
7
10
  messages: Message[];
11
+ format?: ResponseFormat;
8
12
  }
9
13
  export interface ChatCompletionResponse {
10
14
  message?: string;
15
+ tokensUsed?: number;
11
16
  }
12
17
  export interface GenerateJsRequest {
13
18
  prompt: string;
@@ -1,4 +1,4 @@
1
- import { License } from "../../../sdk";
1
+ import { License, LLMProviderConfig } from "../../../sdk";
2
2
  import { Account, DevInfo, User } from "../../../documents";
3
3
  import { FeatureFlags } from "@budibase/types";
4
4
  export interface GenerateAPIKeyRequest {
@@ -10,6 +10,7 @@ export interface FetchAPIKeyResponse extends DevInfo {
10
10
  }
11
11
  export interface GetGlobalSelfResponse extends User {
12
12
  flags?: FeatureFlags;
13
+ llm?: Omit<LLMProviderConfig, "apiKey">;
13
14
  account?: Account;
14
15
  license: License;
15
16
  budibaseAccess: boolean;
@@ -49,6 +49,28 @@ export interface CloudAccount extends Account {
49
49
  password?: string;
50
50
  budibaseUserId: string;
51
51
  }
52
+ export interface TenantDetail {
53
+ id: string;
54
+ name: string;
55
+ hosting: Hosting;
56
+ installation?: {
57
+ id: string;
58
+ version: string;
59
+ };
60
+ license?: {
61
+ key: string;
62
+ session?: string;
63
+ };
64
+ }
65
+ export interface AccountDetail {
66
+ id: string;
67
+ email: string;
68
+ name: string;
69
+ displayName: string;
70
+ customerId: string | null;
71
+ createdAt: Date;
72
+ tenants: TenantDetail[];
73
+ }
52
74
  export declare const isCloudAccount: (account: Account) => account is CloudAccount;
53
75
  export declare const isSelfHostAccount: (account: Account) => boolean;
54
76
  export declare const isSSOAccount: (account: Account) => account is SSOAccount;