@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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdminConceptMediaConcept } from './AdminConceptMediaConcept';
|
|
13
|
+
/**
|
|
14
|
+
* An asynchronous admin generation of a hidden concept image or diagram draft. Poll adminGetConceptMediaJob until status is succeeded (open resultMediaId with the kind's get operation) or failed (see errorCode and errorMessage).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminConceptMediaJob
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminConceptMediaJob {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AdminConceptMediaJob
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AdminConceptMediaJob
|
|
29
|
+
*/
|
|
30
|
+
kind: AdminConceptMediaJobKindEnum;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof AdminConceptMediaJob
|
|
35
|
+
*/
|
|
36
|
+
operation: AdminConceptMediaJobOperationEnum;
|
|
37
|
+
/**
|
|
38
|
+
* pending: queued, not started. running: a worker is generating. succeeded and failed are final.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof AdminConceptMediaJob
|
|
41
|
+
*/
|
|
42
|
+
status: AdminConceptMediaJobStatusEnum;
|
|
43
|
+
/**
|
|
44
|
+
* The concept the draft is filed under, resolved at enqueue
|
|
45
|
+
* @type {AdminConceptMediaConcept}
|
|
46
|
+
* @memberof AdminConceptMediaJob
|
|
47
|
+
*/
|
|
48
|
+
concept: AdminConceptMediaConcept;
|
|
49
|
+
/**
|
|
50
|
+
* How the draft's concept (see concept) was chosen. selected: conceptId was given. For a conceptName: matched_exact, an existing concept with the same name (case-insensitive, normalized); matched_similar, the nearest existing concept within the dedup distance; created, no concept matched, so a new one was created. Null for a regenerate, which files under the revised row's concept.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof AdminConceptMediaJob
|
|
53
|
+
*/
|
|
54
|
+
conceptResolution: AdminConceptMediaJobConceptResolutionEnum | null;
|
|
55
|
+
/**
|
|
56
|
+
* For a regenerate, the image or diagram being revised
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof AdminConceptMediaJob
|
|
59
|
+
*/
|
|
60
|
+
sourceMediaId: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* When succeeded, the new hidden draft: an image id for kind image, a diagram id for kind diagram
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof AdminConceptMediaJob
|
|
65
|
+
*/
|
|
66
|
+
resultMediaId: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* When failed, why
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof AdminConceptMediaJob
|
|
71
|
+
*/
|
|
72
|
+
errorCode: AdminConceptMediaJobErrorCodeEnum | null;
|
|
73
|
+
/**
|
|
74
|
+
* When failed, a message to show the admin
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof AdminConceptMediaJob
|
|
77
|
+
*/
|
|
78
|
+
errorMessage: string | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof AdminConceptMediaJob
|
|
83
|
+
*/
|
|
84
|
+
createdAt: Date;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Date}
|
|
88
|
+
* @memberof AdminConceptMediaJob
|
|
89
|
+
*/
|
|
90
|
+
startedAt: Date | null;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof AdminConceptMediaJob
|
|
95
|
+
*/
|
|
96
|
+
finishedAt: Date | null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @export
|
|
100
|
+
*/
|
|
101
|
+
export declare const AdminConceptMediaJobKindEnum: {
|
|
102
|
+
readonly Image: "image";
|
|
103
|
+
readonly Diagram: "diagram";
|
|
104
|
+
};
|
|
105
|
+
export type AdminConceptMediaJobKindEnum = typeof AdminConceptMediaJobKindEnum[keyof typeof AdminConceptMediaJobKindEnum];
|
|
106
|
+
/**
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export declare const AdminConceptMediaJobOperationEnum: {
|
|
110
|
+
readonly Generate: "generate";
|
|
111
|
+
readonly Regenerate: "regenerate";
|
|
112
|
+
};
|
|
113
|
+
export type AdminConceptMediaJobOperationEnum = typeof AdminConceptMediaJobOperationEnum[keyof typeof AdminConceptMediaJobOperationEnum];
|
|
114
|
+
/**
|
|
115
|
+
* @export
|
|
116
|
+
*/
|
|
117
|
+
export declare const AdminConceptMediaJobStatusEnum: {
|
|
118
|
+
readonly Pending: "pending";
|
|
119
|
+
readonly Running: "running";
|
|
120
|
+
readonly Succeeded: "succeeded";
|
|
121
|
+
readonly Failed: "failed";
|
|
122
|
+
};
|
|
123
|
+
export type AdminConceptMediaJobStatusEnum = typeof AdminConceptMediaJobStatusEnum[keyof typeof AdminConceptMediaJobStatusEnum];
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export declare const AdminConceptMediaJobConceptResolutionEnum: {
|
|
128
|
+
readonly Selected: "selected";
|
|
129
|
+
readonly MatchedExact: "matched_exact";
|
|
130
|
+
readonly MatchedSimilar: "matched_similar";
|
|
131
|
+
readonly Created: "created";
|
|
132
|
+
};
|
|
133
|
+
export type AdminConceptMediaJobConceptResolutionEnum = typeof AdminConceptMediaJobConceptResolutionEnum[keyof typeof AdminConceptMediaJobConceptResolutionEnum];
|
|
134
|
+
/**
|
|
135
|
+
* @export
|
|
136
|
+
*/
|
|
137
|
+
export declare const AdminConceptMediaJobErrorCodeEnum: {
|
|
138
|
+
readonly OffTopic: "off_topic";
|
|
139
|
+
readonly ModerationBlocked: "moderation_blocked";
|
|
140
|
+
readonly Timeout: "timeout";
|
|
141
|
+
readonly NotFound: "not_found";
|
|
142
|
+
readonly GenerationFailed: "generation_failed";
|
|
143
|
+
readonly AuthoringFailed: "authoring_failed";
|
|
144
|
+
readonly SaveFailed: "save_failed";
|
|
145
|
+
readonly LimitReached: "limit_reached";
|
|
146
|
+
readonly InternalError: "internal_error";
|
|
147
|
+
readonly DeliveryFailed: "delivery_failed";
|
|
148
|
+
};
|
|
149
|
+
export type AdminConceptMediaJobErrorCodeEnum = typeof AdminConceptMediaJobErrorCodeEnum[keyof typeof AdminConceptMediaJobErrorCodeEnum];
|
|
150
|
+
/**
|
|
151
|
+
* Check if a given object implements the AdminConceptMediaJob interface.
|
|
152
|
+
*/
|
|
153
|
+
export declare function instanceOfAdminConceptMediaJob(value: object): value is AdminConceptMediaJob;
|
|
154
|
+
export declare function AdminConceptMediaJobFromJSON(json: any): AdminConceptMediaJob;
|
|
155
|
+
export declare function AdminConceptMediaJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminConceptMediaJob;
|
|
156
|
+
export declare function AdminConceptMediaJobToJSON(json: any): AdminConceptMediaJob;
|
|
157
|
+
export declare function AdminConceptMediaJobToJSONTyped(value?: AdminConceptMediaJob | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AdminConceptMediaJobErrorCodeEnum = exports.AdminConceptMediaJobConceptResolutionEnum = exports.AdminConceptMediaJobStatusEnum = exports.AdminConceptMediaJobOperationEnum = exports.AdminConceptMediaJobKindEnum = void 0;
|
|
17
|
+
exports.instanceOfAdminConceptMediaJob = instanceOfAdminConceptMediaJob;
|
|
18
|
+
exports.AdminConceptMediaJobFromJSON = AdminConceptMediaJobFromJSON;
|
|
19
|
+
exports.AdminConceptMediaJobFromJSONTyped = AdminConceptMediaJobFromJSONTyped;
|
|
20
|
+
exports.AdminConceptMediaJobToJSON = AdminConceptMediaJobToJSON;
|
|
21
|
+
exports.AdminConceptMediaJobToJSONTyped = AdminConceptMediaJobToJSONTyped;
|
|
22
|
+
const AdminConceptMediaConcept_1 = require("./AdminConceptMediaConcept");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.AdminConceptMediaJobKindEnum = {
|
|
27
|
+
Image: 'image',
|
|
28
|
+
Diagram: 'diagram'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.AdminConceptMediaJobOperationEnum = {
|
|
34
|
+
Generate: 'generate',
|
|
35
|
+
Regenerate: 'regenerate'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
exports.AdminConceptMediaJobStatusEnum = {
|
|
41
|
+
Pending: 'pending',
|
|
42
|
+
Running: 'running',
|
|
43
|
+
Succeeded: 'succeeded',
|
|
44
|
+
Failed: 'failed'
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @export
|
|
48
|
+
*/
|
|
49
|
+
exports.AdminConceptMediaJobConceptResolutionEnum = {
|
|
50
|
+
Selected: 'selected',
|
|
51
|
+
MatchedExact: 'matched_exact',
|
|
52
|
+
MatchedSimilar: 'matched_similar',
|
|
53
|
+
Created: 'created'
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
exports.AdminConceptMediaJobErrorCodeEnum = {
|
|
59
|
+
OffTopic: 'off_topic',
|
|
60
|
+
ModerationBlocked: 'moderation_blocked',
|
|
61
|
+
Timeout: 'timeout',
|
|
62
|
+
NotFound: 'not_found',
|
|
63
|
+
GenerationFailed: 'generation_failed',
|
|
64
|
+
AuthoringFailed: 'authoring_failed',
|
|
65
|
+
SaveFailed: 'save_failed',
|
|
66
|
+
LimitReached: 'limit_reached',
|
|
67
|
+
InternalError: 'internal_error',
|
|
68
|
+
DeliveryFailed: 'delivery_failed'
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Check if a given object implements the AdminConceptMediaJob interface.
|
|
72
|
+
*/
|
|
73
|
+
function instanceOfAdminConceptMediaJob(value) {
|
|
74
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
75
|
+
return false;
|
|
76
|
+
if (!('kind' in value) || value['kind'] === undefined)
|
|
77
|
+
return false;
|
|
78
|
+
if (!('operation' in value) || value['operation'] === undefined)
|
|
79
|
+
return false;
|
|
80
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
81
|
+
return false;
|
|
82
|
+
if (!('concept' in value) || value['concept'] === undefined)
|
|
83
|
+
return false;
|
|
84
|
+
if (!('conceptResolution' in value) || value['conceptResolution'] === undefined)
|
|
85
|
+
return false;
|
|
86
|
+
if (!('sourceMediaId' in value) || value['sourceMediaId'] === undefined)
|
|
87
|
+
return false;
|
|
88
|
+
if (!('resultMediaId' in value) || value['resultMediaId'] === undefined)
|
|
89
|
+
return false;
|
|
90
|
+
if (!('errorCode' in value) || value['errorCode'] === undefined)
|
|
91
|
+
return false;
|
|
92
|
+
if (!('errorMessage' in value) || value['errorMessage'] === undefined)
|
|
93
|
+
return false;
|
|
94
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
95
|
+
return false;
|
|
96
|
+
if (!('startedAt' in value) || value['startedAt'] === undefined)
|
|
97
|
+
return false;
|
|
98
|
+
if (!('finishedAt' in value) || value['finishedAt'] === undefined)
|
|
99
|
+
return false;
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
function AdminConceptMediaJobFromJSON(json) {
|
|
103
|
+
return AdminConceptMediaJobFromJSONTyped(json, false);
|
|
104
|
+
}
|
|
105
|
+
function AdminConceptMediaJobFromJSONTyped(json, ignoreDiscriminator) {
|
|
106
|
+
if (json == null) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
'id': json['id'],
|
|
111
|
+
'kind': json['kind'],
|
|
112
|
+
'operation': json['operation'],
|
|
113
|
+
'status': json['status'],
|
|
114
|
+
'concept': (0, AdminConceptMediaConcept_1.AdminConceptMediaConceptFromJSON)(json['concept']),
|
|
115
|
+
'conceptResolution': json['conceptResolution'],
|
|
116
|
+
'sourceMediaId': json['sourceMediaId'],
|
|
117
|
+
'resultMediaId': json['resultMediaId'],
|
|
118
|
+
'errorCode': json['errorCode'],
|
|
119
|
+
'errorMessage': json['errorMessage'],
|
|
120
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
121
|
+
'startedAt': (json['startedAt'] == null ? null : new Date(json['startedAt'])),
|
|
122
|
+
'finishedAt': (json['finishedAt'] == null ? null : new Date(json['finishedAt'])),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function AdminConceptMediaJobToJSON(json) {
|
|
126
|
+
return AdminConceptMediaJobToJSONTyped(json, false);
|
|
127
|
+
}
|
|
128
|
+
function AdminConceptMediaJobToJSONTyped(value, ignoreDiscriminator = false) {
|
|
129
|
+
if (value == null) {
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
'id': value['id'],
|
|
134
|
+
'kind': value['kind'],
|
|
135
|
+
'operation': value['operation'],
|
|
136
|
+
'status': value['status'],
|
|
137
|
+
'concept': (0, AdminConceptMediaConcept_1.AdminConceptMediaConceptToJSON)(value['concept']),
|
|
138
|
+
'conceptResolution': value['conceptResolution'],
|
|
139
|
+
'sourceMediaId': value['sourceMediaId'],
|
|
140
|
+
'resultMediaId': value['resultMediaId'],
|
|
141
|
+
'errorCode': value['errorCode'],
|
|
142
|
+
'errorMessage': value['errorMessage'],
|
|
143
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
144
|
+
'startedAt': value['startedAt'] == null ? value['startedAt'] : value['startedAt'].toISOString(),
|
|
145
|
+
'finishedAt': value['finishedAt'] == null ? value['finishedAt'] : value['finishedAt'].toISOString(),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
@@ -74,11 +74,29 @@ export interface AdminShownConceptDiagram {
|
|
|
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 AdminShownConceptDiagram
|
|
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 AdminShownConceptDiagram
|
|
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 AdminShownConceptDiagram
|
|
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 AdminShownConceptDiagram
|
|
98
|
+
*/
|
|
99
|
+
approvedBy: AdminConceptMediaActor | null;
|
|
82
100
|
/**
|
|
83
101
|
*
|
|
84
102
|
* @type {Date}
|
|
@@ -62,6 +62,12 @@ function instanceOfAdminShownConceptDiagram(value) {
|
|
|
62
62
|
return false;
|
|
63
63
|
if (!('hiddenBy' in value) || value['hiddenBy'] === undefined)
|
|
64
64
|
return false;
|
|
65
|
+
if (!('hiddenByFlag' in value) || value['hiddenByFlag'] === undefined)
|
|
66
|
+
return false;
|
|
67
|
+
if (!('approvedAt' in value) || value['approvedAt'] === undefined)
|
|
68
|
+
return false;
|
|
69
|
+
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
70
|
+
return false;
|
|
65
71
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
66
72
|
return false;
|
|
67
73
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -118,6 +124,9 @@ function AdminShownConceptDiagramFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
118
124
|
'createdAt': (new Date(json['createdAt'])),
|
|
119
125
|
'hiddenAt': (json['hiddenAt'] == null ? null : new Date(json['hiddenAt'])),
|
|
120
126
|
'hiddenBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['hiddenBy']),
|
|
127
|
+
'hiddenByFlag': json['hiddenByFlag'],
|
|
128
|
+
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
129
|
+
'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['approvedBy']),
|
|
121
130
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
122
131
|
'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['deletedBy']),
|
|
123
132
|
'model': json['model'],
|
|
@@ -156,6 +165,9 @@ function AdminShownConceptDiagramToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
156
165
|
'createdAt': value['createdAt'].toISOString(),
|
|
157
166
|
'hiddenAt': value['hiddenAt'] == null ? value['hiddenAt'] : value['hiddenAt'].toISOString(),
|
|
158
167
|
'hiddenBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['hiddenBy']),
|
|
168
|
+
'hiddenByFlag': value['hiddenByFlag'],
|
|
169
|
+
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
170
|
+
'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['approvedBy']),
|
|
159
171
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
160
172
|
'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['deletedBy']),
|
|
161
173
|
'model': value['model'],
|
|
@@ -74,11 +74,29 @@ export interface AdminShownConceptImage {
|
|
|
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 AdminShownConceptImage
|
|
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 AdminShownConceptImage
|
|
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 AdminShownConceptImage
|
|
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 AdminShownConceptImage
|
|
98
|
+
*/
|
|
99
|
+
approvedBy: AdminConceptMediaActor | null;
|
|
82
100
|
/**
|
|
83
101
|
*
|
|
84
102
|
* @type {Date}
|
|
@@ -62,6 +62,12 @@ function instanceOfAdminShownConceptImage(value) {
|
|
|
62
62
|
return false;
|
|
63
63
|
if (!('hiddenBy' in value) || value['hiddenBy'] === undefined)
|
|
64
64
|
return false;
|
|
65
|
+
if (!('hiddenByFlag' in value) || value['hiddenByFlag'] === undefined)
|
|
66
|
+
return false;
|
|
67
|
+
if (!('approvedAt' in value) || value['approvedAt'] === undefined)
|
|
68
|
+
return false;
|
|
69
|
+
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
70
|
+
return false;
|
|
65
71
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
66
72
|
return false;
|
|
67
73
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -124,6 +130,9 @@ function AdminShownConceptImageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
124
130
|
'createdAt': (new Date(json['createdAt'])),
|
|
125
131
|
'hiddenAt': (json['hiddenAt'] == null ? null : new Date(json['hiddenAt'])),
|
|
126
132
|
'hiddenBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['hiddenBy']),
|
|
133
|
+
'hiddenByFlag': json['hiddenByFlag'],
|
|
134
|
+
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
135
|
+
'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['approvedBy']),
|
|
127
136
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
128
137
|
'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['deletedBy']),
|
|
129
138
|
'model': json['model'],
|
|
@@ -165,6 +174,9 @@ function AdminShownConceptImageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
165
174
|
'createdAt': value['createdAt'].toISOString(),
|
|
166
175
|
'hiddenAt': value['hiddenAt'] == null ? value['hiddenAt'] : value['hiddenAt'].toISOString(),
|
|
167
176
|
'hiddenBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['hiddenBy']),
|
|
177
|
+
'hiddenByFlag': value['hiddenByFlag'],
|
|
178
|
+
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
179
|
+
'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['approvedBy']),
|
|
168
180
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
169
181
|
'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['deletedBy']),
|
|
170
182
|
'model': value['model'],
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* The outcome of a learner flagging a concept image or diagram.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConceptMediaFlagResult
|
|
16
|
+
*/
|
|
17
|
+
export interface ConceptMediaFlagResult {
|
|
18
|
+
/**
|
|
19
|
+
* True when the item is kept from learners after this call, whether this flag hid it or it was already hidden or removed. False when an admin has approved it, so the flag left it visible.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof ConceptMediaFlagResult
|
|
22
|
+
*/
|
|
23
|
+
hidden: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ConceptMediaFlagResult interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfConceptMediaFlagResult(value: object): value is ConceptMediaFlagResult;
|
|
29
|
+
export declare function ConceptMediaFlagResultFromJSON(json: any): ConceptMediaFlagResult;
|
|
30
|
+
export declare function ConceptMediaFlagResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConceptMediaFlagResult;
|
|
31
|
+
export declare function ConceptMediaFlagResultToJSON(json: any): ConceptMediaFlagResult;
|
|
32
|
+
export declare function ConceptMediaFlagResultToJSONTyped(value?: ConceptMediaFlagResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfConceptMediaFlagResult = instanceOfConceptMediaFlagResult;
|
|
17
|
+
exports.ConceptMediaFlagResultFromJSON = ConceptMediaFlagResultFromJSON;
|
|
18
|
+
exports.ConceptMediaFlagResultFromJSONTyped = ConceptMediaFlagResultFromJSONTyped;
|
|
19
|
+
exports.ConceptMediaFlagResultToJSON = ConceptMediaFlagResultToJSON;
|
|
20
|
+
exports.ConceptMediaFlagResultToJSONTyped = ConceptMediaFlagResultToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ConceptMediaFlagResult interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfConceptMediaFlagResult(value) {
|
|
25
|
+
if (!('hidden' in value) || value['hidden'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ConceptMediaFlagResultFromJSON(json) {
|
|
30
|
+
return ConceptMediaFlagResultFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ConceptMediaFlagResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'hidden': json['hidden'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ConceptMediaFlagResultToJSON(json) {
|
|
41
|
+
return ConceptMediaFlagResultToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ConceptMediaFlagResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'hidden': value['hidden'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -24,14 +24,13 @@ export * from './AdminConceptImageDetail';
|
|
|
24
24
|
export * from './AdminConceptMediaActor';
|
|
25
25
|
export * from './AdminConceptMediaConcept';
|
|
26
26
|
export * from './AdminConceptMediaHistoryEntry';
|
|
27
|
+
export * from './AdminConceptMediaJob';
|
|
27
28
|
export * from './AdminConceptMediaRevision';
|
|
28
29
|
export * from './AdminConceptSearchResult';
|
|
29
30
|
export * from './AdminExchangeChat';
|
|
30
31
|
export * from './AdminExchangeMessage';
|
|
31
32
|
export * from './AdminGenerateConceptDiagramRequest';
|
|
32
33
|
export * from './AdminGenerateConceptImageRequest';
|
|
33
|
-
export * from './AdminGeneratedConceptDiagram';
|
|
34
|
-
export * from './AdminGeneratedConceptImage';
|
|
35
34
|
export * from './AdminLastExchange';
|
|
36
35
|
export * from './AdminPaginatedActiveStreaks';
|
|
37
36
|
export * from './AdminPaginatedChats';
|
|
@@ -96,6 +95,7 @@ export * from './ConceptChange';
|
|
|
96
95
|
export * from './ConceptDiagramDetail';
|
|
97
96
|
export * from './ConceptDiagramGalleryItem';
|
|
98
97
|
export * from './ConceptImageGalleryItem';
|
|
98
|
+
export * from './ConceptMediaFlagResult';
|
|
99
99
|
export * from './CreateAccountRequest';
|
|
100
100
|
export * from './CreateChatRequest';
|
|
101
101
|
export * from './CreateFeatureDto';
|
package/dist/models/index.js
CHANGED
|
@@ -42,14 +42,13 @@ __exportStar(require("./AdminConceptImageDetail"), exports);
|
|
|
42
42
|
__exportStar(require("./AdminConceptMediaActor"), exports);
|
|
43
43
|
__exportStar(require("./AdminConceptMediaConcept"), exports);
|
|
44
44
|
__exportStar(require("./AdminConceptMediaHistoryEntry"), exports);
|
|
45
|
+
__exportStar(require("./AdminConceptMediaJob"), exports);
|
|
45
46
|
__exportStar(require("./AdminConceptMediaRevision"), exports);
|
|
46
47
|
__exportStar(require("./AdminConceptSearchResult"), exports);
|
|
47
48
|
__exportStar(require("./AdminExchangeChat"), exports);
|
|
48
49
|
__exportStar(require("./AdminExchangeMessage"), exports);
|
|
49
50
|
__exportStar(require("./AdminGenerateConceptDiagramRequest"), exports);
|
|
50
51
|
__exportStar(require("./AdminGenerateConceptImageRequest"), exports);
|
|
51
|
-
__exportStar(require("./AdminGeneratedConceptDiagram"), exports);
|
|
52
|
-
__exportStar(require("./AdminGeneratedConceptImage"), exports);
|
|
53
52
|
__exportStar(require("./AdminLastExchange"), exports);
|
|
54
53
|
__exportStar(require("./AdminPaginatedActiveStreaks"), exports);
|
|
55
54
|
__exportStar(require("./AdminPaginatedChats"), exports);
|
|
@@ -114,6 +113,7 @@ __exportStar(require("./ConceptChange"), exports);
|
|
|
114
113
|
__exportStar(require("./ConceptDiagramDetail"), exports);
|
|
115
114
|
__exportStar(require("./ConceptDiagramGalleryItem"), exports);
|
|
116
115
|
__exportStar(require("./ConceptImageGalleryItem"), exports);
|
|
116
|
+
__exportStar(require("./ConceptMediaFlagResult"), exports);
|
|
117
117
|
__exportStar(require("./CreateAccountRequest"), exports);
|
|
118
118
|
__exportStar(require("./CreateChatRequest"), exports);
|
|
119
119
|
__exportStar(require("./CreateFeatureDto"), exports);
|