@lavapayments/nodejs 4.0.1 → 5.0.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/index.d.mts CHANGED
@@ -37,41 +37,21 @@ declare class Lava {
37
37
  */
38
38
  readonly usage: Resources.UsageResource;
39
39
  /**
40
- * OpenAI base URL for convenience
40
+ * Provider URLs for convenience
41
41
  */
42
- readonly openaiUrl: string;
43
- /**
44
- * Anthropic base URL for convenience
45
- */
46
- readonly anthropicUrl: string;
47
- /**
48
- * Mistral base URL for convenience
49
- */
50
- readonly mistralUrl: string;
51
- /**
52
- * DeepSeek base URL for convenience
53
- */
54
- readonly deepseekUrl: string;
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
package/dist/index.d.ts CHANGED
@@ -37,41 +37,21 @@ declare class Lava {
37
37
  */
38
38
  readonly usage: Resources.UsageResource;
39
39
  /**
40
- * OpenAI base URL for convenience
40
+ * Provider URLs for convenience
41
41
  */
42
- readonly openaiUrl: string;
43
- /**
44
- * Anthropic base URL for convenience
45
- */
46
- readonly anthropicUrl: string;
47
- /**
48
- * Mistral base URL for convenience
49
- */
50
- readonly mistralUrl: string;
51
- /**
52
- * DeepSeek base URL for convenience
53
- */
54
- readonly deepseekUrl: string;
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
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.openaiUrl = `${this.baseUrl}forward?u=https://api.openai.com/v1`;
205
- this.anthropicUrl = `${this.baseUrl}forward?u=https://api.anthropic.com/v1`;
206
- this.mistralUrl = `${this.baseUrl}forward?u=https://api.mistral.ai/v1`;
207
- this.deepseekUrl = `${this.baseUrl}forward?u=https://api.deepseek.com/v1`;
208
- this.xaiUrl = `${this.baseUrl}forward?u=https://api.x.ai/v1`;
209
- this.googleUrl = `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta`;
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`;
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.openaiUrl = `${this.baseUrl}forward?u=https://api.openai.com/v1`;
178
- this.anthropicUrl = `${this.baseUrl}forward?u=https://api.anthropic.com/v1`;
179
- this.mistralUrl = `${this.baseUrl}forward?u=https://api.mistral.ai/v1`;
180
- this.deepseekUrl = `${this.baseUrl}forward?u=https://api.deepseek.com/v1`;
181
- this.xaiUrl = `${this.baseUrl}forward?u=https://api.x.ai/v1`;
182
- this.googleUrl = `${this.baseUrl}forward?u=https://generativelanguage.googleapis.com/v1beta`;
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`;
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lavapayments/nodejs",
3
- "version": "4.0.1",
3
+ "version": "5.0.0",
4
4
  "description": "Backend SDK for Lava Payments API - enabling usage-based billing for AI services",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",