@instructure/athena-api-client 3.46.2 → 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 +37 -0
- package/dist/apis/AdminApi.d.ts +310 -1
- package/dist/apis/AdminApi.js +850 -20
- package/dist/esm/apis/AdminApi.d.ts +310 -1
- package/dist/esm/apis/AdminApi.js +850 -20
- package/dist/esm/models/AdminConceptDiagram.d.ts +165 -0
- package/dist/esm/models/AdminConceptDiagram.js +136 -0
- package/dist/esm/models/AdminConceptDiagramDetail.d.ts +203 -0
- package/dist/esm/models/AdminConceptDiagramDetail.js +162 -0
- package/dist/esm/models/AdminConceptImage.d.ts +183 -0
- package/dist/esm/models/AdminConceptImage.js +148 -0
- package/dist/esm/models/AdminConceptImageDetail.d.ts +221 -0
- package/dist/esm/models/AdminConceptImageDetail.js +174 -0
- package/dist/esm/models/AdminConceptMediaActor.d.ts +38 -0
- package/dist/esm/models/AdminConceptMediaActor.js +47 -0
- package/dist/esm/models/AdminConceptMediaConcept.d.ts +38 -0
- package/dist/esm/models/AdminConceptMediaConcept.js +47 -0
- package/dist/esm/models/AdminConceptMediaHistoryEntry.d.ts +92 -0
- package/dist/esm/models/AdminConceptMediaHistoryEntry.js +87 -0
- package/dist/esm/models/AdminConceptMediaJob.d.ts +157 -0
- package/dist/esm/models/AdminConceptMediaJob.js +139 -0
- package/dist/esm/models/AdminConceptMediaRevision.d.ts +67 -0
- package/dist/esm/models/AdminConceptMediaRevision.js +70 -0
- package/dist/esm/models/AdminConceptSearchResult.d.ts +56 -0
- package/dist/esm/models/AdminConceptSearchResult.js +59 -0
- package/dist/esm/models/AdminGenerateConceptDiagramRequest.d.ts +56 -0
- package/dist/esm/models/AdminGenerateConceptDiagramRequest.js +51 -0
- package/dist/esm/models/AdminGenerateConceptImageRequest.d.ts +50 -0
- package/dist/esm/models/AdminGenerateConceptImageRequest.js +49 -0
- package/dist/esm/models/AdminGeneratedConceptDiagram.d.ts +219 -0
- package/dist/esm/models/AdminGeneratedConceptDiagram.js +175 -0
- package/dist/esm/models/AdminGeneratedConceptImage.d.ts +237 -0
- package/dist/esm/models/AdminGeneratedConceptImage.js +187 -0
- package/dist/esm/models/AdminPaginatedConceptDiagrams.d.ts +39 -0
- package/dist/esm/models/AdminPaginatedConceptDiagrams.js +48 -0
- package/dist/esm/models/AdminPaginatedConceptImages.d.ts +39 -0
- package/dist/esm/models/AdminPaginatedConceptImages.js +48 -0
- package/dist/esm/models/AdminRegenerateConceptDiagramRequest.d.ts +44 -0
- package/dist/esm/models/AdminRegenerateConceptDiagramRequest.js +47 -0
- package/dist/esm/models/AdminRegenerateConceptImageRequest.d.ts +38 -0
- package/dist/esm/models/AdminRegenerateConceptImageRequest.js +45 -0
- package/dist/esm/models/AdminShowConceptMediaRequest.d.ts +32 -0
- package/dist/esm/models/AdminShowConceptMediaRequest.js +41 -0
- package/dist/esm/models/AdminShownConceptDiagram.d.ts +215 -0
- package/dist/esm/models/AdminShownConceptDiagram.js +170 -0
- package/dist/esm/models/AdminShownConceptImage.d.ts +233 -0
- package/dist/esm/models/AdminShownConceptImage.js +182 -0
- package/dist/esm/models/index.d.ts +19 -0
- package/dist/esm/models/index.js +19 -0
- package/dist/models/AdminConceptDiagram.d.ts +165 -0
- package/dist/models/AdminConceptDiagram.js +144 -0
- package/dist/models/AdminConceptDiagramDetail.d.ts +203 -0
- package/dist/models/AdminConceptDiagramDetail.js +170 -0
- package/dist/models/AdminConceptImage.d.ts +183 -0
- package/dist/models/AdminConceptImage.js +156 -0
- package/dist/models/AdminConceptImageDetail.d.ts +221 -0
- package/dist/models/AdminConceptImageDetail.js +182 -0
- package/dist/models/AdminConceptMediaActor.d.ts +38 -0
- package/dist/models/AdminConceptMediaActor.js +54 -0
- package/dist/models/AdminConceptMediaConcept.d.ts +38 -0
- package/dist/models/AdminConceptMediaConcept.js +54 -0
- package/dist/models/AdminConceptMediaHistoryEntry.d.ts +92 -0
- package/dist/models/AdminConceptMediaHistoryEntry.js +95 -0
- package/dist/models/AdminConceptMediaJob.d.ts +157 -0
- package/dist/models/AdminConceptMediaJob.js +147 -0
- package/dist/models/AdminConceptMediaRevision.d.ts +67 -0
- package/dist/models/AdminConceptMediaRevision.js +78 -0
- package/dist/models/AdminConceptSearchResult.d.ts +56 -0
- package/dist/models/AdminConceptSearchResult.js +66 -0
- package/dist/models/AdminGenerateConceptDiagramRequest.d.ts +56 -0
- package/dist/models/AdminGenerateConceptDiagramRequest.js +58 -0
- package/dist/models/AdminGenerateConceptImageRequest.d.ts +50 -0
- package/dist/models/AdminGenerateConceptImageRequest.js +56 -0
- package/dist/models/AdminGeneratedConceptDiagram.d.ts +219 -0
- package/dist/models/AdminGeneratedConceptDiagram.js +183 -0
- package/dist/models/AdminGeneratedConceptImage.d.ts +237 -0
- package/dist/models/AdminGeneratedConceptImage.js +195 -0
- package/dist/models/AdminPaginatedConceptDiagrams.d.ts +39 -0
- package/dist/models/AdminPaginatedConceptDiagrams.js +55 -0
- package/dist/models/AdminPaginatedConceptImages.d.ts +39 -0
- package/dist/models/AdminPaginatedConceptImages.js +55 -0
- package/dist/models/AdminRegenerateConceptDiagramRequest.d.ts +44 -0
- package/dist/models/AdminRegenerateConceptDiagramRequest.js +54 -0
- package/dist/models/AdminRegenerateConceptImageRequest.d.ts +38 -0
- package/dist/models/AdminRegenerateConceptImageRequest.js +52 -0
- package/dist/models/AdminShowConceptMediaRequest.d.ts +32 -0
- package/dist/models/AdminShowConceptMediaRequest.js +48 -0
- package/dist/models/AdminShownConceptDiagram.d.ts +215 -0
- package/dist/models/AdminShownConceptDiagram.js +178 -0
- package/dist/models/AdminShownConceptImage.d.ts +233 -0
- package/dist/models/AdminShownConceptImage.js +190 -0
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.js +19 -0
- package/package.json +1 -1
package/dist/apis/AdminApi.js
CHANGED
|
@@ -22,13 +22,179 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.AdminListStudyObjectivesByUserArchivedEnum = exports.AdminListStudyObjectivesByUserOriginEnum = exports.AdminListStudyObjectivesArchivedEnum = exports.AdminListStudyObjectivesOriginEnum = exports.AdminListQuizSessionsStatusEnum = exports.AdminListQuizSessionsModeEnum = exports.AdminApi = void 0;
|
|
25
|
+
exports.AdminListStudyObjectivesByUserArchivedEnum = exports.AdminListStudyObjectivesByUserOriginEnum = exports.AdminListStudyObjectivesArchivedEnum = exports.AdminListStudyObjectivesOriginEnum = exports.AdminListQuizSessionsStatusEnum = exports.AdminListQuizSessionsModeEnum = exports.AdminListConceptImagesOriginEnum = exports.AdminListConceptImagesStateEnum = exports.AdminListConceptDiagramsOriginEnum = exports.AdminListConceptDiagramsStateEnum = exports.AdminApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
27
|
const index_1 = require("../models/index");
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class AdminApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Removes the diagram from every learner read and from the default admin list. The row is kept. Idempotent. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
|
|
34
|
+
* Soft-delete a concept diagram
|
|
35
|
+
*/
|
|
36
|
+
adminDeleteConceptDiagramRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminDeleteConceptDiagram().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['diagramId'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminDeleteConceptDiagram().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (requestParameters['xUserId'] != null) {
|
|
47
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
48
|
+
}
|
|
49
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
50
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/delete`;
|
|
53
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
54
|
+
const response = yield this.request({
|
|
55
|
+
path: urlPath,
|
|
56
|
+
method: 'POST',
|
|
57
|
+
headers: headerParameters,
|
|
58
|
+
query: queryParameters,
|
|
59
|
+
}, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Removes the diagram from every learner read and from the default admin list. The row is kept. Idempotent. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
|
|
65
|
+
* Soft-delete a concept diagram
|
|
66
|
+
*/
|
|
67
|
+
adminDeleteConceptDiagram(requestParameters, initOverrides) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const response = yield this.adminDeleteConceptDiagramRaw(requestParameters, initOverrides);
|
|
70
|
+
return yield response.value();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Removes the image from every learner read and from the default admin list. The row and its stored image bytes are kept. Idempotent. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
75
|
+
* Soft-delete a concept image
|
|
76
|
+
*/
|
|
77
|
+
adminDeleteConceptImageRaw(requestParameters, initOverrides) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
if (requestParameters['xUserId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminDeleteConceptImage().');
|
|
81
|
+
}
|
|
82
|
+
if (requestParameters['imageId'] == null) {
|
|
83
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminDeleteConceptImage().');
|
|
84
|
+
}
|
|
85
|
+
const queryParameters = {};
|
|
86
|
+
const headerParameters = {};
|
|
87
|
+
if (requestParameters['xUserId'] != null) {
|
|
88
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
89
|
+
}
|
|
90
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
91
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
92
|
+
}
|
|
93
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/delete`;
|
|
94
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
95
|
+
const response = yield this.request({
|
|
96
|
+
path: urlPath,
|
|
97
|
+
method: 'POST',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters,
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptImageDetailFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Removes the image from every learner read and from the default admin list. The row and its stored image bytes are kept. Idempotent. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
106
|
+
* Soft-delete a concept image
|
|
107
|
+
*/
|
|
108
|
+
adminDeleteConceptImage(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const response = yield this.adminDeleteConceptImageRaw(requestParameters, initOverrides);
|
|
111
|
+
return yield response.value();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
116
|
+
* Enqueue a hidden draft diagram for a concept
|
|
117
|
+
*/
|
|
118
|
+
adminGenerateConceptDiagramRaw(requestParameters, initOverrides) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
if (requestParameters['xUserId'] == null) {
|
|
121
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGenerateConceptDiagram().');
|
|
122
|
+
}
|
|
123
|
+
if (requestParameters['adminGenerateConceptDiagramRequest'] == null) {
|
|
124
|
+
throw new runtime.RequiredError('adminGenerateConceptDiagramRequest', 'Required parameter "adminGenerateConceptDiagramRequest" was null or undefined when calling adminGenerateConceptDiagram().');
|
|
125
|
+
}
|
|
126
|
+
const queryParameters = {};
|
|
127
|
+
const headerParameters = {};
|
|
128
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
129
|
+
if (requestParameters['xUserId'] != null) {
|
|
130
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
131
|
+
}
|
|
132
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
133
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
134
|
+
}
|
|
135
|
+
let urlPath = `/api/v1/admin/concept-diagrams`;
|
|
136
|
+
const response = yield this.request({
|
|
137
|
+
path: urlPath,
|
|
138
|
+
method: 'POST',
|
|
139
|
+
headers: headerParameters,
|
|
140
|
+
query: queryParameters,
|
|
141
|
+
body: (0, index_1.AdminGenerateConceptDiagramRequestToJSON)(requestParameters['adminGenerateConceptDiagramRequest']),
|
|
142
|
+
}, initOverrides);
|
|
143
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing diagram. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
148
|
+
* Enqueue a hidden draft diagram for a concept
|
|
149
|
+
*/
|
|
150
|
+
adminGenerateConceptDiagram(requestParameters, initOverrides) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const response = yield this.adminGenerateConceptDiagramRaw(requestParameters, initOverrides);
|
|
153
|
+
return yield response.value();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
158
|
+
* Enqueue a hidden draft image for a concept
|
|
159
|
+
*/
|
|
160
|
+
adminGenerateConceptImageRaw(requestParameters, initOverrides) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
if (requestParameters['xUserId'] == null) {
|
|
163
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGenerateConceptImage().');
|
|
164
|
+
}
|
|
165
|
+
if (requestParameters['adminGenerateConceptImageRequest'] == null) {
|
|
166
|
+
throw new runtime.RequiredError('adminGenerateConceptImageRequest', 'Required parameter "adminGenerateConceptImageRequest" was null or undefined when calling adminGenerateConceptImage().');
|
|
167
|
+
}
|
|
168
|
+
const queryParameters = {};
|
|
169
|
+
const headerParameters = {};
|
|
170
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
171
|
+
if (requestParameters['xUserId'] != null) {
|
|
172
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
173
|
+
}
|
|
174
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
175
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
176
|
+
}
|
|
177
|
+
let urlPath = `/api/v1/admin/concept-images`;
|
|
178
|
+
const response = yield this.request({
|
|
179
|
+
path: urlPath,
|
|
180
|
+
method: 'POST',
|
|
181
|
+
headers: headerParameters,
|
|
182
|
+
query: queryParameters,
|
|
183
|
+
body: (0, index_1.AdminGenerateConceptImageRequestToJSON)(requestParameters['adminGenerateConceptImageRequest']),
|
|
184
|
+
}, initOverrides);
|
|
185
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The draft is filed under exactly one concept: conceptId as-is, or conceptName resolved before the job is queued (exact normalized name match, else the nearest concept within the dedup distance, else a new concept, which stays even if generation then fails). conceptResolution in the job says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat, stored hidden for review, and never matched to an existing image. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours, counting queued and running jobs as well as saved drafts), not the learner limit.
|
|
190
|
+
* Enqueue a hidden draft image for a concept
|
|
191
|
+
*/
|
|
192
|
+
adminGenerateConceptImage(requestParameters, initOverrides) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
+
const response = yield this.adminGenerateConceptImageRaw(requestParameters, initOverrides);
|
|
195
|
+
return yield response.value();
|
|
196
|
+
});
|
|
197
|
+
}
|
|
32
198
|
/**
|
|
33
199
|
* Get any chat by ID within the account
|
|
34
200
|
*/
|
|
@@ -193,6 +359,129 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
193
359
|
return yield response.value();
|
|
194
360
|
});
|
|
195
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
|
|
364
|
+
* Get a library concept diagram in any state
|
|
365
|
+
*/
|
|
366
|
+
adminGetConceptDiagramRaw(requestParameters, initOverrides) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
if (requestParameters['xUserId'] == null) {
|
|
369
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptDiagram().');
|
|
370
|
+
}
|
|
371
|
+
if (requestParameters['diagramId'] == null) {
|
|
372
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminGetConceptDiagram().');
|
|
373
|
+
}
|
|
374
|
+
const queryParameters = {};
|
|
375
|
+
const headerParameters = {};
|
|
376
|
+
if (requestParameters['xUserId'] != null) {
|
|
377
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
378
|
+
}
|
|
379
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
380
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
381
|
+
}
|
|
382
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}`;
|
|
383
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
384
|
+
const response = yield this.request({
|
|
385
|
+
path: urlPath,
|
|
386
|
+
method: 'GET',
|
|
387
|
+
headers: headerParameters,
|
|
388
|
+
query: queryParameters,
|
|
389
|
+
}, initOverrides);
|
|
390
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
|
|
395
|
+
* Get a library concept diagram in any state
|
|
396
|
+
*/
|
|
397
|
+
adminGetConceptDiagram(requestParameters, initOverrides) {
|
|
398
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
+
const response = yield this.adminGetConceptDiagramRaw(requestParameters, initOverrides);
|
|
400
|
+
return yield response.value();
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* One image, hidden or deleted included, with its prompt (and the editable prompt without the style preamble) and its revision lineage.
|
|
405
|
+
* Get a library concept image in any state
|
|
406
|
+
*/
|
|
407
|
+
adminGetConceptImageRaw(requestParameters, initOverrides) {
|
|
408
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
if (requestParameters['xUserId'] == null) {
|
|
410
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptImage().');
|
|
411
|
+
}
|
|
412
|
+
if (requestParameters['imageId'] == null) {
|
|
413
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminGetConceptImage().');
|
|
414
|
+
}
|
|
415
|
+
const queryParameters = {};
|
|
416
|
+
const headerParameters = {};
|
|
417
|
+
if (requestParameters['xUserId'] != null) {
|
|
418
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
419
|
+
}
|
|
420
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
421
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
422
|
+
}
|
|
423
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}`;
|
|
424
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
425
|
+
const response = yield this.request({
|
|
426
|
+
path: urlPath,
|
|
427
|
+
method: 'GET',
|
|
428
|
+
headers: headerParameters,
|
|
429
|
+
query: queryParameters,
|
|
430
|
+
}, initOverrides);
|
|
431
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptImageDetailFromJSON)(jsonValue));
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* One image, hidden or deleted included, with its prompt (and the editable prompt without the style preamble) and its revision lineage.
|
|
436
|
+
* Get a library concept image in any state
|
|
437
|
+
*/
|
|
438
|
+
adminGetConceptImage(requestParameters, initOverrides) {
|
|
439
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
440
|
+
const response = yield this.adminGetConceptImageRaw(requestParameters, initOverrides);
|
|
441
|
+
return yield response.value();
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
|
|
446
|
+
* Get an admin concept media generation job
|
|
447
|
+
*/
|
|
448
|
+
adminGetConceptMediaJobRaw(requestParameters, initOverrides) {
|
|
449
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
450
|
+
if (requestParameters['xUserId'] == null) {
|
|
451
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptMediaJob().');
|
|
452
|
+
}
|
|
453
|
+
if (requestParameters['jobId'] == null) {
|
|
454
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling adminGetConceptMediaJob().');
|
|
455
|
+
}
|
|
456
|
+
const queryParameters = {};
|
|
457
|
+
const headerParameters = {};
|
|
458
|
+
if (requestParameters['xUserId'] != null) {
|
|
459
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
460
|
+
}
|
|
461
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
462
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
463
|
+
}
|
|
464
|
+
let urlPath = `/api/v1/admin/concept-media-jobs/{jobId}`;
|
|
465
|
+
urlPath = urlPath.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
466
|
+
const response = yield this.request({
|
|
467
|
+
path: urlPath,
|
|
468
|
+
method: 'GET',
|
|
469
|
+
headers: headerParameters,
|
|
470
|
+
query: queryParameters,
|
|
471
|
+
}, initOverrides);
|
|
472
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Poll after a generate or regenerate (every few seconds) until status is succeeded or failed. On success, resultMediaId is the new hidden draft: open it with adminGetConceptImage or adminGetConceptDiagram per kind. On failure, errorCode and errorMessage say why. A job left pending or running past its deadline (the generation timeout plus a margin while running; 30 minutes while pending) is reported failed with errorCode timeout. Only jobs requested by account users in the caller\'s account are found.
|
|
477
|
+
* Get an admin concept media generation job
|
|
478
|
+
*/
|
|
479
|
+
adminGetConceptMediaJob(requestParameters, initOverrides) {
|
|
480
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
481
|
+
const response = yield this.adminGetConceptMediaJobRaw(requestParameters, initOverrides);
|
|
482
|
+
return yield response.value();
|
|
483
|
+
});
|
|
484
|
+
}
|
|
196
485
|
/**
|
|
197
486
|
* Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
|
|
198
487
|
* Get quiz session summary for any session within the account
|
|
@@ -433,13 +722,184 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
433
722
|
return yield response.value();
|
|
434
723
|
});
|
|
435
724
|
}
|
|
725
|
+
/**
|
|
726
|
+
* Keeps the diagram out of every learner read. Idempotent: an already hidden diagram keeps its original hide time and actor. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
|
|
727
|
+
* Hide a concept diagram from learners
|
|
728
|
+
*/
|
|
729
|
+
adminHideConceptDiagramRaw(requestParameters, initOverrides) {
|
|
730
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
731
|
+
if (requestParameters['xUserId'] == null) {
|
|
732
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminHideConceptDiagram().');
|
|
733
|
+
}
|
|
734
|
+
if (requestParameters['diagramId'] == null) {
|
|
735
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminHideConceptDiagram().');
|
|
736
|
+
}
|
|
737
|
+
const queryParameters = {};
|
|
738
|
+
const headerParameters = {};
|
|
739
|
+
if (requestParameters['xUserId'] != null) {
|
|
740
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
741
|
+
}
|
|
742
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
743
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
744
|
+
}
|
|
745
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/hide`;
|
|
746
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
747
|
+
const response = yield this.request({
|
|
748
|
+
path: urlPath,
|
|
749
|
+
method: 'POST',
|
|
750
|
+
headers: headerParameters,
|
|
751
|
+
query: queryParameters,
|
|
752
|
+
}, initOverrides);
|
|
753
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Keeps the diagram out of every learner read. Idempotent: an already hidden diagram keeps its original hide time and actor. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
|
|
758
|
+
* Hide a concept diagram from learners
|
|
759
|
+
*/
|
|
760
|
+
adminHideConceptDiagram(requestParameters, initOverrides) {
|
|
761
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
762
|
+
const response = yield this.adminHideConceptDiagramRaw(requestParameters, initOverrides);
|
|
763
|
+
return yield response.value();
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Keeps the image out of every learner read. Idempotent: an already hidden image keeps its original hide time and actor. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
768
|
+
* Hide a concept image from learners
|
|
769
|
+
*/
|
|
770
|
+
adminHideConceptImageRaw(requestParameters, initOverrides) {
|
|
771
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
772
|
+
if (requestParameters['xUserId'] == null) {
|
|
773
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminHideConceptImage().');
|
|
774
|
+
}
|
|
775
|
+
if (requestParameters['imageId'] == null) {
|
|
776
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminHideConceptImage().');
|
|
777
|
+
}
|
|
778
|
+
const queryParameters = {};
|
|
779
|
+
const headerParameters = {};
|
|
780
|
+
if (requestParameters['xUserId'] != null) {
|
|
781
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
782
|
+
}
|
|
783
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
784
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
785
|
+
}
|
|
786
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/hide`;
|
|
787
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
788
|
+
const response = yield this.request({
|
|
789
|
+
path: urlPath,
|
|
790
|
+
method: 'POST',
|
|
791
|
+
headers: headerParameters,
|
|
792
|
+
query: queryParameters,
|
|
793
|
+
}, initOverrides);
|
|
794
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptImageDetailFromJSON)(jsonValue));
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Keeps the image out of every learner read. Idempotent: an already hidden image keeps its original hide time and actor. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
799
|
+
* Hide a concept image from learners
|
|
800
|
+
*/
|
|
801
|
+
adminHideConceptImage(requestParameters, initOverrides) {
|
|
802
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
803
|
+
const response = yield this.adminHideConceptImageRaw(requestParameters, initOverrides);
|
|
804
|
+
return yield response.value();
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* List all active streaks (currentDays > 0) across the account, paginated
|
|
809
|
+
*/
|
|
810
|
+
adminListActiveStreaksRaw(requestParameters, initOverrides) {
|
|
811
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
812
|
+
if (requestParameters['xUserId'] == null) {
|
|
813
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
|
|
814
|
+
}
|
|
815
|
+
const queryParameters = {};
|
|
816
|
+
if (requestParameters['limit'] != null) {
|
|
817
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
818
|
+
}
|
|
819
|
+
if (requestParameters['cursor'] != null) {
|
|
820
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
821
|
+
}
|
|
822
|
+
const headerParameters = {};
|
|
823
|
+
if (requestParameters['xUserId'] != null) {
|
|
824
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
825
|
+
}
|
|
826
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
827
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
828
|
+
}
|
|
829
|
+
let urlPath = `/api/v1/admin/streaks/active`;
|
|
830
|
+
const response = yield this.request({
|
|
831
|
+
path: urlPath,
|
|
832
|
+
method: 'GET',
|
|
833
|
+
headers: headerParameters,
|
|
834
|
+
query: queryParameters,
|
|
835
|
+
}, initOverrides);
|
|
836
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedActiveStreaksFromJSON)(jsonValue));
|
|
837
|
+
});
|
|
838
|
+
}
|
|
436
839
|
/**
|
|
437
840
|
* List all active streaks (currentDays > 0) across the account, paginated
|
|
438
841
|
*/
|
|
439
|
-
|
|
842
|
+
adminListActiveStreaks(requestParameters, initOverrides) {
|
|
843
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
844
|
+
const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
|
|
845
|
+
return yield response.value();
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* List recent chats across all account users
|
|
850
|
+
*/
|
|
851
|
+
adminListChatsRaw(requestParameters, initOverrides) {
|
|
852
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
853
|
+
if (requestParameters['xUserId'] == null) {
|
|
854
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListChats().');
|
|
855
|
+
}
|
|
856
|
+
const queryParameters = {};
|
|
857
|
+
if (requestParameters['limit'] != null) {
|
|
858
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
859
|
+
}
|
|
860
|
+
if (requestParameters['cursor'] != null) {
|
|
861
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
862
|
+
}
|
|
863
|
+
if (requestParameters['chatType'] != null) {
|
|
864
|
+
queryParameters['chatType'] = requestParameters['chatType'];
|
|
865
|
+
}
|
|
866
|
+
if (requestParameters['forReview'] != null) {
|
|
867
|
+
queryParameters['forReview'] = requestParameters['forReview'];
|
|
868
|
+
}
|
|
869
|
+
const headerParameters = {};
|
|
870
|
+
if (requestParameters['xUserId'] != null) {
|
|
871
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
872
|
+
}
|
|
873
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
874
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
875
|
+
}
|
|
876
|
+
let urlPath = `/api/v1/admin/chats`;
|
|
877
|
+
const response = yield this.request({
|
|
878
|
+
path: urlPath,
|
|
879
|
+
method: 'GET',
|
|
880
|
+
headers: headerParameters,
|
|
881
|
+
query: queryParameters,
|
|
882
|
+
}, initOverrides);
|
|
883
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedChatsFromJSON)(jsonValue));
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* List recent chats across all account users
|
|
888
|
+
*/
|
|
889
|
+
adminListChats(requestParameters, initOverrides) {
|
|
890
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
891
|
+
const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
|
|
892
|
+
return yield response.value();
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* Every persisted concept diagram, newest first, filtered by concept, creator, origin, and state. Deleted diagrams are left out unless state is deleted or all. Omits the HTML document; fetch one diagram to get it.
|
|
897
|
+
* List library concept diagrams in any state
|
|
898
|
+
*/
|
|
899
|
+
adminListConceptDiagramsRaw(requestParameters, initOverrides) {
|
|
440
900
|
return __awaiter(this, void 0, void 0, function* () {
|
|
441
901
|
if (requestParameters['xUserId'] == null) {
|
|
442
|
-
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling
|
|
902
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListConceptDiagrams().');
|
|
443
903
|
}
|
|
444
904
|
const queryParameters = {};
|
|
445
905
|
if (requestParameters['limit'] != null) {
|
|
@@ -448,6 +908,24 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
448
908
|
if (requestParameters['cursor'] != null) {
|
|
449
909
|
queryParameters['cursor'] = requestParameters['cursor'];
|
|
450
910
|
}
|
|
911
|
+
if (requestParameters['conceptId'] != null) {
|
|
912
|
+
queryParameters['conceptId'] = requestParameters['conceptId'];
|
|
913
|
+
}
|
|
914
|
+
if (requestParameters['conceptQuery'] != null) {
|
|
915
|
+
queryParameters['conceptQuery'] = requestParameters['conceptQuery'];
|
|
916
|
+
}
|
|
917
|
+
if (requestParameters['creatorAccountUserId'] != null) {
|
|
918
|
+
queryParameters['creatorAccountUserId'] = requestParameters['creatorAccountUserId'];
|
|
919
|
+
}
|
|
920
|
+
if (requestParameters['creatorUserId'] != null) {
|
|
921
|
+
queryParameters['creatorUserId'] = requestParameters['creatorUserId'];
|
|
922
|
+
}
|
|
923
|
+
if (requestParameters['state'] != null) {
|
|
924
|
+
queryParameters['state'] = requestParameters['state'];
|
|
925
|
+
}
|
|
926
|
+
if (requestParameters['origin'] != null) {
|
|
927
|
+
queryParameters['origin'] = requestParameters['origin'];
|
|
928
|
+
}
|
|
451
929
|
const headerParameters = {};
|
|
452
930
|
if (requestParameters['xUserId'] != null) {
|
|
453
931
|
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
@@ -455,32 +933,34 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
455
933
|
if (this.configuration && this.configuration.apiKey) {
|
|
456
934
|
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
457
935
|
}
|
|
458
|
-
let urlPath = `/api/v1/admin/
|
|
936
|
+
let urlPath = `/api/v1/admin/concept-diagrams`;
|
|
459
937
|
const response = yield this.request({
|
|
460
938
|
path: urlPath,
|
|
461
939
|
method: 'GET',
|
|
462
940
|
headers: headerParameters,
|
|
463
941
|
query: queryParameters,
|
|
464
942
|
}, initOverrides);
|
|
465
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
943
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedConceptDiagramsFromJSON)(jsonValue));
|
|
466
944
|
});
|
|
467
945
|
}
|
|
468
946
|
/**
|
|
469
|
-
*
|
|
947
|
+
* Every persisted concept diagram, newest first, filtered by concept, creator, origin, and state. Deleted diagrams are left out unless state is deleted or all. Omits the HTML document; fetch one diagram to get it.
|
|
948
|
+
* List library concept diagrams in any state
|
|
470
949
|
*/
|
|
471
|
-
|
|
950
|
+
adminListConceptDiagrams(requestParameters, initOverrides) {
|
|
472
951
|
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
-
const response = yield this.
|
|
952
|
+
const response = yield this.adminListConceptDiagramsRaw(requestParameters, initOverrides);
|
|
474
953
|
return yield response.value();
|
|
475
954
|
});
|
|
476
955
|
}
|
|
477
956
|
/**
|
|
478
|
-
*
|
|
957
|
+
* Every persisted concept image, newest first, filtered by concept, creator, origin, and state. Deleted images are left out unless state is deleted or all. Each item carries a freshly signed read URL.
|
|
958
|
+
* List library concept images in any state
|
|
479
959
|
*/
|
|
480
|
-
|
|
960
|
+
adminListConceptImagesRaw(requestParameters, initOverrides) {
|
|
481
961
|
return __awaiter(this, void 0, void 0, function* () {
|
|
482
962
|
if (requestParameters['xUserId'] == null) {
|
|
483
|
-
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling
|
|
963
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListConceptImages().');
|
|
484
964
|
}
|
|
485
965
|
const queryParameters = {};
|
|
486
966
|
if (requestParameters['limit'] != null) {
|
|
@@ -489,11 +969,23 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
489
969
|
if (requestParameters['cursor'] != null) {
|
|
490
970
|
queryParameters['cursor'] = requestParameters['cursor'];
|
|
491
971
|
}
|
|
492
|
-
if (requestParameters['
|
|
493
|
-
queryParameters['
|
|
972
|
+
if (requestParameters['conceptId'] != null) {
|
|
973
|
+
queryParameters['conceptId'] = requestParameters['conceptId'];
|
|
494
974
|
}
|
|
495
|
-
if (requestParameters['
|
|
496
|
-
queryParameters['
|
|
975
|
+
if (requestParameters['conceptQuery'] != null) {
|
|
976
|
+
queryParameters['conceptQuery'] = requestParameters['conceptQuery'];
|
|
977
|
+
}
|
|
978
|
+
if (requestParameters['creatorAccountUserId'] != null) {
|
|
979
|
+
queryParameters['creatorAccountUserId'] = requestParameters['creatorAccountUserId'];
|
|
980
|
+
}
|
|
981
|
+
if (requestParameters['creatorUserId'] != null) {
|
|
982
|
+
queryParameters['creatorUserId'] = requestParameters['creatorUserId'];
|
|
983
|
+
}
|
|
984
|
+
if (requestParameters['state'] != null) {
|
|
985
|
+
queryParameters['state'] = requestParameters['state'];
|
|
986
|
+
}
|
|
987
|
+
if (requestParameters['origin'] != null) {
|
|
988
|
+
queryParameters['origin'] = requestParameters['origin'];
|
|
497
989
|
}
|
|
498
990
|
const headerParameters = {};
|
|
499
991
|
if (requestParameters['xUserId'] != null) {
|
|
@@ -502,22 +994,23 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
502
994
|
if (this.configuration && this.configuration.apiKey) {
|
|
503
995
|
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
504
996
|
}
|
|
505
|
-
let urlPath = `/api/v1/admin/
|
|
997
|
+
let urlPath = `/api/v1/admin/concept-images`;
|
|
506
998
|
const response = yield this.request({
|
|
507
999
|
path: urlPath,
|
|
508
1000
|
method: 'GET',
|
|
509
1001
|
headers: headerParameters,
|
|
510
1002
|
query: queryParameters,
|
|
511
1003
|
}, initOverrides);
|
|
512
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
1004
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedConceptImagesFromJSON)(jsonValue));
|
|
513
1005
|
});
|
|
514
1006
|
}
|
|
515
1007
|
/**
|
|
516
|
-
*
|
|
1008
|
+
* Every persisted concept image, newest first, filtered by concept, creator, origin, and state. Deleted images are left out unless state is deleted or all. Each item carries a freshly signed read URL.
|
|
1009
|
+
* List library concept images in any state
|
|
517
1010
|
*/
|
|
518
|
-
|
|
1011
|
+
adminListConceptImages(requestParameters, initOverrides) {
|
|
519
1012
|
return __awaiter(this, void 0, void 0, function* () {
|
|
520
|
-
const response = yield this.
|
|
1013
|
+
const response = yield this.adminListConceptImagesRaw(requestParameters, initOverrides);
|
|
521
1014
|
return yield response.value();
|
|
522
1015
|
});
|
|
523
1016
|
}
|
|
@@ -870,6 +1363,98 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
870
1363
|
return yield response.value();
|
|
871
1364
|
});
|
|
872
1365
|
}
|
|
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).
|
|
1368
|
+
* Enqueue a hidden revision of a concept diagram
|
|
1369
|
+
*/
|
|
1370
|
+
adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
|
|
1371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1372
|
+
if (requestParameters['xUserId'] == null) {
|
|
1373
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRegenerateConceptDiagram().');
|
|
1374
|
+
}
|
|
1375
|
+
if (requestParameters['diagramId'] == null) {
|
|
1376
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminRegenerateConceptDiagram().');
|
|
1377
|
+
}
|
|
1378
|
+
if (requestParameters['adminRegenerateConceptDiagramRequest'] == null) {
|
|
1379
|
+
throw new runtime.RequiredError('adminRegenerateConceptDiagramRequest', 'Required parameter "adminRegenerateConceptDiagramRequest" was null or undefined when calling adminRegenerateConceptDiagram().');
|
|
1380
|
+
}
|
|
1381
|
+
const queryParameters = {};
|
|
1382
|
+
const headerParameters = {};
|
|
1383
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1384
|
+
if (requestParameters['xUserId'] != null) {
|
|
1385
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1386
|
+
}
|
|
1387
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1388
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1389
|
+
}
|
|
1390
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/regenerate`;
|
|
1391
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
1392
|
+
const response = yield this.request({
|
|
1393
|
+
path: urlPath,
|
|
1394
|
+
method: 'POST',
|
|
1395
|
+
headers: headerParameters,
|
|
1396
|
+
query: queryParameters,
|
|
1397
|
+
body: (0, index_1.AdminRegenerateConceptDiagramRequestToJSON)(requestParameters['adminRegenerateConceptDiagramRequest']),
|
|
1398
|
+
}, initOverrides);
|
|
1399
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
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).
|
|
1404
|
+
* Enqueue a hidden revision of a concept diagram
|
|
1405
|
+
*/
|
|
1406
|
+
adminRegenerateConceptDiagram(requestParameters, initOverrides) {
|
|
1407
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1408
|
+
const response = yield this.adminRegenerateConceptDiagramRaw(requestParameters, initOverrides);
|
|
1409
|
+
return yield response.value();
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
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).
|
|
1414
|
+
* Enqueue a hidden revision of a concept image
|
|
1415
|
+
*/
|
|
1416
|
+
adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
|
|
1417
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1418
|
+
if (requestParameters['xUserId'] == null) {
|
|
1419
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRegenerateConceptImage().');
|
|
1420
|
+
}
|
|
1421
|
+
if (requestParameters['imageId'] == null) {
|
|
1422
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminRegenerateConceptImage().');
|
|
1423
|
+
}
|
|
1424
|
+
if (requestParameters['adminRegenerateConceptImageRequest'] == null) {
|
|
1425
|
+
throw new runtime.RequiredError('adminRegenerateConceptImageRequest', 'Required parameter "adminRegenerateConceptImageRequest" was null or undefined when calling adminRegenerateConceptImage().');
|
|
1426
|
+
}
|
|
1427
|
+
const queryParameters = {};
|
|
1428
|
+
const headerParameters = {};
|
|
1429
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1430
|
+
if (requestParameters['xUserId'] != null) {
|
|
1431
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1432
|
+
}
|
|
1433
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1434
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1435
|
+
}
|
|
1436
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/regenerate`;
|
|
1437
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
1438
|
+
const response = yield this.request({
|
|
1439
|
+
path: urlPath,
|
|
1440
|
+
method: 'POST',
|
|
1441
|
+
headers: headerParameters,
|
|
1442
|
+
query: queryParameters,
|
|
1443
|
+
body: (0, index_1.AdminRegenerateConceptImageRequestToJSON)(requestParameters['adminRegenerateConceptImageRequest']),
|
|
1444
|
+
}, initOverrides);
|
|
1445
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptMediaJobFromJSON)(jsonValue));
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
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).
|
|
1450
|
+
* Enqueue a hidden revision of a concept image
|
|
1451
|
+
*/
|
|
1452
|
+
adminRegenerateConceptImage(requestParameters, initOverrides) {
|
|
1453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1454
|
+
const response = yield this.adminRegenerateConceptImageRaw(requestParameters, initOverrides);
|
|
1455
|
+
return yield response.value();
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
873
1458
|
/**
|
|
874
1459
|
* Wipes all per-user learning data (chats, quizzes, flashcards, study objectives, concepts, streaks, files, etc.) for the target user while preserving their account-user and user records — and therefore their external identity and Canvas connection. Does not re-seed any demo data. Intended for single-account demo/test users: learning streaks are keyed on the user (not the account), so a user who belongs to multiple accounts has their streak cleared everywhere.
|
|
875
1460
|
* Reset a user\'s Athena learning data to a blank slate
|
|
@@ -911,6 +1496,217 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
911
1496
|
return yield response.value();
|
|
912
1497
|
});
|
|
913
1498
|
}
|
|
1499
|
+
/**
|
|
1500
|
+
* Clears the deletion and leaves the diagram hidden for review; show it to serve it to learners again. A diagram that is not deleted is unchanged.
|
|
1501
|
+
* Restore a soft-deleted concept diagram
|
|
1502
|
+
*/
|
|
1503
|
+
adminRestoreConceptDiagramRaw(requestParameters, initOverrides) {
|
|
1504
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1505
|
+
if (requestParameters['xUserId'] == null) {
|
|
1506
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRestoreConceptDiagram().');
|
|
1507
|
+
}
|
|
1508
|
+
if (requestParameters['diagramId'] == null) {
|
|
1509
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminRestoreConceptDiagram().');
|
|
1510
|
+
}
|
|
1511
|
+
const queryParameters = {};
|
|
1512
|
+
const headerParameters = {};
|
|
1513
|
+
if (requestParameters['xUserId'] != null) {
|
|
1514
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1515
|
+
}
|
|
1516
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1517
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1518
|
+
}
|
|
1519
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/restore`;
|
|
1520
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
1521
|
+
const response = yield this.request({
|
|
1522
|
+
path: urlPath,
|
|
1523
|
+
method: 'POST',
|
|
1524
|
+
headers: headerParameters,
|
|
1525
|
+
query: queryParameters,
|
|
1526
|
+
}, initOverrides);
|
|
1527
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Clears the deletion and leaves the diagram hidden for review; show it to serve it to learners again. A diagram that is not deleted is unchanged.
|
|
1532
|
+
* Restore a soft-deleted concept diagram
|
|
1533
|
+
*/
|
|
1534
|
+
adminRestoreConceptDiagram(requestParameters, initOverrides) {
|
|
1535
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1536
|
+
const response = yield this.adminRestoreConceptDiagramRaw(requestParameters, initOverrides);
|
|
1537
|
+
return yield response.value();
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
/**
|
|
1541
|
+
* Clears the deletion and leaves the image hidden for review; show it to serve it to learners again. A image that is not deleted is unchanged.
|
|
1542
|
+
* Restore a soft-deleted concept image
|
|
1543
|
+
*/
|
|
1544
|
+
adminRestoreConceptImageRaw(requestParameters, initOverrides) {
|
|
1545
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1546
|
+
if (requestParameters['xUserId'] == null) {
|
|
1547
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRestoreConceptImage().');
|
|
1548
|
+
}
|
|
1549
|
+
if (requestParameters['imageId'] == null) {
|
|
1550
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminRestoreConceptImage().');
|
|
1551
|
+
}
|
|
1552
|
+
const queryParameters = {};
|
|
1553
|
+
const headerParameters = {};
|
|
1554
|
+
if (requestParameters['xUserId'] != null) {
|
|
1555
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1556
|
+
}
|
|
1557
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1558
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1559
|
+
}
|
|
1560
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/restore`;
|
|
1561
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
1562
|
+
const response = yield this.request({
|
|
1563
|
+
path: urlPath,
|
|
1564
|
+
method: 'POST',
|
|
1565
|
+
headers: headerParameters,
|
|
1566
|
+
query: queryParameters,
|
|
1567
|
+
}, initOverrides);
|
|
1568
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptImageDetailFromJSON)(jsonValue));
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* Clears the deletion and leaves the image hidden for review; show it to serve it to learners again. A image that is not deleted is unchanged.
|
|
1573
|
+
* Restore a soft-deleted concept image
|
|
1574
|
+
*/
|
|
1575
|
+
adminRestoreConceptImage(requestParameters, initOverrides) {
|
|
1576
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1577
|
+
const response = yield this.adminRestoreConceptImageRaw(requestParameters, initOverrides);
|
|
1578
|
+
return yield response.value();
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
* 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
|
+
* Search the global concepts by name
|
|
1584
|
+
*/
|
|
1585
|
+
adminSearchConceptsRaw(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 adminSearchConcepts().');
|
|
1589
|
+
}
|
|
1590
|
+
const queryParameters = {};
|
|
1591
|
+
if (requestParameters['query'] != null) {
|
|
1592
|
+
queryParameters['query'] = requestParameters['query'];
|
|
1593
|
+
}
|
|
1594
|
+
if (requestParameters['limit'] != null) {
|
|
1595
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1596
|
+
}
|
|
1597
|
+
const headerParameters = {};
|
|
1598
|
+
if (requestParameters['xUserId'] != null) {
|
|
1599
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1600
|
+
}
|
|
1601
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1602
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1603
|
+
}
|
|
1604
|
+
let urlPath = `/api/v1/admin/concepts`;
|
|
1605
|
+
const response = yield this.request({
|
|
1606
|
+
path: urlPath,
|
|
1607
|
+
method: 'GET',
|
|
1608
|
+
headers: headerParameters,
|
|
1609
|
+
query: queryParameters,
|
|
1610
|
+
}, initOverrides);
|
|
1611
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AdminConceptSearchResultFromJSON));
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* 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.
|
|
1616
|
+
* Search the global concepts by name
|
|
1617
|
+
*/
|
|
1618
|
+
adminSearchConcepts(requestParameters, initOverrides) {
|
|
1619
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1620
|
+
const response = yield this.adminSearchConceptsRaw(requestParameters, initOverrides);
|
|
1621
|
+
return yield response.value();
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* Clears the hide so learners can be served the diagram again. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
|
|
1626
|
+
* Show a hidden concept diagram to learners
|
|
1627
|
+
*/
|
|
1628
|
+
adminShowConceptDiagramRaw(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 adminShowConceptDiagram().');
|
|
1632
|
+
}
|
|
1633
|
+
if (requestParameters['diagramId'] == null) {
|
|
1634
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminShowConceptDiagram().');
|
|
1635
|
+
}
|
|
1636
|
+
const queryParameters = {};
|
|
1637
|
+
const headerParameters = {};
|
|
1638
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1639
|
+
if (requestParameters['xUserId'] != null) {
|
|
1640
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1641
|
+
}
|
|
1642
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1643
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1644
|
+
}
|
|
1645
|
+
let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/show`;
|
|
1646
|
+
urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
|
|
1647
|
+
const response = yield this.request({
|
|
1648
|
+
path: urlPath,
|
|
1649
|
+
method: 'POST',
|
|
1650
|
+
headers: headerParameters,
|
|
1651
|
+
query: queryParameters,
|
|
1652
|
+
body: (0, index_1.AdminShowConceptMediaRequestToJSON)(requestParameters['adminShowConceptMediaRequest']),
|
|
1653
|
+
}, initOverrides);
|
|
1654
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminShownConceptDiagramFromJSON)(jsonValue));
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Clears the hide so learners can be served the diagram again. A deleted diagram must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this diagram changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads.
|
|
1659
|
+
* Show a hidden concept diagram to learners
|
|
1660
|
+
*/
|
|
1661
|
+
adminShowConceptDiagram(requestParameters, initOverrides) {
|
|
1662
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1663
|
+
const response = yield this.adminShowConceptDiagramRaw(requestParameters, initOverrides);
|
|
1664
|
+
return yield response.value();
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Clears the hide so learners can be served the image again. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
|
|
1669
|
+
* Show a hidden concept image to learners
|
|
1670
|
+
*/
|
|
1671
|
+
adminShowConceptImageRaw(requestParameters, initOverrides) {
|
|
1672
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1673
|
+
if (requestParameters['xUserId'] == null) {
|
|
1674
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminShowConceptImage().');
|
|
1675
|
+
}
|
|
1676
|
+
if (requestParameters['imageId'] == null) {
|
|
1677
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminShowConceptImage().');
|
|
1678
|
+
}
|
|
1679
|
+
const queryParameters = {};
|
|
1680
|
+
const headerParameters = {};
|
|
1681
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1682
|
+
if (requestParameters['xUserId'] != null) {
|
|
1683
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
1684
|
+
}
|
|
1685
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1686
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
1687
|
+
}
|
|
1688
|
+
let urlPath = `/api/v1/admin/concept-images/{imageId}/show`;
|
|
1689
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
1690
|
+
const response = yield this.request({
|
|
1691
|
+
path: urlPath,
|
|
1692
|
+
method: 'POST',
|
|
1693
|
+
headers: headerParameters,
|
|
1694
|
+
query: queryParameters,
|
|
1695
|
+
body: (0, index_1.AdminShowConceptMediaRequestToJSON)(requestParameters['adminShowConceptMediaRequest']),
|
|
1696
|
+
}, initOverrides);
|
|
1697
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminShownConceptImageFromJSON)(jsonValue));
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* Clears the hide so learners can be served the image again. A deleted image must be restored first (409, and nothing changes). The body is optional; without it, or with hideOtherVersions false, only this image changes. With hideOtherVersions true, every other visible version in its revision family (the rows history lists) is hidden in the same transaction, with the caller recorded as hider; hidden and deleted versions are left as they are. hiddenVersionIds lists what was hidden, and hiddenVersionsTruncated says when the family exceeded the history cap so only the capped set was checked. Learner reads are unaffected beyond the rows hidden, and only for later reads (a signed URL already handed out stays valid until it expires, 12 hours).
|
|
1702
|
+
* Show a hidden concept image to learners
|
|
1703
|
+
*/
|
|
1704
|
+
adminShowConceptImage(requestParameters, initOverrides) {
|
|
1705
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1706
|
+
const response = yield this.adminShowConceptImageRaw(requestParameters, initOverrides);
|
|
1707
|
+
return yield response.value();
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
914
1710
|
/**
|
|
915
1711
|
* Trigger re-analysis for a chat
|
|
916
1712
|
*/
|
|
@@ -996,6 +1792,40 @@ class AdminApi extends runtime.BaseAPI {
|
|
|
996
1792
|
}
|
|
997
1793
|
}
|
|
998
1794
|
exports.AdminApi = AdminApi;
|
|
1795
|
+
/**
|
|
1796
|
+
* @export
|
|
1797
|
+
*/
|
|
1798
|
+
exports.AdminListConceptDiagramsStateEnum = {
|
|
1799
|
+
NotDeleted: 'not_deleted',
|
|
1800
|
+
Visible: 'visible',
|
|
1801
|
+
Hidden: 'hidden',
|
|
1802
|
+
Deleted: 'deleted',
|
|
1803
|
+
All: 'all'
|
|
1804
|
+
};
|
|
1805
|
+
/**
|
|
1806
|
+
* @export
|
|
1807
|
+
*/
|
|
1808
|
+
exports.AdminListConceptDiagramsOriginEnum = {
|
|
1809
|
+
Chat: 'chat',
|
|
1810
|
+
Admin: 'admin'
|
|
1811
|
+
};
|
|
1812
|
+
/**
|
|
1813
|
+
* @export
|
|
1814
|
+
*/
|
|
1815
|
+
exports.AdminListConceptImagesStateEnum = {
|
|
1816
|
+
NotDeleted: 'not_deleted',
|
|
1817
|
+
Visible: 'visible',
|
|
1818
|
+
Hidden: 'hidden',
|
|
1819
|
+
Deleted: 'deleted',
|
|
1820
|
+
All: 'all'
|
|
1821
|
+
};
|
|
1822
|
+
/**
|
|
1823
|
+
* @export
|
|
1824
|
+
*/
|
|
1825
|
+
exports.AdminListConceptImagesOriginEnum = {
|
|
1826
|
+
Chat: 'chat',
|
|
1827
|
+
Admin: 'admin'
|
|
1828
|
+
};
|
|
999
1829
|
/**
|
|
1000
1830
|
* @export
|
|
1001
1831
|
*/
|