@fulldivevr/workcord-cli 1.0.0

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.
Files changed (82) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +312 -0
  3. package/dist/auth.js +9 -0
  4. package/dist/cli.js +46 -0
  5. package/dist/client.js +125 -0
  6. package/dist/commands/_group.js +5 -0
  7. package/dist/commands/auth.js +125 -0
  8. package/dist/commands/challenges.js +51 -0
  9. package/dist/commands/custom-agents.js +120 -0
  10. package/dist/commands/dm.js +35 -0
  11. package/dist/commands/messages.js +360 -0
  12. package/dist/commands/room-agents.js +47 -0
  13. package/dist/commands/rooms.js +687 -0
  14. package/dist/commands/users.js +126 -0
  15. package/dist/commands/whoami.js +15 -0
  16. package/dist/generated/_helpers.js +8 -0
  17. package/dist/generated/commands/activity.js +46 -0
  18. package/dist/generated/commands/ai.js +40 -0
  19. package/dist/generated/commands/ambassador.js +34 -0
  20. package/dist/generated/commands/apple-iap.js +61 -0
  21. package/dist/generated/commands/attribution.js +130 -0
  22. package/dist/generated/commands/auth.js +205 -0
  23. package/dist/generated/commands/challenges.js +251 -0
  24. package/dist/generated/commands/clips.js +71 -0
  25. package/dist/generated/commands/contact-match.js +92 -0
  26. package/dist/generated/commands/content-crawler.js +27 -0
  27. package/dist/generated/commands/custom-agents.js +346 -0
  28. package/dist/generated/commands/desktop-releases.js +236 -0
  29. package/dist/generated/commands/discover.js +236 -0
  30. package/dist/generated/commands/dm.js +155 -0
  31. package/dist/generated/commands/drafts.js +41 -0
  32. package/dist/generated/commands/embed.js +34 -0
  33. package/dist/generated/commands/explore.js +19 -0
  34. package/dist/generated/commands/feed.js +67 -0
  35. package/dist/generated/commands/feedback.js +44 -0
  36. package/dist/generated/commands/gamification.js +33 -0
  37. package/dist/generated/commands/google-play-iap.js +73 -0
  38. package/dist/generated/commands/health.js +32 -0
  39. package/dist/generated/commands/internal.js +162 -0
  40. package/dist/generated/commands/interview.js +76 -0
  41. package/dist/generated/commands/invite-redirect.js +20 -0
  42. package/dist/generated/commands/jesuscord-admin.js +36 -0
  43. package/dist/generated/commands/join.js +27 -0
  44. package/dist/generated/commands/kits.js +108 -0
  45. package/dist/generated/commands/meetings.js +81 -0
  46. package/dist/generated/commands/message-folders.js +68 -0
  47. package/dist/generated/commands/messages.js +418 -0
  48. package/dist/generated/commands/one-emulator.js +32 -0
  49. package/dist/generated/commands/pdf-export.js +19 -0
  50. package/dist/generated/commands/pin-folders.js +72 -0
  51. package/dist/generated/commands/pinned-messages.js +81 -0
  52. package/dist/generated/commands/polls.js +152 -0
  53. package/dist/generated/commands/premium-feeds.js +32 -0
  54. package/dist/generated/commands/processors.js +22 -0
  55. package/dist/generated/commands/questions.js +54 -0
  56. package/dist/generated/commands/referrals.js +19 -0
  57. package/dist/generated/commands/reports.js +21 -0
  58. package/dist/generated/commands/room-a2-a.js +81 -0
  59. package/dist/generated/commands/room-agents.js +273 -0
  60. package/dist/generated/commands/room-invites.js +155 -0
  61. package/dist/generated/commands/room-owned-agent.js +36 -0
  62. package/dist/generated/commands/room-page.js +20 -0
  63. package/dist/generated/commands/rooms.js +1117 -0
  64. package/dist/generated/commands/saved-messages.js +84 -0
  65. package/dist/generated/commands/saved-stories.js +125 -0
  66. package/dist/generated/commands/search.js +44 -0
  67. package/dist/generated/commands/shadow-home-agent.js +36 -0
  68. package/dist/generated/commands/shadow.js +64 -0
  69. package/dist/generated/commands/share-cards.js +85 -0
  70. package/dist/generated/commands/share.js +20 -0
  71. package/dist/generated/commands/sponsors.js +20 -0
  72. package/dist/generated/commands/stories.js +324 -0
  73. package/dist/generated/commands/story-by-id.js +20 -0
  74. package/dist/generated/commands/submissions.js +112 -0
  75. package/dist/generated/commands/subscriptions.js +103 -0
  76. package/dist/generated/commands/tips.js +76 -0
  77. package/dist/generated/commands/users.js +373 -0
  78. package/dist/generated/commands/voice-token.js +21 -0
  79. package/dist/generated/commands/well-known.js +32 -0
  80. package/dist/generated/commands/wrapped.js +20 -0
  81. package/dist/generated/index.js +131 -0
  82. package/package.json +60 -0
@@ -0,0 +1,73 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "google-play-iap", "GooglePlayIap operations");
5
+ if (!hasSubcommand(group, "verify")) {
6
+ group
7
+ .command("verify")
8
+ .description("POST /api/v1/subscriptions/google/verify")
9
+ .requiredOption("--purchase-token <value>", "string")
10
+ .requiredOption("--product-id <value>", "string")
11
+ .action(async (opts) => {
12
+ const { as } = program.opts();
13
+ if (!as)
14
+ throw new Error("--as <userId> is required");
15
+ const path = `/api/v1/subscriptions/google/verify`;
16
+ const body = {};
17
+ {
18
+ const v = opts.purchaseToken;
19
+ if (v !== undefined)
20
+ body["purchaseToken"] = v;
21
+ }
22
+ {
23
+ const v = opts.productId;
24
+ if (v !== undefined)
25
+ body["productId"] = v;
26
+ }
27
+ const data = await call({ method: "POST", path, asUserId: as, body });
28
+ process.stdout.write(JSON.stringify(data) + "\n");
29
+ });
30
+ }
31
+ if (!hasSubcommand(group, "restore")) {
32
+ group
33
+ .command("restore")
34
+ .description("POST /api/v1/subscriptions/google/restore")
35
+ .requiredOption("--purchase-token <value>", "string")
36
+ .requiredOption("--product-id <value>", "string")
37
+ .action(async (opts) => {
38
+ const { as } = program.opts();
39
+ if (!as)
40
+ throw new Error("--as <userId> is required");
41
+ const path = `/api/v1/subscriptions/google/restore`;
42
+ const body = {};
43
+ {
44
+ const v = opts.purchaseToken;
45
+ if (v !== undefined)
46
+ body["purchaseToken"] = v;
47
+ }
48
+ {
49
+ const v = opts.productId;
50
+ if (v !== undefined)
51
+ body["productId"] = v;
52
+ }
53
+ const data = await call({ method: "POST", path, asUserId: as, body });
54
+ process.stdout.write(JSON.stringify(data) + "\n");
55
+ });
56
+ }
57
+ if (!hasSubcommand(group, "webhook")) {
58
+ group
59
+ .command("webhook")
60
+ .description("POST /api/v1/webhooks/google-play")
61
+ .option("--body <json>", "request body as JSON (no schema available)")
62
+ .action(async (opts) => {
63
+ const { as } = program.opts();
64
+ if (!as)
65
+ throw new Error("--as <userId> is required");
66
+ const path = `/api/v1/webhooks/google-play`;
67
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
68
+ const data = await call({ method: "POST", path, asUserId: as, body });
69
+ process.stdout.write(JSON.stringify(data) + "\n");
70
+ });
71
+ }
72
+ }
73
+ //# sourceMappingURL=google-play-iap.js.map
@@ -0,0 +1,32 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "health", "Health operations");
5
+ if (!hasSubcommand(group, "health")) {
6
+ group
7
+ .command("health")
8
+ .description("GET /api/health")
9
+ .action(async (opts) => {
10
+ const { as } = program.opts();
11
+ if (!as)
12
+ throw new Error("--as <userId> is required");
13
+ const path = `/api/health`;
14
+ const data = await call({ method: "GET", path, asUserId: as });
15
+ process.stdout.write(JSON.stringify(data) + "\n");
16
+ });
17
+ }
18
+ if (!hasSubcommand(group, "hello")) {
19
+ group
20
+ .command("hello")
21
+ .description("GET /api/hello")
22
+ .action(async (opts) => {
23
+ const { as } = program.opts();
24
+ if (!as)
25
+ throw new Error("--as <userId> is required");
26
+ const path = `/api/hello`;
27
+ const data = await call({ method: "GET", path, asUserId: as });
28
+ process.stdout.write(JSON.stringify(data) + "\n");
29
+ });
30
+ }
31
+ }
32
+ //# sourceMappingURL=health.js.map
@@ -0,0 +1,162 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "internal", "Internal operations");
5
+ if (!hasSubcommand(group, "emit-message")) {
6
+ group
7
+ .command("emit-message")
8
+ .description("POST /api/v1/internal/rooms/{roomId}/emit-message")
9
+ .requiredOption("--room-id <value>", "roomId (path param)")
10
+ .option("--body <json>", "request body as JSON (no schema available)")
11
+ .action(async (opts) => {
12
+ const { as } = program.opts();
13
+ if (!as)
14
+ throw new Error("--as <userId> is required");
15
+ const path = `/api/v1/internal/rooms/${encodeURIComponent(opts.roomId)}/emit-message`;
16
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
17
+ const data = await call({ method: "POST", path, asUserId: as, body });
18
+ process.stdout.write(JSON.stringify(data) + "\n");
19
+ });
20
+ }
21
+ if (!hasSubcommand(group, "voice-dispatch")) {
22
+ group
23
+ .command("voice-dispatch")
24
+ .description("POST /api/v1/internal/voice/dispatch")
25
+ .option("--body <json>", "request body as JSON (no schema available)")
26
+ .action(async (opts) => {
27
+ const { as } = program.opts();
28
+ if (!as)
29
+ throw new Error("--as <userId> is required");
30
+ const path = `/api/v1/internal/voice/dispatch`;
31
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
32
+ const data = await call({ method: "POST", path, asUserId: as, body });
33
+ process.stdout.write(JSON.stringify(data) + "\n");
34
+ });
35
+ }
36
+ if (!hasSubcommand(group, "list-users")) {
37
+ group
38
+ .command("list-users")
39
+ .description("GET /api/v1/internal/users")
40
+ .option("--cursor <value>", "string")
41
+ .option("--account-type <value>", "string")
42
+ .option("--limit <json>", " (JSON)")
43
+ .option("--q <json>", " (JSON)")
44
+ .action(async (opts) => {
45
+ const { as } = program.opts();
46
+ if (!as)
47
+ throw new Error("--as <userId> is required");
48
+ const path = `/api/v1/internal/users`;
49
+ const query = {};
50
+ {
51
+ const v = opts.cursor;
52
+ if (v !== undefined)
53
+ query["cursor"] = v;
54
+ }
55
+ {
56
+ const v = opts.accountType;
57
+ if (v !== undefined)
58
+ query["accountType"] = v;
59
+ }
60
+ {
61
+ const v = opts.limit === undefined ? undefined : JSON.parse(opts.limit);
62
+ if (v !== undefined)
63
+ query["limit"] = v;
64
+ }
65
+ {
66
+ const v = opts.q === undefined ? undefined : JSON.parse(opts.q);
67
+ if (v !== undefined)
68
+ query["q"] = v;
69
+ }
70
+ const data = await call({ method: "GET", path, asUserId: as, query });
71
+ process.stdout.write(JSON.stringify(data) + "\n");
72
+ });
73
+ }
74
+ if (!hasSubcommand(group, "set-tier")) {
75
+ group
76
+ .command("set-tier")
77
+ .description("POST /api/v1/internal/users/{userId}/tier")
78
+ .requiredOption("--user-id <value>", "userId (path param)")
79
+ .option("--body <json>", "request body as JSON (no schema available)")
80
+ .action(async (opts) => {
81
+ const { as } = program.opts();
82
+ if (!as)
83
+ throw new Error("--as <userId> is required");
84
+ const path = `/api/v1/internal/users/${encodeURIComponent(opts.userId)}/tier`;
85
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
86
+ const data = await call({ method: "POST", path, asUserId: as, body });
87
+ process.stdout.write(JSON.stringify(data) + "\n");
88
+ });
89
+ }
90
+ if (!hasSubcommand(group, "list-email-allowlist")) {
91
+ group
92
+ .command("list-email-allowlist")
93
+ .description("GET /api/v1/internal/email-auth/allowlist")
94
+ .option("--limit <json>", " (JSON)")
95
+ .option("--q <json>", " (JSON)")
96
+ .action(async (opts) => {
97
+ const { as } = program.opts();
98
+ if (!as)
99
+ throw new Error("--as <userId> is required");
100
+ const path = `/api/v1/internal/email-auth/allowlist`;
101
+ const query = {};
102
+ {
103
+ const v = opts.limit === undefined ? undefined : JSON.parse(opts.limit);
104
+ if (v !== undefined)
105
+ query["limit"] = v;
106
+ }
107
+ {
108
+ const v = opts.q === undefined ? undefined : JSON.parse(opts.q);
109
+ if (v !== undefined)
110
+ query["q"] = v;
111
+ }
112
+ const data = await call({ method: "GET", path, asUserId: as, query });
113
+ process.stdout.write(JSON.stringify(data) + "\n");
114
+ });
115
+ }
116
+ if (!hasSubcommand(group, "upsert-email-allowlist")) {
117
+ group
118
+ .command("upsert-email-allowlist")
119
+ .description("POST /api/v1/internal/email-auth/allowlist")
120
+ .option("--body <json>", "request body as JSON (no schema available)")
121
+ .action(async (opts) => {
122
+ const { as } = program.opts();
123
+ if (!as)
124
+ throw new Error("--as <userId> is required");
125
+ const path = `/api/v1/internal/email-auth/allowlist`;
126
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
127
+ const data = await call({ method: "POST", path, asUserId: as, body });
128
+ process.stdout.write(JSON.stringify(data) + "\n");
129
+ });
130
+ }
131
+ if (!hasSubcommand(group, "patch-email-allowlist")) {
132
+ group
133
+ .command("patch-email-allowlist")
134
+ .description("PATCH /api/v1/internal/email-auth/allowlist/{email}")
135
+ .requiredOption("--email <value>", "email (path param)")
136
+ .option("--body <json>", "request body as JSON (no schema available)")
137
+ .action(async (opts) => {
138
+ const { as } = program.opts();
139
+ if (!as)
140
+ throw new Error("--as <userId> is required");
141
+ const path = `/api/v1/internal/email-auth/allowlist/${encodeURIComponent(opts.email)}`;
142
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
143
+ const data = await call({ method: "PATCH", path, asUserId: as, body });
144
+ process.stdout.write(JSON.stringify(data) + "\n");
145
+ });
146
+ }
147
+ if (!hasSubcommand(group, "delete-email-allowlist")) {
148
+ group
149
+ .command("delete-email-allowlist")
150
+ .description("DELETE /api/v1/internal/email-auth/allowlist/{email}")
151
+ .requiredOption("--email <value>", "email (path param)")
152
+ .action(async (opts) => {
153
+ const { as } = program.opts();
154
+ if (!as)
155
+ throw new Error("--as <userId> is required");
156
+ const path = `/api/v1/internal/email-auth/allowlist/${encodeURIComponent(opts.email)}`;
157
+ const data = await call({ method: "DELETE", path, asUserId: as });
158
+ process.stdout.write(JSON.stringify(data) + "\n");
159
+ });
160
+ }
161
+ }
162
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1,76 @@
1
+ // Auto-generated. Do not edit by hand. Regenerate via `npm run generate`.
2
+ import { Option } from "commander";
3
+ import { call } from "../../client.js";
4
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
5
+ export function register(program) {
6
+ const group = getOrCreateGroup(program, "interview", "Interview operations");
7
+ if (!hasSubcommand(group, "start")) {
8
+ group
9
+ .command("start")
10
+ .description("POST /api/v1/assistant/interview/start")
11
+ .addOption(new Option("--mode <value>", "string, enum").choices(["room", "agent"]).makeOptionMandatory())
12
+ .option("--seed <value>", "string, ≤10000 chars")
13
+ .action(async (opts) => {
14
+ const { as } = program.opts();
15
+ if (!as)
16
+ throw new Error("--as <userId> is required");
17
+ const path = `/api/v1/assistant/interview/start`;
18
+ const body = {};
19
+ {
20
+ const v = opts.mode;
21
+ if (v !== undefined)
22
+ body["mode"] = v;
23
+ }
24
+ {
25
+ const v = opts.seed;
26
+ if (v !== undefined)
27
+ body["seed"] = v;
28
+ }
29
+ const data = await call({ method: "POST", path, asUserId: as, body });
30
+ process.stdout.write(JSON.stringify(data) + "\n");
31
+ });
32
+ }
33
+ if (!hasSubcommand(group, "reply")) {
34
+ group
35
+ .command("reply")
36
+ .description("POST /api/v1/assistant/interview/{sessionId}/reply")
37
+ .requiredOption("--session-id <value>", "sessionId (path param)")
38
+ .requiredOption("--message <value>", "string, ≤10000 chars")
39
+ .action(async (opts) => {
40
+ const { as } = program.opts();
41
+ if (!as)
42
+ throw new Error("--as <userId> is required");
43
+ const path = `/api/v1/assistant/interview/${encodeURIComponent(opts.sessionId)}/reply`;
44
+ const body = {};
45
+ {
46
+ const v = opts.message;
47
+ if (v !== undefined)
48
+ body["message"] = v;
49
+ }
50
+ const data = await call({ method: "POST", path, asUserId: as, body });
51
+ process.stdout.write(JSON.stringify(data) + "\n");
52
+ });
53
+ }
54
+ if (!hasSubcommand(group, "confirm")) {
55
+ group
56
+ .command("confirm")
57
+ .description("POST /api/v1/assistant/interview/{sessionId}/confirm")
58
+ .requiredOption("--session-id <value>", "sessionId (path param)")
59
+ .requiredOption("--proposal <json>", " (JSON)")
60
+ .action(async (opts) => {
61
+ const { as } = program.opts();
62
+ if (!as)
63
+ throw new Error("--as <userId> is required");
64
+ const path = `/api/v1/assistant/interview/${encodeURIComponent(opts.sessionId)}/confirm`;
65
+ const body = {};
66
+ {
67
+ const v = opts.proposal === undefined ? undefined : JSON.parse(opts.proposal);
68
+ if (v !== undefined)
69
+ body["proposal"] = v;
70
+ }
71
+ const data = await call({ method: "POST", path, asUserId: as, body });
72
+ process.stdout.write(JSON.stringify(data) + "\n");
73
+ });
74
+ }
75
+ }
76
+ //# sourceMappingURL=interview.js.map
@@ -0,0 +1,20 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "invite-redirect", "InviteRedirect operations");
5
+ if (!hasSubcommand(group, "redirect")) {
6
+ group
7
+ .command("redirect")
8
+ .description("GET /c/{inviteCode}")
9
+ .requiredOption("--invite-code <value>", "inviteCode (path param)")
10
+ .action(async (opts) => {
11
+ const { as } = program.opts();
12
+ if (!as)
13
+ throw new Error("--as <userId> is required");
14
+ const path = `/c/${encodeURIComponent(opts.inviteCode)}`;
15
+ const data = await call({ method: "GET", path, asUserId: as });
16
+ process.stdout.write(JSON.stringify(data) + "\n");
17
+ });
18
+ }
19
+ }
20
+ //# sourceMappingURL=invite-redirect.js.map
@@ -0,0 +1,36 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "jesuscord-admin", "JesuscordAdmin operations");
5
+ if (!hasSubcommand(group, "setup")) {
6
+ group
7
+ .command("setup")
8
+ .description("POST /api/v1/admin/jesuscord/setup")
9
+ .option("--body <json>", "request body as JSON (no schema available)")
10
+ .action(async (opts) => {
11
+ const { as } = program.opts();
12
+ if (!as)
13
+ throw new Error("--as <userId> is required");
14
+ const path = `/api/v1/admin/jesuscord/setup`;
15
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
16
+ const data = await call({ method: "POST", path, asUserId: as, body });
17
+ process.stdout.write(JSON.stringify(data) + "\n");
18
+ });
19
+ }
20
+ if (!hasSubcommand(group, "cleanup")) {
21
+ group
22
+ .command("cleanup")
23
+ .description("POST /api/v1/admin/jesuscord/cleanup")
24
+ .option("--body <json>", "request body as JSON (no schema available)")
25
+ .action(async (opts) => {
26
+ const { as } = program.opts();
27
+ if (!as)
28
+ throw new Error("--as <userId> is required");
29
+ const path = `/api/v1/admin/jesuscord/cleanup`;
30
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
31
+ const data = await call({ method: "POST", path, asUserId: as, body });
32
+ process.stdout.write(JSON.stringify(data) + "\n");
33
+ });
34
+ }
35
+ }
36
+ //# sourceMappingURL=jesuscord-admin.js.map
@@ -0,0 +1,27 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "join", "Join operations");
5
+ if (!hasSubcommand(group, "join-page")) {
6
+ group
7
+ .command("join-page")
8
+ .description("GET /join/{code}")
9
+ .requiredOption("--code <value>", "code (path param)")
10
+ .option("--ref <json>", " (JSON)")
11
+ .action(async (opts) => {
12
+ const { as } = program.opts();
13
+ if (!as)
14
+ throw new Error("--as <userId> is required");
15
+ const path = `/join/${encodeURIComponent(opts.code)}`;
16
+ const query = {};
17
+ {
18
+ const v = opts.ref === undefined ? undefined : JSON.parse(opts.ref);
19
+ if (v !== undefined)
20
+ query["ref"] = v;
21
+ }
22
+ const data = await call({ method: "GET", path, asUserId: as, query });
23
+ process.stdout.write(JSON.stringify(data) + "\n");
24
+ });
25
+ }
26
+ }
27
+ //# sourceMappingURL=join.js.map
@@ -0,0 +1,108 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "kits", "Kits operations");
5
+ if (!hasSubcommand(group, "list-mine")) {
6
+ group
7
+ .command("list-mine")
8
+ .description("GET /api/v1/users/me/kits")
9
+ .option("--cursor <value>", "string")
10
+ .option("--limit <value>", "string")
11
+ .action(async (opts) => {
12
+ const { as } = program.opts();
13
+ if (!as)
14
+ throw new Error("--as <userId> is required");
15
+ const path = `/api/v1/users/me/kits`;
16
+ const query = {};
17
+ {
18
+ const v = opts.cursor;
19
+ if (v !== undefined)
20
+ query["cursor"] = v;
21
+ }
22
+ {
23
+ const v = opts.limit;
24
+ if (v !== undefined)
25
+ query["limit"] = v;
26
+ }
27
+ const data = await call({ method: "GET", path, asUserId: as, query });
28
+ process.stdout.write(JSON.stringify(data) + "\n");
29
+ });
30
+ }
31
+ if (!hasSubcommand(group, "approve")) {
32
+ group
33
+ .command("approve")
34
+ .description("POST /api/v1/kits/{kitId}/approve")
35
+ .requiredOption("--kit-id <value>", "kitId (path param)")
36
+ .option("--body <json>", "request body as JSON (no schema available)")
37
+ .action(async (opts) => {
38
+ const { as } = program.opts();
39
+ if (!as)
40
+ throw new Error("--as <userId> is required");
41
+ const path = `/api/v1/kits/${encodeURIComponent(opts.kitId)}/approve`;
42
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
43
+ const data = await call({ method: "POST", path, asUserId: as, body });
44
+ process.stdout.write(JSON.stringify(data) + "\n");
45
+ });
46
+ }
47
+ if (!hasSubcommand(group, "remove-element")) {
48
+ group
49
+ .command("remove-element")
50
+ .description("DELETE /api/v1/kits/{kitId}/elements/{elementId}")
51
+ .requiredOption("--kit-id <value>", "kitId (path param)")
52
+ .requiredOption("--element-id <value>", "elementId (path param)")
53
+ .action(async (opts) => {
54
+ const { as } = program.opts();
55
+ if (!as)
56
+ throw new Error("--as <userId> is required");
57
+ const path = `/api/v1/kits/${encodeURIComponent(opts.kitId)}/elements/${encodeURIComponent(opts.elementId)}`;
58
+ const data = await call({ method: "DELETE", path, asUserId: as });
59
+ process.stdout.write(JSON.stringify(data) + "\n");
60
+ });
61
+ }
62
+ if (!hasSubcommand(group, "public-kit")) {
63
+ group
64
+ .command("public-kit")
65
+ .description("GET /api/v1/kits/{kitId}/public")
66
+ .requiredOption("--kit-id <value>", "kitId (path param)")
67
+ .action(async (opts) => {
68
+ const { as } = program.opts();
69
+ if (!as)
70
+ throw new Error("--as <userId> is required");
71
+ const path = `/api/v1/kits/${encodeURIComponent(opts.kitId)}/public`;
72
+ const data = await call({ method: "GET", path, asUserId: as });
73
+ process.stdout.write(JSON.stringify(data) + "\n");
74
+ });
75
+ }
76
+ if (!hasSubcommand(group, "public-element")) {
77
+ group
78
+ .command("public-element")
79
+ .description("GET /api/v1/kits/{kitId}/elements/{elementId}/public")
80
+ .requiredOption("--kit-id <value>", "kitId (path param)")
81
+ .requiredOption("--element-id <value>", "elementId (path param)")
82
+ .action(async (opts) => {
83
+ const { as } = program.opts();
84
+ if (!as)
85
+ throw new Error("--as <userId> is required");
86
+ const path = `/api/v1/kits/${encodeURIComponent(opts.kitId)}/elements/${encodeURIComponent(opts.elementId)}/public`;
87
+ const data = await call({ method: "GET", path, asUserId: as });
88
+ process.stdout.write(JSON.stringify(data) + "\n");
89
+ });
90
+ }
91
+ if (!hasSubcommand(group, "share-proof-dm")) {
92
+ group
93
+ .command("share-proof-dm")
94
+ .description("POST /api/v1/jesuscord/pastors/{pastorId}/share-proof-dm")
95
+ .requiredOption("--pastor-id <value>", "pastorId (path param)")
96
+ .option("--body <json>", "request body as JSON (no schema available)")
97
+ .action(async (opts) => {
98
+ const { as } = program.opts();
99
+ if (!as)
100
+ throw new Error("--as <userId> is required");
101
+ const path = `/api/v1/jesuscord/pastors/${encodeURIComponent(opts.pastorId)}/share-proof-dm`;
102
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
103
+ const data = await call({ method: "POST", path, asUserId: as, body });
104
+ process.stdout.write(JSON.stringify(data) + "\n");
105
+ });
106
+ }
107
+ }
108
+ //# sourceMappingURL=kits.js.map
@@ -0,0 +1,81 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "meetings", "Meetings operations");
5
+ if (!hasSubcommand(group, "create")) {
6
+ group
7
+ .command("create")
8
+ .description("POST /api/v1/meetings")
9
+ .option("--body <json>", "request body as JSON (no schema available)")
10
+ .action(async (opts) => {
11
+ const { as } = program.opts();
12
+ if (!as)
13
+ throw new Error("--as <userId> is required");
14
+ const path = `/api/v1/meetings`;
15
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
16
+ const data = await call({ method: "POST", path, asUserId: as, body });
17
+ process.stdout.write(JSON.stringify(data) + "\n");
18
+ });
19
+ }
20
+ if (!hasSubcommand(group, "trial-status")) {
21
+ group
22
+ .command("trial-status")
23
+ .description("GET /api/v1/meetings/trial")
24
+ .action(async (opts) => {
25
+ const { as } = program.opts();
26
+ if (!as)
27
+ throw new Error("--as <userId> is required");
28
+ const path = `/api/v1/meetings/trial`;
29
+ const data = await call({ method: "GET", path, asUserId: as });
30
+ process.stdout.write(JSON.stringify(data) + "\n");
31
+ });
32
+ }
33
+ if (!hasSubcommand(group, "upload-chunk")) {
34
+ group
35
+ .command("upload-chunk")
36
+ .description("POST /api/v1/meetings/{id}/chunks/{index}")
37
+ .requiredOption("--id <value>", "id (path param)")
38
+ .requiredOption("--index <value>", "index (path param)")
39
+ .option("--body <json>", "request body as JSON (no schema available)")
40
+ .action(async (opts) => {
41
+ const { as } = program.opts();
42
+ if (!as)
43
+ throw new Error("--as <userId> is required");
44
+ const path = `/api/v1/meetings/${encodeURIComponent(opts.id)}/chunks/${encodeURIComponent(opts.index)}`;
45
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
46
+ const data = await call({ method: "POST", path, asUserId: as, body });
47
+ process.stdout.write(JSON.stringify(data) + "\n");
48
+ });
49
+ }
50
+ if (!hasSubcommand(group, "complete")) {
51
+ group
52
+ .command("complete")
53
+ .description("POST /api/v1/meetings/{id}/complete")
54
+ .requiredOption("--id <value>", "id (path param)")
55
+ .option("--body <json>", "request body as JSON (no schema available)")
56
+ .action(async (opts) => {
57
+ const { as } = program.opts();
58
+ if (!as)
59
+ throw new Error("--as <userId> is required");
60
+ const path = `/api/v1/meetings/${encodeURIComponent(opts.id)}/complete`;
61
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
62
+ const data = await call({ method: "POST", path, asUserId: as, body });
63
+ process.stdout.write(JSON.stringify(data) + "\n");
64
+ });
65
+ }
66
+ if (!hasSubcommand(group, "transcript")) {
67
+ group
68
+ .command("transcript")
69
+ .description("GET /api/v1/meetings/{id}/transcript")
70
+ .requiredOption("--id <value>", "id (path param)")
71
+ .action(async (opts) => {
72
+ const { as } = program.opts();
73
+ if (!as)
74
+ throw new Error("--as <userId> is required");
75
+ const path = `/api/v1/meetings/${encodeURIComponent(opts.id)}/transcript`;
76
+ const data = await call({ method: "GET", path, asUserId: as });
77
+ process.stdout.write(JSON.stringify(data) + "\n");
78
+ });
79
+ }
80
+ }
81
+ //# sourceMappingURL=meetings.js.map