@lavapayments/nodejs 1.0.2 → 2.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/README.md +2 -2
- package/dist/index.d.mts +19 -8
- package/dist/index.d.ts +19 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ npm install @lavapayments/nodejs
|
|
|
16
16
|
import { Lava } from '@lavapayments/nodejs';
|
|
17
17
|
|
|
18
18
|
const lava = new Lava('your_secret_key', {
|
|
19
|
-
apiVersion: '2025-03-
|
|
19
|
+
apiVersion: '2025-03-27.v1',
|
|
20
20
|
});
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -42,7 +42,7 @@ const forwardToken = lava.generateForwardToken({
|
|
|
42
42
|
product_secret: 'product_secret',
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
// Use the token to make an API request through Lava
|
|
45
|
+
// Use the token to make an API request through Lava
|
|
46
46
|
const response = await fetch(lava.openaiUrl, {
|
|
47
47
|
method: 'POST',
|
|
48
48
|
headers: {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ApiVersion = "2025-03-
|
|
1
|
+
type ApiVersion = "2025-03-27.v1";
|
|
2
2
|
interface Config {
|
|
3
3
|
apiVersion: ApiVersion;
|
|
4
4
|
/**
|
|
@@ -110,6 +110,7 @@ interface Wallet {
|
|
|
110
110
|
}
|
|
111
111
|
interface Connection {
|
|
112
112
|
connection_id: string;
|
|
113
|
+
connection_secret: string;
|
|
113
114
|
reference_id?: string;
|
|
114
115
|
wallet: Wallet;
|
|
115
116
|
next_usage_reset: string;
|
|
@@ -177,13 +178,23 @@ interface RequestsListResponse {
|
|
|
177
178
|
next_cursor?: string;
|
|
178
179
|
}
|
|
179
180
|
interface UsageData {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
items: {
|
|
182
|
+
date: string;
|
|
183
|
+
total_requests: number;
|
|
184
|
+
total_usage_tokens: number;
|
|
185
|
+
total_usage_cost: string;
|
|
186
|
+
total_fee_amount: string;
|
|
187
|
+
total_service_charge_amount: string;
|
|
188
|
+
total_request_cost: string;
|
|
189
|
+
}[];
|
|
190
|
+
totals: {
|
|
191
|
+
total_requests: number;
|
|
192
|
+
total_usage_tokens: number;
|
|
193
|
+
total_usage_cost: string;
|
|
194
|
+
total_fee_amount: string;
|
|
195
|
+
total_service_charge_amount: string;
|
|
196
|
+
total_request_cost: string;
|
|
197
|
+
};
|
|
187
198
|
}
|
|
188
199
|
interface UsageParams {
|
|
189
200
|
start: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type ApiVersion = "2025-03-
|
|
1
|
+
type ApiVersion = "2025-03-27.v1";
|
|
2
2
|
interface Config {
|
|
3
3
|
apiVersion: ApiVersion;
|
|
4
4
|
/**
|
|
@@ -110,6 +110,7 @@ interface Wallet {
|
|
|
110
110
|
}
|
|
111
111
|
interface Connection {
|
|
112
112
|
connection_id: string;
|
|
113
|
+
connection_secret: string;
|
|
113
114
|
reference_id?: string;
|
|
114
115
|
wallet: Wallet;
|
|
115
116
|
next_usage_reset: string;
|
|
@@ -177,13 +178,23 @@ interface RequestsListResponse {
|
|
|
177
178
|
next_cursor?: string;
|
|
178
179
|
}
|
|
179
180
|
interface UsageData {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
items: {
|
|
182
|
+
date: string;
|
|
183
|
+
total_requests: number;
|
|
184
|
+
total_usage_tokens: number;
|
|
185
|
+
total_usage_cost: string;
|
|
186
|
+
total_fee_amount: string;
|
|
187
|
+
total_service_charge_amount: string;
|
|
188
|
+
total_request_cost: string;
|
|
189
|
+
}[];
|
|
190
|
+
totals: {
|
|
191
|
+
total_requests: number;
|
|
192
|
+
total_usage_tokens: number;
|
|
193
|
+
total_usage_cost: string;
|
|
194
|
+
total_fee_amount: string;
|
|
195
|
+
total_service_charge_amount: string;
|
|
196
|
+
total_request_cost: string;
|
|
197
|
+
};
|
|
187
198
|
}
|
|
188
199
|
interface UsageParams {
|
|
189
200
|
start: string;
|