@instructure/athena-api-client 3.46.2 → 3.47.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 (90) hide show
  1. package/README.md +37 -0
  2. package/dist/apis/AdminApi.d.ts +296 -1
  3. package/dist/apis/AdminApi.js +809 -20
  4. package/dist/esm/apis/AdminApi.d.ts +296 -1
  5. package/dist/esm/apis/AdminApi.js +809 -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/AdminConceptMediaRevision.d.ts +67 -0
  21. package/dist/esm/models/AdminConceptMediaRevision.js +70 -0
  22. package/dist/esm/models/AdminConceptSearchResult.d.ts +56 -0
  23. package/dist/esm/models/AdminConceptSearchResult.js +59 -0
  24. package/dist/esm/models/AdminGenerateConceptDiagramRequest.d.ts +56 -0
  25. package/dist/esm/models/AdminGenerateConceptDiagramRequest.js +51 -0
  26. package/dist/esm/models/AdminGenerateConceptImageRequest.d.ts +50 -0
  27. package/dist/esm/models/AdminGenerateConceptImageRequest.js +49 -0
  28. package/dist/esm/models/AdminGeneratedConceptDiagram.d.ts +219 -0
  29. package/dist/esm/models/AdminGeneratedConceptDiagram.js +175 -0
  30. package/dist/esm/models/AdminGeneratedConceptImage.d.ts +237 -0
  31. package/dist/esm/models/AdminGeneratedConceptImage.js +187 -0
  32. package/dist/esm/models/AdminPaginatedConceptDiagrams.d.ts +39 -0
  33. package/dist/esm/models/AdminPaginatedConceptDiagrams.js +48 -0
  34. package/dist/esm/models/AdminPaginatedConceptImages.d.ts +39 -0
  35. package/dist/esm/models/AdminPaginatedConceptImages.js +48 -0
  36. package/dist/esm/models/AdminRegenerateConceptDiagramRequest.d.ts +44 -0
  37. package/dist/esm/models/AdminRegenerateConceptDiagramRequest.js +47 -0
  38. package/dist/esm/models/AdminRegenerateConceptImageRequest.d.ts +38 -0
  39. package/dist/esm/models/AdminRegenerateConceptImageRequest.js +45 -0
  40. package/dist/esm/models/AdminShowConceptMediaRequest.d.ts +32 -0
  41. package/dist/esm/models/AdminShowConceptMediaRequest.js +41 -0
  42. package/dist/esm/models/AdminShownConceptDiagram.d.ts +215 -0
  43. package/dist/esm/models/AdminShownConceptDiagram.js +170 -0
  44. package/dist/esm/models/AdminShownConceptImage.d.ts +233 -0
  45. package/dist/esm/models/AdminShownConceptImage.js +182 -0
  46. package/dist/esm/models/index.d.ts +20 -0
  47. package/dist/esm/models/index.js +20 -0
  48. package/dist/models/AdminConceptDiagram.d.ts +165 -0
  49. package/dist/models/AdminConceptDiagram.js +144 -0
  50. package/dist/models/AdminConceptDiagramDetail.d.ts +203 -0
  51. package/dist/models/AdminConceptDiagramDetail.js +170 -0
  52. package/dist/models/AdminConceptImage.d.ts +183 -0
  53. package/dist/models/AdminConceptImage.js +156 -0
  54. package/dist/models/AdminConceptImageDetail.d.ts +221 -0
  55. package/dist/models/AdminConceptImageDetail.js +182 -0
  56. package/dist/models/AdminConceptMediaActor.d.ts +38 -0
  57. package/dist/models/AdminConceptMediaActor.js +54 -0
  58. package/dist/models/AdminConceptMediaConcept.d.ts +38 -0
  59. package/dist/models/AdminConceptMediaConcept.js +54 -0
  60. package/dist/models/AdminConceptMediaHistoryEntry.d.ts +92 -0
  61. package/dist/models/AdminConceptMediaHistoryEntry.js +95 -0
  62. package/dist/models/AdminConceptMediaRevision.d.ts +67 -0
  63. package/dist/models/AdminConceptMediaRevision.js +78 -0
  64. package/dist/models/AdminConceptSearchResult.d.ts +56 -0
  65. package/dist/models/AdminConceptSearchResult.js +66 -0
  66. package/dist/models/AdminGenerateConceptDiagramRequest.d.ts +56 -0
  67. package/dist/models/AdminGenerateConceptDiagramRequest.js +58 -0
  68. package/dist/models/AdminGenerateConceptImageRequest.d.ts +50 -0
  69. package/dist/models/AdminGenerateConceptImageRequest.js +56 -0
  70. package/dist/models/AdminGeneratedConceptDiagram.d.ts +219 -0
  71. package/dist/models/AdminGeneratedConceptDiagram.js +183 -0
  72. package/dist/models/AdminGeneratedConceptImage.d.ts +237 -0
  73. package/dist/models/AdminGeneratedConceptImage.js +195 -0
  74. package/dist/models/AdminPaginatedConceptDiagrams.d.ts +39 -0
  75. package/dist/models/AdminPaginatedConceptDiagrams.js +55 -0
  76. package/dist/models/AdminPaginatedConceptImages.d.ts +39 -0
  77. package/dist/models/AdminPaginatedConceptImages.js +55 -0
  78. package/dist/models/AdminRegenerateConceptDiagramRequest.d.ts +44 -0
  79. package/dist/models/AdminRegenerateConceptDiagramRequest.js +54 -0
  80. package/dist/models/AdminRegenerateConceptImageRequest.d.ts +38 -0
  81. package/dist/models/AdminRegenerateConceptImageRequest.js +52 -0
  82. package/dist/models/AdminShowConceptMediaRequest.d.ts +32 -0
  83. package/dist/models/AdminShowConceptMediaRequest.js +48 -0
  84. package/dist/models/AdminShownConceptDiagram.d.ts +215 -0
  85. package/dist/models/AdminShownConceptDiagram.js +178 -0
  86. package/dist/models/AdminShownConceptImage.d.ts +233 -0
  87. package/dist/models/AdminShownConceptImage.js +190 -0
  88. package/dist/models/index.d.ts +20 -0
  89. package/dist/models/index.js +20 -0
  90. package/package.json +1 -1
@@ -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
+ * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (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 response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is 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), not the learner limit.
116
+ * Generate 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.AdminGeneratedConceptDiagramFromJSON)(jsonValue));
144
+ });
145
+ }
146
+ /**
147
+ * Generates a new diagram filed under exactly one concept: conceptId as-is, or conceptName resolved first (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 response says which. Exactly one of conceptId and conceptName is required. The diagram is attributed to the calling account user with no source chat. It is 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), not the learner limit.
148
+ * Generate 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
+ * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (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 response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is 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), not the learner limit.
158
+ * Generate 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.AdminGeneratedConceptImageFromJSON)(jsonValue));
186
+ });
187
+ }
188
+ /**
189
+ * Generates a new image filed under exactly one concept: conceptId as-is, or conceptName resolved first (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 response says which. Exactly one of conceptId and conceptName is required. The image is attributed to the calling account user with no source chat. It is 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), not the learner limit.
190
+ * Generate 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,88 @@ 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
+ }
196
444
  /**
197
445
  * 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
446
  * Get quiz session summary for any session within the account
@@ -433,13 +681,184 @@ class AdminApi extends runtime.BaseAPI {
433
681
  return yield response.value();
434
682
  });
435
683
  }
684
+ /**
685
+ * 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.
686
+ * Hide a concept diagram from learners
687
+ */
688
+ adminHideConceptDiagramRaw(requestParameters, initOverrides) {
689
+ return __awaiter(this, void 0, void 0, function* () {
690
+ if (requestParameters['xUserId'] == null) {
691
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminHideConceptDiagram().');
692
+ }
693
+ if (requestParameters['diagramId'] == null) {
694
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminHideConceptDiagram().');
695
+ }
696
+ const queryParameters = {};
697
+ const headerParameters = {};
698
+ if (requestParameters['xUserId'] != null) {
699
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
700
+ }
701
+ if (this.configuration && this.configuration.apiKey) {
702
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
703
+ }
704
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/hide`;
705
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
706
+ const response = yield this.request({
707
+ path: urlPath,
708
+ method: 'POST',
709
+ headers: headerParameters,
710
+ query: queryParameters,
711
+ }, initOverrides);
712
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
713
+ });
714
+ }
715
+ /**
716
+ * 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.
717
+ * Hide a concept diagram from learners
718
+ */
719
+ adminHideConceptDiagram(requestParameters, initOverrides) {
720
+ return __awaiter(this, void 0, void 0, function* () {
721
+ const response = yield this.adminHideConceptDiagramRaw(requestParameters, initOverrides);
722
+ return yield response.value();
723
+ });
724
+ }
725
+ /**
726
+ * 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).
727
+ * Hide a concept image from learners
728
+ */
729
+ adminHideConceptImageRaw(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 adminHideConceptImage().');
733
+ }
734
+ if (requestParameters['imageId'] == null) {
735
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminHideConceptImage().');
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-images/{imageId}/hide`;
746
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
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.AdminConceptImageDetailFromJSON)(jsonValue));
754
+ });
755
+ }
756
+ /**
757
+ * 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).
758
+ * Hide a concept image from learners
759
+ */
760
+ adminHideConceptImage(requestParameters, initOverrides) {
761
+ return __awaiter(this, void 0, void 0, function* () {
762
+ const response = yield this.adminHideConceptImageRaw(requestParameters, initOverrides);
763
+ return yield response.value();
764
+ });
765
+ }
766
+ /**
767
+ * List all active streaks (currentDays > 0) across the account, paginated
768
+ */
769
+ adminListActiveStreaksRaw(requestParameters, initOverrides) {
770
+ return __awaiter(this, void 0, void 0, function* () {
771
+ if (requestParameters['xUserId'] == null) {
772
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
773
+ }
774
+ const queryParameters = {};
775
+ if (requestParameters['limit'] != null) {
776
+ queryParameters['limit'] = requestParameters['limit'];
777
+ }
778
+ if (requestParameters['cursor'] != null) {
779
+ queryParameters['cursor'] = requestParameters['cursor'];
780
+ }
781
+ const headerParameters = {};
782
+ if (requestParameters['xUserId'] != null) {
783
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
784
+ }
785
+ if (this.configuration && this.configuration.apiKey) {
786
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
787
+ }
788
+ let urlPath = `/api/v1/admin/streaks/active`;
789
+ const response = yield this.request({
790
+ path: urlPath,
791
+ method: 'GET',
792
+ headers: headerParameters,
793
+ query: queryParameters,
794
+ }, initOverrides);
795
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedActiveStreaksFromJSON)(jsonValue));
796
+ });
797
+ }
436
798
  /**
437
799
  * List all active streaks (currentDays > 0) across the account, paginated
438
800
  */
439
- adminListActiveStreaksRaw(requestParameters, initOverrides) {
801
+ adminListActiveStreaks(requestParameters, initOverrides) {
802
+ return __awaiter(this, void 0, void 0, function* () {
803
+ const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
804
+ return yield response.value();
805
+ });
806
+ }
807
+ /**
808
+ * List recent chats across all account users
809
+ */
810
+ adminListChatsRaw(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 adminListChats().');
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
+ if (requestParameters['chatType'] != null) {
823
+ queryParameters['chatType'] = requestParameters['chatType'];
824
+ }
825
+ if (requestParameters['forReview'] != null) {
826
+ queryParameters['forReview'] = requestParameters['forReview'];
827
+ }
828
+ const headerParameters = {};
829
+ if (requestParameters['xUserId'] != null) {
830
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
831
+ }
832
+ if (this.configuration && this.configuration.apiKey) {
833
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
834
+ }
835
+ let urlPath = `/api/v1/admin/chats`;
836
+ const response = yield this.request({
837
+ path: urlPath,
838
+ method: 'GET',
839
+ headers: headerParameters,
840
+ query: queryParameters,
841
+ }, initOverrides);
842
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedChatsFromJSON)(jsonValue));
843
+ });
844
+ }
845
+ /**
846
+ * List recent chats across all account users
847
+ */
848
+ adminListChats(requestParameters, initOverrides) {
849
+ return __awaiter(this, void 0, void 0, function* () {
850
+ const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
851
+ return yield response.value();
852
+ });
853
+ }
854
+ /**
855
+ * 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.
856
+ * List library concept diagrams in any state
857
+ */
858
+ adminListConceptDiagramsRaw(requestParameters, initOverrides) {
440
859
  return __awaiter(this, void 0, void 0, function* () {
441
860
  if (requestParameters['xUserId'] == null) {
442
- throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListActiveStreaks().');
861
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListConceptDiagrams().');
443
862
  }
444
863
  const queryParameters = {};
445
864
  if (requestParameters['limit'] != null) {
@@ -448,6 +867,24 @@ class AdminApi extends runtime.BaseAPI {
448
867
  if (requestParameters['cursor'] != null) {
449
868
  queryParameters['cursor'] = requestParameters['cursor'];
450
869
  }
870
+ if (requestParameters['conceptId'] != null) {
871
+ queryParameters['conceptId'] = requestParameters['conceptId'];
872
+ }
873
+ if (requestParameters['conceptQuery'] != null) {
874
+ queryParameters['conceptQuery'] = requestParameters['conceptQuery'];
875
+ }
876
+ if (requestParameters['creatorAccountUserId'] != null) {
877
+ queryParameters['creatorAccountUserId'] = requestParameters['creatorAccountUserId'];
878
+ }
879
+ if (requestParameters['creatorUserId'] != null) {
880
+ queryParameters['creatorUserId'] = requestParameters['creatorUserId'];
881
+ }
882
+ if (requestParameters['state'] != null) {
883
+ queryParameters['state'] = requestParameters['state'];
884
+ }
885
+ if (requestParameters['origin'] != null) {
886
+ queryParameters['origin'] = requestParameters['origin'];
887
+ }
451
888
  const headerParameters = {};
452
889
  if (requestParameters['xUserId'] != null) {
453
890
  headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
@@ -455,32 +892,34 @@ class AdminApi extends runtime.BaseAPI {
455
892
  if (this.configuration && this.configuration.apiKey) {
456
893
  headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
457
894
  }
458
- let urlPath = `/api/v1/admin/streaks/active`;
895
+ let urlPath = `/api/v1/admin/concept-diagrams`;
459
896
  const response = yield this.request({
460
897
  path: urlPath,
461
898
  method: 'GET',
462
899
  headers: headerParameters,
463
900
  query: queryParameters,
464
901
  }, initOverrides);
465
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedActiveStreaksFromJSON)(jsonValue));
902
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedConceptDiagramsFromJSON)(jsonValue));
466
903
  });
467
904
  }
468
905
  /**
469
- * List all active streaks (currentDays > 0) across the account, paginated
906
+ * 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.
907
+ * List library concept diagrams in any state
470
908
  */
471
- adminListActiveStreaks(requestParameters, initOverrides) {
909
+ adminListConceptDiagrams(requestParameters, initOverrides) {
472
910
  return __awaiter(this, void 0, void 0, function* () {
473
- const response = yield this.adminListActiveStreaksRaw(requestParameters, initOverrides);
911
+ const response = yield this.adminListConceptDiagramsRaw(requestParameters, initOverrides);
474
912
  return yield response.value();
475
913
  });
476
914
  }
477
915
  /**
478
- * List recent chats across all account users
916
+ * 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.
917
+ * List library concept images in any state
479
918
  */
480
- adminListChatsRaw(requestParameters, initOverrides) {
919
+ adminListConceptImagesRaw(requestParameters, initOverrides) {
481
920
  return __awaiter(this, void 0, void 0, function* () {
482
921
  if (requestParameters['xUserId'] == null) {
483
- throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListChats().');
922
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListConceptImages().');
484
923
  }
485
924
  const queryParameters = {};
486
925
  if (requestParameters['limit'] != null) {
@@ -489,11 +928,23 @@ class AdminApi extends runtime.BaseAPI {
489
928
  if (requestParameters['cursor'] != null) {
490
929
  queryParameters['cursor'] = requestParameters['cursor'];
491
930
  }
492
- if (requestParameters['chatType'] != null) {
493
- queryParameters['chatType'] = requestParameters['chatType'];
931
+ if (requestParameters['conceptId'] != null) {
932
+ queryParameters['conceptId'] = requestParameters['conceptId'];
494
933
  }
495
- if (requestParameters['forReview'] != null) {
496
- queryParameters['forReview'] = requestParameters['forReview'];
934
+ if (requestParameters['conceptQuery'] != null) {
935
+ queryParameters['conceptQuery'] = requestParameters['conceptQuery'];
936
+ }
937
+ if (requestParameters['creatorAccountUserId'] != null) {
938
+ queryParameters['creatorAccountUserId'] = requestParameters['creatorAccountUserId'];
939
+ }
940
+ if (requestParameters['creatorUserId'] != null) {
941
+ queryParameters['creatorUserId'] = requestParameters['creatorUserId'];
942
+ }
943
+ if (requestParameters['state'] != null) {
944
+ queryParameters['state'] = requestParameters['state'];
945
+ }
946
+ if (requestParameters['origin'] != null) {
947
+ queryParameters['origin'] = requestParameters['origin'];
497
948
  }
498
949
  const headerParameters = {};
499
950
  if (requestParameters['xUserId'] != null) {
@@ -502,22 +953,23 @@ class AdminApi extends runtime.BaseAPI {
502
953
  if (this.configuration && this.configuration.apiKey) {
503
954
  headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
504
955
  }
505
- let urlPath = `/api/v1/admin/chats`;
956
+ let urlPath = `/api/v1/admin/concept-images`;
506
957
  const response = yield this.request({
507
958
  path: urlPath,
508
959
  method: 'GET',
509
960
  headers: headerParameters,
510
961
  query: queryParameters,
511
962
  }, initOverrides);
512
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedChatsFromJSON)(jsonValue));
963
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedConceptImagesFromJSON)(jsonValue));
513
964
  });
514
965
  }
515
966
  /**
516
- * List recent chats across all account users
967
+ * 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.
968
+ * List library concept images in any state
517
969
  */
518
- adminListChats(requestParameters, initOverrides) {
970
+ adminListConceptImages(requestParameters, initOverrides) {
519
971
  return __awaiter(this, void 0, void 0, function* () {
520
- const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
972
+ const response = yield this.adminListConceptImagesRaw(requestParameters, initOverrides);
521
973
  return yield response.value();
522
974
  });
523
975
  }
@@ -870,6 +1322,98 @@ class AdminApi extends runtime.BaseAPI {
870
1322
  return yield response.value();
871
1323
  });
872
1324
  }
1325
+ /**
1326
+ * Generates a new diagram 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).
1327
+ * Generate a hidden revision of a concept diagram
1328
+ */
1329
+ adminRegenerateConceptDiagramRaw(requestParameters, initOverrides) {
1330
+ return __awaiter(this, void 0, void 0, function* () {
1331
+ if (requestParameters['xUserId'] == null) {
1332
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRegenerateConceptDiagram().');
1333
+ }
1334
+ if (requestParameters['diagramId'] == null) {
1335
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminRegenerateConceptDiagram().');
1336
+ }
1337
+ if (requestParameters['adminRegenerateConceptDiagramRequest'] == null) {
1338
+ throw new runtime.RequiredError('adminRegenerateConceptDiagramRequest', 'Required parameter "adminRegenerateConceptDiagramRequest" was null or undefined when calling adminRegenerateConceptDiagram().');
1339
+ }
1340
+ const queryParameters = {};
1341
+ const headerParameters = {};
1342
+ headerParameters['Content-Type'] = 'application/json';
1343
+ if (requestParameters['xUserId'] != null) {
1344
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1345
+ }
1346
+ if (this.configuration && this.configuration.apiKey) {
1347
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1348
+ }
1349
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/regenerate`;
1350
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1351
+ const response = yield this.request({
1352
+ path: urlPath,
1353
+ method: 'POST',
1354
+ headers: headerParameters,
1355
+ query: queryParameters,
1356
+ body: (0, index_1.AdminRegenerateConceptDiagramRequestToJSON)(requestParameters['adminRegenerateConceptDiagramRequest']),
1357
+ }, initOverrides);
1358
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
1359
+ });
1360
+ }
1361
+ /**
1362
+ * Generates a new diagram 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).
1363
+ * Generate a hidden revision of a concept diagram
1364
+ */
1365
+ adminRegenerateConceptDiagram(requestParameters, initOverrides) {
1366
+ return __awaiter(this, void 0, void 0, function* () {
1367
+ const response = yield this.adminRegenerateConceptDiagramRaw(requestParameters, initOverrides);
1368
+ return yield response.value();
1369
+ });
1370
+ }
1371
+ /**
1372
+ * Generates a new image 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).
1373
+ * Generate a hidden revision of a concept image
1374
+ */
1375
+ adminRegenerateConceptImageRaw(requestParameters, initOverrides) {
1376
+ return __awaiter(this, void 0, void 0, function* () {
1377
+ if (requestParameters['xUserId'] == null) {
1378
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRegenerateConceptImage().');
1379
+ }
1380
+ if (requestParameters['imageId'] == null) {
1381
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminRegenerateConceptImage().');
1382
+ }
1383
+ if (requestParameters['adminRegenerateConceptImageRequest'] == null) {
1384
+ throw new runtime.RequiredError('adminRegenerateConceptImageRequest', 'Required parameter "adminRegenerateConceptImageRequest" was null or undefined when calling adminRegenerateConceptImage().');
1385
+ }
1386
+ const queryParameters = {};
1387
+ const headerParameters = {};
1388
+ headerParameters['Content-Type'] = 'application/json';
1389
+ if (requestParameters['xUserId'] != null) {
1390
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1391
+ }
1392
+ if (this.configuration && this.configuration.apiKey) {
1393
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1394
+ }
1395
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/regenerate`;
1396
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
1397
+ const response = yield this.request({
1398
+ path: urlPath,
1399
+ method: 'POST',
1400
+ headers: headerParameters,
1401
+ query: queryParameters,
1402
+ body: (0, index_1.AdminRegenerateConceptImageRequestToJSON)(requestParameters['adminRegenerateConceptImageRequest']),
1403
+ }, initOverrides);
1404
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptImageDetailFromJSON)(jsonValue));
1405
+ });
1406
+ }
1407
+ /**
1408
+ * Generates a new image 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).
1409
+ * Generate a hidden revision of a concept image
1410
+ */
1411
+ adminRegenerateConceptImage(requestParameters, initOverrides) {
1412
+ return __awaiter(this, void 0, void 0, function* () {
1413
+ const response = yield this.adminRegenerateConceptImageRaw(requestParameters, initOverrides);
1414
+ return yield response.value();
1415
+ });
1416
+ }
873
1417
  /**
874
1418
  * 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
1419
  * Reset a user\'s Athena learning data to a blank slate
@@ -911,6 +1455,217 @@ class AdminApi extends runtime.BaseAPI {
911
1455
  return yield response.value();
912
1456
  });
913
1457
  }
1458
+ /**
1459
+ * 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.
1460
+ * Restore a soft-deleted concept diagram
1461
+ */
1462
+ adminRestoreConceptDiagramRaw(requestParameters, initOverrides) {
1463
+ return __awaiter(this, void 0, void 0, function* () {
1464
+ if (requestParameters['xUserId'] == null) {
1465
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminRestoreConceptDiagram().');
1466
+ }
1467
+ if (requestParameters['diagramId'] == null) {
1468
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminRestoreConceptDiagram().');
1469
+ }
1470
+ const queryParameters = {};
1471
+ const headerParameters = {};
1472
+ if (requestParameters['xUserId'] != null) {
1473
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1474
+ }
1475
+ if (this.configuration && this.configuration.apiKey) {
1476
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1477
+ }
1478
+ let urlPath = `/api/v1/admin/concept-diagrams/{diagramId}/restore`;
1479
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1480
+ const response = yield this.request({
1481
+ path: urlPath,
1482
+ method: 'POST',
1483
+ headers: headerParameters,
1484
+ query: queryParameters,
1485
+ }, initOverrides);
1486
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminConceptDiagramDetailFromJSON)(jsonValue));
1487
+ });
1488
+ }
1489
+ /**
1490
+ * 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.
1491
+ * Restore a soft-deleted concept diagram
1492
+ */
1493
+ adminRestoreConceptDiagram(requestParameters, initOverrides) {
1494
+ return __awaiter(this, void 0, void 0, function* () {
1495
+ const response = yield this.adminRestoreConceptDiagramRaw(requestParameters, initOverrides);
1496
+ return yield response.value();
1497
+ });
1498
+ }
1499
+ /**
1500
+ * 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.
1501
+ * Restore a soft-deleted concept image
1502
+ */
1503
+ adminRestoreConceptImageRaw(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 adminRestoreConceptImage().');
1507
+ }
1508
+ if (requestParameters['imageId'] == null) {
1509
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminRestoreConceptImage().');
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-images/{imageId}/restore`;
1520
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
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.AdminConceptImageDetailFromJSON)(jsonValue));
1528
+ });
1529
+ }
1530
+ /**
1531
+ * 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.
1532
+ * Restore a soft-deleted concept image
1533
+ */
1534
+ adminRestoreConceptImage(requestParameters, initOverrides) {
1535
+ return __awaiter(this, void 0, void 0, function* () {
1536
+ const response = yield this.adminRestoreConceptImageRaw(requestParameters, initOverrides);
1537
+ return yield response.value();
1538
+ });
1539
+ }
1540
+ /**
1541
+ * 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.
1542
+ * Search the global concepts by name
1543
+ */
1544
+ adminSearchConceptsRaw(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 adminSearchConcepts().');
1548
+ }
1549
+ const queryParameters = {};
1550
+ if (requestParameters['query'] != null) {
1551
+ queryParameters['query'] = requestParameters['query'];
1552
+ }
1553
+ if (requestParameters['limit'] != null) {
1554
+ queryParameters['limit'] = requestParameters['limit'];
1555
+ }
1556
+ const headerParameters = {};
1557
+ if (requestParameters['xUserId'] != null) {
1558
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1559
+ }
1560
+ if (this.configuration && this.configuration.apiKey) {
1561
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1562
+ }
1563
+ let urlPath = `/api/v1/admin/concepts`;
1564
+ const response = yield this.request({
1565
+ path: urlPath,
1566
+ method: 'GET',
1567
+ headers: headerParameters,
1568
+ query: queryParameters,
1569
+ }, initOverrides);
1570
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AdminConceptSearchResultFromJSON));
1571
+ });
1572
+ }
1573
+ /**
1574
+ * 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.
1575
+ * Search the global concepts by name
1576
+ */
1577
+ adminSearchConcepts(requestParameters, initOverrides) {
1578
+ return __awaiter(this, void 0, void 0, function* () {
1579
+ const response = yield this.adminSearchConceptsRaw(requestParameters, initOverrides);
1580
+ return yield response.value();
1581
+ });
1582
+ }
1583
+ /**
1584
+ * 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.
1585
+ * Show a hidden concept diagram to learners
1586
+ */
1587
+ adminShowConceptDiagramRaw(requestParameters, initOverrides) {
1588
+ return __awaiter(this, void 0, void 0, function* () {
1589
+ if (requestParameters['xUserId'] == null) {
1590
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminShowConceptDiagram().');
1591
+ }
1592
+ if (requestParameters['diagramId'] == null) {
1593
+ throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling adminShowConceptDiagram().');
1594
+ }
1595
+ const queryParameters = {};
1596
+ const headerParameters = {};
1597
+ headerParameters['Content-Type'] = 'application/json';
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/concept-diagrams/{diagramId}/show`;
1605
+ urlPath = urlPath.replace(`{${"diagramId"}}`, encodeURIComponent(String(requestParameters['diagramId'])));
1606
+ const response = yield this.request({
1607
+ path: urlPath,
1608
+ method: 'POST',
1609
+ headers: headerParameters,
1610
+ query: queryParameters,
1611
+ body: (0, index_1.AdminShowConceptMediaRequestToJSON)(requestParameters['adminShowConceptMediaRequest']),
1612
+ }, initOverrides);
1613
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminShownConceptDiagramFromJSON)(jsonValue));
1614
+ });
1615
+ }
1616
+ /**
1617
+ * 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.
1618
+ * Show a hidden concept diagram to learners
1619
+ */
1620
+ adminShowConceptDiagram(requestParameters, initOverrides) {
1621
+ return __awaiter(this, void 0, void 0, function* () {
1622
+ const response = yield this.adminShowConceptDiagramRaw(requestParameters, initOverrides);
1623
+ return yield response.value();
1624
+ });
1625
+ }
1626
+ /**
1627
+ * 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).
1628
+ * Show a hidden concept image to learners
1629
+ */
1630
+ adminShowConceptImageRaw(requestParameters, initOverrides) {
1631
+ return __awaiter(this, void 0, void 0, function* () {
1632
+ if (requestParameters['xUserId'] == null) {
1633
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminShowConceptImage().');
1634
+ }
1635
+ if (requestParameters['imageId'] == null) {
1636
+ throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling adminShowConceptImage().');
1637
+ }
1638
+ const queryParameters = {};
1639
+ const headerParameters = {};
1640
+ headerParameters['Content-Type'] = 'application/json';
1641
+ if (requestParameters['xUserId'] != null) {
1642
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
1643
+ }
1644
+ if (this.configuration && this.configuration.apiKey) {
1645
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
1646
+ }
1647
+ let urlPath = `/api/v1/admin/concept-images/{imageId}/show`;
1648
+ urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
1649
+ const response = yield this.request({
1650
+ path: urlPath,
1651
+ method: 'POST',
1652
+ headers: headerParameters,
1653
+ query: queryParameters,
1654
+ body: (0, index_1.AdminShowConceptMediaRequestToJSON)(requestParameters['adminShowConceptMediaRequest']),
1655
+ }, initOverrides);
1656
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminShownConceptImageFromJSON)(jsonValue));
1657
+ });
1658
+ }
1659
+ /**
1660
+ * 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).
1661
+ * Show a hidden concept image to learners
1662
+ */
1663
+ adminShowConceptImage(requestParameters, initOverrides) {
1664
+ return __awaiter(this, void 0, void 0, function* () {
1665
+ const response = yield this.adminShowConceptImageRaw(requestParameters, initOverrides);
1666
+ return yield response.value();
1667
+ });
1668
+ }
914
1669
  /**
915
1670
  * Trigger re-analysis for a chat
916
1671
  */
@@ -996,6 +1751,40 @@ class AdminApi extends runtime.BaseAPI {
996
1751
  }
997
1752
  }
998
1753
  exports.AdminApi = AdminApi;
1754
+ /**
1755
+ * @export
1756
+ */
1757
+ exports.AdminListConceptDiagramsStateEnum = {
1758
+ NotDeleted: 'not_deleted',
1759
+ Visible: 'visible',
1760
+ Hidden: 'hidden',
1761
+ Deleted: 'deleted',
1762
+ All: 'all'
1763
+ };
1764
+ /**
1765
+ * @export
1766
+ */
1767
+ exports.AdminListConceptDiagramsOriginEnum = {
1768
+ Chat: 'chat',
1769
+ Admin: 'admin'
1770
+ };
1771
+ /**
1772
+ * @export
1773
+ */
1774
+ exports.AdminListConceptImagesStateEnum = {
1775
+ NotDeleted: 'not_deleted',
1776
+ Visible: 'visible',
1777
+ Hidden: 'hidden',
1778
+ Deleted: 'deleted',
1779
+ All: 'all'
1780
+ };
1781
+ /**
1782
+ * @export
1783
+ */
1784
+ exports.AdminListConceptImagesOriginEnum = {
1785
+ Chat: 'chat',
1786
+ Admin: 'admin'
1787
+ };
999
1788
  /**
1000
1789
  * @export
1001
1790
  */