@lavapayments/nodejs 4.0.1 → 5.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/dist/index.d.mts +15 -34
- package/dist/index.d.ts +15 -34
- package/dist/index.js +13 -9
- package/dist/index.mjs +13 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -37,41 +37,21 @@ declare class Lava {
|
|
|
37
37
|
*/
|
|
38
38
|
readonly usage: Resources.UsageResource;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Provider URLs for convenience
|
|
41
41
|
*/
|
|
42
|
-
readonly
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* xAI base URL for convenience
|
|
57
|
-
*/
|
|
58
|
-
readonly xaiUrl: string;
|
|
59
|
-
/**
|
|
60
|
-
* Google base URL for convenience
|
|
61
|
-
*/
|
|
62
|
-
readonly googleUrl: string;
|
|
63
|
-
/**
|
|
64
|
-
* Google OpenAI-compatible base URL for convenience
|
|
65
|
-
*/
|
|
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;
|
|
42
|
+
readonly providers: {
|
|
43
|
+
openai: string;
|
|
44
|
+
anthropic: string;
|
|
45
|
+
mistral: string;
|
|
46
|
+
deepseek: string;
|
|
47
|
+
xai: string;
|
|
48
|
+
google: string;
|
|
49
|
+
googleOpenaiCompatible: string;
|
|
50
|
+
kluster: string;
|
|
51
|
+
inference: string;
|
|
52
|
+
groq: string;
|
|
53
|
+
novita: string;
|
|
54
|
+
};
|
|
75
55
|
/**
|
|
76
56
|
* Create a new Lava client
|
|
77
57
|
* @param secretKey Your Lava secret key
|
|
@@ -157,6 +137,7 @@ type RestConnection = {
|
|
|
157
137
|
email: string;
|
|
158
138
|
first_name: string;
|
|
159
139
|
last_name: string;
|
|
140
|
+
autopay_enabled: boolean;
|
|
160
141
|
};
|
|
161
142
|
next_usage_reset: string;
|
|
162
143
|
previous_usage_reset: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -37,41 +37,21 @@ declare class Lava {
|
|
|
37
37
|
*/
|
|
38
38
|
readonly usage: Resources.UsageResource;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Provider URLs for convenience
|
|
41
41
|
*/
|
|
42
|
-
readonly
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* xAI base URL for convenience
|
|
57
|
-
*/
|
|
58
|
-
readonly xaiUrl: string;
|
|
59
|
-
/**
|
|
60
|
-
* Google base URL for convenience
|
|
61
|
-
*/
|
|
62
|
-
readonly googleUrl: string;
|
|
63
|
-
/**
|
|
64
|
-
* Google OpenAI-compatible base URL for convenience
|
|
65
|
-
*/
|
|
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;
|
|
42
|
+
readonly providers: {
|
|
43
|
+
openai: string;
|
|
44
|
+
anthropic: string;
|
|
45
|
+
mistral: string;
|
|
46
|
+
deepseek: string;
|
|
47
|
+
xai: string;
|
|
48
|
+
google: string;
|
|
49
|
+
googleOpenaiCompatible: string;
|
|
50
|
+
kluster: string;
|
|
51
|
+
inference: string;
|
|
52
|
+
groq: string;
|
|
53
|
+
novita: string;
|
|
54
|
+
};
|
|
75
55
|
/**
|
|
76
56
|
* Create a new Lava client
|
|
77
57
|
* @param secretKey Your Lava secret key
|
|
@@ -157,6 +137,7 @@ type RestConnection = {
|
|
|
157
137
|
email: string;
|
|
158
138
|
first_name: string;
|
|
159
139
|
last_name: string;
|
|
140
|
+
autopay_enabled: boolean;
|
|
160
141
|
};
|
|
161
142
|
next_usage_reset: string;
|
|
162
143
|
previous_usage_reset: string;
|
package/dist/index.js
CHANGED
|
@@ -201,15 +201,19 @@ var Lava = class {
|
|
|
201
201
|
this.connections = new Resources.ConnectionsResource(this);
|
|
202
202
|
this.requests = new Resources.RequestsResource(this);
|
|
203
203
|
this.usage = new Resources.UsageResource(this);
|
|
204
|
-
this.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
204
|
+
this.providers = {
|
|
205
|
+
openai: `${this.baseUrl}forward?u=https://api.openai.com/v1`,
|
|
206
|
+
anthropic: `${this.baseUrl}forward?u=https://api.anthropic.com/v1`,
|
|
207
|
+
mistral: `${this.baseUrl}forward?u=https://api.mistral.ai/v1`,
|
|
208
|
+
deepseek: `${this.baseUrl}forward?u=https://api.deepseek.com/v1`,
|
|
209
|
+
xai: `${this.baseUrl}forward?u=https://api.x.ai/v1`,
|
|
210
|
+
google: `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta`,
|
|
211
|
+
googleOpenaiCompatible: `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta/openai`,
|
|
212
|
+
kluster: `${this.baseUrl}forward?u=https://api.kluster.ai/v1`,
|
|
213
|
+
inference: `${this.baseUrl}forward?u=https://api.inference.net/v1`,
|
|
214
|
+
groq: `${this.baseUrl}forward?u=https://api.groq.com/openai/v1`,
|
|
215
|
+
novita: `${this.baseUrl}forward?u=https://api.novita.ai/v3/openai`
|
|
216
|
+
};
|
|
213
217
|
}
|
|
214
218
|
/**
|
|
215
219
|
* Make a request to the Lava API
|
package/dist/index.mjs
CHANGED
|
@@ -174,15 +174,19 @@ var Lava = class {
|
|
|
174
174
|
this.connections = new Resources.ConnectionsResource(this);
|
|
175
175
|
this.requests = new Resources.RequestsResource(this);
|
|
176
176
|
this.usage = new Resources.UsageResource(this);
|
|
177
|
-
this.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
this.providers = {
|
|
178
|
+
openai: `${this.baseUrl}forward?u=https://api.openai.com/v1`,
|
|
179
|
+
anthropic: `${this.baseUrl}forward?u=https://api.anthropic.com/v1`,
|
|
180
|
+
mistral: `${this.baseUrl}forward?u=https://api.mistral.ai/v1`,
|
|
181
|
+
deepseek: `${this.baseUrl}forward?u=https://api.deepseek.com/v1`,
|
|
182
|
+
xai: `${this.baseUrl}forward?u=https://api.x.ai/v1`,
|
|
183
|
+
google: `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta`,
|
|
184
|
+
googleOpenaiCompatible: `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta/openai`,
|
|
185
|
+
kluster: `${this.baseUrl}forward?u=https://api.kluster.ai/v1`,
|
|
186
|
+
inference: `${this.baseUrl}forward?u=https://api.inference.net/v1`,
|
|
187
|
+
groq: `${this.baseUrl}forward?u=https://api.groq.com/openai/v1`,
|
|
188
|
+
novita: `${this.baseUrl}forward?u=https://api.novita.ai/v3/openai`
|
|
189
|
+
};
|
|
186
190
|
}
|
|
187
191
|
/**
|
|
188
192
|
* Make a request to the Lava API
|