ts / dist / cjs / credits.d.ts
213 words
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/** Credit balance, ledger history and current usage prices. */
import type { Client } from './client.js';
import type { Query } from './types.js';
/** GET /credits/balance — Credit balance. */
export declare const balance: (client: Client) => Promise<{
    balances: {
        balance: string;
        credit_type: string;
    }[];
    spend: {
        avg_per_day: string;
        runway_days: number | null;
        total: string;
        window_days: number;
    };
    total: string;
}>;
/** GET /credits/ledger — Credit ledger history (cursor-paginated). */
export declare const ledger: (client: Client, query?: Query<"/credits/ledger", "get">) => Promise<{
    entries: {
        amount: string;
        balance_after: string;
        created_at: string;
        credit_type: string;
        id: string;
        invoice_id?: string | null;
        kind: "grant" | "purchase" | "charge" | "adjustment" | "refund" | "expiry";
        reason: string | null;
        seq: number;
    }[];
    next_cursor: number | null;
}>;
/** Every ledger entry, following cursor pagination. */
export declare const ledgerAll: (client: Client, query?: Query<"/credits/ledger", "get">) => Promise<readonly {
    amount: string;
    balance_after: string;
    created_at: string;
    credit_type: string;
    id: string;
    invoice_id?: string | null;
    kind: "grant" | "purchase" | "charge" | "adjustment" | "refund" | "expiry";
    reason: string | null;
    seq: number;
}[]>;
/** GET /credits/prices — Current usage prices (decimal strings). */
export declare const prices: (client: Client) => Promise<{
    created_at: string;
    prices: {
        [key: string]: {
            [key: string]: unknown;
        };
    };
    registrar: {
        max_years: number;
    };
    version: number;
}>;

static mirror of HEAD · about · clone: git clone https://ird.cod-sursa.ro/ts.git