@flashbacktech/tsclient 0.4.65 → 0.4.67

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/index.cjs CHANGED
@@ -321,6 +321,20 @@ var OrganizationClient = class {
321
321
  });
322
322
  return unwrapData(res);
323
323
  }
324
+ /**
325
+ * Platform-admin only: one page of the service-wide org summary — per-org
326
+ * user/project/sandbox counts, trailing 7d/30d metered usage, billed-to-
327
+ * balance, lifetime purchases and current credit balance — searchable by
328
+ * name and pageable. Backs the admin Summary screen. Returns 403 unless the
329
+ * caller's home org is the configured ADMIN_ORGANIZATION.
330
+ */
331
+ async adminOrgSummary(query = {}) {
332
+ const res = await this.http.get(
333
+ "/admin/orgs/summary",
334
+ { query }
335
+ );
336
+ return unwrapData(res);
337
+ }
324
338
  /**
325
339
  * Platform-admin only: provision a new organization + founding owner and
326
340
  * email the owner an invite link. The invite-only counterpart to public
@@ -1471,6 +1485,13 @@ var PlatformAdminClient = class {
1471
1485
  });
1472
1486
  return unwrapData(res);
1473
1487
  }
1488
+ /** Models the aigateway currently exposes (for validating selection/pricing). */
1489
+ async listAvailableModels() {
1490
+ const res = await this.http.get(
1491
+ "/admin/available-models"
1492
+ );
1493
+ return unwrapData(res);
1494
+ }
1474
1495
  // --- Chat-model selection (bridged to cloud-agent) ---
1475
1496
  /** Current model selection (provider priority + per-provider/role models). */
1476
1497
  async getModelSelection() {
@@ -1497,7 +1518,7 @@ var PlatformAdminClient = class {
1497
1518
  );
1498
1519
  return unwrapData(res).pricing ?? [];
1499
1520
  }
1500
- /** Upsert one model_pricing row. Returns the fresh list. */
1521
+ /** Upsert one model_pricing row (also used to add a new row). Returns the fresh list. */
1501
1522
  async putModelPricing(row) {
1502
1523
  const res = await this.http.put(
1503
1524
  "/admin/model-pricing",
@@ -1505,6 +1526,13 @@ var PlatformAdminClient = class {
1505
1526
  );
1506
1527
  return unwrapData(res).pricing ?? [];
1507
1528
  }
1529
+ /** Delete a model_pricing row by model id. Returns the fresh list. */
1530
+ async deleteModelPricing(model) {
1531
+ const res = await this.http.delete(
1532
+ `/admin/model-pricing?model=${encodeURIComponent(model)}`
1533
+ );
1534
+ return unwrapData(res).pricing ?? [];
1535
+ }
1508
1536
  };
1509
1537
 
1510
1538
  // src/client.ts