Skip to content

Commit 10f7f39

Browse files
committed
Update release
1 parent 47f342d commit 10f7f39

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,9 @@ const fakeData = await client.fakeData.generate(query)
316316
},
317317
],
318318
"tokenStatus": {
319+
"tokensConsumedForRequest": 5000, // Indicates the number of tokens consumed for the request
319320
"tokensOverflow": 0, // Indicates the number of token that overflowed the plan
320-
"tokenLimit": 500, // Number of token per month included in the plan
321+
"tokenLimit": 25000, // Number of token per month included in the plan
321322
"tokenRemaining": 500, // Number of token remaining
322323
"tokenResetDate": "Sat, 17 Jun 2023 08:17:07 GMT" // Indicates the date for the token reset
323324
}

src/fake-data/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export class FakeData extends Base {
5252
return {
5353
data: body.data,
5454
tokenStatus: {
55+
tokensConsumedForRequest: parseInt(headers.get('x-tokens-consumed-for-request')),
5556
tokensOverflow: parseInt(headers.get('x-tokens-overflow')),
5657
tokenLimit: parseInt(headers.get('x-token-limit')),
5758
tokenRemaining: parseInt(headers.get('x-token-remaining')),

src/fake-data/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface IFakeDataQuery {
99
}
1010

1111
export interface ITokenStatus {
12+
tokensConsumedForRequest?: number,
1213
tokensOverflow: number,
1314
tokenLimit: number,
1415
tokenRemaining: number,

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { FakeData } from './fake-data';
22
import { Schema } from './schema';
3-
import {Language, Context, SchemaType } from "./types";
3+
import { IFakeDataQuery, ITokenStatus } from "./fake-data/types";
4+
import { ISchemaQuery, ISchemaParams, ISchema } from "./schema/types";
5+
import { Language, Context, SchemaType } from "./types";
46
import { BadRequestError, TooManyRequestsError, InvalidAuthorization, PaymentRequired } from "./errors";
57

68
export class Client {
@@ -19,4 +21,6 @@ export class Client {
1921
}
2022

2123
export { Language, Context, SchemaType };
22-
export { BadRequestError, TooManyRequestsError, InvalidAuthorization, PaymentRequired }
24+
export { BadRequestError, TooManyRequestsError, InvalidAuthorization, PaymentRequired }
25+
export { IFakeDataQuery, ITokenStatus };
26+
export { ISchemaQuery, ISchemaParams, ISchema };

0 commit comments

Comments
 (0)