@instructure/athena-api-client 3.47.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,14 +59,15 @@ All URIs are relative to *http://localhost:3000*
59
59
  *AccountsApi* | [**updateAccount**](docs/AccountsApi.md#updateaccount) | **PATCH** /api/v1/accounts/{id} | Update an account
60
60
  *AdminApi* | [**adminDeleteConceptDiagram**](docs/AdminApi.md#admindeleteconceptdiagram) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/delete | Soft-delete a concept diagram
61
61
  *AdminApi* | [**adminDeleteConceptImage**](docs/AdminApi.md#admindeleteconceptimage) | **POST** /api/v1/admin/concept-images/{imageId}/delete | Soft-delete a concept image
62
- *AdminApi* | [**adminGenerateConceptDiagram**](docs/AdminApi.md#admingenerateconceptdiagramoperation) | **POST** /api/v1/admin/concept-diagrams | Generate a hidden draft diagram for a concept
63
- *AdminApi* | [**adminGenerateConceptImage**](docs/AdminApi.md#admingenerateconceptimageoperation) | **POST** /api/v1/admin/concept-images | Generate a hidden draft image for a concept
62
+ *AdminApi* | [**adminGenerateConceptDiagram**](docs/AdminApi.md#admingenerateconceptdiagramoperation) | **POST** /api/v1/admin/concept-diagrams | Enqueue a hidden draft diagram for a concept
63
+ *AdminApi* | [**adminGenerateConceptImage**](docs/AdminApi.md#admingenerateconceptimageoperation) | **POST** /api/v1/admin/concept-images | Enqueue a hidden draft image for a concept
64
64
  *AdminApi* | [**adminGetChat**](docs/AdminApi.md#admingetchat) | **GET** /api/v1/admin/chats/{chatId} | Get any chat by ID within the account
65
65
  *AdminApi* | [**adminGetChatAnalysis**](docs/AdminApi.md#admingetchatanalysis) | **GET** /api/v1/admin/chats/{chatId}/analysis | Get chat analysis for any chat within the account
66
66
  *AdminApi* | [**adminGetChatCanvasUsage**](docs/AdminApi.md#admingetchatcanvasusage) | **GET** /api/v1/admin/chats/{chatId}/canvas-usage | Get the Canvas courses, modules, files, and items a chat read, and the files in play for each quiz generation
67
67
  *AdminApi* | [**adminGetCohortStats**](docs/AdminApi.md#admingetcohortstats) | **GET** /api/v1/admin/cohort-stats | Get cohort statistics for users created within a date range
68
68
  *AdminApi* | [**adminGetConceptDiagram**](docs/AdminApi.md#admingetconceptdiagram) | **GET** /api/v1/admin/concept-diagrams/{diagramId} | Get a library concept diagram in any state
69
69
  *AdminApi* | [**adminGetConceptImage**](docs/AdminApi.md#admingetconceptimage) | **GET** /api/v1/admin/concept-images/{imageId} | Get a library concept image in any state
70
+ *AdminApi* | [**adminGetConceptMediaJob**](docs/AdminApi.md#admingetconceptmediajob) | **GET** /api/v1/admin/concept-media-jobs/{jobId} | Get an admin concept media generation job
70
71
  *AdminApi* | [**adminGetQuizSessionSummary**](docs/AdminApi.md#admingetquizsessionsummary) | **GET** /api/v1/admin/quiz-sessions/{sessionId}/summary | Get quiz session summary for any session within the account
71
72
  *AdminApi* | [**adminGetStudyObjectiveSummary**](docs/AdminApi.md#admingetstudyobjectivesummary) | **GET** /api/v1/admin/study-objectives/summary | Aggregate study-objective statistics across all account users
72
73
  *AdminApi* | [**adminGetUserChats**](docs/AdminApi.md#admingetuserchats) | **GET** /api/v1/admin/users/{externalId}/chats | Get chats with stats for a user
@@ -86,8 +87,8 @@ All URIs are relative to *http://localhost:3000*
86
87
  *AdminApi* | [**adminListStudyObjectivesByUser**](docs/AdminApi.md#adminliststudyobjectivesbyuser) | **GET** /api/v1/admin/study-objectives/by-user | Per-user study-objective counts across all account users
87
88
  *AdminApi* | [**adminListTaxonomyEnrollments**](docs/AdminApi.md#adminlisttaxonomyenrollments) | **GET** /api/v1/admin/taxonomy-enrollments | List all taxonomy enrollments across the account
88
89
  *AdminApi* | [**adminListTopStreaks**](docs/AdminApi.md#adminlisttopstreaks) | **GET** /api/v1/admin/streaks | List top N streaks across the account
89
- *AdminApi* | [**adminRegenerateConceptDiagram**](docs/AdminApi.md#adminregenerateconceptdiagramoperation) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/regenerate | Generate a hidden revision of a concept diagram
90
- *AdminApi* | [**adminRegenerateConceptImage**](docs/AdminApi.md#adminregenerateconceptimageoperation) | **POST** /api/v1/admin/concept-images/{imageId}/regenerate | Generate a hidden revision of a concept image
90
+ *AdminApi* | [**adminRegenerateConceptDiagram**](docs/AdminApi.md#adminregenerateconceptdiagramoperation) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/regenerate | Enqueue a hidden revision of a concept diagram
91
+ *AdminApi* | [**adminRegenerateConceptImage**](docs/AdminApi.md#adminregenerateconceptimageoperation) | **POST** /api/v1/admin/concept-images/{imageId}/regenerate | Enqueue a hidden revision of a concept image
91
92
  *AdminApi* | [**adminResetUserLearningData**](docs/AdminApi.md#adminresetuserlearningdata) | **POST** /api/v1/admin/users/{externalId}/reset-learning-data | Reset a user\'s Athena learning data to a blank slate
92
93
  *AdminApi* | [**adminRestoreConceptDiagram**](docs/AdminApi.md#adminrestoreconceptdiagram) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/restore | Restore a soft-deleted concept diagram
93
94
  *AdminApi* | [**adminRestoreConceptImage**](docs/AdminApi.md#adminrestoreconceptimage) | **POST** /api/v1/admin/concept-images/{imageId}/restore | Restore a soft-deleted concept image
@@ -242,14 +243,13 @@ All URIs are relative to *http://localhost:3000*
242
243
  - [AdminConceptMediaActor](docs/AdminConceptMediaActor.md)
243
244
  - [AdminConceptMediaConcept](docs/AdminConceptMediaConcept.md)
244
245
  - [AdminConceptMediaHistoryEntry](docs/AdminConceptMediaHistoryEntry.md)
246
+ - [AdminConceptMediaJob](docs/AdminConceptMediaJob.md)
245
247
  - [AdminConceptMediaRevision](docs/AdminConceptMediaRevision.md)
246
248
  - [AdminConceptSearchResult](docs/AdminConceptSearchResult.md)
247
249
  - [AdminExchangeChat](docs/AdminExchangeChat.md)
248
250
  - [AdminExchangeMessage](docs/AdminExchangeMessage.md)
249
251
  - [AdminGenerateConceptDiagramRequest](docs/AdminGenerateConceptDiagramRequest.md)
250
252
  - [AdminGenerateConceptImageRequest](docs/AdminGenerateConceptImageRequest.md)
251
- - [AdminGeneratedConceptDiagram](docs/AdminGeneratedConceptDiagram.md)
252
- - [AdminGeneratedConceptImage](docs/AdminGeneratedConceptImage.md)
253
253
  - [AdminLastExchange](docs/AdminLastExchange.md)
254
254
  - [AdminPaginatedActiveStreaks](docs/AdminPaginatedActiveStreaks.md)
255
255
  - [AdminPaginatedChats](docs/AdminPaginatedChats.md)
@@ -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, AdminConceptDiagramDetail, AdminConceptImageDetail, AdminConceptSearchResult, AdminGenerateConceptDiagramRequest, AdminGenerateConceptImageRequest, AdminGeneratedConceptDiagram, AdminGeneratedConceptImage, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedConceptDiagrams, AdminPaginatedConceptImages, AdminPaginatedLastExchanges, AdminPaginatedQuizParticipantSessions, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminRegenerateConceptDiagramRequest, AdminRegenerateConceptImageRequest, AdminResetLearningDataResponse, AdminShowConceptMediaRequest, AdminShownConceptDiagram, AdminShownConceptImage, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatCanvasUsage, AdminChatWithStats, AdminCohortStats, AdminConceptDiagramDetail, AdminConceptImageDetail, AdminConceptMediaJob, AdminConceptSearchResult, AdminGenerateConceptDiagramRequest, AdminGenerateConceptImageRequest, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedConceptDiagrams, AdminPaginatedConceptImages, AdminPaginatedLastExchanges, AdminPaginatedQuizParticipantSessions, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminRegenerateConceptDiagramRequest, AdminRegenerateConceptImageRequest, AdminResetLearningDataResponse, AdminShowConceptMediaRequest, AdminShownConceptDiagram, AdminShownConceptImage, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminDeleteConceptDiagramRequest {
15
15
  xUserId: string;
16
16
  diagramId: string;
@@ -52,6 +52,10 @@ export interface AdminGetConceptImageRequest {
52
52
  xUserId: string;
53
53
  imageId: string;
54
54
  }
55
+ export interface AdminGetConceptMediaJobRequest {
56
+ xUserId: string;
57
+ jobId: string;
58
+ }
55
59
  export interface AdminGetQuizSessionSummaryRequest {
56
60
  xUserId: string;
57
61
  sessionId: string;
@@ -239,25 +243,25 @@ export declare class AdminApi extends runtime.BaseAPI {
239
243
  */
240
244
  adminDeleteConceptImage(requestParameters: AdminDeleteConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
241
245
  /**
242
- * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours), not the learner limit.
243
- * Generate a hidden draft diagram for a concept
246
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
247
+ * Enqueue a hidden draft diagram for a concept
244
248
  */
245
- adminGenerateConceptDiagramRaw(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminGeneratedConceptDiagram>>;
249
+ adminGenerateConceptDiagramRaw(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
246
250
  /**
247
- * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours), not the learner limit.
248
- * Generate a hidden draft diagram for a concept
251
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
252
+ * Enqueue a hidden draft diagram for a concept
249
253
  */
250
- adminGenerateConceptDiagram(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminGeneratedConceptDiagram>;
254
+ adminGenerateConceptDiagram(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
251
255
  /**
252
- * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours), not the learner limit.
253
- * Generate a hidden draft image for a concept
256
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
257
+ * Enqueue a hidden draft image for a concept
254
258
  */
255
- adminGenerateConceptImageRaw(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminGeneratedConceptImage>>;
259
+ adminGenerateConceptImageRaw(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
256
260
  /**
257
- * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours), not the learner limit.
258
- * Generate a hidden draft image for a concept
261
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
262
+ * Enqueue a hidden draft image for a concept
259
263
  */
260
- adminGenerateConceptImage(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminGeneratedConceptImage>;
264
+ adminGenerateConceptImage(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
261
265
  /**
262
266
  * Get any chat by ID within the account
263
267
  */
@@ -310,6 +314,16 @@ export declare class AdminApi extends runtime.BaseAPI {
310
314
  * Get a library concept image in any state
311
315
  */
312
316
  adminGetConceptImage(requestParameters: AdminGetConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
317
+ /**
318
+ * Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
319
+ * Get an admin concept media generation job
320
+ */
321
+ adminGetConceptMediaJobRaw(requestParameters: AdminGetConceptMediaJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
322
+ /**
323
+ * Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
324
+ * Get an admin concept media generation job
325
+ */
326
+ adminGetConceptMediaJob(requestParameters: AdminGetConceptMediaJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
313
327
  /**
314
328
  * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. 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. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
315
329
  * Get quiz session summary for any session within the account
@@ -489,25 +503,25 @@ export declare class AdminApi extends runtime.BaseAPI {
489
503
  */
490
504
  adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
491
505
  /**
492
- * Generates a new diagram from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
493
- * Generate a hidden revision of a concept diagram
506
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
507
+ * Enqueue a hidden revision of a concept diagram
494
508
  */
495
- adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptDiagramDetail>>;
509
+ adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
496
510
  /**
497
- * Generates a new diagram from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
498
- * Generate a hidden revision of a concept diagram
511
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
512
+ * Enqueue a hidden revision of a concept diagram
499
513
  */
500
- adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptDiagramDetail>;
514
+ adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
501
515
  /**
502
- * Generates a new image from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
503
- * Generate a hidden revision of a concept image
516
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
517
+ * Enqueue a hidden revision of a concept image
504
518
  */
505
- adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptImageDetail>>;
519
+ adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
506
520
  /**
507
- * Generates a new image from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
508
- * Generate a hidden revision of a concept image
521
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
522
+ * Enqueue a hidden revision of a concept image
509
523
  */
510
- adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
524
+ adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
511
525
  /**
512
526
  * Wipes all per-user learning data (chats, quizzes, flashcards, study objectives, concepts, streaks, files, etc.) for the target user while preserving their account-user and user records — and therefore their external identity and Canvas connection. Does not re-seed any demo data. Intended for single-account demo/test users: learning streaks are keyed on the user (not the account), so a user who belongs to multiple accounts has their streak cleared everywhere.
513
527
  * Reset a user\'s Athena learning data to a blank slate
@@ -112,8 +112,8 @@ class AdminApi extends runtime.BaseAPI {
112
112
  });
113
113
  }
114
114
  /**
115
- * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours), not the learner limit.
116
- * Generate a hidden draft diagram for a concept
115
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
116
+ * Enqueue a hidden draft diagram for a concept
117
117
  */
118
118
  adminGenerateConceptDiagramRaw(requestParameters, initOverrides) {
119
119
  return __awaiter(this, void 0, void 0, function* () {
@@ -140,12 +140,12 @@ class AdminApi extends runtime.BaseAPI {
140
140
  query: queryParameters,
141
141
  body: (0, index_1.AdminGenerateConceptDiagramRequestToJSON)(requestParameters['adminGenerateConceptDiagramRequest']),
142
142
  }, initOverrides);
143
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminGeneratedConceptDiagramFromJSON)(jsonValue));
143
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
144
144
  });
145
145
  }
146
146
  /**
147
- * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours), not the learner limit.
148
- * Generate a hidden draft diagram for a concept
147
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
148
+ * Enqueue a hidden draft diagram for a concept
149
149
  */
150
150
  adminGenerateConceptDiagram(requestParameters, initOverrides) {
151
151
  return __awaiter(this, void 0, void 0, function* () {
@@ -154,8 +154,8 @@ class AdminApi extends runtime.BaseAPI {
154
154
  });
155
155
  }
156
156
  /**
157
- * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours), not the learner limit.
158
- * Generate a hidden draft image for a concept
157
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
158
+ * Enqueue a hidden draft image for a concept
159
159
  */
160
160
  adminGenerateConceptImageRaw(requestParameters, initOverrides) {
161
161
  return __awaiter(this, void 0, void 0, function* () {
@@ -182,12 +182,12 @@ class AdminApi extends runtime.BaseAPI {
182
182
  query: queryParameters,
183
183
  body: (0, index_1.AdminGenerateConceptImageRequestToJSON)(requestParameters['adminGenerateConceptImageRequest']),
184
184
  }, initOverrides);
185
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminGeneratedConceptImageFromJSON)(jsonValue));
185
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
186
186
  });
187
187
  }
188
188
  /**
189
- * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours), not the learner limit.
190
- * Generate a hidden draft image for a concept
189
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
190
+ * Enqueue a hidden draft image for a concept
191
191
  */
192
192
  adminGenerateConceptImage(requestParameters, initOverrides) {
193
193
  return __awaiter(this, void 0, void 0, function* () {
@@ -441,6 +441,47 @@ class AdminApi extends runtime.BaseAPI {
441
441
  return yield response.value();
442
442
  });
443
443
  }
444
+ /**
445
+ * Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
446
+ * Get an admin concept media generation job
447
+ */
448
+ adminGetConceptMediaJobRaw(requestParameters, initOverrides) {
449
+ return __awaiter(this, void 0, void 0, function* () {
450
+ if (requestParameters['xUserId'] == null) {
451
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptMediaJob().');
452
+ }
453
+ if (requestParameters['jobId'] == null) {
454
+ throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling adminGetConceptMediaJob().');
455
+ }
456
+ const queryParameters = {};
457
+ const headerParameters = {};
458
+ if (requestParameters['xUserId'] != null) {
459
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
460
+ }
461
+ if (this.configuration && this.configuration.apiKey) {
462
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
463
+ }
464
+ let urlPath = `/api/v1/admin/concept-media-jobs/{jobId}`;
465
+ urlPath = urlPath.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId'])));
466
+ const response = yield this.request({
467
+ path: urlPath,
468
+ method: 'GET',
469
+ headers: headerParameters,
470
+ query: queryParameters,
471
+ }, initOverrides);
472
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
473
+ });
474
+ }
475
+ /**
476
+ * Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
477
+ * Get an admin concept media generation job
478
+ */
479
+ adminGetConceptMediaJob(requestParameters, initOverrides) {
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ const response = yield this.adminGetConceptMediaJobRaw(requestParameters, initOverrides);
482
+ return yield response.value();
483
+ });
484
+ }
444
485
  /**
445
486
  * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. 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. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
446
487
  * Get quiz session summary for any session within the account
@@ -1323,8 +1364,8 @@ class AdminApi extends runtime.BaseAPI {
1323
1364
  });
1324
1365
  }
1325
1366
  /**
1326
- * Generates a new diagram from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
1327
- * Generate a hidden revision of a concept diagram
1367
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
1368
+ * Enqueue a hidden revision of a concept diagram
1328
1369
  */
1329
1370
  adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
1330
1371
  return __awaiter(this, void 0, void 0, function* () {
@@ -1355,12 +1396,12 @@ class AdminApi extends runtime.BaseAPI {
1355
1396
  query: queryParameters,
1356
1397
  body: (0, index_1.AdminRegenerateConceptDiagramRequestToJSON)(requestParameters['adminRegenerateConceptDiagramRequest']),
1357
1398
  }, initOverrides);
1358
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
1399
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
1359
1400
  });
1360
1401
  }
1361
1402
  /**
1362
- * Generates a new diagram from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
1363
- * Generate a hidden revision of a concept diagram
1403
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
1404
+ * Enqueue a hidden revision of a concept diagram
1364
1405
  */
1365
1406
  adminRegenerateConceptDiagram(requestParameters, initOverrides) {
1366
1407
  return __awaiter(this, void 0, void 0, function* () {
@@ -1369,8 +1410,8 @@ class AdminApi extends runtime.BaseAPI {
1369
1410
  });
1370
1411
  }
1371
1412
  /**
1372
- * Generates a new image from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
1373
- * Generate a hidden revision of a concept image
1413
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
1414
+ * Enqueue a hidden revision of a concept image
1374
1415
  */
1375
1416
  adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
1376
1417
  return __awaiter(this, void 0, void 0, function* () {
@@ -1401,12 +1442,12 @@ class AdminApi extends runtime.BaseAPI {
1401
1442
  query: queryParameters,
1402
1443
  body: (0, index_1.AdminRegenerateConceptImageRequestToJSON)(requestParameters['adminRegenerateConceptImageRequest']),
1403
1444
  }, initOverrides);
1404
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptImageDetailFromJSON)(jsonValue));
1445
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
1405
1446
  });
1406
1447
  }
1407
1448
  /**
1408
- * Generates a new image from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
1409
- * Generate a hidden revision of a concept image
1449
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
1450
+ * Enqueue a hidden revision of a concept image
1410
1451
  */
1411
1452
  adminRegenerateConceptImage(requestParameters, initOverrides) {
1412
1453
  return __awaiter(this, void 0, void 0, function* () {
@@ -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, AdminConceptDiagramDetail, AdminConceptImageDetail, AdminConceptSearchResult, AdminGenerateConceptDiagramRequest, AdminGenerateConceptImageRequest, AdminGeneratedConceptDiagram, AdminGeneratedConceptImage, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedConceptDiagrams, AdminPaginatedConceptImages, AdminPaginatedLastExchanges, AdminPaginatedQuizParticipantSessions, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminRegenerateConceptDiagramRequest, AdminRegenerateConceptImageRequest, AdminResetLearningDataResponse, AdminShowConceptMediaRequest, AdminShownConceptDiagram, AdminShownConceptImage, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatCanvasUsage, AdminChatWithStats, AdminCohortStats, AdminConceptDiagramDetail, AdminConceptImageDetail, AdminConceptMediaJob, AdminConceptSearchResult, AdminGenerateConceptDiagramRequest, AdminGenerateConceptImageRequest, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedConceptDiagrams, AdminPaginatedConceptImages, AdminPaginatedLastExchanges, AdminPaginatedQuizParticipantSessions, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminRegenerateConceptDiagramRequest, AdminRegenerateConceptImageRequest, AdminResetLearningDataResponse, AdminShowConceptMediaRequest, AdminShownConceptDiagram, AdminShownConceptImage, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminDeleteConceptDiagramRequest {
15
15
  xUserId: string;
16
16
  diagramId: string;
@@ -52,6 +52,10 @@ export interface AdminGetConceptImageRequest {
52
52
  xUserId: string;
53
53
  imageId: string;
54
54
  }
55
+ export interface AdminGetConceptMediaJobRequest {
56
+ xUserId: string;
57
+ jobId: string;
58
+ }
55
59
  export interface AdminGetQuizSessionSummaryRequest {
56
60
  xUserId: string;
57
61
  sessionId: string;
@@ -239,25 +243,25 @@ export declare class AdminApi extends runtime.BaseAPI {
239
243
  */
240
244
  adminDeleteConceptImage(requestParameters: AdminDeleteConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
241
245
  /**
242
- * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours), not the learner limit.
243
- * Generate a hidden draft diagram for a concept
246
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
247
+ * Enqueue a hidden draft diagram for a concept
244
248
  */
245
- adminGenerateConceptDiagramRaw(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminGeneratedConceptDiagram>>;
249
+ adminGenerateConceptDiagramRaw(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
246
250
  /**
247
- * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours), not the learner limit.
248
- * Generate a hidden draft diagram for a concept
251
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
252
+ * Enqueue a hidden draft diagram for a concept
249
253
  */
250
- adminGenerateConceptDiagram(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminGeneratedConceptDiagram>;
254
+ adminGenerateConceptDiagram(requestParameters: AdminGenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
251
255
  /**
252
- * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours), not the learner limit.
253
- * Generate a hidden draft image for a concept
256
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
257
+ * Enqueue a hidden draft image for a concept
254
258
  */
255
- adminGenerateConceptImageRaw(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminGeneratedConceptImage>>;
259
+ adminGenerateConceptImageRaw(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
256
260
  /**
257
- * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is stored hidden for review and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours), not the learner limit.
258
- * Generate a hidden draft image for a concept
261
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
262
+ * Enqueue a hidden draft image for a concept
259
263
  */
260
- adminGenerateConceptImage(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminGeneratedConceptImage>;
264
+ adminGenerateConceptImage(requestParameters: AdminGenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
261
265
  /**
262
266
  * Get any chat by ID within the account
263
267
  */
@@ -310,6 +314,16 @@ export declare class AdminApi extends runtime.BaseAPI {
310
314
  * Get a library concept image in any state
311
315
  */
312
316
  adminGetConceptImage(requestParameters: AdminGetConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
317
+ /**
318
+ * Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
319
+ * Get an admin concept media generation job
320
+ */
321
+ adminGetConceptMediaJobRaw(requestParameters: AdminGetConceptMediaJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
322
+ /**
323
+ * Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
324
+ * Get an admin concept media generation job
325
+ */
326
+ adminGetConceptMediaJob(requestParameters: AdminGetConceptMediaJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
313
327
  /**
314
328
  * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. 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. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
315
329
  * Get quiz session summary for any session within the account
@@ -489,25 +503,25 @@ export declare class AdminApi extends runtime.BaseAPI {
489
503
  */
490
504
  adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
491
505
  /**
492
- * Generates a new diagram from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
493
- * Generate a hidden revision of a concept diagram
506
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
507
+ * Enqueue a hidden revision of a concept diagram
494
508
  */
495
- adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptDiagramDetail>>;
509
+ adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
496
510
  /**
497
- * Generates a new diagram from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
498
- * Generate a hidden revision of a concept diagram
511
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
512
+ * Enqueue a hidden revision of a concept diagram
499
513
  */
500
- adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptDiagramDetail>;
514
+ adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
501
515
  /**
502
- * Generates a new image from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
503
- * Generate a hidden revision of a concept image
516
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
517
+ * Enqueue a hidden revision of a concept image
504
518
  */
505
- adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptImageDetail>>;
519
+ adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
506
520
  /**
507
- * Generates a new image from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
508
- * Generate a hidden revision of a concept image
521
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
522
+ * Enqueue a hidden revision of a concept image
509
523
  */
510
- adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
524
+ adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
511
525
  /**
512
526
  * Wipes all per-user learning data (chats, quizzes, flashcards, study objectives, concepts, streaks, files, etc.) for the target user while preserving their account-user and user records — and therefore their external identity and Canvas connection. Does not re-seed any demo data. Intended for single-account demo/test users: learning streaks are keyed on the user (not the account), so a user who belongs to multiple accounts has their streak cleared everywhere.
513
527
  * Reset a user\'s Athena learning data to a blank slate