JSPM

@usequota/types

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q55025F
  • License MIT

Shared TypeScript types for the Quota AI credit billing SDK

Package Exports

  • @usequota/types

Readme

@usequota/types

Shared TypeScript types for the Quota AI credit billing SDK.

Billing Model

All monetary values are stored in micro-dollars (1 unit = $0.000001, stored as BIGINT). To convert to USD: amount / 1_000_000.

Installation

npm install @usequota/types

Usage

import type { QuotaUser, CreditPackage } from "@usequota/types";

Types

  • QuotaUser — authenticated user with balance (micro-dollars)
  • CreditPackage — purchasable credit package (micro-dollars)
  • QuotaSession — user session information for OAuth flows
  • QuotaError — standardized API error format
  • ToolCall — tool/function call information
  • ChatMessage — chat message in OpenAI-compatible format
  • Tool — tool/function definition for function calling
  • ChatCompletionRequest — chat completion request (multi-provider)
  • QuotaMetadata — billing metadata in API responses (micro-dollars)
  • ChatCompletionResponse — chat completion response with billing info

License

MIT