@instructure/athena-api-client 4.2.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +7 -0
  2. package/dist/apis/AdminApi.d.ts +63 -5
  3. package/dist/apis/AdminApi.js +177 -4
  4. package/dist/esm/apis/AdminApi.d.ts +63 -5
  5. package/dist/esm/apis/AdminApi.js +178 -5
  6. package/dist/esm/models/AdminConceptDiagram.d.ts +6 -0
  7. package/dist/esm/models/AdminConceptDiagram.js +4 -0
  8. package/dist/esm/models/AdminConceptDiagramDetail.d.ts +6 -0
  9. package/dist/esm/models/AdminConceptDiagramDetail.js +4 -0
  10. package/dist/esm/models/AdminConceptImage.d.ts +6 -0
  11. package/dist/esm/models/AdminConceptImage.js +4 -0
  12. package/dist/esm/models/AdminConceptImageDetail.d.ts +6 -0
  13. package/dist/esm/models/AdminConceptImageDetail.js +4 -0
  14. package/dist/esm/models/AdminConceptMediaJob.d.ts +4 -3
  15. package/dist/esm/models/AdminConceptMediaJob.js +2 -1
  16. package/dist/esm/models/AdminReviseConceptDiagramRequest.d.ts +44 -0
  17. package/dist/esm/models/AdminReviseConceptDiagramRequest.js +47 -0
  18. package/dist/esm/models/AdminReviseConceptImageRequest.d.ts +38 -0
  19. package/dist/esm/models/AdminReviseConceptImageRequest.js +45 -0
  20. package/dist/esm/models/AdminShownConceptDiagram.d.ts +6 -0
  21. package/dist/esm/models/AdminShownConceptDiagram.js +4 -0
  22. package/dist/esm/models/AdminShownConceptImage.d.ts +6 -0
  23. package/dist/esm/models/AdminShownConceptImage.js +4 -0
  24. package/dist/esm/models/AdminTopConcept.d.ts +62 -0
  25. package/dist/esm/models/AdminTopConcept.js +63 -0
  26. package/dist/esm/models/index.d.ts +3 -0
  27. package/dist/esm/models/index.js +3 -0
  28. package/dist/models/AdminConceptDiagram.d.ts +6 -0
  29. package/dist/models/AdminConceptDiagram.js +4 -0
  30. package/dist/models/AdminConceptDiagramDetail.d.ts +6 -0
  31. package/dist/models/AdminConceptDiagramDetail.js +4 -0
  32. package/dist/models/AdminConceptImage.d.ts +6 -0
  33. package/dist/models/AdminConceptImage.js +4 -0
  34. package/dist/models/AdminConceptImageDetail.d.ts +6 -0
  35. package/dist/models/AdminConceptImageDetail.js +4 -0
  36. package/dist/models/AdminConceptMediaJob.d.ts +4 -3
  37. package/dist/models/AdminConceptMediaJob.js +2 -1
  38. package/dist/models/AdminReviseConceptDiagramRequest.d.ts +44 -0
  39. package/dist/models/AdminReviseConceptDiagramRequest.js +54 -0
  40. package/dist/models/AdminReviseConceptImageRequest.d.ts +38 -0
  41. package/dist/models/AdminReviseConceptImageRequest.js +52 -0
  42. package/dist/models/AdminShownConceptDiagram.d.ts +6 -0
  43. package/dist/models/AdminShownConceptDiagram.js +4 -0
  44. package/dist/models/AdminShownConceptImage.d.ts +6 -0
  45. package/dist/models/AdminShownConceptImage.js +4 -0
  46. package/dist/models/AdminTopConcept.d.ts +62 -0
  47. package/dist/models/AdminTopConcept.js +70 -0
  48. package/dist/models/index.d.ts +3 -0
  49. package/dist/models/index.js +3 -0
  50. package/package.json +1 -1
package/README.md CHANGED
@@ -65,6 +65,7 @@ All URIs are relative to *http://localhost:3000*
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
+ *AdminApi* | [**adminGetConcept**](docs/AdminApi.md#admingetconcept) | **GET** /api/v1/admin/concepts/{id} | Get one concept with its media counts
68
69
  *AdminApi* | [**adminGetConceptDiagram**](docs/AdminApi.md#admingetconceptdiagram) | **GET** /api/v1/admin/concept-diagrams/{diagramId} | Get a library concept diagram in any state
69
70
  *AdminApi* | [**adminGetConceptImage**](docs/AdminApi.md#admingetconceptimage) | **GET** /api/v1/admin/concept-images/{imageId} | Get a library concept image in any state
70
71
  *AdminApi* | [**adminGetConceptMediaJob**](docs/AdminApi.md#admingetconceptmediajob) | **GET** /api/v1/admin/concept-media-jobs/{jobId} | Get an admin concept media generation job
@@ -86,12 +87,15 @@ All URIs are relative to *http://localhost:3000*
86
87
  *AdminApi* | [**adminListStudyObjectives**](docs/AdminApi.md#adminliststudyobjectives) | **GET** /api/v1/admin/study-objectives | List study objectives across all account users
87
88
  *AdminApi* | [**adminListStudyObjectivesByUser**](docs/AdminApi.md#adminliststudyobjectivesbyuser) | **GET** /api/v1/admin/study-objectives/by-user | Per-user study-objective counts across all account users
88
89
  *AdminApi* | [**adminListTaxonomyEnrollments**](docs/AdminApi.md#adminlisttaxonomyenrollments) | **GET** /api/v1/admin/taxonomy-enrollments | List all taxonomy enrollments across the account
90
+ *AdminApi* | [**adminListTopConcepts**](docs/AdminApi.md#adminlisttopconcepts) | **GET** /api/v1/admin/concepts/top | List the concepts the most users have
89
91
  *AdminApi* | [**adminListTopStreaks**](docs/AdminApi.md#adminlisttopstreaks) | **GET** /api/v1/admin/streaks | List top N streaks across the account
90
92
  *AdminApi* | [**adminRegenerateConceptDiagram**](docs/AdminApi.md#adminregenerateconceptdiagramoperation) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/regenerate | Enqueue a hidden revision of a concept diagram
91
93
  *AdminApi* | [**adminRegenerateConceptImage**](docs/AdminApi.md#adminregenerateconceptimageoperation) | **POST** /api/v1/admin/concept-images/{imageId}/regenerate | Enqueue a hidden revision of a concept image
92
94
  *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
93
95
  *AdminApi* | [**adminRestoreConceptDiagram**](docs/AdminApi.md#adminrestoreconceptdiagram) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/restore | Restore a soft-deleted concept diagram
94
96
  *AdminApi* | [**adminRestoreConceptImage**](docs/AdminApi.md#adminrestoreconceptimage) | **POST** /api/v1/admin/concept-images/{imageId}/restore | Restore a soft-deleted concept image
97
+ *AdminApi* | [**adminReviseConceptDiagram**](docs/AdminApi.md#adminreviseconceptdiagramoperation) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/revise | Enqueue a hidden revision of a concept diagram with only the given changes
98
+ *AdminApi* | [**adminReviseConceptImage**](docs/AdminApi.md#adminreviseconceptimageoperation) | **POST** /api/v1/admin/concept-images/{imageId}/revise | Enqueue a hidden revision of a concept image with only the given changes
95
99
  *AdminApi* | [**adminSearchConcepts**](docs/AdminApi.md#adminsearchconcepts) | **GET** /api/v1/admin/concepts | Search the global concepts by name
96
100
  *AdminApi* | [**adminShowConceptDiagram**](docs/AdminApi.md#adminshowconceptdiagram) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/show | Show a hidden concept diagram to learners
97
101
  *AdminApi* | [**adminShowConceptImage**](docs/AdminApi.md#adminshowconceptimage) | **POST** /api/v1/admin/concept-images/{imageId}/show | Show a hidden concept image to learners
@@ -280,6 +284,8 @@ All URIs are relative to *http://localhost:3000*
280
284
  - [AdminRegenerateConceptDiagramRequest](docs/AdminRegenerateConceptDiagramRequest.md)
281
285
  - [AdminRegenerateConceptImageRequest](docs/AdminRegenerateConceptImageRequest.md)
282
286
  - [AdminResetLearningDataResponse](docs/AdminResetLearningDataResponse.md)
287
+ - [AdminReviseConceptDiagramRequest](docs/AdminReviseConceptDiagramRequest.md)
288
+ - [AdminReviseConceptImageRequest](docs/AdminReviseConceptImageRequest.md)
283
289
  - [AdminShowConceptMediaRequest](docs/AdminShowConceptMediaRequest.md)
284
290
  - [AdminShownConceptDiagram](docs/AdminShownConceptDiagram.md)
285
291
  - [AdminShownConceptImage](docs/AdminShownConceptImage.md)
@@ -291,6 +297,7 @@ All URIs are relative to *http://localhost:3000*
291
297
  - [AdminStudyObjectiveUserCounts](docs/AdminStudyObjectiveUserCounts.md)
292
298
  - [AdminTaxonomyEnrollment](docs/AdminTaxonomyEnrollment.md)
293
299
  - [AdminTaxonomyEnrollmentTaxonomy](docs/AdminTaxonomyEnrollmentTaxonomy.md)
300
+ - [AdminTopConcept](docs/AdminTopConcept.md)
294
301
  - [AdminTriggerAnalysisResponse](docs/AdminTriggerAnalysisResponse.md)
295
302
  - [AdminUpdateChatRequest](docs/AdminUpdateChatRequest.md)
296
303
  - [AdminUserActivity](docs/AdminUserActivity.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, 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';
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, AdminReviseConceptDiagramRequest, AdminReviseConceptImageRequest, AdminShowConceptMediaRequest, AdminShownConceptDiagram, AdminShownConceptImage, AdminStreak, AdminStudyObjectiveSummary, AdminTopConcept, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminDeleteConceptDiagramRequest {
15
15
  xUserId: string;
16
16
  diagramId: string;
@@ -44,6 +44,10 @@ export interface AdminGetCohortStatsRequest {
44
44
  since: Date;
45
45
  until: Date;
46
46
  }
47
+ export interface AdminGetConceptRequest {
48
+ xUserId: string;
49
+ id: string;
50
+ }
47
51
  export interface AdminGetConceptDiagramRequest {
48
52
  xUserId: string;
49
53
  diagramId: string;
@@ -168,6 +172,10 @@ export interface AdminListTaxonomyEnrollmentsRequest {
168
172
  limit?: number;
169
173
  cursor?: string;
170
174
  }
175
+ export interface AdminListTopConceptsRequest {
176
+ xUserId: string;
177
+ limit?: number;
178
+ }
171
179
  export interface AdminListTopStreaksRequest {
172
180
  xUserId: string;
173
181
  limit?: number;
@@ -194,6 +202,16 @@ export interface AdminRestoreConceptImageRequest {
194
202
  xUserId: string;
195
203
  imageId: string;
196
204
  }
205
+ export interface AdminReviseConceptDiagramOperationRequest {
206
+ xUserId: string;
207
+ diagramId: string;
208
+ adminReviseConceptDiagramRequest: AdminReviseConceptDiagramRequest;
209
+ }
210
+ export interface AdminReviseConceptImageOperationRequest {
211
+ xUserId: string;
212
+ imageId: string;
213
+ adminReviseConceptImageRequest: AdminReviseConceptImageRequest;
214
+ }
197
215
  export interface AdminSearchConceptsRequest {
198
216
  xUserId: string;
199
217
  query?: string;
@@ -294,6 +312,16 @@ export declare class AdminApi extends runtime.BaseAPI {
294
312
  * Get cohort statistics for users created within a date range
295
313
  */
296
314
  adminGetCohortStats(requestParameters: AdminGetCohortStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCohortStats>;
315
+ /**
316
+ * The concept with its count of non-deleted library images and diagrams, in the same shape as a concept search result.
317
+ * Get one concept with its media counts
318
+ */
319
+ adminGetConceptRaw(requestParameters: AdminGetConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptSearchResult>>;
320
+ /**
321
+ * The concept with its count of non-deleted library images and diagrams, in the same shape as a concept search result.
322
+ * Get one concept with its media counts
323
+ */
324
+ adminGetConcept(requestParameters: AdminGetConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptSearchResult>;
297
325
  /**
298
326
  * One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
299
327
  * Get a library concept diagram in any state
@@ -494,6 +522,16 @@ export declare class AdminApi extends runtime.BaseAPI {
494
522
  * List all taxonomy enrollments across the account
495
523
  */
496
524
  adminListTaxonomyEnrollments(requestParameters: AdminListTaxonomyEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedTaxonomyEnrollments>;
525
+ /**
526
+ * Concepts ranked by how many distinct users hold a user concept for them (a user with several account users counts once), most first, then by name. Concepts no user holds are left out. Each comes with its count of non-deleted library images and diagrams, for choosing which concepts to pre-generate media for.
527
+ * List the concepts the most users have
528
+ */
529
+ adminListTopConceptsRaw(requestParameters: AdminListTopConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AdminTopConcept>>>;
530
+ /**
531
+ * Concepts ranked by how many distinct users hold a user concept for them (a user with several account users counts once), most first, then by name. Concepts no user holds are left out. Each comes with its count of non-deleted library images and diagrams, for choosing which concepts to pre-generate media for.
532
+ * List the concepts the most users have
533
+ */
534
+ adminListTopConcepts(requestParameters: AdminListTopConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminTopConcept>>;
497
535
  /**
498
536
  * List top N streaks across the account
499
537
  */
@@ -503,22 +541,22 @@ export declare class AdminApi extends runtime.BaseAPI {
503
541
  */
504
542
  adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
505
543
  /**
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).
544
+ * 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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
507
545
  * Enqueue a hidden revision of a concept diagram
508
546
  */
509
547
  adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
510
548
  /**
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).
549
+ * 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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
512
550
  * Enqueue a hidden revision of a concept diagram
513
551
  */
514
552
  adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
515
553
  /**
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).
554
+ * 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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
517
555
  * Enqueue a hidden revision of a concept image
518
556
  */
519
557
  adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
520
558
  /**
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).
559
+ * 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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
522
560
  * Enqueue a hidden revision of a concept image
523
561
  */
524
562
  adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
@@ -552,6 +590,26 @@ export declare class AdminApi extends runtime.BaseAPI {
552
590
  * Restore a soft-deleted concept image
553
591
  */
554
592
  adminRestoreConceptImage(requestParameters: AdminRestoreConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
593
+ /**
594
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the authoring model gets the original diagram\'s HTML fragment and is asked to apply these changes and keep everything else. The stored brief is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new diagram is 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).
595
+ * Enqueue a hidden revision of a concept diagram with only the given changes
596
+ */
597
+ adminReviseConceptDiagramRaw(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
598
+ /**
599
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the authoring model gets the original diagram\'s HTML fragment and is asked to apply these changes and keep everything else. The stored brief is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new diagram is 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).
600
+ * Enqueue a hidden revision of a concept diagram with only the given changes
601
+ */
602
+ adminReviseConceptDiagram(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
603
+ /**
604
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the original image itself goes to the image model\'s edit endpoint as a reference, with instructions to apply these changes and keep everything else. The stored prompt is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new image is 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).
605
+ * Enqueue a hidden revision of a concept image with only the given changes
606
+ */
607
+ adminReviseConceptImageRaw(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
608
+ /**
609
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the original image itself goes to the image model\'s edit endpoint as a reference, with instructions to apply these changes and keep everything else. The stored prompt is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new image is 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).
610
+ * Enqueue a hidden revision of a concept image with only the given changes
611
+ */
612
+ adminReviseConceptImage(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
555
613
  /**
556
614
  * Concepts whose name contains the query (case-insensitive), exact and prefix matches first, each with its count of non-deleted library images and diagrams. For picking the concept an admin-generated image or diagram is filed under. Without a query, concepts by name.
557
615
  * Search the global concepts by name
@@ -359,6 +359,47 @@ class AdminApi extends runtime.BaseAPI {
359
359
  return yield response.value();
360
360
  });
361
361
  }
362
+ /**
363
+ * The concept with its count of non-deleted library images and diagrams, in the same shape as a concept search result.
364
+ * Get one concept with its media counts
365
+ */
366
+ adminGetConceptRaw(requestParameters, initOverrides) {
367
+ return __awaiter(this, void 0, void 0, function* () {
368
+ if (requestParameters['xUserId'] == null) {
369
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConcept().');
370
+ }
371
+ if (requestParameters['id'] == null) {
372
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling adminGetConcept().');
373
+ }
374
+ const queryParameters = {};
375
+ const headerParameters = {};
376
+ if (requestParameters['xUserId'] != null) {
377
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
378
+ }
379
+ if (this.configuration && this.configuration.apiKey) {
380
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
381
+ }
382
+ let urlPath = `/api/v1/admin/concepts/{id}`;
383
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
384
+ const response = yield this.request({
385
+ path: urlPath,
386
+ method: 'GET',
387
+ headers: headerParameters,
388
+ query: queryParameters,
389
+ }, initOverrides);
390
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptSearchResultFromJSON)(jsonValue));
391
+ });
392
+ }
393
+ /**
394
+ * The concept with its count of non-deleted library images and diagrams, in the same shape as a concept search result.
395
+ * Get one concept with its media counts
396
+ */
397
+ adminGetConcept(requestParameters, initOverrides) {
398
+ return __awaiter(this, void 0, void 0, function* () {
399
+ const response = yield this.adminGetConceptRaw(requestParameters, initOverrides);
400
+ return yield response.value();
401
+ });
402
+ }
362
403
  /**
363
404
  * One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
364
405
  * Get a library concept diagram in any state
@@ -1325,6 +1366,46 @@ class AdminApi extends runtime.BaseAPI {
1325
1366
  return yield response.value();
1326
1367
  });
1327
1368
  }
1369
+ /**
1370
+ * Concepts ranked by how many distinct users hold a user concept for them (a user with several account users counts once), most first, then by name. Concepts no user holds are left out. Each comes with its count of non-deleted library images and diagrams, for choosing which concepts to pre-generate media for.
1371
+ * List the concepts the most users have
1372
+ */
1373
+ adminListTopConceptsRaw(requestParameters, initOverrides) {
1374
+ return __awaiter(this, void 0, void 0, function* () {
1375
+ if (requestParameters['xUserId'] == null) {
1376
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListTopConcepts().');
1377
+ }
1378
+ const queryParameters = {};
1379
+ if (requestParameters['limit'] != null) {
1380
+ queryParameters['limit'] = requestParameters['limit'];
1381
+ }
1382
+ const headerParameters = {};
1383
+ if (requestParameters['xUserId'] != null) {
1384
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1385
+ }
1386
+ if (this.configuration && this.configuration.apiKey) {
1387
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1388
+ }
1389
+ let urlPath = `/api/v1/admin/concepts/top`;
1390
+ const response = yield this.request({
1391
+ path: urlPath,
1392
+ method: 'GET',
1393
+ headers: headerParameters,
1394
+ query: queryParameters,
1395
+ }, initOverrides);
1396
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AdminTopConceptFromJSON));
1397
+ });
1398
+ }
1399
+ /**
1400
+ * Concepts ranked by how many distinct users hold a user concept for them (a user with several account users counts once), most first, then by name. Concepts no user holds are left out. Each comes with its count of non-deleted library images and diagrams, for choosing which concepts to pre-generate media for.
1401
+ * List the concepts the most users have
1402
+ */
1403
+ adminListTopConcepts(requestParameters, initOverrides) {
1404
+ return __awaiter(this, void 0, void 0, function* () {
1405
+ const response = yield this.adminListTopConceptsRaw(requestParameters, initOverrides);
1406
+ return yield response.value();
1407
+ });
1408
+ }
1328
1409
  /**
1329
1410
  * List top N streaks across the account
1330
1411
  */
@@ -1364,7 +1445,7 @@ class AdminApi extends runtime.BaseAPI {
1364
1445
  });
1365
1446
  }
1366
1447
  /**
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).
1448
+ * 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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
1368
1449
  * Enqueue a hidden revision of a concept diagram
1369
1450
  */
1370
1451
  adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
@@ -1400,7 +1481,7 @@ class AdminApi extends runtime.BaseAPI {
1400
1481
  });
1401
1482
  }
1402
1483
  /**
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).
1484
+ * 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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
1404
1485
  * Enqueue a hidden revision of a concept diagram
1405
1486
  */
1406
1487
  adminRegenerateConceptDiagram(requestParameters, initOverrides) {
@@ -1410,7 +1491,7 @@ class AdminApi extends runtime.BaseAPI {
1410
1491
  });
1411
1492
  }
1412
1493
  /**
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).
1494
+ * 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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
1414
1495
  * Enqueue a hidden revision of a concept image
1415
1496
  */
1416
1497
  adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
@@ -1446,7 +1527,7 @@ class AdminApi extends runtime.BaseAPI {
1446
1527
  });
1447
1528
  }
1448
1529
  /**
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).
1530
+ * 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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
1450
1531
  * Enqueue a hidden revision of a concept image
1451
1532
  */
1452
1533
  adminRegenerateConceptImage(requestParameters, initOverrides) {
@@ -1578,6 +1659,98 @@ class AdminApi extends runtime.BaseAPI {
1578
1659
  return yield response.value();
1579
1660
  });
1580
1661
  }
1662
+ /**
1663
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the authoring model gets the original diagram\'s HTML fragment and is asked to apply these changes and keep everything else. The stored brief is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new diagram is 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).
1664
+ * Enqueue a hidden revision of a concept diagram with only the given changes
1665
+ */
1666
+ adminReviseConceptDiagramRaw(requestParameters, initOverrides) {
1667
+ return __awaiter(this, void 0, void 0, function* () {
1668
+ if (requestParameters['xUserId'] == null) {
1669
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminReviseConceptDiagram().');
1670
+ }
1671
+ if (requestParameters['diagramId'] == null) {
1672
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminReviseConceptDiagram().');
1673
+ }
1674
+ if (requestParameters['adminReviseConceptDiagramRequest'] == null) {
1675
+ throw new runtime.RequiredError('adminReviseConceptDiagramRequest', 'Required parameter "adminReviseConceptDiagramRequest" was null or undefined when calling adminReviseConceptDiagram().');
1676
+ }
1677
+ const queryParameters = {};
1678
+ const headerParameters = {};
1679
+ headerParameters['Content-Type'] = 'application/json';
1680
+ if (requestParameters['xUserId'] != null) {
1681
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1682
+ }
1683
+ if (this.configuration && this.configuration.apiKey) {
1684
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1685
+ }
1686
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/revise`;
1687
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1688
+ const response = yield this.request({
1689
+ path: urlPath,
1690
+ method: 'POST',
1691
+ headers: headerParameters,
1692
+ query: queryParameters,
1693
+ body: (0, index_1.AdminReviseConceptDiagramRequestToJSON)(requestParameters['adminReviseConceptDiagramRequest']),
1694
+ }, initOverrides);
1695
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
1696
+ });
1697
+ }
1698
+ /**
1699
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the authoring model gets the original diagram\'s HTML fragment and is asked to apply these changes and keep everything else. The stored brief is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new diagram is 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).
1700
+ * Enqueue a hidden revision of a concept diagram with only the given changes
1701
+ */
1702
+ adminReviseConceptDiagram(requestParameters, initOverrides) {
1703
+ return __awaiter(this, void 0, void 0, function* () {
1704
+ const response = yield this.adminReviseConceptDiagramRaw(requestParameters, initOverrides);
1705
+ return yield response.value();
1706
+ });
1707
+ }
1708
+ /**
1709
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the original image itself goes to the image model\'s edit endpoint as a reference, with instructions to apply these changes and keep everything else. The stored prompt is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new image is 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).
1710
+ * Enqueue a hidden revision of a concept image with only the given changes
1711
+ */
1712
+ adminReviseConceptImageRaw(requestParameters, initOverrides) {
1713
+ return __awaiter(this, void 0, void 0, function* () {
1714
+ if (requestParameters['xUserId'] == null) {
1715
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminReviseConceptImage().');
1716
+ }
1717
+ if (requestParameters['imageId'] == null) {
1718
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminReviseConceptImage().');
1719
+ }
1720
+ if (requestParameters['adminReviseConceptImageRequest'] == null) {
1721
+ throw new runtime.RequiredError('adminReviseConceptImageRequest', 'Required parameter "adminReviseConceptImageRequest" was null or undefined when calling adminReviseConceptImage().');
1722
+ }
1723
+ const queryParameters = {};
1724
+ const headerParameters = {};
1725
+ headerParameters['Content-Type'] = 'application/json';
1726
+ if (requestParameters['xUserId'] != null) {
1727
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1728
+ }
1729
+ if (this.configuration && this.configuration.apiKey) {
1730
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1731
+ }
1732
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/revise`;
1733
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
1734
+ const response = yield this.request({
1735
+ path: urlPath,
1736
+ method: 'POST',
1737
+ headers: headerParameters,
1738
+ query: queryParameters,
1739
+ body: (0, index_1.AdminReviseConceptImageRequestToJSON)(requestParameters['adminReviseConceptImageRequest']),
1740
+ }, initOverrides);
1741
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
1742
+ });
1743
+ }
1744
+ /**
1745
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the original image itself goes to the image model\'s edit endpoint as a reference, with instructions to apply these changes and keep everything else. The stored prompt is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new image is 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).
1746
+ * Enqueue a hidden revision of a concept image with only the given changes
1747
+ */
1748
+ adminReviseConceptImage(requestParameters, initOverrides) {
1749
+ return __awaiter(this, void 0, void 0, function* () {
1750
+ const response = yield this.adminReviseConceptImageRaw(requestParameters, initOverrides);
1751
+ return yield response.value();
1752
+ });
1753
+ }
1581
1754
  /**
1582
1755
  * Concepts whose name contains the query (case-insensitive), exact and prefix matches first, each with its count of non-deleted library images and diagrams. For picking the concept an admin-generated image or diagram is filed under. Without a query, concepts by name.
1583
1756
  * Search the global concepts by name
@@ -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, 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';
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, AdminReviseConceptDiagramRequest, AdminReviseConceptImageRequest, AdminShowConceptMediaRequest, AdminShownConceptDiagram, AdminShownConceptImage, AdminStreak, AdminStudyObjectiveSummary, AdminTopConcept, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminDeleteConceptDiagramRequest {
15
15
  xUserId: string;
16
16
  diagramId: string;
@@ -44,6 +44,10 @@ export interface AdminGetCohortStatsRequest {
44
44
  since: Date;
45
45
  until: Date;
46
46
  }
47
+ export interface AdminGetConceptRequest {
48
+ xUserId: string;
49
+ id: string;
50
+ }
47
51
  export interface AdminGetConceptDiagramRequest {
48
52
  xUserId: string;
49
53
  diagramId: string;
@@ -168,6 +172,10 @@ export interface AdminListTaxonomyEnrollmentsRequest {
168
172
  limit?: number;
169
173
  cursor?: string;
170
174
  }
175
+ export interface AdminListTopConceptsRequest {
176
+ xUserId: string;
177
+ limit?: number;
178
+ }
171
179
  export interface AdminListTopStreaksRequest {
172
180
  xUserId: string;
173
181
  limit?: number;
@@ -194,6 +202,16 @@ export interface AdminRestoreConceptImageRequest {
194
202
  xUserId: string;
195
203
  imageId: string;
196
204
  }
205
+ export interface AdminReviseConceptDiagramOperationRequest {
206
+ xUserId: string;
207
+ diagramId: string;
208
+ adminReviseConceptDiagramRequest: AdminReviseConceptDiagramRequest;
209
+ }
210
+ export interface AdminReviseConceptImageOperationRequest {
211
+ xUserId: string;
212
+ imageId: string;
213
+ adminReviseConceptImageRequest: AdminReviseConceptImageRequest;
214
+ }
197
215
  export interface AdminSearchConceptsRequest {
198
216
  xUserId: string;
199
217
  query?: string;
@@ -294,6 +312,16 @@ export declare class AdminApi extends runtime.BaseAPI {
294
312
  * Get cohort statistics for users created within a date range
295
313
  */
296
314
  adminGetCohortStats(requestParameters: AdminGetCohortStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCohortStats>;
315
+ /**
316
+ * The concept with its count of non-deleted library images and diagrams, in the same shape as a concept search result.
317
+ * Get one concept with its media counts
318
+ */
319
+ adminGetConceptRaw(requestParameters: AdminGetConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptSearchResult>>;
320
+ /**
321
+ * The concept with its count of non-deleted library images and diagrams, in the same shape as a concept search result.
322
+ * Get one concept with its media counts
323
+ */
324
+ adminGetConcept(requestParameters: AdminGetConceptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptSearchResult>;
297
325
  /**
298
326
  * One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
299
327
  * Get a library concept diagram in any state
@@ -494,6 +522,16 @@ export declare class AdminApi extends runtime.BaseAPI {
494
522
  * List all taxonomy enrollments across the account
495
523
  */
496
524
  adminListTaxonomyEnrollments(requestParameters: AdminListTaxonomyEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedTaxonomyEnrollments>;
525
+ /**
526
+ * Concepts ranked by how many distinct users hold a user concept for them (a user with several account users counts once), most first, then by name. Concepts no user holds are left out. Each comes with its count of non-deleted library images and diagrams, for choosing which concepts to pre-generate media for.
527
+ * List the concepts the most users have
528
+ */
529
+ adminListTopConceptsRaw(requestParameters: AdminListTopConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AdminTopConcept>>>;
530
+ /**
531
+ * Concepts ranked by how many distinct users hold a user concept for them (a user with several account users counts once), most first, then by name. Concepts no user holds are left out. Each comes with its count of non-deleted library images and diagrams, for choosing which concepts to pre-generate media for.
532
+ * List the concepts the most users have
533
+ */
534
+ adminListTopConcepts(requestParameters: AdminListTopConceptsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminTopConcept>>;
497
535
  /**
498
536
  * List top N streaks across the account
499
537
  */
@@ -503,22 +541,22 @@ export declare class AdminApi extends runtime.BaseAPI {
503
541
  */
504
542
  adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
505
543
  /**
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).
544
+ * 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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
507
545
  * Enqueue a hidden revision of a concept diagram
508
546
  */
509
547
  adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
510
548
  /**
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).
549
+ * 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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
512
550
  * Enqueue a hidden revision of a concept diagram
513
551
  */
514
552
  adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
515
553
  /**
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).
554
+ * 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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
517
555
  * Enqueue a hidden revision of a concept image
518
556
  */
519
557
  adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
520
558
  /**
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).
559
+ * 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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
522
560
  * Enqueue a hidden revision of a concept image
523
561
  */
524
562
  adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
@@ -552,6 +590,26 @@ export declare class AdminApi extends runtime.BaseAPI {
552
590
  * Restore a soft-deleted concept image
553
591
  */
554
592
  adminRestoreConceptImage(requestParameters: AdminRestoreConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
593
+ /**
594
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the authoring model gets the original diagram\'s HTML fragment and is asked to apply these changes and keep everything else. The stored brief is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new diagram is 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).
595
+ * Enqueue a hidden revision of a concept diagram with only the given changes
596
+ */
597
+ adminReviseConceptDiagramRaw(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
598
+ /**
599
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the authoring model gets the original diagram\'s HTML fragment and is asked to apply these changes and keep everything else. The stored brief is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new diagram is 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).
600
+ * Enqueue a hidden revision of a concept diagram with only the given changes
601
+ */
602
+ adminReviseConceptDiagram(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
603
+ /**
604
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the original image itself goes to the image model\'s edit endpoint as a reference, with instructions to apply these changes and keep everything else. The stored prompt is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new image is 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).
605
+ * Enqueue a hidden revision of a concept image with only the given changes
606
+ */
607
+ adminReviseConceptImageRaw(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
608
+ /**
609
+ * Returns 202 with a pending job (operation revise) 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, as for a regenerate). Each job runs its paid generation at most once. Unlike a regenerate, the admin sends only what should change: the original image itself goes to the image model\'s edit endpoint as a reference, with instructions to apply these changes and keep everything else. The stored prompt is the original\'s with the changes appended. The changes are recorded on the new revision as revisionInstructions. The new image is 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).
610
+ * Enqueue a hidden revision of a concept image with only the given changes
611
+ */
612
+ adminReviseConceptImage(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
555
613
  /**
556
614
  * Concepts whose name contains the query (case-insensitive), exact and prefix matches first, each with its count of non-deleted library images and diagrams. For picking the concept an admin-generated image or diagram is filed under. Without a query, concepts by name.
557
615
  * Search the global concepts by name