@instructure/athena-api-client 4.2.0 → 4.3.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 +4 -0
- package/dist/apis/AdminApi.d.ts +35 -5
- package/dist/apis/AdminApi.js +96 -4
- package/dist/esm/apis/AdminApi.d.ts +35 -5
- package/dist/esm/apis/AdminApi.js +97 -5
- package/dist/esm/models/AdminConceptDiagram.d.ts +6 -0
- package/dist/esm/models/AdminConceptDiagram.js +4 -0
- package/dist/esm/models/AdminConceptDiagramDetail.d.ts +6 -0
- package/dist/esm/models/AdminConceptDiagramDetail.js +4 -0
- package/dist/esm/models/AdminConceptImage.d.ts +6 -0
- package/dist/esm/models/AdminConceptImage.js +4 -0
- package/dist/esm/models/AdminConceptImageDetail.d.ts +6 -0
- package/dist/esm/models/AdminConceptImageDetail.js +4 -0
- package/dist/esm/models/AdminConceptMediaJob.d.ts +4 -3
- package/dist/esm/models/AdminConceptMediaJob.js +2 -1
- package/dist/esm/models/AdminReviseConceptDiagramRequest.d.ts +44 -0
- package/dist/esm/models/AdminReviseConceptDiagramRequest.js +47 -0
- package/dist/esm/models/AdminReviseConceptImageRequest.d.ts +38 -0
- package/dist/esm/models/AdminReviseConceptImageRequest.js +45 -0
- package/dist/esm/models/AdminShownConceptDiagram.d.ts +6 -0
- package/dist/esm/models/AdminShownConceptDiagram.js +4 -0
- package/dist/esm/models/AdminShownConceptImage.d.ts +6 -0
- package/dist/esm/models/AdminShownConceptImage.js +4 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/AdminConceptDiagram.d.ts +6 -0
- package/dist/models/AdminConceptDiagram.js +4 -0
- package/dist/models/AdminConceptDiagramDetail.d.ts +6 -0
- package/dist/models/AdminConceptDiagramDetail.js +4 -0
- package/dist/models/AdminConceptImage.d.ts +6 -0
- package/dist/models/AdminConceptImage.js +4 -0
- package/dist/models/AdminConceptImageDetail.d.ts +6 -0
- package/dist/models/AdminConceptImageDetail.js +4 -0
- package/dist/models/AdminConceptMediaJob.d.ts +4 -3
- package/dist/models/AdminConceptMediaJob.js +2 -1
- package/dist/models/AdminReviseConceptDiagramRequest.d.ts +44 -0
- package/dist/models/AdminReviseConceptDiagramRequest.js +54 -0
- package/dist/models/AdminReviseConceptImageRequest.d.ts +38 -0
- package/dist/models/AdminReviseConceptImageRequest.js +52 -0
- package/dist/models/AdminShownConceptDiagram.d.ts +6 -0
- package/dist/models/AdminShownConceptDiagram.js +4 -0
- package/dist/models/AdminShownConceptImage.d.ts +6 -0
- package/dist/models/AdminShownConceptImage.js +4 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,6 +92,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
92
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
|
|
93
93
|
*AdminApi* | [**adminRestoreConceptDiagram**](docs/AdminApi.md#adminrestoreconceptdiagram) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/restore | Restore a soft-deleted concept diagram
|
|
94
94
|
*AdminApi* | [**adminRestoreConceptImage**](docs/AdminApi.md#adminrestoreconceptimage) | **POST** /api/v1/admin/concept-images/{imageId}/restore | Restore a soft-deleted concept image
|
|
95
|
+
*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
|
|
96
|
+
*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
97
|
*AdminApi* | [**adminSearchConcepts**](docs/AdminApi.md#adminsearchconcepts) | **GET** /api/v1/admin/concepts | Search the global concepts by name
|
|
96
98
|
*AdminApi* | [**adminShowConceptDiagram**](docs/AdminApi.md#adminshowconceptdiagram) | **POST** /api/v1/admin/concept-diagrams/{diagramId}/show | Show a hidden concept diagram to learners
|
|
97
99
|
*AdminApi* | [**adminShowConceptImage**](docs/AdminApi.md#adminshowconceptimage) | **POST** /api/v1/admin/concept-images/{imageId}/show | Show a hidden concept image to learners
|
|
@@ -280,6 +282,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
280
282
|
- [AdminRegenerateConceptDiagramRequest](docs/AdminRegenerateConceptDiagramRequest.md)
|
|
281
283
|
- [AdminRegenerateConceptImageRequest](docs/AdminRegenerateConceptImageRequest.md)
|
|
282
284
|
- [AdminResetLearningDataResponse](docs/AdminResetLearningDataResponse.md)
|
|
285
|
+
- [AdminReviseConceptDiagramRequest](docs/AdminReviseConceptDiagramRequest.md)
|
|
286
|
+
- [AdminReviseConceptImageRequest](docs/AdminReviseConceptImageRequest.md)
|
|
283
287
|
- [AdminShowConceptMediaRequest](docs/AdminShowConceptMediaRequest.md)
|
|
284
288
|
- [AdminShownConceptDiagram](docs/AdminShownConceptDiagram.md)
|
|
285
289
|
- [AdminShownConceptImage](docs/AdminShownConceptImage.md)
|
package/dist/apis/AdminApi.d.ts
CHANGED
|
@@ -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, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
|
|
14
14
|
export interface AdminDeleteConceptDiagramRequest {
|
|
15
15
|
xUserId: string;
|
|
16
16
|
diagramId: string;
|
|
@@ -194,6 +194,16 @@ export interface AdminRestoreConceptImageRequest {
|
|
|
194
194
|
xUserId: string;
|
|
195
195
|
imageId: string;
|
|
196
196
|
}
|
|
197
|
+
export interface AdminReviseConceptDiagramOperationRequest {
|
|
198
|
+
xUserId: string;
|
|
199
|
+
diagramId: string;
|
|
200
|
+
adminReviseConceptDiagramRequest: AdminReviseConceptDiagramRequest;
|
|
201
|
+
}
|
|
202
|
+
export interface AdminReviseConceptImageOperationRequest {
|
|
203
|
+
xUserId: string;
|
|
204
|
+
imageId: string;
|
|
205
|
+
adminReviseConceptImageRequest: AdminReviseConceptImageRequest;
|
|
206
|
+
}
|
|
197
207
|
export interface AdminSearchConceptsRequest {
|
|
198
208
|
xUserId: string;
|
|
199
209
|
query?: string;
|
|
@@ -503,22 +513,22 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
503
513
|
*/
|
|
504
514
|
adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
|
|
505
515
|
/**
|
|
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).
|
|
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 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
517
|
* Enqueue a hidden revision of a concept diagram
|
|
508
518
|
*/
|
|
509
519
|
adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
510
520
|
/**
|
|
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).
|
|
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 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
522
|
* Enqueue a hidden revision of a concept diagram
|
|
513
523
|
*/
|
|
514
524
|
adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
515
525
|
/**
|
|
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).
|
|
526
|
+
* 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
527
|
* Enqueue a hidden revision of a concept image
|
|
518
528
|
*/
|
|
519
529
|
adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
520
530
|
/**
|
|
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).
|
|
531
|
+
* 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
532
|
* Enqueue a hidden revision of a concept image
|
|
523
533
|
*/
|
|
524
534
|
adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
@@ -552,6 +562,26 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
552
562
|
* Restore a soft-deleted concept image
|
|
553
563
|
*/
|
|
554
564
|
adminRestoreConceptImage(requestParameters: AdminRestoreConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
|
|
565
|
+
/**
|
|
566
|
+
* 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).
|
|
567
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
568
|
+
*/
|
|
569
|
+
adminReviseConceptDiagramRaw(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
570
|
+
/**
|
|
571
|
+
* 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).
|
|
572
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
573
|
+
*/
|
|
574
|
+
adminReviseConceptDiagram(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
575
|
+
/**
|
|
576
|
+
* 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).
|
|
577
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
578
|
+
*/
|
|
579
|
+
adminReviseConceptImageRaw(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
580
|
+
/**
|
|
581
|
+
* 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).
|
|
582
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
583
|
+
*/
|
|
584
|
+
adminReviseConceptImage(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
555
585
|
/**
|
|
556
586
|
* 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
587
|
* Search the global concepts by name
|
package/dist/apis/AdminApi.js
CHANGED
|
@@ -1364,7 +1364,7 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
1366
1366
|
/**
|
|
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).
|
|
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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
|
|
1368
1368
|
* Enqueue a hidden revision of a concept diagram
|
|
1369
1369
|
*/
|
|
1370
1370
|
adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
|
|
@@ -1400,7 +1400,7 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
1402
1402
|
/**
|
|
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).
|
|
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). To change only part of the diagram and keep the rest, use adminReviseConceptDiagram instead.
|
|
1404
1404
|
* Enqueue a hidden revision of a concept diagram
|
|
1405
1405
|
*/
|
|
1406
1406
|
adminRegenerateConceptDiagram(requestParameters, initOverrides) {
|
|
@@ -1410,7 +1410,7 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
1410
1410
|
});
|
|
1411
1411
|
}
|
|
1412
1412
|
/**
|
|
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).
|
|
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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
|
|
1414
1414
|
* Enqueue a hidden revision of a concept image
|
|
1415
1415
|
*/
|
|
1416
1416
|
adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
|
|
@@ -1446,7 +1446,7 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
1446
1446
|
});
|
|
1447
1447
|
}
|
|
1448
1448
|
/**
|
|
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).
|
|
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). To change only part of the image and keep the rest, use adminReviseConceptImage instead.
|
|
1450
1450
|
* Enqueue a hidden revision of a concept image
|
|
1451
1451
|
*/
|
|
1452
1452
|
adminRegenerateConceptImage(requestParameters, initOverrides) {
|
|
@@ -1578,6 +1578,98 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
1578
1578
|
return yield response.value();
|
|
1579
1579
|
});
|
|
1580
1580
|
}
|
|
1581
|
+
/**
|
|
1582
|
+
* 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).
|
|
1583
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
1584
|
+
*/
|
|
1585
|
+
adminReviseConceptDiagramRaw(requestParameters, initOverrides) {
|
|
1586
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1587
|
+
if (requestParameters['xUserId'] == null) {
|
|
1588
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminReviseConceptDiagram().');
|
|
1589
|
+
}
|
|
1590
|
+
if (requestParameters['diagramId'] == null) {
|
|
1591
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminReviseConceptDiagram().');
|
|
1592
|
+
}
|
|
1593
|
+
if (requestParameters['adminReviseConceptDiagramRequest'] == null) {
|
|
1594
|
+
throw new runtime.RequiredError('adminReviseConceptDiagramRequest', 'Required parameter "adminReviseConceptDiagramRequest" was null or undefined when calling adminReviseConceptDiagram().');
|
|
1595
|
+
}
|
|
1596
|
+
const queryParameters = {};
|
|
1597
|
+
const headerParameters = {};
|
|
1598
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1599
|
+
if (requestParameters['xUserId'] != null) {
|
|
1600
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1601
|
+
}
|
|
1602
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1603
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1604
|
+
}
|
|
1605
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/revise`;
|
|
1606
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
1607
|
+
const response = yield this.request({
|
|
1608
|
+
path: urlPath,
|
|
1609
|
+
method: 'POST',
|
|
1610
|
+
headers: headerParameters,
|
|
1611
|
+
query: queryParameters,
|
|
1612
|
+
body: (0, index_1.AdminReviseConceptDiagramRequestToJSON)(requestParameters['adminReviseConceptDiagramRequest']),
|
|
1613
|
+
}, initOverrides);
|
|
1614
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* 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).
|
|
1619
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
1620
|
+
*/
|
|
1621
|
+
adminReviseConceptDiagram(requestParameters, initOverrides) {
|
|
1622
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1623
|
+
const response = yield this.adminReviseConceptDiagramRaw(requestParameters, initOverrides);
|
|
1624
|
+
return yield response.value();
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* 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).
|
|
1629
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
1630
|
+
*/
|
|
1631
|
+
adminReviseConceptImageRaw(requestParameters, initOverrides) {
|
|
1632
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1633
|
+
if (requestParameters['xUserId'] == null) {
|
|
1634
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminReviseConceptImage().');
|
|
1635
|
+
}
|
|
1636
|
+
if (requestParameters['imageId'] == null) {
|
|
1637
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminReviseConceptImage().');
|
|
1638
|
+
}
|
|
1639
|
+
if (requestParameters['adminReviseConceptImageRequest'] == null) {
|
|
1640
|
+
throw new runtime.RequiredError('adminReviseConceptImageRequest', 'Required parameter "adminReviseConceptImageRequest" was null or undefined when calling adminReviseConceptImage().');
|
|
1641
|
+
}
|
|
1642
|
+
const queryParameters = {};
|
|
1643
|
+
const headerParameters = {};
|
|
1644
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1645
|
+
if (requestParameters['xUserId'] != null) {
|
|
1646
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1647
|
+
}
|
|
1648
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1649
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1650
|
+
}
|
|
1651
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/revise`;
|
|
1652
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
1653
|
+
const response = yield this.request({
|
|
1654
|
+
path: urlPath,
|
|
1655
|
+
method: 'POST',
|
|
1656
|
+
headers: headerParameters,
|
|
1657
|
+
query: queryParameters,
|
|
1658
|
+
body: (0, index_1.AdminReviseConceptImageRequestToJSON)(requestParameters['adminReviseConceptImageRequest']),
|
|
1659
|
+
}, initOverrides);
|
|
1660
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* 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).
|
|
1665
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
1666
|
+
*/
|
|
1667
|
+
adminReviseConceptImage(requestParameters, initOverrides) {
|
|
1668
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1669
|
+
const response = yield this.adminReviseConceptImageRaw(requestParameters, initOverrides);
|
|
1670
|
+
return yield response.value();
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1581
1673
|
/**
|
|
1582
1674
|
* 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
1675
|
* 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, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
|
|
14
14
|
export interface AdminDeleteConceptDiagramRequest {
|
|
15
15
|
xUserId: string;
|
|
16
16
|
diagramId: string;
|
|
@@ -194,6 +194,16 @@ export interface AdminRestoreConceptImageRequest {
|
|
|
194
194
|
xUserId: string;
|
|
195
195
|
imageId: string;
|
|
196
196
|
}
|
|
197
|
+
export interface AdminReviseConceptDiagramOperationRequest {
|
|
198
|
+
xUserId: string;
|
|
199
|
+
diagramId: string;
|
|
200
|
+
adminReviseConceptDiagramRequest: AdminReviseConceptDiagramRequest;
|
|
201
|
+
}
|
|
202
|
+
export interface AdminReviseConceptImageOperationRequest {
|
|
203
|
+
xUserId: string;
|
|
204
|
+
imageId: string;
|
|
205
|
+
adminReviseConceptImageRequest: AdminReviseConceptImageRequest;
|
|
206
|
+
}
|
|
197
207
|
export interface AdminSearchConceptsRequest {
|
|
198
208
|
xUserId: string;
|
|
199
209
|
query?: string;
|
|
@@ -503,22 +513,22 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
503
513
|
*/
|
|
504
514
|
adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
|
|
505
515
|
/**
|
|
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).
|
|
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 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
517
|
* Enqueue a hidden revision of a concept diagram
|
|
508
518
|
*/
|
|
509
519
|
adminRegenerateConceptDiagramRaw(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
510
520
|
/**
|
|
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).
|
|
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 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
522
|
* Enqueue a hidden revision of a concept diagram
|
|
513
523
|
*/
|
|
514
524
|
adminRegenerateConceptDiagram(requestParameters: AdminRegenerateConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
515
525
|
/**
|
|
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).
|
|
526
|
+
* 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
527
|
* Enqueue a hidden revision of a concept image
|
|
518
528
|
*/
|
|
519
529
|
adminRegenerateConceptImageRaw(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
520
530
|
/**
|
|
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).
|
|
531
|
+
* 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
532
|
* Enqueue a hidden revision of a concept image
|
|
523
533
|
*/
|
|
524
534
|
adminRegenerateConceptImage(requestParameters: AdminRegenerateConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
@@ -552,6 +562,26 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
552
562
|
* Restore a soft-deleted concept image
|
|
553
563
|
*/
|
|
554
564
|
adminRestoreConceptImage(requestParameters: AdminRestoreConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptImageDetail>;
|
|
565
|
+
/**
|
|
566
|
+
* 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).
|
|
567
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
568
|
+
*/
|
|
569
|
+
adminReviseConceptDiagramRaw(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
570
|
+
/**
|
|
571
|
+
* 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).
|
|
572
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
573
|
+
*/
|
|
574
|
+
adminReviseConceptDiagram(requestParameters: AdminReviseConceptDiagramOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
575
|
+
/**
|
|
576
|
+
* 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).
|
|
577
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
578
|
+
*/
|
|
579
|
+
adminReviseConceptImageRaw(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminConceptMediaJob>>;
|
|
580
|
+
/**
|
|
581
|
+
* 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).
|
|
582
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
583
|
+
*/
|
|
584
|
+
adminReviseConceptImage(requestParameters: AdminReviseConceptImageOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminConceptMediaJob>;
|
|
555
585
|
/**
|
|
556
586
|
* 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
587
|
* Search the global concepts by name
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminConceptDiagramDetailFromJSON, AdminConceptImageDetailFromJSON, AdminConceptMediaJobFromJSON, AdminConceptSearchResultFromJSON, AdminGenerateConceptDiagramRequestToJSON, AdminGenerateConceptImageRequestToJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedConceptDiagramsFromJSON, AdminPaginatedConceptImagesFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizParticipantSessionsFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminRegenerateConceptDiagramRequestToJSON, AdminRegenerateConceptImageRequestToJSON, AdminResetLearningDataResponseFromJSON, AdminShowConceptMediaRequestToJSON, AdminShownConceptDiagramFromJSON, AdminShownConceptImageFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
|
|
24
|
+
import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminConceptDiagramDetailFromJSON, AdminConceptImageDetailFromJSON, AdminConceptMediaJobFromJSON, AdminConceptSearchResultFromJSON, AdminGenerateConceptDiagramRequestToJSON, AdminGenerateConceptImageRequestToJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedConceptDiagramsFromJSON, AdminPaginatedConceptImagesFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizParticipantSessionsFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminRegenerateConceptDiagramRequestToJSON, AdminRegenerateConceptImageRequestToJSON, AdminResetLearningDataResponseFromJSON, AdminReviseConceptDiagramRequestToJSON, AdminReviseConceptImageRequestToJSON, AdminShowConceptMediaRequestToJSON, AdminShownConceptDiagramFromJSON, AdminShownConceptImageFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -1361,7 +1361,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
1363
|
/**
|
|
1364
|
-
* 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).
|
|
1364
|
+
* 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.
|
|
1365
1365
|
* Enqueue a hidden revision of a concept diagram
|
|
1366
1366
|
*/
|
|
1367
1367
|
adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
|
|
@@ -1397,7 +1397,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1397
1397
|
});
|
|
1398
1398
|
}
|
|
1399
1399
|
/**
|
|
1400
|
-
* 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).
|
|
1400
|
+
* 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.
|
|
1401
1401
|
* Enqueue a hidden revision of a concept diagram
|
|
1402
1402
|
*/
|
|
1403
1403
|
adminRegenerateConceptDiagram(requestParameters, initOverrides) {
|
|
@@ -1407,7 +1407,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1407
1407
|
});
|
|
1408
1408
|
}
|
|
1409
1409
|
/**
|
|
1410
|
-
* 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).
|
|
1410
|
+
* 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.
|
|
1411
1411
|
* Enqueue a hidden revision of a concept image
|
|
1412
1412
|
*/
|
|
1413
1413
|
adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
|
|
@@ -1443,7 +1443,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
1445
|
/**
|
|
1446
|
-
* 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).
|
|
1446
|
+
* 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.
|
|
1447
1447
|
* Enqueue a hidden revision of a concept image
|
|
1448
1448
|
*/
|
|
1449
1449
|
adminRegenerateConceptImage(requestParameters, initOverrides) {
|
|
@@ -1575,6 +1575,98 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1575
1575
|
return yield response.value();
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
+
/**
|
|
1579
|
+
* 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).
|
|
1580
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
1581
|
+
*/
|
|
1582
|
+
adminReviseConceptDiagramRaw(requestParameters, initOverrides) {
|
|
1583
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1584
|
+
if (requestParameters['xUserId'] == null) {
|
|
1585
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminReviseConceptDiagram().');
|
|
1586
|
+
}
|
|
1587
|
+
if (requestParameters['diagramId'] == null) {
|
|
1588
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminReviseConceptDiagram().');
|
|
1589
|
+
}
|
|
1590
|
+
if (requestParameters['adminReviseConceptDiagramRequest'] == null) {
|
|
1591
|
+
throw new runtime.RequiredError('adminReviseConceptDiagramRequest', 'Required parameter "adminReviseConceptDiagramRequest" was null or undefined when calling adminReviseConceptDiagram().');
|
|
1592
|
+
}
|
|
1593
|
+
const queryParameters = {};
|
|
1594
|
+
const headerParameters = {};
|
|
1595
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1596
|
+
if (requestParameters['xUserId'] != null) {
|
|
1597
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1598
|
+
}
|
|
1599
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1600
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1601
|
+
}
|
|
1602
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/revise`;
|
|
1603
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
1604
|
+
const response = yield this.request({
|
|
1605
|
+
path: urlPath,
|
|
1606
|
+
method: 'POST',
|
|
1607
|
+
headers: headerParameters,
|
|
1608
|
+
query: queryParameters,
|
|
1609
|
+
body: AdminReviseConceptDiagramRequestToJSON(requestParameters['adminReviseConceptDiagramRequest']),
|
|
1610
|
+
}, initOverrides);
|
|
1611
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* 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).
|
|
1616
|
+
* Enqueue a hidden revision of a concept diagram with only the given changes
|
|
1617
|
+
*/
|
|
1618
|
+
adminReviseConceptDiagram(requestParameters, initOverrides) {
|
|
1619
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1620
|
+
const response = yield this.adminReviseConceptDiagramRaw(requestParameters, initOverrides);
|
|
1621
|
+
return yield response.value();
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* 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).
|
|
1626
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
1627
|
+
*/
|
|
1628
|
+
adminReviseConceptImageRaw(requestParameters, initOverrides) {
|
|
1629
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1630
|
+
if (requestParameters['xUserId'] == null) {
|
|
1631
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminReviseConceptImage().');
|
|
1632
|
+
}
|
|
1633
|
+
if (requestParameters['imageId'] == null) {
|
|
1634
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminReviseConceptImage().');
|
|
1635
|
+
}
|
|
1636
|
+
if (requestParameters['adminReviseConceptImageRequest'] == null) {
|
|
1637
|
+
throw new runtime.RequiredError('adminReviseConceptImageRequest', 'Required parameter "adminReviseConceptImageRequest" was null or undefined when calling adminReviseConceptImage().');
|
|
1638
|
+
}
|
|
1639
|
+
const queryParameters = {};
|
|
1640
|
+
const headerParameters = {};
|
|
1641
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1642
|
+
if (requestParameters['xUserId'] != null) {
|
|
1643
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1644
|
+
}
|
|
1645
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1646
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1647
|
+
}
|
|
1648
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/revise`;
|
|
1649
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
1650
|
+
const response = yield this.request({
|
|
1651
|
+
path: urlPath,
|
|
1652
|
+
method: 'POST',
|
|
1653
|
+
headers: headerParameters,
|
|
1654
|
+
query: queryParameters,
|
|
1655
|
+
body: AdminReviseConceptImageRequestToJSON(requestParameters['adminReviseConceptImageRequest']),
|
|
1656
|
+
}, initOverrides);
|
|
1657
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* 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).
|
|
1662
|
+
* Enqueue a hidden revision of a concept image with only the given changes
|
|
1663
|
+
*/
|
|
1664
|
+
adminReviseConceptImage(requestParameters, initOverrides) {
|
|
1665
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1666
|
+
const response = yield this.adminReviseConceptImageRaw(requestParameters, initOverrides);
|
|
1667
|
+
return yield response.value();
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1578
1670
|
/**
|
|
1579
1671
|
* 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.
|
|
1580
1672
|
* Search the global concepts by name
|
|
@@ -149,6 +149,12 @@ export interface AdminConceptDiagram {
|
|
|
149
149
|
* @memberof AdminConceptDiagram
|
|
150
150
|
*/
|
|
151
151
|
revisesDiagramId: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* The changes an admin asked for when this diagram was revised from the previous version (revisesDiagramId) by editing it, with everything else kept. Null for a fresh diagram and for a regeneration from a rewritten brief.
|
|
154
|
+
* @type {string}
|
|
155
|
+
* @memberof AdminConceptDiagram
|
|
156
|
+
*/
|
|
157
|
+
revisionInstructions: string | null;
|
|
152
158
|
/**
|
|
153
159
|
*
|
|
154
160
|
* @type {string}
|
|
@@ -76,6 +76,8 @@ export function instanceOfAdminConceptDiagram(value) {
|
|
|
76
76
|
return false;
|
|
77
77
|
if (!('revisesDiagramId' in value) || value['revisesDiagramId'] === undefined)
|
|
78
78
|
return false;
|
|
79
|
+
if (!('revisionInstructions' in value) || value['revisionInstructions'] === undefined)
|
|
80
|
+
return false;
|
|
79
81
|
if (!('title' in value) || value['title'] === undefined)
|
|
80
82
|
return false;
|
|
81
83
|
if (!('effort' in value) || value['effort'] === undefined)
|
|
@@ -112,6 +114,7 @@ export function AdminConceptDiagramFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
112
114
|
'costUsd': json['costUsd'],
|
|
113
115
|
'description': json['description'],
|
|
114
116
|
'revisesDiagramId': json['revisesDiagramId'],
|
|
117
|
+
'revisionInstructions': json['revisionInstructions'],
|
|
115
118
|
'title': json['title'],
|
|
116
119
|
'effort': json['effort'],
|
|
117
120
|
};
|
|
@@ -146,6 +149,7 @@ export function AdminConceptDiagramToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
146
149
|
'costUsd': value['costUsd'],
|
|
147
150
|
'description': value['description'],
|
|
148
151
|
'revisesDiagramId': value['revisesDiagramId'],
|
|
152
|
+
'revisionInstructions': value['revisionInstructions'],
|
|
149
153
|
'title': value['title'],
|
|
150
154
|
'effort': value['effort'],
|
|
151
155
|
};
|
|
@@ -151,6 +151,12 @@ export interface AdminConceptDiagramDetail {
|
|
|
151
151
|
* @memberof AdminConceptDiagramDetail
|
|
152
152
|
*/
|
|
153
153
|
revisesDiagramId: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* The changes an admin asked for when this diagram was revised from the previous version (revisesDiagramId) by editing it, with everything else kept. Null for a fresh diagram and for a regeneration from a rewritten brief.
|
|
156
|
+
* @type {string}
|
|
157
|
+
* @memberof AdminConceptDiagramDetail
|
|
158
|
+
*/
|
|
159
|
+
revisionInstructions: string | null;
|
|
154
160
|
/**
|
|
155
161
|
*
|
|
156
162
|
* @type {string}
|
|
@@ -78,6 +78,8 @@ export function instanceOfAdminConceptDiagramDetail(value) {
|
|
|
78
78
|
return false;
|
|
79
79
|
if (!('revisesDiagramId' in value) || value['revisesDiagramId'] === undefined)
|
|
80
80
|
return false;
|
|
81
|
+
if (!('revisionInstructions' in value) || value['revisionInstructions'] === undefined)
|
|
82
|
+
return false;
|
|
81
83
|
if (!('title' in value) || value['title'] === undefined)
|
|
82
84
|
return false;
|
|
83
85
|
if (!('effort' in value) || value['effort'] === undefined)
|
|
@@ -126,6 +128,7 @@ export function AdminConceptDiagramDetailFromJSONTyped(json, ignoreDiscriminator
|
|
|
126
128
|
'costUsd': json['costUsd'],
|
|
127
129
|
'description': json['description'],
|
|
128
130
|
'revisesDiagramId': json['revisesDiagramId'],
|
|
131
|
+
'revisionInstructions': json['revisionInstructions'],
|
|
129
132
|
'title': json['title'],
|
|
130
133
|
'effort': json['effort'],
|
|
131
134
|
'brief': json['brief'],
|
|
@@ -166,6 +169,7 @@ export function AdminConceptDiagramDetailToJSONTyped(value, ignoreDiscriminator
|
|
|
166
169
|
'costUsd': value['costUsd'],
|
|
167
170
|
'description': value['description'],
|
|
168
171
|
'revisesDiagramId': value['revisesDiagramId'],
|
|
172
|
+
'revisionInstructions': value['revisionInstructions'],
|
|
169
173
|
'title': value['title'],
|
|
170
174
|
'effort': value['effort'],
|
|
171
175
|
'brief': value['brief'],
|