@instructure/athena-api-client 3.39.3 → 3.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +28 -0
  2. package/dist/apis/AdminApi.d.ts +17 -1
  3. package/dist/apis/AdminApi.js +47 -0
  4. package/dist/apis/QuizzesApi.d.ts +30 -1
  5. package/dist/apis/QuizzesApi.js +87 -0
  6. package/dist/apis/ResourcesApi.d.ts +11 -2
  7. package/dist/apis/ResourcesApi.js +13 -3
  8. package/dist/apis/SharedQuizzesApi.d.ts +46 -0
  9. package/dist/apis/SharedQuizzesApi.js +115 -0
  10. package/dist/apis/StudyObjectivesApi.d.ts +2 -2
  11. package/dist/apis/StudyObjectivesApi.js +2 -2
  12. package/dist/apis/StudySpaceTemplatesApi.d.ts +61 -0
  13. package/dist/apis/StudySpaceTemplatesApi.js +162 -0
  14. package/dist/apis/index.d.ts +2 -0
  15. package/dist/apis/index.js +2 -0
  16. package/dist/esm/apis/AdminApi.d.ts +17 -1
  17. package/dist/esm/apis/AdminApi.js +48 -1
  18. package/dist/esm/apis/QuizzesApi.d.ts +30 -1
  19. package/dist/esm/apis/QuizzesApi.js +88 -1
  20. package/dist/esm/apis/ResourcesApi.d.ts +11 -2
  21. package/dist/esm/apis/ResourcesApi.js +12 -2
  22. package/dist/esm/apis/SharedQuizzesApi.d.ts +46 -0
  23. package/dist/esm/apis/SharedQuizzesApi.js +111 -0
  24. package/dist/esm/apis/StudyObjectivesApi.d.ts +2 -2
  25. package/dist/esm/apis/StudyObjectivesApi.js +2 -2
  26. package/dist/esm/apis/StudySpaceTemplatesApi.d.ts +61 -0
  27. package/dist/esm/apis/StudySpaceTemplatesApi.js +158 -0
  28. package/dist/esm/apis/index.d.ts +2 -0
  29. package/dist/esm/apis/index.js +2 -0
  30. package/dist/esm/models/AdminPaginatedQuizParticipantSessions.d.ts +39 -0
  31. package/dist/esm/models/AdminPaginatedQuizParticipantSessions.js +48 -0
  32. package/dist/esm/models/AdminQuizParticipantSessionListItem.d.ts +84 -0
  33. package/dist/esm/models/AdminQuizParticipantSessionListItem.js +80 -0
  34. package/dist/esm/models/AdminQuizParticipantSessionScore.d.ts +44 -0
  35. package/dist/esm/models/AdminQuizParticipantSessionScore.js +51 -0
  36. package/dist/esm/models/AdminStudyObjectiveListItem.d.ts +2 -1
  37. package/dist/esm/models/AdminStudyObjectiveListItem.js +2 -1
  38. package/dist/esm/models/CreateStudySpaceFromTemplateDto.d.ts +38 -0
  39. package/dist/esm/models/CreateStudySpaceFromTemplateDto.js +45 -0
  40. package/dist/esm/models/QuizSharing.d.ts +50 -0
  41. package/dist/esm/models/QuizSharing.js +55 -0
  42. package/dist/esm/models/ResourceListItem.d.ts +16 -3
  43. package/dist/esm/models/ResourceListItem.js +9 -0
  44. package/dist/esm/models/ResourceSharing.d.ts +44 -0
  45. package/dist/esm/models/ResourceSharing.js +51 -0
  46. package/dist/esm/models/ScheduleStudySpaceTemplateDto.d.ts +32 -0
  47. package/dist/esm/models/ScheduleStudySpaceTemplateDto.js +43 -0
  48. package/dist/esm/models/SharedQuiz.d.ts +97 -0
  49. package/dist/esm/models/SharedQuiz.js +90 -0
  50. package/dist/esm/models/StudyObjective.d.ts +8 -1
  51. package/dist/esm/models/StudyObjective.js +6 -1
  52. package/dist/esm/models/StudySpace.d.ts +12 -0
  53. package/dist/esm/models/StudySpace.js +8 -0
  54. package/dist/esm/models/StudySpaceFromTemplate.d.ts +40 -0
  55. package/dist/esm/models/StudySpaceFromTemplate.js +49 -0
  56. package/dist/esm/models/StudySpaceTemplate.d.ts +117 -0
  57. package/dist/esm/models/StudySpaceTemplate.js +102 -0
  58. package/dist/esm/models/StudySpaceTemplateAnchor.d.ts +44 -0
  59. package/dist/esm/models/StudySpaceTemplateAnchor.js +51 -0
  60. package/dist/esm/models/StudySpaceTemplateConfirm.d.ts +33 -0
  61. package/dist/esm/models/StudySpaceTemplateConfirm.js +44 -0
  62. package/dist/esm/models/StudySpaceTemplateLegal.d.ts +32 -0
  63. package/dist/esm/models/StudySpaceTemplateLegal.js +43 -0
  64. package/dist/esm/models/StudySpaceTemplateLink.d.ts +38 -0
  65. package/dist/esm/models/StudySpaceTemplateLink.js +47 -0
  66. package/dist/esm/models/StudySpaceTemplateNotice.d.ts +38 -0
  67. package/dist/esm/models/StudySpaceTemplateNotice.js +47 -0
  68. package/dist/esm/models/StudySpaceTemplateObjective.d.ts +52 -0
  69. package/dist/esm/models/StudySpaceTemplateObjective.js +58 -0
  70. package/dist/esm/models/StudySpaceTemplateProvenance.d.ts +32 -0
  71. package/dist/esm/models/StudySpaceTemplateProvenance.js +43 -0
  72. package/dist/esm/models/StudySpaceTemplateSchedule.d.ts +51 -0
  73. package/dist/esm/models/StudySpaceTemplateSchedule.js +57 -0
  74. package/dist/esm/models/StudySpaceTemplateScheduleItem.d.ts +50 -0
  75. package/dist/esm/models/StudySpaceTemplateScheduleItem.js +55 -0
  76. package/dist/esm/models/SyllabusAnalysisObjective.d.ts +1 -0
  77. package/dist/esm/models/SyllabusAnalysisObjective.js +2 -1
  78. package/dist/esm/models/TriggerStudyObjectiveConceptExtractionItemStatus.d.ts +2 -1
  79. package/dist/esm/models/TriggerStudyObjectiveConceptExtractionItemStatus.js +1 -0
  80. package/dist/esm/models/UpcomingStudyObjective.d.ts +8 -1
  81. package/dist/esm/models/UpcomingStudyObjective.js +6 -1
  82. package/dist/esm/models/UpdateQuizSharingRequest.d.ts +32 -0
  83. package/dist/esm/models/UpdateQuizSharingRequest.js +43 -0
  84. package/dist/esm/models/index.d.ts +20 -0
  85. package/dist/esm/models/index.js +20 -0
  86. package/dist/models/AdminPaginatedQuizParticipantSessions.d.ts +39 -0
  87. package/dist/models/AdminPaginatedQuizParticipantSessions.js +55 -0
  88. package/dist/models/AdminQuizParticipantSessionListItem.d.ts +84 -0
  89. package/dist/models/AdminQuizParticipantSessionListItem.js +88 -0
  90. package/dist/models/AdminQuizParticipantSessionScore.d.ts +44 -0
  91. package/dist/models/AdminQuizParticipantSessionScore.js +58 -0
  92. package/dist/models/AdminStudyObjectiveListItem.d.ts +2 -1
  93. package/dist/models/AdminStudyObjectiveListItem.js +2 -1
  94. package/dist/models/CreateStudySpaceFromTemplateDto.d.ts +38 -0
  95. package/dist/models/CreateStudySpaceFromTemplateDto.js +52 -0
  96. package/dist/models/QuizSharing.d.ts +50 -0
  97. package/dist/models/QuizSharing.js +62 -0
  98. package/dist/models/ResourceListItem.d.ts +16 -3
  99. package/dist/models/ResourceListItem.js +9 -0
  100. package/dist/models/ResourceSharing.d.ts +44 -0
  101. package/dist/models/ResourceSharing.js +58 -0
  102. package/dist/models/ScheduleStudySpaceTemplateDto.d.ts +32 -0
  103. package/dist/models/ScheduleStudySpaceTemplateDto.js +50 -0
  104. package/dist/models/SharedQuiz.d.ts +97 -0
  105. package/dist/models/SharedQuiz.js +98 -0
  106. package/dist/models/StudyObjective.d.ts +8 -1
  107. package/dist/models/StudyObjective.js +6 -1
  108. package/dist/models/StudySpace.d.ts +12 -0
  109. package/dist/models/StudySpace.js +8 -0
  110. package/dist/models/StudySpaceFromTemplate.d.ts +40 -0
  111. package/dist/models/StudySpaceFromTemplate.js +56 -0
  112. package/dist/models/StudySpaceTemplate.d.ts +117 -0
  113. package/dist/models/StudySpaceTemplate.js +109 -0
  114. package/dist/models/StudySpaceTemplateAnchor.d.ts +44 -0
  115. package/dist/models/StudySpaceTemplateAnchor.js +58 -0
  116. package/dist/models/StudySpaceTemplateConfirm.d.ts +33 -0
  117. package/dist/models/StudySpaceTemplateConfirm.js +51 -0
  118. package/dist/models/StudySpaceTemplateLegal.d.ts +32 -0
  119. package/dist/models/StudySpaceTemplateLegal.js +50 -0
  120. package/dist/models/StudySpaceTemplateLink.d.ts +38 -0
  121. package/dist/models/StudySpaceTemplateLink.js +54 -0
  122. package/dist/models/StudySpaceTemplateNotice.d.ts +38 -0
  123. package/dist/models/StudySpaceTemplateNotice.js +54 -0
  124. package/dist/models/StudySpaceTemplateObjective.d.ts +52 -0
  125. package/dist/models/StudySpaceTemplateObjective.js +66 -0
  126. package/dist/models/StudySpaceTemplateProvenance.d.ts +32 -0
  127. package/dist/models/StudySpaceTemplateProvenance.js +50 -0
  128. package/dist/models/StudySpaceTemplateSchedule.d.ts +51 -0
  129. package/dist/models/StudySpaceTemplateSchedule.js +65 -0
  130. package/dist/models/StudySpaceTemplateScheduleItem.d.ts +50 -0
  131. package/dist/models/StudySpaceTemplateScheduleItem.js +62 -0
  132. package/dist/models/SyllabusAnalysisObjective.d.ts +1 -0
  133. package/dist/models/SyllabusAnalysisObjective.js +2 -1
  134. package/dist/models/TriggerStudyObjectiveConceptExtractionItemStatus.d.ts +2 -1
  135. package/dist/models/TriggerStudyObjectiveConceptExtractionItemStatus.js +1 -0
  136. package/dist/models/UpcomingStudyObjective.d.ts +8 -1
  137. package/dist/models/UpcomingStudyObjective.js +6 -1
  138. package/dist/models/UpdateQuizSharingRequest.d.ts +32 -0
  139. package/dist/models/UpdateQuizSharingRequest.js +50 -0
  140. package/dist/models/index.d.ts +20 -0
  141. package/dist/models/index.js +20 -0
  142. package/package.json +1 -1
@@ -144,12 +144,12 @@ export declare class StudyObjectivesApi extends runtime.BaseAPI {
144
144
  */
145
145
  listStudyObjectives(requestParameters: ListStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyObjectives>;
146
146
  /**
147
- * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Both `source` values (`user` and `syllabus`) are returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
147
+ * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
148
148
  * List the learner\'s study objectives falling due soon
149
149
  */
150
150
  listUpcomingStudyObjectivesRaw(requestParameters: ListUpcomingStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpcomingStudyObjectives>>;
151
151
  /**
152
- * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Both `source` values (`user` and `syllabus`) are returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
152
+ * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
153
153
  * List the learner\'s study objectives falling due soon
154
154
  */
155
155
  listUpcomingStudyObjectives(requestParameters: ListUpcomingStudyObjectivesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpcomingStudyObjectives>;
@@ -389,7 +389,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
389
389
  });
390
390
  }
391
391
  /**
392
- * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Both `source` values (`user` and `syllabus`) are returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
392
+ * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
393
393
  * List the learner\'s study objectives falling due soon
394
394
  */
395
395
  listUpcomingStudyObjectivesRaw(requestParameters, initOverrides) {
@@ -422,7 +422,7 @@ class StudyObjectivesApi extends runtime.BaseAPI {
422
422
  });
423
423
  }
424
424
  /**
425
- * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Both `source` values (`user` and `syllabus`) are returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
425
+ * Returns the authenticated user\'s active study objectives whose due date falls inside a look-ahead window, soonest due first. This is the only study-objective read scoped to the user rather than to a course or a study space: it spans every study space the learner has, including spaces with no Canvas course (whose objectives carry a null `courseId` and are otherwise reachable only by knowing the space id), so a caller building date-aware outreach does not have to fan out per space and re-sort client-side. A row is included when it has a due date, that date is in the future, and it is no further out than `withinDays`. Overdue objectives are excluded — the window starts at the current time, not at the start of today — as are objectives with no due date and objectives the learner has archived. Every `source` value (`user`, `syllabus` and `template`) is returned; nothing here distinguishes an objective the learner typed from one derived from a syllabus or created from a template. Ordering is by due date ascending, then by id ascending, so objectives sharing a due date come back in a stable order across calls. Each item carries the full study-objective shape plus `studySpaceTitle`, the name of the space it belongs to, for copy that needs to name the course. There is no cursor: the window and `limit` bound the response, and a caller that needs more should widen `withinDays` rather than page.
426
426
  * List the learner\'s study objectives falling due soon
427
427
  */
428
428
  listUpcomingStudyObjectives(requestParameters, initOverrides) {
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Athena API
3
+ * REST API for the Athena system
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { CreateStudySpaceFromTemplateDto, ScheduleStudySpaceTemplateDto, StudySpaceFromTemplate, StudySpaceTemplate, StudySpaceTemplateScheduleItem } from '../models/index';
14
+ export interface CreateStudySpaceFromTemplateRequest {
15
+ xUserId: string;
16
+ slug: string;
17
+ createStudySpaceFromTemplateDto: CreateStudySpaceFromTemplateDto;
18
+ }
19
+ export interface ListStudySpaceTemplatesRequest {
20
+ xUserId: string;
21
+ }
22
+ export interface PreviewStudySpaceTemplateScheduleRequest {
23
+ xUserId: string;
24
+ slug: string;
25
+ scheduleStudySpaceTemplateDto: ScheduleStudySpaceTemplateDto;
26
+ }
27
+ /**
28
+ *
29
+ */
30
+ export declare class StudySpaceTemplatesApi extends runtime.BaseAPI {
31
+ /**
32
+ * Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
33
+ * Create a study space from a template
34
+ */
35
+ createStudySpaceFromTemplateRaw(requestParameters: CreateStudySpaceFromTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudySpaceFromTemplate>>;
36
+ /**
37
+ * Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
38
+ * Create a study space from a template
39
+ */
40
+ createStudySpaceFromTemplate(requestParameters: CreateStudySpaceFromTemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudySpaceFromTemplate>;
41
+ /**
42
+ * Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
43
+ * List the study space templates a learner can start from
44
+ */
45
+ listStudySpaceTemplatesRaw(requestParameters: ListStudySpaceTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpaceTemplate>>>;
46
+ /**
47
+ * Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
48
+ * List the study space templates a learner can start from
49
+ */
50
+ listStudySpaceTemplates(requestParameters: ListStudySpaceTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpaceTemplate>>;
51
+ /**
52
+ * Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
53
+ * Preview the objectives a template would create
54
+ */
55
+ previewStudySpaceTemplateScheduleRaw(requestParameters: PreviewStudySpaceTemplateScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StudySpaceTemplateScheduleItem>>>;
56
+ /**
57
+ * Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
58
+ * Preview the objectives a template would create
59
+ */
60
+ previewStudySpaceTemplateSchedule(requestParameters: PreviewStudySpaceTemplateScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StudySpaceTemplateScheduleItem>>;
61
+ }
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Athena API
6
+ * REST API for the Athena system
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.StudySpaceTemplatesApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class StudySpaceTemplatesApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
34
+ * Create a study space from a template
35
+ */
36
+ createStudySpaceFromTemplateRaw(requestParameters, initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['xUserId'] == null) {
39
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createStudySpaceFromTemplate().');
40
+ }
41
+ if (requestParameters['slug'] == null) {
42
+ throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling createStudySpaceFromTemplate().');
43
+ }
44
+ if (requestParameters['createStudySpaceFromTemplateDto'] == null) {
45
+ throw new runtime.RequiredError('createStudySpaceFromTemplateDto', 'Required parameter "createStudySpaceFromTemplateDto" was null or undefined when calling createStudySpaceFromTemplate().');
46
+ }
47
+ const queryParameters = {};
48
+ const headerParameters = {};
49
+ headerParameters['Content-Type'] = 'application/json';
50
+ if (requestParameters['xUserId'] != null) {
51
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
52
+ }
53
+ if (this.configuration && this.configuration.apiKey) {
54
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
55
+ }
56
+ let urlPath = `/api/v1/study-space-templates/{slug}/spaces`;
57
+ urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
58
+ const response = yield this.request({
59
+ path: urlPath,
60
+ method: 'POST',
61
+ headers: headerParameters,
62
+ query: queryParameters,
63
+ body: (0, index_1.CreateStudySpaceFromTemplateDtoToJSON)(requestParameters['createStudySpaceFromTemplateDto']),
64
+ }, initOverrides);
65
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.StudySpaceFromTemplateFromJSON)(jsonValue));
66
+ });
67
+ }
68
+ /**
69
+ * Creates a course-less study space for the authenticated user holding the template\'s objectives, scheduled as the preview describes, each with the template\'s concepts already attached — nothing is extracted. The objectives are the learner\'s own from then on: editable and archivable like any they typed. Everything is written in one transaction. `name` defaults to the template\'s title.
70
+ * Create a study space from a template
71
+ */
72
+ createStudySpaceFromTemplate(requestParameters, initOverrides) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const response = yield this.createStudySpaceFromTemplateRaw(requestParameters, initOverrides);
75
+ return yield response.value();
76
+ });
77
+ }
78
+ /**
79
+ * Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
80
+ * List the study space templates a learner can start from
81
+ */
82
+ listStudySpaceTemplatesRaw(requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ if (requestParameters['xUserId'] == null) {
85
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudySpaceTemplates().');
86
+ }
87
+ const queryParameters = {};
88
+ const headerParameters = {};
89
+ if (requestParameters['xUserId'] != null) {
90
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
91
+ }
92
+ if (this.configuration && this.configuration.apiKey) {
93
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
94
+ }
95
+ let urlPath = `/api/v1/study-space-templates`;
96
+ const response = yield this.request({
97
+ path: urlPath,
98
+ method: 'GET',
99
+ headers: headerParameters,
100
+ query: queryParameters,
101
+ }, initOverrides);
102
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.StudySpaceTemplateFromJSON));
103
+ });
104
+ }
105
+ /**
106
+ * Returns every bundled template with what a client needs to offer it and to ask where the learner is in the course: its units in order, its anchor date, notices to show before confirming, and the caller\'s newest space already created from it (`existingSpaceId`, or null). Creating another is still allowed.
107
+ * List the study space templates a learner can start from
108
+ */
109
+ listStudySpaceTemplates(requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const response = yield this.listStudySpaceTemplatesRaw(requestParameters, initOverrides);
112
+ return yield response.value();
113
+ });
114
+ }
115
+ /**
116
+ * Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
117
+ * Preview the objectives a template would create
118
+ */
119
+ previewStudySpaceTemplateScheduleRaw(requestParameters, initOverrides) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ if (requestParameters['xUserId'] == null) {
122
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling previewStudySpaceTemplateSchedule().');
123
+ }
124
+ if (requestParameters['slug'] == null) {
125
+ throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling previewStudySpaceTemplateSchedule().');
126
+ }
127
+ if (requestParameters['scheduleStudySpaceTemplateDto'] == null) {
128
+ throw new runtime.RequiredError('scheduleStudySpaceTemplateDto', 'Required parameter "scheduleStudySpaceTemplateDto" was null or undefined when calling previewStudySpaceTemplateSchedule().');
129
+ }
130
+ const queryParameters = {};
131
+ const headerParameters = {};
132
+ headerParameters['Content-Type'] = 'application/json';
133
+ if (requestParameters['xUserId'] != null) {
134
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
135
+ }
136
+ if (this.configuration && this.configuration.apiKey) {
137
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
138
+ }
139
+ let urlPath = `/api/v1/study-space-templates/{slug}/schedule-preview`;
140
+ urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
141
+ const response = yield this.request({
142
+ path: urlPath,
143
+ method: 'POST',
144
+ headers: headerParameters,
145
+ query: queryParameters,
146
+ body: (0, index_1.ScheduleStudySpaceTemplateDtoToJSON)(requestParameters['scheduleStudySpaceTemplateDto']),
147
+ }, initOverrides);
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.StudySpaceTemplateScheduleItemFromJSON));
149
+ });
150
+ }
151
+ /**
152
+ * Computes, without writing anything, the objectives and due dates `createStudySpaceFromTemplate` would create right now for the learner\'s timezone: units still to learn spread up to the review window, covered units as review, then the anchor. `startIndex` is the index of the first unit the learner hasn\'t covered; null means every unit is covered (review only).
153
+ * Preview the objectives a template would create
154
+ */
155
+ previewStudySpaceTemplateSchedule(requestParameters, initOverrides) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const response = yield this.previewStudySpaceTemplateScheduleRaw(requestParameters, initOverrides);
158
+ return yield response.value();
159
+ });
160
+ }
161
+ }
162
+ exports.StudySpaceTemplatesApi = StudySpaceTemplatesApi;
@@ -20,10 +20,12 @@ export * from './QuizSessionsApi';
20
20
  export * from './QuizzesApi';
21
21
  export * from './ResourcesApi';
22
22
  export * from './ServiceTokensApi';
23
+ export * from './SharedQuizzesApi';
23
24
  export * from './StudyObjectiveConceptsApi';
24
25
  export * from './StudyObjectivesApi';
25
26
  export * from './StudyPlansApi';
26
27
  export * from './StudyPrepApi';
28
+ export * from './StudySpaceTemplatesApi';
27
29
  export * from './StudySpacesApi';
28
30
  export * from './SyllabusAnalysisApi';
29
31
  export * from './TagsApi';
@@ -38,10 +38,12 @@ __exportStar(require("./QuizSessionsApi"), exports);
38
38
  __exportStar(require("./QuizzesApi"), exports);
39
39
  __exportStar(require("./ResourcesApi"), exports);
40
40
  __exportStar(require("./ServiceTokensApi"), exports);
41
+ __exportStar(require("./SharedQuizzesApi"), exports);
41
42
  __exportStar(require("./StudyObjectiveConceptsApi"), exports);
42
43
  __exportStar(require("./StudyObjectivesApi"), exports);
43
44
  __exportStar(require("./StudyPlansApi"), exports);
44
45
  __exportStar(require("./StudyPrepApi"), exports);
46
+ __exportStar(require("./StudySpaceTemplatesApi"), exports);
45
47
  __exportStar(require("./StudySpacesApi"), exports);
46
48
  __exportStar(require("./SyllabusAnalysisApi"), exports);
47
49
  __exportStar(require("./TagsApi"), exports);
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminChat, AdminChatAnalysis, AdminChatCanvasUsage, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedLastExchanges, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminResetLearningDataResponse, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatCanvasUsage, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedLastExchanges, AdminPaginatedQuizParticipantSessions, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminResetLearningDataResponse, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminGetChatRequest {
15
15
  xUserId: string;
16
16
  chatId: string;
@@ -72,6 +72,12 @@ export interface AdminListLastExchangesRequest {
72
72
  maxUserMessages?: number;
73
73
  inactiveDays?: number;
74
74
  }
75
+ export interface AdminListQuizParticipantSessionsRequest {
76
+ xUserId: string;
77
+ quizId: string;
78
+ limit?: number;
79
+ cursor?: string;
80
+ }
75
81
  export interface AdminListQuizSessionsRequest {
76
82
  xUserId: string;
77
83
  limit?: number;
@@ -239,6 +245,16 @@ export declare class AdminApi extends runtime.BaseAPI {
239
245
  * List the final user message and assistant reply for low-engagement new users
240
246
  */
241
247
  adminListLastExchanges(requestParameters: AdminListLastExchangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedLastExchanges>;
248
+ /**
249
+ * Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
250
+ * List every learner\'s sessions on a quiz within the account
251
+ */
252
+ adminListQuizParticipantSessionsRaw(requestParameters: AdminListQuizParticipantSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPaginatedQuizParticipantSessions>>;
253
+ /**
254
+ * Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
255
+ * List every learner\'s sessions on a quiz within the account
256
+ */
257
+ adminListQuizParticipantSessions(requestParameters: AdminListQuizParticipantSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedQuizParticipantSessions>;
242
258
  /**
243
259
  * Returns a paginated list of quiz sessions belonging to users within the caller\'s account, ordered by start date (newest first), with embedded quiz info, the owning user\'s external id, and a score summary (including the number of questions answered). Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Questions and responses are not included; fetch them per session via the summary endpoint. Like the summary endpoint, this is not gated on the `enhanced-quizzing` feature flag.
244
260
  * List recent quiz sessions across all account users
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminResetLearningDataResponseFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
24
+ import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizParticipantSessionsFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminResetLearningDataResponseFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -576,6 +576,53 @@ export class AdminApi extends runtime.BaseAPI {
576
576
  return yield response.value();
577
577
  });
578
578
  }
579
+ /**
580
+ * Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
581
+ * List every learner\'s sessions on a quiz within the account
582
+ */
583
+ adminListQuizParticipantSessionsRaw(requestParameters, initOverrides) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ if (requestParameters['xUserId'] == null) {
586
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListQuizParticipantSessions().');
587
+ }
588
+ if (requestParameters['quizId'] == null) {
589
+ throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling adminListQuizParticipantSessions().');
590
+ }
591
+ const queryParameters = {};
592
+ if (requestParameters['limit'] != null) {
593
+ queryParameters['limit'] = requestParameters['limit'];
594
+ }
595
+ if (requestParameters['cursor'] != null) {
596
+ queryParameters['cursor'] = requestParameters['cursor'];
597
+ }
598
+ const headerParameters = {};
599
+ if (requestParameters['xUserId'] != null) {
600
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
601
+ }
602
+ if (this.configuration && this.configuration.apiKey) {
603
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
604
+ }
605
+ let urlPath = `/api/v1/admin/quizzes/{quizId}/sessions`;
606
+ urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
607
+ const response = yield this.request({
608
+ path: urlPath,
609
+ method: 'GET',
610
+ headers: headerParameters,
611
+ query: queryParameters,
612
+ }, initOverrides);
613
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedQuizParticipantSessionsFromJSON(jsonValue));
614
+ });
615
+ }
616
+ /**
617
+ * Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
618
+ * List every learner\'s sessions on a quiz within the account
619
+ */
620
+ adminListQuizParticipantSessions(requestParameters, initOverrides) {
621
+ return __awaiter(this, void 0, void 0, function* () {
622
+ const response = yield this.adminListQuizParticipantSessionsRaw(requestParameters, initOverrides);
623
+ return yield response.value();
624
+ });
625
+ }
579
626
  /**
580
627
  * Returns a paginated list of quiz sessions belonging to users within the caller\'s account, ordered by start date (newest first), with embedded quiz info, the owning user\'s external id, and a score summary (including the number of questions answered). Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Questions and responses are not included; fetch them per session via the summary endpoint. Like the summary endpoint, this is not gated on the `enhanced-quizzing` feature flag.
581
628
  * List recent quiz sessions across all account users
@@ -10,17 +10,26 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { PaginatedQuizzes, QuizWithQuestions } from '../models/index';
13
+ import type { PaginatedQuizzes, QuizSharing, QuizWithQuestions, UpdateQuizSharingRequest } from '../models/index';
14
14
  export interface GetQuizRequest {
15
15
  quizId: string;
16
16
  xUserId: string;
17
17
  }
18
+ export interface GetQuizSharingRequest {
19
+ quizId: string;
20
+ xUserId: string;
21
+ }
18
22
  export interface ListQuizzesRequest {
19
23
  xUserId: string;
20
24
  limit?: number;
21
25
  cursor?: string;
22
26
  mode?: ListQuizzesModeEnum;
23
27
  }
28
+ export interface UpdateQuizSharingOperationRequest {
29
+ quizId: string;
30
+ xUserId: string;
31
+ updateQuizSharingRequest: UpdateQuizSharingRequest;
32
+ }
24
33
  /**
25
34
  *
26
35
  */
@@ -35,6 +44,16 @@ export declare class QuizzesApi extends runtime.BaseAPI {
35
44
  * Get quiz with questions
36
45
  */
37
46
  getQuiz(requestParameters: GetQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizWithQuestions>;
47
+ /**
48
+ * Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
49
+ * Get a quiz\'s sharing state
50
+ */
51
+ getQuizSharingRaw(requestParameters: GetQuizSharingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSharing>>;
52
+ /**
53
+ * Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
54
+ * Get a quiz\'s sharing state
55
+ */
56
+ getQuizSharing(requestParameters: GetQuizSharingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSharing>;
38
57
  /**
39
58
  * Returns a paginated list of quizzes owned by the authenticated user, ordered by creation date (newest first).
40
59
  * List user quizzes
@@ -45,6 +64,16 @@ export declare class QuizzesApi extends runtime.BaseAPI {
45
64
  * List user quizzes
46
65
  */
47
66
  listQuizzes(requestParameters: ListQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedQuizzes>;
67
+ /**
68
+ * Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
69
+ * Turn link sharing on or off for a quiz
70
+ */
71
+ updateQuizSharingRaw(requestParameters: UpdateQuizSharingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSharing>>;
72
+ /**
73
+ * Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
74
+ * Turn link sharing on or off for a quiz
75
+ */
76
+ updateQuizSharing(requestParameters: UpdateQuizSharingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSharing>;
48
77
  }
49
78
  /**
50
79
  * @export
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { PaginatedQuizzesFromJSON, QuizWithQuestionsFromJSON, } from '../models/index';
24
+ import { PaginatedQuizzesFromJSON, QuizSharingFromJSON, QuizWithQuestionsFromJSON, UpdateQuizSharingRequestToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -67,6 +67,47 @@ export class QuizzesApi extends runtime.BaseAPI {
67
67
  return yield response.value();
68
68
  });
69
69
  }
70
+ /**
71
+ * Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
72
+ * Get a quiz\'s sharing state
73
+ */
74
+ getQuizSharingRaw(requestParameters, initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ if (requestParameters['quizId'] == null) {
77
+ throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling getQuizSharing().');
78
+ }
79
+ if (requestParameters['xUserId'] == null) {
80
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getQuizSharing().');
81
+ }
82
+ const queryParameters = {};
83
+ const headerParameters = {};
84
+ if (requestParameters['xUserId'] != null) {
85
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
86
+ }
87
+ if (this.configuration && this.configuration.apiKey) {
88
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
89
+ }
90
+ let urlPath = `/api/v1/quizzes/{quizId}/sharing`;
91
+ urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
92
+ const response = yield this.request({
93
+ path: urlPath,
94
+ method: 'GET',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ }, initOverrides);
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuizSharingFromJSON(jsonValue));
99
+ });
100
+ }
101
+ /**
102
+ * Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
103
+ * Get a quiz\'s sharing state
104
+ */
105
+ getQuizSharing(requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const response = yield this.getQuizSharingRaw(requestParameters, initOverrides);
108
+ return yield response.value();
109
+ });
110
+ }
70
111
  /**
71
112
  * Returns a paginated list of quizzes owned by the authenticated user, ordered by creation date (newest first).
72
113
  * List user quizzes
@@ -113,6 +154,52 @@ export class QuizzesApi extends runtime.BaseAPI {
113
154
  return yield response.value();
114
155
  });
115
156
  }
157
+ /**
158
+ * Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
159
+ * Turn link sharing on or off for a quiz
160
+ */
161
+ updateQuizSharingRaw(requestParameters, initOverrides) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ if (requestParameters['quizId'] == null) {
164
+ throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling updateQuizSharing().');
165
+ }
166
+ if (requestParameters['xUserId'] == null) {
167
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling updateQuizSharing().');
168
+ }
169
+ if (requestParameters['updateQuizSharingRequest'] == null) {
170
+ throw new runtime.RequiredError('updateQuizSharingRequest', 'Required parameter "updateQuizSharingRequest" was null or undefined when calling updateQuizSharing().');
171
+ }
172
+ const queryParameters = {};
173
+ const headerParameters = {};
174
+ headerParameters['Content-Type'] = 'application/json';
175
+ if (requestParameters['xUserId'] != null) {
176
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
177
+ }
178
+ if (this.configuration && this.configuration.apiKey) {
179
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
180
+ }
181
+ let urlPath = `/api/v1/quizzes/{quizId}/sharing`;
182
+ urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
183
+ const response = yield this.request({
184
+ path: urlPath,
185
+ method: 'PATCH',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ body: UpdateQuizSharingRequestToJSON(requestParameters['updateQuizSharingRequest']),
189
+ }, initOverrides);
190
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuizSharingFromJSON(jsonValue));
191
+ });
192
+ }
193
+ /**
194
+ * Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
195
+ * Turn link sharing on or off for a quiz
196
+ */
197
+ updateQuizSharing(requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ const response = yield this.updateQuizSharingRaw(requestParameters, initOverrides);
200
+ return yield response.value();
201
+ });
202
+ }
116
203
  }
117
204
  /**
118
205
  * @export
@@ -16,6 +16,7 @@ export interface ListResourcesRequest {
16
16
  limit?: number;
17
17
  cursor?: string;
18
18
  type?: ListResourcesTypeEnum;
19
+ ownership?: ListResourcesOwnershipEnum;
19
20
  courseId?: string;
20
21
  chatId?: string;
21
22
  studySpaceId?: string;
@@ -26,12 +27,12 @@ export interface ListResourcesRequest {
26
27
  */
27
28
  export declare class ResourcesApi extends runtime.BaseAPI {
28
29
  /**
29
- * Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request.
30
+ * Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request. By default lists what the user generated; `ownership=shared` lists other learners\' resources the user has opened through a share link, with the owner\'s chat, objective, space, and course withheld.
30
31
  * List the user\'s generated study resources
31
32
  */
32
33
  listResourcesRaw(requestParameters: ListResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResources>>;
33
34
  /**
34
- * Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request.
35
+ * Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request. By default lists what the user generated; `ownership=shared` lists other learners\' resources the user has opened through a share link, with the owner\'s chat, objective, space, and course withheld.
35
36
  * List the user\'s generated study resources
36
37
  */
37
38
  listResources(requestParameters: ListResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResources>;
@@ -44,6 +45,14 @@ export declare const ListResourcesTypeEnum: {
44
45
  readonly Flashcards: "flashcards";
45
46
  };
46
47
  export type ListResourcesTypeEnum = typeof ListResourcesTypeEnum[keyof typeof ListResourcesTypeEnum];
48
+ /**
49
+ * @export
50
+ */
51
+ export declare const ListResourcesOwnershipEnum: {
52
+ readonly Owned: "owned";
53
+ readonly Shared: "shared";
54
+ };
55
+ export type ListResourcesOwnershipEnum = typeof ListResourcesOwnershipEnum[keyof typeof ListResourcesOwnershipEnum];
47
56
  /**
48
57
  * @export
49
58
  */