@burdenoff/microfe-technospam 2026.1102.4 → 2026.1103.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/generated/wspace-types.d.ts +397 -8
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/stories/fixtures/technospamFixtures.d.ts.map +1 -1
- package/dist/technospam/api/canonicalLearning.d.ts +26 -1
- package/dist/technospam/api/canonicalLearning.d.ts.map +1 -1
- package/dist/technospam/api/canonicalLearning.js +31 -21
- package/dist/technospam/api/canonicalLearning.js.map +1 -1
- package/dist/technospam/api/technospamApi.d.ts +131 -13
- package/dist/technospam/api/technospamApi.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.js +575 -356
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/StatusBadge.d.ts.map +1 -1
- package/dist/technospam/components/StatusBadge.js +4 -0
- package/dist/technospam/components/StatusBadge.js.map +1 -1
- package/dist/technospam/components/admin/AssessmentsAdminTab.js +1 -1
- package/dist/technospam/components/admin/AssessmentsAdminTab.js.map +1 -1
- package/dist/technospam/components/admin/EnterpriseIntegrationsTab.d.ts +2 -1
- package/dist/technospam/components/admin/EnterpriseIntegrationsTab.d.ts.map +1 -1
- package/dist/technospam/components/admin/EnterpriseIntegrationsTab.js +325 -95
- package/dist/technospam/components/admin/EnterpriseIntegrationsTab.js.map +1 -1
- package/dist/technospam/lib/enterprise.d.ts +20 -0
- package/dist/technospam/lib/enterprise.d.ts.map +1 -1
- package/dist/technospam/lib/enterprise.js +33 -1
- package/dist/technospam/lib/enterprise.js.map +1 -1
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js +2 -2
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { notify as e } from "../lib/toast.js";
|
|
2
2
|
import { userMessageFromError as t } from "../lib/errorMessage.js";
|
|
3
|
-
import { forTechnospamCourse as n, mapRows as r, toTecCertificate as i,
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { useApolloClient as
|
|
6
|
-
import { CombinedGraphQLErrors as
|
|
3
|
+
import { forTechnospamCourse as n, mapRows as r, toTecCertificate as i, toTecCourse as a, toTecEnrollment as o, toTecLesson as s } from "./canonicalLearning.js";
|
|
4
|
+
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
5
|
+
import { useApolloClient as d, useLazyQuery as ee, useMutation as f, useQuery as p } from "@apollo/client/react";
|
|
6
|
+
import { CombinedGraphQLErrors as m, gql as h } from "@apollo/client";
|
|
7
7
|
//#region src/technospam/api/technospamApi.ts
|
|
8
|
-
function
|
|
8
|
+
function g(e = 50, t) {
|
|
9
9
|
return t ? {
|
|
10
10
|
limit: e,
|
|
11
11
|
cursor: t
|
|
12
12
|
} : { limit: e };
|
|
13
13
|
}
|
|
14
|
-
var
|
|
14
|
+
var _ = h`
|
|
15
15
|
fragment CourseFields on TecCourse {
|
|
16
16
|
id
|
|
17
17
|
slug
|
|
@@ -30,7 +30,7 @@ var m = f`
|
|
|
30
30
|
createdAt
|
|
31
31
|
updatedAt
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`, v = h`
|
|
34
34
|
fragment LessonFields on TecLesson {
|
|
35
35
|
id
|
|
36
36
|
courseId
|
|
@@ -53,7 +53,7 @@ var m = f`
|
|
|
53
53
|
createdAt
|
|
54
54
|
updatedAt
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`, y = h`
|
|
57
57
|
fragment EnrollmentFields on TecEnrollment {
|
|
58
58
|
id
|
|
59
59
|
courseId
|
|
@@ -67,7 +67,7 @@ var m = f`
|
|
|
67
67
|
createdAt
|
|
68
68
|
updatedAt
|
|
69
69
|
}
|
|
70
|
-
`,
|
|
70
|
+
`, b = h`
|
|
71
71
|
fragment ProblemFields on TecProblem {
|
|
72
72
|
id
|
|
73
73
|
slug
|
|
@@ -89,7 +89,7 @@ var m = f`
|
|
|
89
89
|
createdAt
|
|
90
90
|
updatedAt
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
92
|
+
`, x = h`
|
|
93
93
|
fragment SubmissionFields on TecSubmission {
|
|
94
94
|
id
|
|
95
95
|
problemId
|
|
@@ -117,7 +117,7 @@ var m = f`
|
|
|
117
117
|
createdAt
|
|
118
118
|
updatedAt
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`, S = h`
|
|
121
121
|
fragment ProblemTestCaseFields on TecProblemTestCase {
|
|
122
122
|
id
|
|
123
123
|
problemId
|
|
@@ -128,7 +128,7 @@ var m = f`
|
|
|
128
128
|
input
|
|
129
129
|
expectedOutput
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`, C = h`
|
|
132
132
|
fragment MentorFields on TecMentor {
|
|
133
133
|
id
|
|
134
134
|
userId
|
|
@@ -145,7 +145,7 @@ var m = f`
|
|
|
145
145
|
createdAt
|
|
146
146
|
updatedAt
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`, w = h`
|
|
149
149
|
fragment SessionFields on TecMentorSession {
|
|
150
150
|
id
|
|
151
151
|
mentorId
|
|
@@ -166,7 +166,7 @@ var m = f`
|
|
|
166
166
|
createdAt
|
|
167
167
|
updatedAt
|
|
168
168
|
}
|
|
169
|
-
`,
|
|
169
|
+
`, T = h`
|
|
170
170
|
fragment HackathonFields on TecHackathon {
|
|
171
171
|
id
|
|
172
172
|
slug
|
|
@@ -184,7 +184,7 @@ var m = f`
|
|
|
184
184
|
createdAt
|
|
185
185
|
updatedAt
|
|
186
186
|
}
|
|
187
|
-
`,
|
|
187
|
+
`, E = h`
|
|
188
188
|
fragment TeamFields on TecHackathonTeam {
|
|
189
189
|
id
|
|
190
190
|
hackathonId
|
|
@@ -201,7 +201,7 @@ var m = f`
|
|
|
201
201
|
createdAt
|
|
202
202
|
updatedAt
|
|
203
203
|
}
|
|
204
|
-
`,
|
|
204
|
+
`, D = h`
|
|
205
205
|
fragment CertificateFields on TecCertificate {
|
|
206
206
|
id
|
|
207
207
|
courseId
|
|
@@ -214,16 +214,19 @@ var m = f`
|
|
|
214
214
|
revokeReason
|
|
215
215
|
createdAt
|
|
216
216
|
}
|
|
217
|
-
`,
|
|
218
|
-
${
|
|
217
|
+
`, te = h`
|
|
218
|
+
${_}
|
|
219
219
|
query TecListCourses(
|
|
220
220
|
$level: TecCourseLevel
|
|
221
221
|
$status: TecCourseStatus
|
|
222
222
|
$pagination: PaginationInput
|
|
223
223
|
) {
|
|
224
|
-
|
|
224
|
+
tecCanonicalCourses(level: $level, status: $status, pagination: $pagination) {
|
|
225
225
|
items {
|
|
226
|
-
|
|
226
|
+
id
|
|
227
|
+
technospamCourse {
|
|
228
|
+
...CourseFields
|
|
229
|
+
}
|
|
227
230
|
}
|
|
228
231
|
pageInfo {
|
|
229
232
|
cursor
|
|
@@ -231,24 +234,70 @@ var m = f`
|
|
|
231
234
|
}
|
|
232
235
|
}
|
|
233
236
|
}
|
|
234
|
-
`,
|
|
235
|
-
${
|
|
236
|
-
${
|
|
237
|
-
${
|
|
237
|
+
`, ne = h`
|
|
238
|
+
${_}
|
|
239
|
+
${v}
|
|
240
|
+
${y}
|
|
238
241
|
query TecCourse($id: ID!) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
...
|
|
242
|
+
tecCanonicalCourse(id: $id) {
|
|
243
|
+
id
|
|
244
|
+
technospamCourse {
|
|
245
|
+
...CourseFields
|
|
246
|
+
lessons {
|
|
247
|
+
...LessonFields
|
|
248
|
+
}
|
|
249
|
+
enrollments {
|
|
250
|
+
...EnrollmentFields
|
|
251
|
+
}
|
|
243
252
|
}
|
|
244
|
-
|
|
245
|
-
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
`, re = h`
|
|
256
|
+
${_}
|
|
257
|
+
fragment CanonicalEnrollmentFields on BuiEnrollment {
|
|
258
|
+
id
|
|
259
|
+
status
|
|
260
|
+
progressPct
|
|
261
|
+
enrolledAt
|
|
262
|
+
startedAt
|
|
263
|
+
lastActiveAt
|
|
264
|
+
completedAt
|
|
265
|
+
createdAt
|
|
266
|
+
updatedAt
|
|
267
|
+
technospamNextLessonId
|
|
268
|
+
technospamEnrollment {
|
|
269
|
+
id
|
|
270
|
+
courseId
|
|
271
|
+
learnerId
|
|
272
|
+
lessonsCompleted
|
|
273
|
+
course {
|
|
274
|
+
...CourseFields
|
|
246
275
|
}
|
|
247
276
|
}
|
|
248
277
|
}
|
|
249
|
-
`,
|
|
250
|
-
${
|
|
251
|
-
|
|
278
|
+
`, ie = h`
|
|
279
|
+
${_}
|
|
280
|
+
fragment CanonicalCertificateFields on BuiCertificate {
|
|
281
|
+
id
|
|
282
|
+
serial
|
|
283
|
+
status
|
|
284
|
+
issuedAt
|
|
285
|
+
revokedAt
|
|
286
|
+
finalScore
|
|
287
|
+
createdAt
|
|
288
|
+
technospamRevokeReason
|
|
289
|
+
technospamCertificate {
|
|
290
|
+
id
|
|
291
|
+
courseId
|
|
292
|
+
learnerId
|
|
293
|
+
score
|
|
294
|
+
course {
|
|
295
|
+
...CourseFields
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
`, ae = h`
|
|
300
|
+
${re}
|
|
252
301
|
query TecListEnrollments(
|
|
253
302
|
$learnerId: ID
|
|
254
303
|
$courseId: ID
|
|
@@ -256,7 +305,7 @@ var m = f`
|
|
|
256
305
|
$startDate: DateTime
|
|
257
306
|
$endDate: DateTime
|
|
258
307
|
) {
|
|
259
|
-
|
|
308
|
+
tecCanonicalEnrollments(
|
|
260
309
|
learnerId: $learnerId
|
|
261
310
|
courseId: $courseId
|
|
262
311
|
pagination: $pagination
|
|
@@ -264,10 +313,7 @@ var m = f`
|
|
|
264
313
|
endDate: $endDate
|
|
265
314
|
) {
|
|
266
315
|
items {
|
|
267
|
-
...
|
|
268
|
-
course {
|
|
269
|
-
...CourseFields
|
|
270
|
-
}
|
|
316
|
+
...CanonicalEnrollmentFields
|
|
271
317
|
}
|
|
272
318
|
pageInfo {
|
|
273
319
|
cursor
|
|
@@ -275,19 +321,21 @@ var m = f`
|
|
|
275
321
|
}
|
|
276
322
|
}
|
|
277
323
|
}
|
|
278
|
-
`, oe =
|
|
279
|
-
${
|
|
280
|
-
${
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
324
|
+
`, oe = h`
|
|
325
|
+
${ie}
|
|
326
|
+
query TecListCertificates($learnerId: ID, $courseId: ID, $pagination: PaginationInput) {
|
|
327
|
+
tecCanonicalCertificates(learnerId: $learnerId, courseId: $courseId, pagination: $pagination) {
|
|
328
|
+
items {
|
|
329
|
+
...CanonicalCertificateFields
|
|
330
|
+
}
|
|
331
|
+
pageInfo {
|
|
332
|
+
cursor
|
|
333
|
+
hasMore
|
|
286
334
|
}
|
|
287
335
|
}
|
|
288
336
|
}
|
|
289
|
-
`, se =
|
|
290
|
-
${
|
|
337
|
+
`, se = h`
|
|
338
|
+
${_}
|
|
291
339
|
query BuiMyTechnospamEnrollments($courseId: ID, $pagination: PaginationInput) {
|
|
292
340
|
buiMyEnrollments(source: TECHNOSPAM, courseId: $courseId, pagination: $pagination) {
|
|
293
341
|
items {
|
|
@@ -317,8 +365,8 @@ var m = f`
|
|
|
317
365
|
}
|
|
318
366
|
}
|
|
319
367
|
}
|
|
320
|
-
`, ce =
|
|
321
|
-
${
|
|
368
|
+
`, ce = h`
|
|
369
|
+
${_}
|
|
322
370
|
query BuiMyTechnospamCertificates($courseId: ID, $pagination: PaginationInput) {
|
|
323
371
|
buiMyCertificates(source: TECHNOSPAM, courseId: $courseId, pagination: $pagination) {
|
|
324
372
|
items {
|
|
@@ -346,8 +394,8 @@ var m = f`
|
|
|
346
394
|
}
|
|
347
395
|
}
|
|
348
396
|
}
|
|
349
|
-
`, le =
|
|
350
|
-
${
|
|
397
|
+
`, le = h`
|
|
398
|
+
${b}
|
|
351
399
|
query TecListProblems(
|
|
352
400
|
$difficulty: TecProblemDifficulty
|
|
353
401
|
$status: TecProblemStatus
|
|
@@ -375,10 +423,10 @@ var m = f`
|
|
|
375
423
|
}
|
|
376
424
|
}
|
|
377
425
|
}
|
|
378
|
-
`, ue =
|
|
379
|
-
${
|
|
380
|
-
${
|
|
381
|
-
${
|
|
426
|
+
`, ue = h`
|
|
427
|
+
${b}
|
|
428
|
+
${x}
|
|
429
|
+
${S}
|
|
382
430
|
query TecProblem($id: ID!) {
|
|
383
431
|
tecProblem(id: $id) {
|
|
384
432
|
...ProblemFields
|
|
@@ -390,16 +438,16 @@ var m = f`
|
|
|
390
438
|
}
|
|
391
439
|
}
|
|
392
440
|
}
|
|
393
|
-
`, de =
|
|
394
|
-
${
|
|
441
|
+
`, de = h`
|
|
442
|
+
${x}
|
|
395
443
|
mutation TecRegradeSubmission($id: ID!) {
|
|
396
444
|
tecRegradeSubmission(id: $id) {
|
|
397
445
|
...SubmissionFields
|
|
398
446
|
}
|
|
399
447
|
}
|
|
400
|
-
`, fe =
|
|
401
|
-
${
|
|
402
|
-
${
|
|
448
|
+
`, fe = h`
|
|
449
|
+
${x}
|
|
450
|
+
${b}
|
|
403
451
|
query TecListSubmissions(
|
|
404
452
|
$learnerId: ID
|
|
405
453
|
$problemId: ID
|
|
@@ -426,8 +474,8 @@ var m = f`
|
|
|
426
474
|
}
|
|
427
475
|
}
|
|
428
476
|
}
|
|
429
|
-
`,
|
|
430
|
-
${
|
|
477
|
+
`, pe = h`
|
|
478
|
+
${C}
|
|
431
479
|
query TecListMentors($status: TecMentorStatus, $pagination: PaginationInput) {
|
|
432
480
|
tecListMentors(status: $status, pagination: $pagination) {
|
|
433
481
|
items {
|
|
@@ -439,9 +487,9 @@ var m = f`
|
|
|
439
487
|
}
|
|
440
488
|
}
|
|
441
489
|
}
|
|
442
|
-
`,
|
|
443
|
-
${
|
|
444
|
-
${
|
|
490
|
+
`, me = h`
|
|
491
|
+
${C}
|
|
492
|
+
${w}
|
|
445
493
|
query TecMentor($id: ID!) {
|
|
446
494
|
tecMentor(id: $id) {
|
|
447
495
|
...MentorFields
|
|
@@ -450,9 +498,9 @@ var m = f`
|
|
|
450
498
|
}
|
|
451
499
|
}
|
|
452
500
|
}
|
|
453
|
-
`,
|
|
454
|
-
${
|
|
455
|
-
${
|
|
501
|
+
`, he = h`
|
|
502
|
+
${w}
|
|
503
|
+
${C}
|
|
456
504
|
query TecListSessions(
|
|
457
505
|
$mentorId: ID
|
|
458
506
|
$menteeId: ID
|
|
@@ -477,7 +525,7 @@ var m = f`
|
|
|
477
525
|
}
|
|
478
526
|
}
|
|
479
527
|
}
|
|
480
|
-
`,
|
|
528
|
+
`, O = h`
|
|
481
529
|
query TecCalculateSessionCost($mentorId: ID!, $durationMinutes: Int) {
|
|
482
530
|
tecCalculateSessionCost(mentorId: $mentorId, durationMinutes: $durationMinutes) {
|
|
483
531
|
mentorId
|
|
@@ -491,8 +539,8 @@ var m = f`
|
|
|
491
539
|
}
|
|
492
540
|
}
|
|
493
541
|
`;
|
|
494
|
-
|
|
495
|
-
${
|
|
542
|
+
h`
|
|
543
|
+
${h`
|
|
496
544
|
fragment PayoutFields on TecMentorPayout {
|
|
497
545
|
id
|
|
498
546
|
mentorId
|
|
@@ -518,8 +566,8 @@ f`
|
|
|
518
566
|
}
|
|
519
567
|
}
|
|
520
568
|
`;
|
|
521
|
-
var
|
|
522
|
-
${
|
|
569
|
+
var k = h`
|
|
570
|
+
${T}
|
|
523
571
|
query TecListHackathons($status: TecHackathonStatus, $pagination: PaginationInput) {
|
|
524
572
|
tecListHackathons(status: $status, pagination: $pagination) {
|
|
525
573
|
items {
|
|
@@ -531,9 +579,9 @@ var O = f`
|
|
|
531
579
|
}
|
|
532
580
|
}
|
|
533
581
|
}
|
|
534
|
-
`,
|
|
535
|
-
${
|
|
536
|
-
${
|
|
582
|
+
`, A = h`
|
|
583
|
+
${T}
|
|
584
|
+
${E}
|
|
537
585
|
query TecHackathon($id: ID!) {
|
|
538
586
|
tecHackathon(id: $id) {
|
|
539
587
|
...HackathonFields
|
|
@@ -542,8 +590,8 @@ var O = f`
|
|
|
542
590
|
}
|
|
543
591
|
}
|
|
544
592
|
}
|
|
545
|
-
`,
|
|
546
|
-
${
|
|
593
|
+
`, j = h`
|
|
594
|
+
${E}
|
|
547
595
|
query TecListTeams($hackathonId: ID!, $pagination: PaginationInput) {
|
|
548
596
|
tecListTeams(hackathonId: $hackathonId, pagination: $pagination) {
|
|
549
597
|
items {
|
|
@@ -555,12 +603,15 @@ var O = f`
|
|
|
555
603
|
}
|
|
556
604
|
}
|
|
557
605
|
}
|
|
558
|
-
`,
|
|
559
|
-
${
|
|
606
|
+
`, M = h`
|
|
607
|
+
${v}
|
|
560
608
|
query TecListLessons($courseId: ID!, $pagination: PaginationInput) {
|
|
561
|
-
|
|
609
|
+
tecCanonicalLessons(courseId: $courseId, pagination: $pagination) {
|
|
562
610
|
items {
|
|
563
|
-
|
|
611
|
+
id
|
|
612
|
+
technospamLesson {
|
|
613
|
+
...LessonFields
|
|
614
|
+
}
|
|
564
615
|
}
|
|
565
616
|
pageInfo {
|
|
566
617
|
cursor
|
|
@@ -568,71 +619,97 @@ var O = f`
|
|
|
568
619
|
}
|
|
569
620
|
}
|
|
570
621
|
}
|
|
571
|
-
|
|
622
|
+
`;
|
|
623
|
+
function N(e, t) {
|
|
624
|
+
let n = e.data, r = l(() => n ? t(n) : void 0, [n, t]);
|
|
625
|
+
return {
|
|
626
|
+
...e,
|
|
627
|
+
data: r
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
var P = {
|
|
631
|
+
cursor: null,
|
|
632
|
+
hasMore: !1
|
|
633
|
+
}, F = (e) => ({ courses: {
|
|
634
|
+
items: r(e.tecCanonicalCourses?.items, a),
|
|
635
|
+
pageInfo: e.tecCanonicalCourses?.pageInfo ?? P
|
|
636
|
+
} }), I = (e) => ({ course: e.tecCanonicalCourse ? a(e.tecCanonicalCourse) : null }), L = (e) => ({ enrollments: {
|
|
637
|
+
items: r(e.tecCanonicalEnrollments?.items, o),
|
|
638
|
+
pageInfo: e.tecCanonicalEnrollments?.pageInfo ?? P
|
|
639
|
+
} }), R = (e) => ({ certificates: {
|
|
640
|
+
items: r(e.tecCanonicalCertificates?.items, i),
|
|
641
|
+
pageInfo: e.tecCanonicalCertificates?.pageInfo ?? P
|
|
642
|
+
} }), ge = (e) => ({ lessons: {
|
|
643
|
+
items: r(e.tecCanonicalLessons?.items, s),
|
|
644
|
+
pageInfo: e.tecCanonicalLessons?.pageInfo ?? P
|
|
645
|
+
} }), _e = (e) => N(p(te, {
|
|
572
646
|
variables: {
|
|
573
|
-
pagination:
|
|
647
|
+
pagination: g(50),
|
|
574
648
|
...e
|
|
575
649
|
},
|
|
576
650
|
fetchPolicy: "cache-and-network"
|
|
577
|
-
}),
|
|
651
|
+
}), F), ve = (e) => N(p(ne, {
|
|
578
652
|
variables: { id: e },
|
|
579
653
|
skip: !e,
|
|
580
654
|
fetchPolicy: "cache-and-network"
|
|
581
|
-
}),
|
|
655
|
+
}), I), ye = (e) => N(p(ae, {
|
|
582
656
|
variables: {
|
|
583
|
-
pagination:
|
|
657
|
+
pagination: g(50),
|
|
584
658
|
...e
|
|
585
659
|
},
|
|
586
660
|
fetchPolicy: "cache-and-network"
|
|
587
|
-
}),
|
|
588
|
-
variables:
|
|
661
|
+
}), L), be = (e) => N(p(oe, {
|
|
662
|
+
variables: {
|
|
663
|
+
pagination: g(100),
|
|
664
|
+
...e
|
|
665
|
+
},
|
|
589
666
|
fetchPolicy: "cache-and-network"
|
|
590
|
-
});
|
|
591
|
-
function
|
|
592
|
-
let t =
|
|
667
|
+
}), R);
|
|
668
|
+
function xe(e = {}) {
|
|
669
|
+
let t = p(se, {
|
|
593
670
|
variables: {
|
|
594
671
|
...e.buiCourseId ? { courseId: e.buiCourseId } : {},
|
|
595
|
-
pagination:
|
|
672
|
+
pagination: g(e.limit ?? 100)
|
|
596
673
|
},
|
|
597
674
|
skip: e.skip,
|
|
598
675
|
fetchPolicy: "cache-and-network"
|
|
599
|
-
}), i = t.data?.buiMyEnrollments?.items,
|
|
676
|
+
}), i = t.data?.buiMyEnrollments?.items, a = l(() => n(r(i, o), e.technospamCourseId), [i, e.technospamCourseId]);
|
|
600
677
|
return {
|
|
601
678
|
...t,
|
|
602
|
-
enrollments:
|
|
679
|
+
enrollments: a
|
|
603
680
|
};
|
|
604
681
|
}
|
|
605
|
-
function
|
|
606
|
-
let t =
|
|
682
|
+
function Se(e = {}) {
|
|
683
|
+
let t = p(ce, {
|
|
607
684
|
variables: {
|
|
608
685
|
...e.buiCourseId ? { courseId: e.buiCourseId } : {},
|
|
609
|
-
pagination:
|
|
686
|
+
pagination: g(e.limit ?? 100)
|
|
610
687
|
},
|
|
611
688
|
skip: e.skip,
|
|
612
689
|
fetchPolicy: "cache-and-network"
|
|
613
|
-
}), a = t.data?.buiMyCertificates?.items, o =
|
|
690
|
+
}), a = t.data?.buiMyCertificates?.items, o = l(() => n(r(a, i), e.technospamCourseId), [a, e.technospamCourseId]);
|
|
614
691
|
return {
|
|
615
692
|
...t,
|
|
616
693
|
certificates: o
|
|
617
694
|
};
|
|
618
695
|
}
|
|
619
|
-
var
|
|
696
|
+
var Ce = (e) => p(le, {
|
|
620
697
|
variables: {
|
|
621
|
-
pagination:
|
|
698
|
+
pagination: g(50),
|
|
622
699
|
...e
|
|
623
700
|
},
|
|
624
701
|
fetchPolicy: "cache-and-network"
|
|
625
|
-
}),
|
|
702
|
+
}), we = (e) => p(ue, {
|
|
626
703
|
variables: { id: e },
|
|
627
704
|
skip: !e,
|
|
628
705
|
fetchPolicy: "cache-and-network"
|
|
629
|
-
}),
|
|
706
|
+
}), Te = (e) => p(fe, {
|
|
630
707
|
variables: {
|
|
631
|
-
pagination:
|
|
708
|
+
pagination: g(50),
|
|
632
709
|
...e
|
|
633
710
|
},
|
|
634
711
|
fetchPolicy: "cache-and-network"
|
|
635
|
-
}),
|
|
712
|
+
}), Ee = h`
|
|
636
713
|
query TecListSolvedSubmissions($learnerId: ID!, $pagination: PaginationInput) {
|
|
637
714
|
tecListSubmissions(learnerId: $learnerId, pagination: $pagination) {
|
|
638
715
|
items {
|
|
@@ -646,10 +723,10 @@ var R = (e) => d(le, {
|
|
|
646
723
|
}
|
|
647
724
|
}
|
|
648
725
|
}
|
|
649
|
-
`,
|
|
650
|
-
function
|
|
651
|
-
let t =
|
|
652
|
-
return
|
|
726
|
+
`, De = /* @__PURE__ */ new Set();
|
|
727
|
+
function Oe(e) {
|
|
728
|
+
let t = d(), [n, r] = u(null);
|
|
729
|
+
return c(() => {
|
|
653
730
|
if (!e) return;
|
|
654
731
|
let n = !1, i = /* @__PURE__ */ new Set();
|
|
655
732
|
return (async () => {
|
|
@@ -658,10 +735,10 @@ function me(e) {
|
|
|
658
735
|
let o;
|
|
659
736
|
try {
|
|
660
737
|
o = (await t.query({
|
|
661
|
-
query:
|
|
738
|
+
query: Ee,
|
|
662
739
|
variables: {
|
|
663
740
|
learnerId: e,
|
|
664
|
-
pagination:
|
|
741
|
+
pagination: g(100, a)
|
|
665
742
|
},
|
|
666
743
|
fetchPolicy: "network-only"
|
|
667
744
|
})).data?.tecListSubmissions;
|
|
@@ -679,58 +756,58 @@ function me(e) {
|
|
|
679
756
|
})(), () => {
|
|
680
757
|
n = !0;
|
|
681
758
|
};
|
|
682
|
-
}, [t, e]), e && n?.learnerId === e ? n.ids :
|
|
759
|
+
}, [t, e]), e && n?.learnerId === e ? n.ids : De;
|
|
683
760
|
}
|
|
684
|
-
var
|
|
761
|
+
var ke = (e) => p(pe, {
|
|
685
762
|
variables: {
|
|
686
|
-
pagination:
|
|
763
|
+
pagination: g(50),
|
|
687
764
|
...e
|
|
688
765
|
},
|
|
689
766
|
fetchPolicy: "cache-and-network"
|
|
690
|
-
}),
|
|
767
|
+
}), Ae = (e) => p(me, {
|
|
691
768
|
variables: { id: e },
|
|
692
769
|
skip: !e,
|
|
693
770
|
fetchPolicy: "cache-and-network"
|
|
694
|
-
}),
|
|
771
|
+
}), je = (e) => p(he, {
|
|
695
772
|
variables: {
|
|
696
|
-
pagination:
|
|
773
|
+
pagination: g(50),
|
|
697
774
|
...e
|
|
698
775
|
},
|
|
699
776
|
fetchPolicy: "cache-and-network"
|
|
700
|
-
}),
|
|
777
|
+
}), Me = (e, t) => p(O, {
|
|
701
778
|
variables: {
|
|
702
779
|
mentorId: e,
|
|
703
780
|
durationMinutes: t
|
|
704
781
|
},
|
|
705
782
|
skip: !e || !Number.isFinite(t) || t <= 0,
|
|
706
783
|
fetchPolicy: "cache-and-network"
|
|
707
|
-
}),
|
|
784
|
+
}), Ne = (e) => p(k, {
|
|
708
785
|
variables: {
|
|
709
|
-
pagination:
|
|
786
|
+
pagination: g(50),
|
|
710
787
|
...e
|
|
711
788
|
},
|
|
712
789
|
fetchPolicy: "cache-and-network"
|
|
713
|
-
}),
|
|
790
|
+
}), Pe = (e) => p(A, {
|
|
714
791
|
variables: { id: e },
|
|
715
792
|
skip: !e,
|
|
716
793
|
fetchPolicy: "cache-and-network"
|
|
717
|
-
}),
|
|
794
|
+
}), Fe = (e, t) => p(j, {
|
|
718
795
|
variables: {
|
|
719
796
|
hackathonId: e,
|
|
720
|
-
pagination: t ??
|
|
797
|
+
pagination: t ?? g(50)
|
|
721
798
|
},
|
|
722
799
|
skip: !e,
|
|
723
800
|
fetchPolicy: "cache-and-network"
|
|
724
|
-
}),
|
|
801
|
+
}), Ie = (e, t) => N(p(M, {
|
|
725
802
|
variables: {
|
|
726
803
|
courseId: e,
|
|
727
|
-
pagination: t ??
|
|
804
|
+
pagination: t ?? g(50)
|
|
728
805
|
},
|
|
729
806
|
skip: !e,
|
|
730
807
|
fetchPolicy: "cache-and-network"
|
|
731
|
-
}),
|
|
808
|
+
}), ge), z = (n) => {
|
|
732
809
|
e.error("Something went wrong", t(n));
|
|
733
|
-
},
|
|
810
|
+
}, B = {
|
|
734
811
|
courses: "TecListCourses",
|
|
735
812
|
enrollments: "TecListEnrollments",
|
|
736
813
|
myEnrollments: "BuiMyTechnospamEnrollments",
|
|
@@ -740,21 +817,21 @@ var he = (e) => d(w, {
|
|
|
740
817
|
mentors: "TecListMentors",
|
|
741
818
|
sessions: "TecListSessions",
|
|
742
819
|
hackathons: "TecListHackathons"
|
|
743
|
-
},
|
|
744
|
-
${
|
|
820
|
+
}, Le = h`
|
|
821
|
+
${y}
|
|
745
822
|
mutation TecEnroll($input: TecEnrollInput!) {
|
|
746
823
|
tecEnroll(input: $input) {
|
|
747
824
|
...EnrollmentFields
|
|
748
825
|
}
|
|
749
826
|
}
|
|
750
|
-
`,
|
|
751
|
-
${
|
|
827
|
+
`, Re = h`
|
|
828
|
+
${x}
|
|
752
829
|
mutation TecSubmitSolution($input: TecSubmitSolutionInput!) {
|
|
753
830
|
tecSubmitSolution(input: $input) {
|
|
754
831
|
...SubmissionFields
|
|
755
832
|
}
|
|
756
833
|
}
|
|
757
|
-
`,
|
|
834
|
+
`, ze = h`
|
|
758
835
|
mutation TecRunSolution($input: TecRunSolutionInput!) {
|
|
759
836
|
tecRunSolution(input: $input) {
|
|
760
837
|
problemId
|
|
@@ -788,241 +865,241 @@ var he = (e) => d(w, {
|
|
|
788
865
|
}
|
|
789
866
|
}
|
|
790
867
|
}
|
|
791
|
-
`,
|
|
792
|
-
${
|
|
868
|
+
`, Be = h`
|
|
869
|
+
${w}
|
|
793
870
|
mutation TecBookSession($input: TecBookSessionInput!) {
|
|
794
871
|
tecBookSession(input: $input) {
|
|
795
872
|
...SessionFields
|
|
796
873
|
}
|
|
797
874
|
}
|
|
798
|
-
`,
|
|
799
|
-
${
|
|
875
|
+
`, Ve = h`
|
|
876
|
+
${w}
|
|
800
877
|
mutation TecCancelSession($id: ID!) {
|
|
801
878
|
tecCancelSession(id: $id) {
|
|
802
879
|
...SessionFields
|
|
803
880
|
}
|
|
804
881
|
}
|
|
805
|
-
`,
|
|
806
|
-
${
|
|
882
|
+
`, He = h`
|
|
883
|
+
${C}
|
|
807
884
|
mutation TecBecomeMentor($input: TecCreateMentorInput!) {
|
|
808
885
|
tecBecomeMentor(input: $input) {
|
|
809
886
|
...MentorFields
|
|
810
887
|
}
|
|
811
888
|
}
|
|
812
|
-
`,
|
|
813
|
-
${
|
|
889
|
+
`, Ue = h`
|
|
890
|
+
${E}
|
|
814
891
|
mutation TecRegisterTeam($input: TecRegisterTeamInput!) {
|
|
815
892
|
tecRegisterTeam(input: $input) {
|
|
816
893
|
...TeamFields
|
|
817
894
|
}
|
|
818
895
|
}
|
|
819
|
-
`,
|
|
820
|
-
${
|
|
896
|
+
`, We = h`
|
|
897
|
+
${E}
|
|
821
898
|
mutation TecSubmitProject($input: TecSubmitProjectInput!) {
|
|
822
899
|
tecSubmitProject(input: $input) {
|
|
823
900
|
...TeamFields
|
|
824
901
|
}
|
|
825
902
|
}
|
|
826
|
-
`,
|
|
827
|
-
${
|
|
903
|
+
`, Ge = h`
|
|
904
|
+
${_}
|
|
828
905
|
mutation TecCreateCourse($input: TecCreateCourseInput!) {
|
|
829
906
|
tecCreateCourse(input: $input) {
|
|
830
907
|
...CourseFields
|
|
831
908
|
}
|
|
832
909
|
}
|
|
833
|
-
`,
|
|
834
|
-
${
|
|
910
|
+
`, Ke = h`
|
|
911
|
+
${_}
|
|
835
912
|
mutation TecPublishCourse($id: ID!) {
|
|
836
913
|
tecPublishCourse(id: $id) {
|
|
837
914
|
...CourseFields
|
|
838
915
|
}
|
|
839
916
|
}
|
|
840
|
-
`,
|
|
917
|
+
`, qe = h`
|
|
841
918
|
mutation TecArchiveCourse($id: ID!) {
|
|
842
919
|
tecArchiveCourse(id: $id)
|
|
843
920
|
}
|
|
844
|
-
`,
|
|
845
|
-
${
|
|
921
|
+
`, Je = h`
|
|
922
|
+
${v}
|
|
846
923
|
mutation TecCreateLesson($input: TecCreateLessonInput!) {
|
|
847
924
|
tecCreateLesson(input: $input) {
|
|
848
925
|
...LessonFields
|
|
849
926
|
}
|
|
850
927
|
}
|
|
851
|
-
`,
|
|
852
|
-
${
|
|
928
|
+
`, Ye = h`
|
|
929
|
+
${v}
|
|
853
930
|
mutation TecUpdateLesson($id: ID!, $input: TecUpdateLessonInput!) {
|
|
854
931
|
tecUpdateLesson(id: $id, input: $input) {
|
|
855
932
|
...LessonFields
|
|
856
933
|
}
|
|
857
934
|
}
|
|
858
|
-
`,
|
|
859
|
-
${
|
|
935
|
+
`, Xe = h`
|
|
936
|
+
${b}
|
|
860
937
|
mutation TecCreateProblem($input: TecCreateProblemInput!) {
|
|
861
938
|
tecCreateProblem(input: $input) {
|
|
862
939
|
...ProblemFields
|
|
863
940
|
}
|
|
864
941
|
}
|
|
865
|
-
`,
|
|
866
|
-
${
|
|
942
|
+
`, Ze = h`
|
|
943
|
+
${b}
|
|
867
944
|
mutation TecPublishProblem($id: ID!) {
|
|
868
945
|
tecPublishProblem(id: $id) {
|
|
869
946
|
...ProblemFields
|
|
870
947
|
}
|
|
871
948
|
}
|
|
872
|
-
`,
|
|
873
|
-
${
|
|
949
|
+
`, Qe = h`
|
|
950
|
+
${T}
|
|
874
951
|
mutation TecCreateHackathon($input: TecCreateHackathonInput!) {
|
|
875
952
|
tecCreateHackathon(input: $input) {
|
|
876
953
|
...HackathonFields
|
|
877
954
|
}
|
|
878
955
|
}
|
|
879
|
-
`,
|
|
880
|
-
${
|
|
956
|
+
`, $e = h`
|
|
957
|
+
${T}
|
|
881
958
|
mutation TecOpenRegistration($id: ID!) {
|
|
882
959
|
tecOpenRegistration(id: $id) {
|
|
883
960
|
...HackathonFields
|
|
884
961
|
}
|
|
885
962
|
}
|
|
886
|
-
`,
|
|
887
|
-
${
|
|
963
|
+
`, et = h`
|
|
964
|
+
${C}
|
|
888
965
|
mutation TecApproveMentor($id: ID!) {
|
|
889
966
|
tecApproveMentor(id: $id) {
|
|
890
967
|
...MentorFields
|
|
891
968
|
}
|
|
892
969
|
}
|
|
893
|
-
`,
|
|
894
|
-
${
|
|
970
|
+
`, tt = h`
|
|
971
|
+
${E}
|
|
895
972
|
mutation TecScoreTeam($id: ID!, $score: Int!, $winner: Boolean) {
|
|
896
973
|
tecScoreTeam(id: $id, score: $score, winner: $winner) {
|
|
897
974
|
...TeamFields
|
|
898
975
|
}
|
|
899
976
|
}
|
|
900
|
-
`,
|
|
901
|
-
${
|
|
977
|
+
`, nt = h`
|
|
978
|
+
${w}
|
|
902
979
|
mutation TecConfirmSession($id: ID!, $meetingUrl: String) {
|
|
903
980
|
tecConfirmSession(id: $id, meetingUrl: $meetingUrl) {
|
|
904
981
|
...SessionFields
|
|
905
982
|
}
|
|
906
983
|
}
|
|
907
|
-
`,
|
|
908
|
-
${
|
|
984
|
+
`, rt = h`
|
|
985
|
+
${w}
|
|
909
986
|
mutation TecCompleteSession($id: ID!, $rating: Int, $feedback: String) {
|
|
910
987
|
tecCompleteSession(id: $id, rating: $rating, feedback: $feedback) {
|
|
911
988
|
...SessionFields
|
|
912
989
|
}
|
|
913
990
|
}
|
|
914
|
-
`,
|
|
915
|
-
${
|
|
991
|
+
`, it = h`
|
|
992
|
+
${x}
|
|
916
993
|
mutation TecGradeSubmission($id: ID!, $verdict: TecSubmissionVerdict!, $runtimeMs: Int) {
|
|
917
994
|
tecGradeSubmission(id: $id, verdict: $verdict, runtimeMs: $runtimeMs) {
|
|
918
995
|
...SubmissionFields
|
|
919
996
|
}
|
|
920
997
|
}
|
|
921
|
-
`,
|
|
922
|
-
${
|
|
998
|
+
`, at = h`
|
|
999
|
+
${D}
|
|
923
1000
|
mutation TecIssueCertificate($courseId: ID!, $learnerId: ID!, $score: Int!) {
|
|
924
1001
|
tecIssueCertificate(courseId: $courseId, learnerId: $learnerId, score: $score) {
|
|
925
1002
|
...CertificateFields
|
|
926
1003
|
}
|
|
927
1004
|
}
|
|
928
1005
|
`;
|
|
929
|
-
|
|
930
|
-
${
|
|
1006
|
+
h`
|
|
1007
|
+
${D}
|
|
931
1008
|
mutation TecRevokeCertificate($id: ID!, $reason: String) {
|
|
932
1009
|
tecRevokeCertificate(id: $id, reason: $reason) {
|
|
933
1010
|
...CertificateFields
|
|
934
1011
|
}
|
|
935
1012
|
}
|
|
936
1013
|
`;
|
|
937
|
-
var
|
|
938
|
-
${
|
|
1014
|
+
var ot = h`
|
|
1015
|
+
${T}
|
|
939
1016
|
mutation TecStartHackathon($id: ID!) {
|
|
940
1017
|
tecStartHackathon(id: $id) {
|
|
941
1018
|
...HackathonFields
|
|
942
1019
|
}
|
|
943
1020
|
}
|
|
944
|
-
`,
|
|
945
|
-
${
|
|
1021
|
+
`, st = h`
|
|
1022
|
+
${T}
|
|
946
1023
|
mutation TecStartJudging($id: ID!) {
|
|
947
1024
|
tecStartJudging(id: $id) {
|
|
948
1025
|
...HackathonFields
|
|
949
1026
|
}
|
|
950
1027
|
}
|
|
951
|
-
`,
|
|
952
|
-
${
|
|
1028
|
+
`, ct = h`
|
|
1029
|
+
${T}
|
|
953
1030
|
mutation TecCompleteHackathon($id: ID!) {
|
|
954
1031
|
tecCompleteHackathon(id: $id) {
|
|
955
1032
|
...HackathonFields
|
|
956
1033
|
}
|
|
957
1034
|
}
|
|
958
|
-
`,
|
|
959
|
-
onError:
|
|
1035
|
+
`, lt = () => f(Le, {
|
|
1036
|
+
onError: z,
|
|
960
1037
|
refetchQueries: [
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1038
|
+
B.enrollments,
|
|
1039
|
+
B.myEnrollments,
|
|
1040
|
+
B.courses
|
|
964
1041
|
]
|
|
965
|
-
}),
|
|
966
|
-
onError:
|
|
967
|
-
refetchQueries: [
|
|
968
|
-
}),
|
|
969
|
-
onError:
|
|
970
|
-
refetchQueries: [
|
|
971
|
-
}),
|
|
972
|
-
onError:
|
|
973
|
-
refetchQueries: [
|
|
974
|
-
}),
|
|
975
|
-
onError:
|
|
976
|
-
refetchQueries: [
|
|
977
|
-
}),
|
|
978
|
-
onError:
|
|
979
|
-
refetchQueries: [
|
|
980
|
-
}),
|
|
981
|
-
onError:
|
|
982
|
-
refetchQueries: [
|
|
983
|
-
}),
|
|
984
|
-
onError:
|
|
985
|
-
refetchQueries: [
|
|
986
|
-
}),
|
|
987
|
-
onError:
|
|
988
|
-
refetchQueries: [
|
|
989
|
-
}),
|
|
990
|
-
onError:
|
|
991
|
-
refetchQueries: [
|
|
992
|
-
}),
|
|
993
|
-
onError:
|
|
994
|
-
refetchQueries: [
|
|
995
|
-
}),
|
|
996
|
-
onError:
|
|
997
|
-
refetchQueries: [
|
|
998
|
-
}),
|
|
999
|
-
onError:
|
|
1000
|
-
refetchQueries: [
|
|
1001
|
-
}),
|
|
1002
|
-
onError:
|
|
1003
|
-
refetchQueries: [
|
|
1004
|
-
}),
|
|
1005
|
-
onError:
|
|
1006
|
-
refetchQueries: [
|
|
1007
|
-
}),
|
|
1008
|
-
onError:
|
|
1009
|
-
refetchQueries: [
|
|
1010
|
-
}),
|
|
1011
|
-
onError:
|
|
1012
|
-
refetchQueries: [
|
|
1013
|
-
}),
|
|
1014
|
-
onError:
|
|
1015
|
-
refetchQueries: [
|
|
1016
|
-
}),
|
|
1017
|
-
onError:
|
|
1018
|
-
refetchQueries: [
|
|
1019
|
-
}),
|
|
1020
|
-
onError:
|
|
1021
|
-
refetchQueries: [
|
|
1022
|
-
}),
|
|
1023
|
-
onError:
|
|
1024
|
-
refetchQueries: [
|
|
1025
|
-
}),
|
|
1042
|
+
}), ut = () => f(Re, {
|
|
1043
|
+
onError: z,
|
|
1044
|
+
refetchQueries: [B.submissions]
|
|
1045
|
+
}), dt = () => f(ze, { onError: z }), ft = () => f(de, {
|
|
1046
|
+
onError: z,
|
|
1047
|
+
refetchQueries: [B.submissions]
|
|
1048
|
+
}), pt = () => f(Be, {
|
|
1049
|
+
onError: z,
|
|
1050
|
+
refetchQueries: [B.sessions, B.mentors]
|
|
1051
|
+
}), mt = () => f(Ve, {
|
|
1052
|
+
onError: z,
|
|
1053
|
+
refetchQueries: [B.sessions]
|
|
1054
|
+
}), ht = () => f(He, {
|
|
1055
|
+
onError: z,
|
|
1056
|
+
refetchQueries: [B.mentors]
|
|
1057
|
+
}), gt = () => f(Ue, {
|
|
1058
|
+
onError: z,
|
|
1059
|
+
refetchQueries: [B.hackathons]
|
|
1060
|
+
}), _t = () => f(We, { onError: z }), vt = () => f(Ge, {
|
|
1061
|
+
onError: z,
|
|
1062
|
+
refetchQueries: [B.courses]
|
|
1063
|
+
}), yt = () => f(Ke, {
|
|
1064
|
+
onError: z,
|
|
1065
|
+
refetchQueries: [B.courses]
|
|
1066
|
+
}), bt = () => f(qe, {
|
|
1067
|
+
onError: z,
|
|
1068
|
+
refetchQueries: [B.courses]
|
|
1069
|
+
}), xt = () => f(Je, { onError: z }), St = () => f(Ye, { onError: z }), Ct = () => f(Xe, {
|
|
1070
|
+
onError: z,
|
|
1071
|
+
refetchQueries: [B.problems]
|
|
1072
|
+
}), wt = () => f(Ze, {
|
|
1073
|
+
onError: z,
|
|
1074
|
+
refetchQueries: [B.problems]
|
|
1075
|
+
}), Tt = () => f(Qe, {
|
|
1076
|
+
onError: z,
|
|
1077
|
+
refetchQueries: [B.hackathons]
|
|
1078
|
+
}), Et = () => f($e, {
|
|
1079
|
+
onError: z,
|
|
1080
|
+
refetchQueries: [B.hackathons]
|
|
1081
|
+
}), Dt = () => f(et, {
|
|
1082
|
+
onError: z,
|
|
1083
|
+
refetchQueries: [B.mentors]
|
|
1084
|
+
}), Ot = () => f(tt, { onError: z }), kt = () => f(nt, {
|
|
1085
|
+
onError: z,
|
|
1086
|
+
refetchQueries: [B.sessions]
|
|
1087
|
+
}), At = () => f(rt, {
|
|
1088
|
+
onError: z,
|
|
1089
|
+
refetchQueries: [B.sessions]
|
|
1090
|
+
}), jt = () => f(it, {
|
|
1091
|
+
onError: z,
|
|
1092
|
+
refetchQueries: [B.submissions]
|
|
1093
|
+
}), Mt = () => f(at, { onError: z }), Nt = () => f(ot, {
|
|
1094
|
+
onError: z,
|
|
1095
|
+
refetchQueries: [B.hackathons]
|
|
1096
|
+
}), Pt = () => f(st, {
|
|
1097
|
+
onError: z,
|
|
1098
|
+
refetchQueries: [B.hackathons]
|
|
1099
|
+
}), Ft = () => f(ct, {
|
|
1100
|
+
onError: z,
|
|
1101
|
+
refetchQueries: [B.hackathons]
|
|
1102
|
+
}), V = h`
|
|
1026
1103
|
fragment StudyPlanStepFields on TecStudyPlanStep {
|
|
1027
1104
|
id
|
|
1028
1105
|
order
|
|
@@ -1035,8 +1112,8 @@ var Ke = f`
|
|
|
1035
1112
|
estimatedMinutes
|
|
1036
1113
|
completedAt
|
|
1037
1114
|
}
|
|
1038
|
-
`,
|
|
1039
|
-
${
|
|
1115
|
+
`, H = h`
|
|
1116
|
+
${V}
|
|
1040
1117
|
fragment StudyPlanFields on TecStudyPlan {
|
|
1041
1118
|
id
|
|
1042
1119
|
goal
|
|
@@ -1052,8 +1129,8 @@ var Ke = f`
|
|
|
1052
1129
|
...StudyPlanStepFields
|
|
1053
1130
|
}
|
|
1054
1131
|
}
|
|
1055
|
-
`,
|
|
1056
|
-
${
|
|
1132
|
+
`, It = h`
|
|
1133
|
+
${H}
|
|
1057
1134
|
query TecMyStudyPlans {
|
|
1058
1135
|
tecMyStudyPlans {
|
|
1059
1136
|
items {
|
|
@@ -1065,34 +1142,34 @@ var Ke = f`
|
|
|
1065
1142
|
}
|
|
1066
1143
|
}
|
|
1067
1144
|
}
|
|
1068
|
-
`,
|
|
1069
|
-
${
|
|
1145
|
+
`, Lt = h`
|
|
1146
|
+
${H}
|
|
1070
1147
|
mutation TecGenerateStudyPlan($input: TecGenerateStudyPlanInput!) {
|
|
1071
1148
|
tecGenerateStudyPlan(input: $input) {
|
|
1072
1149
|
...StudyPlanFields
|
|
1073
1150
|
}
|
|
1074
1151
|
}
|
|
1075
|
-
`,
|
|
1076
|
-
${
|
|
1152
|
+
`, Rt = h`
|
|
1153
|
+
${V}
|
|
1077
1154
|
mutation TecUpdateStudyPlanStepStatus($input: TecUpdateStudyPlanStepStatusInput!) {
|
|
1078
1155
|
tecUpdateStudyPlanStepStatus(input: $input) {
|
|
1079
1156
|
...StudyPlanStepFields
|
|
1080
1157
|
}
|
|
1081
1158
|
}
|
|
1082
|
-
`,
|
|
1159
|
+
`, zt = h`
|
|
1083
1160
|
mutation TecArchiveStudyPlan($id: ID!) {
|
|
1084
1161
|
tecArchiveStudyPlan(id: $id)
|
|
1085
1162
|
}
|
|
1086
|
-
`,
|
|
1087
|
-
onError:
|
|
1163
|
+
`, Bt = () => p(It, { fetchPolicy: "cache-and-network" }), Vt = () => f(Lt, {
|
|
1164
|
+
onError: z,
|
|
1088
1165
|
refetchQueries: ["TecMyStudyPlans"]
|
|
1089
|
-
}),
|
|
1090
|
-
onError:
|
|
1166
|
+
}), Ht = () => f(Rt, {
|
|
1167
|
+
onError: z,
|
|
1091
1168
|
refetchQueries: ["TecMyStudyPlans"]
|
|
1092
|
-
}),
|
|
1093
|
-
onError:
|
|
1169
|
+
}), Ut = () => f(zt, {
|
|
1170
|
+
onError: z,
|
|
1094
1171
|
refetchQueries: ["TecMyStudyPlans"]
|
|
1095
|
-
}),
|
|
1172
|
+
}), U = h`
|
|
1096
1173
|
fragment PortfolioItemFields on TecPortfolioItem {
|
|
1097
1174
|
id
|
|
1098
1175
|
kind
|
|
@@ -1103,8 +1180,8 @@ var Ke = f`
|
|
|
1103
1180
|
completionDate
|
|
1104
1181
|
order
|
|
1105
1182
|
}
|
|
1106
|
-
`,
|
|
1107
|
-
${
|
|
1183
|
+
`, W = h`
|
|
1184
|
+
${U}
|
|
1108
1185
|
fragment PortfolioFields on TecPortfolio {
|
|
1109
1186
|
id
|
|
1110
1187
|
isPublished
|
|
@@ -1114,60 +1191,60 @@ var Ke = f`
|
|
|
1114
1191
|
...PortfolioItemFields
|
|
1115
1192
|
}
|
|
1116
1193
|
}
|
|
1117
|
-
`,
|
|
1118
|
-
${
|
|
1194
|
+
`, Wt = h`
|
|
1195
|
+
${W}
|
|
1119
1196
|
query TecMyPortfolio {
|
|
1120
1197
|
tecMyPortfolio {
|
|
1121
1198
|
...PortfolioFields
|
|
1122
1199
|
}
|
|
1123
1200
|
}
|
|
1124
|
-
`,
|
|
1125
|
-
${
|
|
1201
|
+
`, Gt = h`
|
|
1202
|
+
${U}
|
|
1126
1203
|
mutation TecAddPortfolioItem($input: TecAddPortfolioItemInput!) {
|
|
1127
1204
|
tecAddPortfolioItem(input: $input) {
|
|
1128
1205
|
...PortfolioItemFields
|
|
1129
1206
|
}
|
|
1130
1207
|
}
|
|
1131
1208
|
`;
|
|
1132
|
-
|
|
1133
|
-
${
|
|
1209
|
+
h`
|
|
1210
|
+
${W}
|
|
1134
1211
|
mutation TecReorderPortfolioItems($input: TecReorderPortfolioItemsInput!) {
|
|
1135
1212
|
tecReorderPortfolioItems(input: $input) {
|
|
1136
1213
|
...PortfolioFields
|
|
1137
1214
|
}
|
|
1138
1215
|
}
|
|
1139
1216
|
`;
|
|
1140
|
-
var
|
|
1217
|
+
var Kt = h`
|
|
1141
1218
|
mutation TecRemovePortfolioItem($id: ID!) {
|
|
1142
1219
|
tecRemovePortfolioItem(id: $id)
|
|
1143
1220
|
}
|
|
1144
|
-
`,
|
|
1145
|
-
${
|
|
1221
|
+
`, qt = h`
|
|
1222
|
+
${W}
|
|
1146
1223
|
mutation TecPublishPortfolio {
|
|
1147
1224
|
tecPublishPortfolio {
|
|
1148
1225
|
...PortfolioFields
|
|
1149
1226
|
}
|
|
1150
1227
|
}
|
|
1151
|
-
`,
|
|
1152
|
-
${
|
|
1228
|
+
`, Jt = h`
|
|
1229
|
+
${W}
|
|
1153
1230
|
mutation TecUnpublishPortfolio {
|
|
1154
1231
|
tecUnpublishPortfolio {
|
|
1155
1232
|
...PortfolioFields
|
|
1156
1233
|
}
|
|
1157
1234
|
}
|
|
1158
|
-
`,
|
|
1159
|
-
onError:
|
|
1160
|
-
refetchQueries:
|
|
1161
|
-
}),
|
|
1162
|
-
onError:
|
|
1163
|
-
refetchQueries:
|
|
1164
|
-
}),
|
|
1165
|
-
onError:
|
|
1166
|
-
refetchQueries:
|
|
1167
|
-
}),
|
|
1168
|
-
onError:
|
|
1169
|
-
refetchQueries:
|
|
1170
|
-
}),
|
|
1235
|
+
`, Yt = () => p(Wt, { fetchPolicy: "cache-and-network" }), G = ["TecMyPortfolio"], Xt = () => f(Gt, {
|
|
1236
|
+
onError: z,
|
|
1237
|
+
refetchQueries: G
|
|
1238
|
+
}), Zt = () => f(Kt, {
|
|
1239
|
+
onError: z,
|
|
1240
|
+
refetchQueries: G
|
|
1241
|
+
}), Qt = () => f(qt, {
|
|
1242
|
+
onError: z,
|
|
1243
|
+
refetchQueries: G
|
|
1244
|
+
}), $t = () => f(Jt, {
|
|
1245
|
+
onError: z,
|
|
1246
|
+
refetchQueries: G
|
|
1247
|
+
}), K = h`
|
|
1171
1248
|
fragment SubmissionReviewFields on TecSubmissionReview {
|
|
1172
1249
|
id
|
|
1173
1250
|
submissionId
|
|
@@ -1186,64 +1263,70 @@ var Mt = f`
|
|
|
1186
1263
|
model
|
|
1187
1264
|
createdAt
|
|
1188
1265
|
}
|
|
1189
|
-
`,
|
|
1190
|
-
${
|
|
1266
|
+
`, en = h`
|
|
1267
|
+
${K}
|
|
1191
1268
|
query TecMySubmissionReview($submissionId: ID!) {
|
|
1192
1269
|
tecMySubmissionReview(submissionId: $submissionId) {
|
|
1193
1270
|
...SubmissionReviewFields
|
|
1194
1271
|
}
|
|
1195
1272
|
}
|
|
1196
|
-
`,
|
|
1197
|
-
${
|
|
1273
|
+
`, tn = h`
|
|
1274
|
+
${K}
|
|
1198
1275
|
mutation TecReviewSubmission($submissionId: ID!) {
|
|
1199
1276
|
tecReviewSubmission(submissionId: $submissionId) {
|
|
1200
1277
|
...SubmissionReviewFields
|
|
1201
1278
|
}
|
|
1202
1279
|
}
|
|
1203
|
-
`,
|
|
1280
|
+
`, nn = (e) => p(en, {
|
|
1204
1281
|
variables: { submissionId: e ?? "" },
|
|
1205
1282
|
skip: !e,
|
|
1206
1283
|
fetchPolicy: "cache-and-network"
|
|
1207
|
-
}),
|
|
1208
|
-
onError:
|
|
1284
|
+
}), rn = () => f(tn, {
|
|
1285
|
+
onError: z,
|
|
1209
1286
|
refetchQueries: ["TecMySubmissionReview"]
|
|
1210
1287
|
});
|
|
1211
|
-
function
|
|
1212
|
-
let [n, r] =
|
|
1288
|
+
function an(e = 24, t = 24) {
|
|
1289
|
+
let [n, r] = u(t);
|
|
1213
1290
|
return {
|
|
1214
1291
|
limit: n,
|
|
1215
1292
|
more: () => r((t) => t + e)
|
|
1216
1293
|
};
|
|
1217
1294
|
}
|
|
1218
|
-
var
|
|
1219
|
-
${
|
|
1220
|
-
${
|
|
1295
|
+
var q = h`
|
|
1296
|
+
${v}
|
|
1297
|
+
${_}
|
|
1221
1298
|
query TecLessonPlayer($lessonId: ID!, $courseId: ID!) {
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1299
|
+
tecCanonicalLesson(id: $lessonId) {
|
|
1300
|
+
id
|
|
1301
|
+
technospamLesson {
|
|
1302
|
+
...LessonFields
|
|
1303
|
+
file {
|
|
1304
|
+
id
|
|
1305
|
+
name
|
|
1306
|
+
mimeType
|
|
1307
|
+
downloadUrl
|
|
1308
|
+
}
|
|
1229
1309
|
}
|
|
1230
1310
|
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1311
|
+
tecCanonicalCourse(id: $courseId) {
|
|
1312
|
+
id
|
|
1313
|
+
technospamCourse {
|
|
1314
|
+
...CourseFields
|
|
1315
|
+
lessons {
|
|
1316
|
+
id
|
|
1317
|
+
courseId
|
|
1318
|
+
title
|
|
1319
|
+
kind
|
|
1320
|
+
position
|
|
1321
|
+
estimatedMinutes
|
|
1322
|
+
isPreview
|
|
1323
|
+
isLocked
|
|
1324
|
+
completedByMe
|
|
1325
|
+
}
|
|
1243
1326
|
}
|
|
1244
1327
|
}
|
|
1245
1328
|
}
|
|
1246
|
-
`,
|
|
1329
|
+
`, on = h`
|
|
1247
1330
|
query TecLessonQuizKey($lessonId: ID!) {
|
|
1248
1331
|
tecLessonQuizKey(lessonId: $lessonId) {
|
|
1249
1332
|
prompt
|
|
@@ -1252,16 +1335,16 @@ var X = f`
|
|
|
1252
1335
|
explanation
|
|
1253
1336
|
}
|
|
1254
1337
|
}
|
|
1255
|
-
`,
|
|
1256
|
-
${
|
|
1338
|
+
`, J = h`
|
|
1339
|
+
${y}
|
|
1257
1340
|
mutation TecCompleteLesson($lessonId: ID!) {
|
|
1258
1341
|
tecCompleteLesson(lessonId: $lessonId) {
|
|
1259
1342
|
...EnrollmentFields
|
|
1260
1343
|
nextLessonId
|
|
1261
1344
|
}
|
|
1262
1345
|
}
|
|
1263
|
-
`,
|
|
1264
|
-
${
|
|
1346
|
+
`, sn = h`
|
|
1347
|
+
${y}
|
|
1265
1348
|
mutation TecSubmitLessonQuiz($lessonId: ID!, $answers: [Int!]!) {
|
|
1266
1349
|
tecSubmitLessonQuiz(lessonId: $lessonId, answers: $answers) {
|
|
1267
1350
|
lessonId
|
|
@@ -1283,8 +1366,8 @@ var X = f`
|
|
|
1283
1366
|
}
|
|
1284
1367
|
}
|
|
1285
1368
|
}
|
|
1286
|
-
`,
|
|
1287
|
-
${
|
|
1369
|
+
`, cn = h`
|
|
1370
|
+
${y}
|
|
1288
1371
|
mutation TecRunLessonCode($input: TecRunLessonCodeInput!) {
|
|
1289
1372
|
tecRunLessonCode(input: $input) {
|
|
1290
1373
|
lessonId
|
|
@@ -1305,62 +1388,66 @@ var X = f`
|
|
|
1305
1388
|
}
|
|
1306
1389
|
}
|
|
1307
1390
|
}
|
|
1308
|
-
`,
|
|
1391
|
+
`, Y = (e) => ({
|
|
1392
|
+
tecLesson: e.tecCanonicalLesson ? s(e.tecCanonicalLesson) : null,
|
|
1393
|
+
tecCourse: e.tecCanonicalCourse ? a(e.tecCanonicalCourse) : null
|
|
1394
|
+
}), ln = (e, t) => N(p(q, {
|
|
1309
1395
|
variables: {
|
|
1310
1396
|
courseId: e,
|
|
1311
1397
|
lessonId: t
|
|
1312
1398
|
},
|
|
1313
1399
|
skip: !e || !t,
|
|
1314
1400
|
fetchPolicy: "cache-and-network"
|
|
1315
|
-
}),
|
|
1401
|
+
}), Y), un = (e, t = !1) => p(on, {
|
|
1316
1402
|
variables: { lessonId: e },
|
|
1317
1403
|
skip: t || !e,
|
|
1318
1404
|
fetchPolicy: "network-only"
|
|
1319
|
-
}),
|
|
1405
|
+
}), X = [
|
|
1320
1406
|
"TecLessonPlayer",
|
|
1321
1407
|
"TecCourse",
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
],
|
|
1325
|
-
onError:
|
|
1326
|
-
refetchQueries:
|
|
1327
|
-
}),
|
|
1328
|
-
onError:
|
|
1329
|
-
refetchQueries:
|
|
1330
|
-
}),
|
|
1331
|
-
async function
|
|
1408
|
+
B.myEnrollments,
|
|
1409
|
+
B.enrollments
|
|
1410
|
+
], dn = () => f(J, {
|
|
1411
|
+
onError: z,
|
|
1412
|
+
refetchQueries: X
|
|
1413
|
+
}), fn = () => f(sn, {
|
|
1414
|
+
onError: z,
|
|
1415
|
+
refetchQueries: X
|
|
1416
|
+
}), pn = () => f(cn, { onError: z });
|
|
1417
|
+
async function mn(e, t, n) {
|
|
1332
1418
|
try {
|
|
1333
|
-
|
|
1334
|
-
query:
|
|
1419
|
+
let r = await e.query({
|
|
1420
|
+
query: q,
|
|
1335
1421
|
variables: {
|
|
1336
1422
|
courseId: t,
|
|
1337
1423
|
lessonId: n
|
|
1338
1424
|
},
|
|
1339
1425
|
fetchPolicy: "network-only"
|
|
1340
|
-
})
|
|
1426
|
+
});
|
|
1427
|
+
return r.data ? Y(r.data) : null;
|
|
1341
1428
|
} catch {
|
|
1342
1429
|
return null;
|
|
1343
1430
|
}
|
|
1344
1431
|
}
|
|
1345
|
-
var
|
|
1346
|
-
function
|
|
1347
|
-
return !
|
|
1432
|
+
var hn = new Set(["NOT_FOUND", "BAD_USER_INPUT"]);
|
|
1433
|
+
function gn(e) {
|
|
1434
|
+
return !m.is(e) || e.errors.length === 0 ? !1 : e.errors.every((e) => {
|
|
1348
1435
|
let t = e.extensions?.code;
|
|
1349
|
-
return typeof t == "string" &&
|
|
1436
|
+
return typeof t == "string" && hn.has(t);
|
|
1350
1437
|
});
|
|
1351
1438
|
}
|
|
1352
|
-
async function
|
|
1439
|
+
async function _n(e, t) {
|
|
1353
1440
|
try {
|
|
1354
1441
|
return (await e.mutate({
|
|
1355
|
-
mutation:
|
|
1442
|
+
mutation: J,
|
|
1356
1443
|
variables: { lessonId: t },
|
|
1357
|
-
refetchQueries:
|
|
1444
|
+
refetchQueries: X
|
|
1358
1445
|
})).data?.tecCompleteLesson ? "sent" : "rejected";
|
|
1359
1446
|
} catch (e) {
|
|
1360
|
-
return
|
|
1447
|
+
return gn(e) ? "rejected" : "retry";
|
|
1361
1448
|
}
|
|
1362
1449
|
}
|
|
1363
|
-
var
|
|
1450
|
+
var vn = h`
|
|
1364
1451
|
query TecVerifyCertificates($serials: [String!]!) {
|
|
1365
1452
|
tecVerifyCertificates(serials: $serials) {
|
|
1366
1453
|
serial
|
|
@@ -1375,7 +1462,7 @@ var nn = f`
|
|
|
1375
1462
|
verifiedAt
|
|
1376
1463
|
}
|
|
1377
1464
|
}
|
|
1378
|
-
`,
|
|
1465
|
+
`, yn = h`
|
|
1379
1466
|
query TecExportXapiStatements($courseId: ID, $since: DateTime, $until: DateTime, $limit: Int) {
|
|
1380
1467
|
tecExportXapiStatements(courseId: $courseId, since: $since, until: $until, limit: $limit) {
|
|
1381
1468
|
statements
|
|
@@ -1385,13 +1472,13 @@ var nn = f`
|
|
|
1385
1472
|
version
|
|
1386
1473
|
}
|
|
1387
1474
|
}
|
|
1388
|
-
`,
|
|
1475
|
+
`, bn = (e) => p(vn, {
|
|
1389
1476
|
variables: { serials: e },
|
|
1390
1477
|
skip: e.length === 0,
|
|
1391
1478
|
fetchPolicy: "network-only"
|
|
1392
1479
|
});
|
|
1393
|
-
function
|
|
1394
|
-
let [n, r] =
|
|
1480
|
+
function xn() {
|
|
1481
|
+
let [n, r] = u(!1), [i, a] = u(null), [o] = ee(yn, { fetchPolicy: "network-only" });
|
|
1395
1482
|
return {
|
|
1396
1483
|
run: async (n, i = 5e3) => {
|
|
1397
1484
|
r(!0), a(null);
|
|
@@ -1428,7 +1515,139 @@ function on() {
|
|
|
1428
1515
|
error: i
|
|
1429
1516
|
};
|
|
1430
1517
|
}
|
|
1518
|
+
var Sn = "xapi-lrs", Z = "\n connectionId\n connectedBy\n connectedAt\n enabled\n state\n highWaterMark\n lastSyncAt\n lastSuccessAt\n lastError\n lastErrorAt\n consecutiveFailures\n nextAttemptAt\n statementsPushed\n lastPushedCount\n intervalMinutes\n", Q = h`
|
|
1519
|
+
query TecXapiLrsSync {
|
|
1520
|
+
tecXapiLrsSync {
|
|
1521
|
+
${Z}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
`, Cn = h`
|
|
1525
|
+
query TecLrsConnection($id: ID!) {
|
|
1526
|
+
getConnection(id: $id) {
|
|
1527
|
+
id
|
|
1528
|
+
name
|
|
1529
|
+
status
|
|
1530
|
+
config
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
`, wn = h`
|
|
1534
|
+
query TecXapiLrsProvider($key: String!) {
|
|
1535
|
+
getProviderByKey(key: $key) {
|
|
1536
|
+
id
|
|
1537
|
+
key
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
`, Tn = h`
|
|
1541
|
+
mutation TecCreateLrsConnection($input: CreateConnectionInput!) {
|
|
1542
|
+
createConnection(input: $input) {
|
|
1543
|
+
id
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
`, En = h`
|
|
1547
|
+
mutation TecAuthenticateLrsConnection($input: BasicAuthInput!) {
|
|
1548
|
+
authenticateWithBasicAuth(input: $input) {
|
|
1549
|
+
id
|
|
1550
|
+
status
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
`, Dn = h`
|
|
1554
|
+
mutation TecDeleteLrsConnection($id: ID!) {
|
|
1555
|
+
deleteConnection(id: $id)
|
|
1556
|
+
}
|
|
1557
|
+
`, On = h`
|
|
1558
|
+
mutation TecConnectXapiLrs($connectionId: ID!) {
|
|
1559
|
+
tecConnectXapiLrs(connectionId: $connectionId) {
|
|
1560
|
+
${Z}
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
`, $ = h`
|
|
1564
|
+
mutation TecDisconnectXapiLrs {
|
|
1565
|
+
tecDisconnectXapiLrs
|
|
1566
|
+
}
|
|
1567
|
+
`, kn = h`
|
|
1568
|
+
mutation TecSyncXapiLrsNow {
|
|
1569
|
+
tecSyncXapiLrsNow {
|
|
1570
|
+
${Z}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
`, An = () => p(Q, { fetchPolicy: "network-only" }), jn = (e) => p(Cn, {
|
|
1574
|
+
variables: { id: e ?? "" },
|
|
1575
|
+
skip: !e
|
|
1576
|
+
});
|
|
1577
|
+
function Mn() {
|
|
1578
|
+
let n = d(), [r, i] = u(null), [a] = f(On), [o] = f($), [s] = f(kn), c = () => n.refetchQueries({ include: [Q] }), l = async (e) => {
|
|
1579
|
+
try {
|
|
1580
|
+
return await n.mutate({
|
|
1581
|
+
mutation: Dn,
|
|
1582
|
+
variables: { id: e }
|
|
1583
|
+
}), !0;
|
|
1584
|
+
} catch {
|
|
1585
|
+
return !1;
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
return {
|
|
1589
|
+
connect: async (r) => {
|
|
1590
|
+
i("connect");
|
|
1591
|
+
let o = null;
|
|
1592
|
+
try {
|
|
1593
|
+
let t = (await n.query({
|
|
1594
|
+
query: wn,
|
|
1595
|
+
variables: { key: Sn },
|
|
1596
|
+
fetchPolicy: "network-only"
|
|
1597
|
+
})).data?.getProviderByKey?.id;
|
|
1598
|
+
if (!t) throw Error("The xAPI LRS integration is not available in this workspace.");
|
|
1599
|
+
if (o = (await n.mutate({
|
|
1600
|
+
mutation: Tn,
|
|
1601
|
+
variables: { input: {
|
|
1602
|
+
providerId: t,
|
|
1603
|
+
name: r.name,
|
|
1604
|
+
config: { baseUrl: r.endpoint }
|
|
1605
|
+
} }
|
|
1606
|
+
})).data?.createConnection.id ?? null, !o) throw Error("The LRS connection could not be created.");
|
|
1607
|
+
await n.mutate({
|
|
1608
|
+
mutation: En,
|
|
1609
|
+
variables: { input: {
|
|
1610
|
+
connectionId: o,
|
|
1611
|
+
username: r.key,
|
|
1612
|
+
password: r.secret
|
|
1613
|
+
} }
|
|
1614
|
+
});
|
|
1615
|
+
let i = (await a({ variables: { connectionId: o } })).data?.tecConnectXapiLrs ?? null;
|
|
1616
|
+
if (!i) throw Error("The LRS could not be connected.");
|
|
1617
|
+
return o = null, await c(), e.success("LRS connected", "New learner activity is sent automatically."), i;
|
|
1618
|
+
} catch (n) {
|
|
1619
|
+
return e.error("Couldn't connect the LRS", t(n)), null;
|
|
1620
|
+
} finally {
|
|
1621
|
+
o && !await l(o) && e.warning("The LRS secret is still stored", "Remove the unused xAPI LRS connection from Integrations to delete it."), i(null);
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1624
|
+
disconnect: async (n) => {
|
|
1625
|
+
i("disconnect");
|
|
1626
|
+
try {
|
|
1627
|
+
await o();
|
|
1628
|
+
let t = n ? await l(n) : !0;
|
|
1629
|
+
return await c(), t ? e.success("LRS disconnected", "The endpoint and its stored secret were removed.") : e.info("LRS disconnected", "Sync stopped. Remove the stored connection from Integrations to delete its secret."), !0;
|
|
1630
|
+
} catch (n) {
|
|
1631
|
+
return e.error("Couldn't disconnect the LRS", t(n)), !1;
|
|
1632
|
+
} finally {
|
|
1633
|
+
i(null);
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
syncNow: async () => {
|
|
1637
|
+
i("sync");
|
|
1638
|
+
try {
|
|
1639
|
+
let t = (await s()).data?.tecSyncXapiLrsNow ?? null;
|
|
1640
|
+
return await c(), t?.state === "FAILING" ? e.error("Sync failed", t.lastError ?? "The LRS did not accept the statements.") : t && e.success("Sync finished", `${t.lastPushedCount} statement${t.lastPushedCount === 1 ? "" : "s"} sent.`), t;
|
|
1641
|
+
} catch (n) {
|
|
1642
|
+
return e.error("Couldn't sync", t(n)), null;
|
|
1643
|
+
} finally {
|
|
1644
|
+
i(null);
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1647
|
+
busy: r
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1431
1650
|
//#endregion
|
|
1432
|
-
export {
|
|
1651
|
+
export { mn as fetchLessonForOffline, g as pageArg, _n as sendQueuedLessonCompletion, Xt as useAddPortfolioItem, Dt as useApproveMentor, bt as useArchiveCourse, Ut as useArchiveStudyPlan, ht as useBecomeMentor, pt as useBookSession, mt as useCancelSession, be as useCertificatesQuery, Ft as useCompleteHackathon, dn as useCompleteLesson, At as useCompleteSession, kt as useConfirmSession, ve as useCourseQuery, _e as useCoursesQuery, vt as useCreateCourse, Tt as useCreateHackathon, xt as useCreateLesson, Ct as useCreateProblem, lt as useEnroll, ye as useEnrollmentsQuery, Vt as useGenerateStudyPlan, jt as useGradeSubmission, Pe as useHackathonQuery, Ne as useHackathonsQuery, Mt as useIssueCertificate, ln as useLessonPlayerQuery, un as useLessonQuizKeyQuery, Ie as useLessonsQuery, jn as useLrsConnectionQuery, Ae as useMentorQuery, ke as useMentorsQuery, Se as useMyCertificatesQuery, xe as useMyEnrollmentsQuery, Yt as useMyPortfolioQuery, Bt as useMyStudyPlansQuery, nn as useMySubmissionReviewQuery, Et as useOpenRegistration, an as usePageLimit, we as useProblemQuery, Ce as useProblemsQuery, yt as usePublishCourse, Qt as usePublishPortfolio, wt as usePublishProblem, gt as useRegisterTeam, ft as useRegradeSubmission, Zt as useRemovePortfolioItem, rn as useReviewSubmission, pn as useRunLessonCode, dt as useRunSolution, Ot as useScoreTeam, Me as useSessionCostEstimate, je as useSessionsQuery, Oe as useSolvedProblemIds, Nt as useStartHackathon, Pt as useStartJudging, Te as useSubmissionsQuery, fn as useSubmitLessonQuiz, _t as useSubmitProject, ut as useSubmitSolution, Fe as useTeamsQuery, $t as useUnpublishPortfolio, St as useUpdateLesson, Ht as useUpdateStudyPlanStepStatus, bn as useVerifyCertificatesQuery, xn as useXapiExport, Mn as useXapiLrsActions, An as useXapiLrsSyncQuery };
|
|
1433
1652
|
|
|
1434
1653
|
//# sourceMappingURL=technospamApi.js.map
|