@wspc/cli 0.0.5 → 0.0.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.
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli.ts
4
- import { Command as Command41 } from "commander";
4
+ import { Command as Command43 } from "commander";
5
5
 
6
6
  // src/generated/cli/keys/create.ts
7
7
  import { Command } from "commander";
@@ -792,7 +792,7 @@ var createClient = (config = {}) => {
792
792
  };
793
793
 
794
794
  // src/generated/sdk/client.gen.ts
795
- var client = createClient(createConfig());
795
+ var client = createClient(createConfig({ baseUrl: "https://api.wspc.ai" }));
796
796
 
797
797
  // src/generated/sdk/sdk.gen.ts
798
798
  var keyList = (options) => (options?.client ?? client).get({
@@ -814,6 +814,15 @@ var orgGet = (options) => (options?.client ?? client).get({
814
814
  url: "/auth/me/org",
815
815
  ...options
816
816
  });
817
+ var orgUpdate = (options) => (options?.client ?? client).patch({
818
+ security: [{ scheme: "bearer", type: "http" }],
819
+ url: "/auth/me/org",
820
+ ...options,
821
+ headers: {
822
+ "Content-Type": "application/json",
823
+ ...options?.headers
824
+ }
825
+ });
817
826
  var authMe = (options) => (options?.client ?? client).get({
818
827
  security: [{ scheme: "bearer", type: "http" }],
819
828
  url: "/auth/me",
@@ -829,6 +838,15 @@ var keyRevoke = (options) => (options.client ?? client).delete({
829
838
  url: "/auth/keys/{id}",
830
839
  ...options
831
840
  });
841
+ var keyUpdate = (options) => (options.client ?? client).patch({
842
+ security: [{ scheme: "bearer", type: "http" }],
843
+ url: "/auth/keys/{id}",
844
+ ...options,
845
+ headers: {
846
+ "Content-Type": "application/json",
847
+ ...options.headers
848
+ }
849
+ });
832
850
  var eventList = (options) => (options?.client ?? client).get({
833
851
  security: [{ scheme: "bearer", type: "http" }],
834
852
  url: "/calendar/events",
@@ -1070,9 +1088,9 @@ var ConfigStore = class {
1070
1088
  };
1071
1089
 
1072
1090
  // src/version.ts
1073
- var VERSION = "0.0.5";
1074
- var SPEC_SHA = "601a9f59";
1075
- var SPEC_FETCHED_AT = "2026-05-27T14:26:43.644Z";
1091
+ var VERSION = "0.0.6";
1092
+ var SPEC_SHA = "7418fe42";
1093
+ var SPEC_FETCHED_AT = "2026-06-02T09:58:13.195Z";
1076
1094
  var API_BASE = "https://api.wspc.ai";
1077
1095
 
1078
1096
  // src/index.ts
@@ -1655,9 +1673,30 @@ var orgGetCommand = new Command3("show").description("Get the authenticated user
1655
1673
  render({ kind: "org_get", display: { "shape": "object", "fields": ["id", "name", "created_at", "updated_at"], "format": { "id": "id-short", "name": "truncate", "created_at": "relative-time", "updated_at": "relative-time" } } }, result.data);
1656
1674
  });
1657
1675
 
1658
- // src/generated/cli/auth/me.ts
1676
+ // src/generated/cli/org/rename.ts
1659
1677
  import { Command as Command4 } from "commander";
1660
- var authMeCommand = new Command4("me").description("Fetch the user identified by the bearer token").action(async (opts) => {
1678
+ var orgUpdateCommand = new Command4("rename").description("Update the authenticated user's organization").option("--name <value>", "name").action(async (opts) => {
1679
+ const client2 = await loadSdkClient();
1680
+ const result = await orgUpdate({
1681
+ client: client2._rawClient,
1682
+ body: {
1683
+ name: opts.name
1684
+ }
1685
+ });
1686
+ if (result.error || !result.response?.ok) {
1687
+ process.stderr.write(
1688
+ `HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
1689
+ `
1690
+ );
1691
+ process.exitCode = 1;
1692
+ return;
1693
+ }
1694
+ render({ kind: "org_update", display: { "shape": "object", "fields": ["id", "name", "created_at", "updated_at"], "format": { "id": "id-short", "name": "truncate", "created_at": "relative-time", "updated_at": "relative-time" } } }, result.data);
1695
+ });
1696
+
1697
+ // src/generated/cli/auth/me.ts
1698
+ import { Command as Command5 } from "commander";
1699
+ var authMeCommand = new Command5("me").description("Fetch the user identified by the bearer token").action(async (opts) => {
1661
1700
  const client2 = await loadSdkClient();
1662
1701
  const result = await authMe({
1663
1702
  client: client2._rawClient
@@ -1674,8 +1713,8 @@ var authMeCommand = new Command4("me").description("Fetch the user identified by
1674
1713
  });
1675
1714
 
1676
1715
  // src/generated/cli/org/members.ts
1677
- import { Command as Command5 } from "commander";
1678
- var orgMembersListCommand = new Command5("members").description("List members of the authenticated user's organization").option("--cursor <value>", "cursor").option("--limit <value>", "limit").action(async (opts) => {
1716
+ import { Command as Command6 } from "commander";
1717
+ var orgMembersListCommand = new Command6("members").description("List members of the authenticated user's organization").option("--cursor <value>", "cursor").option("--limit <value>", "limit").action(async (opts) => {
1679
1718
  const client2 = await loadSdkClient();
1680
1719
  const result = await orgMembersList({
1681
1720
  client: client2._rawClient,
@@ -1696,8 +1735,8 @@ var orgMembersListCommand = new Command5("members").description("List members of
1696
1735
  });
1697
1736
 
1698
1737
  // src/generated/cli/keys/rm.ts
1699
- import { Command as Command6 } from "commander";
1700
- var keyRevokeCommand = new Command6("rm").description("Soft-revoke an API key").argument("<id>", "id").action(async (id, opts) => {
1738
+ import { Command as Command7 } from "commander";
1739
+ var keyRevokeCommand = new Command7("rm").description("Soft-revoke an API key").argument("<id>", "id").action(async (id, opts) => {
1701
1740
  const client2 = await loadSdkClient();
1702
1741
  const result = await keyRevoke({
1703
1742
  client: client2._rawClient,
@@ -1716,8 +1755,32 @@ var keyRevokeCommand = new Command6("rm").description("Soft-revoke an API key").
1716
1755
  render({ kind: "key_revoke", display: void 0 }, result.data);
1717
1756
  });
1718
1757
 
1758
+ // src/generated/cli/keys/edit.ts
1759
+ import { Command as Command8 } from "commander";
1760
+ var keyUpdateCommand = new Command8("edit").description("Update an active API key's label").argument("<id>", "id").option("--label <value>", "label").action(async (id, opts) => {
1761
+ const client2 = await loadSdkClient();
1762
+ const result = await keyUpdate({
1763
+ client: client2._rawClient,
1764
+ path: {
1765
+ id
1766
+ },
1767
+ body: {
1768
+ label: opts.label
1769
+ }
1770
+ });
1771
+ if (result.error || !result.response?.ok) {
1772
+ process.stderr.write(
1773
+ `HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
1774
+ `
1775
+ );
1776
+ process.exitCode = 1;
1777
+ return;
1778
+ }
1779
+ render({ kind: "key_update", display: void 0 }, result.data);
1780
+ });
1781
+
1719
1782
  // src/generated/cli/event/add.ts
1720
- import { Command as Command7 } from "commander";
1783
+ import { Command as Command9 } from "commander";
1721
1784
 
1722
1785
  // src/handwritten/utils/parse-time.ts
1723
1786
  import * as chrono from "chrono-node";
@@ -1803,7 +1866,7 @@ function parseAttendee(input) {
1803
1866
  }
1804
1867
 
1805
1868
  // src/generated/cli/event/add.ts
1806
- var eventCreateCommand = new Command7("add").description("Schedule a calendar event").argument("<title>", "title").option("--description <value>", "description").option("--start <value>", "start").option("--end <value>", "end").option("-l, --location <value>", "location").option("-u, --url <value>", "url").option("--status <value>", "status").option("--attendee <value>", "attendee", (val, memo) => {
1869
+ var eventCreateCommand = new Command9("add").description("Schedule a calendar event").argument("<title>", "title").option("--description <value>", "description").option("--start <value>", "start").option("--end <value>", "end").option("-l, --location <value>", "location").option("-u, --url <value>", "url").option("--status <value>", "status").option("--attendee <value>", "attendee", (val, memo) => {
1807
1870
  memo.push(val);
1808
1871
  return memo;
1809
1872
  }, []).option("--all-day", "all_day").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (title, opts) => {
@@ -1852,8 +1915,8 @@ var eventCreateCommand = new Command7("add").description("Schedule a calendar ev
1852
1915
  });
1853
1916
 
1854
1917
  // src/generated/cli/event/ls.ts
1855
- import { Command as Command8 } from "commander";
1856
- var eventListCommand = new Command8("ls").description("List calendar events").option("--q <value>", "q").option("--from <value>", "from").option("--to <value>", "to").option("--end-from <value>", "end_from").option("--end-to <value>", "end_to").option("--cursor <value>", "cursor").option("--limit <value>", "limit").option("--include-deleted <value>", "include_deleted").option("--include-past <value>", "include_past").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (opts) => {
1918
+ import { Command as Command10 } from "commander";
1919
+ var eventListCommand = new Command10("ls").description("List calendar events").option("--q <value>", "q").option("--from <value>", "from").option("--to <value>", "to").option("--end-from <value>", "end_from").option("--end-to <value>", "end_to").option("--cursor <value>", "cursor").option("--limit <value>", "limit").option("--include-deleted <value>", "include_deleted").option("--include-past <value>", "include_past").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (opts) => {
1857
1920
  const zone = resolveTimezone(opts.tz);
1858
1921
  let fromValue;
1859
1922
  if (opts.from !== void 0) {
@@ -1890,8 +1953,8 @@ var eventListCommand = new Command8("ls").description("List calendar events").op
1890
1953
  });
1891
1954
 
1892
1955
  // src/generated/cli/event/rm.ts
1893
- import { Command as Command9 } from "commander";
1894
- var eventDeleteCommand = new Command9("rm").description("Soft-delete a calendar event").argument("<id>", "id").option("--expected-version <value>", "expected_version").action(async (id, opts) => {
1956
+ import { Command as Command11 } from "commander";
1957
+ var eventDeleteCommand = new Command11("rm").description("Soft-delete a calendar event").argument("<id>", "id").option("--expected-version <value>", "expected_version").action(async (id, opts) => {
1895
1958
  const client2 = await loadSdkClient();
1896
1959
  const result = await eventDelete({
1897
1960
  client: client2._rawClient,
@@ -1914,8 +1977,8 @@ var eventDeleteCommand = new Command9("rm").description("Soft-delete a calendar
1914
1977
  });
1915
1978
 
1916
1979
  // src/generated/cli/event/show.ts
1917
- import { Command as Command10 } from "commander";
1918
- var eventGetCommand = new Command10("show").description("Get a calendar event by id").argument("<id>", "id").option("--include-deleted <value>", "include_deleted").action(async (id, opts) => {
1980
+ import { Command as Command12 } from "commander";
1981
+ var eventGetCommand = new Command12("show").description("Get a calendar event by id").argument("<id>", "id").option("--include-deleted <value>", "include_deleted").action(async (id, opts) => {
1919
1982
  const client2 = await loadSdkClient();
1920
1983
  const result = await eventGet({
1921
1984
  client: client2._rawClient,
@@ -1938,8 +2001,8 @@ var eventGetCommand = new Command10("show").description("Get a calendar event by
1938
2001
  });
1939
2002
 
1940
2003
  // src/generated/cli/event/set.ts
1941
- import { Command as Command11 } from "commander";
1942
- var eventUpdateCommand = new Command11("set").description("Update a calendar event").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--title <value>", "title").option("--description <value>", "description").option("--start <value>", "start").option("--end <value>", "end").option("-l, --location <value>", "location").option("-u, --url <value>", "url").option("--status <value>", "status").option("--attendee <value>", "attendee", (val, memo) => {
2004
+ import { Command as Command13 } from "commander";
2005
+ var eventUpdateCommand = new Command13("set").description("Update a calendar event").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--title <value>", "title").option("--description <value>", "description").option("--start <value>", "start").option("--end <value>", "end").option("-l, --location <value>", "location").option("-u, --url <value>", "url").option("--status <value>", "status").option("--attendee <value>", "attendee", (val, memo) => {
1943
2006
  memo.push(val);
1944
2007
  return memo;
1945
2008
  }, []).option("--all-day", "all_day").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (id, opts) => {
@@ -1992,8 +2055,8 @@ var eventUpdateCommand = new Command11("set").description("Update a calendar eve
1992
2055
  });
1993
2056
 
1994
2057
  // src/generated/cli/event/ics.ts
1995
- import { Command as Command12 } from "commander";
1996
- var eventIcsDownloadCommand = new Command12("ics").description("Download event as `.ics`").argument("<id>", "id").action(async (id, opts) => {
2058
+ import { Command as Command14 } from "commander";
2059
+ var eventIcsDownloadCommand = new Command14("ics").description("Download event as `.ics`").argument("<id>", "id").action(async (id, opts) => {
1997
2060
  const client2 = await loadSdkClient();
1998
2061
  const result = await eventIcsDownload({
1999
2062
  client: client2._rawClient,
@@ -2013,8 +2076,8 @@ var eventIcsDownloadCommand = new Command12("ics").description("Download event a
2013
2076
  });
2014
2077
 
2015
2078
  // src/generated/cli/alias/add.ts
2016
- import { Command as Command13 } from "commander";
2017
- var emailAliasCreateCommand = new Command13("add").description("Create a receiving alias").argument("<email>", "email").action(async (email, opts) => {
2079
+ import { Command as Command15 } from "commander";
2080
+ var emailAliasCreateCommand = new Command15("add").description("Create a receiving alias").argument("<email>", "email").action(async (email, opts) => {
2018
2081
  const client2 = await loadSdkClient();
2019
2082
  const result = await emailAliasCreate({
2020
2083
  client: client2._rawClient,
@@ -2034,8 +2097,8 @@ var emailAliasCreateCommand = new Command13("add").description("Create a receivi
2034
2097
  });
2035
2098
 
2036
2099
  // src/generated/cli/alias/ls.ts
2037
- import { Command as Command14 } from "commander";
2038
- var emailAliasListCommand = new Command14("ls").description("List the caller's aliases").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2100
+ import { Command as Command16 } from "commander";
2101
+ var emailAliasListCommand = new Command16("ls").description("List the caller's aliases").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2039
2102
  const client2 = await loadSdkClient();
2040
2103
  const result = await emailAliasList({
2041
2104
  client: client2._rawClient,
@@ -2055,8 +2118,8 @@ var emailAliasListCommand = new Command14("ls").description("List the caller's a
2055
2118
  });
2056
2119
 
2057
2120
  // src/generated/cli/alias/rm.ts
2058
- import { Command as Command15 } from "commander";
2059
- var emailAliasDeleteCommand = new Command15("rm").description("Soft-delete an alias").argument("<email>", "email").action(async (email, opts) => {
2121
+ import { Command as Command17 } from "commander";
2122
+ var emailAliasDeleteCommand = new Command17("rm").description("Soft-delete an alias").argument("<email>", "email").action(async (email, opts) => {
2060
2123
  const client2 = await loadSdkClient();
2061
2124
  const result = await emailAliasDelete({
2062
2125
  client: client2._rawClient,
@@ -2076,8 +2139,8 @@ var emailAliasDeleteCommand = new Command15("rm").description("Soft-delete an al
2076
2139
  });
2077
2140
 
2078
2141
  // src/generated/cli/email/rm.ts
2079
- import { Command as Command16 } from "commander";
2080
- var emailDeleteCommand = new Command16("rm").description("Soft-delete inbound emails").argument("<id...>", "id").action(async (id, opts) => {
2142
+ import { Command as Command18 } from "commander";
2143
+ var emailDeleteCommand = new Command18("rm").description("Soft-delete inbound emails").argument("<id...>", "id").action(async (id, opts) => {
2081
2144
  const idRaw = id;
2082
2145
  const ids = idRaw.length > 0 ? idRaw : void 0;
2083
2146
  const client2 = await loadSdkClient();
@@ -2099,8 +2162,8 @@ var emailDeleteCommand = new Command16("rm").description("Soft-delete inbound em
2099
2162
  });
2100
2163
 
2101
2164
  // src/generated/cli/email/show.ts
2102
- import { Command as Command17 } from "commander";
2103
- var emailGetCommand = new Command17("show").description("Get an inbound email by id").argument("<id>", "id").option("--include-html <value>", "include_html").option("--include-deleted <value>", "include_deleted").action(async (id, opts) => {
2165
+ import { Command as Command19 } from "commander";
2166
+ var emailGetCommand = new Command19("show").description("Get an inbound email by id").argument("<id>", "id").option("--include-html <value>", "include_html").option("--include-deleted <value>", "include_deleted").action(async (id, opts) => {
2104
2167
  const client2 = await loadSdkClient();
2105
2168
  const result = await emailGet({
2106
2169
  client: client2._rawClient,
@@ -2124,8 +2187,8 @@ var emailGetCommand = new Command17("show").description("Get an inbound email by
2124
2187
  });
2125
2188
 
2126
2189
  // src/generated/cli/email/ls.ts
2127
- import { Command as Command18 } from "commander";
2128
- var emailListCommand = new Command18("ls").description("List inbound emails").option("--limit <value>", "limit").option("--alias-email <value>", "alias_email").option("--unread-only <value>", "unread_only").option("--since <value>", "since").option("--cursor <value>", "cursor").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2190
+ import { Command as Command20 } from "commander";
2191
+ var emailListCommand = new Command20("ls").description("List inbound emails").option("--limit <value>", "limit").option("--alias-email <value>", "alias_email").option("--unread-only <value>", "unread_only").option("--since <value>", "since").option("--cursor <value>", "cursor").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2129
2192
  const client2 = await loadSdkClient();
2130
2193
  const result = await emailList({
2131
2194
  client: client2._rawClient,
@@ -2150,8 +2213,8 @@ var emailListCommand = new Command18("ls").description("List inbound emails").op
2150
2213
  });
2151
2214
 
2152
2215
  // src/generated/cli/email/read.ts
2153
- import { Command as Command19 } from "commander";
2154
- var emailMarkReadCommand = new Command19("read").description("Mark inbound emails as read").argument("<id...>", "id").action(async (id, opts) => {
2216
+ import { Command as Command21 } from "commander";
2217
+ var emailMarkReadCommand = new Command21("read").description("Mark inbound emails as read").argument("<id...>", "id").action(async (id, opts) => {
2155
2218
  const idRaw = id;
2156
2219
  const ids = idRaw.length > 0 ? idRaw : void 0;
2157
2220
  const client2 = await loadSdkClient();
@@ -2173,8 +2236,8 @@ var emailMarkReadCommand = new Command19("read").description("Mark inbound email
2173
2236
  });
2174
2237
 
2175
2238
  // src/generated/cli/email/unread.ts
2176
- import { Command as Command20 } from "commander";
2177
- var emailMarkUnreadCommand = new Command20("unread").description("Mark inbound emails as unread").argument("<id...>", "id").action(async (id, opts) => {
2239
+ import { Command as Command22 } from "commander";
2240
+ var emailMarkUnreadCommand = new Command22("unread").description("Mark inbound emails as unread").argument("<id...>", "id").action(async (id, opts) => {
2178
2241
  const idRaw = id;
2179
2242
  const ids = idRaw.length > 0 ? idRaw : void 0;
2180
2243
  const client2 = await loadSdkClient();
@@ -2196,8 +2259,8 @@ var emailMarkUnreadCommand = new Command20("unread").description("Mark inbound e
2196
2259
  });
2197
2260
 
2198
2261
  // src/generated/cli/push/config/rm.ts
2199
- import { Command as Command21 } from "commander";
2200
- var pushConfigDeleteCommand = new Command21("rm").description("Remove a push transport").argument("<transport>", "transport").action(async (transport, opts) => {
2262
+ import { Command as Command23 } from "commander";
2263
+ var pushConfigDeleteCommand = new Command23("rm").description("Remove a push transport").argument("<transport>", "transport").action(async (transport, opts) => {
2201
2264
  const client2 = await loadSdkClient();
2202
2265
  const result = await pushConfigDelete({
2203
2266
  client: client2._rawClient,
@@ -2217,8 +2280,8 @@ var pushConfigDeleteCommand = new Command21("rm").description("Remove a push tra
2217
2280
  });
2218
2281
 
2219
2282
  // src/generated/cli/push/config/set.ts
2220
- import { Command as Command22 } from "commander";
2221
- var pushConfigSetCommand = new Command22("set").description("Register or update a push transport").option("--transport <value>", "transport").option("--target-bot-username <value>", "target_bot_username").action(async (opts) => {
2283
+ import { Command as Command24 } from "commander";
2284
+ var pushConfigSetCommand = new Command24("set").description("Register or update a push transport").option("--transport <value>", "transport").option("--target-bot-username <value>", "target_bot_username").action(async (opts) => {
2222
2285
  const client2 = await loadSdkClient();
2223
2286
  const result = await pushConfigSet({
2224
2287
  client: client2._rawClient,
@@ -2241,8 +2304,8 @@ var pushConfigSetCommand = new Command22("set").description("Register or update
2241
2304
  });
2242
2305
 
2243
2306
  // src/generated/cli/push/config/show.ts
2244
- import { Command as Command23 } from "commander";
2245
- var pushConfigGetCommand = new Command23("show").description("List the caller's push transports").action(async (opts) => {
2307
+ import { Command as Command25 } from "commander";
2308
+ var pushConfigGetCommand = new Command25("show").description("List the caller's push transports").action(async (opts) => {
2246
2309
  const client2 = await loadSdkClient();
2247
2310
  const result = await pushConfigGet({
2248
2311
  client: client2._rawClient
@@ -2259,8 +2322,8 @@ var pushConfigGetCommand = new Command23("show").description("List the caller's
2259
2322
  });
2260
2323
 
2261
2324
  // src/generated/cli/push/test.ts
2262
- import { Command as Command24 } from "commander";
2263
- var pushTestCommand = new Command24("test").description("Send a test push notification").option("--transport <value>", "transport").action(async (opts) => {
2325
+ import { Command as Command26 } from "commander";
2326
+ var pushTestCommand = new Command26("test").description("Send a test push notification").option("--transport <value>", "transport").action(async (opts) => {
2264
2327
  const client2 = await loadSdkClient();
2265
2328
  const result = await pushTest({
2266
2329
  client: client2._rawClient,
@@ -2283,8 +2346,8 @@ var pushTestCommand = new Command24("test").description("Send a test push notifi
2283
2346
  });
2284
2347
 
2285
2348
  // src/generated/cli/todo/project/add.ts
2286
- import { Command as Command25 } from "commander";
2287
- var projectCreateCommand = new Command25("add").description("Create a project").argument("<name>", "name").option("--default-todo-type-id <value>", "default_todo_type_id").action(async (name, opts) => {
2349
+ import { Command as Command27 } from "commander";
2350
+ var projectCreateCommand = new Command27("add").description("Create a project").argument("<name>", "name").option("--default-todo-type-id <value>", "default_todo_type_id").action(async (name, opts) => {
2288
2351
  const client2 = await loadSdkClient();
2289
2352
  const result = await projectCreate({
2290
2353
  client: client2._rawClient,
@@ -2305,8 +2368,8 @@ var projectCreateCommand = new Command25("add").description("Create a project").
2305
2368
  });
2306
2369
 
2307
2370
  // src/generated/cli/todo/project/ls.ts
2308
- import { Command as Command26 } from "commander";
2309
- var projectListCommand = new Command26("ls").description("List projects").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2371
+ import { Command as Command28 } from "commander";
2372
+ var projectListCommand = new Command28("ls").description("List projects").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2310
2373
  const client2 = await loadSdkClient();
2311
2374
  const result = await projectList({
2312
2375
  client: client2._rawClient,
@@ -2326,8 +2389,8 @@ var projectListCommand = new Command26("ls").description("List projects").option
2326
2389
  });
2327
2390
 
2328
2391
  // src/generated/cli/todo/rule/ls.ts
2329
- import { Command as Command27 } from "commander";
2330
- var recurrenceRuleListCommand = new Command27("ls").description("List recurring todo rules").option("--project-id <value>", "project_id").option("--user-id <value>", "user_id").action(async (opts) => {
2392
+ import { Command as Command29 } from "commander";
2393
+ var recurrenceRuleListCommand = new Command29("ls").description("List recurring todo rules").option("--project-id <value>", "project_id").option("--user-id <value>", "user_id").action(async (opts) => {
2331
2394
  const client2 = await loadSdkClient();
2332
2395
  const result = await recurrenceRuleList({
2333
2396
  client: client2._rawClient,
@@ -2348,8 +2411,8 @@ var recurrenceRuleListCommand = new Command27("ls").description("List recurring
2348
2411
  });
2349
2412
 
2350
2413
  // src/generated/cli/todo/add.ts
2351
- import { Command as Command28 } from "commander";
2352
- var todoCreateCommand = new Command28("add").description("Create a todo").argument("<title>", "title").option("-p, --project <value>", "project_id").option("--description <value>", "description").option("--parent-id <value>", "parent_id").option("--status <value>", "status").option("--due-at <value>", "due_at").option("--type-id <value>", "type_id").option("--custom-fields <value>", "custom_fields").action(async (title, opts) => {
2414
+ import { Command as Command30 } from "commander";
2415
+ var todoCreateCommand = new Command30("add").description("Create a todo").argument("<title>", "title").option("-p, --project <value>", "project_id").option("--description <value>", "description").option("--parent-id <value>", "parent_id").option("--status <value>", "status").option("--due-at <value>", "due_at").option("--type-id <value>", "type_id").option("--custom-fields <value>", "custom_fields").action(async (title, opts) => {
2353
2416
  const client2 = await loadSdkClient();
2354
2417
  const result = await todoCreate({
2355
2418
  client: client2._rawClient,
@@ -2376,8 +2439,8 @@ var todoCreateCommand = new Command28("add").description("Create a todo").argume
2376
2439
  });
2377
2440
 
2378
2441
  // src/generated/cli/todo/ls.ts
2379
- import { Command as Command29 } from "commander";
2380
- var todoListCommand = new Command29("ls").description("List todos with filters").option("-p, --project <value>", "project_id").option("--user-id <value>", "user_id").option("--parent-id <value>", "parent_id").option("-s, --status <value>", "status").option("--include-deleted <value>", "include_deleted").option("--include-templates <value>", "include_templates").option("--due-after <value>", "due_after").option("--due-before <value>", "due_before").option("--type-id <value>", "type_id").option("--sort-by <value>", "sort_by").option("--order <value>", "order").option("--include-orphan-fields <value>", "include_orphan_fields").action(async (opts) => {
2442
+ import { Command as Command31 } from "commander";
2443
+ var todoListCommand = new Command31("ls").description("List todos with filters").option("-p, --project <value>", "project_id").option("--user-id <value>", "user_id").option("--parent-id <value>", "parent_id").option("-s, --status <value>", "status").option("--include-deleted <value>", "include_deleted").option("--include-templates <value>", "include_templates").option("--due-after <value>", "due_after").option("--due-before <value>", "due_before").option("--type-id <value>", "type_id").option("--sort-by <value>", "sort_by").option("--order <value>", "order").option("--include-orphan-fields <value>", "include_orphan_fields").action(async (opts) => {
2381
2444
  const client2 = await loadSdkClient();
2382
2445
  const result = await todoList({
2383
2446
  client: client2._rawClient,
@@ -2408,8 +2471,8 @@ var todoListCommand = new Command29("ls").description("List todos with filters")
2408
2471
  });
2409
2472
 
2410
2473
  // src/generated/cli/todo/type/ls.ts
2411
- import { Command as Command30 } from "commander";
2412
- var todoTypeListCommand = new Command30("ls").description("List todo types").option("--project-id <value>", "project_id").option("--user-id <value>", "user_id").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2474
+ import { Command as Command32 } from "commander";
2475
+ var todoTypeListCommand = new Command32("ls").description("List todo types").option("--project-id <value>", "project_id").option("--user-id <value>", "user_id").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
2413
2476
  const client2 = await loadSdkClient();
2414
2477
  const result = await todoTypeList({
2415
2478
  client: client2._rawClient,
@@ -2431,8 +2494,8 @@ var todoTypeListCommand = new Command30("ls").description("List todo types").opt
2431
2494
  });
2432
2495
 
2433
2496
  // src/generated/cli/todo/rm.ts
2434
- import { Command as Command31 } from "commander";
2435
- var todoDeleteCommand = new Command31("rm").description("Soft-delete a todo").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--cascade <value>", "cascade").action(async (id, opts) => {
2497
+ import { Command as Command33 } from "commander";
2498
+ var todoDeleteCommand = new Command33("rm").description("Soft-delete a todo").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--cascade <value>", "cascade").action(async (id, opts) => {
2436
2499
  const client2 = await loadSdkClient();
2437
2500
  const result = await todoDelete({
2438
2501
  client: client2._rawClient,
@@ -2456,8 +2519,8 @@ var todoDeleteCommand = new Command31("rm").description("Soft-delete a todo").ar
2456
2519
  });
2457
2520
 
2458
2521
  // src/generated/cli/todo/show.ts
2459
- import { Command as Command32 } from "commander";
2460
- var todoGetCommand = new Command32("show").description("Get a todo by id").argument("<id>", "id").option("--include-deleted <value>", "include_deleted").action(async (id, opts) => {
2522
+ import { Command as Command34 } from "commander";
2523
+ var todoGetCommand = new Command34("show").description("Get a todo by id").argument("<id>", "id").option("--include-deleted <value>", "include_deleted").option("--include-orphan-fields <value>", "include_orphan_fields").action(async (id, opts) => {
2461
2524
  const client2 = await loadSdkClient();
2462
2525
  const result = await todoGet({
2463
2526
  client: client2._rawClient,
@@ -2465,7 +2528,8 @@ var todoGetCommand = new Command32("show").description("Get a todo by id").argum
2465
2528
  id
2466
2529
  },
2467
2530
  query: {
2468
- include_deleted: opts.includeDeleted
2531
+ include_deleted: opts.includeDeleted,
2532
+ include_orphan_fields: opts.includeOrphanFields
2469
2533
  }
2470
2534
  });
2471
2535
  if (result.error || !result.response?.ok) {
@@ -2480,8 +2544,8 @@ var todoGetCommand = new Command32("show").description("Get a todo by id").argum
2480
2544
  });
2481
2545
 
2482
2546
  // src/generated/cli/todo/update.ts
2483
- import { Command as Command33 } from "commander";
2484
- var todoUpdateCommand = new Command33("update").description("Update a todo").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--title <value>", "title").option("--description <value>", "description").option("--parent-id <value>", "parent_id").option("--status <value>", "status").option("--due-at <value>", "due_at").option("--type-id <value>", "type_id").option("--custom-fields <value>", "custom_fields").option("--user-id <value>", "user_id").action(async (id, opts) => {
2547
+ import { Command as Command35 } from "commander";
2548
+ var todoUpdateCommand = new Command35("update").description("Update a todo").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--title <value>", "title").option("--description <value>", "description").option("--parent-id <value>", "parent_id").option("--status <value>", "status").option("--due-at <value>", "due_at").option("--type-id <value>", "type_id").option("--custom-fields <value>", "custom_fields").option("--user-id <value>", "user_id").action(async (id, opts) => {
2485
2549
  const client2 = await loadSdkClient();
2486
2550
  const result = await todoUpdate({
2487
2551
  client: client2._rawClient,
@@ -2517,8 +2581,10 @@ function registerGeneratedCommands(root) {
2517
2581
  root_keys.addCommand(keyCreateCommand);
2518
2582
  root_keys.addCommand(keyListCommand);
2519
2583
  root_keys.addCommand(keyRevokeCommand);
2584
+ root_keys.addCommand(keyUpdateCommand);
2520
2585
  const root_org = root.command("org").description("org commands");
2521
2586
  root_org.addCommand(orgGetCommand);
2587
+ root_org.addCommand(orgUpdateCommand);
2522
2588
  root_org.addCommand(orgMembersListCommand);
2523
2589
  const root_auth = root.command("auth").description("auth commands");
2524
2590
  root_auth.addCommand(authMeCommand);
@@ -2561,7 +2627,7 @@ function registerGeneratedCommands(root) {
2561
2627
  }
2562
2628
 
2563
2629
  // src/handwritten/commands/login.ts
2564
- import { Command as Command34 } from "commander";
2630
+ import { Command as Command36 } from "commander";
2565
2631
 
2566
2632
  // src/handwritten/auth/device-flow.ts
2567
2633
  var DEFAULT_SLEEP = (ms) => new Promise((r) => setTimeout(r, ms));
@@ -2696,7 +2762,7 @@ async function runLogin(opts) {
2696
2762
  }
2697
2763
 
2698
2764
  // src/handwritten/commands/login.ts
2699
- var loginCommand = new Command34("login").description("Log in via OAuth device flow (default) or API key").option("--api-key <key>", "Log in with a wspc API key (escape hatch)").option("--json", "Emit machine-readable events to stdout").action(async (opts) => {
2765
+ var loginCommand = new Command36("login").description("Log in via OAuth device flow (default) or API key").option("--api-key <key>", "Log in with a wspc API key (escape hatch)").option("--json", "Emit machine-readable events to stdout").action(async (opts) => {
2700
2766
  const store = new ConfigStore();
2701
2767
  const output = opts.json ? { write: () => {
2702
2768
  }, writeJson: (e) => process.stdout.write(JSON.stringify(e) + "\n") } : {
@@ -2713,7 +2779,7 @@ var loginCommand = new Command34("login").description("Log in via OAuth device f
2713
2779
  });
2714
2780
 
2715
2781
  // src/handwritten/commands/logout.ts
2716
- import { Command as Command35 } from "commander";
2782
+ import { Command as Command37 } from "commander";
2717
2783
 
2718
2784
  // src/handwritten/auth/logout.ts
2719
2785
  async function runLogout(opts) {
@@ -2730,13 +2796,13 @@ async function runLogout(opts) {
2730
2796
  }
2731
2797
 
2732
2798
  // src/handwritten/commands/logout.ts
2733
- var logoutCommand = new Command35("logout").description("Clear stored credentials for the current environment").action(async () => {
2799
+ var logoutCommand = new Command37("logout").description("Clear stored credentials for the current environment").action(async () => {
2734
2800
  await runLogout({ store: new ConfigStore() });
2735
2801
  process.stdout.write("\u2713 logged out\n");
2736
2802
  });
2737
2803
 
2738
2804
  // src/handwritten/commands/whoami.ts
2739
- import { Command as Command36 } from "commander";
2805
+ import { Command as Command38 } from "commander";
2740
2806
  var ENV_DISPLAY = {
2741
2807
  shape: "object",
2742
2808
  fields: ["name", "api_base", "actor", "agent_label"]
@@ -2770,7 +2836,7 @@ registerRenderer("whoami", (data) => {
2770
2836
  renderObject(d.org, ORG_DISPLAY);
2771
2837
  }
2772
2838
  });
2773
- var whoamiCommand = new Command36("whoami").description("Show the active env, signed-in user, and organization").action(async () => {
2839
+ var whoamiCommand = new Command38("whoami").description("Show the active env, signed-in user, and organization").action(async () => {
2774
2840
  const store = new ConfigStore();
2775
2841
  const current = await store.currentEnv();
2776
2842
  if (!current) {
@@ -2824,8 +2890,8 @@ function printLoggedOut() {
2824
2890
  }
2825
2891
 
2826
2892
  // src/handwritten/commands/config.ts
2827
- import { Command as Command37 } from "commander";
2828
- var configCommand = new Command37("config").description("Manage wspc local config");
2893
+ import { Command as Command39 } from "commander";
2894
+ var configCommand = new Command39("config").description("Manage wspc local config");
2829
2895
  registerRenderer("config_show", (data) => {
2830
2896
  const d = data;
2831
2897
  if (d.envs.length === 0) {
@@ -2890,7 +2956,7 @@ configCommand.command("use <env>").description("Switch current_env").action(asyn
2890
2956
  });
2891
2957
 
2892
2958
  // src/handwritten/commands/todo-done.ts
2893
- import { Command as Command38 } from "commander";
2959
+ import { Command as Command40 } from "commander";
2894
2960
  var TODO_UPDATE_DISPLAY = {
2895
2961
  shape: "object",
2896
2962
  format: {
@@ -2908,7 +2974,7 @@ var TODO_UPDATE_DISPLAY = {
2908
2974
  deleted_at: "relative-time"
2909
2975
  }
2910
2976
  };
2911
- var todoDoneCommand = new Command38("done").description("Mark a todo done (sugar for `update <id> --status done`)").argument("<id>", "Todo id").action(async (id) => {
2977
+ var todoDoneCommand = new Command40("done").description("Mark a todo done (sugar for `update <id> --status done`)").argument("<id>", "Todo id").action(async (id) => {
2912
2978
  const client2 = await loadSdkClient();
2913
2979
  const result = await todoUpdate({
2914
2980
  client: client2._rawClient,
@@ -2927,7 +2993,7 @@ var todoDoneCommand = new Command38("done").description("Mark a todo done (sugar
2927
2993
  });
2928
2994
 
2929
2995
  // src/handwritten/commands/email/send.ts
2930
- import { Command as Command39 } from "commander";
2996
+ import { Command as Command41 } from "commander";
2931
2997
  import { readFile, stat } from "fs/promises";
2932
2998
  import { basename } from "path";
2933
2999
 
@@ -2985,7 +3051,7 @@ async function resolveAttachment(input) {
2985
3051
  `--attach ${input}: neither a readable file nor a valid <prefix>_<ulid>:<idx> reference.`
2986
3052
  );
2987
3053
  }
2988
- var sendCommand = new Command39("send").description("Send an outbound email").requiredOption("--from <alias-email>", "alias email to send from").option("--to <addr...>", "recipient address (repeatable)", []).option("--subject <text>", "subject").option("--text <body>", "plain-text body").option("--text-file <path>", "read text body from file").option("--reply <id>", "inbound email id to reply to").option("--attach <path-or-ref...>", "attachment (file path or eml_xxx:idx)", []).requiredOption("--idempotency-key <key>", "idempotency key").action(async (opts) => {
3054
+ var sendCommand = new Command41("send").description("Send an outbound email").requiredOption("--from <alias-email>", "alias email to send from").option("--to <addr...>", "recipient address (repeatable)", []).option("--subject <text>", "subject").option("--text <body>", "plain-text body").option("--text-file <path>", "read text body from file").option("--reply <id>", "inbound email id to reply to").option("--attach <path-or-ref...>", "attachment (file path or eml_xxx:idx)", []).requiredOption("--idempotency-key <key>", "idempotency key").action(async (opts) => {
2989
3055
  const isReply = Boolean(opts.reply);
2990
3056
  const to = opts.to;
2991
3057
  const attachInputs = opts.attach;
@@ -3072,7 +3138,7 @@ var sendCommand = new Command39("send").description("Send an outbound email").re
3072
3138
  });
3073
3139
 
3074
3140
  // src/handwritten/commands/email/attachment.ts
3075
- import { Command as Command40 } from "commander";
3141
+ import { Command as Command42 } from "commander";
3076
3142
  import { createWriteStream } from "fs";
3077
3143
  import { Readable } from "stream";
3078
3144
  import { pipeline } from "stream/promises";
@@ -3089,7 +3155,7 @@ function parseContentDispositionFilename(header) {
3089
3155
  }
3090
3156
 
3091
3157
  // src/handwritten/commands/email/attachment.ts
3092
- var attachmentCommand = new Command40("attachment").description("Download an inbound email attachment by index").argument("<email-id>").argument("<idx>").option("--output <path>", "output file path").option("--include-deleted", "allow downloads from soft-deleted parent emails").action(async (emailId, idxArg, opts) => {
3158
+ var attachmentCommand = new Command42("attachment").description("Download an inbound email attachment by index").argument("<email-id>").argument("<idx>").option("--output <path>", "output file path").option("--include-deleted", "allow downloads from soft-deleted parent emails").action(async (emailId, idxArg, opts) => {
3093
3159
  const idx = Number(idxArg);
3094
3160
  if (!Number.isInteger(idx) || idx < 0) {
3095
3161
  process.stderr.write(`<idx> must be a non-negative integer (got "${idxArg}")
@@ -3122,7 +3188,7 @@ var attachmentCommand = new Command40("attachment").description("Download an inb
3122
3188
 
3123
3189
  // src/cli.ts
3124
3190
  function buildProgram() {
3125
- const program = new Command41().name("wspc").description("Official CLI for wspc.ai").version(`wspc ${VERSION} (spec ${SPEC_SHA}, fetched ${SPEC_FETCHED_AT})`).option("--json", "Output raw JSON (machine-readable)").hook("preAction", (thisCommand) => {
3191
+ const program = new Command43().name("wspc").description("Official CLI for wspc.ai").version(`wspc ${VERSION} (spec ${SPEC_SHA}, fetched ${SPEC_FETCHED_AT})`).option("--json", "Output raw JSON (machine-readable)").hook("preAction", (thisCommand) => {
3126
3192
  if (thisCommand.opts().json) process.env.WSPC_OUTPUT = "json";
3127
3193
  });
3128
3194
  program.addCommand(loginCommand);