@instructure/athena-api-client 4.0.0 → 4.0.2

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 (102) hide show
  1. package/README.md +19 -0
  2. package/dist/apis/AdminApi.d.ts +14 -12
  3. package/dist/apis/AdminApi.js +14 -12
  4. package/dist/apis/ConceptDiagramsApi.d.ts +15 -1
  5. package/dist/apis/ConceptDiagramsApi.js +41 -0
  6. package/dist/apis/ConceptImagesApi.d.ts +15 -1
  7. package/dist/apis/ConceptImagesApi.js +41 -0
  8. package/dist/apis/StudyGuidesApi.d.ts +112 -0
  9. package/dist/apis/StudyGuidesApi.js +312 -0
  10. package/dist/apis/index.d.ts +1 -0
  11. package/dist/apis/index.js +1 -0
  12. package/dist/esm/apis/AdminApi.d.ts +14 -12
  13. package/dist/esm/apis/AdminApi.js +14 -12
  14. package/dist/esm/apis/ConceptDiagramsApi.d.ts +15 -1
  15. package/dist/esm/apis/ConceptDiagramsApi.js +42 -1
  16. package/dist/esm/apis/ConceptImagesApi.d.ts +15 -1
  17. package/dist/esm/apis/ConceptImagesApi.js +42 -1
  18. package/dist/esm/apis/StudyGuidesApi.d.ts +112 -0
  19. package/dist/esm/apis/StudyGuidesApi.js +308 -0
  20. package/dist/esm/apis/index.d.ts +1 -0
  21. package/dist/esm/apis/index.js +1 -0
  22. package/dist/esm/models/AdminConceptDiagram.d.ts +19 -1
  23. package/dist/esm/models/AdminConceptDiagram.js +12 -0
  24. package/dist/esm/models/AdminConceptDiagramDetail.d.ts +19 -1
  25. package/dist/esm/models/AdminConceptDiagramDetail.js +12 -0
  26. package/dist/esm/models/AdminConceptImage.d.ts +19 -1
  27. package/dist/esm/models/AdminConceptImage.js +12 -0
  28. package/dist/esm/models/AdminConceptImageDetail.d.ts +19 -1
  29. package/dist/esm/models/AdminConceptImageDetail.js +12 -0
  30. package/dist/esm/models/AdminShownConceptDiagram.d.ts +19 -1
  31. package/dist/esm/models/AdminShownConceptDiagram.js +12 -0
  32. package/dist/esm/models/AdminShownConceptImage.d.ts +19 -1
  33. package/dist/esm/models/AdminShownConceptImage.js +12 -0
  34. package/dist/esm/models/AssociateUserFileRequest.d.ts +1 -0
  35. package/dist/esm/models/AssociateUserFileRequest.js +2 -1
  36. package/dist/esm/models/ConceptMediaFlagResult.d.ts +32 -0
  37. package/dist/esm/models/ConceptMediaFlagResult.js +43 -0
  38. package/dist/esm/models/CreateStudyGuideQuizRequest.d.ts +46 -0
  39. package/dist/esm/models/CreateStudyGuideQuizRequest.js +50 -0
  40. package/dist/esm/models/CreateStudyGuideRequest.d.ts +74 -0
  41. package/dist/esm/models/CreateStudyGuideRequest.js +55 -0
  42. package/dist/esm/models/PaginatedStudyGuides.d.ts +39 -0
  43. package/dist/esm/models/PaginatedStudyGuides.js +48 -0
  44. package/dist/esm/models/RegenerateStudyGuideRequest.d.ts +38 -0
  45. package/dist/esm/models/RegenerateStudyGuideRequest.js +43 -0
  46. package/dist/esm/models/StudyGuide.d.ts +153 -0
  47. package/dist/esm/models/StudyGuide.js +127 -0
  48. package/dist/esm/models/StudyGuideConcept.d.ts +68 -0
  49. package/dist/esm/models/StudyGuideConcept.js +67 -0
  50. package/dist/esm/models/StudyGuideFile.d.ts +56 -0
  51. package/dist/esm/models/StudyGuideFile.js +59 -0
  52. package/dist/esm/models/StudyGuideListItem.d.ts +102 -0
  53. package/dist/esm/models/StudyGuideListItem.js +92 -0
  54. package/dist/esm/models/StudyGuideQuiz.d.ts +58 -0
  55. package/dist/esm/models/StudyGuideQuiz.js +62 -0
  56. package/dist/esm/models/StudyGuideSourceSummary.d.ts +56 -0
  57. package/dist/esm/models/StudyGuideSourceSummary.js +59 -0
  58. package/dist/esm/models/UserFileAssociation.d.ts +1 -0
  59. package/dist/esm/models/UserFileAssociation.js +2 -1
  60. package/dist/esm/models/index.d.ts +11 -0
  61. package/dist/esm/models/index.js +11 -0
  62. package/dist/models/AdminConceptDiagram.d.ts +19 -1
  63. package/dist/models/AdminConceptDiagram.js +12 -0
  64. package/dist/models/AdminConceptDiagramDetail.d.ts +19 -1
  65. package/dist/models/AdminConceptDiagramDetail.js +12 -0
  66. package/dist/models/AdminConceptImage.d.ts +19 -1
  67. package/dist/models/AdminConceptImage.js +12 -0
  68. package/dist/models/AdminConceptImageDetail.d.ts +19 -1
  69. package/dist/models/AdminConceptImageDetail.js +12 -0
  70. package/dist/models/AdminShownConceptDiagram.d.ts +19 -1
  71. package/dist/models/AdminShownConceptDiagram.js +12 -0
  72. package/dist/models/AdminShownConceptImage.d.ts +19 -1
  73. package/dist/models/AdminShownConceptImage.js +12 -0
  74. package/dist/models/AssociateUserFileRequest.d.ts +1 -0
  75. package/dist/models/AssociateUserFileRequest.js +2 -1
  76. package/dist/models/ConceptMediaFlagResult.d.ts +32 -0
  77. package/dist/models/ConceptMediaFlagResult.js +50 -0
  78. package/dist/models/CreateStudyGuideQuizRequest.d.ts +46 -0
  79. package/dist/models/CreateStudyGuideQuizRequest.js +58 -0
  80. package/dist/models/CreateStudyGuideRequest.d.ts +74 -0
  81. package/dist/models/CreateStudyGuideRequest.js +62 -0
  82. package/dist/models/PaginatedStudyGuides.d.ts +39 -0
  83. package/dist/models/PaginatedStudyGuides.js +55 -0
  84. package/dist/models/RegenerateStudyGuideRequest.d.ts +38 -0
  85. package/dist/models/RegenerateStudyGuideRequest.js +50 -0
  86. package/dist/models/StudyGuide.d.ts +153 -0
  87. package/dist/models/StudyGuide.js +135 -0
  88. package/dist/models/StudyGuideConcept.d.ts +68 -0
  89. package/dist/models/StudyGuideConcept.js +74 -0
  90. package/dist/models/StudyGuideFile.d.ts +56 -0
  91. package/dist/models/StudyGuideFile.js +66 -0
  92. package/dist/models/StudyGuideListItem.d.ts +102 -0
  93. package/dist/models/StudyGuideListItem.js +100 -0
  94. package/dist/models/StudyGuideQuiz.d.ts +58 -0
  95. package/dist/models/StudyGuideQuiz.js +70 -0
  96. package/dist/models/StudyGuideSourceSummary.d.ts +56 -0
  97. package/dist/models/StudyGuideSourceSummary.js +66 -0
  98. package/dist/models/UserFileAssociation.d.ts +1 -0
  99. package/dist/models/UserFileAssociation.js +2 -1
  100. package/dist/models/index.d.ts +11 -0
  101. package/dist/models/index.js +11 -0
  102. package/package.json +1 -1
package/README.md CHANGED
@@ -108,8 +108,10 @@ All URIs are relative to *http://localhost:3000*
108
108
  *ChatsApi* | [**resumeChatStream**](docs/ChatsApi.md#resumechatstream) | **GET** /api/v1/chat/{chatId}/stream | Resume a chat stream
109
109
  *ChatsApi* | [**sendChatMessage**](docs/ChatsApi.md#sendchatmessage) | **POST** /api/v1/chat | Send a message to a chat
110
110
  *ChatsApi* | [**updateChat**](docs/ChatsApi.md#updatechatoperation) | **PATCH** /api/v1/chats/{chatId} | Update a chat
111
+ *ConceptDiagramsApi* | [**flagConceptDiagram**](docs/ConceptDiagramsApi.md#flagconceptdiagram) | **POST** /api/v1/concept-diagrams/{diagramId}/flag | Flag a concept diagram so learners stop being shown it
111
112
  *ConceptDiagramsApi* | [**getMyConceptDiagram**](docs/ConceptDiagramsApi.md#getmyconceptdiagram) | **GET** /api/v1/concept-diagrams/{diagramId} | Get a concept diagram the user authored
112
113
  *ConceptDiagramsApi* | [**listMyConceptDiagrams**](docs/ConceptDiagramsApi.md#listmyconceptdiagrams) | **GET** /api/v1/concept-diagrams | List the concept diagrams the user authored
114
+ *ConceptImagesApi* | [**flagConceptImage**](docs/ConceptImagesApi.md#flagconceptimage) | **POST** /api/v1/concept-images/{imageId}/flag | Flag a concept image so learners stop being shown it
113
115
  *ConceptImagesApi* | [**listMyConceptImages**](docs/ConceptImagesApi.md#listmyconceptimages) | **GET** /api/v1/concept-images | List the concept images the user generated
114
116
  *DailyQuizApi* | [**createDailyQuiz**](docs/DailyQuizApi.md#createdailyquiz) | **POST** /api/v1/daily-quiz | Get or create today\'s daily quiz
115
117
  *DailyQuizApi* | [**getDailyQuiz**](docs/DailyQuizApi.md#getdailyquiz) | **GET** /api/v1/daily-quiz | Get today\'s daily quiz
@@ -161,6 +163,12 @@ All URIs are relative to *http://localhost:3000*
161
163
  *ServiceTokensApi* | [**updateServiceToken**](docs/ServiceTokensApi.md#updateservicetoken) | **PATCH** /api/v1/tokens/{id} | Update service token status
162
164
  *SharedQuizzesApi* | [**getSharedQuiz**](docs/SharedQuizzesApi.md#getsharedquiz) | **GET** /api/v1/shared-quizzes/{token} | Resolve a quiz share link
163
165
  *SharedQuizzesApi* | [**startSharedQuizSession**](docs/SharedQuizzesApi.md#startsharedquizsession) | **POST** /api/v1/shared-quizzes/{token}/sessions | Start or resume the caller\'s session on a shared quiz
166
+ *StudyGuidesApi* | [**createStudyGuide**](docs/StudyGuidesApi.md#createstudyguideoperation) | **POST** /api/v1/study-guides | Create a study guide and start generating it
167
+ *StudyGuidesApi* | [**createStudyGuideQuiz**](docs/StudyGuidesApi.md#createstudyguidequizoperation) | **POST** /api/v1/study-guides/{studyGuideId}/quizzes | Build a quiz or flashcard deck from a study guide
168
+ *StudyGuidesApi* | [**deleteStudyGuide**](docs/StudyGuidesApi.md#deletestudyguide) | **DELETE** /api/v1/study-guides/{studyGuideId} | Delete a study guide
169
+ *StudyGuidesApi* | [**getStudyGuide**](docs/StudyGuidesApi.md#getstudyguide) | **GET** /api/v1/study-guides/{studyGuideId} | Get a study guide with its concepts
170
+ *StudyGuidesApi* | [**listStudyGuides**](docs/StudyGuidesApi.md#liststudyguides) | **GET** /api/v1/study-guides | List the learner\'s study guides
171
+ *StudyGuidesApi* | [**regenerateStudyGuide**](docs/StudyGuidesApi.md#regeneratestudyguideoperation) | **POST** /api/v1/study-guides/{studyGuideId}/regenerate | Regenerate a study guide with more context
164
172
  *StudyObjectiveConceptsApi* | [**listStudyObjectiveConcepts**](docs/StudyObjectiveConceptsApi.md#liststudyobjectiveconcepts) | **GET** /api/v1/study-objective-concepts | List study-objective concept attachments
165
173
  *StudyObjectiveConceptsApi* | [**triggerStudyObjectiveConceptExtraction**](docs/StudyObjectiveConceptsApi.md#triggerstudyobjectiveconceptextractionoperation) | **POST** /api/v1/study-objective-concepts/extract | Trigger study-objective concept extraction
166
174
  *StudyObjectivesApi* | [**createObjectiveResource**](docs/StudyObjectivesApi.md#createobjectiveresource) | **POST** /api/v1/study-objectives/{studyObjectiveId}/resources | Attach a chat resource to a study objective
@@ -314,6 +322,7 @@ All URIs are relative to *http://localhost:3000*
314
322
  - [ConceptDiagramDetail](docs/ConceptDiagramDetail.md)
315
323
  - [ConceptDiagramGalleryItem](docs/ConceptDiagramGalleryItem.md)
316
324
  - [ConceptImageGalleryItem](docs/ConceptImageGalleryItem.md)
325
+ - [ConceptMediaFlagResult](docs/ConceptMediaFlagResult.md)
317
326
  - [CreateAccountRequest](docs/CreateAccountRequest.md)
318
327
  - [CreateChatRequest](docs/CreateChatRequest.md)
319
328
  - [CreateFeatureDto](docs/CreateFeatureDto.md)
@@ -323,6 +332,8 @@ All URIs are relative to *http://localhost:3000*
323
332
  - [CreateObjectiveResourceDto](docs/CreateObjectiveResourceDto.md)
324
333
  - [CreatePlanDto](docs/CreatePlanDto.md)
325
334
  - [CreatePracticeQuizRequest](docs/CreatePracticeQuizRequest.md)
335
+ - [CreateStudyGuideQuizRequest](docs/CreateStudyGuideQuizRequest.md)
336
+ - [CreateStudyGuideRequest](docs/CreateStudyGuideRequest.md)
326
337
  - [CreateStudyObjectiveDto](docs/CreateStudyObjectiveDto.md)
327
338
  - [CreateStudyObjectiveDtoCanvasDocumentsInner](docs/CreateStudyObjectiveDtoCanvasDocumentsInner.md)
328
339
  - [CreateStudyObjectiveDtoCanvasObject](docs/CreateStudyObjectiveDtoCanvasObject.md)
@@ -358,6 +369,7 @@ All URIs are relative to *http://localhost:3000*
358
369
  - [PaginatedQuizSessions](docs/PaginatedQuizSessions.md)
359
370
  - [PaginatedQuizzes](docs/PaginatedQuizzes.md)
360
371
  - [PaginatedResources](docs/PaginatedResources.md)
372
+ - [PaginatedStudyGuides](docs/PaginatedStudyGuides.md)
361
373
  - [PaginatedStudyObjectives](docs/PaginatedStudyObjectives.md)
362
374
  - [PaginatedTaxonomies](docs/PaginatedTaxonomies.md)
363
375
  - [PaginatedUserConcepts](docs/PaginatedUserConcepts.md)
@@ -379,6 +391,7 @@ All URIs are relative to *http://localhost:3000*
379
391
  - [QuizSharing](docs/QuizSharing.md)
380
392
  - [QuizWithQuestions](docs/QuizWithQuestions.md)
381
393
  - [RecordQuizQuestionViewRequest](docs/RecordQuizQuestionViewRequest.md)
394
+ - [RegenerateStudyGuideRequest](docs/RegenerateStudyGuideRequest.md)
382
395
  - [ResourceActivity](docs/ResourceActivity.md)
383
396
  - [ResourceChat](docs/ResourceChat.md)
384
397
  - [ResourceListItem](docs/ResourceListItem.md)
@@ -391,6 +404,12 @@ All URIs are relative to *http://localhost:3000*
391
404
  - [ScoreByTypeValue](docs/ScoreByTypeValue.md)
392
405
  - [ServiceToken](docs/ServiceToken.md)
393
406
  - [SharedQuiz](docs/SharedQuiz.md)
407
+ - [StudyGuide](docs/StudyGuide.md)
408
+ - [StudyGuideConcept](docs/StudyGuideConcept.md)
409
+ - [StudyGuideFile](docs/StudyGuideFile.md)
410
+ - [StudyGuideListItem](docs/StudyGuideListItem.md)
411
+ - [StudyGuideQuiz](docs/StudyGuideQuiz.md)
412
+ - [StudyGuideSourceSummary](docs/StudyGuideSourceSummary.md)
394
413
  - [StudyObjective](docs/StudyObjective.md)
395
414
  - [StudyObjectiveAccess](docs/StudyObjectiveAccess.md)
396
415
  - [StudyObjectiveCanvasDocument](docs/StudyObjectiveCanvasDocument.md)
@@ -381,22 +381,22 @@ export declare class AdminApi extends runtime.BaseAPI {
381
381
  */
382
382
  adminGetUsersActivityTotals(requestParameters: AdminGetUsersActivityTotalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminUserActivityTotals>>;
383
383
  /**
384
- * Keeps the diagram out of every learner read. Idempotent: an already hidden diagram keeps its original hide time and actor. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
384
+ * Keeps the diagram out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: a diagram an admin already hid keeps its original hide time and actor. A diagram hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
385
385
  * Hide a concept diagram from learners
386
386
  */
387
387
  adminHideConceptDiagramRaw(requestParameters: AdminHideConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptDiagramDetail>>;
388
388
  /**
389
- * Keeps the diagram out of every learner read. Idempotent: an already hidden diagram keeps its original hide time and actor. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
389
+ * Keeps the diagram out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: a diagram an admin already hid keeps its original hide time and actor. A diagram hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
390
390
  * Hide a concept diagram from learners
391
391
  */
392
392
  adminHideConceptDiagram(requestParameters: AdminHideConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptDiagramDetail>;
393
393
  /**
394
- * Keeps the image out of every learner read. Idempotent: an already hidden image keeps its original hide time and actor. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
394
+ * Keeps the image out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: an image an admin already hid keeps its original hide time and actor. An image hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
395
395
  * Hide a concept image from learners
396
396
  */
397
397
  adminHideConceptImageRaw(requestParameters: AdminHideConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptImageDetail>>;
398
398
  /**
399
- * Keeps the image out of every learner read. Idempotent: an already hidden image keeps its original hide time and actor. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
399
+ * Keeps the image out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: an image an admin already hid keeps its original hide time and actor. An image hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
400
400
  * Hide a concept image from learners
401
401
  */
402
402
  adminHideConceptImage(requestParameters: AdminHideConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
@@ -533,22 +533,22 @@ export declare class AdminApi extends runtime.BaseAPI {
533
533
  */
534
534
  adminResetUserLearningData(requestParameters: AdminResetUserLearningDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminResetLearningDataResponse>;
535
535
  /**
536
- * Clears the deletion and leaves the diagram hidden for review; show it to serve it to learners again. A diagram that is not deleted is unchanged.
536
+ * Clears the deletion and any approval and leaves the diagram hidden for review (a diagram already hidden keeps its hide); show it to serve it to learners again. A diagram that is not deleted is unchanged.
537
537
  * Restore a soft-deleted concept diagram
538
538
  */
539
539
  adminRestoreConceptDiagramRaw(requestParameters: AdminRestoreConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptDiagramDetail>>;
540
540
  /**
541
- * Clears the deletion and leaves the diagram hidden for review; show it to serve it to learners again. A diagram that is not deleted is unchanged.
541
+ * Clears the deletion and any approval and leaves the diagram hidden for review (a diagram already hidden keeps its hide); show it to serve it to learners again. A diagram that is not deleted is unchanged.
542
542
  * Restore a soft-deleted concept diagram
543
543
  */
544
544
  adminRestoreConceptDiagram(requestParameters: AdminRestoreConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptDiagramDetail>;
545
545
  /**
546
- * Clears the deletion and leaves the image hidden for review; show it to serve it to learners again. A image that is not deleted is unchanged.
546
+ * Clears the deletion and any approval and leaves the image hidden for review (an image already hidden keeps its hide); show it to serve it to learners again. An image that is not deleted is unchanged.
547
547
  * Restore a soft-deleted concept image
548
548
  */
549
549
  adminRestoreConceptImageRaw(requestParameters: AdminRestoreConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptImageDetail>>;
550
550
  /**
551
- * Clears the deletion and leaves the image hidden for review; show it to serve it to learners again. A image that is not deleted is unchanged.
551
+ * Clears the deletion and any approval and leaves the image hidden for review (an image already hidden keeps its hide); show it to serve it to learners again. An image that is not deleted is unchanged.
552
552
  * Restore a soft-deleted concept image
553
553
  */
554
554
  adminRestoreConceptImage(requestParameters: AdminRestoreConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
@@ -563,22 +563,22 @@ export declare class AdminApi extends runtime.BaseAPI {
563
563
  */
564
564
  adminSearchConcepts(requestParameters: AdminSearchConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminConceptSearchResult>>;
565
565
  /**
566
- * Clears the hide so learners can be served the diagram again. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
566
+ * Clears the hide so learners can be served the diagram again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved diagram. Showing a visible diagram approves it too. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
567
567
  * Show a hidden concept diagram to learners
568
568
  */
569
569
  adminShowConceptDiagramRaw(requestParameters: AdminShowConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminShownConceptDiagram>>;
570
570
  /**
571
- * Clears the hide so learners can be served the diagram again. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
571
+ * Clears the hide so learners can be served the diagram again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved diagram. Showing a visible diagram approves it too. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
572
572
  * Show a hidden concept diagram to learners
573
573
  */
574
574
  adminShowConceptDiagram(requestParameters: AdminShowConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminShownConceptDiagram>;
575
575
  /**
576
- * Clears the hide so learners can be served the image again. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
576
+ * Clears the hide so learners can be served the image again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved image. Showing a visible image approves it too. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
577
577
  * Show a hidden concept image to learners
578
578
  */
579
579
  adminShowConceptImageRaw(requestParameters: AdminShowConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminShownConceptImage>>;
580
580
  /**
581
- * Clears the hide so learners can be served the image again. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
581
+ * Clears the hide so learners can be served the image again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved image. Showing a visible image approves it too. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
582
582
  * Show a hidden concept image to learners
583
583
  */
584
584
  adminShowConceptImage(requestParameters: AdminShowConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminShownConceptImage>;
@@ -606,6 +606,7 @@ export declare const AdminListConceptDiagramsStateEnum: {
606
606
  readonly NotDeleted: "not_deleted";
607
607
  readonly Visible: "visible";
608
608
  readonly Hidden: "hidden";
609
+ readonly Flagged: "flagged";
609
610
  readonly Deleted: "deleted";
610
611
  readonly All: "all";
611
612
  };
@@ -625,6 +626,7 @@ export declare const AdminListConceptImagesStateEnum: {
625
626
  readonly NotDeleted: "not_deleted";
626
627
  readonly Visible: "visible";
627
628
  readonly Hidden: "hidden";
629
+ readonly Flagged: "flagged";
628
630
  readonly Deleted: "deleted";
629
631
  readonly All: "all";
630
632
  };
@@ -723,7 +723,7 @@ class AdminApi extends runtime.BaseAPI {
723
723
  });
724
724
  }
725
725
  /**
726
- * Keeps the diagram out of every learner read. Idempotent: an already hidden diagram keeps its original hide time and actor. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
726
+ * Keeps the diagram out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: a diagram an admin already hid keeps its original hide time and actor. A diagram hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
727
727
  * Hide a concept diagram from learners
728
728
  */
729
729
  adminHideConceptDiagramRaw(requestParameters, initOverrides) {
@@ -754,7 +754,7 @@ class AdminApi extends runtime.BaseAPI {
754
754
  });
755
755
  }
756
756
  /**
757
- * Keeps the diagram out of every learner read. Idempotent: an already hidden diagram keeps its original hide time and actor. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
757
+ * Keeps the diagram out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: a diagram an admin already hid keeps its original hide time and actor. A diagram hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
758
758
  * Hide a concept diagram from learners
759
759
  */
760
760
  adminHideConceptDiagram(requestParameters, initOverrides) {
@@ -764,7 +764,7 @@ class AdminApi extends runtime.BaseAPI {
764
764
  });
765
765
  }
766
766
  /**
767
- * Keeps the image out of every learner read. Idempotent: an already hidden image keeps its original hide time and actor. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
767
+ * Keeps the image out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: an image an admin already hid keeps its original hide time and actor. An image hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
768
768
  * Hide a concept image from learners
769
769
  */
770
770
  adminHideConceptImageRaw(requestParameters, initOverrides) {
@@ -795,7 +795,7 @@ class AdminApi extends runtime.BaseAPI {
795
795
  });
796
796
  }
797
797
  /**
798
- * Keeps the image out of every learner read. Idempotent: an already hidden image keeps its original hide time and actor. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
798
+ * Keeps the image out of every learner read and clears any approval (approvedAt), so a later show re-approves it. Idempotent: an image an admin already hid keeps its original hide time and actor. An image hidden by a learner flag becomes an admin hide (hiddenByFlag false, with this call\'s time and actor). Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
799
799
  * Hide a concept image from learners
800
800
  */
801
801
  adminHideConceptImage(requestParameters, initOverrides) {
@@ -1497,7 +1497,7 @@ class AdminApi extends runtime.BaseAPI {
1497
1497
  });
1498
1498
  }
1499
1499
  /**
1500
- * Clears the deletion and leaves the diagram hidden for review; show it to serve it to learners again. A diagram that is not deleted is unchanged.
1500
+ * Clears the deletion and any approval and leaves the diagram hidden for review (a diagram already hidden keeps its hide); show it to serve it to learners again. A diagram that is not deleted is unchanged.
1501
1501
  * Restore a soft-deleted concept diagram
1502
1502
  */
1503
1503
  adminRestoreConceptDiagramRaw(requestParameters, initOverrides) {
@@ -1528,7 +1528,7 @@ class AdminApi extends runtime.BaseAPI {
1528
1528
  });
1529
1529
  }
1530
1530
  /**
1531
- * Clears the deletion and leaves the diagram hidden for review; show it to serve it to learners again. A diagram that is not deleted is unchanged.
1531
+ * Clears the deletion and any approval and leaves the diagram hidden for review (a diagram already hidden keeps its hide); show it to serve it to learners again. A diagram that is not deleted is unchanged.
1532
1532
  * Restore a soft-deleted concept diagram
1533
1533
  */
1534
1534
  adminRestoreConceptDiagram(requestParameters, initOverrides) {
@@ -1538,7 +1538,7 @@ class AdminApi extends runtime.BaseAPI {
1538
1538
  });
1539
1539
  }
1540
1540
  /**
1541
- * Clears the deletion and leaves the image hidden for review; show it to serve it to learners again. A image that is not deleted is unchanged.
1541
+ * Clears the deletion and any approval and leaves the image hidden for review (an image already hidden keeps its hide); show it to serve it to learners again. An image that is not deleted is unchanged.
1542
1542
  * Restore a soft-deleted concept image
1543
1543
  */
1544
1544
  adminRestoreConceptImageRaw(requestParameters, initOverrides) {
@@ -1569,7 +1569,7 @@ class AdminApi extends runtime.BaseAPI {
1569
1569
  });
1570
1570
  }
1571
1571
  /**
1572
- * Clears the deletion and leaves the image hidden for review; show it to serve it to learners again. A image that is not deleted is unchanged.
1572
+ * Clears the deletion and any approval and leaves the image hidden for review (an image already hidden keeps its hide); show it to serve it to learners again. An image that is not deleted is unchanged.
1573
1573
  * Restore a soft-deleted concept image
1574
1574
  */
1575
1575
  adminRestoreConceptImage(requestParameters, initOverrides) {
@@ -1622,7 +1622,7 @@ class AdminApi extends runtime.BaseAPI {
1622
1622
  });
1623
1623
  }
1624
1624
  /**
1625
- * Clears the hide so learners can be served the diagram again. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
1625
+ * Clears the hide so learners can be served the diagram again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved diagram. Showing a visible diagram approves it too. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
1626
1626
  * Show a hidden concept diagram to learners
1627
1627
  */
1628
1628
  adminShowConceptDiagramRaw(requestParameters, initOverrides) {
@@ -1655,7 +1655,7 @@ class AdminApi extends runtime.BaseAPI {
1655
1655
  });
1656
1656
  }
1657
1657
  /**
1658
- * Clears the hide so learners can be served the diagram again. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
1658
+ * Clears the hide so learners can be served the diagram again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved diagram. Showing a visible diagram approves it too. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
1659
1659
  * Show a hidden concept diagram to learners
1660
1660
  */
1661
1661
  adminShowConceptDiagram(requestParameters, initOverrides) {
@@ -1665,7 +1665,7 @@ class AdminApi extends runtime.BaseAPI {
1665
1665
  });
1666
1666
  }
1667
1667
  /**
1668
- * Clears the hide so learners can be served the image again. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
1668
+ * Clears the hide so learners can be served the image again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved image. Showing a visible image approves it too. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
1669
1669
  * Show a hidden concept image to learners
1670
1670
  */
1671
1671
  adminShowConceptImageRaw(requestParameters, initOverrides) {
@@ -1698,7 +1698,7 @@ class AdminApi extends runtime.BaseAPI {
1698
1698
  });
1699
1699
  }
1700
1700
  /**
1701
- * Clears the hide so learners can be served the image again. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
1701
+ * Clears the hide so learners can be served the image again, and records the caller\'s approval (approvedAt, approvedBy): a learner flag never hides an approved image. Showing a visible image approves it too. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider and their approval cleared; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
1702
1702
  * Show a hidden concept image to learners
1703
1703
  */
1704
1704
  adminShowConceptImage(requestParameters, initOverrides) {
@@ -1799,6 +1799,7 @@ exports.AdminListConceptDiagramsStateEnum = {
1799
1799
  NotDeleted: 'not_deleted',
1800
1800
  Visible: 'visible',
1801
1801
  Hidden: 'hidden',
1802
+ Flagged: 'flagged',
1802
1803
  Deleted: 'deleted',
1803
1804
  All: 'all'
1804
1805
  };
@@ -1816,6 +1817,7 @@ exports.AdminListConceptImagesStateEnum = {
1816
1817
  NotDeleted: 'not_deleted',
1817
1818
  Visible: 'visible',
1818
1819
  Hidden: 'hidden',
1820
+ Flagged: 'flagged',
1819
1821
  Deleted: 'deleted',
1820
1822
  All: 'all'
1821
1823
  };
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ConceptDiagramDetail, PaginatedConceptDiagrams } from '../models/index';
13
+ import type { ConceptDiagramDetail, ConceptMediaFlagResult, PaginatedConceptDiagrams } from '../models/index';
14
+ export interface FlagConceptDiagramRequest {
15
+ xUserId: string;
16
+ diagramId: string;
17
+ }
14
18
  export interface GetMyConceptDiagramRequest {
15
19
  xUserId: string;
16
20
  diagramId: string;
@@ -24,6 +28,16 @@ export interface ListMyConceptDiagramsRequest {
24
28
  *
25
29
  */
26
30
  export declare class ConceptDiagramsApi extends runtime.BaseAPI {
31
+ /**
32
+ * Acts on a learner\'s thumbs-down on a shared concept diagram. A visible diagram that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any diagram id; the calling client is expected to check that the diagram was shown to this learner. Idempotent: a diagram that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved diagram stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
33
+ * Flag a concept diagram so learners stop being shown it
34
+ */
35
+ flagConceptDiagramRaw(requestParameters: FlagConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConceptMediaFlagResult>>;
36
+ /**
37
+ * Acts on a learner\'s thumbs-down on a shared concept diagram. A visible diagram that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any diagram id; the calling client is expected to check that the diagram was shown to this learner. Idempotent: a diagram that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved diagram stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
38
+ * Flag a concept diagram so learners stop being shown it
39
+ */
40
+ flagConceptDiagram(requestParameters: FlagConceptDiagramRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConceptMediaFlagResult>;
27
41
  /**
28
42
  * Returns one non-hidden diagram the authenticated user authored, including its assembled HTML document.
29
43
  * Get a concept diagram the user authored
@@ -29,6 +29,47 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class ConceptDiagramsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Acts on a learner\'s thumbs-down on a shared concept diagram. A visible diagram that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any diagram id; the calling client is expected to check that the diagram was shown to this learner. Idempotent: a diagram that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved diagram stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
34
+ * Flag a concept diagram so learners stop being shown it
35
+ */
36
+ flagConceptDiagramRaw(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 flagConceptDiagram().');
40
+ }
41
+ if (requestParameters['diagramId'] == null) {
42
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling flagConceptDiagram().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ if (requestParameters['xUserId'] != null) {
47
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
48
+ }
49
+ if (this.configuration && this.configuration.apiKey) {
50
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
51
+ }
52
+ let urlPath = `/api/v1/concept-diagrams/{diagramId}/flag`;
53
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
54
+ const response = yield this.request({
55
+ path: urlPath,
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ }, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConceptMediaFlagResultFromJSON)(jsonValue));
61
+ });
62
+ }
63
+ /**
64
+ * Acts on a learner\'s thumbs-down on a shared concept diagram. A visible diagram that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any diagram id; the calling client is expected to check that the diagram was shown to this learner. Idempotent: a diagram that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved diagram stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
65
+ * Flag a concept diagram so learners stop being shown it
66
+ */
67
+ flagConceptDiagram(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.flagConceptDiagramRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
32
73
  /**
33
74
  * Returns one non-hidden diagram the authenticated user authored, including its assembled HTML document.
34
75
  * Get a concept diagram the user authored
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { PaginatedConceptImages } from '../models/index';
13
+ import type { ConceptMediaFlagResult, PaginatedConceptImages } from '../models/index';
14
+ export interface FlagConceptImageRequest {
15
+ xUserId: string;
16
+ imageId: string;
17
+ }
14
18
  export interface ListMyConceptImagesRequest {
15
19
  xUserId: string;
16
20
  limit?: number;
@@ -20,6 +24,16 @@ export interface ListMyConceptImagesRequest {
20
24
  *
21
25
  */
22
26
  export declare class ConceptImagesApi extends runtime.BaseAPI {
27
+ /**
28
+ * Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
29
+ * Flag a concept image so learners stop being shown it
30
+ */
31
+ flagConceptImageRaw(requestParameters: FlagConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConceptMediaFlagResult>>;
32
+ /**
33
+ * Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
34
+ * Flag a concept image so learners stop being shown it
35
+ */
36
+ flagConceptImage(requestParameters: FlagConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConceptMediaFlagResult>;
23
37
  /**
24
38
  * Returns the non-hidden concept images the authenticated user generated in chat, newest first, each with a freshly signed read URL and the chat it came from. Images generated by other learners are never included, even when this user has been shown them.
25
39
  * List the concept images the user generated
@@ -29,6 +29,47 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class ConceptImagesApi extends runtime.BaseAPI {
32
+ /**
33
+ * Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
34
+ * Flag a concept image so learners stop being shown it
35
+ */
36
+ flagConceptImageRaw(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 flagConceptImage().');
40
+ }
41
+ if (requestParameters['imageId'] == null) {
42
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling flagConceptImage().');
43
+ }
44
+ const queryParameters = {};
45
+ const headerParameters = {};
46
+ if (requestParameters['xUserId'] != null) {
47
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
48
+ }
49
+ if (this.configuration && this.configuration.apiKey) {
50
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
51
+ }
52
+ let urlPath = `/api/v1/concept-images/{imageId}/flag`;
53
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
54
+ const response = yield this.request({
55
+ path: urlPath,
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ }, initOverrides);
60
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ConceptMediaFlagResultFromJSON)(jsonValue));
61
+ });
62
+ }
63
+ /**
64
+ * Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
65
+ * Flag a concept image so learners stop being shown it
66
+ */
67
+ flagConceptImage(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.flagConceptImageRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
32
73
  /**
33
74
  * Returns the non-hidden concept images the authenticated user generated in chat, newest first, each with a freshly signed read URL and the chat it came from. Images generated by other learners are never included, even when this user has been shown them.
34
75
  * List the concept images the user generated
@@ -0,0 +1,112 @@
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 { CreateStudyGuideQuizRequest, CreateStudyGuideRequest, PaginatedStudyGuides, RegenerateStudyGuideRequest, StudyGuide, StudyGuideQuiz } from '../models/index';
14
+ export interface CreateStudyGuideOperationRequest {
15
+ xUserId: string;
16
+ createStudyGuideRequest: CreateStudyGuideRequest;
17
+ xCanvasDomain?: string;
18
+ xCanvasToken?: string;
19
+ }
20
+ export interface CreateStudyGuideQuizOperationRequest {
21
+ xUserId: string;
22
+ studyGuideId: string;
23
+ createStudyGuideQuizRequest: CreateStudyGuideQuizRequest;
24
+ }
25
+ export interface DeleteStudyGuideRequest {
26
+ xUserId: string;
27
+ studyGuideId: string;
28
+ }
29
+ export interface GetStudyGuideRequest {
30
+ xUserId: string;
31
+ studyGuideId: string;
32
+ }
33
+ export interface ListStudyGuidesRequest {
34
+ xUserId: string;
35
+ limit?: number;
36
+ cursor?: string;
37
+ studySpaceId?: string;
38
+ studyObjectiveId?: string;
39
+ courseId?: string;
40
+ }
41
+ export interface RegenerateStudyGuideOperationRequest {
42
+ xUserId: string;
43
+ studyGuideId: string;
44
+ regenerateStudyGuideRequest: RegenerateStudyGuideRequest;
45
+ xCanvasDomain?: string;
46
+ xCanvasToken?: string;
47
+ }
48
+ /**
49
+ *
50
+ */
51
+ export declare class StudyGuidesApi extends runtime.BaseAPI {
52
+ /**
53
+ * Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
54
+ * Create a study guide and start generating it
55
+ */
56
+ createStudyGuideRaw(requestParameters: CreateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuide>>;
57
+ /**
58
+ * Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
59
+ * Create a study guide and start generating it
60
+ */
61
+ createStudyGuide(requestParameters: CreateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuide>;
62
+ /**
63
+ * Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
64
+ * Build a quiz or flashcard deck from a study guide
65
+ */
66
+ createStudyGuideQuizRaw(requestParameters: CreateStudyGuideQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuideQuiz>>;
67
+ /**
68
+ * Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
69
+ * Build a quiz or flashcard deck from a study guide
70
+ */
71
+ createStudyGuideQuiz(requestParameters: CreateStudyGuideQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuideQuiz>;
72
+ /**
73
+ * Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
74
+ * Delete a study guide
75
+ */
76
+ deleteStudyGuideRaw(requestParameters: DeleteStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
77
+ /**
78
+ * Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
79
+ * Delete a study guide
80
+ */
81
+ deleteStudyGuide(requestParameters: DeleteStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
82
+ /**
83
+ * Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
84
+ * Get a study guide with its concepts
85
+ */
86
+ getStudyGuideRaw(requestParameters: GetStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuide>>;
87
+ /**
88
+ * Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
89
+ * Get a study guide with its concepts
90
+ */
91
+ getStudyGuide(requestParameters: GetStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuide>;
92
+ /**
93
+ * Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
94
+ * List the learner\'s study guides
95
+ */
96
+ listStudyGuidesRaw(requestParameters: ListStudyGuidesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedStudyGuides>>;
97
+ /**
98
+ * Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
99
+ * List the learner\'s study guides
100
+ */
101
+ listStudyGuides(requestParameters: ListStudyGuidesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyGuides>;
102
+ /**
103
+ * Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
104
+ * Regenerate a study guide with more context
105
+ */
106
+ regenerateStudyGuideRaw(requestParameters: RegenerateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuide>>;
107
+ /**
108
+ * Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
109
+ * Regenerate a study guide with more context
110
+ */
111
+ regenerateStudyGuide(requestParameters: RegenerateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuide>;
112
+ }