@myapihq/sdk 2.29.1 → 2.30.0

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
@@ -162,6 +162,23 @@ export declare function updateOrg(apiKey: string, orgId: string, payload: Partia
162
162
  export declare function deleteOrg(apiKey: string, orgId: string, opts?: {
163
163
  confirm?: boolean;
164
164
  }): Promise<void>;
165
+ export interface PriceRow {
166
+ key: string;
167
+ cents: number;
168
+ unit: string;
169
+ description: string;
170
+ updated_at?: string;
171
+ }
172
+ /**
173
+ * The platform's price list: what each metered operation costs, per unit.
174
+ *
175
+ * Worth having in a client because the interesting question is asked BEFORE
176
+ * spending, not after. `billing usage` says what a month cost; this says what
177
+ * the next call will.
178
+ */
179
+ export declare function getPricing(apiKey: string): Promise<{
180
+ prices: PriceRow[];
181
+ }>;
165
182
  export declare function getBalance(apiKey: string): Promise<{
166
183
  balance_display: string;
167
184
  credits_display: string;
package/dist/hq.js CHANGED
@@ -24,6 +24,7 @@ exports.listOrgs = listOrgs;
24
24
  exports.getOrg = getOrg;
25
25
  exports.updateOrg = updateOrg;
26
26
  exports.deleteOrg = deleteOrg;
27
+ exports.getPricing = getPricing;
27
28
  exports.getBalance = getBalance;
28
29
  exports.getBillingHistory = getBillingHistory;
29
30
  exports.getBillingUsage = getBillingUsage;
@@ -37,6 +38,7 @@ exports.setAccountDefaultOrg = setAccountDefaultOrg;
37
38
  const client_1 = require("./client");
38
39
  const config_1 = require("./config");
39
40
  exports.EXPOSES = [
41
+ 'GET /hq/pricing',
40
42
  'PATCH /hq/account/default-org',
41
43
  'POST /hq/account/anonymous',
42
44
  'POST /hq/account/send-code',
@@ -197,6 +199,16 @@ async function deleteOrg(apiKey, orgId, opts) {
197
199
  const q = opts?.confirm ? `?confirm=${encodeURIComponent(orgId)}` : '';
198
200
  return (0, client_1.request)('DELETE', `${config_1.HQ_BASE}/hq/orgs/${encodeURIComponent(orgId)}${q}`, apiKey);
199
201
  }
202
+ /**
203
+ * The platform's price list: what each metered operation costs, per unit.
204
+ *
205
+ * Worth having in a client because the interesting question is asked BEFORE
206
+ * spending, not after. `billing usage` says what a month cost; this says what
207
+ * the next call will.
208
+ */
209
+ async function getPricing(apiKey) {
210
+ return (0, client_1.request)('GET', `${config_1.HQ_BASE}/hq/pricing`, apiKey);
211
+ }
200
212
  async function getBalance(apiKey) {
201
213
  return (0, client_1.request)('GET', `${config_1.HQ_BASE}/hq/billing/balance`, apiKey);
202
214
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.29.1";
1
+ export declare const SDK_VERSION = "2.30.0";
package/dist/version.js CHANGED
@@ -8,4 +8,4 @@ exports.SDK_VERSION = void 0;
8
8
  // Why a constant and not a package.json read: the SDK runs inside edge
9
9
  // functions (Cloudflare Workers), so it must not import node:fs. A literal
10
10
  // is the only version source that works in every runtime we ship to.
11
- exports.SDK_VERSION = '2.29.1';
11
+ exports.SDK_VERSION = '2.30.0';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "2.29.1",
4
+ "version": "2.30.0",
5
5
  "description": "TypeScript SDK for the MyAPI ecosystem",
6
6
  "repository": {
7
7
  "type": "git",