@instructure/athena-api-client 2.0.0 → 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 +5 -0
- package/dist/apis/DailyQuizApi.d.ts +44 -0
- package/dist/apis/DailyQuizApi.js +107 -0
- package/dist/apis/LearningMomentsApi.d.ts +14 -1
- package/dist/apis/LearningMomentsApi.js +37 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/DailyQuizApi.d.ts +44 -0
- package/dist/esm/apis/DailyQuizApi.js +103 -0
- package/dist/esm/apis/LearningMomentsApi.d.ts +14 -1
- package/dist/esm/apis/LearningMomentsApi.js +38 -1
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/DailyQuizStatus.d.ts +44 -0
- package/dist/esm/models/DailyQuizStatus.js +51 -0
- package/dist/esm/models/LearningMomentCount.d.ts +32 -0
- package/dist/esm/models/LearningMomentCount.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/DailyQuizStatus.d.ts +44 -0
- package/dist/models/DailyQuizStatus.js +58 -0
- package/dist/models/LearningMomentCount.d.ts +32 -0
- package/dist/models/LearningMomentCount.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
71
71
|
*ChatsApi* | [**markChatAsViewed**](docs/ChatsApi.md#markchatasviewed) | **PATCH** /api/v1/chats/{chatId}/viewed | Mark chat as viewed
|
|
72
72
|
*ChatsApi* | [**sendChatMessage**](docs/ChatsApi.md#sendchatmessage) | **POST** /api/v1/chat | Send a message to a chat
|
|
73
73
|
*ChatsApi* | [**updateChat**](docs/ChatsApi.md#updatechatoperation) | **PATCH** /api/v1/chats/{chatId} | Update a chat
|
|
74
|
+
*DailyQuizApi* | [**createDailyQuiz**](docs/DailyQuizApi.md#createdailyquiz) | **POST** /api/v1/daily-quiz | Get or create today\'s daily quiz
|
|
75
|
+
*DailyQuizApi* | [**getDailyQuiz**](docs/DailyQuizApi.md#getdailyquiz) | **GET** /api/v1/daily-quiz | Get today\'s daily quiz
|
|
74
76
|
*FeatureOverridesApi* | [**deleteFeatureOverride**](docs/FeatureOverridesApi.md#deletefeatureoverride) | **DELETE** /api/v1/feature-overrides/{id} | Delete a feature override
|
|
75
77
|
*FeatureOverridesApi* | [**listFeatureOverrides**](docs/FeatureOverridesApi.md#listfeatureoverrides) | **GET** /api/v1/feature-overrides | List feature overrides
|
|
76
78
|
*FeatureOverridesApi* | [**upsertFeatureOverride**](docs/FeatureOverridesApi.md#upsertfeatureoverride) | **PUT** /api/v1/feature-overrides | Upsert a feature override for an account
|
|
@@ -82,6 +84,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
82
84
|
*FilesApi* | [**getFileUploadUrls**](docs/FilesApi.md#getfileuploadurls) | **POST** /api/v1/files/upload-url | Get presigned upload URLs
|
|
83
85
|
*HealthApi* | [**healthCheck**](docs/HealthApi.md#healthcheck) | **GET** /health | Health check endpoint
|
|
84
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
|
|
85
88
|
*LearningMomentsApi* | [**listLearningMoments**](docs/LearningMomentsApi.md#listlearningmoments) | **GET** /api/v1/learning-moments | List learning moments
|
|
86
89
|
*LearningStreakApi* | [**getLearningStreak**](docs/LearningStreakApi.md#getlearningstreak) | **GET** /api/v1/learning-streak | Get learning streak
|
|
87
90
|
*MessagesApi* | [**createChatMessages**](docs/MessagesApi.md#createchatmessages) | **POST** /api/v1/chats/{chatId}/messages | Save messages to a chat
|
|
@@ -136,11 +139,13 @@ All URIs are relative to *http://localhost:3000*
|
|
|
136
139
|
- [CreatePlanDto](docs/CreatePlanDto.md)
|
|
137
140
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
138
141
|
- [CreateTokenResponse](docs/CreateTokenResponse.md)
|
|
142
|
+
- [DailyQuizStatus](docs/DailyQuizStatus.md)
|
|
139
143
|
- [FeatureEntity](docs/FeatureEntity.md)
|
|
140
144
|
- [FeatureOverrideEntity](docs/FeatureOverrideEntity.md)
|
|
141
145
|
- [HealthCheck](docs/HealthCheck.md)
|
|
142
146
|
- [LearningDaysResponse](docs/LearningDaysResponse.md)
|
|
143
147
|
- [LearningMoment](docs/LearningMoment.md)
|
|
148
|
+
- [LearningMomentCount](docs/LearningMomentCount.md)
|
|
144
149
|
- [LearningStreakResponse](docs/LearningStreakResponse.md)
|
|
145
150
|
- [Message](docs/Message.md)
|
|
146
151
|
- [MessageAttachment](docs/MessageAttachment.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { DailyQuizStatus } from '../models/index';
|
|
14
|
+
export interface CreateDailyQuizRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetDailyQuizRequest {
|
|
18
|
+
xUserId: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare class DailyQuizApi extends runtime.BaseAPI {
|
|
24
|
+
/**
|
|
25
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
26
|
+
* Get or create today\'s daily quiz
|
|
27
|
+
*/
|
|
28
|
+
createDailyQuizRaw(requestParameters: CreateDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DailyQuizStatus>>;
|
|
29
|
+
/**
|
|
30
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
31
|
+
* Get or create today\'s daily quiz
|
|
32
|
+
*/
|
|
33
|
+
createDailyQuiz(requestParameters: CreateDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DailyQuizStatus>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
36
|
+
* Get today\'s daily quiz
|
|
37
|
+
*/
|
|
38
|
+
getDailyQuizRaw(requestParameters: GetDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DailyQuizStatus>>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
41
|
+
* Get today\'s daily quiz
|
|
42
|
+
*/
|
|
43
|
+
getDailyQuiz(requestParameters: GetDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DailyQuizStatus>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.DailyQuizApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class DailyQuizApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
34
|
+
* Get or create today\'s daily quiz
|
|
35
|
+
*/
|
|
36
|
+
createDailyQuizRaw(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 createDailyQuiz().');
|
|
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/daily-quiz`;
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'POST',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DailyQuizStatusFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
61
|
+
* Get or create today\'s daily quiz
|
|
62
|
+
*/
|
|
63
|
+
createDailyQuiz(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.createDailyQuizRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
71
|
+
* Get today\'s daily quiz
|
|
72
|
+
*/
|
|
73
|
+
getDailyQuizRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (requestParameters['xUserId'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getDailyQuiz().');
|
|
77
|
+
}
|
|
78
|
+
const queryParameters = {};
|
|
79
|
+
const headerParameters = {};
|
|
80
|
+
if (requestParameters['xUserId'] != null) {
|
|
81
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
82
|
+
}
|
|
83
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
84
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
85
|
+
}
|
|
86
|
+
let urlPath = `/api/v1/daily-quiz`;
|
|
87
|
+
const response = yield this.request({
|
|
88
|
+
path: urlPath,
|
|
89
|
+
method: 'GET',
|
|
90
|
+
headers: headerParameters,
|
|
91
|
+
query: queryParameters,
|
|
92
|
+
}, initOverrides);
|
|
93
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DailyQuizStatusFromJSON)(jsonValue));
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
98
|
+
* Get today\'s daily quiz
|
|
99
|
+
*/
|
|
100
|
+
getDailyQuiz(requestParameters, initOverrides) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const response = yield this.getDailyQuizRaw(requestParameters, initOverrides);
|
|
103
|
+
return yield response.value();
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.DailyQuizApi = DailyQuizApi;
|
|
@@ -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
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./AccountsApi"), exports);
|
|
|
20
20
|
__exportStar(require("./AdminApi"), exports);
|
|
21
21
|
__exportStar(require("./ChatAnalysisApi"), exports);
|
|
22
22
|
__exportStar(require("./ChatsApi"), exports);
|
|
23
|
+
__exportStar(require("./DailyQuizApi"), exports);
|
|
23
24
|
__exportStar(require("./FeatureOverridesApi"), exports);
|
|
24
25
|
__exportStar(require("./FeaturesApi"), exports);
|
|
25
26
|
__exportStar(require("./FilesApi"), exports);
|
|
@@ -0,0 +1,44 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { DailyQuizStatus } from '../models/index';
|
|
14
|
+
export interface CreateDailyQuizRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetDailyQuizRequest {
|
|
18
|
+
xUserId: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare class DailyQuizApi extends runtime.BaseAPI {
|
|
24
|
+
/**
|
|
25
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
26
|
+
* Get or create today\'s daily quiz
|
|
27
|
+
*/
|
|
28
|
+
createDailyQuizRaw(requestParameters: CreateDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DailyQuizStatus>>;
|
|
29
|
+
/**
|
|
30
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
31
|
+
* Get or create today\'s daily quiz
|
|
32
|
+
*/
|
|
33
|
+
createDailyQuiz(requestParameters: CreateDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DailyQuizStatus>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
36
|
+
* Get today\'s daily quiz
|
|
37
|
+
*/
|
|
38
|
+
getDailyQuizRaw(requestParameters: GetDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DailyQuizStatus>>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
41
|
+
* Get today\'s daily quiz
|
|
42
|
+
*/
|
|
43
|
+
getDailyQuiz(requestParameters: GetDailyQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DailyQuizStatus>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { DailyQuizStatusFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class DailyQuizApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
31
|
+
* Get or create today\'s daily quiz
|
|
32
|
+
*/
|
|
33
|
+
createDailyQuizRaw(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 createDailyQuiz().');
|
|
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/daily-quiz`;
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: urlPath,
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DailyQuizStatusFromJSON(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Atomically finds today\'s daily-quiz chat or creates one if none exists. Returns featureEnabled: false when the user lacks enhanced-quizzing.
|
|
58
|
+
* Get or create today\'s daily quiz
|
|
59
|
+
*/
|
|
60
|
+
createDailyQuiz(requestParameters, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const response = yield this.createDailyQuizRaw(requestParameters, initOverrides);
|
|
63
|
+
return yield response.value();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
68
|
+
* Get today\'s daily quiz
|
|
69
|
+
*/
|
|
70
|
+
getDailyQuizRaw(requestParameters, initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
if (requestParameters['xUserId'] == null) {
|
|
73
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getDailyQuiz().');
|
|
74
|
+
}
|
|
75
|
+
const queryParameters = {};
|
|
76
|
+
const headerParameters = {};
|
|
77
|
+
if (requestParameters['xUserId'] != null) {
|
|
78
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
79
|
+
}
|
|
80
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
81
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
82
|
+
}
|
|
83
|
+
let urlPath = `/api/v1/daily-quiz`;
|
|
84
|
+
const response = yield this.request({
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'GET',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
}, initOverrides);
|
|
90
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DailyQuizStatusFromJSON(jsonValue));
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Returns entitlement (featureEnabled), today\'s calendar label in the user\'s timezone (todayDate), and chatId when a daily-quiz chat already exists for that calendar day. featureEnabled reflects enhanced-quizzing; chatId distinguishes \"not started today\" (null) vs \"already have today\'s chat\" (uuid).
|
|
95
|
+
* Get today\'s daily quiz
|
|
96
|
+
*/
|
|
97
|
+
getDailyQuiz(requestParameters, initOverrides) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const response = yield this.getDailyQuizRaw(requestParameters, initOverrides);
|
|
100
|
+
return yield response.value();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -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
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
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 DailyQuizStatus
|
|
16
|
+
*/
|
|
17
|
+
export interface DailyQuizStatus {
|
|
18
|
+
/**
|
|
19
|
+
* True when the user has the enhanced-quizzing feature (daily quiz is offered). When false, chatId is always null. This does not mean "quiz already completed" — use chatId after checking featureEnabled.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof DailyQuizStatus
|
|
22
|
+
*/
|
|
23
|
+
featureEnabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Id of today's daily-quiz chat in the user's timezone (see todayDate), if one exists. Null when featureEnabled is false, or when no daily-quiz chat exists yet for that calendar day.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DailyQuizStatus
|
|
28
|
+
*/
|
|
29
|
+
chatId: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable calendar date for "today" in the user's timezone (e.g. for titling a new chat). Returned regardless of featureEnabled so clients can stay consistent with server-side date boundaries.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DailyQuizStatus
|
|
34
|
+
*/
|
|
35
|
+
todayDate: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the DailyQuizStatus interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfDailyQuizStatus(value: object): value is DailyQuizStatus;
|
|
41
|
+
export declare function DailyQuizStatusFromJSON(json: any): DailyQuizStatus;
|
|
42
|
+
export declare function DailyQuizStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DailyQuizStatus;
|
|
43
|
+
export declare function DailyQuizStatusToJSON(json: any): DailyQuizStatus;
|
|
44
|
+
export declare function DailyQuizStatusToJSONTyped(value?: DailyQuizStatus | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 DailyQuizStatus interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfDailyQuizStatus(value) {
|
|
18
|
+
if (!('featureEnabled' in value) || value['featureEnabled'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('chatId' in value) || value['chatId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('todayDate' in value) || value['todayDate'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function DailyQuizStatusFromJSON(json) {
|
|
27
|
+
return DailyQuizStatusFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function DailyQuizStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'featureEnabled': json['featureEnabled'],
|
|
35
|
+
'chatId': json['chatId'],
|
|
36
|
+
'todayDate': json['todayDate'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function DailyQuizStatusToJSON(json) {
|
|
40
|
+
return DailyQuizStatusToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function DailyQuizStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'featureEnabled': value['featureEnabled'],
|
|
48
|
+
'chatId': value['chatId'],
|
|
49
|
+
'todayDate': value['todayDate'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -21,11 +21,13 @@ export * from './CreateMessagesResponse';
|
|
|
21
21
|
export * from './CreatePlanDto';
|
|
22
22
|
export * from './CreateTokenRequest';
|
|
23
23
|
export * from './CreateTokenResponse';
|
|
24
|
+
export * from './DailyQuizStatus';
|
|
24
25
|
export * from './FeatureEntity';
|
|
25
26
|
export * from './FeatureOverrideEntity';
|
|
26
27
|
export * from './HealthCheck';
|
|
27
28
|
export * from './LearningDaysResponse';
|
|
28
29
|
export * from './LearningMoment';
|
|
30
|
+
export * from './LearningMomentCount';
|
|
29
31
|
export * from './LearningStreakResponse';
|
|
30
32
|
export * from './Message';
|
|
31
33
|
export * from './MessageAttachment';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -23,11 +23,13 @@ export * from './CreateMessagesResponse';
|
|
|
23
23
|
export * from './CreatePlanDto';
|
|
24
24
|
export * from './CreateTokenRequest';
|
|
25
25
|
export * from './CreateTokenResponse';
|
|
26
|
+
export * from './DailyQuizStatus';
|
|
26
27
|
export * from './FeatureEntity';
|
|
27
28
|
export * from './FeatureOverrideEntity';
|
|
28
29
|
export * from './HealthCheck';
|
|
29
30
|
export * from './LearningDaysResponse';
|
|
30
31
|
export * from './LearningMoment';
|
|
32
|
+
export * from './LearningMomentCount';
|
|
31
33
|
export * from './LearningStreakResponse';
|
|
32
34
|
export * from './Message';
|
|
33
35
|
export * from './MessageAttachment';
|
|
@@ -0,0 +1,44 @@
|
|
|
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 DailyQuizStatus
|
|
16
|
+
*/
|
|
17
|
+
export interface DailyQuizStatus {
|
|
18
|
+
/**
|
|
19
|
+
* True when the user has the enhanced-quizzing feature (daily quiz is offered). When false, chatId is always null. This does not mean "quiz already completed" — use chatId after checking featureEnabled.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof DailyQuizStatus
|
|
22
|
+
*/
|
|
23
|
+
featureEnabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Id of today's daily-quiz chat in the user's timezone (see todayDate), if one exists. Null when featureEnabled is false, or when no daily-quiz chat exists yet for that calendar day.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DailyQuizStatus
|
|
28
|
+
*/
|
|
29
|
+
chatId: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable calendar date for "today" in the user's timezone (e.g. for titling a new chat). Returned regardless of featureEnabled so clients can stay consistent with server-side date boundaries.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof DailyQuizStatus
|
|
34
|
+
*/
|
|
35
|
+
todayDate: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the DailyQuizStatus interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfDailyQuizStatus(value: object): value is DailyQuizStatus;
|
|
41
|
+
export declare function DailyQuizStatusFromJSON(json: any): DailyQuizStatus;
|
|
42
|
+
export declare function DailyQuizStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DailyQuizStatus;
|
|
43
|
+
export declare function DailyQuizStatusToJSON(json: any): DailyQuizStatus;
|
|
44
|
+
export declare function DailyQuizStatusToJSONTyped(value?: DailyQuizStatus | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfDailyQuizStatus = instanceOfDailyQuizStatus;
|
|
17
|
+
exports.DailyQuizStatusFromJSON = DailyQuizStatusFromJSON;
|
|
18
|
+
exports.DailyQuizStatusFromJSONTyped = DailyQuizStatusFromJSONTyped;
|
|
19
|
+
exports.DailyQuizStatusToJSON = DailyQuizStatusToJSON;
|
|
20
|
+
exports.DailyQuizStatusToJSONTyped = DailyQuizStatusToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the DailyQuizStatus interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfDailyQuizStatus(value) {
|
|
25
|
+
if (!('featureEnabled' in value) || value['featureEnabled'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('chatId' in value) || value['chatId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('todayDate' in value) || value['todayDate'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function DailyQuizStatusFromJSON(json) {
|
|
34
|
+
return DailyQuizStatusFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function DailyQuizStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'featureEnabled': json['featureEnabled'],
|
|
42
|
+
'chatId': json['chatId'],
|
|
43
|
+
'todayDate': json['todayDate'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function DailyQuizStatusToJSON(json) {
|
|
47
|
+
return DailyQuizStatusToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function DailyQuizStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'featureEnabled': value['featureEnabled'],
|
|
55
|
+
'chatId': value['chatId'],
|
|
56
|
+
'todayDate': value['todayDate'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -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
|
@@ -21,11 +21,13 @@ export * from './CreateMessagesResponse';
|
|
|
21
21
|
export * from './CreatePlanDto';
|
|
22
22
|
export * from './CreateTokenRequest';
|
|
23
23
|
export * from './CreateTokenResponse';
|
|
24
|
+
export * from './DailyQuizStatus';
|
|
24
25
|
export * from './FeatureEntity';
|
|
25
26
|
export * from './FeatureOverrideEntity';
|
|
26
27
|
export * from './HealthCheck';
|
|
27
28
|
export * from './LearningDaysResponse';
|
|
28
29
|
export * from './LearningMoment';
|
|
30
|
+
export * from './LearningMomentCount';
|
|
29
31
|
export * from './LearningStreakResponse';
|
|
30
32
|
export * from './Message';
|
|
31
33
|
export * from './MessageAttachment';
|
package/dist/models/index.js
CHANGED
|
@@ -39,11 +39,13 @@ __exportStar(require("./CreateMessagesResponse"), exports);
|
|
|
39
39
|
__exportStar(require("./CreatePlanDto"), exports);
|
|
40
40
|
__exportStar(require("./CreateTokenRequest"), exports);
|
|
41
41
|
__exportStar(require("./CreateTokenResponse"), exports);
|
|
42
|
+
__exportStar(require("./DailyQuizStatus"), exports);
|
|
42
43
|
__exportStar(require("./FeatureEntity"), exports);
|
|
43
44
|
__exportStar(require("./FeatureOverrideEntity"), exports);
|
|
44
45
|
__exportStar(require("./HealthCheck"), exports);
|
|
45
46
|
__exportStar(require("./LearningDaysResponse"), exports);
|
|
46
47
|
__exportStar(require("./LearningMoment"), exports);
|
|
48
|
+
__exportStar(require("./LearningMomentCount"), exports);
|
|
47
49
|
__exportStar(require("./LearningStreakResponse"), exports);
|
|
48
50
|
__exportStar(require("./Message"), exports);
|
|
49
51
|
__exportStar(require("./MessageAttachment"), exports);
|