@dotbots-boutique/server-sdk 0.3.1 → 0.4.0

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.
package/dist/client.js CHANGED
@@ -52,6 +52,7 @@ class DotBotsBackend {
52
52
  tools: request.tools,
53
53
  stream: false,
54
54
  maxTokens: request.maxTokens,
55
+ paidBy: request.paidBy,
55
56
  orgId: request.orgId,
56
57
  }),
57
58
  });
@@ -106,7 +107,7 @@ class DotBotsBackend {
106
107
  headers: this.baseHeaders(),
107
108
  body: JSON.stringify({
108
109
  featureCode,
109
- paidBy: options.paidBy,
110
+ paidBy: options.paidBy ?? 'org',
110
111
  orgId: options.orgId,
111
112
  quantity: options.quantity ?? 1,
112
113
  }),
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { DotBotsBackend } from './client';
2
2
  export { DotBotsBackendError } from './errors';
3
- export type { AiMessage, AiResponse, AiTool, AiToolCall, AiToolParameter, BackendAiRequest, DotBotsBackendConfig, DotBotsUser, } from './types';
3
+ export type { AiImage, AiMessage, AiResponse, AiTool, AiToolCall, AiToolParameter, BackendAiRequest, DotBotsBackendConfig, DotBotsUser, } from './types';
4
4
  export { AppSecretsStore } from './proxy/app-secrets';
5
5
  export { handleAiCall, handleCharge, handleGetUser, handleInternalAppSecrets, resolveAuth, } from './proxy/handlers';
6
6
  export type { AuthResult, CryptoHelpers, DbClient, FeatureConfig, JwtPayload, UserRecord, } from './proxy/types';
package/dist/types.d.ts CHANGED
@@ -21,8 +21,17 @@ export interface AiTool {
21
21
  description: string;
22
22
  parameters?: AiToolParameter;
23
23
  }
24
+ export interface AiImage {
25
+ mimeType: string;
26
+ data: string;
27
+ url: string;
28
+ }
24
29
  export interface AiResponse {
25
30
  content: string;
31
+ images?: AiImage[];
32
+ imageUrl?: string;
33
+ image_url?: string;
34
+ image?: AiImage;
26
35
  model: string;
27
36
  provider: string;
28
37
  usage: {
@@ -31,7 +40,7 @@ export interface AiResponse {
31
40
  totalTokens: number;
32
41
  };
33
42
  cost: {
34
- tokens: bigint;
43
+ tokens: number;
35
44
  eur: number;
36
45
  };
37
46
  transactionId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotbots-boutique/server-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "DotBots Backend SDK — server-side AI calls, payments, and user lookups via the DotBots proxy",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",