UNPKG

reduct-js

Version:

ReductStore Client SDK for Javascript/NodeJS/Typescript

30 lines (29 loc) 711 B
import { Status, parseStatus } from "./Status.js"; //#region src/messages/BucketInfo.ts /** * Represents information about a bucket */ var BucketInfo = class { constructor() { this.name = ""; this.entryCount = 0n; this.size = 0n; this.oldestRecord = 0n; this.latestRecord = 0n; this.isProvisioned = false; this.status = Status.READY; } static parse(bucket) { return { name: bucket.name, entryCount: BigInt(bucket.entry_count), size: BigInt(bucket.size), oldestRecord: BigInt(bucket.oldest_record), latestRecord: BigInt(bucket.latest_record), isProvisioned: bucket.is_provisioned ?? false, status: parseStatus(bucket.status) }; } }; //#endregion export { BucketInfo };