@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.
Files changed (94) hide show
  1. package/README.md +37 -0
  2. package/dist/apis/AdminApi.d.ts +310 -1
  3. package/dist/apis/AdminApi.js +850 -20
  4. package/dist/esm/apis/AdminApi.d.ts +310 -1
  5. package/dist/esm/apis/AdminApi.js +850 -20
  6. package/dist/esm/models/AdminConceptDiagram.d.ts +165 -0
  7. package/dist/esm/models/AdminConceptDiagram.js +136 -0
  8. package/dist/esm/models/AdminConceptDiagramDetail.d.ts +203 -0
  9. package/dist/esm/models/AdminConceptDiagramDetail.js +162 -0
  10. package/dist/esm/models/AdminConceptImage.d.ts +183 -0
  11. package/dist/esm/models/AdminConceptImage.js +148 -0
  12. package/dist/esm/models/AdminConceptImageDetail.d.ts +221 -0
  13. package/dist/esm/models/AdminConceptImageDetail.js +174 -0
  14. package/dist/esm/models/AdminConceptMediaActor.d.ts +38 -0
  15. package/dist/esm/models/AdminConceptMediaActor.js +47 -0
  16. package/dist/esm/models/AdminConceptMediaConcept.d.ts +38 -0
  17. package/dist/esm/models/AdminConceptMediaConcept.js +47 -0
  18. package/dist/esm/models/AdminConceptMediaHistoryEntry.d.ts +92 -0
  19. package/dist/esm/models/AdminConceptMediaHistoryEntry.js +87 -0
  20. package/dist/esm/models/AdminConceptMediaJob.d.ts +157 -0
  21. package/dist/esm/models/AdminConceptMediaJob.js +139 -0
  22. package/dist/esm/models/AdminConceptMediaRevision.d.ts +67 -0
  23. package/dist/esm/models/AdminConceptMediaRevision.js +70 -0
  24. package/dist/esm/models/AdminConceptSearchResult.d.ts +56 -0
  25. package/dist/esm/models/AdminConceptSearchResult.js +59 -0
  26. package/dist/esm/models/AdminGenerateConceptDiagramRequest.d.ts +56 -0
  27. package/dist/esm/models/AdminGenerateConceptDiagramRequest.js +51 -0
  28. package/dist/esm/models/AdminGenerateConceptImageRequest.d.ts +50 -0
  29. package/dist/esm/models/AdminGenerateConceptImageRequest.js +49 -0
  30. package/dist/esm/models/AdminGeneratedConceptDiagram.d.ts +219 -0
  31. package/dist/esm/models/AdminGeneratedConceptDiagram.js +175 -0
  32. package/dist/esm/models/AdminGeneratedConceptImage.d.ts +237 -0
  33. package/dist/esm/models/AdminGeneratedConceptImage.js +187 -0
  34. package/dist/esm/models/AdminPaginatedConceptDiagrams.d.ts +39 -0
  35. package/dist/esm/models/AdminPaginatedConceptDiagrams.js +48 -0
  36. package/dist/esm/models/AdminPaginatedConceptImages.d.ts +39 -0
  37. package/dist/esm/models/AdminPaginatedConceptImages.js +48 -0
  38. package/dist/esm/models/AdminRegenerateConceptDiagramRequest.d.ts +44 -0
  39. package/dist/esm/models/AdminRegenerateConceptDiagramRequest.js +47 -0
  40. package/dist/esm/models/AdminRegenerateConceptImageRequest.d.ts +38 -0
  41. package/dist/esm/models/AdminRegenerateConceptImageRequest.js +45 -0
  42. package/dist/esm/models/AdminShowConceptMediaRequest.d.ts +32 -0
  43. package/dist/esm/models/AdminShowConceptMediaRequest.js +41 -0
  44. package/dist/esm/models/AdminShownConceptDiagram.d.ts +215 -0
  45. package/dist/esm/models/AdminShownConceptDiagram.js +170 -0
  46. package/dist/esm/models/AdminShownConceptImage.d.ts +233 -0
  47. package/dist/esm/models/AdminShownConceptImage.js +182 -0
  48. package/dist/esm/models/index.d.ts +19 -0
  49. package/dist/esm/models/index.js +19 -0
  50. package/dist/models/AdminConceptDiagram.d.ts +165 -0
  51. package/dist/models/AdminConceptDiagram.js +144 -0
  52. package/dist/models/AdminConceptDiagramDetail.d.ts +203 -0
  53. package/dist/models/AdminConceptDiagramDetail.js +170 -0
  54. package/dist/models/AdminConceptImage.d.ts +183 -0
  55. package/dist/models/AdminConceptImage.js +156 -0
  56. package/dist/models/AdminConceptImageDetail.d.ts +221 -0
  57. package/dist/models/AdminConceptImageDetail.js +182 -0
  58. package/dist/models/AdminConceptMediaActor.d.ts +38 -0
  59. package/dist/models/AdminConceptMediaActor.js +54 -0
  60. package/dist/models/AdminConceptMediaConcept.d.ts +38 -0
  61. package/dist/models/AdminConceptMediaConcept.js +54 -0
  62. package/dist/models/AdminConceptMediaHistoryEntry.d.ts +92 -0
  63. package/dist/models/AdminConceptMediaHistoryEntry.js +95 -0
  64. package/dist/models/AdminConceptMediaJob.d.ts +157 -0
  65. package/dist/models/AdminConceptMediaJob.js +147 -0
  66. package/dist/models/AdminConceptMediaRevision.d.ts +67 -0
  67. package/dist/models/AdminConceptMediaRevision.js +78 -0
  68. package/dist/models/AdminConceptSearchResult.d.ts +56 -0
  69. package/dist/models/AdminConceptSearchResult.js +66 -0
  70. package/dist/models/AdminGenerateConceptDiagramRequest.d.ts +56 -0
  71. package/dist/models/AdminGenerateConceptDiagramRequest.js +58 -0
  72. package/dist/models/AdminGenerateConceptImageRequest.d.ts +50 -0
  73. package/dist/models/AdminGenerateConceptImageRequest.js +56 -0
  74. package/dist/models/AdminGeneratedConceptDiagram.d.ts +219 -0
  75. package/dist/models/AdminGeneratedConceptDiagram.js +183 -0
  76. package/dist/models/AdminGeneratedConceptImage.d.ts +237 -0
  77. package/dist/models/AdminGeneratedConceptImage.js +195 -0
  78. package/dist/models/AdminPaginatedConceptDiagrams.d.ts +39 -0
  79. package/dist/models/AdminPaginatedConceptDiagrams.js +55 -0
  80. package/dist/models/AdminPaginatedConceptImages.d.ts +39 -0
  81. package/dist/models/AdminPaginatedConceptImages.js +55 -0
  82. package/dist/models/AdminRegenerateConceptDiagramRequest.d.ts +44 -0
  83. package/dist/models/AdminRegenerateConceptDiagramRequest.js +54 -0
  84. package/dist/models/AdminRegenerateConceptImageRequest.d.ts +38 -0
  85. package/dist/models/AdminRegenerateConceptImageRequest.js +52 -0
  86. package/dist/models/AdminShowConceptMediaRequest.d.ts +32 -0
  87. package/dist/models/AdminShowConceptMediaRequest.js +48 -0
  88. package/dist/models/AdminShownConceptDiagram.d.ts +215 -0
  89. package/dist/models/AdminShownConceptDiagram.js +178 -0
  90. package/dist/models/AdminShownConceptImage.d.ts +233 -0
  91. package/dist/models/AdminShownConceptImage.js +190 -0
  92. package/dist/models/index.d.ts +19 -0
  93. package/dist/models/index.js +19 -0
  94. package/package.json +1 -1
@@ -21,11 +21,177 @@ 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, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizParticipantSessionsFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminResetLearningDataResponseFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
24
+ import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminConceptDiagramDetailFromJSON, AdminConceptImageDetailFromJSON, AdminConceptMediaJobFromJSON, AdminConceptSearchResultFromJSON, AdminGenerateConceptDiagramRequestToJSON, AdminGenerateConceptImageRequestToJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedConceptDiagramsFromJSON, AdminPaginatedConceptImagesFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizParticipantSessionsFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminRegenerateConceptDiagramRequestToJSON, AdminRegenerateConceptImageRequestToJSON, AdminResetLearningDataResponseFromJSON, AdminShowConceptMediaRequestToJSON, AdminShownConceptDiagramFromJSON, AdminShownConceptImageFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class AdminApi extends runtime.BaseAPI {
29
+ /**
30
+ * 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.
31
+ * Soft-delete a concept diagram
32
+ */
33
+ adminDeleteConceptDiagramRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['xUserId'] == null) {
36
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminDeleteConceptDiagram().');
37
+ }
38
+ if (requestParameters['diagramId'] == null) {
39
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminDeleteConceptDiagram().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ if (requestParameters['xUserId'] != null) {
44
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
45
+ }
46
+ if (this.configuration && this.configuration.apiKey) {
47
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
48
+ }
49
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/delete`;
50
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
51
+ const response = yield this.request({
52
+ path: urlPath,
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptDiagramDetailFromJSON(jsonValue));
58
+ });
59
+ }
60
+ /**
61
+ * 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.
62
+ * Soft-delete a concept diagram
63
+ */
64
+ adminDeleteConceptDiagram(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.adminDeleteConceptDiagramRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
70
+ /**
71
+ * 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).
72
+ * Soft-delete a concept image
73
+ */
74
+ adminDeleteConceptImageRaw(requestParameters, initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ if (requestParameters['xUserId'] == null) {
77
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminDeleteConceptImage().');
78
+ }
79
+ if (requestParameters['imageId'] == null) {
80
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminDeleteConceptImage().');
81
+ }
82
+ const queryParameters = {};
83
+ const headerParameters = {};
84
+ if (requestParameters['xUserId'] != null) {
85
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
86
+ }
87
+ if (this.configuration && this.configuration.apiKey) {
88
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
89
+ }
90
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/delete`;
91
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
92
+ const response = yield this.request({
93
+ path: urlPath,
94
+ method: 'POST',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ }, initOverrides);
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptImageDetailFromJSON(jsonValue));
99
+ });
100
+ }
101
+ /**
102
+ * 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).
103
+ * Soft-delete a concept image
104
+ */
105
+ adminDeleteConceptImage(requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const response = yield this.adminDeleteConceptImageRaw(requestParameters, initOverrides);
108
+ return yield response.value();
109
+ });
110
+ }
111
+ /**
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
+ */
115
+ adminGenerateConceptDiagramRaw(requestParameters, initOverrides) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ if (requestParameters['xUserId'] == null) {
118
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGenerateConceptDiagram().');
119
+ }
120
+ if (requestParameters['adminGenerateConceptDiagramRequest'] == null) {
121
+ throw new runtime.RequiredError('adminGenerateConceptDiagramRequest', 'Required parameter "adminGenerateConceptDiagramRequest" was null or undefined when calling adminGenerateConceptDiagram().');
122
+ }
123
+ const queryParameters = {};
124
+ const headerParameters = {};
125
+ headerParameters['Content-Type'] = 'application/json';
126
+ if (requestParameters['xUserId'] != null) {
127
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
128
+ }
129
+ if (this.configuration && this.configuration.apiKey) {
130
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
131
+ }
132
+ let urlPath = `/api/v1/admin/concept-diagrams`;
133
+ const response = yield this.request({
134
+ path: urlPath,
135
+ method: 'POST',
136
+ headers: headerParameters,
137
+ query: queryParameters,
138
+ body: AdminGenerateConceptDiagramRequestToJSON(requestParameters['adminGenerateConceptDiagramRequest']),
139
+ }, initOverrides);
140
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
141
+ });
142
+ }
143
+ /**
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
+ */
147
+ adminGenerateConceptDiagram(requestParameters, initOverrides) {
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ const response = yield this.adminGenerateConceptDiagramRaw(requestParameters, initOverrides);
150
+ return yield response.value();
151
+ });
152
+ }
153
+ /**
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
+ */
157
+ adminGenerateConceptImageRaw(requestParameters, initOverrides) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ if (requestParameters['xUserId'] == null) {
160
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGenerateConceptImage().');
161
+ }
162
+ if (requestParameters['adminGenerateConceptImageRequest'] == null) {
163
+ throw new runtime.RequiredError('adminGenerateConceptImageRequest', 'Required parameter "adminGenerateConceptImageRequest" was null or undefined when calling adminGenerateConceptImage().');
164
+ }
165
+ const queryParameters = {};
166
+ const headerParameters = {};
167
+ headerParameters['Content-Type'] = 'application/json';
168
+ if (requestParameters['xUserId'] != null) {
169
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
170
+ }
171
+ if (this.configuration && this.configuration.apiKey) {
172
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
173
+ }
174
+ let urlPath = `/api/v1/admin/concept-images`;
175
+ const response = yield this.request({
176
+ path: urlPath,
177
+ method: 'POST',
178
+ headers: headerParameters,
179
+ query: queryParameters,
180
+ body: AdminGenerateConceptImageRequestToJSON(requestParameters['adminGenerateConceptImageRequest']),
181
+ }, initOverrides);
182
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
183
+ });
184
+ }
185
+ /**
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
+ */
189
+ adminGenerateConceptImage(requestParameters, initOverrides) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ const response = yield this.adminGenerateConceptImageRaw(requestParameters, initOverrides);
192
+ return yield response.value();
193
+ });
194
+ }
29
195
  /**
30
196
  * Get any chat by ID within the account
31
197
  */
@@ -190,6 +356,129 @@ export class AdminApi extends runtime.BaseAPI {
190
356
  return yield response.value();
191
357
  });
192
358
  }
359
+ /**
360
+ * One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
361
+ * Get a library concept diagram in any state
362
+ */
363
+ adminGetConceptDiagramRaw(requestParameters, initOverrides) {
364
+ return __awaiter(this, void 0, void 0, function* () {
365
+ if (requestParameters['xUserId'] == null) {
366
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptDiagram().');
367
+ }
368
+ if (requestParameters['diagramId'] == null) {
369
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminGetConceptDiagram().');
370
+ }
371
+ const queryParameters = {};
372
+ const headerParameters = {};
373
+ if (requestParameters['xUserId'] != null) {
374
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
375
+ }
376
+ if (this.configuration && this.configuration.apiKey) {
377
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
378
+ }
379
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}`;
380
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
381
+ const response = yield this.request({
382
+ path: urlPath,
383
+ method: 'GET',
384
+ headers: headerParameters,
385
+ query: queryParameters,
386
+ }, initOverrides);
387
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptDiagramDetailFromJSON(jsonValue));
388
+ });
389
+ }
390
+ /**
391
+ * One diagram, hidden or deleted included, with its brief and assembled HTML document and its revision lineage.
392
+ * Get a library concept diagram in any state
393
+ */
394
+ adminGetConceptDiagram(requestParameters, initOverrides) {
395
+ return __awaiter(this, void 0, void 0, function* () {
396
+ const response = yield this.adminGetConceptDiagramRaw(requestParameters, initOverrides);
397
+ return yield response.value();
398
+ });
399
+ }
400
+ /**
401
+ * One image, hidden or deleted included, with its prompt (and the editable prompt without the style preamble) and its revision lineage.
402
+ * Get a library concept image in any state
403
+ */
404
+ adminGetConceptImageRaw(requestParameters, initOverrides) {
405
+ return __awaiter(this, void 0, void 0, function* () {
406
+ if (requestParameters['xUserId'] == null) {
407
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetConceptImage().');
408
+ }
409
+ if (requestParameters['imageId'] == null) {
410
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminGetConceptImage().');
411
+ }
412
+ const queryParameters = {};
413
+ const headerParameters = {};
414
+ if (requestParameters['xUserId'] != null) {
415
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
416
+ }
417
+ if (this.configuration && this.configuration.apiKey) {
418
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
419
+ }
420
+ let urlPath = `/api/v1/admin/concept-images/{imageId}`;
421
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
422
+ const response = yield this.request({
423
+ path: urlPath,
424
+ method: 'GET',
425
+ headers: headerParameters,
426
+ query: queryParameters,
427
+ }, initOverrides);
428
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptImageDetailFromJSON(jsonValue));
429
+ });
430
+ }
431
+ /**
432
+ * One image, hidden or deleted included, with its prompt (and the editable prompt without the style preamble) and its revision lineage.
433
+ * Get a library concept image in any state
434
+ */
435
+ adminGetConceptImage(requestParameters, initOverrides) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ const response = yield this.adminGetConceptImageRaw(requestParameters, initOverrides);
438
+ return yield response.value();
439
+ });
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
+ }
193
482
  /**
194
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.
195
484
  * Get quiz session summary for any session within the account
@@ -430,13 +719,184 @@ export class AdminApi extends runtime.BaseAPI {
430
719
  return yield response.value();
431
720
  });
432
721
  }
722
+ /**
723
+ * 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.
724
+ * Hide a concept diagram from learners
725
+ */
726
+ adminHideConceptDiagramRaw(requestParameters, initOverrides) {
727
+ return __awaiter(this, void 0, void 0, function* () {
728
+ if (requestParameters['xUserId'] == null) {
729
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminHideConceptDiagram().');
730
+ }
731
+ if (requestParameters['diagramId'] == null) {
732
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminHideConceptDiagram().');
733
+ }
734
+ const queryParameters = {};
735
+ const headerParameters = {};
736
+ if (requestParameters['xUserId'] != null) {
737
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
738
+ }
739
+ if (this.configuration && this.configuration.apiKey) {
740
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
741
+ }
742
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/hide`;
743
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
744
+ const response = yield this.request({
745
+ path: urlPath,
746
+ method: 'POST',
747
+ headers: headerParameters,
748
+ query: queryParameters,
749
+ }, initOverrides);
750
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptDiagramDetailFromJSON(jsonValue));
751
+ });
752
+ }
753
+ /**
754
+ * 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.
755
+ * Hide a concept diagram from learners
756
+ */
757
+ adminHideConceptDiagram(requestParameters, initOverrides) {
758
+ return __awaiter(this, void 0, void 0, function* () {
759
+ const response = yield this.adminHideConceptDiagramRaw(requestParameters, initOverrides);
760
+ return yield response.value();
761
+ });
762
+ }
763
+ /**
764
+ * 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).
765
+ * Hide a concept image from learners
766
+ */
767
+ adminHideConceptImageRaw(requestParameters, initOverrides) {
768
+ return __awaiter(this, void 0, void 0, function* () {
769
+ if (requestParameters['xUserId'] == null) {
770
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminHideConceptImage().');
771
+ }
772
+ if (requestParameters['imageId'] == null) {
773
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminHideConceptImage().');
774
+ }
775
+ const queryParameters = {};
776
+ const headerParameters = {};
777
+ if (requestParameters['xUserId'] != null) {
778
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
779
+ }
780
+ if (this.configuration && this.configuration.apiKey) {
781
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
782
+ }
783
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/hide`;
784
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
785
+ const response = yield this.request({
786
+ path: urlPath,
787
+ method: 'POST',
788
+ headers: headerParameters,
789
+ query: queryParameters,
790
+ }, initOverrides);
791
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptImageDetailFromJSON(jsonValue));
792
+ });
793
+ }
794
+ /**
795
+ * 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).
796
+ * Hide a concept image from learners
797
+ */
798
+ adminHideConceptImage(requestParameters, initOverrides) {
799
+ return __awaiter(this, void 0, void 0, function* () {
800
+ const response = yield this.adminHideConceptImageRaw(requestParameters, initOverrides);
801
+ return yield response.value();
802
+ });
803
+ }
804
+ /**
805
+ * List all active streaks (currentDays > 0) across the account, paginated
806
+ */
807
+ adminListActiveStreaksRaw(requestParameters, initOverrides) {
808
+ return __awaiter(this, void 0, void 0, function* () {
809
+ if (requestParameters['xUserId'] == null) {
810
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
811
+ }
812
+ const queryParameters = {};
813
+ if (requestParameters['limit'] != null) {
814
+ queryParameters['limit'] = requestParameters['limit'];
815
+ }
816
+ if (requestParameters['cursor'] != null) {
817
+ queryParameters['cursor'] = requestParameters['cursor'];
818
+ }
819
+ const headerParameters = {};
820
+ if (requestParameters['xUserId'] != null) {
821
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
822
+ }
823
+ if (this.configuration && this.configuration.apiKey) {
824
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
825
+ }
826
+ let urlPath = `/api/v1/admin/streaks/active`;
827
+ const response = yield this.request({
828
+ path: urlPath,
829
+ method: 'GET',
830
+ headers: headerParameters,
831
+ query: queryParameters,
832
+ }, initOverrides);
833
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedActiveStreaksFromJSON(jsonValue));
834
+ });
835
+ }
433
836
  /**
434
837
  * List all active streaks (currentDays > 0) across the account, paginated
435
838
  */
436
- adminListActiveStreaksRaw(requestParameters, initOverrides) {
839
+ adminListActiveStreaks(requestParameters, initOverrides) {
840
+ return __awaiter(this, void 0, void 0, function* () {
841
+ const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
842
+ return yield response.value();
843
+ });
844
+ }
845
+ /**
846
+ * List recent chats across all account users
847
+ */
848
+ adminListChatsRaw(requestParameters, initOverrides) {
849
+ return __awaiter(this, void 0, void 0, function* () {
850
+ if (requestParameters['xUserId'] == null) {
851
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListChats().');
852
+ }
853
+ const queryParameters = {};
854
+ if (requestParameters['limit'] != null) {
855
+ queryParameters['limit'] = requestParameters['limit'];
856
+ }
857
+ if (requestParameters['cursor'] != null) {
858
+ queryParameters['cursor'] = requestParameters['cursor'];
859
+ }
860
+ if (requestParameters['chatType'] != null) {
861
+ queryParameters['chatType'] = requestParameters['chatType'];
862
+ }
863
+ if (requestParameters['forReview'] != null) {
864
+ queryParameters['forReview'] = requestParameters['forReview'];
865
+ }
866
+ const headerParameters = {};
867
+ if (requestParameters['xUserId'] != null) {
868
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
869
+ }
870
+ if (this.configuration && this.configuration.apiKey) {
871
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
872
+ }
873
+ let urlPath = `/api/v1/admin/chats`;
874
+ const response = yield this.request({
875
+ path: urlPath,
876
+ method: 'GET',
877
+ headers: headerParameters,
878
+ query: queryParameters,
879
+ }, initOverrides);
880
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedChatsFromJSON(jsonValue));
881
+ });
882
+ }
883
+ /**
884
+ * List recent chats across all account users
885
+ */
886
+ adminListChats(requestParameters, initOverrides) {
887
+ return __awaiter(this, void 0, void 0, function* () {
888
+ const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
889
+ return yield response.value();
890
+ });
891
+ }
892
+ /**
893
+ * 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.
894
+ * List library concept diagrams in any state
895
+ */
896
+ adminListConceptDiagramsRaw(requestParameters, initOverrides) {
437
897
  return __awaiter(this, void 0, void 0, function* () {
438
898
  if (requestParameters['xUserId'] == null) {
439
- throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
899
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListConceptDiagrams().');
440
900
  }
441
901
  const queryParameters = {};
442
902
  if (requestParameters['limit'] != null) {
@@ -445,6 +905,24 @@ export class AdminApi extends runtime.BaseAPI {
445
905
  if (requestParameters['cursor'] != null) {
446
906
  queryParameters['cursor'] = requestParameters['cursor'];
447
907
  }
908
+ if (requestParameters['conceptId'] != null) {
909
+ queryParameters['conceptId'] = requestParameters['conceptId'];
910
+ }
911
+ if (requestParameters['conceptQuery'] != null) {
912
+ queryParameters['conceptQuery'] = requestParameters['conceptQuery'];
913
+ }
914
+ if (requestParameters['creatorAccountUserId'] != null) {
915
+ queryParameters['creatorAccountUserId'] = requestParameters['creatorAccountUserId'];
916
+ }
917
+ if (requestParameters['creatorUserId'] != null) {
918
+ queryParameters['creatorUserId'] = requestParameters['creatorUserId'];
919
+ }
920
+ if (requestParameters['state'] != null) {
921
+ queryParameters['state'] = requestParameters['state'];
922
+ }
923
+ if (requestParameters['origin'] != null) {
924
+ queryParameters['origin'] = requestParameters['origin'];
925
+ }
448
926
  const headerParameters = {};
449
927
  if (requestParameters['xUserId'] != null) {
450
928
  headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
@@ -452,32 +930,34 @@ export class AdminApi extends runtime.BaseAPI {
452
930
  if (this.configuration && this.configuration.apiKey) {
453
931
  headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
454
932
  }
455
- let urlPath = `/api/v1/admin/streaks/active`;
933
+ let urlPath = `/api/v1/admin/concept-diagrams`;
456
934
  const response = yield this.request({
457
935
  path: urlPath,
458
936
  method: 'GET',
459
937
  headers: headerParameters,
460
938
  query: queryParameters,
461
939
  }, initOverrides);
462
- return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedActiveStreaksFromJSON(jsonValue));
940
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedConceptDiagramsFromJSON(jsonValue));
463
941
  });
464
942
  }
465
943
  /**
466
- * List all active streaks (currentDays > 0) across the account, paginated
944
+ * 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.
945
+ * List library concept diagrams in any state
467
946
  */
468
- adminListActiveStreaks(requestParameters, initOverrides) {
947
+ adminListConceptDiagrams(requestParameters, initOverrides) {
469
948
  return __awaiter(this, void 0, void 0, function* () {
470
- const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
949
+ const response = yield this.adminListConceptDiagramsRaw(requestParameters, initOverrides);
471
950
  return yield response.value();
472
951
  });
473
952
  }
474
953
  /**
475
- * List recent chats across all account users
954
+ * 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.
955
+ * List library concept images in any state
476
956
  */
477
- adminListChatsRaw(requestParameters, initOverrides) {
957
+ adminListConceptImagesRaw(requestParameters, initOverrides) {
478
958
  return __awaiter(this, void 0, void 0, function* () {
479
959
  if (requestParameters['xUserId'] == null) {
480
- throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListChats().');
960
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListConceptImages().');
481
961
  }
482
962
  const queryParameters = {};
483
963
  if (requestParameters['limit'] != null) {
@@ -486,11 +966,23 @@ export class AdminApi extends runtime.BaseAPI {
486
966
  if (requestParameters['cursor'] != null) {
487
967
  queryParameters['cursor'] = requestParameters['cursor'];
488
968
  }
489
- if (requestParameters['chatType'] != null) {
490
- queryParameters['chatType'] = requestParameters['chatType'];
969
+ if (requestParameters['conceptId'] != null) {
970
+ queryParameters['conceptId'] = requestParameters['conceptId'];
491
971
  }
492
- if (requestParameters['forReview'] != null) {
493
- queryParameters['forReview'] = requestParameters['forReview'];
972
+ if (requestParameters['conceptQuery'] != null) {
973
+ queryParameters['conceptQuery'] = requestParameters['conceptQuery'];
974
+ }
975
+ if (requestParameters['creatorAccountUserId'] != null) {
976
+ queryParameters['creatorAccountUserId'] = requestParameters['creatorAccountUserId'];
977
+ }
978
+ if (requestParameters['creatorUserId'] != null) {
979
+ queryParameters['creatorUserId'] = requestParameters['creatorUserId'];
980
+ }
981
+ if (requestParameters['state'] != null) {
982
+ queryParameters['state'] = requestParameters['state'];
983
+ }
984
+ if (requestParameters['origin'] != null) {
985
+ queryParameters['origin'] = requestParameters['origin'];
494
986
  }
495
987
  const headerParameters = {};
496
988
  if (requestParameters['xUserId'] != null) {
@@ -499,22 +991,23 @@ export class AdminApi extends runtime.BaseAPI {
499
991
  if (this.configuration && this.configuration.apiKey) {
500
992
  headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
501
993
  }
502
- let urlPath = `/api/v1/admin/chats`;
994
+ let urlPath = `/api/v1/admin/concept-images`;
503
995
  const response = yield this.request({
504
996
  path: urlPath,
505
997
  method: 'GET',
506
998
  headers: headerParameters,
507
999
  query: queryParameters,
508
1000
  }, initOverrides);
509
- return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedChatsFromJSON(jsonValue));
1001
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedConceptImagesFromJSON(jsonValue));
510
1002
  });
511
1003
  }
512
1004
  /**
513
- * List recent chats across all account users
1005
+ * 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.
1006
+ * List library concept images in any state
514
1007
  */
515
- adminListChats(requestParameters, initOverrides) {
1008
+ adminListConceptImages(requestParameters, initOverrides) {
516
1009
  return __awaiter(this, void 0, void 0, function* () {
517
- const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
1010
+ const response = yield this.adminListConceptImagesRaw(requestParameters, initOverrides);
518
1011
  return yield response.value();
519
1012
  });
520
1013
  }
@@ -867,6 +1360,98 @@ export class AdminApi extends runtime.BaseAPI {
867
1360
  return yield response.value();
868
1361
  });
869
1362
  }
1363
+ /**
1364
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
1365
+ * Enqueue a hidden revision of a concept diagram
1366
+ */
1367
+ adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
1368
+ return __awaiter(this, void 0, void 0, function* () {
1369
+ if (requestParameters['xUserId'] == null) {
1370
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRegenerateConceptDiagram().');
1371
+ }
1372
+ if (requestParameters['diagramId'] == null) {
1373
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminRegenerateConceptDiagram().');
1374
+ }
1375
+ if (requestParameters['adminRegenerateConceptDiagramRequest'] == null) {
1376
+ throw new runtime.RequiredError('adminRegenerateConceptDiagramRequest', 'Required parameter "adminRegenerateConceptDiagramRequest" was null or undefined when calling adminRegenerateConceptDiagram().');
1377
+ }
1378
+ const queryParameters = {};
1379
+ const headerParameters = {};
1380
+ headerParameters['Content-Type'] = 'application/json';
1381
+ if (requestParameters['xUserId'] != null) {
1382
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1383
+ }
1384
+ if (this.configuration && this.configuration.apiKey) {
1385
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1386
+ }
1387
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/regenerate`;
1388
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1389
+ const response = yield this.request({
1390
+ path: urlPath,
1391
+ method: 'POST',
1392
+ headers: headerParameters,
1393
+ query: queryParameters,
1394
+ body: AdminRegenerateConceptDiagramRequestToJSON(requestParameters['adminRegenerateConceptDiagramRequest']),
1395
+ }, initOverrides);
1396
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
1397
+ });
1398
+ }
1399
+ /**
1400
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new diagram is generated from an edited brief, linked to the original by revisesDiagramId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_DIAGRAM_DAILY_LIMIT per rolling 24 hours).
1401
+ * Enqueue a hidden revision of a concept diagram
1402
+ */
1403
+ adminRegenerateConceptDiagram(requestParameters, initOverrides) {
1404
+ return __awaiter(this, void 0, void 0, function* () {
1405
+ const response = yield this.adminRegenerateConceptDiagramRaw(requestParameters, initOverrides);
1406
+ return yield response.value();
1407
+ });
1408
+ }
1409
+ /**
1410
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
1411
+ * Enqueue a hidden revision of a concept image
1412
+ */
1413
+ adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
1414
+ return __awaiter(this, void 0, void 0, function* () {
1415
+ if (requestParameters['xUserId'] == null) {
1416
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRegenerateConceptImage().');
1417
+ }
1418
+ if (requestParameters['imageId'] == null) {
1419
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminRegenerateConceptImage().');
1420
+ }
1421
+ if (requestParameters['adminRegenerateConceptImageRequest'] == null) {
1422
+ throw new runtime.RequiredError('adminRegenerateConceptImageRequest', 'Required parameter "adminRegenerateConceptImageRequest" was null or undefined when calling adminRegenerateConceptImage().');
1423
+ }
1424
+ const queryParameters = {};
1425
+ const headerParameters = {};
1426
+ headerParameters['Content-Type'] = 'application/json';
1427
+ if (requestParameters['xUserId'] != null) {
1428
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1429
+ }
1430
+ if (this.configuration && this.configuration.apiKey) {
1431
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1432
+ }
1433
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/regenerate`;
1434
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
1435
+ const response = yield this.request({
1436
+ path: urlPath,
1437
+ method: 'POST',
1438
+ headers: headerParameters,
1439
+ query: queryParameters,
1440
+ body: AdminRegenerateConceptImageRequestToJSON(requestParameters['adminRegenerateConceptImageRequest']),
1441
+ }, initOverrides);
1442
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptMediaJobFromJSON(jsonValue));
1443
+ });
1444
+ }
1445
+ /**
1446
+ * Returns 202 with a pending job at once; the generation runs in a background worker. Poll adminGetConceptMediaJob with the job id until status is succeeded (resultMediaId is the new draft) or failed (errorCode says why: off_topic, moderation_blocked, timeout, not_found, generation_failed, authoring_failed, save_failed, limit_reached, internal_error, delivery_failed). Each job runs its paid generation at most once: retry a failed job by enqueueing a new one. The new image is generated from an edited prompt, linked to the original by revisesImageId even when the original is hidden or deleted, filed under the original\'s concept, attributed to the caller, and stored hidden. The original is left as it is. Counts against the caller\'s admin limit (ADMIN_CONCEPT_IMAGE_DAILY_LIMIT per rolling 24 hours).
1447
+ * Enqueue a hidden revision of a concept image
1448
+ */
1449
+ adminRegenerateConceptImage(requestParameters, initOverrides) {
1450
+ return __awaiter(this, void 0, void 0, function* () {
1451
+ const response = yield this.adminRegenerateConceptImageRaw(requestParameters, initOverrides);
1452
+ return yield response.value();
1453
+ });
1454
+ }
870
1455
  /**
871
1456
  * 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.
872
1457
  * Reset a user\'s Athena learning data to a blank slate
@@ -908,6 +1493,217 @@ export class AdminApi extends runtime.BaseAPI {
908
1493
  return yield response.value();
909
1494
  });
910
1495
  }
1496
+ /**
1497
+ * 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.
1498
+ * Restore a soft-deleted concept diagram
1499
+ */
1500
+ adminRestoreConceptDiagramRaw(requestParameters, initOverrides) {
1501
+ return __awaiter(this, void 0, void 0, function* () {
1502
+ if (requestParameters['xUserId'] == null) {
1503
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRestoreConceptDiagram().');
1504
+ }
1505
+ if (requestParameters['diagramId'] == null) {
1506
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminRestoreConceptDiagram().');
1507
+ }
1508
+ const queryParameters = {};
1509
+ const headerParameters = {};
1510
+ if (requestParameters['xUserId'] != null) {
1511
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1512
+ }
1513
+ if (this.configuration && this.configuration.apiKey) {
1514
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1515
+ }
1516
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/restore`;
1517
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1518
+ const response = yield this.request({
1519
+ path: urlPath,
1520
+ method: 'POST',
1521
+ headers: headerParameters,
1522
+ query: queryParameters,
1523
+ }, initOverrides);
1524
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptDiagramDetailFromJSON(jsonValue));
1525
+ });
1526
+ }
1527
+ /**
1528
+ * 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.
1529
+ * Restore a soft-deleted concept diagram
1530
+ */
1531
+ adminRestoreConceptDiagram(requestParameters, initOverrides) {
1532
+ return __awaiter(this, void 0, void 0, function* () {
1533
+ const response = yield this.adminRestoreConceptDiagramRaw(requestParameters, initOverrides);
1534
+ return yield response.value();
1535
+ });
1536
+ }
1537
+ /**
1538
+ * 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.
1539
+ * Restore a soft-deleted concept image
1540
+ */
1541
+ adminRestoreConceptImageRaw(requestParameters, initOverrides) {
1542
+ return __awaiter(this, void 0, void 0, function* () {
1543
+ if (requestParameters['xUserId'] == null) {
1544
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRestoreConceptImage().');
1545
+ }
1546
+ if (requestParameters['imageId'] == null) {
1547
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminRestoreConceptImage().');
1548
+ }
1549
+ const queryParameters = {};
1550
+ const headerParameters = {};
1551
+ if (requestParameters['xUserId'] != null) {
1552
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1553
+ }
1554
+ if (this.configuration && this.configuration.apiKey) {
1555
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1556
+ }
1557
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/restore`;
1558
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
1559
+ const response = yield this.request({
1560
+ path: urlPath,
1561
+ method: 'POST',
1562
+ headers: headerParameters,
1563
+ query: queryParameters,
1564
+ }, initOverrides);
1565
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminConceptImageDetailFromJSON(jsonValue));
1566
+ });
1567
+ }
1568
+ /**
1569
+ * 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.
1570
+ * Restore a soft-deleted concept image
1571
+ */
1572
+ adminRestoreConceptImage(requestParameters, initOverrides) {
1573
+ return __awaiter(this, void 0, void 0, function* () {
1574
+ const response = yield this.adminRestoreConceptImageRaw(requestParameters, initOverrides);
1575
+ return yield response.value();
1576
+ });
1577
+ }
1578
+ /**
1579
+ * Concepts whose name contains the query (case-insensitive), exact and prefix matches first, each with its count of non-deleted library images and diagrams. For picking the concept an admin-generated image or diagram is filed under. Without a query, concepts by name.
1580
+ * Search the global concepts by name
1581
+ */
1582
+ adminSearchConceptsRaw(requestParameters, initOverrides) {
1583
+ return __awaiter(this, void 0, void 0, function* () {
1584
+ if (requestParameters['xUserId'] == null) {
1585
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminSearchConcepts().');
1586
+ }
1587
+ const queryParameters = {};
1588
+ if (requestParameters['query'] != null) {
1589
+ queryParameters['query'] = requestParameters['query'];
1590
+ }
1591
+ if (requestParameters['limit'] != null) {
1592
+ queryParameters['limit'] = requestParameters['limit'];
1593
+ }
1594
+ const headerParameters = {};
1595
+ if (requestParameters['xUserId'] != null) {
1596
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1597
+ }
1598
+ if (this.configuration && this.configuration.apiKey) {
1599
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1600
+ }
1601
+ let urlPath = `/api/v1/admin/concepts`;
1602
+ const response = yield this.request({
1603
+ path: urlPath,
1604
+ method: 'GET',
1605
+ headers: headerParameters,
1606
+ query: queryParameters,
1607
+ }, initOverrides);
1608
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AdminConceptSearchResultFromJSON));
1609
+ });
1610
+ }
1611
+ /**
1612
+ * 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.
1613
+ * Search the global concepts by name
1614
+ */
1615
+ adminSearchConcepts(requestParameters, initOverrides) {
1616
+ return __awaiter(this, void 0, void 0, function* () {
1617
+ const response = yield this.adminSearchConceptsRaw(requestParameters, initOverrides);
1618
+ return yield response.value();
1619
+ });
1620
+ }
1621
+ /**
1622
+ * 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.
1623
+ * Show a hidden concept diagram to learners
1624
+ */
1625
+ adminShowConceptDiagramRaw(requestParameters, initOverrides) {
1626
+ return __awaiter(this, void 0, void 0, function* () {
1627
+ if (requestParameters['xUserId'] == null) {
1628
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminShowConceptDiagram().');
1629
+ }
1630
+ if (requestParameters['diagramId'] == null) {
1631
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminShowConceptDiagram().');
1632
+ }
1633
+ const queryParameters = {};
1634
+ const headerParameters = {};
1635
+ headerParameters['Content-Type'] = 'application/json';
1636
+ if (requestParameters['xUserId'] != null) {
1637
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1638
+ }
1639
+ if (this.configuration && this.configuration.apiKey) {
1640
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1641
+ }
1642
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/show`;
1643
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1644
+ const response = yield this.request({
1645
+ path: urlPath,
1646
+ method: 'POST',
1647
+ headers: headerParameters,
1648
+ query: queryParameters,
1649
+ body: AdminShowConceptMediaRequestToJSON(requestParameters['adminShowConceptMediaRequest']),
1650
+ }, initOverrides);
1651
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminShownConceptDiagramFromJSON(jsonValue));
1652
+ });
1653
+ }
1654
+ /**
1655
+ * 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.
1656
+ * Show a hidden concept diagram to learners
1657
+ */
1658
+ adminShowConceptDiagram(requestParameters, initOverrides) {
1659
+ return __awaiter(this, void 0, void 0, function* () {
1660
+ const response = yield this.adminShowConceptDiagramRaw(requestParameters, initOverrides);
1661
+ return yield response.value();
1662
+ });
1663
+ }
1664
+ /**
1665
+ * 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).
1666
+ * Show a hidden concept image to learners
1667
+ */
1668
+ adminShowConceptImageRaw(requestParameters, initOverrides) {
1669
+ return __awaiter(this, void 0, void 0, function* () {
1670
+ if (requestParameters['xUserId'] == null) {
1671
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminShowConceptImage().');
1672
+ }
1673
+ if (requestParameters['imageId'] == null) {
1674
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminShowConceptImage().');
1675
+ }
1676
+ const queryParameters = {};
1677
+ const headerParameters = {};
1678
+ headerParameters['Content-Type'] = 'application/json';
1679
+ if (requestParameters['xUserId'] != null) {
1680
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1681
+ }
1682
+ if (this.configuration && this.configuration.apiKey) {
1683
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1684
+ }
1685
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/show`;
1686
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
1687
+ const response = yield this.request({
1688
+ path: urlPath,
1689
+ method: 'POST',
1690
+ headers: headerParameters,
1691
+ query: queryParameters,
1692
+ body: AdminShowConceptMediaRequestToJSON(requestParameters['adminShowConceptMediaRequest']),
1693
+ }, initOverrides);
1694
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminShownConceptImageFromJSON(jsonValue));
1695
+ });
1696
+ }
1697
+ /**
1698
+ * 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).
1699
+ * Show a hidden concept image to learners
1700
+ */
1701
+ adminShowConceptImage(requestParameters, initOverrides) {
1702
+ return __awaiter(this, void 0, void 0, function* () {
1703
+ const response = yield this.adminShowConceptImageRaw(requestParameters, initOverrides);
1704
+ return yield response.value();
1705
+ });
1706
+ }
911
1707
  /**
912
1708
  * Trigger re-analysis for a chat
913
1709
  */
@@ -992,6 +1788,40 @@ export class AdminApi extends runtime.BaseAPI {
992
1788
  });
993
1789
  }
994
1790
  }
1791
+ /**
1792
+ * @export
1793
+ */
1794
+ export const AdminListConceptDiagramsStateEnum = {
1795
+ NotDeleted: 'not_deleted',
1796
+ Visible: 'visible',
1797
+ Hidden: 'hidden',
1798
+ Deleted: 'deleted',
1799
+ All: 'all'
1800
+ };
1801
+ /**
1802
+ * @export
1803
+ */
1804
+ export const AdminListConceptDiagramsOriginEnum = {
1805
+ Chat: 'chat',
1806
+ Admin: 'admin'
1807
+ };
1808
+ /**
1809
+ * @export
1810
+ */
1811
+ export const AdminListConceptImagesStateEnum = {
1812
+ NotDeleted: 'not_deleted',
1813
+ Visible: 'visible',
1814
+ Hidden: 'hidden',
1815
+ Deleted: 'deleted',
1816
+ All: 'all'
1817
+ };
1818
+ /**
1819
+ * @export
1820
+ */
1821
+ export const AdminListConceptImagesOriginEnum = {
1822
+ Chat: 'chat',
1823
+ Admin: 'admin'
1824
+ };
995
1825
  /**
996
1826
  * @export
997
1827
  */