pingram 1.0.34-alpha.1559 → 1.0.34-alpha.1561
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/generated/src/apis/AccountApi.d.ts +8 -6
- package/dist/generated/src/apis/AccountApi.js +7 -4
- package/dist/generated/src/models/GetUsageHistoryQuery.d.ts +6 -0
- package/dist/generated/src/models/GetUsageHistoryQuery.js +4 -2
- package/dist/generated/src/models/GetUsageHistoryResponse.d.ts +1 -1
- package/dist/generated/src/models/GetUsageHistoryResponseItemsInner.d.ts +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ export interface ConfigureSupabaseSMTPRequest {
|
|
|
17
17
|
export interface GetUsageHistoryRequest {
|
|
18
18
|
startDate: string;
|
|
19
19
|
endDate: string;
|
|
20
|
+
groupBy?: string;
|
|
20
21
|
}
|
|
21
22
|
export interface ListInvoicesRequest {
|
|
22
23
|
limit?: number;
|
|
@@ -92,18 +93,19 @@ export interface AccountApiInterface {
|
|
|
92
93
|
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUsageResponse>;
|
|
93
94
|
/**
|
|
94
95
|
*
|
|
95
|
-
* @summary Get historical usage for the authenticated account over a date range.
|
|
96
|
+
* @summary Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
96
97
|
* @param {string} startDate Start date (YYYY-MM-DD) for the range
|
|
97
98
|
* @param {string} endDate End date (YYYY-MM-DD) for the range
|
|
99
|
+
* @param {string} [groupBy] calendar (UTC months, default) or billing (account billing cycles)
|
|
98
100
|
* @param {*} [options] Override http request option.
|
|
99
101
|
* @throws {RequiredError}
|
|
100
102
|
* @memberof AccountApiInterface
|
|
101
103
|
*/
|
|
102
104
|
getUsageHistoryRaw(requestParameters: GetUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUsageHistoryResponse>>;
|
|
103
105
|
/**
|
|
104
|
-
* Get historical usage for the authenticated account over a date range.
|
|
106
|
+
* Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
105
107
|
*/
|
|
106
|
-
getUsageHistory(startDate: string, endDate: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUsageHistoryResponse>;
|
|
108
|
+
getUsageHistory(startDate: string, endDate: string, groupBy?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUsageHistoryResponse>;
|
|
107
109
|
/**
|
|
108
110
|
*
|
|
109
111
|
* @summary List Stripe invoices for the authenticated account, newest first.
|
|
@@ -222,13 +224,13 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
222
224
|
*/
|
|
223
225
|
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUsageResponse>;
|
|
224
226
|
/**
|
|
225
|
-
* Get historical usage for the authenticated account over a date range.
|
|
227
|
+
* Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
226
228
|
*/
|
|
227
229
|
getUsageHistoryRaw(requestParameters: GetUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUsageHistoryResponse>>;
|
|
228
230
|
/**
|
|
229
|
-
* Get historical usage for the authenticated account over a date range.
|
|
231
|
+
* Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
230
232
|
*/
|
|
231
|
-
getUsageHistory(startDate: string, endDate: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUsageHistoryResponse>;
|
|
233
|
+
getUsageHistory(startDate: string, endDate: string, groupBy?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUsageHistoryResponse>;
|
|
232
234
|
/**
|
|
233
235
|
* List Stripe invoices for the authenticated account, newest first.
|
|
234
236
|
*/
|
|
@@ -259,7 +259,7 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
259
259
|
return await response.value();
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
|
-
* Get historical usage for the authenticated account over a date range.
|
|
262
|
+
* Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
263
263
|
*/
|
|
264
264
|
async getUsageHistoryRaw(requestParameters, initOverrides) {
|
|
265
265
|
if (requestParameters['startDate'] == null) {
|
|
@@ -275,6 +275,9 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
275
275
|
if (requestParameters['endDate'] != null) {
|
|
276
276
|
queryParameters['endDate'] = requestParameters['endDate'];
|
|
277
277
|
}
|
|
278
|
+
if (requestParameters['groupBy'] != null) {
|
|
279
|
+
queryParameters['groupBy'] = requestParameters['groupBy'];
|
|
280
|
+
}
|
|
278
281
|
const headerParameters = {};
|
|
279
282
|
if (this.configuration &&
|
|
280
283
|
(this.configuration.username !== undefined ||
|
|
@@ -314,10 +317,10 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
314
317
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetUsageHistoryResponseFromJSON)(jsonValue));
|
|
315
318
|
}
|
|
316
319
|
/**
|
|
317
|
-
* Get historical usage for the authenticated account over a date range.
|
|
320
|
+
* Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
318
321
|
*/
|
|
319
|
-
async getUsageHistory(startDate, endDate, initOverrides) {
|
|
320
|
-
const response = await this.getUsageHistoryRaw({ startDate: startDate, endDate: endDate }, initOverrides);
|
|
322
|
+
async getUsageHistory(startDate, endDate, groupBy, initOverrides) {
|
|
323
|
+
const response = await this.getUsageHistoryRaw({ startDate: startDate, endDate: endDate, groupBy: groupBy }, initOverrides);
|
|
321
324
|
return await response.value();
|
|
322
325
|
}
|
|
323
326
|
/**
|
|
@@ -27,6 +27,12 @@ export interface GetUsageHistoryQuery {
|
|
|
27
27
|
* @memberof GetUsageHistoryQuery
|
|
28
28
|
*/
|
|
29
29
|
endDate: string;
|
|
30
|
+
/**
|
|
31
|
+
* calendar = UTC calendar months (YYYY-MM). billing = account billing cycles (YYYY-MM-DD period start). Defaults to calendar.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof GetUsageHistoryQuery
|
|
34
|
+
*/
|
|
35
|
+
groupBy?: string;
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* Check if a given object implements the GetUsageHistoryQuery interface.
|
|
@@ -37,7 +37,8 @@ function GetUsageHistoryQueryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
39
39
|
startDate: json['startDate'],
|
|
40
|
-
endDate: json['endDate']
|
|
40
|
+
endDate: json['endDate'],
|
|
41
|
+
groupBy: json['groupBy'] == null ? undefined : json['groupBy']
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
function GetUsageHistoryQueryToJSON(json) {
|
|
@@ -49,6 +50,7 @@ function GetUsageHistoryQueryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
49
50
|
}
|
|
50
51
|
return {
|
|
51
52
|
startDate: value['startDate'],
|
|
52
|
-
endDate: value['endDate']
|
|
53
|
+
endDate: value['endDate'],
|
|
54
|
+
groupBy: value['groupBy']
|
|
53
55
|
};
|
|
54
56
|
}
|
|
@@ -17,7 +17,7 @@ import type { GetUsageHistoryResponseItemsInner } from './GetUsageHistoryRespons
|
|
|
17
17
|
*/
|
|
18
18
|
export interface GetUsageHistoryResponse {
|
|
19
19
|
/**
|
|
20
|
-
* Array of usage items, one per month in the
|
|
20
|
+
* Array of usage items, one per calendar month or billing cycle in the range
|
|
21
21
|
* @type {Array<GetUsageHistoryResponseItemsInner>}
|
|
22
22
|
* @memberof GetUsageHistoryResponse
|
|
23
23
|
*/
|
|
@@ -17,7 +17,7 @@ import type { GetUsageHistoryResponseItemsInnerCounts } from './GetUsageHistoryR
|
|
|
17
17
|
*/
|
|
18
18
|
export interface GetUsageHistoryResponseItemsInner {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* YYYY-MM for calendar months, or YYYY-MM-DD billing-period start.
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof GetUsageHistoryResponseItemsInner
|
|
23
23
|
*/
|
package/package.json
CHANGED