nuabase 2.2.0 → 2.3.1

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,6 +3,7 @@ type GatewayApiKeyConfig = {
3
3
  apiKey?: string;
4
4
  fetchToken?: never;
5
5
  baseUrl?: string;
6
+ dangerouslyAllowBrowserApiKeyInLocalhost?: boolean;
6
7
  };
7
8
  type GatewayTokenConfig = {
8
9
  fetchToken: () => Promise<string>;
@@ -3,6 +3,7 @@ export type CastValueParams = {
3
3
  data: unknown;
4
4
  outputName: string;
5
5
  outputSchema: object;
6
+ model?: string;
6
7
  };
7
8
  export type CastArrayParams = {
8
9
  prompt: string;
@@ -10,6 +11,7 @@ export type CastArrayParams = {
10
11
  primaryKey: string;
11
12
  outputName: string;
12
13
  outputSchema: object;
14
+ model?: string;
13
15
  };
14
16
  export type NormalizedUsage = {
15
17
  promptTokens: number;
@@ -1,6 +1,8 @@
1
+ export declare const isDevelopmentLikeBrowserEnvironment: () => boolean;
1
2
  export type AuthConfig = {
2
3
  apiKey?: string;
3
4
  fetchToken?: () => Promise<string>;
5
+ dangerouslyAllowBrowserApiKeyInLocalhost?: boolean;
4
6
  };
5
7
  export declare class AuthTokenManager {
6
8
  private readonly apiKey?;
@@ -9,11 +9,13 @@ export type OutputDef<TSchema extends z.ZodTypeAny> = {
9
9
  export type GetOptions<TSchema extends z.ZodTypeAny> = {
10
10
  input?: unknown;
11
11
  output: OutputDef<TSchema>;
12
+ model?: string;
12
13
  };
13
14
  export type ListOptions<TSchema extends z.ZodTypeAny, TData extends Record<string, unknown>, PrimaryKey extends keyof TData & string> = {
14
15
  input: TData[];
15
16
  primaryKey: PrimaryKey;
16
17
  output: OutputDef<TSchema>;
18
+ model?: string;
17
19
  };
18
20
  export type ListResultRow<TSchema extends z.ZodTypeAny, PrimaryKey extends string> = {
19
21
  [K in PrimaryKey]: string | number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuabase",
3
3
  "description": "Nuabase TypeScript client to create typed functions from LLM prompts",
4
- "version": "2.2.0",
4
+ "version": "2.3.1",
5
5
  "type": "module",
6
6
  "author": "Jasim A Basheer <jasim@nuabase.com>",
7
7
  "engines": {