@instructure/athena-api-client 3.47.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/dist/apis/AdminApi.d.ts +53 -37
- package/dist/apis/AdminApi.js +75 -32
- package/dist/apis/ConceptDiagramsApi.d.ts +15 -1
- package/dist/apis/ConceptDiagramsApi.js +41 -0
- package/dist/apis/ConceptImagesApi.d.ts +15 -1
- package/dist/apis/ConceptImagesApi.js +41 -0
- package/dist/esm/apis/AdminApi.d.ts +53 -37
- package/dist/esm/apis/AdminApi.js +76 -33
- package/dist/esm/apis/ConceptDiagramsApi.d.ts +15 -1
- package/dist/esm/apis/ConceptDiagramsApi.js +42 -1
- package/dist/esm/apis/ConceptImagesApi.d.ts +15 -1
- package/dist/esm/apis/ConceptImagesApi.js +42 -1
- package/dist/esm/models/AdminConceptDiagram.d.ts +19 -1
- package/dist/esm/models/AdminConceptDiagram.js +12 -0
- package/dist/esm/models/AdminConceptDiagramDetail.d.ts +19 -1
- package/dist/esm/models/AdminConceptDiagramDetail.js +12 -0
- package/dist/esm/models/AdminConceptImage.d.ts +19 -1
- package/dist/esm/models/AdminConceptImage.js +12 -0
- package/dist/esm/models/AdminConceptImageDetail.d.ts +19 -1
- package/dist/esm/models/AdminConceptImageDetail.js +12 -0
- package/dist/esm/models/AdminConceptMediaJob.d.ts +157 -0
- package/dist/esm/models/AdminConceptMediaJob.js +139 -0
- package/dist/esm/models/AdminShownConceptDiagram.d.ts +19 -1
- package/dist/esm/models/AdminShownConceptDiagram.js +12 -0
- package/dist/esm/models/AdminShownConceptImage.d.ts +19 -1
- package/dist/esm/models/AdminShownConceptImage.js +12 -0
- package/dist/esm/models/ConceptMediaFlagResult.d.ts +32 -0
- package/dist/esm/models/ConceptMediaFlagResult.js +43 -0
- package/dist/esm/models/index.d.ts +2 -2
- package/dist/esm/models/index.js +2 -2
- package/dist/models/AdminConceptDiagram.d.ts +19 -1
- package/dist/models/AdminConceptDiagram.js +12 -0
- package/dist/models/AdminConceptDiagramDetail.d.ts +19 -1
- package/dist/models/AdminConceptDiagramDetail.js +12 -0
- package/dist/models/AdminConceptImage.d.ts +19 -1
- package/dist/models/AdminConceptImage.js +12 -0
- package/dist/models/AdminConceptImageDetail.d.ts +19 -1
- package/dist/models/AdminConceptImageDetail.js +12 -0
- package/dist/models/AdminConceptMediaJob.d.ts +157 -0
- package/dist/models/AdminConceptMediaJob.js +147 -0
- package/dist/models/AdminShownConceptDiagram.d.ts +19 -1
- package/dist/models/AdminShownConceptDiagram.js +12 -0
- package/dist/models/AdminShownConceptImage.d.ts +19 -1
- package/dist/models/AdminShownConceptImage.js +12 -0
- package/dist/models/ConceptMediaFlagResult.d.ts +32 -0
- package/dist/models/ConceptMediaFlagResult.js +50 -0
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -2
- package/package.json +1 -1
|
@@ -21,11 +21,52 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { ConceptDiagramDetailFromJSON, PaginatedConceptDiagramsFromJSON, } from '../models/index';
|
|
24
|
+
import { ConceptDiagramDetailFromJSON, ConceptMediaFlagResultFromJSON, PaginatedConceptDiagramsFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class ConceptDiagramsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Acts on a learner\'s thumbs-down on a shared concept diagram. A visible diagram that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any diagram id; the calling client is expected to check that the diagram was shown to this learner. Idempotent: a diagram that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved diagram stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
|
|
31
|
+
* Flag a concept diagram so learners stop being shown it
|
|
32
|
+
*/
|
|
33
|
+
flagConceptDiagramRaw(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 flagConceptDiagram().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['diagramId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('diagramId', 'Required parameter "diagramId" was null or undefined when calling flagConceptDiagram().');
|
|
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/concept-diagrams/{diagramId}/flag`;
|
|
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) => ConceptMediaFlagResultFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Acts on a learner\'s thumbs-down on a shared concept diagram. A visible diagram that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any diagram id; the calling client is expected to check that the diagram was shown to this learner. Idempotent: a diagram that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved diagram stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a diagram already rendered in an open chat stays until the chat is reloaded.
|
|
62
|
+
* Flag a concept diagram so learners stop being shown it
|
|
63
|
+
*/
|
|
64
|
+
flagConceptDiagram(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.flagConceptDiagramRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
29
70
|
/**
|
|
30
71
|
* Returns one non-hidden diagram the authenticated user authored, including its assembled HTML document.
|
|
31
72
|
* Get a concept diagram the user authored
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedConceptImages } from '../models/index';
|
|
13
|
+
import type { ConceptMediaFlagResult, PaginatedConceptImages } from '../models/index';
|
|
14
|
+
export interface FlagConceptImageRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
imageId: string;
|
|
17
|
+
}
|
|
14
18
|
export interface ListMyConceptImagesRequest {
|
|
15
19
|
xUserId: string;
|
|
16
20
|
limit?: number;
|
|
@@ -20,6 +24,16 @@ export interface ListMyConceptImagesRequest {
|
|
|
20
24
|
*
|
|
21
25
|
*/
|
|
22
26
|
export declare class ConceptImagesApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
29
|
+
* Flag a concept image so learners stop being shown it
|
|
30
|
+
*/
|
|
31
|
+
flagConceptImageRaw(requestParameters: FlagConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConceptMediaFlagResult>>;
|
|
32
|
+
/**
|
|
33
|
+
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
34
|
+
* Flag a concept image so learners stop being shown it
|
|
35
|
+
*/
|
|
36
|
+
flagConceptImage(requestParameters: FlagConceptImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConceptMediaFlagResult>;
|
|
23
37
|
/**
|
|
24
38
|
* Returns the non-hidden concept images the authenticated user generated in chat, newest first, each with a freshly signed read URL and the chat it came from. Images generated by other learners are never included, even when this user has been shown them.
|
|
25
39
|
* List the concept images the user generated
|
|
@@ -21,11 +21,52 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PaginatedConceptImagesFromJSON, } from '../models/index';
|
|
24
|
+
import { ConceptMediaFlagResultFromJSON, PaginatedConceptImagesFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class ConceptImagesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
31
|
+
* Flag a concept image so learners stop being shown it
|
|
32
|
+
*/
|
|
33
|
+
flagConceptImageRaw(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 flagConceptImage().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['imageId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('imageId', 'Required parameter "imageId" was null or undefined when calling flagConceptImage().');
|
|
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/concept-images/{imageId}/flag`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"imageId"}}`, encodeURIComponent(String(requestParameters['imageId'])));
|
|
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) => ConceptMediaFlagResultFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor), and an admin-approved image stays visible. hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
62
|
+
* Flag a concept image so learners stop being shown it
|
|
63
|
+
*/
|
|
64
|
+
flagConceptImage(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.flagConceptImageRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
29
70
|
/**
|
|
30
71
|
* Returns the non-hidden concept images the authenticated user generated in chat, newest first, each with a freshly signed read URL and the chat it came from. Images generated by other learners are never included, even when this user has been shown them.
|
|
31
72
|
* List the concept images the user generated
|
|
@@ -72,11 +72,29 @@ export interface AdminConceptDiagram {
|
|
|
72
72
|
*/
|
|
73
73
|
hiddenAt: Date | null;
|
|
74
74
|
/**
|
|
75
|
-
* Who hid it, when that account user is in the caller's account.
|
|
75
|
+
* Who hid it, when that account user is in the caller's account. For a hide from a learner flag (see hiddenByFlag), the learner who flagged it.
|
|
76
76
|
* @type {AdminConceptMediaActor}
|
|
77
77
|
* @memberof AdminConceptDiagram
|
|
78
78
|
*/
|
|
79
79
|
hiddenBy: AdminConceptMediaActor | null;
|
|
80
|
+
/**
|
|
81
|
+
* True when the current hide came from a learner's thumbs-down flag rather than an admin. False when visible or hidden by an admin. List these with state=flagged.
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
* @memberof AdminConceptDiagram
|
|
84
|
+
*/
|
|
85
|
+
hiddenByFlag: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
88
|
+
* @type {Date}
|
|
89
|
+
* @memberof AdminConceptDiagram
|
|
90
|
+
*/
|
|
91
|
+
approvedAt: Date | null;
|
|
92
|
+
/**
|
|
93
|
+
* Who approved it, when that account user is in the caller's account.
|
|
94
|
+
* @type {AdminConceptMediaActor}
|
|
95
|
+
* @memberof AdminConceptDiagram
|
|
96
|
+
*/
|
|
97
|
+
approvedBy: AdminConceptMediaActor | null;
|
|
80
98
|
/**
|
|
81
99
|
*
|
|
82
100
|
* @type {Date}
|
|
@@ -52,6 +52,12 @@ export function instanceOfAdminConceptDiagram(value) {
|
|
|
52
52
|
return false;
|
|
53
53
|
if (!('hiddenBy' in value) || value['hiddenBy'] === undefined)
|
|
54
54
|
return false;
|
|
55
|
+
if (!('hiddenByFlag' in value) || value['hiddenByFlag'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('approvedAt' in value) || value['approvedAt'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
60
|
+
return false;
|
|
55
61
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
56
62
|
return false;
|
|
57
63
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -92,6 +98,9 @@ export function AdminConceptDiagramFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
92
98
|
'createdAt': (new Date(json['createdAt'])),
|
|
93
99
|
'hiddenAt': (json['hiddenAt'] == null ? null : new Date(json['hiddenAt'])),
|
|
94
100
|
'hiddenBy': AdminConceptMediaActorFromJSON(json['hiddenBy']),
|
|
101
|
+
'hiddenByFlag': json['hiddenByFlag'],
|
|
102
|
+
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
103
|
+
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
95
104
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
96
105
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
97
106
|
'model': json['model'],
|
|
@@ -122,6 +131,9 @@ export function AdminConceptDiagramToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
122
131
|
'createdAt': value['createdAt'].toISOString(),
|
|
123
132
|
'hiddenAt': value['hiddenAt'] == null ? value['hiddenAt'] : value['hiddenAt'].toISOString(),
|
|
124
133
|
'hiddenBy': AdminConceptMediaActorToJSON(value['hiddenBy']),
|
|
134
|
+
'hiddenByFlag': value['hiddenByFlag'],
|
|
135
|
+
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
136
|
+
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
125
137
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
126
138
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
127
139
|
'model': value['model'],
|
|
@@ -74,11 +74,29 @@ export interface AdminConceptDiagramDetail {
|
|
|
74
74
|
*/
|
|
75
75
|
hiddenAt: Date | null;
|
|
76
76
|
/**
|
|
77
|
-
* Who hid it, when that account user is in the caller's account.
|
|
77
|
+
* Who hid it, when that account user is in the caller's account. For a hide from a learner flag (see hiddenByFlag), the learner who flagged it.
|
|
78
78
|
* @type {AdminConceptMediaActor}
|
|
79
79
|
* @memberof AdminConceptDiagramDetail
|
|
80
80
|
*/
|
|
81
81
|
hiddenBy: AdminConceptMediaActor | null;
|
|
82
|
+
/**
|
|
83
|
+
* True when the current hide came from a learner's thumbs-down flag rather than an admin. False when visible or hidden by an admin. List these with state=flagged.
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
* @memberof AdminConceptDiagramDetail
|
|
86
|
+
*/
|
|
87
|
+
hiddenByFlag: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
90
|
+
* @type {Date}
|
|
91
|
+
* @memberof AdminConceptDiagramDetail
|
|
92
|
+
*/
|
|
93
|
+
approvedAt: Date | null;
|
|
94
|
+
/**
|
|
95
|
+
* Who approved it, when that account user is in the caller's account.
|
|
96
|
+
* @type {AdminConceptMediaActor}
|
|
97
|
+
* @memberof AdminConceptDiagramDetail
|
|
98
|
+
*/
|
|
99
|
+
approvedBy: AdminConceptMediaActor | null;
|
|
82
100
|
/**
|
|
83
101
|
*
|
|
84
102
|
* @type {Date}
|
|
@@ -54,6 +54,12 @@ export function instanceOfAdminConceptDiagramDetail(value) {
|
|
|
54
54
|
return false;
|
|
55
55
|
if (!('hiddenBy' in value) || value['hiddenBy'] === undefined)
|
|
56
56
|
return false;
|
|
57
|
+
if (!('hiddenByFlag' in value) || value['hiddenByFlag'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if (!('approvedAt' in value) || value['approvedAt'] === undefined)
|
|
60
|
+
return false;
|
|
61
|
+
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
62
|
+
return false;
|
|
57
63
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
58
64
|
return false;
|
|
59
65
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -106,6 +112,9 @@ export function AdminConceptDiagramDetailFromJSONTyped(json, ignoreDiscriminator
|
|
|
106
112
|
'createdAt': (new Date(json['createdAt'])),
|
|
107
113
|
'hiddenAt': (json['hiddenAt'] == null ? null : new Date(json['hiddenAt'])),
|
|
108
114
|
'hiddenBy': AdminConceptMediaActorFromJSON(json['hiddenBy']),
|
|
115
|
+
'hiddenByFlag': json['hiddenByFlag'],
|
|
116
|
+
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
117
|
+
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
109
118
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
110
119
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
111
120
|
'model': json['model'],
|
|
@@ -142,6 +151,9 @@ export function AdminConceptDiagramDetailToJSONTyped(value, ignoreDiscriminator
|
|
|
142
151
|
'createdAt': value['createdAt'].toISOString(),
|
|
143
152
|
'hiddenAt': value['hiddenAt'] == null ? value['hiddenAt'] : value['hiddenAt'].toISOString(),
|
|
144
153
|
'hiddenBy': AdminConceptMediaActorToJSON(value['hiddenBy']),
|
|
154
|
+
'hiddenByFlag': value['hiddenByFlag'],
|
|
155
|
+
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
156
|
+
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
145
157
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
146
158
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
147
159
|
'model': value['model'],
|
|
@@ -72,11 +72,29 @@ export interface AdminConceptImage {
|
|
|
72
72
|
*/
|
|
73
73
|
hiddenAt: Date | null;
|
|
74
74
|
/**
|
|
75
|
-
* Who hid it, when that account user is in the caller's account.
|
|
75
|
+
* Who hid it, when that account user is in the caller's account. For a hide from a learner flag (see hiddenByFlag), the learner who flagged it.
|
|
76
76
|
* @type {AdminConceptMediaActor}
|
|
77
77
|
* @memberof AdminConceptImage
|
|
78
78
|
*/
|
|
79
79
|
hiddenBy: AdminConceptMediaActor | null;
|
|
80
|
+
/**
|
|
81
|
+
* True when the current hide came from a learner's thumbs-down flag rather than an admin. False when visible or hidden by an admin. List these with state=flagged.
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
* @memberof AdminConceptImage
|
|
84
|
+
*/
|
|
85
|
+
hiddenByFlag: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
88
|
+
* @type {Date}
|
|
89
|
+
* @memberof AdminConceptImage
|
|
90
|
+
*/
|
|
91
|
+
approvedAt: Date | null;
|
|
92
|
+
/**
|
|
93
|
+
* Who approved it, when that account user is in the caller's account.
|
|
94
|
+
* @type {AdminConceptMediaActor}
|
|
95
|
+
* @memberof AdminConceptImage
|
|
96
|
+
*/
|
|
97
|
+
approvedBy: AdminConceptMediaActor | null;
|
|
80
98
|
/**
|
|
81
99
|
*
|
|
82
100
|
* @type {Date}
|
|
@@ -52,6 +52,12 @@ export function instanceOfAdminConceptImage(value) {
|
|
|
52
52
|
return false;
|
|
53
53
|
if (!('hiddenBy' in value) || value['hiddenBy'] === undefined)
|
|
54
54
|
return false;
|
|
55
|
+
if (!('hiddenByFlag' in value) || value['hiddenByFlag'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('approvedAt' in value) || value['approvedAt'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
60
|
+
return false;
|
|
55
61
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
56
62
|
return false;
|
|
57
63
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -98,6 +104,9 @@ export function AdminConceptImageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
98
104
|
'createdAt': (new Date(json['createdAt'])),
|
|
99
105
|
'hiddenAt': (json['hiddenAt'] == null ? null : new Date(json['hiddenAt'])),
|
|
100
106
|
'hiddenBy': AdminConceptMediaActorFromJSON(json['hiddenBy']),
|
|
107
|
+
'hiddenByFlag': json['hiddenByFlag'],
|
|
108
|
+
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
109
|
+
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
101
110
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
102
111
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
103
112
|
'model': json['model'],
|
|
@@ -131,6 +140,9 @@ export function AdminConceptImageToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
131
140
|
'createdAt': value['createdAt'].toISOString(),
|
|
132
141
|
'hiddenAt': value['hiddenAt'] == null ? value['hiddenAt'] : value['hiddenAt'].toISOString(),
|
|
133
142
|
'hiddenBy': AdminConceptMediaActorToJSON(value['hiddenBy']),
|
|
143
|
+
'hiddenByFlag': value['hiddenByFlag'],
|
|
144
|
+
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
145
|
+
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
134
146
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
135
147
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
136
148
|
'model': value['model'],
|
|
@@ -74,11 +74,29 @@ export interface AdminConceptImageDetail {
|
|
|
74
74
|
*/
|
|
75
75
|
hiddenAt: Date | null;
|
|
76
76
|
/**
|
|
77
|
-
* Who hid it, when that account user is in the caller's account.
|
|
77
|
+
* Who hid it, when that account user is in the caller's account. For a hide from a learner flag (see hiddenByFlag), the learner who flagged it.
|
|
78
78
|
* @type {AdminConceptMediaActor}
|
|
79
79
|
* @memberof AdminConceptImageDetail
|
|
80
80
|
*/
|
|
81
81
|
hiddenBy: AdminConceptMediaActor | null;
|
|
82
|
+
/**
|
|
83
|
+
* True when the current hide came from a learner's thumbs-down flag rather than an admin. False when visible or hidden by an admin. List these with state=flagged.
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
* @memberof AdminConceptImageDetail
|
|
86
|
+
*/
|
|
87
|
+
hiddenByFlag: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
90
|
+
* @type {Date}
|
|
91
|
+
* @memberof AdminConceptImageDetail
|
|
92
|
+
*/
|
|
93
|
+
approvedAt: Date | null;
|
|
94
|
+
/**
|
|
95
|
+
* Who approved it, when that account user is in the caller's account.
|
|
96
|
+
* @type {AdminConceptMediaActor}
|
|
97
|
+
* @memberof AdminConceptImageDetail
|
|
98
|
+
*/
|
|
99
|
+
approvedBy: AdminConceptMediaActor | null;
|
|
82
100
|
/**
|
|
83
101
|
*
|
|
84
102
|
* @type {Date}
|
|
@@ -54,6 +54,12 @@ export function instanceOfAdminConceptImageDetail(value) {
|
|
|
54
54
|
return false;
|
|
55
55
|
if (!('hiddenBy' in value) || value['hiddenBy'] === undefined)
|
|
56
56
|
return false;
|
|
57
|
+
if (!('hiddenByFlag' in value) || value['hiddenByFlag'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if (!('approvedAt' in value) || value['approvedAt'] === undefined)
|
|
60
|
+
return false;
|
|
61
|
+
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
62
|
+
return false;
|
|
57
63
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
58
64
|
return false;
|
|
59
65
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -112,6 +118,9 @@ export function AdminConceptImageDetailFromJSONTyped(json, ignoreDiscriminator)
|
|
|
112
118
|
'createdAt': (new Date(json['createdAt'])),
|
|
113
119
|
'hiddenAt': (json['hiddenAt'] == null ? null : new Date(json['hiddenAt'])),
|
|
114
120
|
'hiddenBy': AdminConceptMediaActorFromJSON(json['hiddenBy']),
|
|
121
|
+
'hiddenByFlag': json['hiddenByFlag'],
|
|
122
|
+
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
123
|
+
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
115
124
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
116
125
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
117
126
|
'model': json['model'],
|
|
@@ -151,6 +160,9 @@ export function AdminConceptImageDetailToJSONTyped(value, ignoreDiscriminator =
|
|
|
151
160
|
'createdAt': value['createdAt'].toISOString(),
|
|
152
161
|
'hiddenAt': value['hiddenAt'] == null ? value['hiddenAt'] : value['hiddenAt'].toISOString(),
|
|
153
162
|
'hiddenBy': AdminConceptMediaActorToJSON(value['hiddenBy']),
|
|
163
|
+
'hiddenByFlag': value['hiddenByFlag'],
|
|
164
|
+
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
165
|
+
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
154
166
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
155
167
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
156
168
|
'model': value['model'],
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdminConceptMediaConcept } from './AdminConceptMediaConcept';
|
|
13
|
+
/**
|
|
14
|
+
* An asynchronous admin generation of a hidden concept image or diagram draft. Poll adminGetConceptMediaJob until status is succeeded (open resultMediaId with the kind's get operation) or failed (see errorCode and errorMessage).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminConceptMediaJob
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminConceptMediaJob {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AdminConceptMediaJob
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AdminConceptMediaJob
|
|
29
|
+
*/
|
|
30
|
+
kind: AdminConceptMediaJobKindEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof AdminConceptMediaJob
|
|
35
|
+
*/
|
|
36
|
+
operation: AdminConceptMediaJobOperationEnum;
|
|
37
|
+
/**
|
|
38
|
+
* pending: queued, not started. running: a worker is generating. succeeded and failed are final.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof AdminConceptMediaJob
|
|
41
|
+
*/
|
|
42
|
+
status: AdminConceptMediaJobStatusEnum;
|
|
43
|
+
/**
|
|
44
|
+
* The concept the draft is filed under, resolved at enqueue
|
|
45
|
+
* @type {AdminConceptMediaConcept}
|
|
46
|
+
* @memberof AdminConceptMediaJob
|
|
47
|
+
*/
|
|
48
|
+
concept: AdminConceptMediaConcept;
|
|
49
|
+
/**
|
|
50
|
+
* How the draft's concept (see concept) was chosen. selected: conceptId was given. For a conceptName: matched_exact, an existing concept with the same name (case-insensitive, normalized); matched_similar, the nearest existing concept within the dedup distance; created, no concept matched, so a new one was created. Null for a regenerate, which files under the revised row's concept.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof AdminConceptMediaJob
|
|
53
|
+
*/
|
|
54
|
+
conceptResolution: AdminConceptMediaJobConceptResolutionEnum | null;
|
|
55
|
+
/**
|
|
56
|
+
* For a regenerate, the image or diagram being revised
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof AdminConceptMediaJob
|
|
59
|
+
*/
|
|
60
|
+
sourceMediaId: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* When succeeded, the new hidden draft: an image id for kind image, a diagram id for kind diagram
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof AdminConceptMediaJob
|
|
65
|
+
*/
|
|
66
|
+
resultMediaId: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* When failed, why
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof AdminConceptMediaJob
|
|
71
|
+
*/
|
|
72
|
+
errorCode: AdminConceptMediaJobErrorCodeEnum | null;
|
|
73
|
+
/**
|
|
74
|
+
* When failed, a message to show the admin
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof AdminConceptMediaJob
|
|
77
|
+
*/
|
|
78
|
+
errorMessage: string | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof AdminConceptMediaJob
|
|
83
|
+
*/
|
|
84
|
+
createdAt: Date;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Date}
|
|
88
|
+
* @memberof AdminConceptMediaJob
|
|
89
|
+
*/
|
|
90
|
+
startedAt: Date | null;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof AdminConceptMediaJob
|
|
95
|
+
*/
|
|
96
|
+
finishedAt: Date | null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @export
|
|
100
|
+
*/
|
|
101
|
+
export declare const AdminConceptMediaJobKindEnum: {
|
|
102
|
+
readonly Image: "image";
|
|
103
|
+
readonly Diagram: "diagram";
|
|
104
|
+
};
|
|
105
|
+
export type AdminConceptMediaJobKindEnum = typeof AdminConceptMediaJobKindEnum[keyof typeof AdminConceptMediaJobKindEnum];
|
|
106
|
+
/**
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export declare const AdminConceptMediaJobOperationEnum: {
|
|
110
|
+
readonly Generate: "generate";
|
|
111
|
+
readonly Regenerate: "regenerate";
|
|
112
|
+
};
|
|
113
|
+
export type AdminConceptMediaJobOperationEnum = typeof AdminConceptMediaJobOperationEnum[keyof typeof AdminConceptMediaJobOperationEnum];
|
|
114
|
+
/**
|
|
115
|
+
* @export
|
|
116
|
+
*/
|
|
117
|
+
export declare const AdminConceptMediaJobStatusEnum: {
|
|
118
|
+
readonly Pending: "pending";
|
|
119
|
+
readonly Running: "running";
|
|
120
|
+
readonly Succeeded: "succeeded";
|
|
121
|
+
readonly Failed: "failed";
|
|
122
|
+
};
|
|
123
|
+
export type AdminConceptMediaJobStatusEnum = typeof AdminConceptMediaJobStatusEnum[keyof typeof AdminConceptMediaJobStatusEnum];
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export declare const AdminConceptMediaJobConceptResolutionEnum: {
|
|
128
|
+
readonly Selected: "selected";
|
|
129
|
+
readonly MatchedExact: "matched_exact";
|
|
130
|
+
readonly MatchedSimilar: "matched_similar";
|
|
131
|
+
readonly Created: "created";
|
|
132
|
+
};
|
|
133
|
+
export type AdminConceptMediaJobConceptResolutionEnum = typeof AdminConceptMediaJobConceptResolutionEnum[keyof typeof AdminConceptMediaJobConceptResolutionEnum];
|
|
134
|
+
/**
|
|
135
|
+
* @export
|
|
136
|
+
*/
|
|
137
|
+
export declare const AdminConceptMediaJobErrorCodeEnum: {
|
|
138
|
+
readonly OffTopic: "off_topic";
|
|
139
|
+
readonly ModerationBlocked: "moderation_blocked";
|
|
140
|
+
readonly Timeout: "timeout";
|
|
141
|
+
readonly NotFound: "not_found";
|
|
142
|
+
readonly GenerationFailed: "generation_failed";
|
|
143
|
+
readonly AuthoringFailed: "authoring_failed";
|
|
144
|
+
readonly SaveFailed: "save_failed";
|
|
145
|
+
readonly LimitReached: "limit_reached";
|
|
146
|
+
readonly InternalError: "internal_error";
|
|
147
|
+
readonly DeliveryFailed: "delivery_failed";
|
|
148
|
+
};
|
|
149
|
+
export type AdminConceptMediaJobErrorCodeEnum = typeof AdminConceptMediaJobErrorCodeEnum[keyof typeof AdminConceptMediaJobErrorCodeEnum];
|
|
150
|
+
/**
|
|
151
|
+
* Check if a given object implements the AdminConceptMediaJob interface.
|
|
152
|
+
*/
|
|
153
|
+
export declare function instanceOfAdminConceptMediaJob(value: object): value is AdminConceptMediaJob;
|
|
154
|
+
export declare function AdminConceptMediaJobFromJSON(json: any): AdminConceptMediaJob;
|
|
155
|
+
export declare function AdminConceptMediaJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminConceptMediaJob;
|
|
156
|
+
export declare function AdminConceptMediaJobToJSON(json: any): AdminConceptMediaJob;
|
|
157
|
+
export declare function AdminConceptMediaJobToJSONTyped(value?: AdminConceptMediaJob | null, ignoreDiscriminator?: boolean): any;
|