@lavapayments/nodejs 3.2.0 → 4.0.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.
- package/README.md +1 -1
- package/dist/index.d.mts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ApiVersion = "2025-04-
|
|
1
|
+
type ApiVersion = "2025-04-28.v1";
|
|
2
2
|
interface Config {
|
|
3
3
|
apiVersion: ApiVersion;
|
|
4
4
|
/**
|
|
@@ -64,6 +64,14 @@ declare class Lava {
|
|
|
64
64
|
* Google OpenAI-compatible base URL for convenience
|
|
65
65
|
*/
|
|
66
66
|
readonly googleOpenaiCompatibleUrl: string;
|
|
67
|
+
/**
|
|
68
|
+
* kluster.ai base URL for convenience
|
|
69
|
+
*/
|
|
70
|
+
readonly klusterUrl: string;
|
|
71
|
+
/**
|
|
72
|
+
* Inference.net base URL for convenience
|
|
73
|
+
*/
|
|
74
|
+
readonly inferenceUrl: string;
|
|
67
75
|
/**
|
|
68
76
|
* Create a new Lava client
|
|
69
77
|
* @param secretKey Your Lava secret key
|
|
@@ -156,11 +164,12 @@ type RestConnection = {
|
|
|
156
164
|
};
|
|
157
165
|
type RestRequest = {
|
|
158
166
|
request_id: string;
|
|
167
|
+
status: "pending" | "completed" | "error";
|
|
159
168
|
connection_id?: string;
|
|
160
169
|
product_id?: string;
|
|
161
170
|
provider: string;
|
|
162
171
|
provider_key_type: "managed" | "unmanaged";
|
|
163
|
-
model
|
|
172
|
+
model?: string;
|
|
164
173
|
endpoint: string;
|
|
165
174
|
response_id?: string;
|
|
166
175
|
model_usage: {
|
|
@@ -202,7 +211,7 @@ type RestRequest = {
|
|
|
202
211
|
total_wallet_cost: string;
|
|
203
212
|
total_merchant_cost: string;
|
|
204
213
|
metadata: Record<string, string>;
|
|
205
|
-
timestamp
|
|
214
|
+
timestamp?: string;
|
|
206
215
|
created_at: string;
|
|
207
216
|
};
|
|
208
217
|
type RestUsage = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ApiVersion = "2025-04-
|
|
1
|
+
type ApiVersion = "2025-04-28.v1";
|
|
2
2
|
interface Config {
|
|
3
3
|
apiVersion: ApiVersion;
|
|
4
4
|
/**
|
|
@@ -64,6 +64,14 @@ declare class Lava {
|
|
|
64
64
|
* Google OpenAI-compatible base URL for convenience
|
|
65
65
|
*/
|
|
66
66
|
readonly googleOpenaiCompatibleUrl: string;
|
|
67
|
+
/**
|
|
68
|
+
* kluster.ai base URL for convenience
|
|
69
|
+
*/
|
|
70
|
+
readonly klusterUrl: string;
|
|
71
|
+
/**
|
|
72
|
+
* Inference.net base URL for convenience
|
|
73
|
+
*/
|
|
74
|
+
readonly inferenceUrl: string;
|
|
67
75
|
/**
|
|
68
76
|
* Create a new Lava client
|
|
69
77
|
* @param secretKey Your Lava secret key
|
|
@@ -156,11 +164,12 @@ type RestConnection = {
|
|
|
156
164
|
};
|
|
157
165
|
type RestRequest = {
|
|
158
166
|
request_id: string;
|
|
167
|
+
status: "pending" | "completed" | "error";
|
|
159
168
|
connection_id?: string;
|
|
160
169
|
product_id?: string;
|
|
161
170
|
provider: string;
|
|
162
171
|
provider_key_type: "managed" | "unmanaged";
|
|
163
|
-
model
|
|
172
|
+
model?: string;
|
|
164
173
|
endpoint: string;
|
|
165
174
|
response_id?: string;
|
|
166
175
|
model_usage: {
|
|
@@ -202,7 +211,7 @@ type RestRequest = {
|
|
|
202
211
|
total_wallet_cost: string;
|
|
203
212
|
total_merchant_cost: string;
|
|
204
213
|
metadata: Record<string, string>;
|
|
205
|
-
timestamp
|
|
214
|
+
timestamp?: string;
|
|
206
215
|
created_at: string;
|
|
207
216
|
};
|
|
208
217
|
type RestUsage = {
|
package/dist/index.js
CHANGED
|
@@ -208,6 +208,8 @@ var Lava = class {
|
|
|
208
208
|
this.xaiUrl = `${this.baseUrl}forward?u=https://api.x.ai/v1`;
|
|
209
209
|
this.googleUrl = `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta`;
|
|
210
210
|
this.googleOpenaiCompatibleUrl = `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta/openai`;
|
|
211
|
+
this.klusterUrl = `${this.baseUrl}forward?u=https://api.kluster.ai/v1`;
|
|
212
|
+
this.inferenceUrl = `${this.baseUrl}forward?u=https://api.inference.net/v1`;
|
|
211
213
|
}
|
|
212
214
|
/**
|
|
213
215
|
* Make a request to the Lava API
|
package/dist/index.mjs
CHANGED
|
@@ -181,6 +181,8 @@ var Lava = class {
|
|
|
181
181
|
this.xaiUrl = `${this.baseUrl}forward?u=https://api.x.ai/v1`;
|
|
182
182
|
this.googleUrl = `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta`;
|
|
183
183
|
this.googleOpenaiCompatibleUrl = `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta/openai`;
|
|
184
|
+
this.klusterUrl = `${this.baseUrl}forward?u=https://api.kluster.ai/v1`;
|
|
185
|
+
this.inferenceUrl = `${this.baseUrl}forward?u=https://api.inference.net/v1`;
|
|
184
186
|
}
|
|
185
187
|
/**
|
|
186
188
|
* Make a request to the Lava API
|