@madewithremy/admin 0.1.35 → 0.1.37

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/README.md CHANGED
@@ -25,7 +25,7 @@ Configuration is read from the environment and the workspace — there are no co
25
25
  | Source | Meaning |
26
26
  |---|---|
27
27
  | `MINDSTUDIO_API_KEY` | Org-scoped `sk_` API key (required) |
28
- | `MINDSTUDIO_BASE_URL` | API origin (default `https://api.mindstudio.ai`) |
28
+ | `MINDSTUDIO_BASE_URL` | API origin (default `https://v1.mindstudio-api.com`) |
29
29
  | `WORKSPACE_DIR` | Workspace root (default `/home/vercel-sandbox/workspace`) |
30
30
  | `${WORKSPACE_DIR}/mindstudio.json` | `appId` — which app the CLI manages |
31
31
  | `REMY_SIDECAR_URL` | Sandbox sidecar for `qa-recordings export` (default `http://127.0.0.1:4388`) |
package/dist/index.d.ts CHANGED
@@ -3548,7 +3548,7 @@ declare function get$7(ctx: AdminContext, params: JobIdParams): Promise<DataSour
3548
3548
  *
3549
3549
  * @throws AdminApiError `job_not_found` (404), `invalid_transition` (422),
3550
3550
  * `plan_requires_dedicated` (422), `plan_exceeds_capacity` (422),
3551
- * `insufficient_credits` (402).
3551
+ * `insufficient_credits/*` (402).
3552
3552
  */
3553
3553
  declare function approve(ctx: AdminContext, params: JobIdParams & {
3554
3554
  /** Batches in flight from here on (max 128); the plan was made at the job's current value. */
@@ -5566,7 +5566,7 @@ interface ProvisionParams {
5566
5566
  * within a minute or so. Use `waitForPhase` to block on that.
5567
5567
  *
5568
5568
  * @throws AdminApiError `offering_not_found` (400), `offering_retired` (422),
5569
- * `provisioning_unavailable` (422), `insufficient_credits` (402).
5569
+ * `provisioning_unavailable` (422), `insufficient_credits/*` (402).
5570
5570
  * @example
5571
5571
  * const { resource } = await admin.infra.provision({ offeringId: 'retrieval.small' });
5572
5572
  */
@@ -5620,7 +5620,7 @@ interface ResizeParams {
5620
5620
  * @throws AdminApiError `resource_not_found` (404), `offering_not_found`
5621
5621
  * (400), `offering_retired` (422), `same_offering` (400),
5622
5622
  * `offering_kind_mismatch` (400), `resize_pending` (422), `resize_too_small`
5623
- * (422), `insufficient_credits` (402), `invalid_transition` (422).
5623
+ * (422), `insufficient_credits/*` (402), `invalid_transition` (422).
5624
5624
  * @example
5625
5625
  * await admin.infra.resize({ id, offeringId: 'retrieval.medium' });
5626
5626
  */
@@ -7225,6 +7225,15 @@ declare function byCommit(ctx: AdminContext, commitSha: string): Promise<{
7225
7225
  * if (live) console.log(live.commitSha, live.publishedAt);
7226
7226
  */
7227
7227
  declare function dashboardLive(ctx: AdminContext): Promise<DashboardLiveRelease | null>;
7228
+ /**
7229
+ * The URL the app is served on, as the platform resolves it: its live custom
7230
+ * domain, then its platform subdomain, then its id's own host. Ends in a slash.
7231
+ * Fetched from the dashboard endpoint.
7232
+ *
7233
+ * @example
7234
+ * const url = await admin.releases.primaryUrl();
7235
+ */
7236
+ declare function primaryUrl(ctx: AdminContext): Promise<string>;
7228
7237
  /**
7229
7238
  * Compact, stable projection of a release for the wait result.
7230
7239
  *
@@ -7342,9 +7351,10 @@ type releases_WaitForCommitResult = WaitForCommitResult;
7342
7351
  type releases_WaitOutcome = WaitOutcome;
7343
7352
  declare const releases_byCommit: typeof byCommit;
7344
7353
  declare const releases_dashboardLive: typeof dashboardLive;
7354
+ declare const releases_primaryUrl: typeof primaryUrl;
7345
7355
  declare const releases_waitForCommit: typeof waitForCommit;
7346
7356
  declare namespace releases {
7347
- export { type releases_ReleaseSummary as ReleaseSummary, type releases_ReleasesListParams as ReleasesListParams, type releases_WaitForCommitParams as WaitForCommitParams, type releases_WaitForCommitResult as WaitForCommitResult, type releases_WaitOutcome as WaitOutcome, releases_byCommit as byCommit, releases_dashboardLive as dashboardLive, get$2 as get, list$3 as list, releases_waitForCommit as waitForCommit };
7357
+ export { type releases_ReleaseSummary as ReleaseSummary, type releases_ReleasesListParams as ReleasesListParams, type releases_WaitForCommitParams as WaitForCommitParams, type releases_WaitForCommitResult as WaitForCommitResult, type releases_WaitOutcome as WaitOutcome, releases_byCommit as byCommit, releases_dashboardLive as dashboardLive, get$2 as get, list$3 as list, releases_primaryUrl as primaryUrl, releases_waitForCommit as waitForCommit };
7348
7358
  }
7349
7359
 
7350
7360
  /**
@@ -8175,7 +8185,7 @@ interface NumbersBuyParams {
8175
8185
  * @throws AdminApiError `invalid_phone_number` (400) — not a valid +1 E.164
8176
8186
  * US number; `number_already_assigned` (422) — this app already has a live
8177
8187
  * number; `number_unavailable` (422) — the number is no longer available;
8178
- * `insufficient_credits` (402) — the workspace balance is too low;
8188
+ * `insufficient_credits/*` (402) — the workspace can't cover it;
8179
8189
  * `telnyx_not_configured` (422) — phone numbers unavailable on this host.
8180
8190
  * @example
8181
8191
  * const { number } = await admin.voice.numbersBuy({
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ function parseJsonConfig(raw) {
37
37
  }
38
38
 
39
39
  // src/ctx.ts
40
- var DEFAULT_BASE_URL = "https://api.mindstudio.ai";
40
+ var DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
41
41
  function loadWorkspaceAppId(workspaceDir = WORKSPACE_DIR) {
42
42
  const manifestPath = path.join(workspaceDir, "mindstudio.json");
43
43
  let raw;
@@ -1626,6 +1626,7 @@ __export(releases_exports, {
1626
1626
  dashboardLive: () => dashboardLive,
1627
1627
  get: () => get5,
1628
1628
  list: () => list6,
1629
+ primaryUrl: () => primaryUrl,
1629
1630
  waitForCommit: () => waitForCommit
1630
1631
  });
1631
1632
  function list6(ctx, params = {}) {
@@ -1657,6 +1658,14 @@ async function dashboardLive(ctx) {
1657
1658
  );
1658
1659
  return dashboard.liveRelease;
1659
1660
  }
1661
+ async function primaryUrl(ctx) {
1662
+ const dashboard = await call(
1663
+ ctx,
1664
+ "GET",
1665
+ `/_internal/v2/apps/${ctx.appId}/dashboard`
1666
+ );
1667
+ return dashboard.primaryUrl;
1668
+ }
1660
1669
  function summarizeRelease(release) {
1661
1670
  const summary2 = {
1662
1671
  releaseId: release.id,