@myapihq/sdk 1.0.25 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hq.d.ts CHANGED
@@ -55,22 +55,19 @@ export declare function getOrg(apiKey: string, orgId: string): Promise<Org>;
55
55
  export declare function updateOrg(apiKey: string, orgId: string, payload: Partial<OrgPayload>): Promise<Org>;
56
56
  export declare function deleteOrg(apiKey: string, orgId: string): Promise<void>;
57
57
  export declare function getBalance(apiKey: string): Promise<{
58
- balance_cents: number;
59
58
  balance_display: string;
60
- credits_cents: number;
61
59
  credits_display: string;
62
60
  has_payment_method: boolean;
63
61
  }>;
64
62
  export declare function getBillingHistory(apiKey: string): Promise<{
65
63
  type: string;
66
- amount_cents: number;
64
+ amount_display: string;
67
65
  status: string;
68
66
  created_at: string;
69
67
  }[]>;
70
68
  export declare function setupPayment(apiKey: string): Promise<{
71
69
  url: string;
72
70
  }>;
73
- export declare function topUp(apiKey: string, amountCents: number): Promise<{
74
- new_balance_cents: number;
71
+ export declare function topUp(apiKey: string, amountDollars: number): Promise<{
75
72
  new_balance_display: string;
76
73
  }>;
package/dist/hq.js CHANGED
@@ -59,6 +59,6 @@ async function getBillingHistory(apiKey) {
59
59
  async function setupPayment(apiKey) {
60
60
  return (0, client_1.request)('POST', `${BASE_URL}/hq/billing/setup-payment`, apiKey);
61
61
  }
62
- async function topUp(apiKey, amountCents) {
63
- return (0, client_1.request)('POST', `${BASE_URL}/hq/billing/topup`, apiKey, { amount_cents: amountCents });
62
+ async function topUp(apiKey, amountDollars) {
63
+ return (0, client_1.request)('POST', `${BASE_URL}/hq/billing/topup`, apiKey, { amount_dollars: amountDollars });
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
- "version": "1.0.25",
3
+ "version": "1.0.29",
4
4
  "description": "TypeScript SDK for the MyAPI ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/hq.ts CHANGED
@@ -77,11 +77,11 @@ export async function deleteOrg(apiKey: string, orgId: string): Promise<void> {
77
77
  return request('DELETE', `${BASE_URL}/hq/orgs/${encodeURIComponent(orgId)}`, apiKey);
78
78
  }
79
79
 
80
- export async function getBalance(apiKey: string): Promise<{ balance_cents: number; balance_display: string; credits_cents: number; credits_display: string; has_payment_method: boolean }> {
80
+ export async function getBalance(apiKey: string): Promise<{ balance_display: string; credits_display: string; has_payment_method: boolean }> {
81
81
  return request('GET', `${BASE_URL}/hq/billing/balance`, apiKey);
82
82
  }
83
83
 
84
- export async function getBillingHistory(apiKey: string): Promise<{ type: string; amount_cents: number; status: string; created_at: string }[]> {
84
+ export async function getBillingHistory(apiKey: string): Promise<{ type: string; amount_display: string; status: string; created_at: string; }[]> {
85
85
  return request('GET', `${BASE_URL}/hq/billing/history`, apiKey);
86
86
  }
87
87
 
@@ -89,6 +89,6 @@ export async function setupPayment(apiKey: string): Promise<{ url: string }> {
89
89
  return request('POST', `${BASE_URL}/hq/billing/setup-payment`, apiKey);
90
90
  }
91
91
 
92
- export async function topUp(apiKey: string, amountCents: number): Promise<{ new_balance_cents: number; new_balance_display: string }> {
93
- return request('POST', `${BASE_URL}/hq/billing/topup`, apiKey, { amount_cents: amountCents });
92
+ export async function topUp(apiKey: string, amountDollars: number): Promise<{ new_balance_display: string }> {
93
+ return request('POST', `${BASE_URL}/hq/billing/topup`, apiKey, { amount_dollars: amountDollars });
94
94
  }