@burdenoff/cli-sdk 2026.627.4 → 2026.628.1
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/modules/mybodyshield/index.cjs +281 -0
- package/dist/modules/mybodyshield/index.d.cts +7 -0
- package/dist/modules/mybodyshield/index.d.ts +7 -0
- package/dist/modules/mybodyshield/index.js +281 -0
- package/dist/modules/semanticfed/index.cjs +287 -0
- package/dist/modules/semanticfed/index.d.cts +7 -0
- package/dist/modules/semanticfed/index.d.ts +7 -0
- package/dist/modules/semanticfed/index.js +287 -0
- package/dist/modules/technospam/index.cjs +325 -0
- package/dist/modules/technospam/index.d.cts +7 -0
- package/dist/modules/technospam/index.d.ts +7 -0
- package/dist/modules/technospam/index.js +325 -0
- package/dist/modules/theculturepost/index.cjs +228 -0
- package/dist/modules/theculturepost/index.d.cts +7 -0
- package/dist/modules/theculturepost/index.d.ts +7 -0
- package/dist/modules/theculturepost/index.js +228 -0
- package/dist/modules/theglobalfuel/index.cjs +251 -0
- package/dist/modules/theglobalfuel/index.d.cts +7 -0
- package/dist/modules/theglobalfuel/index.d.ts +7 -0
- package/dist/modules/theglobalfuel/index.js +251 -0
- package/package.json +1 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var m=class extends Error{exitCode;hint;constructor(r,e){super(r),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},C=class extends m{constructor(r,e){super(r,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},I=class extends Error{cause;constructor(r,e){super(r),this.name="CliInternalError",this.cause=e;}};var T=null;function S(a){T=a;}function h(){if(!T)throw new I("vibecontrols module helpers used before setHelpersContext was called");return T}function Nt(){let a=h();if(!a.auth.isAuthenticated())throw new C(`Authentication required. Run \`${a.productName} auth login\`.`)}async function s(a,r){return Nt(),h().gql.workspace.request(a,r)}async function w(a,r){return h().gql.workspaceAuthOnly.request(a,r)}function o(a){let r=a instanceof Error?a.message:String(a);throw new m(r)}function i(a,r,e){h().output.formatAndOutput(a,r,e);}function u(a){h().output.printSuccess(a);}function b(a){return h().output.formatDate(a)}function d(a,r){return h().output.truncate(a,r)}var k=`
|
|
2
|
+
query TecCourse($id: ID!) {
|
|
3
|
+
tecCourse(id: $id) {
|
|
4
|
+
id slug title topic summary level status estimatedMinutes instructorId
|
|
5
|
+
tags publishedAt createdAt updatedAt workspaceId
|
|
6
|
+
cover { id }
|
|
7
|
+
lessons { id title kind position }
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`,A=`
|
|
11
|
+
query TecListCourses(
|
|
12
|
+
$level: TecCourseLevel
|
|
13
|
+
$status: TecCourseStatus
|
|
14
|
+
$pagination: PaginationInput
|
|
15
|
+
) {
|
|
16
|
+
tecListCourses(level: $level, status: $status, pagination: $pagination) {
|
|
17
|
+
items {
|
|
18
|
+
id slug title topic level status estimatedMinutes instructorId
|
|
19
|
+
publishedAt createdAt
|
|
20
|
+
}
|
|
21
|
+
pageInfo { cursor hasMore }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,x=`
|
|
25
|
+
mutation TecCreateCourse($input: TecCreateCourseInput!) {
|
|
26
|
+
tecCreateCourse(input: $input) {
|
|
27
|
+
id slug title topic summary level status estimatedMinutes instructorId
|
|
28
|
+
tags createdAt
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`,O=`
|
|
32
|
+
mutation TecUpdateCourse($id: ID!, $input: TecUpdateCourseInput!) {
|
|
33
|
+
tecUpdateCourse(id: $id, input: $input) {
|
|
34
|
+
id slug title topic summary level status estimatedMinutes instructorId
|
|
35
|
+
tags updatedAt
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`,R=`
|
|
39
|
+
mutation TecPublishCourse($id: ID!) {
|
|
40
|
+
tecPublishCourse(id: $id) {
|
|
41
|
+
id slug title status publishedAt updatedAt
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`,v=`
|
|
45
|
+
mutation TecArchiveCourse($id: ID!) {
|
|
46
|
+
tecArchiveCourse(id: $id)
|
|
47
|
+
}
|
|
48
|
+
`,P=`
|
|
49
|
+
query TecListLessons($courseId: ID!) {
|
|
50
|
+
tecListLessons(courseId: $courseId) {
|
|
51
|
+
id courseId title kind position estimatedMinutes isPreview content
|
|
52
|
+
file { id }
|
|
53
|
+
createdAt updatedAt workspaceId
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`,L=`
|
|
57
|
+
mutation TecCreateLesson($input: TecCreateLessonInput!) {
|
|
58
|
+
tecCreateLesson(input: $input) {
|
|
59
|
+
id courseId title kind position estimatedMinutes isPreview content
|
|
60
|
+
createdAt
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`,D=`
|
|
64
|
+
mutation TecUpdateLesson($id: ID!, $input: TecUpdateLessonInput!) {
|
|
65
|
+
tecUpdateLesson(id: $id, input: $input) {
|
|
66
|
+
id courseId title kind position estimatedMinutes isPreview content
|
|
67
|
+
updatedAt
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`,$=`
|
|
71
|
+
query TecListEnrollments(
|
|
72
|
+
$courseId: ID
|
|
73
|
+
$learnerId: ID
|
|
74
|
+
$pagination: PaginationInput
|
|
75
|
+
) {
|
|
76
|
+
tecListEnrollments(courseId: $courseId, learnerId: $learnerId, pagination: $pagination) {
|
|
77
|
+
items {
|
|
78
|
+
id courseId learnerId status progressPct lessonsCompleted
|
|
79
|
+
startedAt lastActiveAt completedAt createdAt
|
|
80
|
+
}
|
|
81
|
+
pageInfo { cursor hasMore }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
`,M=`
|
|
85
|
+
mutation TecEnroll($input: TecEnrollInput!) {
|
|
86
|
+
tecEnroll(input: $input) {
|
|
87
|
+
id courseId learnerId status progressPct lessonsCompleted startedAt createdAt
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`,N=`
|
|
91
|
+
mutation TecUpdateProgress($input: TecUpdateProgressInput!) {
|
|
92
|
+
tecUpdateProgress(input: $input) {
|
|
93
|
+
id courseId learnerId status progressPct lessonsCompleted
|
|
94
|
+
lastActiveAt completedAt updatedAt
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`,U=`
|
|
98
|
+
query TecMentor($id: ID!) {
|
|
99
|
+
tecMentor(id: $id) {
|
|
100
|
+
id userId headline bio expertise hourlyRate currency status
|
|
101
|
+
isAcceptingMentees ratingAvg sessionsCount createdAt updatedAt workspaceId
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`,_=`
|
|
105
|
+
query TecListMentors($status: TecMentorStatus, $pagination: PaginationInput) {
|
|
106
|
+
tecListMentors(status: $status, pagination: $pagination) {
|
|
107
|
+
items {
|
|
108
|
+
id userId headline expertise hourlyRate currency status
|
|
109
|
+
isAcceptingMentees ratingAvg sessionsCount createdAt
|
|
110
|
+
}
|
|
111
|
+
pageInfo { cursor hasMore }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`,q=`
|
|
115
|
+
mutation TecBecomeMentor($input: TecCreateMentorInput!) {
|
|
116
|
+
tecBecomeMentor(input: $input) {
|
|
117
|
+
id userId headline bio expertise hourlyRate currency status
|
|
118
|
+
isAcceptingMentees createdAt
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
`,H=`
|
|
122
|
+
mutation TecUpdateMentor($id: ID!, $input: TecUpdateMentorInput!) {
|
|
123
|
+
tecUpdateMentor(id: $id, input: $input) {
|
|
124
|
+
id userId headline bio expertise hourlyRate currency status
|
|
125
|
+
isAcceptingMentees updatedAt
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`,F=`
|
|
129
|
+
mutation TecApproveMentor($id: ID!) {
|
|
130
|
+
tecApproveMentor(id: $id) {
|
|
131
|
+
id userId headline status updatedAt
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`,G=`
|
|
135
|
+
query TecListSessions($mentorId: ID, $menteeId: ID, $status: TecSessionStatus) {
|
|
136
|
+
tecListSessions(mentorId: $mentorId, menteeId: $menteeId, status: $status) {
|
|
137
|
+
id mentorId menteeId topic agenda status scheduledAt durationMinutes
|
|
138
|
+
meetingUrl rating feedback completedAt cancelledAt createdAt workspaceId
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
`,j=`
|
|
142
|
+
mutation TecBookSession($input: TecBookSessionInput!) {
|
|
143
|
+
tecBookSession(input: $input) {
|
|
144
|
+
id mentorId menteeId topic agenda status scheduledAt durationMinutes createdAt
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
`,B=`
|
|
148
|
+
mutation TecConfirmSession($id: ID!, $meetingUrl: String) {
|
|
149
|
+
tecConfirmSession(id: $id, meetingUrl: $meetingUrl) {
|
|
150
|
+
id mentorId menteeId topic status scheduledAt meetingUrl updatedAt
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
`,z=`
|
|
154
|
+
mutation TecCancelSession($id: ID!) {
|
|
155
|
+
tecCancelSession(id: $id) {
|
|
156
|
+
id mentorId menteeId topic status cancelledAt updatedAt
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`,W=`
|
|
160
|
+
mutation TecCompleteSession($id: ID!, $rating: Int, $feedback: String) {
|
|
161
|
+
tecCompleteSession(id: $id, rating: $rating, feedback: $feedback) {
|
|
162
|
+
id mentorId menteeId topic status rating feedback completedAt updatedAt
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
`,V=`
|
|
166
|
+
query TecHackathon($id: ID!) {
|
|
167
|
+
tecHackathon(id: $id) {
|
|
168
|
+
id slug title theme description status startAt endAt submissionDeadline
|
|
169
|
+
maxTeamSize prizePool currency tags createdAt updatedAt workspaceId
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`,K=`
|
|
173
|
+
query TecListHackathons($status: TecHackathonStatus, $pagination: PaginationInput) {
|
|
174
|
+
tecListHackathons(status: $status, pagination: $pagination) {
|
|
175
|
+
items {
|
|
176
|
+
id slug title theme status startAt endAt submissionDeadline
|
|
177
|
+
maxTeamSize prizePool currency createdAt
|
|
178
|
+
}
|
|
179
|
+
pageInfo { cursor hasMore }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
`,J=`
|
|
183
|
+
mutation TecCreateHackathon($input: TecCreateHackathonInput!) {
|
|
184
|
+
tecCreateHackathon(input: $input) {
|
|
185
|
+
id slug title theme description status startAt endAt submissionDeadline
|
|
186
|
+
maxTeamSize prizePool currency tags createdAt
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
`,Y=`
|
|
190
|
+
mutation TecUpdateHackathon($id: ID!, $input: TecUpdateHackathonInput!) {
|
|
191
|
+
tecUpdateHackathon(id: $id, input: $input) {
|
|
192
|
+
id slug title theme description status startAt endAt submissionDeadline
|
|
193
|
+
maxTeamSize prizePool currency tags updatedAt
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
`,Q=`
|
|
197
|
+
mutation TecOpenRegistration($id: ID!) {
|
|
198
|
+
tecOpenRegistration(id: $id) {
|
|
199
|
+
id slug title status updatedAt
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
`,X=`
|
|
203
|
+
query TecListTeams($hackathonId: ID!) {
|
|
204
|
+
tecListTeams(hackathonId: $hackathonId) {
|
|
205
|
+
id hackathonId name captainId memberIds status score projectName
|
|
206
|
+
projectUrl repoUrl pitch submittedAt createdAt updatedAt workspaceId
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
`,Z=`
|
|
210
|
+
mutation TecRegisterTeam($input: TecRegisterTeamInput!) {
|
|
211
|
+
tecRegisterTeam(input: $input) {
|
|
212
|
+
id hackathonId name captainId memberIds status score createdAt
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
`,tt=`
|
|
216
|
+
mutation TecSubmitProject($input: TecSubmitProjectInput!) {
|
|
217
|
+
tecSubmitProject(input: $input) {
|
|
218
|
+
id hackathonId name status projectName projectUrl repoUrl pitch
|
|
219
|
+
submittedAt updatedAt
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
`,et=`
|
|
223
|
+
mutation TecScoreTeam($id: ID!, $score: Int!, $winner: Boolean) {
|
|
224
|
+
tecScoreTeam(id: $id, score: $score, winner: $winner) {
|
|
225
|
+
id hackathonId name status score updatedAt
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
`,nt=`
|
|
229
|
+
query TecProblem($id: ID!) {
|
|
230
|
+
tecProblem(id: $id) {
|
|
231
|
+
id slug title topic statement difficulty status points languages tags
|
|
232
|
+
starterCode publishedAt createdAt updatedAt workspaceId
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
`,rt=`
|
|
236
|
+
query TecListProblems(
|
|
237
|
+
$difficulty: TecProblemDifficulty
|
|
238
|
+
$status: TecProblemStatus
|
|
239
|
+
$topic: String
|
|
240
|
+
$pagination: PaginationInput
|
|
241
|
+
) {
|
|
242
|
+
tecListProblems(
|
|
243
|
+
difficulty: $difficulty
|
|
244
|
+
status: $status
|
|
245
|
+
topic: $topic
|
|
246
|
+
pagination: $pagination
|
|
247
|
+
) {
|
|
248
|
+
items {
|
|
249
|
+
id slug title topic difficulty status points languages tags
|
|
250
|
+
publishedAt createdAt
|
|
251
|
+
}
|
|
252
|
+
pageInfo { cursor hasMore }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
`,ot=`
|
|
256
|
+
mutation TecCreateProblem($input: TecCreateProblemInput!) {
|
|
257
|
+
tecCreateProblem(input: $input) {
|
|
258
|
+
id slug title topic statement difficulty status points languages tags
|
|
259
|
+
starterCode createdAt
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
`,it=`
|
|
263
|
+
mutation TecUpdateProblem($id: ID!, $input: TecUpdateProblemInput!) {
|
|
264
|
+
tecUpdateProblem(id: $id, input: $input) {
|
|
265
|
+
id slug title topic statement difficulty status points languages tags
|
|
266
|
+
starterCode updatedAt
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
`,st=`
|
|
270
|
+
mutation TecPublishProblem($id: ID!) {
|
|
271
|
+
tecPublishProblem(id: $id) {
|
|
272
|
+
id slug title status publishedAt updatedAt
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
`,at=`
|
|
276
|
+
query TecListSubmissions(
|
|
277
|
+
$problemId: ID
|
|
278
|
+
$learnerId: ID
|
|
279
|
+
$pagination: PaginationInput
|
|
280
|
+
) {
|
|
281
|
+
tecListSubmissions(problemId: $problemId, learnerId: $learnerId, pagination: $pagination) {
|
|
282
|
+
items {
|
|
283
|
+
id problemId learnerId language verdict pointsAwarded runtimeMs
|
|
284
|
+
judgedAt createdAt
|
|
285
|
+
}
|
|
286
|
+
pageInfo { cursor hasMore }
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
`,ct=`
|
|
290
|
+
mutation TecSubmitSolution($input: TecSubmitSolutionInput!) {
|
|
291
|
+
tecSubmitSolution(input: $input) {
|
|
292
|
+
id problemId learnerId language verdict pointsAwarded runtimeMs createdAt
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
`,ut=`
|
|
296
|
+
mutation TecGradeSubmission($id: ID!, $verdict: TecSubmissionVerdict!, $runtimeMs: Int) {
|
|
297
|
+
tecGradeSubmission(id: $id, verdict: $verdict, runtimeMs: $runtimeMs) {
|
|
298
|
+
id problemId learnerId language verdict pointsAwarded runtimeMs
|
|
299
|
+
judgedAt updatedAt
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
`,dt=`
|
|
303
|
+
query TecListCertificates($courseId: ID, $learnerId: ID) {
|
|
304
|
+
tecListCertificates(courseId: $courseId, learnerId: $learnerId) {
|
|
305
|
+
id courseId learnerId serial score status issuedAt revokedAt
|
|
306
|
+
revokeReason createdAt updatedAt workspaceId
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
`,pt=`
|
|
310
|
+
mutation TecIssueCertificate($courseId: ID!, $learnerId: ID!, $score: Int!) {
|
|
311
|
+
tecIssueCertificate(courseId: $courseId, learnerId: $learnerId, score: $score) {
|
|
312
|
+
id courseId learnerId serial score status issuedAt createdAt
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
`,mt=`
|
|
316
|
+
mutation TecRevokeCertificate($id: ID!, $reason: String) {
|
|
317
|
+
tecRevokeCertificate(id: $id, reason: $reason) {
|
|
318
|
+
id courseId learnerId serial score status revokedAt revokeReason updatedAt
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
`,lt=`
|
|
322
|
+
query TecHealth {
|
|
323
|
+
tecHealth
|
|
324
|
+
}
|
|
325
|
+
`;function c(a){let r=Number.parseInt(a,10);if(Number.isNaN(r))throw new m(`Expected an integer but got "${a}"`);return r}function l(a){return a.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function ft(a){let r=a.command("courses").description("Technospam courses");r.command("list").description("List courses").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(A,{level:e.level?e.level.toUpperCase():void 0,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});i(e,t.tecListCourses.items,{headers:["ID","Title","Level","Status","Minutes"],rows:t.tecListCourses.items.map(n=>[d(n.id,12),n.title,n.level,n.status,String(n.estimatedMinutes??0)])});}catch(t){o(t);}}),r.command("get").description("Get a course by id").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(k,{id:e});if(!n.tecCourse)throw new m(`Course ${e} not found`);i(t,n.tecCourse);}catch(n){o(n);}}),r.command("create").description("Create a course").requiredOption("--title <t>","Course title").requiredOption("--slug <slug>","URL slug").option("--topic <t>","Topic").option("--summary <s>","Summary").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT","BEGINNER").option("--estimated-minutes <n>","Estimated minutes",c).option("--instructor-id <id>","Instructor user ID").option("--cover-file-id <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={title:e.title,slug:e.slug,level:(e.level??"BEGINNER").toUpperCase()};e.topic&&(t.topic=e.topic),e.summary&&(t.summary=e.summary),e.estimatedMinutes!==void 0&&(t.estimatedMinutes=e.estimatedMinutes),e.instructorId&&(t.instructorId=e.instructorId),e.coverFileId&&(t.coverFileId=e.coverFileId),e.tags&&(t.tags=l(e.tags));let n=await s(x,{input:t});u(`Course created: ${n.tecCreateCourse.title}`),i(e,n.tecCreateCourse);}catch(t){o(t);}}),r.command("update").description("Update a course").argument("<id>","Course ID").option("--title <t>","Course title").option("--topic <t>","Topic").option("--summary <s>","Summary").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|EXPERT").option("--estimated-minutes <n>","Estimated minutes",c).option("--instructor-id <id>","Instructor user ID").option("--cover-file-id <id>","Cover image File ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.topic!==void 0&&(n.topic=t.topic),t.summary!==void 0&&(n.summary=t.summary),t.level&&(n.level=t.level.toUpperCase()),t.estimatedMinutes!==void 0&&(n.estimatedMinutes=t.estimatedMinutes),t.instructorId&&(n.instructorId=t.instructorId),t.coverFileId&&(n.coverFileId=t.coverFileId),t.tags&&(n.tags=l(t.tags)),!Object.keys(n).length)throw new m("No updates specified");let g=await s(O,{id:e,input:n});u("Course updated"),i(t,g.tecUpdateCourse);}catch(n){o(n);}}),r.command("publish").description("Publish a course (DRAFT -> PUBLISHED)").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(R,{id:e});u(`Course published: ${n.tecPublishCourse.title}`),i(t,n.tecPublishCourse);}catch(n){o(n);}}),r.command("archive").description("Archive a course").argument("<id>","Course ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(v,{id:e});u(n.tecArchiveCourse?"Course archived":"Course not archived"),i(t,{archived:n.tecArchiveCourse});}catch(n){o(n);}});}function gt(a){let r=a.command("lessons").description("Technospam course lessons");r.command("list").description("List lessons for a course").requiredOption("--course <id>","Course ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(P,{courseId:e.course});i(e,t.tecListLessons,{headers:["ID","Title","Kind","Position","Minutes","Preview"],rows:t.tecListLessons.map(n=>[d(n.id,12),n.title,n.kind,String(n.position),String(n.estimatedMinutes??0),n.isPreview?"yes":"no"])});}catch(t){o(t);}}),r.command("create").description("Create a lesson").requiredOption("--course <id>","Course ID").requiredOption("--title <t>","Lesson title").option("--kind <k>","ARTICLE|VIDEO|QUIZ|INTERACTIVE|PROJECT","ARTICLE").option("--content <s>","Lesson content").option("--position <n>","Order position",c).option("--estimated-minutes <n>","Estimated minutes",c).option("--file-id <id>","Attachment / video File ID").option("--preview","Mark as a free preview lesson").option("-f, --format <format>","Output format").action(async e=>{try{let t={courseId:e.course,title:e.title,kind:(e.kind??"ARTICLE").toUpperCase()};e.content&&(t.content=e.content),e.position!==void 0&&(t.position=e.position),e.estimatedMinutes!==void 0&&(t.estimatedMinutes=e.estimatedMinutes),e.fileId&&(t.fileId=e.fileId),e.preview&&(t.isPreview=!0);let n=await s(L,{input:t});u(`Lesson created: ${n.tecCreateLesson.title}`),i(e,n.tecCreateLesson);}catch(t){o(t);}}),r.command("update").description("Update a lesson").argument("<id>","Lesson ID").option("--title <t>","Lesson title").option("--kind <k>","ARTICLE|VIDEO|QUIZ|INTERACTIVE|PROJECT").option("--content <s>","Lesson content").option("--position <n>","Order position",c).option("--estimated-minutes <n>","Estimated minutes",c).option("--file-id <id>","Attachment / video File ID").option("--preview <bool>","true|false",e=>e==="true").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.kind&&(n.kind=t.kind.toUpperCase()),t.content!==void 0&&(n.content=t.content),t.position!==void 0&&(n.position=t.position),t.estimatedMinutes!==void 0&&(n.estimatedMinutes=t.estimatedMinutes),t.fileId&&(n.fileId=t.fileId),t.preview!==void 0&&(n.isPreview=t.preview),!Object.keys(n).length)throw new m("No updates specified");let g=await s(D,{id:e,input:n});u("Lesson updated"),i(t,g.tecUpdateLesson);}catch(n){o(n);}});}function It(a){let r=a.command("enrollments").description("Technospam course enrollments");r.command("list").description("List enrollments").option("--course <id>","Filter by course ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s($,{courseId:e.course,learnerId:e.learner,pagination:{limit:e.limit,offset:e.offset}});i(e,t.tecListEnrollments.items,{headers:["ID","Course","Learner","Status","Progress %","Lessons"],rows:t.tecListEnrollments.items.map(n=>[d(n.id,12),d(n.courseId,12),d(n.learnerId,12),n.status,String(n.progressPct),String(n.lessonsCompleted)])});}catch(t){o(t);}}),r.command("enroll").description("Enroll the calling user in a course").requiredOption("--course <id>","Course ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(M,{input:{courseId:e.course}});u(`Enrolled in course ${t.tecEnroll.courseId}`),i(e,t.tecEnroll);}catch(t){o(t);}}),r.command("update-progress").description("Update a learner's enrollment progress (auto-completes at 100%)").requiredOption("--enrollment <id>","Enrollment ID").requiredOption("--progress-pct <n>","Progress percent (0-100)",c).option("--lessons-completed <n>","Lessons completed count",c).option("-f, --format <format>","Output format").action(async e=>{try{let t={enrollmentId:e.enrollment,progressPct:e.progressPct};e.lessonsCompleted!==void 0&&(t.lessonsCompleted=e.lessonsCompleted);let n=await s(N,{input:t});u(`Progress updated to ${n.tecUpdateProgress.progressPct}%`),i(e,n.tecUpdateProgress);}catch(t){o(t);}});}function ht(a){let r=a.command("mentors").description("Technospam mentors");r.command("list").description("List mentors").option("--status <s>","PENDING|ACTIVE|PAUSED|INACTIVE").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(_,{status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});i(e,t.tecListMentors.items,{headers:["ID","Headline","Status","Rate","Rating","Accepting"],rows:t.tecListMentors.items.map(n=>[d(n.id,12),d(n.headline,30),n.status,String(n.hourlyRate??0),String(n.ratingAvg??0),n.isAcceptingMentees?"yes":"no"])});}catch(t){o(t);}}),r.command("get").description("Get a mentor by id").argument("<id>","Mentor ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(U,{id:e});if(!n.tecMentor)throw new m(`Mentor ${e} not found`);i(t,n.tecMentor);}catch(n){o(n);}}),r.command("become").description("Create the calling user's mentor profile").requiredOption("--headline <h>","Mentor headline").option("--bio <s>","Bio").option("--expertise <csv>","Comma-separated areas of expertise").option("--hourly-rate <n>","Hourly rate",c).option("--currency <c>","Currency code").option("-f, --format <format>","Output format").action(async e=>{try{let t={headline:e.headline};e.bio&&(t.bio=e.bio),e.expertise&&(t.expertise=l(e.expertise)),e.hourlyRate!==void 0&&(t.hourlyRate=e.hourlyRate),e.currency&&(t.currency=e.currency);let n=await s(q,{input:t});u(`Mentor profile created: ${n.tecBecomeMentor.headline}`),i(e,n.tecBecomeMentor);}catch(t){o(t);}}),r.command("update").description("Update a mentor profile").argument("<id>","Mentor ID").option("--headline <h>","Mentor headline").option("--bio <s>","Bio").option("--expertise <csv>","Comma-separated areas of expertise").option("--hourly-rate <n>","Hourly rate",c).option("--currency <c>","Currency code").option("--accepting <bool>","true|false (accepting mentees)",e=>e==="true").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.headline&&(n.headline=t.headline),t.bio!==void 0&&(n.bio=t.bio),t.expertise&&(n.expertise=l(t.expertise)),t.hourlyRate!==void 0&&(n.hourlyRate=t.hourlyRate),t.currency&&(n.currency=t.currency),t.accepting!==void 0&&(n.isAcceptingMentees=t.accepting),!Object.keys(n).length)throw new m("No updates specified");let g=await s(H,{id:e,input:n});u("Mentor updated"),i(t,g.tecUpdateMentor);}catch(n){o(n);}}),r.command("approve").description("Approve a pending mentor profile (PENDING -> ACTIVE)").argument("<id>","Mentor ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(F,{id:e});u(`Mentor approved: ${n.tecApproveMentor.status}`),i(t,n.tecApproveMentor);}catch(n){o(n);}});}function Ct(a){let r=a.command("sessions").description("Technospam mentorship sessions");r.command("list").description("List mentorship sessions").option("--mentor <id>","Filter by mentor ID").option("--mentee <id>","Filter by mentee ID").option("--status <s>","REQUESTED|CONFIRMED|COMPLETED|CANCELLED|NO_SHOW").option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(G,{mentorId:e.mentor,menteeId:e.mentee,status:e.status?e.status.toUpperCase():void 0});i(e,t.tecListSessions,{headers:["ID","Mentor","Mentee","Topic","Status","Scheduled"],rows:t.tecListSessions.map(n=>[d(n.id,12),d(n.mentorId,12),d(n.menteeId,12),d(n.topic,24),n.status,b(n.scheduledAt)])});}catch(t){o(t);}}),r.command("book").description("Book a 1:1 session with a mentor as the calling mentee").requiredOption("--mentor <id>","Mentor ID").requiredOption("--topic <t>","Session topic").requiredOption("--scheduled-at <iso>","Scheduled time (ISO date)").option("--agenda <s>","Agenda").option("--duration-minutes <n>","Duration (minutes)",c).option("-f, --format <format>","Output format").action(async e=>{try{let t={mentorId:e.mentor,topic:e.topic,scheduledAt:e.scheduledAt};e.agenda&&(t.agenda=e.agenda),e.durationMinutes!==void 0&&(t.durationMinutes=e.durationMinutes);let n=await s(j,{input:t});u(`Session booked: ${n.tecBookSession.topic}`),i(e,n.tecBookSession);}catch(t){o(t);}}),r.command("confirm").description("Confirm a requested session").argument("<id>","Session ID").option("--meeting-url <url>","Meeting URL").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(B,{id:e,meetingUrl:t.meetingUrl});u("Session confirmed"),i(t,n.tecConfirmSession);}catch(n){o(n);}}),r.command("cancel").description("Cancel a session").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(z,{id:e});u("Session cancelled"),i(t,n.tecCancelSession);}catch(n){o(n);}}),r.command("complete").description("Complete a session with optional rating and feedback").argument("<id>","Session ID").option("--rating <n>","Rating (1-5)",c).option("--feedback <s>","Feedback").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(W,{id:e,rating:t.rating,feedback:t.feedback});u("Session completed"),i(t,n.tecCompleteSession);}catch(n){o(n);}});}function bt(a){let r=a.command("hackathons").description("Technospam hackathons");r.command("list").description("List hackathons").option("--status <s>","DRAFT|REGISTRATION_OPEN|IN_PROGRESS|JUDGING|COMPLETED|CANCELLED").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(K,{status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});i(e,t.tecListHackathons.items,{headers:["ID","Title","Status","Start","Prize"],rows:t.tecListHackathons.items.map(n=>[d(n.id,12),n.title,n.status,b(n.startAt),String(n.prizePool??0)])});}catch(t){o(t);}}),r.command("get").description("Get a hackathon by id").argument("<id>","Hackathon ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(V,{id:e});if(!n.tecHackathon)throw new m(`Hackathon ${e} not found`);i(t,n.tecHackathon);}catch(n){o(n);}}),r.command("create").description("Create a hackathon").requiredOption("--title <t>","Hackathon title").requiredOption("--slug <slug>","URL slug").requiredOption("--start-at <iso>","Start time (ISO date)").requiredOption("--end-at <iso>","End time (ISO date)").option("--theme <t>","Theme").option("--description <s>","Description").option("--submission-deadline <iso>","Submission deadline (ISO date)").option("--max-team-size <n>","Max team size",c).option("--prize-pool <n>","Prize pool",c).option("--currency <c>","Currency code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={title:e.title,slug:e.slug,startAt:e.startAt,endAt:e.endAt};e.theme&&(t.theme=e.theme),e.description&&(t.description=e.description),e.submissionDeadline&&(t.submissionDeadline=e.submissionDeadline),e.maxTeamSize!==void 0&&(t.maxTeamSize=e.maxTeamSize),e.prizePool!==void 0&&(t.prizePool=e.prizePool),e.currency&&(t.currency=e.currency),e.tags&&(t.tags=l(e.tags));let n=await s(J,{input:t});u(`Hackathon created: ${n.tecCreateHackathon.title}`),i(e,n.tecCreateHackathon);}catch(t){o(t);}}),r.command("update").description("Update a hackathon").argument("<id>","Hackathon ID").option("--title <t>","Hackathon title").option("--theme <t>","Theme").option("--description <s>","Description").option("--start-at <iso>","Start time (ISO date)").option("--end-at <iso>","End time (ISO date)").option("--submission-deadline <iso>","Submission deadline (ISO date)").option("--max-team-size <n>","Max team size",c).option("--prize-pool <n>","Prize pool",c).option("--currency <c>","Currency code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.theme!==void 0&&(n.theme=t.theme),t.description!==void 0&&(n.description=t.description),t.startAt&&(n.startAt=t.startAt),t.endAt&&(n.endAt=t.endAt),t.submissionDeadline&&(n.submissionDeadline=t.submissionDeadline),t.maxTeamSize!==void 0&&(n.maxTeamSize=t.maxTeamSize),t.prizePool!==void 0&&(n.prizePool=t.prizePool),t.currency&&(n.currency=t.currency),t.tags&&(n.tags=l(t.tags)),!Object.keys(n).length)throw new m("No updates specified");let g=await s(Y,{id:e,input:n});u("Hackathon updated"),i(t,g.tecUpdateHackathon);}catch(n){o(n);}}),r.command("open-registration").description("Open registration for a hackathon (DRAFT -> REGISTRATION_OPEN)").argument("<id>","Hackathon ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(Q,{id:e});u(`Registration open: ${n.tecOpenRegistration.status}`),i(t,n.tecOpenRegistration);}catch(n){o(n);}});}function Tt(a){let r=a.command("teams").description("Technospam hackathon teams");r.command("list").description("List teams for a hackathon").requiredOption("--hackathon <id>","Hackathon ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(X,{hackathonId:e.hackathon});i(e,t.tecListTeams,{headers:["ID","Name","Captain","Status","Score"],rows:t.tecListTeams.map(n=>[d(n.id,12),n.name,d(n.captainId,12),n.status,String(n.score??0)])});}catch(t){o(t);}}),r.command("register").description("Register a team for a hackathon with the calling user as captain").requiredOption("--hackathon <id>","Hackathon ID").requiredOption("--name <name>","Team name").option("--members <csv>","Comma-separated member user IDs").option("-f, --format <format>","Output format").action(async e=>{try{let t={hackathonId:e.hackathon,name:e.name};e.members&&(t.memberIds=l(e.members));let n=await s(Z,{input:t});u(`Team registered: ${n.tecRegisterTeam.name}`),i(e,n.tecRegisterTeam);}catch(t){o(t);}}),r.command("submit-project").description("Submit a team's project for judging").requiredOption("--team <id>","Team ID").requiredOption("--project-name <n>","Project name").option("--project-url <url>","Project URL").option("--repo-url <url>","Repository URL").option("--pitch <s>","Pitch").option("-f, --format <format>","Output format").action(async e=>{try{let t={teamId:e.team,projectName:e.projectName};e.projectUrl&&(t.projectUrl=e.projectUrl),e.repoUrl&&(t.repoUrl=e.repoUrl),e.pitch&&(t.pitch=e.pitch);let n=await s(tt,{input:t});u(`Project submitted: ${n.tecSubmitProject.status}`),i(e,n.tecSubmitProject);}catch(t){o(t);}}),r.command("score").description("Record a judge score for a team and optionally mark it WINNER").argument("<id>","Team ID").requiredOption("--score <n>","Score",c).option("--winner","Mark the team as winner").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(et,{id:e,score:t.score,winner:t.winner??void 0});u(`Team scored: ${n.tecScoreTeam.score}`),i(t,n.tecScoreTeam);}catch(n){o(n);}});}function wt(a){let r=a.command("problems").description("Technospam practice problems");r.command("list").description("List problems").option("--difficulty <d>","EASY|MEDIUM|HARD").option("--status <s>","DRAFT|PUBLISHED|ARCHIVED").option("--topic <t>","Filter by topic").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(rt,{difficulty:e.difficulty?e.difficulty.toUpperCase():void 0,status:e.status?e.status.toUpperCase():void 0,topic:e.topic,pagination:{limit:e.limit,offset:e.offset}});i(e,t.tecListProblems.items,{headers:["ID","Title","Difficulty","Status","Points"],rows:t.tecListProblems.items.map(n=>[d(n.id,12),n.title,n.difficulty,n.status,String(n.points??0)])});}catch(t){o(t);}}),r.command("get").description("Get a problem by id").argument("<id>","Problem ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(nt,{id:e});if(!n.tecProblem)throw new m(`Problem ${e} not found`);i(t,n.tecProblem);}catch(n){o(n);}}),r.command("create").description("Create a problem").requiredOption("--title <t>","Problem title").requiredOption("--slug <slug>","URL slug").option("--topic <t>","Topic").option("--statement <s>","Problem statement").option("--difficulty <d>","EASY|MEDIUM|HARD","EASY").option("--points <n>","Points",c).option("--languages <csv>","Comma-separated allowed languages").option("--starter-code <s>","Starter code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={title:e.title,slug:e.slug,difficulty:(e.difficulty??"EASY").toUpperCase()};e.topic&&(t.topic=e.topic),e.statement&&(t.statement=e.statement),e.points!==void 0&&(t.points=e.points),e.languages&&(t.languages=l(e.languages)),e.starterCode&&(t.starterCode=e.starterCode),e.tags&&(t.tags=l(e.tags));let n=await s(ot,{input:t});u(`Problem created: ${n.tecCreateProblem.title}`),i(e,n.tecCreateProblem);}catch(t){o(t);}}),r.command("update").description("Update a problem").argument("<id>","Problem ID").option("--title <t>","Problem title").option("--topic <t>","Topic").option("--statement <s>","Problem statement").option("--difficulty <d>","EASY|MEDIUM|HARD").option("--points <n>","Points",c).option("--languages <csv>","Comma-separated allowed languages").option("--starter-code <s>","Starter code").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.topic!==void 0&&(n.topic=t.topic),t.statement!==void 0&&(n.statement=t.statement),t.difficulty&&(n.difficulty=t.difficulty.toUpperCase()),t.points!==void 0&&(n.points=t.points),t.languages&&(n.languages=l(t.languages)),t.starterCode!==void 0&&(n.starterCode=t.starterCode),t.tags&&(n.tags=l(t.tags)),!Object.keys(n).length)throw new m("No updates specified");let g=await s(it,{id:e,input:n});u("Problem updated"),i(t,g.tecUpdateProblem);}catch(n){o(n);}}),r.command("publish").description("Publish a problem (DRAFT -> PUBLISHED)").argument("<id>","Problem ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(st,{id:e});u(`Problem published: ${n.tecPublishProblem.title}`),i(t,n.tecPublishProblem);}catch(n){o(n);}});}function yt(a){let r=a.command("submissions").description("Technospam problem submissions");r.command("list").description("List submissions").option("--problem <id>","Filter by problem ID").option("--learner <id>","Filter by learner ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(at,{problemId:e.problem,learnerId:e.learner,pagination:{limit:e.limit,offset:e.offset}});i(e,t.tecListSubmissions.items,{headers:["ID","Problem","Learner","Language","Verdict","Points"],rows:t.tecListSubmissions.items.map(n=>[d(n.id,12),d(n.problemId,12),d(n.learnerId,12),n.language,n.verdict,String(n.pointsAwarded??0)])});}catch(t){o(t);}}),r.command("submit").description("Submit a solution to a problem").requiredOption("--problem <id>","Problem ID").requiredOption("--language <l>","Language").requiredOption("--code <c>","Solution code").option("-f, --format <format>","Output format").action(async e=>{try{let t={problemId:e.problem,language:e.language,code:e.code},n=await s(ct,{input:t});u(`Solution submitted: ${n.tecSubmitSolution.verdict}`),i(e,n.tecSubmitSolution);}catch(t){o(t);}}),r.command("grade").description("Record the grader verdict for a submission").argument("<id>","Submission ID").requiredOption("--verdict <v>","PENDING|ACCEPTED|WRONG_ANSWER|TIME_LIMIT_EXCEEDED|RUNTIME_ERROR|COMPILE_ERROR").option("--runtime-ms <n>","Runtime in milliseconds",c).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(ut,{id:e,verdict:t.verdict.toUpperCase(),runtimeMs:t.runtimeMs});u(`Submission graded: ${n.tecGradeSubmission.verdict}`),i(t,n.tecGradeSubmission);}catch(n){o(n);}});}function Et(a){let r=a.command("certificates").description("Technospam completion certificates");r.command("list").description("List certificates").option("--course <id>","Filter by course ID").option("--learner <id>","Filter by learner ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(dt,{courseId:e.course,learnerId:e.learner});i(e,t.tecListCertificates,{headers:["ID","Serial","Course","Learner","Score","Status"],rows:t.tecListCertificates.map(n=>[d(n.id,12),n.serial,d(n.courseId,12),d(n.learnerId,12),String(n.score),n.status])});}catch(t){o(t);}}),r.command("issue").description("Issue a verifiable completion certificate for a learner on a course").requiredOption("--course <id>","Course ID").requiredOption("--learner <id>","Learner ID").requiredOption("--score <n>","Score",c).option("-f, --format <format>","Output format").action(async e=>{try{let t=await s(pt,{courseId:e.course,learnerId:e.learner,score:e.score});u(`Certificate issued: ${t.tecIssueCertificate.serial}`),i(e,t.tecIssueCertificate);}catch(t){o(t);}}),r.command("revoke").description("Revoke a certificate").argument("<id>","Certificate ID").option("--reason <s>","Revocation reason").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await s(mt,{id:e,reason:t.reason});u(`Certificate revoked: ${n.tecRevokeCertificate.status}`),i(t,n.tecRevokeCertificate);}catch(n){o(n);}});}function St(a){a.command("health").description("Technospam service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let e=await w(lt);u(e.tecHealth),i(r,{health:e.tecHealth});}catch(e){o(e);}});}var Ut={id:"technospam",version:"1.0.0",displayName:"Technospam",dependsOn:["auth","workspaces"],register(a,r){S(r);let e=a.command("technospam").description("Technospam developer-education platform");ft(e),gt(e),It(e),ht(e),Ct(e),bt(e),Tt(e),wt(e),yt(e),Et(e),St(e);}},_n=Ut;module.exports=_n;
|