@instructure/athena-api-client 2.0.1 → 2.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.
- package/README.md +2 -0
- package/dist/apis/LearningMomentsApi.d.ts +14 -1
- package/dist/apis/LearningMomentsApi.js +37 -0
- package/dist/esm/apis/LearningMomentsApi.d.ts +14 -1
- package/dist/esm/apis/LearningMomentsApi.js +38 -1
- package/dist/esm/models/LearningMomentCount.d.ts +32 -0
- package/dist/esm/models/LearningMomentCount.js +43 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/LearningMomentCount.d.ts +32 -0
- package/dist/models/LearningMomentCount.js +50 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,6 +84,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
84
84
|
*FilesApi* | [**getFileUploadUrls**](docs/FilesApi.md#getfileuploadurls) | **POST** /api/v1/files/upload-url | Get presigned upload URLs
|
|
85
85
|
*HealthApi* | [**healthCheck**](docs/HealthApi.md#healthcheck) | **GET** /health | Health check endpoint
|
|
86
86
|
*LearningDaysApi* | [**getLearningDays**](docs/LearningDaysApi.md#getlearningdays) | **GET** /api/v1/learning-days | Get learning days in range
|
|
87
|
+
*LearningMomentsApi* | [**getLearningMomentsCount**](docs/LearningMomentsApi.md#getlearningmomentscount) | **GET** /api/v1/learning-moments/count | Get learning moments count
|
|
87
88
|
*LearningMomentsApi* | [**listLearningMoments**](docs/LearningMomentsApi.md#listlearningmoments) | **GET** /api/v1/learning-moments | List learning moments
|
|
88
89
|
*LearningStreakApi* | [**getLearningStreak**](docs/LearningStreakApi.md#getlearningstreak) | **GET** /api/v1/learning-streak | Get learning streak
|
|
89
90
|
*MessagesApi* | [**createChatMessages**](docs/MessagesApi.md#createchatmessages) | **POST** /api/v1/chats/{chatId}/messages | Save messages to a chat
|
|
@@ -144,6 +145,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
144
145
|
- [HealthCheck](docs/HealthCheck.md)
|
|
145
146
|
- [LearningDaysResponse](docs/LearningDaysResponse.md)
|
|
146
147
|
- [LearningMoment](docs/LearningMoment.md)
|
|
148
|
+
- [LearningMomentCount](docs/LearningMomentCount.md)
|
|
147
149
|
- [LearningStreakResponse](docs/LearningStreakResponse.md)
|
|
148
150
|
- [Message](docs/Message.md)
|
|
149
151
|
- [MessageAttachment](docs/MessageAttachment.md)
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedLearningMoments } from '../models/index';
|
|
13
|
+
import type { LearningMomentCount, PaginatedLearningMoments } from '../models/index';
|
|
14
|
+
export interface GetLearningMomentsCountRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface ListLearningMomentsRequest {
|
|
15
18
|
xUserId: string;
|
|
16
19
|
limit?: number;
|
|
@@ -20,6 +23,16 @@ export interface ListLearningMomentsRequest {
|
|
|
20
23
|
*
|
|
21
24
|
*/
|
|
22
25
|
export declare class LearningMomentsApi extends runtime.BaseAPI {
|
|
26
|
+
/**
|
|
27
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
28
|
+
* Get learning moments count
|
|
29
|
+
*/
|
|
30
|
+
getLearningMomentsCountRaw(requestParameters: GetLearningMomentsCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LearningMomentCount>>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
33
|
+
* Get learning moments count
|
|
34
|
+
*/
|
|
35
|
+
getLearningMomentsCount(requestParameters: GetLearningMomentsCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LearningMomentCount>;
|
|
23
36
|
/**
|
|
24
37
|
* Returns paginated learning moments belonging to the authenticated account user, ordered by creation date (newest first).
|
|
25
38
|
* List learning moments
|
|
@@ -29,6 +29,43 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class LearningMomentsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
34
|
+
* Get learning moments count
|
|
35
|
+
*/
|
|
36
|
+
getLearningMomentsCountRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getLearningMomentsCount().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (requestParameters['xUserId'] != null) {
|
|
44
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
45
|
+
}
|
|
46
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
47
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/api/v1/learning-moments/count`;
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'GET',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LearningMomentCountFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
61
|
+
* Get learning moments count
|
|
62
|
+
*/
|
|
63
|
+
getLearningMomentsCount(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.getLearningMomentsCountRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
32
69
|
/**
|
|
33
70
|
* Returns paginated learning moments belonging to the authenticated account user, ordered by creation date (newest first).
|
|
34
71
|
* List learning moments
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedLearningMoments } from '../models/index';
|
|
13
|
+
import type { LearningMomentCount, PaginatedLearningMoments } from '../models/index';
|
|
14
|
+
export interface GetLearningMomentsCountRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface ListLearningMomentsRequest {
|
|
15
18
|
xUserId: string;
|
|
16
19
|
limit?: number;
|
|
@@ -20,6 +23,16 @@ export interface ListLearningMomentsRequest {
|
|
|
20
23
|
*
|
|
21
24
|
*/
|
|
22
25
|
export declare class LearningMomentsApi extends runtime.BaseAPI {
|
|
26
|
+
/**
|
|
27
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
28
|
+
* Get learning moments count
|
|
29
|
+
*/
|
|
30
|
+
getLearningMomentsCountRaw(requestParameters: GetLearningMomentsCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LearningMomentCount>>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
33
|
+
* Get learning moments count
|
|
34
|
+
*/
|
|
35
|
+
getLearningMomentsCount(requestParameters: GetLearningMomentsCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LearningMomentCount>;
|
|
23
36
|
/**
|
|
24
37
|
* Returns paginated learning moments belonging to the authenticated account user, ordered by creation date (newest first).
|
|
25
38
|
* List learning moments
|
|
@@ -21,11 +21,48 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PaginatedLearningMomentsFromJSON, } from '../models/index';
|
|
24
|
+
import { LearningMomentCountFromJSON, PaginatedLearningMomentsFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class LearningMomentsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
31
|
+
* Get learning moments count
|
|
32
|
+
*/
|
|
33
|
+
getLearningMomentsCountRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['xUserId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getLearningMomentsCount().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
if (requestParameters['xUserId'] != null) {
|
|
41
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
42
|
+
}
|
|
43
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
44
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
45
|
+
}
|
|
46
|
+
let urlPath = `/api/v1/learning-moments/count`;
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: urlPath,
|
|
49
|
+
method: 'GET',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LearningMomentCountFromJSON(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the total number of learning moments for the authenticated user.
|
|
58
|
+
* Get learning moments count
|
|
59
|
+
*/
|
|
60
|
+
getLearningMomentsCount(requestParameters, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const response = yield this.getLearningMomentsCountRaw(requestParameters, initOverrides);
|
|
63
|
+
return yield response.value();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
29
66
|
/**
|
|
30
67
|
* Returns paginated learning moments belonging to the authenticated account user, ordered by creation date (newest first).
|
|
31
68
|
* List learning moments
|
|
@@ -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 LearningMomentCount
|
|
16
|
+
*/
|
|
17
|
+
export interface LearningMomentCount {
|
|
18
|
+
/**
|
|
19
|
+
* Total number of learning moments for the authenticated user
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof LearningMomentCount
|
|
22
|
+
*/
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the LearningMomentCount interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfLearningMomentCount(value: object): value is LearningMomentCount;
|
|
29
|
+
export declare function LearningMomentCountFromJSON(json: any): LearningMomentCount;
|
|
30
|
+
export declare function LearningMomentCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): LearningMomentCount;
|
|
31
|
+
export declare function LearningMomentCountToJSON(json: any): LearningMomentCount;
|
|
32
|
+
export declare function LearningMomentCountToJSONTyped(value?: LearningMomentCount | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the LearningMomentCount interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfLearningMomentCount(value) {
|
|
18
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function LearningMomentCountFromJSON(json) {
|
|
23
|
+
return LearningMomentCountFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function LearningMomentCountFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'count': json['count'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function LearningMomentCountToJSON(json) {
|
|
34
|
+
return LearningMomentCountToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function LearningMomentCountToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'count': value['count'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -27,6 +27,7 @@ export * from './FeatureOverrideEntity';
|
|
|
27
27
|
export * from './HealthCheck';
|
|
28
28
|
export * from './LearningDaysResponse';
|
|
29
29
|
export * from './LearningMoment';
|
|
30
|
+
export * from './LearningMomentCount';
|
|
30
31
|
export * from './LearningStreakResponse';
|
|
31
32
|
export * from './Message';
|
|
32
33
|
export * from './MessageAttachment';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export * from './FeatureOverrideEntity';
|
|
|
29
29
|
export * from './HealthCheck';
|
|
30
30
|
export * from './LearningDaysResponse';
|
|
31
31
|
export * from './LearningMoment';
|
|
32
|
+
export * from './LearningMomentCount';
|
|
32
33
|
export * from './LearningStreakResponse';
|
|
33
34
|
export * from './Message';
|
|
34
35
|
export * from './MessageAttachment';
|
|
@@ -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 LearningMomentCount
|
|
16
|
+
*/
|
|
17
|
+
export interface LearningMomentCount {
|
|
18
|
+
/**
|
|
19
|
+
* Total number of learning moments for the authenticated user
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof LearningMomentCount
|
|
22
|
+
*/
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the LearningMomentCount interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfLearningMomentCount(value: object): value is LearningMomentCount;
|
|
29
|
+
export declare function LearningMomentCountFromJSON(json: any): LearningMomentCount;
|
|
30
|
+
export declare function LearningMomentCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): LearningMomentCount;
|
|
31
|
+
export declare function LearningMomentCountToJSON(json: any): LearningMomentCount;
|
|
32
|
+
export declare function LearningMomentCountToJSONTyped(value?: LearningMomentCount | 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.instanceOfLearningMomentCount = instanceOfLearningMomentCount;
|
|
17
|
+
exports.LearningMomentCountFromJSON = LearningMomentCountFromJSON;
|
|
18
|
+
exports.LearningMomentCountFromJSONTyped = LearningMomentCountFromJSONTyped;
|
|
19
|
+
exports.LearningMomentCountToJSON = LearningMomentCountToJSON;
|
|
20
|
+
exports.LearningMomentCountToJSONTyped = LearningMomentCountToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the LearningMomentCount interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfLearningMomentCount(value) {
|
|
25
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function LearningMomentCountFromJSON(json) {
|
|
30
|
+
return LearningMomentCountFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function LearningMomentCountFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'count': json['count'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function LearningMomentCountToJSON(json) {
|
|
41
|
+
return LearningMomentCountToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function LearningMomentCountToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'count': value['count'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './FeatureOverrideEntity';
|
|
|
27
27
|
export * from './HealthCheck';
|
|
28
28
|
export * from './LearningDaysResponse';
|
|
29
29
|
export * from './LearningMoment';
|
|
30
|
+
export * from './LearningMomentCount';
|
|
30
31
|
export * from './LearningStreakResponse';
|
|
31
32
|
export * from './Message';
|
|
32
33
|
export * from './MessageAttachment';
|
package/dist/models/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __exportStar(require("./FeatureOverrideEntity"), exports);
|
|
|
45
45
|
__exportStar(require("./HealthCheck"), exports);
|
|
46
46
|
__exportStar(require("./LearningDaysResponse"), exports);
|
|
47
47
|
__exportStar(require("./LearningMoment"), exports);
|
|
48
|
+
__exportStar(require("./LearningMomentCount"), exports);
|
|
48
49
|
__exportStar(require("./LearningStreakResponse"), exports);
|
|
49
50
|
__exportStar(require("./Message"), exports);
|
|
50
51
|
__exportStar(require("./MessageAttachment"), exports);
|