@instructure/athena-api-client 2.0.0 → 2.0.1

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 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
@@ -136,6 +138,7 @@ All URIs are relative to *http://localhost:3000*
136
138
  - [CreatePlanDto](docs/CreatePlanDto.md)
137
139
  - [CreateTokenRequest](docs/CreateTokenRequest.md)
138
140
  - [CreateTokenResponse](docs/CreateTokenResponse.md)
141
+ - [DailyQuizStatus](docs/DailyQuizStatus.md)
139
142
  - [FeatureEntity](docs/FeatureEntity.md)
140
143
  - [FeatureOverrideEntity](docs/FeatureOverrideEntity.md)
141
144
  - [HealthCheck](docs/HealthCheck.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;
@@ -2,6 +2,7 @@ export * from './AccountsApi';
2
2
  export * from './AdminApi';
3
3
  export * from './ChatAnalysisApi';
4
4
  export * from './ChatsApi';
5
+ export * from './DailyQuizApi';
5
6
  export * from './FeatureOverridesApi';
6
7
  export * from './FeaturesApi';
7
8
  export * from './FilesApi';
@@ -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
+ }
@@ -2,6 +2,7 @@ export * from './AccountsApi';
2
2
  export * from './AdminApi';
3
3
  export * from './ChatAnalysisApi';
4
4
  export * from './ChatsApi';
5
+ export * from './DailyQuizApi';
5
6
  export * from './FeatureOverridesApi';
6
7
  export * from './FeaturesApi';
7
8
  export * from './FilesApi';
@@ -4,6 +4,7 @@ export * from './AccountsApi';
4
4
  export * from './AdminApi';
5
5
  export * from './ChatAnalysisApi';
6
6
  export * from './ChatsApi';
7
+ export * from './DailyQuizApi';
7
8
  export * from './FeatureOverridesApi';
8
9
  export * from './FeaturesApi';
9
10
  export * from './FilesApi';
@@ -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
+ }
@@ -21,6 +21,7 @@ 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';
@@ -23,6 +23,7 @@ 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';
@@ -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
+ }
@@ -21,6 +21,7 @@ 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';
@@ -39,6 +39,7 @@ __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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {