Skip to content

Commit

Permalink
feat: Bucket.getBucketReadQuota add monthly field
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 committed Apr 7, 2024
1 parent 159c01f commit c9ab316
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-suns-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bnb-chain/greenfield-js-sdk': patch
---

feat: `Bucket.getBucketReadQuota` add monthly field
2 changes: 2 additions & 0 deletions packages/js-sdk/src/api/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ export class Bucket implements IBucket {
freeQuota: Number(res.GetReadQuotaResult.SPFreeReadQuotaSize ?? '0'),
consumedQuota: Number(res.GetReadQuotaResult.ReadConsumedSize ?? '0'),
freeConsumedSize: Number(res.GetReadQuotaResult.FreeConsumedSize ?? '0'),
monthlyFreeQuota: Number(res.GetReadQuotaResult.MonthlyFreeQuota ?? '0'),
monthlyQuotaConsumedSize: Number(res.GetReadQuotaResult.MonthlyQuotaConsumedSize ?? '0'),
},
message: 'Get bucket read quota.',
statusCode: result.status,
Expand Down
4 changes: 4 additions & 0 deletions packages/js-sdk/src/types/sp/ReadQuota.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface ReadQuotaResponse {
SPFreeReadQuotaSize: number;
ReadConsumedSize: number;
FreeConsumedSize: number;
MonthlyFreeQuota: number;
MonthlyQuotaConsumedSize: number;
};
}

Expand All @@ -22,4 +24,6 @@ export interface IQuotaProps {
freeQuota: number;
consumedQuota: number;
freeConsumedSize: number;
monthlyFreeQuota: number;
monthlyQuotaConsumedSize: number;
}

0 comments on commit c9ab316

Please sign in to comment.