@wspc/cli 0.0.10 → 0.0.11
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 +177 -67
- 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 +2019 -435
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.11";
|
|
1234
|
+
var SPEC_SHA = "5ae5d422";
|
|
1235
|
+
var SPEC_FETCHED_AT = "2026-06-09T04:35:08.355Z";
|
|
1212
1236
|
var API_BASE = "https://api.wspc.ai";
|
|
1213
1237
|
|
|
1214
1238
|
// src/index.ts
|
|
@@ -2469,9 +2493,48 @@ var emailAliasListCommand = new Command23("ls").description("List the caller's a
|
|
|
2469
2493
|
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
2494
|
});
|
|
2471
2495
|
|
|
2472
|
-
// src/generated/cli/
|
|
2496
|
+
// src/generated/cli/domain/add.ts
|
|
2473
2497
|
import { Command as Command24 } from "commander";
|
|
2474
|
-
var
|
|
2498
|
+
var emailDomainCreateCommand = new Command24("add").description("Register a custom email domain").argument("<domain>", "domain").action(async (domain, opts) => {
|
|
2499
|
+
const client2 = await loadSdkClient();
|
|
2500
|
+
const result = await emailDomainCreate({
|
|
2501
|
+
client: client2._rawClient,
|
|
2502
|
+
body: {
|
|
2503
|
+
domain
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
if (result.error || !result.response?.ok) {
|
|
2507
|
+
process.stderr.write(
|
|
2508
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2509
|
+
`
|
|
2510
|
+
);
|
|
2511
|
+
process.exitCode = 1;
|
|
2512
|
+
return;
|
|
2513
|
+
}
|
|
2514
|
+
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);
|
|
2515
|
+
});
|
|
2516
|
+
|
|
2517
|
+
// src/generated/cli/domain/ls.ts
|
|
2518
|
+
import { Command as Command25 } from "commander";
|
|
2519
|
+
var emailDomainListCommand = new Command25("ls").description("List cached custom domains").action(async (opts) => {
|
|
2520
|
+
const client2 = await loadSdkClient();
|
|
2521
|
+
const result = await emailDomainList({
|
|
2522
|
+
client: client2._rawClient
|
|
2523
|
+
});
|
|
2524
|
+
if (result.error || !result.response?.ok) {
|
|
2525
|
+
process.stderr.write(
|
|
2526
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2527
|
+
`
|
|
2528
|
+
);
|
|
2529
|
+
process.exitCode = 1;
|
|
2530
|
+
return;
|
|
2531
|
+
}
|
|
2532
|
+
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);
|
|
2533
|
+
});
|
|
2534
|
+
|
|
2535
|
+
// src/generated/cli/alias/rm.ts
|
|
2536
|
+
import { Command as Command26 } from "commander";
|
|
2537
|
+
var emailAliasDeleteCommand = new Command26("rm").description("Soft-delete an alias").argument("<email>", "email").action(async (email, opts) => {
|
|
2475
2538
|
const client2 = await loadSdkClient();
|
|
2476
2539
|
const result = await emailAliasDelete({
|
|
2477
2540
|
client: client2._rawClient,
|
|
@@ -2491,8 +2554,8 @@ var emailAliasDeleteCommand = new Command24("rm").description("Soft-delete an al
|
|
|
2491
2554
|
});
|
|
2492
2555
|
|
|
2493
2556
|
// src/generated/cli/email/rm.ts
|
|
2494
|
-
import { Command as
|
|
2495
|
-
var emailDeleteCommand = new
|
|
2557
|
+
import { Command as Command27 } from "commander";
|
|
2558
|
+
var emailDeleteCommand = new Command27("rm").description("Soft-delete inbound emails").argument("<id...>", "id").action(async (id, opts) => {
|
|
2496
2559
|
const idRaw = id;
|
|
2497
2560
|
const ids = idRaw.length > 0 ? idRaw : void 0;
|
|
2498
2561
|
const client2 = await loadSdkClient();
|
|
@@ -2513,9 +2576,30 @@ var emailDeleteCommand = new Command25("rm").description("Soft-delete inbound em
|
|
|
2513
2576
|
render({ kind: "email_delete", display: { "shape": "object", "format": {} } }, result.data);
|
|
2514
2577
|
});
|
|
2515
2578
|
|
|
2579
|
+
// src/generated/cli/domain/show.ts
|
|
2580
|
+
import { Command as Command28 } from "commander";
|
|
2581
|
+
var emailDomainGetCommand = new Command28("show").description("Get one cached custom domain").argument("<domain>", "domain").action(async (domain, opts) => {
|
|
2582
|
+
const client2 = await loadSdkClient();
|
|
2583
|
+
const result = await emailDomainGet({
|
|
2584
|
+
client: client2._rawClient,
|
|
2585
|
+
path: {
|
|
2586
|
+
domain
|
|
2587
|
+
}
|
|
2588
|
+
});
|
|
2589
|
+
if (result.error || !result.response?.ok) {
|
|
2590
|
+
process.stderr.write(
|
|
2591
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2592
|
+
`
|
|
2593
|
+
);
|
|
2594
|
+
process.exitCode = 1;
|
|
2595
|
+
return;
|
|
2596
|
+
}
|
|
2597
|
+
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);
|
|
2598
|
+
});
|
|
2599
|
+
|
|
2516
2600
|
// src/generated/cli/email/show.ts
|
|
2517
|
-
import { Command as
|
|
2518
|
-
var emailGetCommand = new
|
|
2601
|
+
import { Command as Command29 } from "commander";
|
|
2602
|
+
var emailGetCommand = new Command29("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) => {
|
|
2519
2603
|
const client2 = await loadSdkClient();
|
|
2520
2604
|
const result = await emailGet({
|
|
2521
2605
|
client: client2._rawClient,
|
|
@@ -2539,8 +2623,8 @@ var emailGetCommand = new Command26("show").description("Get an inbound email by
|
|
|
2539
2623
|
});
|
|
2540
2624
|
|
|
2541
2625
|
// src/generated/cli/email/ls.ts
|
|
2542
|
-
import { Command as
|
|
2543
|
-
var emailListCommand = new
|
|
2626
|
+
import { Command as Command30 } from "commander";
|
|
2627
|
+
var emailListCommand = new Command30("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) => {
|
|
2544
2628
|
const client2 = await loadSdkClient();
|
|
2545
2629
|
const result = await emailList({
|
|
2546
2630
|
client: client2._rawClient,
|
|
@@ -2565,8 +2649,8 @@ var emailListCommand = new Command27("ls").description("List inbound emails").op
|
|
|
2565
2649
|
});
|
|
2566
2650
|
|
|
2567
2651
|
// src/generated/cli/email/read.ts
|
|
2568
|
-
import { Command as
|
|
2569
|
-
var emailMarkReadCommand = new
|
|
2652
|
+
import { Command as Command31 } from "commander";
|
|
2653
|
+
var emailMarkReadCommand = new Command31("read").description("Mark inbound emails as read").argument("<id...>", "id").action(async (id, opts) => {
|
|
2570
2654
|
const idRaw = id;
|
|
2571
2655
|
const ids = idRaw.length > 0 ? idRaw : void 0;
|
|
2572
2656
|
const client2 = await loadSdkClient();
|
|
@@ -2588,8 +2672,8 @@ var emailMarkReadCommand = new Command28("read").description("Mark inbound email
|
|
|
2588
2672
|
});
|
|
2589
2673
|
|
|
2590
2674
|
// src/generated/cli/email/unread.ts
|
|
2591
|
-
import { Command as
|
|
2592
|
-
var emailMarkUnreadCommand = new
|
|
2675
|
+
import { Command as Command32 } from "commander";
|
|
2676
|
+
var emailMarkUnreadCommand = new Command32("unread").description("Mark inbound emails as unread").argument("<id...>", "id").action(async (id, opts) => {
|
|
2593
2677
|
const idRaw = id;
|
|
2594
2678
|
const ids = idRaw.length > 0 ? idRaw : void 0;
|
|
2595
2679
|
const client2 = await loadSdkClient();
|
|
@@ -2610,9 +2694,30 @@ var emailMarkUnreadCommand = new Command29("unread").description("Mark inbound e
|
|
|
2610
2694
|
render({ kind: "email_mark_unread", display: { "shape": "object", "format": {} } }, result.data);
|
|
2611
2695
|
});
|
|
2612
2696
|
|
|
2697
|
+
// src/generated/cli/domain/verify.ts
|
|
2698
|
+
import { Command as Command33 } from "commander";
|
|
2699
|
+
var emailDomainVerifyCommand = new Command33("verify").description("Verify a custom domain with the provider").argument("<domain>", "domain").action(async (domain, opts) => {
|
|
2700
|
+
const client2 = await loadSdkClient();
|
|
2701
|
+
const result = await emailDomainVerify({
|
|
2702
|
+
client: client2._rawClient,
|
|
2703
|
+
path: {
|
|
2704
|
+
domain
|
|
2705
|
+
}
|
|
2706
|
+
});
|
|
2707
|
+
if (result.error || !result.response?.ok) {
|
|
2708
|
+
process.stderr.write(
|
|
2709
|
+
`HTTP ${result.response?.status ?? "?"}: ${JSON.stringify(result.error ?? "unknown error", null, 2)}
|
|
2710
|
+
`
|
|
2711
|
+
);
|
|
2712
|
+
process.exitCode = 1;
|
|
2713
|
+
return;
|
|
2714
|
+
}
|
|
2715
|
+
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);
|
|
2716
|
+
});
|
|
2717
|
+
|
|
2613
2718
|
// src/generated/cli/push/config/rm.ts
|
|
2614
|
-
import { Command as
|
|
2615
|
-
var pushConfigDeleteCommand = new
|
|
2719
|
+
import { Command as Command34 } from "commander";
|
|
2720
|
+
var pushConfigDeleteCommand = new Command34("rm").description("Remove a push transport").argument("<transport>", "transport").action(async (transport, opts) => {
|
|
2616
2721
|
const client2 = await loadSdkClient();
|
|
2617
2722
|
const result = await pushConfigDelete({
|
|
2618
2723
|
client: client2._rawClient,
|
|
@@ -2632,8 +2737,8 @@ var pushConfigDeleteCommand = new Command30("rm").description("Remove a push tra
|
|
|
2632
2737
|
});
|
|
2633
2738
|
|
|
2634
2739
|
// src/generated/cli/push/config/set.ts
|
|
2635
|
-
import { Command as
|
|
2636
|
-
var pushConfigSetCommand = new
|
|
2740
|
+
import { Command as Command35 } from "commander";
|
|
2741
|
+
var pushConfigSetCommand = new Command35("set").description("Register or update a push transport").option("--transport <value>", "transport").option("--target-bot-username <value>", "target_bot_username").action(async (opts) => {
|
|
2637
2742
|
const client2 = await loadSdkClient();
|
|
2638
2743
|
const result = await pushConfigSet({
|
|
2639
2744
|
client: client2._rawClient,
|
|
@@ -2656,8 +2761,8 @@ var pushConfigSetCommand = new Command31("set").description("Register or update
|
|
|
2656
2761
|
});
|
|
2657
2762
|
|
|
2658
2763
|
// src/generated/cli/push/config/show.ts
|
|
2659
|
-
import { Command as
|
|
2660
|
-
var pushConfigGetCommand = new
|
|
2764
|
+
import { Command as Command36 } from "commander";
|
|
2765
|
+
var pushConfigGetCommand = new Command36("show").description("List the caller's push transports").action(async (opts) => {
|
|
2661
2766
|
const client2 = await loadSdkClient();
|
|
2662
2767
|
const result = await pushConfigGet({
|
|
2663
2768
|
client: client2._rawClient
|
|
@@ -2674,8 +2779,8 @@ var pushConfigGetCommand = new Command32("show").description("List the caller's
|
|
|
2674
2779
|
});
|
|
2675
2780
|
|
|
2676
2781
|
// src/generated/cli/push/test.ts
|
|
2677
|
-
import { Command as
|
|
2678
|
-
var pushTestCommand = new
|
|
2782
|
+
import { Command as Command37 } from "commander";
|
|
2783
|
+
var pushTestCommand = new Command37("test").description("Send a test push notification").option("--transport <value>", "transport").action(async (opts) => {
|
|
2679
2784
|
const client2 = await loadSdkClient();
|
|
2680
2785
|
const result = await pushTest({
|
|
2681
2786
|
client: client2._rawClient,
|
|
@@ -2698,8 +2803,8 @@ var pushTestCommand = new Command33("test").description("Send a test push notifi
|
|
|
2698
2803
|
});
|
|
2699
2804
|
|
|
2700
2805
|
// src/generated/cli/todo/comment/add.ts
|
|
2701
|
-
import { Command as
|
|
2702
|
-
var todoCommentCreateCommand = new
|
|
2806
|
+
import { Command as Command38 } from "commander";
|
|
2807
|
+
var todoCommentCreateCommand = new Command38("add").description("Add a comment to a todo").argument("<id>", "id").argument("<content>", "content").action(async (id, content, opts) => {
|
|
2703
2808
|
const client2 = await loadSdkClient();
|
|
2704
2809
|
const result = await todoCommentCreate({
|
|
2705
2810
|
client: client2._rawClient,
|
|
@@ -2722,8 +2827,8 @@ var todoCommentCreateCommand = new Command34("add").description("Add a comment t
|
|
|
2722
2827
|
});
|
|
2723
2828
|
|
|
2724
2829
|
// src/generated/cli/todo/comment/ls.ts
|
|
2725
|
-
import { Command as
|
|
2726
|
-
var todoCommentListCommand = new
|
|
2830
|
+
import { Command as Command39 } from "commander";
|
|
2831
|
+
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>", "limit").option("--cursor <value>", "cursor").action(async (id, opts) => {
|
|
2727
2832
|
const client2 = await loadSdkClient();
|
|
2728
2833
|
const result = await todoCommentList({
|
|
2729
2834
|
client: client2._rawClient,
|
|
@@ -2749,8 +2854,8 @@ var todoCommentListCommand = new Command35("ls").description("List comments on a
|
|
|
2749
2854
|
});
|
|
2750
2855
|
|
|
2751
2856
|
// src/generated/cli/todo/project/add.ts
|
|
2752
|
-
import { Command as
|
|
2753
|
-
var projectCreateCommand = new
|
|
2857
|
+
import { Command as Command40 } from "commander";
|
|
2858
|
+
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
2859
|
const client2 = await loadSdkClient();
|
|
2755
2860
|
const result = await projectCreate({
|
|
2756
2861
|
client: client2._rawClient,
|
|
@@ -2771,8 +2876,8 @@ var projectCreateCommand = new Command36("add").description("Create a project").
|
|
|
2771
2876
|
});
|
|
2772
2877
|
|
|
2773
2878
|
// src/generated/cli/todo/project/ls.ts
|
|
2774
|
-
import { Command as
|
|
2775
|
-
var projectListCommand = new
|
|
2879
|
+
import { Command as Command41 } from "commander";
|
|
2880
|
+
var projectListCommand = new Command41("ls").description("List projects").option("--include-deleted <value>", "include_deleted").action(async (opts) => {
|
|
2776
2881
|
const client2 = await loadSdkClient();
|
|
2777
2882
|
const result = await projectList({
|
|
2778
2883
|
client: client2._rawClient,
|
|
@@ -2792,8 +2897,8 @@ var projectListCommand = new Command37("ls").description("List projects").option
|
|
|
2792
2897
|
});
|
|
2793
2898
|
|
|
2794
2899
|
// src/generated/cli/todo/rule/ls.ts
|
|
2795
|
-
import { Command as
|
|
2796
|
-
var recurrenceRuleListCommand = new
|
|
2900
|
+
import { Command as Command42 } from "commander";
|
|
2901
|
+
var recurrenceRuleListCommand = new Command42("ls").description("List recurring todo rules").option("--project-id <value>", "project_id").option("--user-id <value>", "user_id").action(async (opts) => {
|
|
2797
2902
|
const client2 = await loadSdkClient();
|
|
2798
2903
|
const result = await recurrenceRuleList({
|
|
2799
2904
|
client: client2._rawClient,
|
|
@@ -2814,8 +2919,8 @@ var recurrenceRuleListCommand = new Command38("ls").description("List recurring
|
|
|
2814
2919
|
});
|
|
2815
2920
|
|
|
2816
2921
|
// src/generated/cli/todo/add.ts
|
|
2817
|
-
import { Command as
|
|
2818
|
-
var todoCreateCommand = new
|
|
2922
|
+
import { Command as Command43 } from "commander";
|
|
2923
|
+
var todoCreateCommand = new Command43("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) => {
|
|
2819
2924
|
const client2 = await loadSdkClient();
|
|
2820
2925
|
const result = await todoCreate({
|
|
2821
2926
|
client: client2._rawClient,
|
|
@@ -2842,8 +2947,8 @@ var todoCreateCommand = new Command39("add").description("Create a todo").argume
|
|
|
2842
2947
|
});
|
|
2843
2948
|
|
|
2844
2949
|
// src/generated/cli/todo/ls.ts
|
|
2845
|
-
import { Command as
|
|
2846
|
-
var todoListCommand = new
|
|
2950
|
+
import { Command as Command44 } from "commander";
|
|
2951
|
+
var todoListCommand = new Command44("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").option("--limit <value>", "limit").option("--cursor <value>", "cursor").action(async (opts) => {
|
|
2847
2952
|
const client2 = await loadSdkClient();
|
|
2848
2953
|
const result = await todoList({
|
|
2849
2954
|
client: client2._rawClient,
|
|
@@ -2876,8 +2981,8 @@ var todoListCommand = new Command40("ls").description("List todos with filters")
|
|
|
2876
2981
|
});
|
|
2877
2982
|
|
|
2878
2983
|
// src/generated/cli/todo/type/ls.ts
|
|
2879
|
-
import { Command as
|
|
2880
|
-
var todoTypeListCommand = new
|
|
2984
|
+
import { Command as Command45 } from "commander";
|
|
2985
|
+
var todoTypeListCommand = new Command45("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) => {
|
|
2881
2986
|
const client2 = await loadSdkClient();
|
|
2882
2987
|
const result = await todoTypeList({
|
|
2883
2988
|
client: client2._rawClient,
|
|
@@ -2899,8 +3004,8 @@ var todoTypeListCommand = new Command41("ls").description("List todo types").opt
|
|
|
2899
3004
|
});
|
|
2900
3005
|
|
|
2901
3006
|
// src/generated/cli/todo/comment/rm.ts
|
|
2902
|
-
import { Command as
|
|
2903
|
-
var todoCommentDeleteCommand = new
|
|
3007
|
+
import { Command as Command46 } from "commander";
|
|
3008
|
+
var todoCommentDeleteCommand = new Command46("rm").description("Soft-delete a comment").argument("<id>", "id").action(async (id, opts) => {
|
|
2904
3009
|
const client2 = await loadSdkClient();
|
|
2905
3010
|
const result = await todoCommentDelete({
|
|
2906
3011
|
client: client2._rawClient,
|
|
@@ -2920,8 +3025,8 @@ var todoCommentDeleteCommand = new Command42("rm").description("Soft-delete a co
|
|
|
2920
3025
|
});
|
|
2921
3026
|
|
|
2922
3027
|
// src/generated/cli/todo/comment/edit.ts
|
|
2923
|
-
import { Command as
|
|
2924
|
-
var todoCommentUpdateCommand = new
|
|
3028
|
+
import { Command as Command47 } from "commander";
|
|
3029
|
+
var todoCommentUpdateCommand = new Command47("edit").description("Edit a comment").argument("<id>", "id").argument("<content>", "content").action(async (id, content, opts) => {
|
|
2925
3030
|
const client2 = await loadSdkClient();
|
|
2926
3031
|
const result = await todoCommentUpdate({
|
|
2927
3032
|
client: client2._rawClient,
|
|
@@ -2944,8 +3049,8 @@ var todoCommentUpdateCommand = new Command43("edit").description("Edit a comment
|
|
|
2944
3049
|
});
|
|
2945
3050
|
|
|
2946
3051
|
// src/generated/cli/todo/rm.ts
|
|
2947
|
-
import { Command as
|
|
2948
|
-
var todoDeleteCommand = new
|
|
3052
|
+
import { Command as Command48 } from "commander";
|
|
3053
|
+
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
3054
|
const client2 = await loadSdkClient();
|
|
2950
3055
|
const result = await todoDelete({
|
|
2951
3056
|
client: client2._rawClient,
|
|
@@ -2969,8 +3074,8 @@ var todoDeleteCommand = new Command44("rm").description("Soft-delete a todo").ar
|
|
|
2969
3074
|
});
|
|
2970
3075
|
|
|
2971
3076
|
// src/generated/cli/todo/show.ts
|
|
2972
|
-
import { Command as
|
|
2973
|
-
var todoGetCommand = new
|
|
3077
|
+
import { Command as Command49 } from "commander";
|
|
3078
|
+
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
3079
|
const client2 = await loadSdkClient();
|
|
2975
3080
|
const result = await todoGet({
|
|
2976
3081
|
client: client2._rawClient,
|
|
@@ -2995,8 +3100,8 @@ var todoGetCommand = new Command45("show").description("Get a todo by id").argum
|
|
|
2995
3100
|
});
|
|
2996
3101
|
|
|
2997
3102
|
// src/generated/cli/todo/update.ts
|
|
2998
|
-
import { Command as
|
|
2999
|
-
var todoUpdateCommand = new
|
|
3103
|
+
import { Command as Command50 } from "commander";
|
|
3104
|
+
var todoUpdateCommand = new Command50("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) => {
|
|
3000
3105
|
const client2 = await loadSdkClient();
|
|
3001
3106
|
const result = await todoUpdate({
|
|
3002
3107
|
client: client2._rawClient,
|
|
@@ -3059,6 +3164,11 @@ function registerGeneratedCommands(root) {
|
|
|
3059
3164
|
root_alias.addCommand(emailAliasCreateCommand);
|
|
3060
3165
|
root_alias.addCommand(emailAliasListCommand);
|
|
3061
3166
|
root_alias.addCommand(emailAliasDeleteCommand);
|
|
3167
|
+
const root_domain = root.command("domain").description("domain commands");
|
|
3168
|
+
root_domain.addCommand(emailDomainCreateCommand);
|
|
3169
|
+
root_domain.addCommand(emailDomainListCommand);
|
|
3170
|
+
root_domain.addCommand(emailDomainGetCommand);
|
|
3171
|
+
root_domain.addCommand(emailDomainVerifyCommand);
|
|
3062
3172
|
const root_email = root.command("email").description("email commands");
|
|
3063
3173
|
root_email.addCommand(emailDeleteCommand);
|
|
3064
3174
|
root_email.addCommand(emailGetCommand);
|
|
@@ -3092,7 +3202,7 @@ function registerGeneratedCommands(root) {
|
|
|
3092
3202
|
}
|
|
3093
3203
|
|
|
3094
3204
|
// src/handwritten/commands/login.ts
|
|
3095
|
-
import { Command as
|
|
3205
|
+
import { Command as Command51 } from "commander";
|
|
3096
3206
|
|
|
3097
3207
|
// src/handwritten/auth/device-flow.ts
|
|
3098
3208
|
var DEFAULT_SLEEP = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -3271,7 +3381,7 @@ async function runLogin(opts) {
|
|
|
3271
3381
|
}
|
|
3272
3382
|
|
|
3273
3383
|
// src/handwritten/commands/login.ts
|
|
3274
|
-
var loginCommand = new
|
|
3384
|
+
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
3385
|
const store = new ConfigStore();
|
|
3276
3386
|
const output = opts.json ? { write: () => {
|
|
3277
3387
|
}, writeJson: (e) => process.stdout.write(JSON.stringify(e) + "\n") } : {
|
|
@@ -3288,7 +3398,7 @@ var loginCommand = new Command47("login").description("Log in via OAuth device f
|
|
|
3288
3398
|
});
|
|
3289
3399
|
|
|
3290
3400
|
// src/handwritten/commands/logout.ts
|
|
3291
|
-
import { Command as
|
|
3401
|
+
import { Command as Command52 } from "commander";
|
|
3292
3402
|
|
|
3293
3403
|
// src/handwritten/auth/logout.ts
|
|
3294
3404
|
async function runLogout(opts) {
|
|
@@ -3316,7 +3426,7 @@ async function runLogout(opts) {
|
|
|
3316
3426
|
}
|
|
3317
3427
|
|
|
3318
3428
|
// src/handwritten/commands/logout.ts
|
|
3319
|
-
var logoutCommand = new
|
|
3429
|
+
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
3430
|
const res = await runLogout({ store: new ConfigStore(), email, all: opts.all });
|
|
3321
3431
|
if (res.removed.length === 0) {
|
|
3322
3432
|
process.stdout.write("nothing to log out\n");
|
|
@@ -3329,7 +3439,7 @@ var logoutCommand = new Command48("logout").description("Log out an account (def
|
|
|
3329
3439
|
});
|
|
3330
3440
|
|
|
3331
3441
|
// src/handwritten/commands/whoami.ts
|
|
3332
|
-
import { Command as
|
|
3442
|
+
import { Command as Command53 } from "commander";
|
|
3333
3443
|
var ENV_DISPLAY = {
|
|
3334
3444
|
shape: "object",
|
|
3335
3445
|
fields: ["name", "api_base", "account", "actor", "agent_label"]
|
|
@@ -3361,7 +3471,7 @@ async function backfillActiveEmail(store, envName, email, userId) {
|
|
|
3361
3471
|
await store.write(cfg);
|
|
3362
3472
|
}
|
|
3363
3473
|
}
|
|
3364
|
-
var whoamiCommand = new
|
|
3474
|
+
var whoamiCommand = new Command53("whoami").description("Show the active env, signed-in account, and organization").action(async () => {
|
|
3365
3475
|
const store = new ConfigStore();
|
|
3366
3476
|
const config = await store.read();
|
|
3367
3477
|
let resolved;
|
|
@@ -3414,8 +3524,8 @@ function printLoggedOut() {
|
|
|
3414
3524
|
}
|
|
3415
3525
|
|
|
3416
3526
|
// src/handwritten/commands/config.ts
|
|
3417
|
-
import { Command as
|
|
3418
|
-
var configCommand = new
|
|
3527
|
+
import { Command as Command54 } from "commander";
|
|
3528
|
+
var configCommand = new Command54("config").description("Manage wspc local config");
|
|
3419
3529
|
registerRenderer("config_show", (data) => {
|
|
3420
3530
|
const d = data;
|
|
3421
3531
|
if (d.envs.length === 0) {
|
|
@@ -3486,7 +3596,7 @@ configCommand.command("use <env>").description("Switch current_env").action(asyn
|
|
|
3486
3596
|
});
|
|
3487
3597
|
|
|
3488
3598
|
// src/handwritten/commands/account.ts
|
|
3489
|
-
import { Command as
|
|
3599
|
+
import { Command as Command55 } from "commander";
|
|
3490
3600
|
async function listAccounts(store) {
|
|
3491
3601
|
const c = await store.read();
|
|
3492
3602
|
const envName = c.current_env;
|
|
@@ -3527,7 +3637,7 @@ registerRenderer("account_ls", (data) => {
|
|
|
3527
3637
|
]);
|
|
3528
3638
|
process.stdout.write(table(headers, body));
|
|
3529
3639
|
});
|
|
3530
|
-
var accountCommand = new
|
|
3640
|
+
var accountCommand = new Command55("account").description("Manage logged-in accounts");
|
|
3531
3641
|
accountCommand.command("ls").description("List accounts in the current env (active marked with \u2713)").action(async () => {
|
|
3532
3642
|
const accounts = await listAccounts(new ConfigStore());
|
|
3533
3643
|
render({ kind: "account_ls" }, { accounts });
|
|
@@ -3539,7 +3649,7 @@ accountCommand.command("switch <email>").description("Set the active account for
|
|
|
3539
3649
|
});
|
|
3540
3650
|
|
|
3541
3651
|
// src/handwritten/commands/todo-done.ts
|
|
3542
|
-
import { Command as
|
|
3652
|
+
import { Command as Command56 } from "commander";
|
|
3543
3653
|
var TODO_UPDATE_DISPLAY = {
|
|
3544
3654
|
shape: "object",
|
|
3545
3655
|
format: {
|
|
@@ -3557,7 +3667,7 @@ var TODO_UPDATE_DISPLAY = {
|
|
|
3557
3667
|
deleted_at: "relative-time"
|
|
3558
3668
|
}
|
|
3559
3669
|
};
|
|
3560
|
-
var todoDoneCommand = new
|
|
3670
|
+
var todoDoneCommand = new Command56("done").description("Mark a todo done (sugar for `update <id> --status done`)").argument("<id>", "Todo id").action(async (id) => {
|
|
3561
3671
|
const client2 = await loadSdkClient();
|
|
3562
3672
|
const result = await todoUpdate({
|
|
3563
3673
|
client: client2._rawClient,
|
|
@@ -3576,7 +3686,7 @@ var todoDoneCommand = new Command52("done").description("Mark a todo done (sugar
|
|
|
3576
3686
|
});
|
|
3577
3687
|
|
|
3578
3688
|
// src/handwritten/commands/email/send.ts
|
|
3579
|
-
import { Command as
|
|
3689
|
+
import { Command as Command57 } from "commander";
|
|
3580
3690
|
import { readFile, stat } from "fs/promises";
|
|
3581
3691
|
import { basename } from "path";
|
|
3582
3692
|
|
|
@@ -3634,7 +3744,7 @@ async function resolveAttachment(input) {
|
|
|
3634
3744
|
`--attach ${input}: neither a readable file nor a valid <prefix>_<ulid>:<idx> reference.`
|
|
3635
3745
|
);
|
|
3636
3746
|
}
|
|
3637
|
-
var sendCommand = new
|
|
3747
|
+
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
3748
|
const isReply = Boolean(opts.reply);
|
|
3639
3749
|
const to = opts.to;
|
|
3640
3750
|
const attachInputs = opts.attach;
|
|
@@ -3721,7 +3831,7 @@ var sendCommand = new Command53("send").description("Send an outbound email").re
|
|
|
3721
3831
|
});
|
|
3722
3832
|
|
|
3723
3833
|
// src/handwritten/commands/email/attachment.ts
|
|
3724
|
-
import { Command as
|
|
3834
|
+
import { Command as Command58 } from "commander";
|
|
3725
3835
|
import { createWriteStream } from "fs";
|
|
3726
3836
|
import { Readable } from "stream";
|
|
3727
3837
|
import { pipeline } from "stream/promises";
|
|
@@ -3738,7 +3848,7 @@ function parseContentDispositionFilename(header) {
|
|
|
3738
3848
|
}
|
|
3739
3849
|
|
|
3740
3850
|
// src/handwritten/commands/email/attachment.ts
|
|
3741
|
-
var attachmentCommand = new
|
|
3851
|
+
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
3852
|
const idx = Number(idxArg);
|
|
3743
3853
|
if (!Number.isInteger(idx) || idx < 0) {
|
|
3744
3854
|
process.stderr.write(`<idx> must be a non-negative integer (got "${idxArg}")
|
|
@@ -3771,7 +3881,7 @@ var attachmentCommand = new Command54("attachment").description("Download an inb
|
|
|
3771
3881
|
|
|
3772
3882
|
// src/cli.ts
|
|
3773
3883
|
function buildProgram() {
|
|
3774
|
-
const program = new
|
|
3884
|
+
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
3885
|
const globals = actionCommand.optsWithGlobals();
|
|
3776
3886
|
if (globals.json) process.env.WSPC_OUTPUT = "json";
|
|
3777
3887
|
if (globals.account) process.env.WSPC_ACCOUNT = String(globals.account);
|