@wspc/cli 0.0.9 → 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 +183 -69
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/spec/openapi.json +2055 -415
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,
|
|
@@ -2732,7 +2837,9 @@ var todoCommentListCommand = new Command35("ls").description("List comments on a
|
|
|
2732
2837
|
},
|
|
2733
2838
|
query: {
|
|
2734
2839
|
order: opts.order,
|
|
2735
|
-
include_deleted: opts.includeDeleted
|
|
2840
|
+
include_deleted: opts.includeDeleted,
|
|
2841
|
+
limit: opts.limit,
|
|
2842
|
+
cursor: opts.cursor
|
|
2736
2843
|
}
|
|
2737
2844
|
});
|
|
2738
2845
|
if (result.error || !result.response?.ok) {
|
|
@@ -2747,8 +2854,8 @@ var todoCommentListCommand = new Command35("ls").description("List comments on a
|
|
|
2747
2854
|
});
|
|
2748
2855
|
|
|
2749
2856
|
// src/generated/cli/todo/project/add.ts
|
|
2750
|
-
import { Command as
|
|
2751
|
-
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) => {
|
|
2752
2859
|
const client2 = await loadSdkClient();
|
|
2753
2860
|
const result = await projectCreate({
|
|
2754
2861
|
client: client2._rawClient,
|
|
@@ -2769,8 +2876,8 @@ var projectCreateCommand = new Command36("add").description("Create a project").
|
|
|
2769
2876
|
});
|
|
2770
2877
|
|
|
2771
2878
|
// src/generated/cli/todo/project/ls.ts
|
|
2772
|
-
import { Command as
|
|
2773
|
-
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) => {
|
|
2774
2881
|
const client2 = await loadSdkClient();
|
|
2775
2882
|
const result = await projectList({
|
|
2776
2883
|
client: client2._rawClient,
|
|
@@ -2790,8 +2897,8 @@ var projectListCommand = new Command37("ls").description("List projects").option
|
|
|
2790
2897
|
});
|
|
2791
2898
|
|
|
2792
2899
|
// src/generated/cli/todo/rule/ls.ts
|
|
2793
|
-
import { Command as
|
|
2794
|
-
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) => {
|
|
2795
2902
|
const client2 = await loadSdkClient();
|
|
2796
2903
|
const result = await recurrenceRuleList({
|
|
2797
2904
|
client: client2._rawClient,
|
|
@@ -2812,8 +2919,8 @@ var recurrenceRuleListCommand = new Command38("ls").description("List recurring
|
|
|
2812
2919
|
});
|
|
2813
2920
|
|
|
2814
2921
|
// src/generated/cli/todo/add.ts
|
|
2815
|
-
import { Command as
|
|
2816
|
-
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) => {
|
|
2817
2924
|
const client2 = await loadSdkClient();
|
|
2818
2925
|
const result = await todoCreate({
|
|
2819
2926
|
client: client2._rawClient,
|
|
@@ -2840,8 +2947,8 @@ var todoCreateCommand = new Command39("add").description("Create a todo").argume
|
|
|
2840
2947
|
});
|
|
2841
2948
|
|
|
2842
2949
|
// src/generated/cli/todo/ls.ts
|
|
2843
|
-
import { Command as
|
|
2844
|
-
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) => {
|
|
2845
2952
|
const client2 = await loadSdkClient();
|
|
2846
2953
|
const result = await todoList({
|
|
2847
2954
|
client: client2._rawClient,
|
|
@@ -2857,7 +2964,9 @@ var todoListCommand = new Command40("ls").description("List todos with filters")
|
|
|
2857
2964
|
type_id: opts.typeId,
|
|
2858
2965
|
sort_by: opts.sortBy,
|
|
2859
2966
|
order: opts.order,
|
|
2860
|
-
include_orphan_fields: opts.includeOrphanFields
|
|
2967
|
+
include_orphan_fields: opts.includeOrphanFields,
|
|
2968
|
+
limit: opts.limit,
|
|
2969
|
+
cursor: opts.cursor
|
|
2861
2970
|
}
|
|
2862
2971
|
});
|
|
2863
2972
|
if (result.error || !result.response?.ok) {
|
|
@@ -2872,8 +2981,8 @@ var todoListCommand = new Command40("ls").description("List todos with filters")
|
|
|
2872
2981
|
});
|
|
2873
2982
|
|
|
2874
2983
|
// src/generated/cli/todo/type/ls.ts
|
|
2875
|
-
import { Command as
|
|
2876
|
-
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) => {
|
|
2877
2986
|
const client2 = await loadSdkClient();
|
|
2878
2987
|
const result = await todoTypeList({
|
|
2879
2988
|
client: client2._rawClient,
|
|
@@ -2895,8 +3004,8 @@ var todoTypeListCommand = new Command41("ls").description("List todo types").opt
|
|
|
2895
3004
|
});
|
|
2896
3005
|
|
|
2897
3006
|
// src/generated/cli/todo/comment/rm.ts
|
|
2898
|
-
import { Command as
|
|
2899
|
-
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) => {
|
|
2900
3009
|
const client2 = await loadSdkClient();
|
|
2901
3010
|
const result = await todoCommentDelete({
|
|
2902
3011
|
client: client2._rawClient,
|
|
@@ -2916,8 +3025,8 @@ var todoCommentDeleteCommand = new Command42("rm").description("Soft-delete a co
|
|
|
2916
3025
|
});
|
|
2917
3026
|
|
|
2918
3027
|
// src/generated/cli/todo/comment/edit.ts
|
|
2919
|
-
import { Command as
|
|
2920
|
-
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) => {
|
|
2921
3030
|
const client2 = await loadSdkClient();
|
|
2922
3031
|
const result = await todoCommentUpdate({
|
|
2923
3032
|
client: client2._rawClient,
|
|
@@ -2940,8 +3049,8 @@ var todoCommentUpdateCommand = new Command43("edit").description("Edit a comment
|
|
|
2940
3049
|
});
|
|
2941
3050
|
|
|
2942
3051
|
// src/generated/cli/todo/rm.ts
|
|
2943
|
-
import { Command as
|
|
2944
|
-
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) => {
|
|
2945
3054
|
const client2 = await loadSdkClient();
|
|
2946
3055
|
const result = await todoDelete({
|
|
2947
3056
|
client: client2._rawClient,
|
|
@@ -2965,8 +3074,8 @@ var todoDeleteCommand = new Command44("rm").description("Soft-delete a todo").ar
|
|
|
2965
3074
|
});
|
|
2966
3075
|
|
|
2967
3076
|
// src/generated/cli/todo/show.ts
|
|
2968
|
-
import { Command as
|
|
2969
|
-
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) => {
|
|
2970
3079
|
const client2 = await loadSdkClient();
|
|
2971
3080
|
const result = await todoGet({
|
|
2972
3081
|
client: client2._rawClient,
|
|
@@ -2991,8 +3100,8 @@ var todoGetCommand = new Command45("show").description("Get a todo by id").argum
|
|
|
2991
3100
|
});
|
|
2992
3101
|
|
|
2993
3102
|
// src/generated/cli/todo/update.ts
|
|
2994
|
-
import { Command as
|
|
2995
|
-
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) => {
|
|
2996
3105
|
const client2 = await loadSdkClient();
|
|
2997
3106
|
const result = await todoUpdate({
|
|
2998
3107
|
client: client2._rawClient,
|
|
@@ -3055,6 +3164,11 @@ function registerGeneratedCommands(root) {
|
|
|
3055
3164
|
root_alias.addCommand(emailAliasCreateCommand);
|
|
3056
3165
|
root_alias.addCommand(emailAliasListCommand);
|
|
3057
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);
|
|
3058
3172
|
const root_email = root.command("email").description("email commands");
|
|
3059
3173
|
root_email.addCommand(emailDeleteCommand);
|
|
3060
3174
|
root_email.addCommand(emailGetCommand);
|
|
@@ -3088,7 +3202,7 @@ function registerGeneratedCommands(root) {
|
|
|
3088
3202
|
}
|
|
3089
3203
|
|
|
3090
3204
|
// src/handwritten/commands/login.ts
|
|
3091
|
-
import { Command as
|
|
3205
|
+
import { Command as Command51 } from "commander";
|
|
3092
3206
|
|
|
3093
3207
|
// src/handwritten/auth/device-flow.ts
|
|
3094
3208
|
var DEFAULT_SLEEP = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -3267,7 +3381,7 @@ async function runLogin(opts) {
|
|
|
3267
3381
|
}
|
|
3268
3382
|
|
|
3269
3383
|
// src/handwritten/commands/login.ts
|
|
3270
|
-
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) => {
|
|
3271
3385
|
const store = new ConfigStore();
|
|
3272
3386
|
const output = opts.json ? { write: () => {
|
|
3273
3387
|
}, writeJson: (e) => process.stdout.write(JSON.stringify(e) + "\n") } : {
|
|
@@ -3284,7 +3398,7 @@ var loginCommand = new Command47("login").description("Log in via OAuth device f
|
|
|
3284
3398
|
});
|
|
3285
3399
|
|
|
3286
3400
|
// src/handwritten/commands/logout.ts
|
|
3287
|
-
import { Command as
|
|
3401
|
+
import { Command as Command52 } from "commander";
|
|
3288
3402
|
|
|
3289
3403
|
// src/handwritten/auth/logout.ts
|
|
3290
3404
|
async function runLogout(opts) {
|
|
@@ -3312,7 +3426,7 @@ async function runLogout(opts) {
|
|
|
3312
3426
|
}
|
|
3313
3427
|
|
|
3314
3428
|
// src/handwritten/commands/logout.ts
|
|
3315
|
-
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) => {
|
|
3316
3430
|
const res = await runLogout({ store: new ConfigStore(), email, all: opts.all });
|
|
3317
3431
|
if (res.removed.length === 0) {
|
|
3318
3432
|
process.stdout.write("nothing to log out\n");
|
|
@@ -3325,7 +3439,7 @@ var logoutCommand = new Command48("logout").description("Log out an account (def
|
|
|
3325
3439
|
});
|
|
3326
3440
|
|
|
3327
3441
|
// src/handwritten/commands/whoami.ts
|
|
3328
|
-
import { Command as
|
|
3442
|
+
import { Command as Command53 } from "commander";
|
|
3329
3443
|
var ENV_DISPLAY = {
|
|
3330
3444
|
shape: "object",
|
|
3331
3445
|
fields: ["name", "api_base", "account", "actor", "agent_label"]
|
|
@@ -3357,7 +3471,7 @@ async function backfillActiveEmail(store, envName, email, userId) {
|
|
|
3357
3471
|
await store.write(cfg);
|
|
3358
3472
|
}
|
|
3359
3473
|
}
|
|
3360
|
-
var whoamiCommand = new
|
|
3474
|
+
var whoamiCommand = new Command53("whoami").description("Show the active env, signed-in account, and organization").action(async () => {
|
|
3361
3475
|
const store = new ConfigStore();
|
|
3362
3476
|
const config = await store.read();
|
|
3363
3477
|
let resolved;
|
|
@@ -3410,8 +3524,8 @@ function printLoggedOut() {
|
|
|
3410
3524
|
}
|
|
3411
3525
|
|
|
3412
3526
|
// src/handwritten/commands/config.ts
|
|
3413
|
-
import { Command as
|
|
3414
|
-
var configCommand = new
|
|
3527
|
+
import { Command as Command54 } from "commander";
|
|
3528
|
+
var configCommand = new Command54("config").description("Manage wspc local config");
|
|
3415
3529
|
registerRenderer("config_show", (data) => {
|
|
3416
3530
|
const d = data;
|
|
3417
3531
|
if (d.envs.length === 0) {
|
|
@@ -3482,7 +3596,7 @@ configCommand.command("use <env>").description("Switch current_env").action(asyn
|
|
|
3482
3596
|
});
|
|
3483
3597
|
|
|
3484
3598
|
// src/handwritten/commands/account.ts
|
|
3485
|
-
import { Command as
|
|
3599
|
+
import { Command as Command55 } from "commander";
|
|
3486
3600
|
async function listAccounts(store) {
|
|
3487
3601
|
const c = await store.read();
|
|
3488
3602
|
const envName = c.current_env;
|
|
@@ -3523,7 +3637,7 @@ registerRenderer("account_ls", (data) => {
|
|
|
3523
3637
|
]);
|
|
3524
3638
|
process.stdout.write(table(headers, body));
|
|
3525
3639
|
});
|
|
3526
|
-
var accountCommand = new
|
|
3640
|
+
var accountCommand = new Command55("account").description("Manage logged-in accounts");
|
|
3527
3641
|
accountCommand.command("ls").description("List accounts in the current env (active marked with \u2713)").action(async () => {
|
|
3528
3642
|
const accounts = await listAccounts(new ConfigStore());
|
|
3529
3643
|
render({ kind: "account_ls" }, { accounts });
|
|
@@ -3535,7 +3649,7 @@ accountCommand.command("switch <email>").description("Set the active account for
|
|
|
3535
3649
|
});
|
|
3536
3650
|
|
|
3537
3651
|
// src/handwritten/commands/todo-done.ts
|
|
3538
|
-
import { Command as
|
|
3652
|
+
import { Command as Command56 } from "commander";
|
|
3539
3653
|
var TODO_UPDATE_DISPLAY = {
|
|
3540
3654
|
shape: "object",
|
|
3541
3655
|
format: {
|
|
@@ -3553,7 +3667,7 @@ var TODO_UPDATE_DISPLAY = {
|
|
|
3553
3667
|
deleted_at: "relative-time"
|
|
3554
3668
|
}
|
|
3555
3669
|
};
|
|
3556
|
-
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) => {
|
|
3557
3671
|
const client2 = await loadSdkClient();
|
|
3558
3672
|
const result = await todoUpdate({
|
|
3559
3673
|
client: client2._rawClient,
|
|
@@ -3572,7 +3686,7 @@ var todoDoneCommand = new Command52("done").description("Mark a todo done (sugar
|
|
|
3572
3686
|
});
|
|
3573
3687
|
|
|
3574
3688
|
// src/handwritten/commands/email/send.ts
|
|
3575
|
-
import { Command as
|
|
3689
|
+
import { Command as Command57 } from "commander";
|
|
3576
3690
|
import { readFile, stat } from "fs/promises";
|
|
3577
3691
|
import { basename } from "path";
|
|
3578
3692
|
|
|
@@ -3630,7 +3744,7 @@ async function resolveAttachment(input) {
|
|
|
3630
3744
|
`--attach ${input}: neither a readable file nor a valid <prefix>_<ulid>:<idx> reference.`
|
|
3631
3745
|
);
|
|
3632
3746
|
}
|
|
3633
|
-
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) => {
|
|
3634
3748
|
const isReply = Boolean(opts.reply);
|
|
3635
3749
|
const to = opts.to;
|
|
3636
3750
|
const attachInputs = opts.attach;
|
|
@@ -3717,7 +3831,7 @@ var sendCommand = new Command53("send").description("Send an outbound email").re
|
|
|
3717
3831
|
});
|
|
3718
3832
|
|
|
3719
3833
|
// src/handwritten/commands/email/attachment.ts
|
|
3720
|
-
import { Command as
|
|
3834
|
+
import { Command as Command58 } from "commander";
|
|
3721
3835
|
import { createWriteStream } from "fs";
|
|
3722
3836
|
import { Readable } from "stream";
|
|
3723
3837
|
import { pipeline } from "stream/promises";
|
|
@@ -3734,7 +3848,7 @@ function parseContentDispositionFilename(header) {
|
|
|
3734
3848
|
}
|
|
3735
3849
|
|
|
3736
3850
|
// src/handwritten/commands/email/attachment.ts
|
|
3737
|
-
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) => {
|
|
3738
3852
|
const idx = Number(idxArg);
|
|
3739
3853
|
if (!Number.isInteger(idx) || idx < 0) {
|
|
3740
3854
|
process.stderr.write(`<idx> must be a non-negative integer (got "${idxArg}")
|
|
@@ -3767,7 +3881,7 @@ var attachmentCommand = new Command54("attachment").description("Download an inb
|
|
|
3767
3881
|
|
|
3768
3882
|
// src/cli.ts
|
|
3769
3883
|
function buildProgram() {
|
|
3770
|
-
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) => {
|
|
3771
3885
|
const globals = actionCommand.optsWithGlobals();
|
|
3772
3886
|
if (globals.json) process.env.WSPC_OUTPUT = "json";
|
|
3773
3887
|
if (globals.account) process.env.WSPC_ACCOUNT = String(globals.account);
|