@instructure/athena-api-client 4.5.1 → 4.6.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 (70) hide show
  1. package/README.md +10 -0
  2. package/dist/apis/AdminApi.d.ts +29 -1
  3. package/dist/apis/AdminApi.js +79 -0
  4. package/dist/esm/apis/AdminApi.d.ts +29 -1
  5. package/dist/esm/apis/AdminApi.js +80 -1
  6. package/dist/esm/models/AdminClaimConceptMediaReviewNotificationsRequest.d.ts +32 -0
  7. package/dist/esm/models/AdminClaimConceptMediaReviewNotificationsRequest.js +41 -0
  8. package/dist/esm/models/AdminConceptDiagram.d.ts +15 -2
  9. package/dist/esm/models/AdminConceptDiagram.js +9 -0
  10. package/dist/esm/models/AdminConceptDiagramDetail.d.ts +15 -2
  11. package/dist/esm/models/AdminConceptDiagramDetail.js +9 -0
  12. package/dist/esm/models/AdminConceptImage.d.ts +15 -2
  13. package/dist/esm/models/AdminConceptImage.js +9 -0
  14. package/dist/esm/models/AdminConceptImageDetail.d.ts +15 -2
  15. package/dist/esm/models/AdminConceptImageDetail.js +9 -0
  16. package/dist/esm/models/AdminConceptMediaAgentReview.d.ts +131 -0
  17. package/dist/esm/models/AdminConceptMediaAgentReview.js +117 -0
  18. package/dist/esm/models/AdminConceptMediaReviewDurationStats.d.ts +50 -0
  19. package/dist/esm/models/AdminConceptMediaReviewDurationStats.js +55 -0
  20. package/dist/esm/models/AdminConceptMediaReviewKindStats.d.ts +89 -0
  21. package/dist/esm/models/AdminConceptMediaReviewKindStats.js +83 -0
  22. package/dist/esm/models/AdminConceptMediaReviewNotification.d.ts +123 -0
  23. package/dist/esm/models/AdminConceptMediaReviewNotification.js +111 -0
  24. package/dist/esm/models/AdminConceptMediaReviewNotifications.d.ts +33 -0
  25. package/dist/esm/models/AdminConceptMediaReviewNotifications.js +44 -0
  26. package/dist/esm/models/AdminConceptMediaReviewStats.d.ts +51 -0
  27. package/dist/esm/models/AdminConceptMediaReviewStats.js +56 -0
  28. package/dist/esm/models/AdminShownConceptDiagram.d.ts +15 -2
  29. package/dist/esm/models/AdminShownConceptDiagram.js +9 -0
  30. package/dist/esm/models/AdminShownConceptImage.d.ts +15 -2
  31. package/dist/esm/models/AdminShownConceptImage.js +9 -0
  32. package/dist/esm/models/ConceptMediaFlagResult.d.ts +16 -0
  33. package/dist/esm/models/ConceptMediaFlagResult.js +13 -0
  34. package/dist/esm/models/ConceptMediaReviewIssue.d.ts +64 -0
  35. package/dist/esm/models/ConceptMediaReviewIssue.js +69 -0
  36. package/dist/esm/models/index.d.ts +8 -0
  37. package/dist/esm/models/index.js +8 -0
  38. package/dist/models/AdminClaimConceptMediaReviewNotificationsRequest.d.ts +32 -0
  39. package/dist/models/AdminClaimConceptMediaReviewNotificationsRequest.js +48 -0
  40. package/dist/models/AdminConceptDiagram.d.ts +15 -2
  41. package/dist/models/AdminConceptDiagram.js +9 -0
  42. package/dist/models/AdminConceptDiagramDetail.d.ts +15 -2
  43. package/dist/models/AdminConceptDiagramDetail.js +9 -0
  44. package/dist/models/AdminConceptImage.d.ts +15 -2
  45. package/dist/models/AdminConceptImage.js +9 -0
  46. package/dist/models/AdminConceptImageDetail.d.ts +15 -2
  47. package/dist/models/AdminConceptImageDetail.js +9 -0
  48. package/dist/models/AdminConceptMediaAgentReview.d.ts +131 -0
  49. package/dist/models/AdminConceptMediaAgentReview.js +125 -0
  50. package/dist/models/AdminConceptMediaReviewDurationStats.d.ts +50 -0
  51. package/dist/models/AdminConceptMediaReviewDurationStats.js +62 -0
  52. package/dist/models/AdminConceptMediaReviewKindStats.d.ts +89 -0
  53. package/dist/models/AdminConceptMediaReviewKindStats.js +91 -0
  54. package/dist/models/AdminConceptMediaReviewNotification.d.ts +123 -0
  55. package/dist/models/AdminConceptMediaReviewNotification.js +119 -0
  56. package/dist/models/AdminConceptMediaReviewNotifications.d.ts +33 -0
  57. package/dist/models/AdminConceptMediaReviewNotifications.js +51 -0
  58. package/dist/models/AdminConceptMediaReviewStats.d.ts +51 -0
  59. package/dist/models/AdminConceptMediaReviewStats.js +63 -0
  60. package/dist/models/AdminShownConceptDiagram.d.ts +15 -2
  61. package/dist/models/AdminShownConceptDiagram.js +9 -0
  62. package/dist/models/AdminShownConceptImage.d.ts +15 -2
  63. package/dist/models/AdminShownConceptImage.js +9 -0
  64. package/dist/models/ConceptMediaFlagResult.d.ts +16 -0
  65. package/dist/models/ConceptMediaFlagResult.js +14 -0
  66. package/dist/models/ConceptMediaReviewIssue.d.ts +64 -0
  67. package/dist/models/ConceptMediaReviewIssue.js +77 -0
  68. package/dist/models/index.d.ts +8 -0
  69. package/dist/models/index.js +8 -0
  70. package/package.json +1 -1
@@ -0,0 +1,123 @@
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
+ * A media row the reviewer agent flagged, claimed once for the admin notification email.
14
+ * @export
15
+ * @interface AdminConceptMediaReviewNotification
16
+ */
17
+ export interface AdminConceptMediaReviewNotification {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AdminConceptMediaReviewNotification
22
+ */
23
+ reviewId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AdminConceptMediaReviewNotification
28
+ */
29
+ mediaKind: AdminConceptMediaReviewNotificationMediaKindEnum;
30
+ /**
31
+ * The concept image or diagram id, per mediaKind
32
+ * @type {string}
33
+ * @memberof AdminConceptMediaReviewNotification
34
+ */
35
+ mediaId: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof AdminConceptMediaReviewNotification
40
+ */
41
+ conceptId: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AdminConceptMediaReviewNotification
46
+ */
47
+ conceptName: string;
48
+ /**
49
+ * The diagram's title; null for an image
50
+ * @type {string}
51
+ * @memberof AdminConceptMediaReviewNotification
52
+ */
53
+ mediaTitle: string | null;
54
+ /**
55
+ * The diagram's description, or the image's alt text
56
+ * @type {string}
57
+ * @memberof AdminConceptMediaReviewNotification
58
+ */
59
+ mediaDescription: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof AdminConceptMediaReviewNotification
64
+ */
65
+ reason: AdminConceptMediaReviewNotificationReasonEnum;
66
+ /**
67
+ * The agent's explanation for an admin
68
+ * @type {string}
69
+ * @memberof AdminConceptMediaReviewNotification
70
+ */
71
+ details: string;
72
+ /**
73
+ * What the flag did: hidden and flagged_again changed the row; already_hidden (admin drafts start hidden) and already_flagged did not.
74
+ * @type {string}
75
+ * @memberof AdminConceptMediaReviewNotification
76
+ */
77
+ flagOutcome: AdminConceptMediaReviewNotificationFlagOutcomeEnum | null;
78
+ /**
79
+ *
80
+ * @type {Date}
81
+ * @memberof AdminConceptMediaReviewNotification
82
+ */
83
+ completedAt: Date;
84
+ }
85
+ /**
86
+ * @export
87
+ */
88
+ export declare const AdminConceptMediaReviewNotificationMediaKindEnum: {
89
+ readonly Image: "image";
90
+ readonly Diagram: "diagram";
91
+ };
92
+ export type AdminConceptMediaReviewNotificationMediaKindEnum = typeof AdminConceptMediaReviewNotificationMediaKindEnum[keyof typeof AdminConceptMediaReviewNotificationMediaKindEnum];
93
+ /**
94
+ * @export
95
+ */
96
+ export declare const AdminConceptMediaReviewNotificationReasonEnum: {
97
+ readonly Inaccurate: "inaccurate";
98
+ readonly HardToRead: "hard_to_read";
99
+ readonly Irrelevant: "irrelevant";
100
+ readonly Inappropriate: "inappropriate";
101
+ readonly NotHelpful: "not_helpful";
102
+ readonly Other: "other";
103
+ };
104
+ export type AdminConceptMediaReviewNotificationReasonEnum = typeof AdminConceptMediaReviewNotificationReasonEnum[keyof typeof AdminConceptMediaReviewNotificationReasonEnum];
105
+ /**
106
+ * @export
107
+ */
108
+ export declare const AdminConceptMediaReviewNotificationFlagOutcomeEnum: {
109
+ readonly Hidden: "hidden";
110
+ readonly AlreadyHidden: "already_hidden";
111
+ readonly FlaggedAgain: "flagged_again";
112
+ readonly AlreadyFlagged: "already_flagged";
113
+ readonly NotFound: "not_found";
114
+ };
115
+ export type AdminConceptMediaReviewNotificationFlagOutcomeEnum = typeof AdminConceptMediaReviewNotificationFlagOutcomeEnum[keyof typeof AdminConceptMediaReviewNotificationFlagOutcomeEnum];
116
+ /**
117
+ * Check if a given object implements the AdminConceptMediaReviewNotification interface.
118
+ */
119
+ export declare function instanceOfAdminConceptMediaReviewNotification(value: object): value is AdminConceptMediaReviewNotification;
120
+ export declare function AdminConceptMediaReviewNotificationFromJSON(json: any): AdminConceptMediaReviewNotification;
121
+ export declare function AdminConceptMediaReviewNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminConceptMediaReviewNotification;
122
+ export declare function AdminConceptMediaReviewNotificationToJSON(json: any): AdminConceptMediaReviewNotification;
123
+ export declare function AdminConceptMediaReviewNotificationToJSONTyped(value?: AdminConceptMediaReviewNotification | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,119 @@
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.AdminConceptMediaReviewNotificationFlagOutcomeEnum = exports.AdminConceptMediaReviewNotificationReasonEnum = exports.AdminConceptMediaReviewNotificationMediaKindEnum = void 0;
17
+ exports.instanceOfAdminConceptMediaReviewNotification = instanceOfAdminConceptMediaReviewNotification;
18
+ exports.AdminConceptMediaReviewNotificationFromJSON = AdminConceptMediaReviewNotificationFromJSON;
19
+ exports.AdminConceptMediaReviewNotificationFromJSONTyped = AdminConceptMediaReviewNotificationFromJSONTyped;
20
+ exports.AdminConceptMediaReviewNotificationToJSON = AdminConceptMediaReviewNotificationToJSON;
21
+ exports.AdminConceptMediaReviewNotificationToJSONTyped = AdminConceptMediaReviewNotificationToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.AdminConceptMediaReviewNotificationMediaKindEnum = {
26
+ Image: 'image',
27
+ Diagram: 'diagram'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.AdminConceptMediaReviewNotificationReasonEnum = {
33
+ Inaccurate: 'inaccurate',
34
+ HardToRead: 'hard_to_read',
35
+ Irrelevant: 'irrelevant',
36
+ Inappropriate: 'inappropriate',
37
+ NotHelpful: 'not_helpful',
38
+ Other: 'other'
39
+ };
40
+ /**
41
+ * @export
42
+ */
43
+ exports.AdminConceptMediaReviewNotificationFlagOutcomeEnum = {
44
+ Hidden: 'hidden',
45
+ AlreadyHidden: 'already_hidden',
46
+ FlaggedAgain: 'flagged_again',
47
+ AlreadyFlagged: 'already_flagged',
48
+ NotFound: 'not_found'
49
+ };
50
+ /**
51
+ * Check if a given object implements the AdminConceptMediaReviewNotification interface.
52
+ */
53
+ function instanceOfAdminConceptMediaReviewNotification(value) {
54
+ if (!('reviewId' in value) || value['reviewId'] === undefined)
55
+ return false;
56
+ if (!('mediaKind' in value) || value['mediaKind'] === undefined)
57
+ return false;
58
+ if (!('mediaId' in value) || value['mediaId'] === undefined)
59
+ return false;
60
+ if (!('conceptId' in value) || value['conceptId'] === undefined)
61
+ return false;
62
+ if (!('conceptName' in value) || value['conceptName'] === undefined)
63
+ return false;
64
+ if (!('mediaTitle' in value) || value['mediaTitle'] === undefined)
65
+ return false;
66
+ if (!('mediaDescription' in value) || value['mediaDescription'] === undefined)
67
+ return false;
68
+ if (!('reason' in value) || value['reason'] === undefined)
69
+ return false;
70
+ if (!('details' in value) || value['details'] === undefined)
71
+ return false;
72
+ if (!('flagOutcome' in value) || value['flagOutcome'] === undefined)
73
+ return false;
74
+ if (!('completedAt' in value) || value['completedAt'] === undefined)
75
+ return false;
76
+ return true;
77
+ }
78
+ function AdminConceptMediaReviewNotificationFromJSON(json) {
79
+ return AdminConceptMediaReviewNotificationFromJSONTyped(json, false);
80
+ }
81
+ function AdminConceptMediaReviewNotificationFromJSONTyped(json, ignoreDiscriminator) {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+ 'reviewId': json['reviewId'],
87
+ 'mediaKind': json['mediaKind'],
88
+ 'mediaId': json['mediaId'],
89
+ 'conceptId': json['conceptId'],
90
+ 'conceptName': json['conceptName'],
91
+ 'mediaTitle': json['mediaTitle'],
92
+ 'mediaDescription': json['mediaDescription'],
93
+ 'reason': json['reason'],
94
+ 'details': json['details'],
95
+ 'flagOutcome': json['flagOutcome'],
96
+ 'completedAt': (new Date(json['completedAt'])),
97
+ };
98
+ }
99
+ function AdminConceptMediaReviewNotificationToJSON(json) {
100
+ return AdminConceptMediaReviewNotificationToJSONTyped(json, false);
101
+ }
102
+ function AdminConceptMediaReviewNotificationToJSONTyped(value, ignoreDiscriminator = false) {
103
+ if (value == null) {
104
+ return value;
105
+ }
106
+ return {
107
+ 'reviewId': value['reviewId'],
108
+ 'mediaKind': value['mediaKind'],
109
+ 'mediaId': value['mediaId'],
110
+ 'conceptId': value['conceptId'],
111
+ 'conceptName': value['conceptName'],
112
+ 'mediaTitle': value['mediaTitle'],
113
+ 'mediaDescription': value['mediaDescription'],
114
+ 'reason': value['reason'],
115
+ 'details': value['details'],
116
+ 'flagOutcome': value['flagOutcome'],
117
+ 'completedAt': value['completedAt'].toISOString(),
118
+ };
119
+ }
@@ -0,0 +1,33 @@
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 { AdminConceptMediaReviewNotification } from './AdminConceptMediaReviewNotification';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AdminConceptMediaReviewNotifications
17
+ */
18
+ export interface AdminConceptMediaReviewNotifications {
19
+ /**
20
+ * Flagged reviews claimed by this call, oldest first. Each is returned by exactly one call; empty when none are waiting.
21
+ * @type {Array<AdminConceptMediaReviewNotification>}
22
+ * @memberof AdminConceptMediaReviewNotifications
23
+ */
24
+ data: Array<AdminConceptMediaReviewNotification>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the AdminConceptMediaReviewNotifications interface.
28
+ */
29
+ export declare function instanceOfAdminConceptMediaReviewNotifications(value: object): value is AdminConceptMediaReviewNotifications;
30
+ export declare function AdminConceptMediaReviewNotificationsFromJSON(json: any): AdminConceptMediaReviewNotifications;
31
+ export declare function AdminConceptMediaReviewNotificationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminConceptMediaReviewNotifications;
32
+ export declare function AdminConceptMediaReviewNotificationsToJSON(json: any): AdminConceptMediaReviewNotifications;
33
+ export declare function AdminConceptMediaReviewNotificationsToJSONTyped(value?: AdminConceptMediaReviewNotifications | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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.instanceOfAdminConceptMediaReviewNotifications = instanceOfAdminConceptMediaReviewNotifications;
17
+ exports.AdminConceptMediaReviewNotificationsFromJSON = AdminConceptMediaReviewNotificationsFromJSON;
18
+ exports.AdminConceptMediaReviewNotificationsFromJSONTyped = AdminConceptMediaReviewNotificationsFromJSONTyped;
19
+ exports.AdminConceptMediaReviewNotificationsToJSON = AdminConceptMediaReviewNotificationsToJSON;
20
+ exports.AdminConceptMediaReviewNotificationsToJSONTyped = AdminConceptMediaReviewNotificationsToJSONTyped;
21
+ const AdminConceptMediaReviewNotification_1 = require("./AdminConceptMediaReviewNotification");
22
+ /**
23
+ * Check if a given object implements the AdminConceptMediaReviewNotifications interface.
24
+ */
25
+ function instanceOfAdminConceptMediaReviewNotifications(value) {
26
+ if (!('data' in value) || value['data'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function AdminConceptMediaReviewNotificationsFromJSON(json) {
31
+ return AdminConceptMediaReviewNotificationsFromJSONTyped(json, false);
32
+ }
33
+ function AdminConceptMediaReviewNotificationsFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'data': (json['data'].map(AdminConceptMediaReviewNotification_1.AdminConceptMediaReviewNotificationFromJSON)),
39
+ };
40
+ }
41
+ function AdminConceptMediaReviewNotificationsToJSON(json) {
42
+ return AdminConceptMediaReviewNotificationsToJSONTyped(json, false);
43
+ }
44
+ function AdminConceptMediaReviewNotificationsToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'data': (value['data'].map(AdminConceptMediaReviewNotification_1.AdminConceptMediaReviewNotificationToJSON)),
50
+ };
51
+ }
@@ -0,0 +1,51 @@
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 { AdminConceptMediaReviewKindStats } from './AdminConceptMediaReviewKindStats';
13
+ /**
14
+ * How the concept media reviewer agent has performed over a window: volume, flag rate, latency, and spend, per media kind.
15
+ * @export
16
+ * @interface AdminConceptMediaReviewStats
17
+ */
18
+ export interface AdminConceptMediaReviewStats {
19
+ /**
20
+ * The window, in days
21
+ * @type {number}
22
+ * @memberof AdminConceptMediaReviewStats
23
+ */
24
+ days: number;
25
+ /**
26
+ * Start of the window: reviews created at or after this
27
+ * @type {Date}
28
+ * @memberof AdminConceptMediaReviewStats
29
+ */
30
+ since: Date;
31
+ /**
32
+ * One entry per kind, image then diagram, even when empty
33
+ * @type {Array<AdminConceptMediaReviewKindStats>}
34
+ * @memberof AdminConceptMediaReviewStats
35
+ */
36
+ kinds: Array<AdminConceptMediaReviewKindStats>;
37
+ /**
38
+ * Sum of known review costs in USD across both kinds
39
+ * @type {number}
40
+ * @memberof AdminConceptMediaReviewStats
41
+ */
42
+ totalCostUsd: number;
43
+ }
44
+ /**
45
+ * Check if a given object implements the AdminConceptMediaReviewStats interface.
46
+ */
47
+ export declare function instanceOfAdminConceptMediaReviewStats(value: object): value is AdminConceptMediaReviewStats;
48
+ export declare function AdminConceptMediaReviewStatsFromJSON(json: any): AdminConceptMediaReviewStats;
49
+ export declare function AdminConceptMediaReviewStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminConceptMediaReviewStats;
50
+ export declare function AdminConceptMediaReviewStatsToJSON(json: any): AdminConceptMediaReviewStats;
51
+ export declare function AdminConceptMediaReviewStatsToJSONTyped(value?: AdminConceptMediaReviewStats | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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.instanceOfAdminConceptMediaReviewStats = instanceOfAdminConceptMediaReviewStats;
17
+ exports.AdminConceptMediaReviewStatsFromJSON = AdminConceptMediaReviewStatsFromJSON;
18
+ exports.AdminConceptMediaReviewStatsFromJSONTyped = AdminConceptMediaReviewStatsFromJSONTyped;
19
+ exports.AdminConceptMediaReviewStatsToJSON = AdminConceptMediaReviewStatsToJSON;
20
+ exports.AdminConceptMediaReviewStatsToJSONTyped = AdminConceptMediaReviewStatsToJSONTyped;
21
+ const AdminConceptMediaReviewKindStats_1 = require("./AdminConceptMediaReviewKindStats");
22
+ /**
23
+ * Check if a given object implements the AdminConceptMediaReviewStats interface.
24
+ */
25
+ function instanceOfAdminConceptMediaReviewStats(value) {
26
+ if (!('days' in value) || value['days'] === undefined)
27
+ return false;
28
+ if (!('since' in value) || value['since'] === undefined)
29
+ return false;
30
+ if (!('kinds' in value) || value['kinds'] === undefined)
31
+ return false;
32
+ if (!('totalCostUsd' in value) || value['totalCostUsd'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function AdminConceptMediaReviewStatsFromJSON(json) {
37
+ return AdminConceptMediaReviewStatsFromJSONTyped(json, false);
38
+ }
39
+ function AdminConceptMediaReviewStatsFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'days': json['days'],
45
+ 'since': (new Date(json['since'])),
46
+ 'kinds': (json['kinds'].map(AdminConceptMediaReviewKindStats_1.AdminConceptMediaReviewKindStatsFromJSON)),
47
+ 'totalCostUsd': json['totalCostUsd'],
48
+ };
49
+ }
50
+ function AdminConceptMediaReviewStatsToJSON(json) {
51
+ return AdminConceptMediaReviewStatsToJSONTyped(json, false);
52
+ }
53
+ function AdminConceptMediaReviewStatsToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'days': value['days'],
59
+ 'since': value['since'].toISOString(),
60
+ 'kinds': (value['kinds'].map(AdminConceptMediaReviewKindStats_1.AdminConceptMediaReviewKindStatsToJSON)),
61
+ 'totalCostUsd': value['totalCostUsd'],
62
+ };
63
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AdminConceptMediaAgentReview } from './AdminConceptMediaAgentReview';
12
13
  import type { AdminConceptMediaConcept } from './AdminConceptMediaConcept';
13
14
  import type { AdminConceptMediaHistoryEntry } from './AdminConceptMediaHistoryEntry';
14
15
  import type { AdminConceptMediaActor } from './AdminConceptMediaActor';
@@ -80,7 +81,7 @@ export interface AdminShownConceptDiagram {
80
81
  */
81
82
  hiddenBy: AdminConceptMediaActor | null;
82
83
  /**
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
+ * True when the current hide came from a flag (a learner's thumbs-down, or the reviewer agent's; see flaggedByAgent) rather than an admin. False when visible or hidden by an admin. List these with state=flagged.
84
85
  * @type {boolean}
85
86
  * @memberof AdminShownConceptDiagram
86
87
  */
@@ -98,7 +99,19 @@ export interface AdminShownConceptDiagram {
98
99
  */
99
100
  approvedBy: AdminConceptMediaActor | null;
100
101
  /**
101
- * When a learner first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
102
+ * True while a concept media reviewer agent flag awaits an admin's review: the flag hid the row (hiddenByFlag), queued an approved row for re-review (flaggedAfterApprovalAt), or found the row hidden and unapproved (e.g. an admin draft) and left it hidden. Such rows list under state=flagged; agentReview carries the reason. hiddenBy is null for an agent hide. Cleared by show, hide, and showing another version with hideOtherVersions; restore keeps it on a row that stays hidden. Never set on a row a learner's flag hid.
103
+ * @type {boolean}
104
+ * @memberof AdminShownConceptDiagram
105
+ */
106
+ flaggedByAgent: boolean;
107
+ /**
108
+ * The reviewer agent's latest review of this row; null when none has run (the review is off, or still pending).
109
+ * @type {AdminConceptMediaAgentReview}
110
+ * @memberof AdminShownConceptDiagram
111
+ */
112
+ agentReview: AdminConceptMediaAgentReview | null;
113
+ /**
114
+ * When a learner (or the reviewer agent, see flaggedByAgent) first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
102
115
  * @type {Date}
103
116
  * @memberof AdminShownConceptDiagram
104
117
  */
@@ -19,6 +19,7 @@ exports.AdminShownConceptDiagramFromJSON = AdminShownConceptDiagramFromJSON;
19
19
  exports.AdminShownConceptDiagramFromJSONTyped = AdminShownConceptDiagramFromJSONTyped;
20
20
  exports.AdminShownConceptDiagramToJSON = AdminShownConceptDiagramToJSON;
21
21
  exports.AdminShownConceptDiagramToJSONTyped = AdminShownConceptDiagramToJSONTyped;
22
+ const AdminConceptMediaAgentReview_1 = require("./AdminConceptMediaAgentReview");
22
23
  const AdminConceptMediaConcept_1 = require("./AdminConceptMediaConcept");
23
24
  const AdminConceptMediaHistoryEntry_1 = require("./AdminConceptMediaHistoryEntry");
24
25
  const AdminConceptMediaActor_1 = require("./AdminConceptMediaActor");
@@ -68,6 +69,10 @@ function instanceOfAdminShownConceptDiagram(value) {
68
69
  return false;
69
70
  if (!('approvedBy' in value) || value['approvedBy'] === undefined)
70
71
  return false;
72
+ if (!('flaggedByAgent' in value) || value['flaggedByAgent'] === undefined)
73
+ return false;
74
+ if (!('agentReview' in value) || value['agentReview'] === undefined)
75
+ return false;
71
76
  if (!('flaggedAfterApprovalAt' in value) || value['flaggedAfterApprovalAt'] === undefined)
72
77
  return false;
73
78
  if (!('deletedAt' in value) || value['deletedAt'] === undefined)
@@ -131,6 +136,8 @@ function AdminShownConceptDiagramFromJSONTyped(json, ignoreDiscriminator) {
131
136
  'hiddenByFlag': json['hiddenByFlag'],
132
137
  'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
133
138
  'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['approvedBy']),
139
+ 'flaggedByAgent': json['flaggedByAgent'],
140
+ 'agentReview': (0, AdminConceptMediaAgentReview_1.AdminConceptMediaAgentReviewFromJSON)(json['agentReview']),
134
141
  'flaggedAfterApprovalAt': (json['flaggedAfterApprovalAt'] == null ? null : new Date(json['flaggedAfterApprovalAt'])),
135
142
  'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
136
143
  'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['deletedBy']),
@@ -174,6 +181,8 @@ function AdminShownConceptDiagramToJSONTyped(value, ignoreDiscriminator = false)
174
181
  'hiddenByFlag': value['hiddenByFlag'],
175
182
  'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
176
183
  'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['approvedBy']),
184
+ 'flaggedByAgent': value['flaggedByAgent'],
185
+ 'agentReview': (0, AdminConceptMediaAgentReview_1.AdminConceptMediaAgentReviewToJSON)(value['agentReview']),
177
186
  'flaggedAfterApprovalAt': value['flaggedAfterApprovalAt'] == null ? value['flaggedAfterApprovalAt'] : value['flaggedAfterApprovalAt'].toISOString(),
178
187
  'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
179
188
  'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['deletedBy']),
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AdminConceptMediaAgentReview } from './AdminConceptMediaAgentReview';
12
13
  import type { AdminConceptMediaConcept } from './AdminConceptMediaConcept';
13
14
  import type { AdminConceptMediaHistoryEntry } from './AdminConceptMediaHistoryEntry';
14
15
  import type { AdminConceptMediaActor } from './AdminConceptMediaActor';
@@ -80,7 +81,7 @@ export interface AdminShownConceptImage {
80
81
  */
81
82
  hiddenBy: AdminConceptMediaActor | null;
82
83
  /**
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
+ * True when the current hide came from a flag (a learner's thumbs-down, or the reviewer agent's; see flaggedByAgent) rather than an admin. False when visible or hidden by an admin. List these with state=flagged.
84
85
  * @type {boolean}
85
86
  * @memberof AdminShownConceptImage
86
87
  */
@@ -98,7 +99,19 @@ export interface AdminShownConceptImage {
98
99
  */
99
100
  approvedBy: AdminConceptMediaActor | null;
100
101
  /**
101
- * When a learner first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
102
+ * True while a concept media reviewer agent flag awaits an admin's review: the flag hid the row (hiddenByFlag), queued an approved row for re-review (flaggedAfterApprovalAt), or found the row hidden and unapproved (e.g. an admin draft) and left it hidden. Such rows list under state=flagged; agentReview carries the reason. hiddenBy is null for an agent hide. Cleared by show, hide, and showing another version with hideOtherVersions; restore keeps it on a row that stays hidden. Never set on a row a learner's flag hid.
103
+ * @type {boolean}
104
+ * @memberof AdminShownConceptImage
105
+ */
106
+ flaggedByAgent: boolean;
107
+ /**
108
+ * The reviewer agent's latest review of this row; null when none has run (the review is off, or still pending).
109
+ * @type {AdminConceptMediaAgentReview}
110
+ * @memberof AdminShownConceptImage
111
+ */
112
+ agentReview: AdminConceptMediaAgentReview | null;
113
+ /**
114
+ * When a learner (or the reviewer agent, see flaggedByAgent) first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
102
115
  * @type {Date}
103
116
  * @memberof AdminShownConceptImage
104
117
  */
@@ -19,6 +19,7 @@ exports.AdminShownConceptImageFromJSON = AdminShownConceptImageFromJSON;
19
19
  exports.AdminShownConceptImageFromJSONTyped = AdminShownConceptImageFromJSONTyped;
20
20
  exports.AdminShownConceptImageToJSON = AdminShownConceptImageToJSON;
21
21
  exports.AdminShownConceptImageToJSONTyped = AdminShownConceptImageToJSONTyped;
22
+ const AdminConceptMediaAgentReview_1 = require("./AdminConceptMediaAgentReview");
22
23
  const AdminConceptMediaConcept_1 = require("./AdminConceptMediaConcept");
23
24
  const AdminConceptMediaHistoryEntry_1 = require("./AdminConceptMediaHistoryEntry");
24
25
  const AdminConceptMediaActor_1 = require("./AdminConceptMediaActor");
@@ -68,6 +69,10 @@ function instanceOfAdminShownConceptImage(value) {
68
69
  return false;
69
70
  if (!('approvedBy' in value) || value['approvedBy'] === undefined)
70
71
  return false;
72
+ if (!('flaggedByAgent' in value) || value['flaggedByAgent'] === undefined)
73
+ return false;
74
+ if (!('agentReview' in value) || value['agentReview'] === undefined)
75
+ return false;
71
76
  if (!('flaggedAfterApprovalAt' in value) || value['flaggedAfterApprovalAt'] === undefined)
72
77
  return false;
73
78
  if (!('deletedAt' in value) || value['deletedAt'] === undefined)
@@ -137,6 +142,8 @@ function AdminShownConceptImageFromJSONTyped(json, ignoreDiscriminator) {
137
142
  'hiddenByFlag': json['hiddenByFlag'],
138
143
  'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
139
144
  'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['approvedBy']),
145
+ 'flaggedByAgent': json['flaggedByAgent'],
146
+ 'agentReview': (0, AdminConceptMediaAgentReview_1.AdminConceptMediaAgentReviewFromJSON)(json['agentReview']),
140
147
  'flaggedAfterApprovalAt': (json['flaggedAfterApprovalAt'] == null ? null : new Date(json['flaggedAfterApprovalAt'])),
141
148
  'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
142
149
  'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorFromJSON)(json['deletedBy']),
@@ -183,6 +190,8 @@ function AdminShownConceptImageToJSONTyped(value, ignoreDiscriminator = false) {
183
190
  'hiddenByFlag': value['hiddenByFlag'],
184
191
  'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
185
192
  'approvedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['approvedBy']),
193
+ 'flaggedByAgent': value['flaggedByAgent'],
194
+ 'agentReview': (0, AdminConceptMediaAgentReview_1.AdminConceptMediaAgentReviewToJSON)(value['agentReview']),
186
195
  'flaggedAfterApprovalAt': value['flaggedAfterApprovalAt'] == null ? value['flaggedAfterApprovalAt'] : value['flaggedAfterApprovalAt'].toISOString(),
187
196
  'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
188
197
  'deletedBy': (0, AdminConceptMediaActor_1.AdminConceptMediaActorToJSON)(value['deletedBy']),
@@ -21,7 +21,23 @@ export interface ConceptMediaFlagResult {
21
21
  * @memberof ConceptMediaFlagResult
22
22
  */
23
23
  hidden: boolean;
24
+ /**
25
+ * What this flag did. hidden: it hid the item. flagged_again: the item is admin-approved, so it stayed visible and was queued for admin re-review. already_hidden: the item was already hidden or removed; nothing changed. already_flagged: the item is admin-approved and was already queued for re-review; nothing changed. Only hidden and flagged_again changed anything, so only they warrant telling admins.
26
+ * @type {string}
27
+ * @memberof ConceptMediaFlagResult
28
+ */
29
+ outcome: ConceptMediaFlagResultOutcomeEnum;
24
30
  }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ConceptMediaFlagResultOutcomeEnum: {
35
+ readonly Hidden: "hidden";
36
+ readonly AlreadyHidden: "already_hidden";
37
+ readonly FlaggedAgain: "flagged_again";
38
+ readonly AlreadyFlagged: "already_flagged";
39
+ };
40
+ export type ConceptMediaFlagResultOutcomeEnum = typeof ConceptMediaFlagResultOutcomeEnum[keyof typeof ConceptMediaFlagResultOutcomeEnum];
25
41
  /**
26
42
  * Check if a given object implements the ConceptMediaFlagResult interface.
27
43
  */