@wspc/cli 0.0.10 → 0.0.12
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 +205 -80
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/spec/openapi.json +2020 -436
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
|
|
4
|
+
import { Command as Command59 } from "commander";
|
|
5
5
|
|
|
6
6
|
// src/generated/cli/invite/accept.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -942,6 +942,20 @@ var emailAliasCreate = (options) => (options.client ?? client).post({
|
|
|
942
942
|
...options.headers
|
|
943
943
|
}
|
|
944
944
|
});
|
|
945
|
+
var emailDomainList = (options) => (options?.client ?? client).get({
|
|
946
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
947
|
+
url: "/email/domains",
|
|
948
|
+
...options
|
|
949
|
+
});
|
|
950
|
+
var emailDomainCreate = (options) => (options.client ?? client).post({
|
|
951
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
952
|
+
url: "/email/domains",
|
|
953
|
+
...options,
|
|
954
|
+
headers: {
|
|
955
|
+
"Content-Type": "application/json",
|
|
956
|
+
...options.headers
|
|
957
|
+
}
|
|
958
|
+
});
|
|
945
959
|
var emailAliasDelete = (options) => (options.client ?? client).delete({
|
|
946
960
|
security: [{ scheme: "bearer", type: "http" }],
|
|
947
961
|
url: "/email/aliases/{email}",
|
|
@@ -956,6 +970,11 @@ var emailDelete = (options) => (options.client ?? client).post({
|
|
|
956
970
|
...options.headers
|
|
957
971
|
}
|
|
958
972
|
});
|
|
973
|
+
var emailDomainGet = (options) => (options.client ?? client).get({
|
|
974
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
975
|
+
url: "/email/domains/{domain}",
|
|
976
|
+
...options
|
|
977
|
+
});
|
|
959
978
|
var emailGet = (options) => (options.client ?? client).get({
|
|
960
979
|
security: [{ scheme: "bearer", type: "http" }],
|
|
961
980
|
url: "/email/messages/{id}",
|
|
@@ -993,6 +1012,11 @@ var emailSend = (options) => (options.client ?? client).post({
|
|
|
993
1012
|
...options.headers
|
|
994
1013
|
}
|
|
995
1014
|
});
|
|
1015
|
+
var emailDomainVerify = (options) => (options.client ?? client).post({
|
|
1016
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1017
|
+
url: "/email/domains/{domain}/verify",
|
|
1018
|
+
...options
|
|
1019
|
+
});
|
|
996
1020
|
var pushConfigDelete = (options) => (options.client ?? client).delete({
|
|
997
1021
|
security: [{ scheme: "bearer", type: "http" }],
|
|
998
1022
|
url: "/push/config/{transport}",
|
|
@@ -1206,9 +1230,9 @@ var ConfigStore = class {
|
|
|
1206
1230
|
};
|
|
1207
1231
|
|
|
1208
1232
|
// src/version.ts
|
|
1209
|
-
var VERSION = "0.0.
|
|
1210
|
-
var SPEC_SHA = "
|
|
1211
|
-
var SPEC_FETCHED_AT = "2026-06-
|
|
1233
|
+
var VERSION = "0.0.12";
|
|
1234
|
+
var SPEC_SHA = "869ea6a3";
|
|
1235
|
+
var SPEC_FETCHED_AT = "2026-06-09T06:41:08.172Z";
|
|
1212
1236
|
var API_BASE = "https://api.wspc.ai";
|
|
1213
1237
|
|
|
1214
1238
|
// src/index.ts
|
|
@@ -1575,9 +1599,24 @@ function render(ctx, data) {
|
|
|
1575
1599
|
const specific = SPECIFIC_RENDERERS[ctx.kind];
|
|
1576
1600
|
if (specific) {
|
|
1577
1601
|
specific(target, ctx.display);
|
|
1578
|
-
|
|
1602
|
+
} else {
|
|
1603
|
+
renderGeneric(target, ctx.display);
|
|
1604
|
+
}
|
|
1605
|
+
renderPaginationFooter(data);
|
|
1606
|
+
}
|
|
1607
|
+
function renderPaginationFooter(data) {
|
|
1608
|
+
if (data === null || typeof data !== "object") return;
|
|
1609
|
+
const d = data;
|
|
1610
|
+
if (typeof d.next_cursor === "string" && d.next_cursor.length > 0) {
|
|
1611
|
+
process.stdout.write(dim(` \u2026 more results \u2014 re-run with --cursor ${d.next_cursor}`) + "\n");
|
|
1612
|
+
}
|
|
1613
|
+
const id = typeof d.id === "string" ? d.id : "<id>";
|
|
1614
|
+
if (typeof d.children_next_cursor === "string" && d.children_next_cursor.length > 0) {
|
|
1615
|
+
process.stdout.write(dim(` \u2026 more children \u2014 wspc todo ls --parent ${id}`) + "\n");
|
|
1616
|
+
}
|
|
1617
|
+
if (typeof d.comments_next_cursor === "string" && d.comments_next_cursor.length > 0) {
|
|
1618
|
+
process.stdout.write(dim(` \u2026 more comments \u2014 wspc todo comment ls ${id}`) + "\n");
|
|
1579
1619
|
}
|
|
1580
|
-
renderGeneric(target, ctx.display);
|
|
1581
1620
|
}
|
|
1582
1621
|
function drillDataPath(data, dataPath) {
|
|
1583
1622
|
if (!dataPath) return data;
|
|
@@ -1850,7 +1889,7 @@ var inviteAcceptCommand = new Command("accept").description("Accept an invite an
|
|
|
1850
1889
|
|
|
1851
1890
|
// src/generated/cli/keys/create.ts
|
|
1852
1891
|
import { Command as Command2 } from "commander";
|
|
1853
|
-
var keyCreateCommand = new Command2("create").description("Create a new API key (full value returned once)").option("--label <value>", "label").action(async (opts) => {
|
|
1892
|
+
var keyCreateCommand = new Command2("create").description("Create a new API key (full value returned once)").option("--label <value>", "Human-readable label for the new key (1\u201360 chars after trimming). Pick something that identifies where the key will live \u2014 agent name, machine, or environment \u2014 so you can recognise it later in `wspc keys list`.").action(async (opts) => {
|
|
1854
1893
|
const client2 = await loadSdkClient();
|
|
1855
1894
|
const result = await keyCreate({
|
|
1856
1895
|
client: client2._rawClient,
|
|
@@ -1889,7 +1928,7 @@ var keyListCommand = new Command3("ls").description("List active API keys").acti
|
|
|
1889
1928
|
|
|
1890
1929
|
// src/generated/cli/org/invite.ts
|
|
1891
1930
|
import { Command as Command4 } from "commander";
|
|
1892
|
-
var orgInviteCreateCommand = new Command4("invite").description("Invite an email to join the caller's organization").option("--email <value>", "
|
|
1931
|
+
var orgInviteCreateCommand = new Command4("invite").description("Invite an email to join the caller's organization").option("--email <value>", "Email address to invite into the caller's organization.").action(async (opts) => {
|
|
1893
1932
|
const client2 = await loadSdkClient();
|
|
1894
1933
|
const result = await orgInviteCreate({
|
|
1895
1934
|
client: client2._rawClient,
|
|
@@ -1946,7 +1985,7 @@ var orgGetCommand = new Command6("show").description("Get the authenticated user
|
|
|
1946
1985
|
|
|
1947
1986
|
// src/generated/cli/org/rename.ts
|
|
1948
1987
|
import { Command as Command7 } from "commander";
|
|
1949
|
-
var orgUpdateCommand = new Command7("rename").description("Update the authenticated user's organization").option("--name <value>", "name").action(async (opts) => {
|
|
1988
|
+
var orgUpdateCommand = new Command7("rename").description("Update the authenticated user's organization").option("--name <value>", "The new name for the organization. Cannot be empty or purely whitespace.").action(async (opts) => {
|
|
1950
1989
|
const client2 = await loadSdkClient();
|
|
1951
1990
|
const result = await orgUpdate({
|
|
1952
1991
|
client: client2._rawClient,
|
|
@@ -2024,7 +2063,7 @@ var invitesListCommand = new Command10("invites").description("List invites addr
|
|
|
2024
2063
|
|
|
2025
2064
|
// src/generated/cli/org/members.ts
|
|
2026
2065
|
import { Command as Command11 } from "commander";
|
|
2027
|
-
var orgMembersListCommand = new Command11("members").description("List members of the authenticated user's organization").option("--cursor <value>", "cursor").option("--limit <value>", "
|
|
2066
|
+
var orgMembersListCommand = new Command11("members").description("List members of the authenticated user's organization").option("--cursor <value>", "Opaque pagination cursor. Pass the `next_cursor` returned by the previous page to fetch the next slice. Omit on the first call.").option("--limit <value>", "Maximum members to return. Clamped to [1, 100]. Defaults to 50.").action(async (opts) => {
|
|
2028
2067
|
const client2 = await loadSdkClient();
|
|
2029
2068
|
const result = await orgMembersList({
|
|
2030
2069
|
client: client2._rawClient,
|
|
@@ -2088,7 +2127,7 @@ var keyRevokeCommand = new Command13("rm").description("Soft-revoke an API key")
|
|
|
2088
2127
|
|
|
2089
2128
|
// src/generated/cli/keys/edit.ts
|
|
2090
2129
|
import { Command as Command14 } from "commander";
|
|
2091
|
-
var keyUpdateCommand = new Command14("edit").description("Update an active API key's label").argument("<id>", "id").option("--label <value>", "label").action(async (id, opts) => {
|
|
2130
|
+
var keyUpdateCommand = new Command14("edit").description("Update an active API key's label").argument("<id>", "id").option("--label <value>", "Human-readable label for the key (1\u201360 chars after trimming).").action(async (id, opts) => {
|
|
2092
2131
|
const client2 = await loadSdkClient();
|
|
2093
2132
|
const result = await keyUpdate({
|
|
2094
2133
|
client: client2._rawClient,
|
|
@@ -2218,7 +2257,7 @@ function parseAttendee(input) {
|
|
|
2218
2257
|
}
|
|
2219
2258
|
|
|
2220
2259
|
// src/generated/cli/event/add.ts
|
|
2221
|
-
var eventCreateCommand = new Command16("add").description("Schedule a calendar event").argument("<title>", "title").option("--description <value>", "
|
|
2260
|
+
var eventCreateCommand = new Command16("add").description("Schedule a calendar event").argument("<title>", "title").option("--description <value>", "Free-form notes about the event (agenda, dial-in instructions, etc.). Markdown formatted (CommonMark + GFM tables, strikethrough, task lists); stored verbatim. Invitation emails include the raw source \u2014 most email clients display it as plain text.").option("--start <value>", "Accepts ISO 8601 datetime with offset (e.g. `2026-06-01T12:30:00+08:00`) for timed events, or ISO date-only (e.g. `2026-06-01`) for all-day. The `wspc` CLI additionally accepts natural-language phrases (`tomorrow 12:30pm`, `next Monday 9am`) and resolves them to ISO before sending; the server itself only accepts ISO. All-day uses RFC 5545 exclusive end: a one-day event on 6/1 is `start=2026-06-01, end=2026-06-02`; both endpoints must be the same type.").option("--end <value>", "Accepts ISO 8601 datetime with offset (e.g. `2026-06-01T12:30:00+08:00`) for timed events, or ISO date-only (e.g. `2026-06-01`) for all-day. The `wspc` CLI additionally accepts natural-language phrases (`tomorrow 12:30pm`, `next Monday 9am`) and resolves them to ISO before sending; the server itself only accepts ISO. All-day uses RFC 5545 exclusive end: a one-day event on 6/1 is `start=2026-06-01, end=2026-06-02`; both endpoints must be the same type.").option("-l, --location <value>", "Free-text location \u2014 physical address, room, or short note. Separate from `url` (meeting link).").option("-u, --url <value>", "Optional meeting link (Zoom / Meet / etc.). Kept separate from `location` so calendar clients can render it as a join action.").option("--status <value>", "Lifecycle status. `confirmed`: the event will happen (default). `tentative`: organizer has not finalized; still visible in lists. `cancelled`: the event was called off but the record is kept so attendees can be notified and history audited; distinct from soft-delete (DELETE `/calendar/events/{id}`) which hides the event from default list responses.").option("--attendee <value>", "Up to 50 unique attendees (deduped case-insensitively by email). If non-empty, each attendee receives an invitation email with an `.ics` REQUEST attachment as a side effect of creation.", (val, memo) => {
|
|
2222
2261
|
memo.push(val);
|
|
2223
2262
|
return memo;
|
|
2224
2263
|
}, []).option("--all-day", "all_day").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (title, opts) => {
|
|
@@ -2268,7 +2307,7 @@ var eventCreateCommand = new Command16("add").description("Schedule a calendar e
|
|
|
2268
2307
|
|
|
2269
2308
|
// src/generated/cli/event/ls.ts
|
|
2270
2309
|
import { Command as Command17 } from "commander";
|
|
2271
|
-
var eventListCommand = new Command17("ls").description("List calendar events").option("--q <value>", "
|
|
2310
|
+
var eventListCommand = new Command17("ls").description("List calendar events").option("--q <value>", "Optional full-text search across title, description, and location (case-insensitive substring).").option("--from <value>", "Inclusive lower bound on the event `start` (ISO datetime with offset, or ISO date-only). When ANY of `start_from`/`start_to`/`end_from`/`end_to` is provided, the implicit past filter is disabled.").option("--to <value>", "Inclusive upper bound on the event `start`.").option("--end-from <value>", "Inclusive lower bound on the event `end`.").option("--end-to <value>", "Inclusive upper bound on the event `end`.").option("--cursor <value>", "Opaque pagination cursor returned in `next_cursor` of a previous response.").option("--limit <value>", "Maximum number of events to return. Clamped to `[1, 200]`. Default is server-defined.").option("--include-deleted <value>", "When `true`, include soft-deleted events. Default `false`.").option("--include-past <value>", "When omitted or `false`, events whose `end` is before now are hidden. Pass `true` to include them. Ignored when any of `start_from`/`start_to`/`end_from`/`end_to` is provided \u2014 explicit time bounds always win.").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (opts) => {
|
|
2272
2311
|
const zone = resolveTimezone(opts.tz);
|
|
2273
2312
|
let fromValue;
|
|
2274
2313
|
if (opts.from !== void 0) {
|
|
@@ -2306,7 +2345,7 @@ var eventListCommand = new Command17("ls").description("List calendar events").o
|
|
|
2306
2345
|
|
|
2307
2346
|
// src/generated/cli/event/rm.ts
|
|
2308
2347
|
import { Command as Command18 } from "commander";
|
|
2309
|
-
var eventDeleteCommand = new Command18("rm").description("Soft-delete a calendar event").argument("<id>", "id").option("--expected-version <value>", "
|
|
2348
|
+
var eventDeleteCommand = new Command18("rm").description("Soft-delete a calendar event").argument("<id>", "id").option("--expected-version <value>", "Optional optimistic lock. Omit to let the server use the current version; pass only to fail with 409 `VERSION_CONFLICT` if someone else has mutated the event since you last read.").action(async (id, opts) => {
|
|
2310
2349
|
const client2 = await loadSdkClient();
|
|
2311
2350
|
const result = await eventDelete({
|
|
2312
2351
|
client: client2._rawClient,
|
|
@@ -2330,7 +2369,7 @@ var eventDeleteCommand = new Command18("rm").description("Soft-delete a calendar
|
|
|
2330
2369
|
|
|
2331
2370
|
// src/generated/cli/event/show.ts
|
|
2332
2371
|
import { Command as Command19 } from "commander";
|
|
2333
|
-
var eventGetCommand = new Command19("show").description("Get a calendar event by id").argument("<id>", "id").option("--include-deleted <value>", "
|
|
2372
|
+
var eventGetCommand = new Command19("show").description("Get a calendar event by id").argument("<id>", "id").option("--include-deleted <value>", "When `true`, return the row even if soft-deleted. Default `false` (returns 404).").action(async (id, opts) => {
|
|
2334
2373
|
const client2 = await loadSdkClient();
|
|
2335
2374
|
const result = await eventGet({
|
|
2336
2375
|
client: client2._rawClient,
|
|
@@ -2354,7 +2393,7 @@ var eventGetCommand = new Command19("show").description("Get a calendar event by
|
|
|
2354
2393
|
|
|
2355
2394
|
// src/generated/cli/event/set.ts
|
|
2356
2395
|
import { Command as Command20 } from "commander";
|
|
2357
|
-
var eventUpdateCommand = new Command20("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>", "
|
|
2396
|
+
var eventUpdateCommand = new Command20("set").description("Update a calendar event").argument("<id>", "id").option("--expected-version <value>", "Optional optimistic lock. Omit to let the server use the current version; pass only to fail the call if someone else has mutated the event since you last read. On mismatch the server returns 409 `VERSION_CONFLICT` with `extra.expected_version` and `extra.actual_version`.").option("--title <value>", "New event title. Omit to leave unchanged.").option("--description <value>", "New description. Markdown formatted (CommonMark + GFM tables, strikethrough, task lists). Pass an empty string to clear; omit to leave unchanged.").option("--start <value>", "Accepts ISO 8601 datetime with offset (e.g. `2026-06-01T12:30:00+08:00`) for timed events, or ISO date-only (e.g. `2026-06-01`) for all-day. The `wspc` CLI additionally accepts natural-language phrases (`tomorrow 12:30pm`, `next Monday 9am`) and resolves them to ISO before sending; the server itself only accepts ISO. All-day uses RFC 5545 exclusive end: a one-day event on 6/1 is `start=2026-06-01, end=2026-06-02`; both endpoints must be the same type.").option("--end <value>", "Accepts ISO 8601 datetime with offset (e.g. `2026-06-01T12:30:00+08:00`) for timed events, or ISO date-only (e.g. `2026-06-01`) for all-day. The `wspc` CLI additionally accepts natural-language phrases (`tomorrow 12:30pm`, `next Monday 9am`) and resolves them to ISO before sending; the server itself only accepts ISO. All-day uses RFC 5545 exclusive end: a one-day event on 6/1 is `start=2026-06-01, end=2026-06-02`; both endpoints must be the same type.").option("-l, --location <value>", "New location. Pass an empty string to clear; omit to leave unchanged.").option("-u, --url <value>", "New meeting link. Pass an empty string to clear; omit to leave unchanged.").option("--status <value>", "Lifecycle status. `confirmed`: the event will happen (default). `tentative`: organizer has not finalized; still visible in lists. `cancelled`: the event was called off but the record is kept so attendees can be notified and history audited; distinct from soft-delete (DELETE `/calendar/events/{id}`) which hides the event from default list responses.").option("--attendee <value>", "If provided, REPLACES the attendee list (after case-insensitive email dedupe, up to 50). Added attendees receive a fresh invitation, kept attendees receive an update email, removed attendees receive a cancellation.", (val, memo) => {
|
|
2358
2397
|
memo.push(val);
|
|
2359
2398
|
return memo;
|
|
2360
2399
|
}, []).option("--all-day", "all_day").option("--tz <zone>", "IANA timezone for relative time parsing").action(async (id, opts) => {
|
|
@@ -2450,7 +2489,7 @@ var emailAliasCreateCommand = new Command22("add").description("Create a receivi
|
|
|
2450
2489
|
|
|
2451
2490
|
// src/generated/cli/alias/ls.ts
|
|
2452
2491
|
import { Command as Command23 } from "commander";
|
|
2453
|
-
var emailAliasListCommand = new Command23("ls").description("List the caller's aliases").option("--include-deleted <value>", "
|
|
2492
|
+
var emailAliasListCommand = new Command23("ls").description("List the caller's aliases").option("--include-deleted <value>", "When `true`, include soft-deleted aliases (with `deleted_at` set) alongside active ones. Defaults to `false`.").action(async (opts) => {
|
|
2454
2493
|
const client2 = await loadSdkClient();
|
|
2455
2494
|
const result = await emailAliasList({
|
|
2456
2495
|
client: client2._rawClient,
|
|
@@ -2469,9 +2508,48 @@ var emailAliasListCommand = new Command23("ls").description("List the caller's a
|
|
|
2469
2508
|
render({ kind: "email_alias_list", display: { "shape": "list", "columns": ["id", "email", "label", "created_at"], "format": { "id": "id-short", "label": "truncate", "created_at": "relative-time" }, "emptyMessage": "no aliases" } }, result.data);
|
|
2470
2509
|
});
|
|
2471
2510
|
|
|
2472
|
-
// src/generated/cli/
|
|
2511
|
+
// src/generated/cli/domain/add.ts
|
|
2473
2512
|
import { Command as Command24 } from "commander";
|
|
2474
|
-
var
|
|
2513
|
+
var emailDomainCreateCommand = new Command24("add").description("Register a custom email domain").argument("<domain>", "domain").action(async (domain, opts) => {
|
|
2514
|
+
const client2 = await loadSdkClient();
|
|
2515
|
+
const result = await emailDomainCreate({
|
|
2516
|
+
client: client2._rawClient,
|
|
2517
|
+
body: {
|
|
2518
|
+
domain
|
|
2519
|
+
}
|
|
2520
|
+
});
|
|
2521
|
+
if (result.error || !result.response?.ok) {
|
|
2522
|
+
process.stderr.write(
|
|
2523
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2524
|
+
`
|
|
2525
|
+
);
|
|
2526
|
+
process.exitCode = 1;
|
|
2527
|
+
return;
|
|
2528
|
+
}
|
|
2529
|
+
render({ kind: "email_domain_create", display: { "shape": "object", "format": { "created_at": "relative-time", "updated_at": "relative-time", "verified_at": "relative-time" }, "dataPath": "domain" } }, result.data);
|
|
2530
|
+
});
|
|
2531
|
+
|
|
2532
|
+
// src/generated/cli/domain/ls.ts
|
|
2533
|
+
import { Command as Command25 } from "commander";
|
|
2534
|
+
var emailDomainListCommand = new Command25("ls").description("List cached custom domains").action(async (opts) => {
|
|
2535
|
+
const client2 = await loadSdkClient();
|
|
2536
|
+
const result = await emailDomainList({
|
|
2537
|
+
client: client2._rawClient
|
|
2538
|
+
});
|
|
2539
|
+
if (result.error || !result.response?.ok) {
|
|
2540
|
+
process.stderr.write(
|
|
2541
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2542
|
+
`
|
|
2543
|
+
);
|
|
2544
|
+
process.exitCode = 1;
|
|
2545
|
+
return;
|
|
2546
|
+
}
|
|
2547
|
+
render({ kind: "email_domain_list", display: { "shape": "list", "columns": ["domain", "status", "sending_status", "receiving_status", "updated_at"], "format": { "updated_at": "relative-time", "verified_at": "relative-time" }, "emptyMessage": "no domains", "dataPath": "domains" } }, result.data);
|
|
2548
|
+
});
|
|
2549
|
+
|
|
2550
|
+
// src/generated/cli/alias/rm.ts
|
|
2551
|
+
import { Command as Command26 } from "commander";
|
|
2552
|
+
var emailAliasDeleteCommand = new Command26("rm").description("Soft-delete an alias").argument("<email>", "email").action(async (email, opts) => {
|
|
2475
2553
|
const client2 = await loadSdkClient();
|
|
2476
2554
|
const result = await emailAliasDelete({
|
|
2477
2555
|
client: client2._rawClient,
|
|
@@ -2491,8 +2569,8 @@ var emailAliasDeleteCommand = new Command24("rm").description("Soft-delete an al
|
|
|
2491
2569
|
});
|
|
2492
2570
|
|
|
2493
2571
|
// src/generated/cli/email/rm.ts
|
|
2494
|
-
import { Command as
|
|
2495
|
-
var emailDeleteCommand = new
|
|
2572
|
+
import { Command as Command27 } from "commander";
|
|
2573
|
+
var emailDeleteCommand = new Command27("rm").description("Soft-delete inbound emails").argument("<id...>", "id").action(async (id, opts) => {
|
|
2496
2574
|
const idRaw = id;
|
|
2497
2575
|
const ids = idRaw.length > 0 ? idRaw : void 0;
|
|
2498
2576
|
const client2 = await loadSdkClient();
|
|
@@ -2513,9 +2591,30 @@ var emailDeleteCommand = new Command25("rm").description("Soft-delete inbound em
|
|
|
2513
2591
|
render({ kind: "email_delete", display: { "shape": "object", "format": {} } }, result.data);
|
|
2514
2592
|
});
|
|
2515
2593
|
|
|
2594
|
+
// src/generated/cli/domain/show.ts
|
|
2595
|
+
import { Command as Command28 } from "commander";
|
|
2596
|
+
var emailDomainGetCommand = new Command28("show").description("Get one cached custom domain").argument("<domain>", "domain").action(async (domain, opts) => {
|
|
2597
|
+
const client2 = await loadSdkClient();
|
|
2598
|
+
const result = await emailDomainGet({
|
|
2599
|
+
client: client2._rawClient,
|
|
2600
|
+
path: {
|
|
2601
|
+
domain
|
|
2602
|
+
}
|
|
2603
|
+
});
|
|
2604
|
+
if (result.error || !result.response?.ok) {
|
|
2605
|
+
process.stderr.write(
|
|
2606
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2607
|
+
`
|
|
2608
|
+
);
|
|
2609
|
+
process.exitCode = 1;
|
|
2610
|
+
return;
|
|
2611
|
+
}
|
|
2612
|
+
render({ kind: "email_domain_get", display: { "shape": "object", "format": { "created_at": "relative-time", "updated_at": "relative-time", "verified_at": "relative-time" }, "dataPath": "domain" } }, result.data);
|
|
2613
|
+
});
|
|
2614
|
+
|
|
2516
2615
|
// src/generated/cli/email/show.ts
|
|
2517
|
-
import { Command as
|
|
2518
|
-
var emailGetCommand = new
|
|
2616
|
+
import { Command as Command29 } from "commander";
|
|
2617
|
+
var emailGetCommand = new Command29("show").description("Get an inbound email by id").argument("<id>", "id").option("--include-html <value>", "When `true`, fetch the HTML body from R2 and include it as `html_body` in the response. Costs an extra R2 read; omit if you only need text.").option("--include-deleted <value>", "When `true`, allow fetching a soft-deleted email. Defaults to `false` (returns 404 for soft-deleted rows).").action(async (id, opts) => {
|
|
2519
2618
|
const client2 = await loadSdkClient();
|
|
2520
2619
|
const result = await emailGet({
|
|
2521
2620
|
client: client2._rawClient,
|
|
@@ -2539,8 +2638,8 @@ var emailGetCommand = new Command26("show").description("Get an inbound email by
|
|
|
2539
2638
|
});
|
|
2540
2639
|
|
|
2541
2640
|
// src/generated/cli/email/ls.ts
|
|
2542
|
-
import { Command as
|
|
2543
|
-
var emailListCommand = new
|
|
2641
|
+
import { Command as Command30 } from "commander";
|
|
2642
|
+
var emailListCommand = new Command30("ls").description("List inbound emails").option("--limit <value>", "Max items to return (clamped to 1-100). Defaults to 20 server-side.").option("--alias-email <value>", "If set, only return emails received on this full alias email address.").option("--unread-only <value>", "When `true`, only return emails with `is_read=false`.").option("--since <value>", "Unix epoch milliseconds \u2014 only return emails with `received_at >= since`. Useful for incremental sync.").option("--cursor <value>", "Opaque pagination cursor returned in `next_cursor` of a previous response.").option("--include-deleted <value>", "When `true`, also return soft-deleted emails. Defaults to `false`.").action(async (opts) => {
|
|
2544
2643
|
const client2 = await loadSdkClient();
|
|
2545
2644
|
const result = await emailList({
|
|
2546
2645
|
client: client2._rawClient,
|
|
@@ -2565,8 +2664,8 @@ var emailListCommand = new Command27("ls").description("List inbound emails").op
|
|
|
2565
2664
|
});
|
|
2566
2665
|
|
|
2567
2666
|
// src/generated/cli/email/read.ts
|
|
2568
|
-
import { Command as
|
|
2569
|
-
var emailMarkReadCommand = new
|
|
2667
|
+
import { Command as Command31 } from "commander";
|
|
2668
|
+
var emailMarkReadCommand = new Command31("read").description("Mark inbound emails as read").argument("<id...>", "id").action(async (id, opts) => {
|
|
2570
2669
|
const idRaw = id;
|
|
2571
2670
|
const ids = idRaw.length > 0 ? idRaw : void 0;
|
|
2572
2671
|
const client2 = await loadSdkClient();
|
|
@@ -2588,8 +2687,8 @@ var emailMarkReadCommand = new Command28("read").description("Mark inbound email
|
|
|
2588
2687
|
});
|
|
2589
2688
|
|
|
2590
2689
|
// src/generated/cli/email/unread.ts
|
|
2591
|
-
import { Command as
|
|
2592
|
-
var emailMarkUnreadCommand = new
|
|
2690
|
+
import { Command as Command32 } from "commander";
|
|
2691
|
+
var emailMarkUnreadCommand = new Command32("unread").description("Mark inbound emails as unread").argument("<id...>", "id").action(async (id, opts) => {
|
|
2593
2692
|
const idRaw = id;
|
|
2594
2693
|
const ids = idRaw.length > 0 ? idRaw : void 0;
|
|
2595
2694
|
const client2 = await loadSdkClient();
|
|
@@ -2610,9 +2709,30 @@ var emailMarkUnreadCommand = new Command29("unread").description("Mark inbound e
|
|
|
2610
2709
|
render({ kind: "email_mark_unread", display: { "shape": "object", "format": {} } }, result.data);
|
|
2611
2710
|
});
|
|
2612
2711
|
|
|
2712
|
+
// src/generated/cli/domain/verify.ts
|
|
2713
|
+
import { Command as Command33 } from "commander";
|
|
2714
|
+
var emailDomainVerifyCommand = new Command33("verify").description("Verify a custom domain with the provider").argument("<domain>", "domain").action(async (domain, opts) => {
|
|
2715
|
+
const client2 = await loadSdkClient();
|
|
2716
|
+
const result = await emailDomainVerify({
|
|
2717
|
+
client: client2._rawClient,
|
|
2718
|
+
path: {
|
|
2719
|
+
domain
|
|
2720
|
+
}
|
|
2721
|
+
});
|
|
2722
|
+
if (result.error || !result.response?.ok) {
|
|
2723
|
+
process.stderr.write(
|
|
2724
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2725
|
+
`
|
|
2726
|
+
);
|
|
2727
|
+
process.exitCode = 1;
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
render({ kind: "email_domain_verify", display: { "shape": "object", "format": { "created_at": "relative-time", "updated_at": "relative-time", "verified_at": "relative-time" }, "dataPath": "domain" } }, result.data);
|
|
2731
|
+
});
|
|
2732
|
+
|
|
2613
2733
|
// src/generated/cli/push/config/rm.ts
|
|
2614
|
-
import { Command as
|
|
2615
|
-
var pushConfigDeleteCommand = new
|
|
2734
|
+
import { Command as Command34 } from "commander";
|
|
2735
|
+
var pushConfigDeleteCommand = new Command34("rm").description("Remove a push transport").argument("<transport>", "transport").action(async (transport, opts) => {
|
|
2616
2736
|
const client2 = await loadSdkClient();
|
|
2617
2737
|
const result = await pushConfigDelete({
|
|
2618
2738
|
client: client2._rawClient,
|
|
@@ -2632,8 +2752,8 @@ var pushConfigDeleteCommand = new Command30("rm").description("Remove a push tra
|
|
|
2632
2752
|
});
|
|
2633
2753
|
|
|
2634
2754
|
// src/generated/cli/push/config/set.ts
|
|
2635
|
-
import { Command as
|
|
2636
|
-
var pushConfigSetCommand = new
|
|
2755
|
+
import { Command as Command35 } from "commander";
|
|
2756
|
+
var pushConfigSetCommand = new Command35("set").description("Register or update a push transport").option("--transport <value>", "Transport discriminator. `telegram` is the only supported value today \u2014 push delivers via a Telegram bot DM. Future transports (web push, iOS/Android, generic webhook) will be added as additional discriminator values.").option("--target-bot-username <value>", "Telegram bot username (with leading `@`, 5\u201332 alphanumeric/underscore characters). This is the bot the user has already started a chat with \u2014 wspc DMs notifications to it via the Telegram Bot API.").action(async (opts) => {
|
|
2637
2757
|
const client2 = await loadSdkClient();
|
|
2638
2758
|
const result = await pushConfigSet({
|
|
2639
2759
|
client: client2._rawClient,
|
|
@@ -2656,8 +2776,8 @@ var pushConfigSetCommand = new Command31("set").description("Register or update
|
|
|
2656
2776
|
});
|
|
2657
2777
|
|
|
2658
2778
|
// src/generated/cli/push/config/show.ts
|
|
2659
|
-
import { Command as
|
|
2660
|
-
var pushConfigGetCommand = new
|
|
2779
|
+
import { Command as Command36 } from "commander";
|
|
2780
|
+
var pushConfigGetCommand = new Command36("show").description("List the caller's push transports").action(async (opts) => {
|
|
2661
2781
|
const client2 = await loadSdkClient();
|
|
2662
2782
|
const result = await pushConfigGet({
|
|
2663
2783
|
client: client2._rawClient
|
|
@@ -2674,8 +2794,8 @@ var pushConfigGetCommand = new Command32("show").description("List the caller's
|
|
|
2674
2794
|
});
|
|
2675
2795
|
|
|
2676
2796
|
// src/generated/cli/push/test.ts
|
|
2677
|
-
import { Command as
|
|
2678
|
-
var pushTestCommand = new
|
|
2797
|
+
import { Command as Command37 } from "commander";
|
|
2798
|
+
var pushTestCommand = new Command37("test").description("Send a test push notification").option("--transport <value>", "Which transport to send the test message through. Must match a transport the caller has already registered via `POST /push/config`; today only `telegram` is supported.").action(async (opts) => {
|
|
2679
2799
|
const client2 = await loadSdkClient();
|
|
2680
2800
|
const result = await pushTest({
|
|
2681
2801
|
client: client2._rawClient,
|
|
@@ -2698,8 +2818,8 @@ var pushTestCommand = new Command33("test").description("Send a test push notifi
|
|
|
2698
2818
|
});
|
|
2699
2819
|
|
|
2700
2820
|
// src/generated/cli/todo/comment/add.ts
|
|
2701
|
-
import { Command as
|
|
2702
|
-
var todoCommentCreateCommand = new
|
|
2821
|
+
import { Command as Command38 } from "commander";
|
|
2822
|
+
var todoCommentCreateCommand = new Command38("add").description("Add a comment to a todo").argument("<id>", "id").argument("<content>", "content").action(async (id, content, opts) => {
|
|
2703
2823
|
const client2 = await loadSdkClient();
|
|
2704
2824
|
const result = await todoCommentCreate({
|
|
2705
2825
|
client: client2._rawClient,
|
|
@@ -2722,8 +2842,8 @@ var todoCommentCreateCommand = new Command34("add").description("Add a comment t
|
|
|
2722
2842
|
});
|
|
2723
2843
|
|
|
2724
2844
|
// src/generated/cli/todo/comment/ls.ts
|
|
2725
|
-
import { Command as
|
|
2726
|
-
var todoCommentListCommand = new
|
|
2845
|
+
import { Command as Command39 } from "commander";
|
|
2846
|
+
var todoCommentListCommand = new Command39("ls").description("List comments on a todo").argument("<id>", "id").option("--order <value>", "order").option("--include-deleted <value>", "include_deleted").option("--limit <value>", "Max comments to return. Clamped to [1, 200]. Default 50 server-side.").option("--cursor <value>", "Opaque pagination cursor returned in `next_cursor` of a previous response.").action(async (id, opts) => {
|
|
2727
2847
|
const client2 = await loadSdkClient();
|
|
2728
2848
|
const result = await todoCommentList({
|
|
2729
2849
|
client: client2._rawClient,
|
|
@@ -2749,8 +2869,8 @@ var todoCommentListCommand = new Command35("ls").description("List comments on a
|
|
|
2749
2869
|
});
|
|
2750
2870
|
|
|
2751
2871
|
// src/generated/cli/todo/project/add.ts
|
|
2752
|
-
import { Command as
|
|
2753
|
-
var projectCreateCommand = new
|
|
2872
|
+
import { Command as Command40 } from "commander";
|
|
2873
|
+
var projectCreateCommand = new Command40("add").description("Create a project").argument("<name>", "name").option("--default-todo-type-id <value>", "default_todo_type_id").action(async (name, opts) => {
|
|
2754
2874
|
const client2 = await loadSdkClient();
|
|
2755
2875
|
const result = await projectCreate({
|
|
2756
2876
|
client: client2._rawClient,
|
|
@@ -2771,8 +2891,8 @@ var projectCreateCommand = new Command36("add").description("Create a project").
|
|
|
2771
2891
|
});
|
|
2772
2892
|
|
|
2773
2893
|
// src/generated/cli/todo/project/ls.ts
|
|
2774
|
-
import { Command as
|
|
2775
|
-
var projectListCommand = new
|
|
2894
|
+
import { Command as Command41 } from "commander";
|
|
2895
|
+
var projectListCommand = new Command41("ls").description("List projects").option("--include-deleted <value>", "Set to `true` to include soft-deleted projects in the response.").action(async (opts) => {
|
|
2776
2896
|
const client2 = await loadSdkClient();
|
|
2777
2897
|
const result = await projectList({
|
|
2778
2898
|
client: client2._rawClient,
|
|
@@ -2792,8 +2912,8 @@ var projectListCommand = new Command37("ls").description("List projects").option
|
|
|
2792
2912
|
});
|
|
2793
2913
|
|
|
2794
2914
|
// src/generated/cli/todo/rule/ls.ts
|
|
2795
|
-
import { Command as
|
|
2796
|
-
var recurrenceRuleListCommand = new
|
|
2915
|
+
import { Command as Command42 } from "commander";
|
|
2916
|
+
var recurrenceRuleListCommand = new Command42("ls").description("List recurring todo rules").option("--project-id <value>", "Project id filter. Required. Unknown, cross-organization, or soft-deleted project ids return NOT_FOUND.").option("--user-id <value>", "user_id").action(async (opts) => {
|
|
2797
2917
|
const client2 = await loadSdkClient();
|
|
2798
2918
|
const result = await recurrenceRuleList({
|
|
2799
2919
|
client: client2._rawClient,
|
|
@@ -2814,8 +2934,8 @@ var recurrenceRuleListCommand = new Command38("ls").description("List recurring
|
|
|
2814
2934
|
});
|
|
2815
2935
|
|
|
2816
2936
|
// src/generated/cli/todo/add.ts
|
|
2817
|
-
import { Command as
|
|
2818
|
-
var todoCreateCommand = new
|
|
2937
|
+
import { Command as Command43 } from "commander";
|
|
2938
|
+
var todoCreateCommand = new Command43("add").description("Create a todo").argument("<title>", "title").option("-p, --project <value>", "Project id to assign this todo to. It must be an active project in the caller's organization.").option("--description <value>", "Free-form details about the todo. Fully supports GFM Markdown (tables, strikethrough, task lists). Stored verbatim; client applications are responsible for rendering. Optional. Passing `null` is strictly rejected.").option("--parent-id <value>", "Parent todo ID (`tod_<ULID>`) to attach this todo as a child under another todo. Omit or pass `null` to create a root-level todo. Nesting is limited to one level; attempting to set a child todo as a parent will trigger `PARENT_IS_CHILD`.").option("--status <value>", "Initial status of the todo. Omit to default to `open`. Allowed values: `open`, `in_progress`, `done`, `cancelled`.").option("--due-at <value>", 'Optional calendar due date in ISO date-only format (`YYYY-MM-DD`). Stored without timezone offsets to represent the same local calendar day globally. Pass `""` or omit the field to skip setting a due date. Passing `null` is strictly rejected.').option("--type-id <value>", "Type id this todo belongs to. Omit to use the project's default type. When project_id is also supplied, the type must belong to the same project. New server-generated type ids use typ_<ULID>; legacy ids remain accepted.").option("--custom-fields <value>", "Custom field values keyed by the field's immutable `key` (not the human `label`). Each value must match the declared field type: string fields require string values, and string_array fields require string arrays. Providing a key that is not declared on the resolved todo type is strictly rejected with `UNDECLARED_FIELD`. Missing required fields that lack a default value are rejected with `FIELD_REQUIRED`. Defaults declared on the type are auto-applied at create time.").action(async (title, opts) => {
|
|
2819
2939
|
const client2 = await loadSdkClient();
|
|
2820
2940
|
const result = await todoCreate({
|
|
2821
2941
|
client: client2._rawClient,
|
|
@@ -2842,8 +2962,8 @@ var todoCreateCommand = new Command39("add").description("Create a todo").argume
|
|
|
2842
2962
|
});
|
|
2843
2963
|
|
|
2844
2964
|
// src/generated/cli/todo/ls.ts
|
|
2845
|
-
import { Command as
|
|
2846
|
-
var todoListCommand = new
|
|
2965
|
+
import { Command as Command44 } from "commander";
|
|
2966
|
+
var todoListCommand = new Command44("ls").description("List todos with filters").option("-p, --project <value>", "Filter by project. Required. Unknown, cross-organization, or soft-deleted project ids return NOT_FOUND.").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").option("--limit <value>", "Max todos to return. Clamped to [1, 200]. Default 50 server-side.").option("--cursor <value>", "Opaque pagination cursor returned in `next_cursor` of a previous response.").action(async (opts) => {
|
|
2847
2967
|
const client2 = await loadSdkClient();
|
|
2848
2968
|
const result = await todoList({
|
|
2849
2969
|
client: client2._rawClient,
|
|
@@ -2876,8 +2996,8 @@ var todoListCommand = new Command40("ls").description("List todos with filters")
|
|
|
2876
2996
|
});
|
|
2877
2997
|
|
|
2878
2998
|
// src/generated/cli/todo/type/ls.ts
|
|
2879
|
-
import { Command as
|
|
2880
|
-
var todoTypeListCommand = new
|
|
2999
|
+
import { Command as Command45 } from "commander";
|
|
3000
|
+
var todoTypeListCommand = new Command45("ls").description("List todo types").option("--project-id <value>", "Project id filter. Required. Unknown, cross-organization, or soft-deleted project ids return NOT_FOUND.").option("--user-id <value>", "user_id").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
|
|
2881
3001
|
const client2 = await loadSdkClient();
|
|
2882
3002
|
const result = await todoTypeList({
|
|
2883
3003
|
client: client2._rawClient,
|
|
@@ -2899,8 +3019,8 @@ var todoTypeListCommand = new Command41("ls").description("List todo types").opt
|
|
|
2899
3019
|
});
|
|
2900
3020
|
|
|
2901
3021
|
// src/generated/cli/todo/comment/rm.ts
|
|
2902
|
-
import { Command as
|
|
2903
|
-
var todoCommentDeleteCommand = new
|
|
3022
|
+
import { Command as Command46 } from "commander";
|
|
3023
|
+
var todoCommentDeleteCommand = new Command46("rm").description("Soft-delete a comment").argument("<id>", "id").action(async (id, opts) => {
|
|
2904
3024
|
const client2 = await loadSdkClient();
|
|
2905
3025
|
const result = await todoCommentDelete({
|
|
2906
3026
|
client: client2._rawClient,
|
|
@@ -2920,8 +3040,8 @@ var todoCommentDeleteCommand = new Command42("rm").description("Soft-delete a co
|
|
|
2920
3040
|
});
|
|
2921
3041
|
|
|
2922
3042
|
// src/generated/cli/todo/comment/edit.ts
|
|
2923
|
-
import { Command as
|
|
2924
|
-
var todoCommentUpdateCommand = new
|
|
3043
|
+
import { Command as Command47 } from "commander";
|
|
3044
|
+
var todoCommentUpdateCommand = new Command47("edit").description("Edit a comment").argument("<id>", "id").argument("<content>", "content").action(async (id, content, opts) => {
|
|
2925
3045
|
const client2 = await loadSdkClient();
|
|
2926
3046
|
const result = await todoCommentUpdate({
|
|
2927
3047
|
client: client2._rawClient,
|
|
@@ -2944,8 +3064,8 @@ var todoCommentUpdateCommand = new Command43("edit").description("Edit a comment
|
|
|
2944
3064
|
});
|
|
2945
3065
|
|
|
2946
3066
|
// src/generated/cli/todo/rm.ts
|
|
2947
|
-
import { Command as
|
|
2948
|
-
var todoDeleteCommand = new
|
|
3067
|
+
import { Command as Command48 } from "commander";
|
|
3068
|
+
var todoDeleteCommand = new Command48("rm").description("Soft-delete a todo").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--cascade <value>", "cascade").action(async (id, opts) => {
|
|
2949
3069
|
const client2 = await loadSdkClient();
|
|
2950
3070
|
const result = await todoDelete({
|
|
2951
3071
|
client: client2._rawClient,
|
|
@@ -2969,8 +3089,8 @@ var todoDeleteCommand = new Command44("rm").description("Soft-delete a todo").ar
|
|
|
2969
3089
|
});
|
|
2970
3090
|
|
|
2971
3091
|
// src/generated/cli/todo/show.ts
|
|
2972
|
-
import { Command as
|
|
2973
|
-
var todoGetCommand = new
|
|
3092
|
+
import { Command as Command49 } from "commander";
|
|
3093
|
+
var todoGetCommand = new Command49("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) => {
|
|
2974
3094
|
const client2 = await loadSdkClient();
|
|
2975
3095
|
const result = await todoGet({
|
|
2976
3096
|
client: client2._rawClient,
|
|
@@ -2995,8 +3115,8 @@ var todoGetCommand = new Command45("show").description("Get a todo by id").argum
|
|
|
2995
3115
|
});
|
|
2996
3116
|
|
|
2997
3117
|
// src/generated/cli/todo/update.ts
|
|
2998
|
-
import { Command as
|
|
2999
|
-
var todoUpdateCommand = new
|
|
3118
|
+
import { Command as Command50 } from "commander";
|
|
3119
|
+
var todoUpdateCommand = new Command50("update").description("Update a todo").argument("<id>", "id").option("--expected-version <value>", "expected_version").option("--title <value>", "New title. Omit to leave the existing title unchanged. Must be non-empty when supplied.").option("--description <value>", 'New description. Markdown formatted (CommonMark + GFM tables, strikethrough, task lists). Pass empty string `""` explicitly to clear an existing description, or omit to leave unchanged. Passing `null` is strictly rejected.').option("--parent-id <value>", "Re-parent the todo. Pass a valid parent ID to attach under another todo, pass `null` to move it back to the root level, or omit to leave unchanged. Nesting is limited to one level; attempting to set a child todo as a parent will trigger `PARENT_IS_CHILD`.").option("--status <value>", "New status of the todo. Allowed transitions: `open` \u2794 `in_progress` \u2794 `done`. `cancelled` represents a terminal state. Transitioning to `done` automatically emits a `captureTodoCompleted` analytics event. Omit to leave the existing status unchanged.").option("--due-at <value>", 'Update calendar due date in ISO date-only format (`YYYY-MM-DD`). Pass `""` explicitly to clear an existing due date, or omit to leave it unchanged. Passing `null` is strictly rejected.').option("--type-id <value>", "Re-assign this todo to a different active type. The new type must belong to the todo's same project; otherwise the request fails with TYPE_PROJECT_MISMATCH. New server-generated type ids use typ_<ULID>; legacy ids remain accepted.").option("--custom-fields <value>", "PATCH semantics: only the keys present in this map change. Pass `null` for a key (e.g. `custom_fields: { priority: null }`) to explicitly delete that custom field value. Array values are replaced wholesale with no element-level diff. Providing a key that is not declared on the effective todo type is rejected with `UNDECLARED_FIELD`.").option("--user-id <value>", "Reassign the owner (assignee) user ID of this todo. Target user must belong to the same organization.").action(async (id, opts) => {
|
|
3000
3120
|
const client2 = await loadSdkClient();
|
|
3001
3121
|
const result = await todoUpdate({
|
|
3002
3122
|
client: client2._rawClient,
|
|
@@ -3059,6 +3179,11 @@ function registerGeneratedCommands(root) {
|
|
|
3059
3179
|
root_alias.addCommand(emailAliasCreateCommand);
|
|
3060
3180
|
root_alias.addCommand(emailAliasListCommand);
|
|
3061
3181
|
root_alias.addCommand(emailAliasDeleteCommand);
|
|
3182
|
+
const root_domain = root.command("domain").description("domain commands");
|
|
3183
|
+
root_domain.addCommand(emailDomainCreateCommand);
|
|
3184
|
+
root_domain.addCommand(emailDomainListCommand);
|
|
3185
|
+
root_domain.addCommand(emailDomainGetCommand);
|
|
3186
|
+
root_domain.addCommand(emailDomainVerifyCommand);
|
|
3062
3187
|
const root_email = root.command("email").description("email commands");
|
|
3063
3188
|
root_email.addCommand(emailDeleteCommand);
|
|
3064
3189
|
root_email.addCommand(emailGetCommand);
|
|
@@ -3092,7 +3217,7 @@ function registerGeneratedCommands(root) {
|
|
|
3092
3217
|
}
|
|
3093
3218
|
|
|
3094
3219
|
// src/handwritten/commands/login.ts
|
|
3095
|
-
import { Command as
|
|
3220
|
+
import { Command as Command51 } from "commander";
|
|
3096
3221
|
|
|
3097
3222
|
// src/handwritten/auth/device-flow.ts
|
|
3098
3223
|
var DEFAULT_SLEEP = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -3271,7 +3396,7 @@ async function runLogin(opts) {
|
|
|
3271
3396
|
}
|
|
3272
3397
|
|
|
3273
3398
|
// src/handwritten/commands/login.ts
|
|
3274
|
-
var loginCommand = new
|
|
3399
|
+
var loginCommand = new Command51("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) => {
|
|
3275
3400
|
const store = new ConfigStore();
|
|
3276
3401
|
const output = opts.json ? { write: () => {
|
|
3277
3402
|
}, writeJson: (e) => process.stdout.write(JSON.stringify(e) + "\n") } : {
|
|
@@ -3288,7 +3413,7 @@ var loginCommand = new Command47("login").description("Log in via OAuth device f
|
|
|
3288
3413
|
});
|
|
3289
3414
|
|
|
3290
3415
|
// src/handwritten/commands/logout.ts
|
|
3291
|
-
import { Command as
|
|
3416
|
+
import { Command as Command52 } from "commander";
|
|
3292
3417
|
|
|
3293
3418
|
// src/handwritten/auth/logout.ts
|
|
3294
3419
|
async function runLogout(opts) {
|
|
@@ -3316,7 +3441,7 @@ async function runLogout(opts) {
|
|
|
3316
3441
|
}
|
|
3317
3442
|
|
|
3318
3443
|
// src/handwritten/commands/logout.ts
|
|
3319
|
-
var logoutCommand = new
|
|
3444
|
+
var logoutCommand = new Command52("logout").description("Log out an account (default: the active account in the current env)").argument("[email]", "Email of the account to log out").option("--all", "Log out every account in the current env").action(async (email, opts) => {
|
|
3320
3445
|
const res = await runLogout({ store: new ConfigStore(), email, all: opts.all });
|
|
3321
3446
|
if (res.removed.length === 0) {
|
|
3322
3447
|
process.stdout.write("nothing to log out\n");
|
|
@@ -3329,7 +3454,7 @@ var logoutCommand = new Command48("logout").description("Log out an account (def
|
|
|
3329
3454
|
});
|
|
3330
3455
|
|
|
3331
3456
|
// src/handwritten/commands/whoami.ts
|
|
3332
|
-
import { Command as
|
|
3457
|
+
import { Command as Command53 } from "commander";
|
|
3333
3458
|
var ENV_DISPLAY = {
|
|
3334
3459
|
shape: "object",
|
|
3335
3460
|
fields: ["name", "api_base", "account", "actor", "agent_label"]
|
|
@@ -3361,7 +3486,7 @@ async function backfillActiveEmail(store, envName, email, userId) {
|
|
|
3361
3486
|
await store.write(cfg);
|
|
3362
3487
|
}
|
|
3363
3488
|
}
|
|
3364
|
-
var whoamiCommand = new
|
|
3489
|
+
var whoamiCommand = new Command53("whoami").description("Show the active env, signed-in account, and organization").action(async () => {
|
|
3365
3490
|
const store = new ConfigStore();
|
|
3366
3491
|
const config = await store.read();
|
|
3367
3492
|
let resolved;
|
|
@@ -3414,8 +3539,8 @@ function printLoggedOut() {
|
|
|
3414
3539
|
}
|
|
3415
3540
|
|
|
3416
3541
|
// src/handwritten/commands/config.ts
|
|
3417
|
-
import { Command as
|
|
3418
|
-
var configCommand = new
|
|
3542
|
+
import { Command as Command54 } from "commander";
|
|
3543
|
+
var configCommand = new Command54("config").description("Manage wspc local config");
|
|
3419
3544
|
registerRenderer("config_show", (data) => {
|
|
3420
3545
|
const d = data;
|
|
3421
3546
|
if (d.envs.length === 0) {
|
|
@@ -3486,7 +3611,7 @@ configCommand.command("use <env>").description("Switch current_env").action(asyn
|
|
|
3486
3611
|
});
|
|
3487
3612
|
|
|
3488
3613
|
// src/handwritten/commands/account.ts
|
|
3489
|
-
import { Command as
|
|
3614
|
+
import { Command as Command55 } from "commander";
|
|
3490
3615
|
async function listAccounts(store) {
|
|
3491
3616
|
const c = await store.read();
|
|
3492
3617
|
const envName = c.current_env;
|
|
@@ -3527,7 +3652,7 @@ registerRenderer("account_ls", (data) => {
|
|
|
3527
3652
|
]);
|
|
3528
3653
|
process.stdout.write(table(headers, body));
|
|
3529
3654
|
});
|
|
3530
|
-
var accountCommand = new
|
|
3655
|
+
var accountCommand = new Command55("account").description("Manage logged-in accounts");
|
|
3531
3656
|
accountCommand.command("ls").description("List accounts in the current env (active marked with \u2713)").action(async () => {
|
|
3532
3657
|
const accounts = await listAccounts(new ConfigStore());
|
|
3533
3658
|
render({ kind: "account_ls" }, { accounts });
|
|
@@ -3539,7 +3664,7 @@ accountCommand.command("switch <email>").description("Set the active account for
|
|
|
3539
3664
|
});
|
|
3540
3665
|
|
|
3541
3666
|
// src/handwritten/commands/todo-done.ts
|
|
3542
|
-
import { Command as
|
|
3667
|
+
import { Command as Command56 } from "commander";
|
|
3543
3668
|
var TODO_UPDATE_DISPLAY = {
|
|
3544
3669
|
shape: "object",
|
|
3545
3670
|
format: {
|
|
@@ -3557,7 +3682,7 @@ var TODO_UPDATE_DISPLAY = {
|
|
|
3557
3682
|
deleted_at: "relative-time"
|
|
3558
3683
|
}
|
|
3559
3684
|
};
|
|
3560
|
-
var todoDoneCommand = new
|
|
3685
|
+
var todoDoneCommand = new Command56("done").description("Mark a todo done (sugar for `update <id> --status done`)").argument("<id>", "Todo id").action(async (id) => {
|
|
3561
3686
|
const client2 = await loadSdkClient();
|
|
3562
3687
|
const result = await todoUpdate({
|
|
3563
3688
|
client: client2._rawClient,
|
|
@@ -3576,7 +3701,7 @@ var todoDoneCommand = new Command52("done").description("Mark a todo done (sugar
|
|
|
3576
3701
|
});
|
|
3577
3702
|
|
|
3578
3703
|
// src/handwritten/commands/email/send.ts
|
|
3579
|
-
import { Command as
|
|
3704
|
+
import { Command as Command57 } from "commander";
|
|
3580
3705
|
import { readFile, stat } from "fs/promises";
|
|
3581
3706
|
import { basename } from "path";
|
|
3582
3707
|
|
|
@@ -3634,7 +3759,7 @@ async function resolveAttachment(input) {
|
|
|
3634
3759
|
`--attach ${input}: neither a readable file nor a valid <prefix>_<ulid>:<idx> reference.`
|
|
3635
3760
|
);
|
|
3636
3761
|
}
|
|
3637
|
-
var sendCommand = new
|
|
3762
|
+
var sendCommand = new Command57("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) => {
|
|
3638
3763
|
const isReply = Boolean(opts.reply);
|
|
3639
3764
|
const to = opts.to;
|
|
3640
3765
|
const attachInputs = opts.attach;
|
|
@@ -3721,7 +3846,7 @@ var sendCommand = new Command53("send").description("Send an outbound email").re
|
|
|
3721
3846
|
});
|
|
3722
3847
|
|
|
3723
3848
|
// src/handwritten/commands/email/attachment.ts
|
|
3724
|
-
import { Command as
|
|
3849
|
+
import { Command as Command58 } from "commander";
|
|
3725
3850
|
import { createWriteStream } from "fs";
|
|
3726
3851
|
import { Readable } from "stream";
|
|
3727
3852
|
import { pipeline } from "stream/promises";
|
|
@@ -3738,7 +3863,7 @@ function parseContentDispositionFilename(header) {
|
|
|
3738
3863
|
}
|
|
3739
3864
|
|
|
3740
3865
|
// src/handwritten/commands/email/attachment.ts
|
|
3741
|
-
var attachmentCommand = new
|
|
3866
|
+
var attachmentCommand = new Command58("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) => {
|
|
3742
3867
|
const idx = Number(idxArg);
|
|
3743
3868
|
if (!Number.isInteger(idx) || idx < 0) {
|
|
3744
3869
|
process.stderr.write(`<idx> must be a non-negative integer (got "${idxArg}")
|
|
@@ -3771,7 +3896,7 @@ var attachmentCommand = new Command54("attachment").description("Download an inb
|
|
|
3771
3896
|
|
|
3772
3897
|
// src/cli.ts
|
|
3773
3898
|
function buildProgram() {
|
|
3774
|
-
const program = new
|
|
3899
|
+
const program = new Command59().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)").option("--account <email>", "Run as a specific account (overrides the active account)").hook("preAction", (_thisCommand, actionCommand) => {
|
|
3775
3900
|
const globals = actionCommand.optsWithGlobals();
|
|
3776
3901
|
if (globals.json) process.env.WSPC_OUTPUT = "json";
|
|
3777
3902
|
if (globals.account) process.env.WSPC_ACCOUNT = String(globals.account);
|