@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,273 @@
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, "room-agents", "RoomAgents operations");
7
+ if (!hasSubcommand(group, "preview-standalone")) {
8
+ group
9
+ .command("preview-standalone")
10
+ .description("POST /api/v1/agents/preview")
11
+ .requiredOption("--card-url <value>", "string")
12
+ .action(async (opts) => {
13
+ const { as } = program.opts();
14
+ if (!as)
15
+ throw new Error("--as <userId> is required");
16
+ const path = `/api/v1/agents/preview`;
17
+ const body = {};
18
+ {
19
+ const v = opts.cardUrl;
20
+ if (v !== undefined)
21
+ body["cardUrl"] = v;
22
+ }
23
+ const data = await call({ method: "POST", path, asUserId: as, body });
24
+ process.stdout.write(JSON.stringify(data) + "\n");
25
+ });
26
+ }
27
+ if (!hasSubcommand(group, "list-reusable-room-agents")) {
28
+ group
29
+ .command("list-reusable-room-agents")
30
+ .description("GET /api/v1/agents/room-agents/available")
31
+ .option("--target-room-id <value>", "string")
32
+ .action(async (opts) => {
33
+ const { as } = program.opts();
34
+ if (!as)
35
+ throw new Error("--as <userId> is required");
36
+ const path = `/api/v1/agents/room-agents/available`;
37
+ const query = {};
38
+ {
39
+ const v = opts.targetRoomId;
40
+ if (v !== undefined)
41
+ query["targetRoomId"] = v;
42
+ }
43
+ const data = await call({ method: "GET", path, asUserId: as, query });
44
+ process.stdout.write(JSON.stringify(data) + "\n");
45
+ });
46
+ }
47
+ if (!hasSubcommand(group, "install-reusable-room-agent")) {
48
+ group
49
+ .command("install-reusable-room-agent")
50
+ .description("POST /api/v1/rooms/{roomId}/agents/install-room-agent/{sourceRoomId}")
51
+ .requiredOption("--room-id <value>", "roomId (path param)")
52
+ .requiredOption("--source-room-id <value>", "sourceRoomId (path param)")
53
+ .option("--body <json>", "request body as JSON (no schema available)")
54
+ .action(async (opts) => {
55
+ const { as } = program.opts();
56
+ if (!as)
57
+ throw new Error("--as <userId> is required");
58
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents/install-room-agent/${encodeURIComponent(opts.sourceRoomId)}`;
59
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
60
+ const data = await call({ method: "POST", path, asUserId: as, body });
61
+ process.stdout.write(JSON.stringify(data) + "\n");
62
+ });
63
+ }
64
+ if (!hasSubcommand(group, "start-reusable-room-agent-dm")) {
65
+ group
66
+ .command("start-reusable-room-agent-dm")
67
+ .description("POST /api/v1/agents/room-agents/{sourceRoomId}/start-dm")
68
+ .requiredOption("--source-room-id <value>", "sourceRoomId (path param)")
69
+ .option("--body <json>", "request body as JSON (no schema available)")
70
+ .action(async (opts) => {
71
+ const { as } = program.opts();
72
+ if (!as)
73
+ throw new Error("--as <userId> is required");
74
+ const path = `/api/v1/agents/room-agents/${encodeURIComponent(opts.sourceRoomId)}/start-dm`;
75
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
76
+ const data = await call({ method: "POST", path, asUserId: as, body });
77
+ process.stdout.write(JSON.stringify(data) + "\n");
78
+ });
79
+ }
80
+ if (!hasSubcommand(group, "list")) {
81
+ group
82
+ .command("list")
83
+ .description("GET /api/v1/rooms/{roomId}/agents")
84
+ .requiredOption("--room-id <value>", "roomId (path param)")
85
+ .action(async (opts) => {
86
+ const { as } = program.opts();
87
+ if (!as)
88
+ throw new Error("--as <userId> is required");
89
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents`;
90
+ const data = await call({ method: "GET", path, asUserId: as });
91
+ process.stdout.write(JSON.stringify(data) + "\n");
92
+ });
93
+ }
94
+ if (!hasSubcommand(group, "add")) {
95
+ group
96
+ .command("add")
97
+ .description("POST /api/v1/rooms/{roomId}/agents")
98
+ .requiredOption("--room-id <value>", "roomId (path param)")
99
+ .requiredOption("--card-url <value>", "string")
100
+ .requiredOption("--api-key <value>", "string")
101
+ .action(async (opts) => {
102
+ const { as } = program.opts();
103
+ if (!as)
104
+ throw new Error("--as <userId> is required");
105
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents`;
106
+ const body = {};
107
+ {
108
+ const v = opts.cardUrl;
109
+ if (v !== undefined)
110
+ body["cardUrl"] = v;
111
+ }
112
+ {
113
+ const v = opts.apiKey;
114
+ if (v !== undefined)
115
+ body["apiKey"] = v;
116
+ }
117
+ const data = await call({ method: "POST", path, asUserId: as, body });
118
+ process.stdout.write(JSON.stringify(data) + "\n");
119
+ });
120
+ }
121
+ if (!hasSubcommand(group, "preview")) {
122
+ group
123
+ .command("preview")
124
+ .description("POST /api/v1/rooms/{roomId}/agents/preview")
125
+ .requiredOption("--room-id <value>", "roomId (path param)")
126
+ .requiredOption("--card-url <value>", "string")
127
+ .action(async (opts) => {
128
+ const { as } = program.opts();
129
+ if (!as)
130
+ throw new Error("--as <userId> is required");
131
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents/preview`;
132
+ const body = {};
133
+ {
134
+ const v = opts.cardUrl;
135
+ if (v !== undefined)
136
+ body["cardUrl"] = v;
137
+ }
138
+ const data = await call({ method: "POST", path, asUserId: as, body });
139
+ process.stdout.write(JSON.stringify(data) + "\n");
140
+ });
141
+ }
142
+ if (!hasSubcommand(group, "update")) {
143
+ group
144
+ .command("update")
145
+ .description("PATCH /api/v1/rooms/{roomId}/agents/{agentId}")
146
+ .requiredOption("--room-id <value>", "roomId (path param)")
147
+ .requiredOption("--agent-id <value>", "agentId (path param)")
148
+ .option("--card-name <value>", "string, ≤120 chars")
149
+ .option("--card-description <value>", "string, ≤1000 chars")
150
+ .option("--enabled <true|false>", "boolean")
151
+ .option("--api-key <value>", "string")
152
+ .option("--reply-in-thread <true|false>", "boolean")
153
+ .addOption(new Option("--mode <value>", "string, enum").choices(["silent", "proactive", "suggest"]))
154
+ .option("--trigger-rule <value>", "string, ≤500 chars")
155
+ .option("--priority <n>", "number")
156
+ .action(async (opts) => {
157
+ const { as } = program.opts();
158
+ if (!as)
159
+ throw new Error("--as <userId> is required");
160
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents/${encodeURIComponent(opts.agentId)}`;
161
+ const body = {};
162
+ {
163
+ const v = opts.cardName;
164
+ if (v !== undefined)
165
+ body["cardName"] = v;
166
+ }
167
+ {
168
+ const v = opts.cardDescription;
169
+ if (v !== undefined)
170
+ body["cardDescription"] = v;
171
+ }
172
+ {
173
+ const v = opts.enabled === undefined ? undefined : opts.enabled === "true";
174
+ if (v !== undefined)
175
+ body["enabled"] = v;
176
+ }
177
+ {
178
+ const v = opts.apiKey;
179
+ if (v !== undefined)
180
+ body["apiKey"] = v;
181
+ }
182
+ {
183
+ const v = opts.replyInThread === undefined ? undefined : opts.replyInThread === "true";
184
+ if (v !== undefined)
185
+ body["replyInThread"] = v;
186
+ }
187
+ {
188
+ const v = opts.mode;
189
+ if (v !== undefined)
190
+ body["mode"] = v;
191
+ }
192
+ {
193
+ const v = opts.triggerRule;
194
+ if (v !== undefined)
195
+ body["triggerRule"] = v;
196
+ }
197
+ {
198
+ const v = opts.priority === undefined ? undefined : Number(opts.priority);
199
+ if (v !== undefined)
200
+ body["priority"] = v;
201
+ }
202
+ const data = await call({ method: "PATCH", path, asUserId: as, body });
203
+ process.stdout.write(JSON.stringify(data) + "\n");
204
+ });
205
+ }
206
+ if (!hasSubcommand(group, "remove")) {
207
+ group
208
+ .command("remove")
209
+ .description("DELETE /api/v1/rooms/{roomId}/agents/{agentId}")
210
+ .requiredOption("--room-id <value>", "roomId (path param)")
211
+ .requiredOption("--agent-id <value>", "agentId (path param)")
212
+ .action(async (opts) => {
213
+ const { as } = program.opts();
214
+ if (!as)
215
+ throw new Error("--as <userId> is required");
216
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents/${encodeURIComponent(opts.agentId)}`;
217
+ const data = await call({ method: "DELETE", path, asUserId: as });
218
+ process.stdout.write(JSON.stringify(data) + "\n");
219
+ });
220
+ }
221
+ if (!hasSubcommand(group, "orchestrator-test")) {
222
+ group
223
+ .command("orchestrator-test")
224
+ .description("POST /api/v1/rooms/{roomId}/agents/orchestrator-test")
225
+ .requiredOption("--room-id <value>", "roomId (path param)")
226
+ .requiredOption("--message <value>", "string, ≤1000 chars")
227
+ .action(async (opts) => {
228
+ const { as } = program.opts();
229
+ if (!as)
230
+ throw new Error("--as <userId> is required");
231
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/agents/orchestrator-test`;
232
+ const body = {};
233
+ {
234
+ const v = opts.message;
235
+ if (v !== undefined)
236
+ body["message"] = v;
237
+ }
238
+ const data = await call({ method: "POST", path, asUserId: as, body });
239
+ process.stdout.write(JSON.stringify(data) + "\n");
240
+ });
241
+ }
242
+ if (!hasSubcommand(group, "a2a-message-send")) {
243
+ group
244
+ .command("a2a-message-send")
245
+ .description("POST /api/v1/a2a")
246
+ .option("--body <json>", "request body as JSON (no schema available)")
247
+ .action(async (opts) => {
248
+ const { as } = program.opts();
249
+ if (!as)
250
+ throw new Error("--as <userId> is required");
251
+ const path = `/api/v1/a2a`;
252
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
253
+ const data = await call({ method: "POST", path, asUserId: as, body });
254
+ process.stdout.write(JSON.stringify(data) + "\n");
255
+ });
256
+ }
257
+ if (!hasSubcommand(group, "a2a-push-notification")) {
258
+ group
259
+ .command("a2a-push-notification")
260
+ .description("POST /api/v1/a2a/push")
261
+ .option("--body <json>", "request body as JSON (no schema available)")
262
+ .action(async (opts) => {
263
+ const { as } = program.opts();
264
+ if (!as)
265
+ throw new Error("--as <userId> is required");
266
+ const path = `/api/v1/a2a/push`;
267
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
268
+ const data = await call({ method: "POST", path, asUserId: as, body });
269
+ process.stdout.write(JSON.stringify(data) + "\n");
270
+ });
271
+ }
272
+ }
273
+ //# sourceMappingURL=room-agents.js.map
@@ -0,0 +1,155 @@
1
+ import { call } from "../../client.js";
2
+ import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
3
+ export function register(program) {
4
+ const group = getOrCreateGroup(program, "room-invites", "RoomInvites operations");
5
+ if (!hasSubcommand(group, "create-invite-token")) {
6
+ group
7
+ .command("create-invite-token")
8
+ .description("POST /api/v1/rooms/{roomId}/invite-token")
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/rooms/${encodeURIComponent(opts.roomId)}/invite-token`;
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, "create-app-invite-token")) {
22
+ group
23
+ .command("create-app-invite-token")
24
+ .description("POST /api/v1/users/me/app-invite")
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/users/me/app-invite`;
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, "accept-app-invite")) {
37
+ group
38
+ .command("accept-app-invite")
39
+ .description("POST /api/v1/users/me/accept-app-invite")
40
+ .option("--body <json>", "request body as JSON (no schema available)")
41
+ .action(async (opts) => {
42
+ const { as } = program.opts();
43
+ if (!as)
44
+ throw new Error("--as <userId> is required");
45
+ const path = `/api/v1/users/me/accept-app-invite`;
46
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
47
+ const data = await call({ method: "POST", path, asUserId: as, body });
48
+ process.stdout.write(JSON.stringify(data) + "\n");
49
+ });
50
+ }
51
+ if (!hasSubcommand(group, "get-top-inviters")) {
52
+ group
53
+ .command("get-top-inviters")
54
+ .description("GET /api/v1/rooms/{roomId}/top-inviters")
55
+ .requiredOption("--room-id <value>", "roomId (path param)")
56
+ .option("--limit <value>", "string")
57
+ .action(async (opts) => {
58
+ const { as } = program.opts();
59
+ if (!as)
60
+ throw new Error("--as <userId> is required");
61
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/top-inviters`;
62
+ const query = {};
63
+ {
64
+ const v = opts.limit;
65
+ if (v !== undefined)
66
+ query["limit"] = v;
67
+ }
68
+ const data = await call({ method: "GET", path, asUserId: as, query });
69
+ process.stdout.write(JSON.stringify(data) + "\n");
70
+ });
71
+ }
72
+ if (!hasSubcommand(group, "get-stats")) {
73
+ group
74
+ .command("get-stats")
75
+ .description("GET /api/v1/users/me/invite-stats")
76
+ .option("--channel <value>", "string")
77
+ .action(async (opts) => {
78
+ const { as } = program.opts();
79
+ if (!as)
80
+ throw new Error("--as <userId> is required");
81
+ const path = `/api/v1/users/me/invite-stats`;
82
+ const query = {};
83
+ {
84
+ const v = opts.channel;
85
+ if (v !== undefined)
86
+ query["channel"] = v;
87
+ }
88
+ const data = await call({ method: "GET", path, asUserId: as, query });
89
+ process.stdout.write(JSON.stringify(data) + "\n");
90
+ });
91
+ }
92
+ if (!hasSubcommand(group, "get-history")) {
93
+ group
94
+ .command("get-history")
95
+ .description("GET /api/v1/users/me/invite-history")
96
+ .option("--limit <value>", "string")
97
+ .option("--skip <value>", "string")
98
+ .action(async (opts) => {
99
+ const { as } = program.opts();
100
+ if (!as)
101
+ throw new Error("--as <userId> is required");
102
+ const path = `/api/v1/users/me/invite-history`;
103
+ const query = {};
104
+ {
105
+ const v = opts.limit;
106
+ if (v !== undefined)
107
+ query["limit"] = v;
108
+ }
109
+ {
110
+ const v = opts.skip;
111
+ if (v !== undefined)
112
+ query["skip"] = v;
113
+ }
114
+ const data = await call({ method: "GET", path, asUserId: as, query });
115
+ process.stdout.write(JSON.stringify(data) + "\n");
116
+ });
117
+ }
118
+ if (!hasSubcommand(group, "preview-email")) {
119
+ group
120
+ .command("preview-email")
121
+ .description("GET /api/v1/rooms/{roomId}/invite-email-preview")
122
+ .requiredOption("--room-id <value>", "roomId (path param)")
123
+ .option("--personal-message <value>", "string")
124
+ .action(async (opts) => {
125
+ const { as } = program.opts();
126
+ if (!as)
127
+ throw new Error("--as <userId> is required");
128
+ const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/invite-email-preview`;
129
+ const query = {};
130
+ {
131
+ const v = opts.personalMessage;
132
+ if (v !== undefined)
133
+ query["personalMessage"] = v;
134
+ }
135
+ const data = await call({ method: "GET", path, asUserId: as, query });
136
+ process.stdout.write(JSON.stringify(data) + "\n");
137
+ });
138
+ }
139
+ if (!hasSubcommand(group, "extract-emails")) {
140
+ group
141
+ .command("extract-emails")
142
+ .description("POST /api/v1/invites/extract-emails")
143
+ .option("--body <json>", "request body as JSON (no schema available)")
144
+ .action(async (opts) => {
145
+ const { as } = program.opts();
146
+ if (!as)
147
+ throw new Error("--as <userId> is required");
148
+ const path = `/api/v1/invites/extract-emails`;
149
+ const body = opts.body ? JSON.parse(opts.body) : undefined;
150
+ const data = await call({ method: "POST", path, asUserId: as, body });
151
+ process.stdout.write(JSON.stringify(data) + "\n");
152
+ });
153
+ }
154
+ }
155
+ //# sourceMappingURL=room-invites.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, "room-owned-agent", "RoomOwnedAgent operations");
5
+ if (!hasSubcommand(group, "card")) {
6
+ group
7
+ .command("card")
8
+ .description("GET /api/v1/rooms/{id}/agent/.well-known/agent.json")
9
+ .requiredOption("--id <value>", "id (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 = `/api/v1/rooms/${encodeURIComponent(opts.id)}/agent/.well-known/agent.json`;
15
+ const data = await call({ method: "GET", path, asUserId: as });
16
+ process.stdout.write(JSON.stringify(data) + "\n");
17
+ });
18
+ }
19
+ if (!hasSubcommand(group, "a2a")) {
20
+ group
21
+ .command("a2a")
22
+ .description("POST /api/v1/rooms/{id}/agent/a2a")
23
+ .requiredOption("--id <value>", "id (path param)")
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/rooms/${encodeURIComponent(opts.id)}/agent/a2a`;
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=room-owned-agent.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, "room-page", "RoomPage operations");
5
+ if (!hasSubcommand(group, "room-page")) {
6
+ group
7
+ .command("room-page")
8
+ .description("GET /r/{slug}")
9
+ .requiredOption("--slug <value>", "slug (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 = `/r/${encodeURIComponent(opts.slug)}`;
15
+ const data = await call({ method: "GET", path, asUserId: as });
16
+ process.stdout.write(JSON.stringify(data) + "\n");
17
+ });
18
+ }
19
+ }
20
+ //# sourceMappingURL=room-page.js.map