openmates 0.16.0-alpha.5 → 0.16.0-alpha.6

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.
@@ -21607,6 +21607,13 @@ var OpenMatesPlans = class {
21607
21607
  return response.entries ?? [];
21608
21608
  }
21609
21609
  async getRawPlan(planId) {
21610
+ try {
21611
+ const response = await this.client.get(`/v1/user-plans/${encodeURIComponent(planId)}`);
21612
+ if (!response.plan) throw new OpenMatesApiError(500, { detail: "User plan response missing plan" });
21613
+ return response.plan;
21614
+ } catch (error) {
21615
+ if (!(error instanceof OpenMatesApiError) || error.status !== 404) throw error;
21616
+ }
21610
21617
  const plans = await this.listRaw({ activeOnly: false });
21611
21618
  const plan = plans.find((candidate) => candidate.plan_id === planId || candidate.plan_id?.startsWith(planId));
21612
21619
  if (!plan) throw new OpenMatesApiError(404, { detail: "Plan not found" });
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  requireExactConfirmation,
9
9
  resolveProjectContext,
10
10
  serializeToYaml
11
- } from "./chunk-UUPKYTJ7.js";
11
+ } from "./chunk-S4AXBFAJ.js";
12
12
  import "./chunk-IWKP55ZB.js";
13
13
  import "./chunk-MLWBMJEN.js";
14
14
  export {
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  renderPlanList,
40
40
  renderSupportInfo,
41
41
  serializeToYaml
42
- } from "./chunk-UUPKYTJ7.js";
42
+ } from "./chunk-S4AXBFAJ.js";
43
43
  import "./chunk-IWKP55ZB.js";
44
44
  import "./chunk-MLWBMJEN.js";
45
45
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.16.0-alpha.5",
3
+ "version": "0.16.0-alpha.6",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",