@instructure/athena-api-client 3.47.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/apis/AdminApi.d.ts +39 -25
- package/dist/apis/AdminApi.js +61 -20
- package/dist/esm/apis/AdminApi.d.ts +39 -25
- package/dist/esm/apis/AdminApi.js +62 -21
- package/dist/esm/models/AdminConceptMediaJob.d.ts +157 -0
- package/dist/esm/models/AdminConceptMediaJob.js +139 -0
- package/dist/esm/models/index.d.ts +1 -2
- package/dist/esm/models/index.js +1 -2
- package/dist/models/AdminConceptMediaJob.d.ts +157 -0
- package/dist/models/AdminConceptMediaJob.js +147 -0
- package/dist/models/index.d.ts +1 -2
- package/dist/models/index.js +1 -2
- package/package.json +1 -1
|
@@ -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, AdminConceptSearchResultFromJSON, AdminGenerateConceptDiagramRequestToJSON, AdminGenerateConceptImageRequestToJSON,
|
|
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';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -109,8 +109,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
112
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
113
|
+
* Enqueue a hidden draft diagram for a concept
|
|
114
114
|
*/
|
|
115
115
|
adminGenerateConceptDiagramRaw(requestParameters, initOverrides) {
|
|
116
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -137,12 +137,12 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
137
137
|
query: queryParameters,
|
|
138
138
|
body: AdminGenerateConceptDiagramRequestToJSON(requestParameters['adminGenerateConceptDiagramRequest']),
|
|
139
139
|
}, initOverrides);
|
|
140
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
140
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
144
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
145
|
+
* Enqueue a hidden draft diagram for a concept
|
|
146
146
|
*/
|
|
147
147
|
adminGenerateConceptDiagram(requestParameters, initOverrides) {
|
|
148
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -151,8 +151,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
154
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
155
|
+
* Enqueue a hidden draft image for a concept
|
|
156
156
|
*/
|
|
157
157
|
adminGenerateConceptImageRaw(requestParameters, initOverrides) {
|
|
158
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -179,12 +179,12 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
179
179
|
query: queryParameters,
|
|
180
180
|
body: AdminGenerateConceptImageRequestToJSON(requestParameters['adminGenerateConceptImageRequest']),
|
|
181
181
|
}, initOverrides);
|
|
182
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
182
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
186
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
187
|
+
* Enqueue a hidden draft image for a concept
|
|
188
188
|
*/
|
|
189
189
|
adminGenerateConceptImage(requestParameters, initOverrides) {
|
|
190
190
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -438,6 +438,47 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
438
438
|
return yield response.value();
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
|
+
/**
|
|
442
|
+
* Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
|
|
443
|
+
* Get an admin concept media generation job
|
|
444
|
+
*/
|
|
445
|
+
adminGetConceptMediaJobRaw(requestParameters, initOverrides) {
|
|
446
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
447
|
+
if (requestParameters['xUserId'] == null) {
|
|
448
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptMediaJob().');
|
|
449
|
+
}
|
|
450
|
+
if (requestParameters['jobId'] == null) {
|
|
451
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling adminGetConceptMediaJob().');
|
|
452
|
+
}
|
|
453
|
+
const queryParameters = {};
|
|
454
|
+
const headerParameters = {};
|
|
455
|
+
if (requestParameters['xUserId'] != null) {
|
|
456
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
457
|
+
}
|
|
458
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
459
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
460
|
+
}
|
|
461
|
+
let urlPath = `/api/v1/admin/concept-media-jobs/{jobId}`;
|
|
462
|
+
urlPath = urlPath.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
463
|
+
const response = yield this.request({
|
|
464
|
+
path: urlPath,
|
|
465
|
+
method: 'GET',
|
|
466
|
+
headers: headerParameters,
|
|
467
|
+
query: queryParameters,
|
|
468
|
+
}, initOverrides);
|
|
469
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
|
|
474
|
+
* Get an admin concept media generation job
|
|
475
|
+
*/
|
|
476
|
+
adminGetConceptMediaJob(requestParameters, initOverrides) {
|
|
477
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
+
const response = yield this.adminGetConceptMediaJobRaw(requestParameters, initOverrides);
|
|
479
|
+
return yield response.value();
|
|
480
|
+
});
|
|
481
|
+
}
|
|
441
482
|
/**
|
|
442
483
|
* Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
|
|
443
484
|
* Get quiz session summary for any session within the account
|
|
@@ -1320,8 +1361,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1320
1361
|
});
|
|
1321
1362
|
}
|
|
1322
1363
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
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).
|
|
1365
|
+
* Enqueue a hidden revision of a concept diagram
|
|
1325
1366
|
*/
|
|
1326
1367
|
adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
|
|
1327
1368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1352,12 +1393,12 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1352
1393
|
query: queryParameters,
|
|
1353
1394
|
body: AdminRegenerateConceptDiagramRequestToJSON(requestParameters['adminRegenerateConceptDiagramRequest']),
|
|
1354
1395
|
}, initOverrides);
|
|
1355
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
1396
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
1356
1397
|
});
|
|
1357
1398
|
}
|
|
1358
1399
|
/**
|
|
1359
|
-
*
|
|
1360
|
-
*
|
|
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).
|
|
1401
|
+
* Enqueue a hidden revision of a concept diagram
|
|
1361
1402
|
*/
|
|
1362
1403
|
adminRegenerateConceptDiagram(requestParameters, initOverrides) {
|
|
1363
1404
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1366,8 +1407,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1366
1407
|
});
|
|
1367
1408
|
}
|
|
1368
1409
|
/**
|
|
1369
|
-
*
|
|
1370
|
-
*
|
|
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).
|
|
1411
|
+
* Enqueue a hidden revision of a concept image
|
|
1371
1412
|
*/
|
|
1372
1413
|
adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
|
|
1373
1414
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1398,12 +1439,12 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
1398
1439
|
query: queryParameters,
|
|
1399
1440
|
body: AdminRegenerateConceptImageRequestToJSON(requestParameters['adminRegenerateConceptImageRequest']),
|
|
1400
1441
|
}, initOverrides);
|
|
1401
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
1442
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
|
|
1402
1443
|
});
|
|
1403
1444
|
}
|
|
1404
1445
|
/**
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
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).
|
|
1447
|
+
* Enqueue a hidden revision of a concept image
|
|
1407
1448
|
*/
|
|
1408
1449
|
adminRegenerateConceptImage(requestParameters, initOverrides) {
|
|
1409
1450
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdminConceptMediaConcept } from './AdminConceptMediaConcept';
|
|
13
|
+
/**
|
|
14
|
+
* An asynchronous admin generation of a hidden concept image or diagram draft. Poll adminGetConceptMediaJob until status is succeeded (open resultMediaId with the kind's get operation) or failed (see errorCode and errorMessage).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminConceptMediaJob
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminConceptMediaJob {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AdminConceptMediaJob
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AdminConceptMediaJob
|
|
29
|
+
*/
|
|
30
|
+
kind: AdminConceptMediaJobKindEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof AdminConceptMediaJob
|
|
35
|
+
*/
|
|
36
|
+
operation: AdminConceptMediaJobOperationEnum;
|
|
37
|
+
/**
|
|
38
|
+
* pending: queued, not started. running: a worker is generating. succeeded and failed are final.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof AdminConceptMediaJob
|
|
41
|
+
*/
|
|
42
|
+
status: AdminConceptMediaJobStatusEnum;
|
|
43
|
+
/**
|
|
44
|
+
* The concept the draft is filed under, resolved at enqueue
|
|
45
|
+
* @type {AdminConceptMediaConcept}
|
|
46
|
+
* @memberof AdminConceptMediaJob
|
|
47
|
+
*/
|
|
48
|
+
concept: AdminConceptMediaConcept;
|
|
49
|
+
/**
|
|
50
|
+
* How the draft's concept (see concept) was chosen. selected: conceptId was given. For a conceptName: matched_exact, an existing concept with the same name (case-insensitive, normalized); matched_similar, the nearest existing concept within the dedup distance; created, no concept matched, so a new one was created. Null for a regenerate, which files under the revised row's concept.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof AdminConceptMediaJob
|
|
53
|
+
*/
|
|
54
|
+
conceptResolution: AdminConceptMediaJobConceptResolutionEnum | null;
|
|
55
|
+
/**
|
|
56
|
+
* For a regenerate, the image or diagram being revised
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof AdminConceptMediaJob
|
|
59
|
+
*/
|
|
60
|
+
sourceMediaId: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* When succeeded, the new hidden draft: an image id for kind image, a diagram id for kind diagram
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof AdminConceptMediaJob
|
|
65
|
+
*/
|
|
66
|
+
resultMediaId: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* When failed, why
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof AdminConceptMediaJob
|
|
71
|
+
*/
|
|
72
|
+
errorCode: AdminConceptMediaJobErrorCodeEnum | null;
|
|
73
|
+
/**
|
|
74
|
+
* When failed, a message to show the admin
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof AdminConceptMediaJob
|
|
77
|
+
*/
|
|
78
|
+
errorMessage: string | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof AdminConceptMediaJob
|
|
83
|
+
*/
|
|
84
|
+
createdAt: Date;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Date}
|
|
88
|
+
* @memberof AdminConceptMediaJob
|
|
89
|
+
*/
|
|
90
|
+
startedAt: Date | null;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof AdminConceptMediaJob
|
|
95
|
+
*/
|
|
96
|
+
finishedAt: Date | null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @export
|
|
100
|
+
*/
|
|
101
|
+
export declare const AdminConceptMediaJobKindEnum: {
|
|
102
|
+
readonly Image: "image";
|
|
103
|
+
readonly Diagram: "diagram";
|
|
104
|
+
};
|
|
105
|
+
export type AdminConceptMediaJobKindEnum = typeof AdminConceptMediaJobKindEnum[keyof typeof AdminConceptMediaJobKindEnum];
|
|
106
|
+
/**
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export declare const AdminConceptMediaJobOperationEnum: {
|
|
110
|
+
readonly Generate: "generate";
|
|
111
|
+
readonly Regenerate: "regenerate";
|
|
112
|
+
};
|
|
113
|
+
export type AdminConceptMediaJobOperationEnum = typeof AdminConceptMediaJobOperationEnum[keyof typeof AdminConceptMediaJobOperationEnum];
|
|
114
|
+
/**
|
|
115
|
+
* @export
|
|
116
|
+
*/
|
|
117
|
+
export declare const AdminConceptMediaJobStatusEnum: {
|
|
118
|
+
readonly Pending: "pending";
|
|
119
|
+
readonly Running: "running";
|
|
120
|
+
readonly Succeeded: "succeeded";
|
|
121
|
+
readonly Failed: "failed";
|
|
122
|
+
};
|
|
123
|
+
export type AdminConceptMediaJobStatusEnum = typeof AdminConceptMediaJobStatusEnum[keyof typeof AdminConceptMediaJobStatusEnum];
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export declare const AdminConceptMediaJobConceptResolutionEnum: {
|
|
128
|
+
readonly Selected: "selected";
|
|
129
|
+
readonly MatchedExact: "matched_exact";
|
|
130
|
+
readonly MatchedSimilar: "matched_similar";
|
|
131
|
+
readonly Created: "created";
|
|
132
|
+
};
|
|
133
|
+
export type AdminConceptMediaJobConceptResolutionEnum = typeof AdminConceptMediaJobConceptResolutionEnum[keyof typeof AdminConceptMediaJobConceptResolutionEnum];
|
|
134
|
+
/**
|
|
135
|
+
* @export
|
|
136
|
+
*/
|
|
137
|
+
export declare const AdminConceptMediaJobErrorCodeEnum: {
|
|
138
|
+
readonly OffTopic: "off_topic";
|
|
139
|
+
readonly ModerationBlocked: "moderation_blocked";
|
|
140
|
+
readonly Timeout: "timeout";
|
|
141
|
+
readonly NotFound: "not_found";
|
|
142
|
+
readonly GenerationFailed: "generation_failed";
|
|
143
|
+
readonly AuthoringFailed: "authoring_failed";
|
|
144
|
+
readonly SaveFailed: "save_failed";
|
|
145
|
+
readonly LimitReached: "limit_reached";
|
|
146
|
+
readonly InternalError: "internal_error";
|
|
147
|
+
readonly DeliveryFailed: "delivery_failed";
|
|
148
|
+
};
|
|
149
|
+
export type AdminConceptMediaJobErrorCodeEnum = typeof AdminConceptMediaJobErrorCodeEnum[keyof typeof AdminConceptMediaJobErrorCodeEnum];
|
|
150
|
+
/**
|
|
151
|
+
* Check if a given object implements the AdminConceptMediaJob interface.
|
|
152
|
+
*/
|
|
153
|
+
export declare function instanceOfAdminConceptMediaJob(value: object): value is AdminConceptMediaJob;
|
|
154
|
+
export declare function AdminConceptMediaJobFromJSON(json: any): AdminConceptMediaJob;
|
|
155
|
+
export declare function AdminConceptMediaJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminConceptMediaJob;
|
|
156
|
+
export declare function AdminConceptMediaJobToJSON(json: any): AdminConceptMediaJob;
|
|
157
|
+
export declare function AdminConceptMediaJobToJSONTyped(value?: AdminConceptMediaJob | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { AdminConceptMediaConceptFromJSON, AdminConceptMediaConceptToJSON, } from './AdminConceptMediaConcept';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const AdminConceptMediaJobKindEnum = {
|
|
19
|
+
Image: 'image',
|
|
20
|
+
Diagram: 'diagram'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const AdminConceptMediaJobOperationEnum = {
|
|
26
|
+
Generate: 'generate',
|
|
27
|
+
Regenerate: 'regenerate'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
export const AdminConceptMediaJobStatusEnum = {
|
|
33
|
+
Pending: 'pending',
|
|
34
|
+
Running: 'running',
|
|
35
|
+
Succeeded: 'succeeded',
|
|
36
|
+
Failed: 'failed'
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
export const AdminConceptMediaJobConceptResolutionEnum = {
|
|
42
|
+
Selected: 'selected',
|
|
43
|
+
MatchedExact: 'matched_exact',
|
|
44
|
+
MatchedSimilar: 'matched_similar',
|
|
45
|
+
Created: 'created'
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export const AdminConceptMediaJobErrorCodeEnum = {
|
|
51
|
+
OffTopic: 'off_topic',
|
|
52
|
+
ModerationBlocked: 'moderation_blocked',
|
|
53
|
+
Timeout: 'timeout',
|
|
54
|
+
NotFound: 'not_found',
|
|
55
|
+
GenerationFailed: 'generation_failed',
|
|
56
|
+
AuthoringFailed: 'authoring_failed',
|
|
57
|
+
SaveFailed: 'save_failed',
|
|
58
|
+
LimitReached: 'limit_reached',
|
|
59
|
+
InternalError: 'internal_error',
|
|
60
|
+
DeliveryFailed: 'delivery_failed'
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the AdminConceptMediaJob interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfAdminConceptMediaJob(value) {
|
|
66
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
67
|
+
return false;
|
|
68
|
+
if (!('kind' in value) || value['kind'] === undefined)
|
|
69
|
+
return false;
|
|
70
|
+
if (!('operation' in value) || value['operation'] === undefined)
|
|
71
|
+
return false;
|
|
72
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
73
|
+
return false;
|
|
74
|
+
if (!('concept' in value) || value['concept'] === undefined)
|
|
75
|
+
return false;
|
|
76
|
+
if (!('conceptResolution' in value) || value['conceptResolution'] === undefined)
|
|
77
|
+
return false;
|
|
78
|
+
if (!('sourceMediaId' in value) || value['sourceMediaId'] === undefined)
|
|
79
|
+
return false;
|
|
80
|
+
if (!('resultMediaId' in value) || value['resultMediaId'] === undefined)
|
|
81
|
+
return false;
|
|
82
|
+
if (!('errorCode' in value) || value['errorCode'] === undefined)
|
|
83
|
+
return false;
|
|
84
|
+
if (!('errorMessage' in value) || value['errorMessage'] === undefined)
|
|
85
|
+
return false;
|
|
86
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
87
|
+
return false;
|
|
88
|
+
if (!('startedAt' in value) || value['startedAt'] === undefined)
|
|
89
|
+
return false;
|
|
90
|
+
if (!('finishedAt' in value) || value['finishedAt'] === undefined)
|
|
91
|
+
return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
export function AdminConceptMediaJobFromJSON(json) {
|
|
95
|
+
return AdminConceptMediaJobFromJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
export function AdminConceptMediaJobFromJSONTyped(json, ignoreDiscriminator) {
|
|
98
|
+
if (json == null) {
|
|
99
|
+
return json;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
'id': json['id'],
|
|
103
|
+
'kind': json['kind'],
|
|
104
|
+
'operation': json['operation'],
|
|
105
|
+
'status': json['status'],
|
|
106
|
+
'concept': AdminConceptMediaConceptFromJSON(json['concept']),
|
|
107
|
+
'conceptResolution': json['conceptResolution'],
|
|
108
|
+
'sourceMediaId': json['sourceMediaId'],
|
|
109
|
+
'resultMediaId': json['resultMediaId'],
|
|
110
|
+
'errorCode': json['errorCode'],
|
|
111
|
+
'errorMessage': json['errorMessage'],
|
|
112
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
113
|
+
'startedAt': (json['startedAt'] == null ? null : new Date(json['startedAt'])),
|
|
114
|
+
'finishedAt': (json['finishedAt'] == null ? null : new Date(json['finishedAt'])),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function AdminConceptMediaJobToJSON(json) {
|
|
118
|
+
return AdminConceptMediaJobToJSONTyped(json, false);
|
|
119
|
+
}
|
|
120
|
+
export function AdminConceptMediaJobToJSONTyped(value, ignoreDiscriminator = false) {
|
|
121
|
+
if (value == null) {
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
'id': value['id'],
|
|
126
|
+
'kind': value['kind'],
|
|
127
|
+
'operation': value['operation'],
|
|
128
|
+
'status': value['status'],
|
|
129
|
+
'concept': AdminConceptMediaConceptToJSON(value['concept']),
|
|
130
|
+
'conceptResolution': value['conceptResolution'],
|
|
131
|
+
'sourceMediaId': value['sourceMediaId'],
|
|
132
|
+
'resultMediaId': value['resultMediaId'],
|
|
133
|
+
'errorCode': value['errorCode'],
|
|
134
|
+
'errorMessage': value['errorMessage'],
|
|
135
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
136
|
+
'startedAt': value['startedAt'] == null ? value['startedAt'] : value['startedAt'].toISOString(),
|
|
137
|
+
'finishedAt': value['finishedAt'] == null ? value['finishedAt'] : value['finishedAt'].toISOString(),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
@@ -24,14 +24,13 @@ export * from './AdminConceptImageDetail';
|
|
|
24
24
|
export * from './AdminConceptMediaActor';
|
|
25
25
|
export * from './AdminConceptMediaConcept';
|
|
26
26
|
export * from './AdminConceptMediaHistoryEntry';
|
|
27
|
+
export * from './AdminConceptMediaJob';
|
|
27
28
|
export * from './AdminConceptMediaRevision';
|
|
28
29
|
export * from './AdminConceptSearchResult';
|
|
29
30
|
export * from './AdminExchangeChat';
|
|
30
31
|
export * from './AdminExchangeMessage';
|
|
31
32
|
export * from './AdminGenerateConceptDiagramRequest';
|
|
32
33
|
export * from './AdminGenerateConceptImageRequest';
|
|
33
|
-
export * from './AdminGeneratedConceptDiagram';
|
|
34
|
-
export * from './AdminGeneratedConceptImage';
|
|
35
34
|
export * from './AdminLastExchange';
|
|
36
35
|
export * from './AdminPaginatedActiveStreaks';
|
|
37
36
|
export * from './AdminPaginatedChats';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -26,14 +26,13 @@ export * from './AdminConceptImageDetail';
|
|
|
26
26
|
export * from './AdminConceptMediaActor';
|
|
27
27
|
export * from './AdminConceptMediaConcept';
|
|
28
28
|
export * from './AdminConceptMediaHistoryEntry';
|
|
29
|
+
export * from './AdminConceptMediaJob';
|
|
29
30
|
export * from './AdminConceptMediaRevision';
|
|
30
31
|
export * from './AdminConceptSearchResult';
|
|
31
32
|
export * from './AdminExchangeChat';
|
|
32
33
|
export * from './AdminExchangeMessage';
|
|
33
34
|
export * from './AdminGenerateConceptDiagramRequest';
|
|
34
35
|
export * from './AdminGenerateConceptImageRequest';
|
|
35
|
-
export * from './AdminGeneratedConceptDiagram';
|
|
36
|
-
export * from './AdminGeneratedConceptImage';
|
|
37
36
|
export * from './AdminLastExchange';
|
|
38
37
|
export * from './AdminPaginatedActiveStreaks';
|
|
39
38
|
export * from './AdminPaginatedChats';
|