@lavapayments/nodejs 2.0.0 → 2.1.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 +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/index.mjs +8 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -163,6 +163,7 @@ interface Request {
|
|
|
163
163
|
fee: Fee;
|
|
164
164
|
service_charge: ServiceCharge;
|
|
165
165
|
total_request_cost: string;
|
|
166
|
+
metadata: Record<string, string>;
|
|
166
167
|
timestamp: string;
|
|
167
168
|
created_at: string;
|
|
168
169
|
}
|
|
@@ -171,6 +172,7 @@ interface RequestsListParams {
|
|
|
171
172
|
limit?: number;
|
|
172
173
|
connection_id?: string;
|
|
173
174
|
product_id?: string;
|
|
175
|
+
metadata_filters?: Record<string, string>;
|
|
174
176
|
}
|
|
175
177
|
interface RequestsListResponse {
|
|
176
178
|
data: Request[];
|
|
@@ -201,6 +203,7 @@ interface UsageParams {
|
|
|
201
203
|
end?: string;
|
|
202
204
|
connection_id?: string;
|
|
203
205
|
product_id?: string;
|
|
206
|
+
metadata_filters?: Record<string, string>;
|
|
204
207
|
}
|
|
205
208
|
type Usage = UsageData[];
|
|
206
209
|
|
package/dist/index.d.ts
CHANGED
|
@@ -163,6 +163,7 @@ interface Request {
|
|
|
163
163
|
fee: Fee;
|
|
164
164
|
service_charge: ServiceCharge;
|
|
165
165
|
total_request_cost: string;
|
|
166
|
+
metadata: Record<string, string>;
|
|
166
167
|
timestamp: string;
|
|
167
168
|
created_at: string;
|
|
168
169
|
}
|
|
@@ -171,6 +172,7 @@ interface RequestsListParams {
|
|
|
171
172
|
limit?: number;
|
|
172
173
|
connection_id?: string;
|
|
173
174
|
product_id?: string;
|
|
175
|
+
metadata_filters?: Record<string, string>;
|
|
174
176
|
}
|
|
175
177
|
interface RequestsListResponse {
|
|
176
178
|
data: Request[];
|
|
@@ -201,6 +203,7 @@ interface UsageParams {
|
|
|
201
203
|
end?: string;
|
|
202
204
|
connection_id?: string;
|
|
203
205
|
product_id?: string;
|
|
206
|
+
metadata_filters?: Record<string, string>;
|
|
204
207
|
}
|
|
205
208
|
type Usage = UsageData[];
|
|
206
209
|
|
package/dist/index.js
CHANGED
|
@@ -112,6 +112,10 @@ var Resources;
|
|
|
112
112
|
if (params.connection_id)
|
|
113
113
|
queryParams.connection_id = params.connection_id;
|
|
114
114
|
if (params.product_id) queryParams.product_id = params.product_id;
|
|
115
|
+
if (params.metadata_filters)
|
|
116
|
+
queryParams.metadata_filters = JSON.stringify(
|
|
117
|
+
Object.entries(params.metadata_filters)
|
|
118
|
+
);
|
|
115
119
|
}
|
|
116
120
|
return this.lava.request("GET", "requests", {
|
|
117
121
|
query: queryParams
|
|
@@ -141,6 +145,10 @@ var Resources;
|
|
|
141
145
|
if (params.connection_id)
|
|
142
146
|
queryParams.connection_id = params.connection_id;
|
|
143
147
|
if (params.product_id) queryParams.product_id = params.product_id;
|
|
148
|
+
if (params.metadata_filters)
|
|
149
|
+
queryParams.metadata_filters = JSON.stringify(
|
|
150
|
+
Object.entries(params.metadata_filters)
|
|
151
|
+
);
|
|
144
152
|
return this.lava.request("GET", "usage", {
|
|
145
153
|
query: queryParams
|
|
146
154
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -85,6 +85,10 @@ var Resources;
|
|
|
85
85
|
if (params.connection_id)
|
|
86
86
|
queryParams.connection_id = params.connection_id;
|
|
87
87
|
if (params.product_id) queryParams.product_id = params.product_id;
|
|
88
|
+
if (params.metadata_filters)
|
|
89
|
+
queryParams.metadata_filters = JSON.stringify(
|
|
90
|
+
Object.entries(params.metadata_filters)
|
|
91
|
+
);
|
|
88
92
|
}
|
|
89
93
|
return this.lava.request("GET", "requests", {
|
|
90
94
|
query: queryParams
|
|
@@ -114,6 +118,10 @@ var Resources;
|
|
|
114
118
|
if (params.connection_id)
|
|
115
119
|
queryParams.connection_id = params.connection_id;
|
|
116
120
|
if (params.product_id) queryParams.product_id = params.product_id;
|
|
121
|
+
if (params.metadata_filters)
|
|
122
|
+
queryParams.metadata_filters = JSON.stringify(
|
|
123
|
+
Object.entries(params.metadata_filters)
|
|
124
|
+
);
|
|
117
125
|
return this.lava.request("GET", "usage", {
|
|
118
126
|
query: queryParams
|
|
119
127
|
});
|