Skip to content

Commit bc4ebcb

Browse files
billing
1 parent cce8314 commit bc4ebcb

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@shipstatic/types",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Shared types for Shipstatic platform",
55
"type": "module",
66
"main": "./dist/index.js",

src/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,14 @@ export const AccountPlan = {
260260

261261
export type AccountPlanType = typeof AccountPlan[keyof typeof AccountPlan];
262262

263+
/**
264+
* Account usage metrics — always available regardless of billing provider.
265+
*/
266+
export interface AccountUsage {
267+
/** Number of active custom domains (excludes paused) */
268+
customDomains: number;
269+
}
270+
263271
/**
264272
* Core account object - used in both API responses and SDK
265273
* All fields are readonly to prevent accidental mutations
@@ -273,6 +281,8 @@ export interface Account {
273281
readonly picture: string | null;
274282
/** Account plan status */
275283
readonly plan: AccountPlanType;
284+
/** Account usage metrics (custom domains, etc.) */
285+
readonly usage: AccountUsage;
276286
/** Unix timestamp (seconds) when account was created */
277287
readonly created: number;
278288
/** Unix timestamp (seconds) when account was activated (first deployment), null if not yet activated */
@@ -871,8 +881,6 @@ export interface BillingStatus {
871881
billing: string | null;
872882
/** Number of billing units (1 unit = 1 custom domain), null if no billing */
873883
units: number | null;
874-
/** Number of custom domains currently in use, null if no billing */
875-
usage: number | null;
876884
/** Billing status from Creem (active, trialing, canceled, etc.), null if no billing */
877885
status: string | null;
878886
/** Link to Creem customer portal for billing management, null if unavailable */

0 commit comments

Comments
 (0)