@instructure/athena-api-client 1.0.0 → 1.0.2

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 (42) hide show
  1. package/README.md +7 -0
  2. package/dist/apis/ChatsApi.d.ts +14 -0
  3. package/dist/apis/ChatsApi.js +41 -0
  4. package/dist/apis/LearningMomentsApi.d.ts +33 -0
  5. package/dist/apis/LearningMomentsApi.js +76 -0
  6. package/dist/apis/MessagesApi.d.ts +30 -1
  7. package/dist/apis/MessagesApi.js +88 -0
  8. package/dist/apis/index.d.ts +1 -0
  9. package/dist/apis/index.js +1 -0
  10. package/dist/esm/apis/ChatsApi.d.ts +14 -0
  11. package/dist/esm/apis/ChatsApi.js +41 -0
  12. package/dist/esm/apis/LearningMomentsApi.d.ts +33 -0
  13. package/dist/esm/apis/LearningMomentsApi.js +72 -0
  14. package/dist/esm/apis/MessagesApi.d.ts +30 -1
  15. package/dist/esm/apis/MessagesApi.js +89 -1
  16. package/dist/esm/apis/index.d.ts +1 -0
  17. package/dist/esm/apis/index.js +1 -0
  18. package/dist/esm/models/Account.d.ts +6 -0
  19. package/dist/esm/models/Account.js +2 -0
  20. package/dist/esm/models/LearningMoment.d.ts +86 -0
  21. package/dist/esm/models/LearningMoment.js +73 -0
  22. package/dist/esm/models/Message.d.ts +6 -0
  23. package/dist/esm/models/Message.js +4 -0
  24. package/dist/esm/models/MessageCountResponse.d.ts +32 -0
  25. package/dist/esm/models/MessageCountResponse.js +43 -0
  26. package/dist/esm/models/PaginatedLearningMoments.d.ts +39 -0
  27. package/dist/esm/models/PaginatedLearningMoments.js +48 -0
  28. package/dist/esm/models/index.d.ts +3 -0
  29. package/dist/esm/models/index.js +3 -0
  30. package/dist/models/Account.d.ts +6 -0
  31. package/dist/models/Account.js +2 -0
  32. package/dist/models/LearningMoment.d.ts +86 -0
  33. package/dist/models/LearningMoment.js +80 -0
  34. package/dist/models/Message.d.ts +6 -0
  35. package/dist/models/Message.js +4 -0
  36. package/dist/models/MessageCountResponse.d.ts +32 -0
  37. package/dist/models/MessageCountResponse.js +50 -0
  38. package/dist/models/PaginatedLearningMoments.d.ts +39 -0
  39. package/dist/models/PaginatedLearningMoments.js +55 -0
  40. package/dist/models/index.d.ts +3 -0
  41. package/dist/models/index.js +3 -0
  42. package/package.json +1 -1
@@ -0,0 +1,80 @@
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.instanceOfLearningMoment = instanceOfLearningMoment;
17
+ exports.LearningMomentFromJSON = LearningMomentFromJSON;
18
+ exports.LearningMomentFromJSONTyped = LearningMomentFromJSONTyped;
19
+ exports.LearningMomentToJSON = LearningMomentToJSON;
20
+ exports.LearningMomentToJSONTyped = LearningMomentToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the LearningMoment interface.
23
+ */
24
+ function instanceOfLearningMoment(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('accountUserId' in value) || value['accountUserId'] === undefined)
28
+ return false;
29
+ if (!('chatId' in value) || value['chatId'] === undefined)
30
+ return false;
31
+ if (!('messageId' in value) || value['messageId'] === undefined)
32
+ return false;
33
+ if (!('occurredOn' in value) || value['occurredOn'] === undefined)
34
+ return false;
35
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
36
+ return false;
37
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ function LearningMomentFromJSON(json) {
42
+ return LearningMomentFromJSONTyped(json, false);
43
+ }
44
+ function LearningMomentFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'id': json['id'],
50
+ 'accountUserId': json['accountUserId'],
51
+ 'chatId': json['chatId'],
52
+ 'messageId': json['messageId'],
53
+ 'label': json['label'] == null ? undefined : json['label'],
54
+ 'confidence': json['confidence'] == null ? undefined : json['confidence'],
55
+ 'reason': json['reason'] == null ? undefined : json['reason'],
56
+ 'occurredOn': (new Date(json['occurredOn'])),
57
+ 'createdAt': (new Date(json['createdAt'])),
58
+ 'updatedAt': (new Date(json['updatedAt'])),
59
+ };
60
+ }
61
+ function LearningMomentToJSON(json) {
62
+ return LearningMomentToJSONTyped(json, false);
63
+ }
64
+ function LearningMomentToJSONTyped(value, ignoreDiscriminator = false) {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+ return {
69
+ 'id': value['id'],
70
+ 'accountUserId': value['accountUserId'],
71
+ 'chatId': value['chatId'],
72
+ 'messageId': value['messageId'],
73
+ 'label': value['label'],
74
+ 'confidence': value['confidence'],
75
+ 'reason': value['reason'],
76
+ 'occurredOn': value['occurredOn'].toISOString().substring(0, 10),
77
+ 'createdAt': value['createdAt'].toISOString(),
78
+ 'updatedAt': value['updatedAt'].toISOString(),
79
+ };
80
+ }
@@ -52,6 +52,12 @@ export interface Message {
52
52
  * @memberof Message
53
53
  */
54
54
  createdAt: Date;
55
+ /**
56
+ * Whether a learning moment exists for this message
57
+ * @type {boolean}
58
+ * @memberof Message
59
+ */
60
+ isLearningMoment: boolean;
55
61
  }
56
62
  /**
57
63
  * Check if a given object implements the Message interface.
@@ -35,6 +35,8 @@ function instanceOfMessage(value) {
35
35
  return false;
36
36
  if (!('createdAt' in value) || value['createdAt'] === undefined)
37
37
  return false;
38
+ if (!('isLearningMoment' in value) || value['isLearningMoment'] === undefined)
39
+ return false;
38
40
  return true;
39
41
  }
40
42
  function MessageFromJSON(json) {
@@ -51,6 +53,7 @@ function MessageFromJSONTyped(json, ignoreDiscriminator) {
51
53
  'parts': (json['parts'].map(MessagePartsInner_1.MessagePartsInnerFromJSON)),
52
54
  'attachments': json['attachments'],
53
55
  'createdAt': (new Date(json['createdAt'])),
56
+ 'isLearningMoment': json['isLearningMoment'],
54
57
  };
55
58
  }
56
59
  function MessageToJSON(json) {
@@ -67,5 +70,6 @@ function MessageToJSONTyped(value, ignoreDiscriminator = false) {
67
70
  'parts': (value['parts'].map(MessagePartsInner_1.MessagePartsInnerToJSON)),
68
71
  'attachments': value['attachments'],
69
72
  'createdAt': value['createdAt'].toISOString(),
73
+ 'isLearningMoment': value['isLearningMoment'],
70
74
  };
71
75
  }
@@ -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
+ *
14
+ * @export
15
+ * @interface MessageCountResponse
16
+ */
17
+ export interface MessageCountResponse {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof MessageCountResponse
22
+ */
23
+ count: number;
24
+ }
25
+ /**
26
+ * Check if a given object implements the MessageCountResponse interface.
27
+ */
28
+ export declare function instanceOfMessageCountResponse(value: object): value is MessageCountResponse;
29
+ export declare function MessageCountResponseFromJSON(json: any): MessageCountResponse;
30
+ export declare function MessageCountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MessageCountResponse;
31
+ export declare function MessageCountResponseToJSON(json: any): MessageCountResponse;
32
+ export declare function MessageCountResponseToJSONTyped(value?: MessageCountResponse | 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.instanceOfMessageCountResponse = instanceOfMessageCountResponse;
17
+ exports.MessageCountResponseFromJSON = MessageCountResponseFromJSON;
18
+ exports.MessageCountResponseFromJSONTyped = MessageCountResponseFromJSONTyped;
19
+ exports.MessageCountResponseToJSON = MessageCountResponseToJSON;
20
+ exports.MessageCountResponseToJSONTyped = MessageCountResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MessageCountResponse interface.
23
+ */
24
+ function instanceOfMessageCountResponse(value) {
25
+ if (!('count' in value) || value['count'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function MessageCountResponseFromJSON(json) {
30
+ return MessageCountResponseFromJSONTyped(json, false);
31
+ }
32
+ function MessageCountResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'count': json['count'],
38
+ };
39
+ }
40
+ function MessageCountResponseToJSON(json) {
41
+ return MessageCountResponseToJSONTyped(json, false);
42
+ }
43
+ function MessageCountResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'count': value['count'],
49
+ };
50
+ }
@@ -0,0 +1,39 @@
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 { LearningMoment } from './LearningMoment';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedLearningMoments
17
+ */
18
+ export interface PaginatedLearningMoments {
19
+ /**
20
+ * Array of learning moment objects
21
+ * @type {Array<LearningMoment>}
22
+ * @memberof PaginatedLearningMoments
23
+ */
24
+ data: Array<LearningMoment>;
25
+ /**
26
+ * Opaque cursor for fetching the next page. Null when there are no more results.
27
+ * @type {string}
28
+ * @memberof PaginatedLearningMoments
29
+ */
30
+ nextCursor: string | null;
31
+ }
32
+ /**
33
+ * Check if a given object implements the PaginatedLearningMoments interface.
34
+ */
35
+ export declare function instanceOfPaginatedLearningMoments(value: object): value is PaginatedLearningMoments;
36
+ export declare function PaginatedLearningMomentsFromJSON(json: any): PaginatedLearningMoments;
37
+ export declare function PaginatedLearningMomentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedLearningMoments;
38
+ export declare function PaginatedLearningMomentsToJSON(json: any): PaginatedLearningMoments;
39
+ export declare function PaginatedLearningMomentsToJSONTyped(value?: PaginatedLearningMoments | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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.instanceOfPaginatedLearningMoments = instanceOfPaginatedLearningMoments;
17
+ exports.PaginatedLearningMomentsFromJSON = PaginatedLearningMomentsFromJSON;
18
+ exports.PaginatedLearningMomentsFromJSONTyped = PaginatedLearningMomentsFromJSONTyped;
19
+ exports.PaginatedLearningMomentsToJSON = PaginatedLearningMomentsToJSON;
20
+ exports.PaginatedLearningMomentsToJSONTyped = PaginatedLearningMomentsToJSONTyped;
21
+ const LearningMoment_1 = require("./LearningMoment");
22
+ /**
23
+ * Check if a given object implements the PaginatedLearningMoments interface.
24
+ */
25
+ function instanceOfPaginatedLearningMoments(value) {
26
+ if (!('data' in value) || value['data'] === undefined)
27
+ return false;
28
+ if (!('nextCursor' in value) || value['nextCursor'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function PaginatedLearningMomentsFromJSON(json) {
33
+ return PaginatedLearningMomentsFromJSONTyped(json, false);
34
+ }
35
+ function PaginatedLearningMomentsFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'data': (json['data'].map(LearningMoment_1.LearningMomentFromJSON)),
41
+ 'nextCursor': json['nextCursor'],
42
+ };
43
+ }
44
+ function PaginatedLearningMomentsToJSON(json) {
45
+ return PaginatedLearningMomentsToJSONTyped(json, false);
46
+ }
47
+ function PaginatedLearningMomentsToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'data': (value['data'].map(LearningMoment_1.LearningMomentToJSON)),
53
+ 'nextCursor': value['nextCursor'],
54
+ };
55
+ }
@@ -6,10 +6,13 @@ export * from './CreateChatRequest';
6
6
  export * from './CreateTokenRequest';
7
7
  export * from './CreateTokenResponse';
8
8
  export * from './HealthCheck';
9
+ export * from './LearningMoment';
9
10
  export * from './Message';
11
+ export * from './MessageCountResponse';
10
12
  export * from './MessagePartsInner';
11
13
  export * from './ModelError';
12
14
  export * from './PaginatedChats';
15
+ export * from './PaginatedLearningMoments';
13
16
  export * from './PaginatedMessages';
14
17
  export * from './ServiceToken';
15
18
  export * from './Tag';
@@ -24,10 +24,13 @@ __exportStar(require("./CreateChatRequest"), exports);
24
24
  __exportStar(require("./CreateTokenRequest"), exports);
25
25
  __exportStar(require("./CreateTokenResponse"), exports);
26
26
  __exportStar(require("./HealthCheck"), exports);
27
+ __exportStar(require("./LearningMoment"), exports);
27
28
  __exportStar(require("./Message"), exports);
29
+ __exportStar(require("./MessageCountResponse"), exports);
28
30
  __exportStar(require("./MessagePartsInner"), exports);
29
31
  __exportStar(require("./ModelError"), exports);
30
32
  __exportStar(require("./PaginatedChats"), exports);
33
+ __exportStar(require("./PaginatedLearningMoments"), exports);
31
34
  __exportStar(require("./PaginatedMessages"), exports);
32
35
  __exportStar(require("./ServiceToken"), exports);
33
36
  __exportStar(require("./Tag"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {