@instructure/athena-api-client 3.47.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
+ }
@@ -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';
@@ -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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "3.47.0",
4
+ "version": "4.0.0",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {