@instructure/athena-api-client 1.0.9 → 1.0.11
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 +36 -5
- package/dist/apis/AccountsApi.d.ts +13 -5
- package/dist/apis/AccountsApi.js +38 -4
- package/dist/apis/ChatsApi.d.ts +8 -7
- package/dist/apis/ChatsApi.js +22 -13
- package/dist/apis/FeatureOverridesApi.d.ts +51 -0
- package/dist/apis/FeatureOverridesApi.js +131 -0
- package/dist/apis/FeaturesApi.d.ts +71 -0
- package/dist/apis/FeaturesApi.js +199 -0
- package/dist/apis/HealthApi.d.ts +0 -2
- package/dist/apis/HealthApi.js +0 -2
- package/dist/apis/LearningDaysApi.d.ts +1 -1
- package/dist/apis/LearningDaysApi.js +3 -3
- package/dist/apis/MessagesApi.d.ts +20 -5
- package/dist/apis/MessagesApi.js +58 -12
- package/dist/apis/PlansApi.d.ts +71 -0
- package/dist/apis/PlansApi.js +199 -0
- package/dist/apis/QuizSessionsApi.d.ts +4 -4
- package/dist/apis/QuizSessionsApi.js +12 -12
- package/dist/apis/QuizzesApi.d.ts +1 -1
- package/dist/apis/QuizzesApi.js +3 -3
- package/dist/apis/ServiceTokensApi.d.ts +0 -10
- package/dist/apis/ServiceTokensApi.js +0 -10
- package/dist/apis/TagsApi.d.ts +0 -2
- package/dist/apis/TagsApi.js +0 -2
- package/dist/apis/VotesApi.d.ts +47 -0
- package/dist/apis/VotesApi.js +120 -0
- package/dist/apis/index.d.ts +4 -0
- package/dist/apis/index.js +4 -0
- package/dist/esm/apis/AccountsApi.d.ts +13 -5
- package/dist/esm/apis/AccountsApi.js +39 -5
- package/dist/esm/apis/ChatsApi.d.ts +8 -7
- package/dist/esm/apis/ChatsApi.js +22 -13
- package/dist/esm/apis/FeatureOverridesApi.d.ts +51 -0
- package/dist/esm/apis/FeatureOverridesApi.js +127 -0
- package/dist/esm/apis/FeaturesApi.d.ts +71 -0
- package/dist/esm/apis/FeaturesApi.js +195 -0
- package/dist/esm/apis/HealthApi.d.ts +0 -2
- package/dist/esm/apis/HealthApi.js +0 -2
- package/dist/esm/apis/LearningDaysApi.d.ts +1 -1
- package/dist/esm/apis/LearningDaysApi.js +3 -3
- package/dist/esm/apis/MessagesApi.d.ts +20 -5
- package/dist/esm/apis/MessagesApi.js +59 -13
- package/dist/esm/apis/PlansApi.d.ts +71 -0
- package/dist/esm/apis/PlansApi.js +195 -0
- package/dist/esm/apis/QuizSessionsApi.d.ts +4 -4
- package/dist/esm/apis/QuizSessionsApi.js +12 -12
- package/dist/esm/apis/QuizzesApi.d.ts +1 -1
- package/dist/esm/apis/QuizzesApi.js +3 -3
- package/dist/esm/apis/ServiceTokensApi.d.ts +0 -10
- package/dist/esm/apis/ServiceTokensApi.js +0 -10
- package/dist/esm/apis/TagsApi.d.ts +0 -2
- package/dist/esm/apis/TagsApi.js +0 -2
- package/dist/esm/apis/VotesApi.d.ts +47 -0
- package/dist/esm/apis/VotesApi.js +116 -0
- package/dist/esm/apis/index.d.ts +4 -0
- package/dist/esm/apis/index.js +4 -0
- package/dist/esm/models/ChatRequest.d.ts +1 -1
- package/dist/esm/models/ChatRequest.js +3 -1
- package/dist/esm/models/CreateChatMessages201Response.d.ts +33 -0
- package/dist/esm/models/CreateChatMessages201Response.js +42 -0
- package/dist/esm/models/CreateFeatureDto.d.ts +44 -0
- package/dist/esm/models/CreateFeatureDto.js +49 -0
- package/dist/esm/models/CreateMessagesRequest.d.ts +33 -0
- package/dist/esm/models/CreateMessagesRequest.js +44 -0
- package/dist/esm/models/CreateMessagesRequestMessagesInner.d.ts +68 -0
- package/dist/esm/models/CreateMessagesRequestMessagesInner.js +62 -0
- package/dist/esm/models/CreateMessagesResponse.d.ts +33 -0
- package/dist/esm/models/CreateMessagesResponse.js +44 -0
- package/dist/esm/models/CreatePlanDto.d.ts +38 -0
- package/dist/esm/models/CreatePlanDto.js +47 -0
- package/dist/esm/models/FeatureEntity.d.ts +62 -0
- package/dist/esm/models/FeatureEntity.js +61 -0
- package/dist/esm/models/FeatureOverrideEntity.d.ts +62 -0
- package/dist/esm/models/FeatureOverrideEntity.js +63 -0
- package/dist/esm/models/HealthCheck.d.ts +1 -8
- package/dist/esm/models/HealthCheck.js +0 -6
- package/dist/esm/models/LearningMoment.d.ts +3 -3
- package/dist/esm/models/LearningMoment.js +9 -3
- package/dist/esm/models/LearningStreakResponse.d.ts +2 -2
- package/dist/esm/models/LearningStreakResponse.js +6 -2
- package/dist/esm/models/ListChatVotes200Response.d.ts +33 -0
- package/dist/esm/models/ListChatVotes200Response.js +42 -0
- package/dist/esm/models/Message.d.ts +7 -7
- package/dist/esm/models/Message.js +7 -9
- package/dist/esm/models/MessageAttachment.d.ts +61 -0
- package/dist/esm/models/MessageAttachment.js +61 -0
- package/dist/esm/models/MessagePart.d.ts +38 -0
- package/dist/esm/models/MessagePart.js +43 -0
- package/dist/esm/models/PaginatedMessages.d.ts +1 -1
- package/dist/esm/models/Plan.d.ts +56 -0
- package/dist/esm/models/Plan.js +59 -0
- package/dist/esm/models/QuizQuestion.d.ts +4 -4
- package/dist/esm/models/QuizQuestion.js +12 -4
- package/dist/esm/models/QuizResponse.d.ts +2 -2
- package/dist/esm/models/QuizResponse.js +6 -2
- package/dist/esm/models/QuizSessionSummary.d.ts +3 -3
- package/dist/esm/models/QuizSessionSummary.js +3 -3
- package/dist/esm/models/Score.d.ts +47 -0
- package/dist/esm/models/Score.js +53 -0
- package/dist/esm/models/UpdateAccountDto.d.ts +32 -0
- package/dist/esm/models/UpdateAccountDto.js +43 -0
- package/dist/esm/models/UpdateFeatureDto.d.ts +44 -0
- package/dist/esm/models/UpdateFeatureDto.js +45 -0
- package/dist/esm/models/UpdatePlanDto.d.ts +38 -0
- package/dist/esm/models/UpdatePlanDto.js +43 -0
- package/dist/esm/models/UploadUrlFile.d.ts +56 -0
- package/dist/esm/models/UploadUrlFile.js +59 -0
- package/dist/esm/models/UploadUrlResponse.d.ts +3 -3
- package/dist/esm/models/UploadUrlResponse.js +3 -3
- package/dist/esm/models/UpsertOverrideDto.d.ts +44 -0
- package/dist/esm/models/UpsertOverrideDto.js +51 -0
- package/dist/esm/models/UpsertVoteRequest.d.ts +46 -0
- package/dist/esm/models/UpsertVoteRequest.js +54 -0
- package/dist/esm/models/Vote.d.ts +44 -0
- package/dist/esm/models/Vote.js +51 -0
- package/dist/esm/models/VotesResponse.d.ts +33 -0
- package/dist/esm/models/VotesResponse.js +44 -0
- package/dist/esm/models/index.d.ts +19 -5
- package/dist/esm/models/index.js +19 -5
- package/dist/models/ChatRequest.d.ts +1 -1
- package/dist/models/ChatRequest.js +3 -1
- package/dist/models/CreateChatMessages201Response.d.ts +33 -0
- package/dist/models/CreateChatMessages201Response.js +49 -0
- package/dist/models/CreateFeatureDto.d.ts +44 -0
- package/dist/models/CreateFeatureDto.js +56 -0
- package/dist/models/CreateMessagesRequest.d.ts +33 -0
- package/dist/models/CreateMessagesRequest.js +51 -0
- package/dist/models/CreateMessagesRequestMessagesInner.d.ts +68 -0
- package/dist/models/CreateMessagesRequestMessagesInner.js +70 -0
- package/dist/models/CreateMessagesResponse.d.ts +33 -0
- package/dist/models/CreateMessagesResponse.js +51 -0
- package/dist/models/CreatePlanDto.d.ts +38 -0
- package/dist/models/CreatePlanDto.js +54 -0
- package/dist/models/FeatureEntity.d.ts +62 -0
- package/dist/models/FeatureEntity.js +68 -0
- package/dist/models/FeatureOverrideEntity.d.ts +62 -0
- package/dist/models/FeatureOverrideEntity.js +70 -0
- package/dist/models/HealthCheck.d.ts +1 -8
- package/dist/models/HealthCheck.js +0 -7
- package/dist/models/LearningMoment.d.ts +3 -3
- package/dist/models/LearningMoment.js +9 -3
- package/dist/models/LearningStreakResponse.d.ts +2 -2
- package/dist/models/LearningStreakResponse.js +6 -2
- package/dist/models/ListChatVotes200Response.d.ts +33 -0
- package/dist/models/ListChatVotes200Response.js +49 -0
- package/dist/models/Message.d.ts +7 -7
- package/dist/models/Message.js +7 -9
- package/dist/models/MessageAttachment.d.ts +61 -0
- package/dist/models/MessageAttachment.js +69 -0
- package/dist/models/MessagePart.d.ts +38 -0
- package/dist/models/MessagePart.js +50 -0
- package/dist/models/PaginatedMessages.d.ts +1 -1
- package/dist/models/Plan.d.ts +56 -0
- package/dist/models/Plan.js +66 -0
- package/dist/models/QuizQuestion.d.ts +4 -4
- package/dist/models/QuizQuestion.js +12 -4
- package/dist/models/QuizResponse.d.ts +2 -2
- package/dist/models/QuizResponse.js +6 -2
- package/dist/models/QuizSessionSummary.d.ts +3 -3
- package/dist/models/QuizSessionSummary.js +3 -3
- package/dist/models/Score.d.ts +47 -0
- package/dist/models/Score.js +60 -0
- package/dist/models/UpdateAccountDto.d.ts +32 -0
- package/dist/models/UpdateAccountDto.js +50 -0
- package/dist/models/UpdateFeatureDto.d.ts +44 -0
- package/dist/models/UpdateFeatureDto.js +52 -0
- package/dist/models/UpdatePlanDto.d.ts +38 -0
- package/dist/models/UpdatePlanDto.js +50 -0
- package/dist/models/UploadUrlFile.d.ts +56 -0
- package/dist/models/UploadUrlFile.js +66 -0
- package/dist/models/UploadUrlResponse.d.ts +3 -3
- package/dist/models/UploadUrlResponse.js +3 -3
- package/dist/models/UpsertOverrideDto.d.ts +44 -0
- package/dist/models/UpsertOverrideDto.js +58 -0
- package/dist/models/UpsertVoteRequest.d.ts +46 -0
- package/dist/models/UpsertVoteRequest.js +62 -0
- package/dist/models/Vote.d.ts +44 -0
- package/dist/models/Vote.js +58 -0
- package/dist/models/VotesResponse.d.ts +33 -0
- package/dist/models/VotesResponse.js +51 -0
- package/dist/models/index.d.ts +19 -5
- package/dist/models/index.js +19 -5
- package/package.json +1 -1
|
@@ -0,0 +1,195 @@
|
|
|
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 { CreatePlanDtoToJSON, PlanFromJSON, UpdatePlanDtoToJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class PlansApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Create a new plan
|
|
31
|
+
*/
|
|
32
|
+
createPlanRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['createPlanDto'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('createPlanDto', 'Required parameter "createPlanDto" was null or undefined when calling createPlan().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
40
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
41
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
42
|
+
}
|
|
43
|
+
let urlPath = `/api/v1/plans`;
|
|
44
|
+
const response = yield this.request({
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
body: CreatePlanDtoToJSON(requestParameters['createPlanDto']),
|
|
50
|
+
}, initOverrides);
|
|
51
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlanFromJSON(jsonValue));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a new plan
|
|
56
|
+
*/
|
|
57
|
+
createPlan(requestParameters, initOverrides) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const response = yield this.createPlanRaw(requestParameters, initOverrides);
|
|
60
|
+
return yield response.value();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Delete a plan
|
|
65
|
+
*/
|
|
66
|
+
deletePlanRaw(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
if (requestParameters['id'] == null) {
|
|
69
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deletePlan().');
|
|
70
|
+
}
|
|
71
|
+
const queryParameters = {};
|
|
72
|
+
const headerParameters = {};
|
|
73
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
74
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
75
|
+
}
|
|
76
|
+
let urlPath = `/api/v1/plans/{id}`;
|
|
77
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
78
|
+
const response = yield this.request({
|
|
79
|
+
path: urlPath,
|
|
80
|
+
method: 'DELETE',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
return new runtime.VoidApiResponse(response);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Delete a plan
|
|
89
|
+
*/
|
|
90
|
+
deletePlan(requestParameters, initOverrides) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
yield this.deletePlanRaw(requestParameters, initOverrides);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get plan by ID
|
|
97
|
+
*/
|
|
98
|
+
getPlanRaw(requestParameters, initOverrides) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
if (requestParameters['id'] == null) {
|
|
101
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getPlan().');
|
|
102
|
+
}
|
|
103
|
+
const queryParameters = {};
|
|
104
|
+
const headerParameters = {};
|
|
105
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
106
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
107
|
+
}
|
|
108
|
+
let urlPath = `/api/v1/plans/{id}`;
|
|
109
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
110
|
+
const response = yield this.request({
|
|
111
|
+
path: urlPath,
|
|
112
|
+
method: 'GET',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
}, initOverrides);
|
|
116
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlanFromJSON(jsonValue));
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get plan by ID
|
|
121
|
+
*/
|
|
122
|
+
getPlan(requestParameters, initOverrides) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const response = yield this.getPlanRaw(requestParameters, initOverrides);
|
|
125
|
+
return yield response.value();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* List all plans
|
|
130
|
+
*/
|
|
131
|
+
listPlansRaw(initOverrides) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
const queryParameters = {};
|
|
134
|
+
const headerParameters = {};
|
|
135
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
136
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
137
|
+
}
|
|
138
|
+
let urlPath = `/api/v1/plans`;
|
|
139
|
+
const response = yield this.request({
|
|
140
|
+
path: urlPath,
|
|
141
|
+
method: 'GET',
|
|
142
|
+
headers: headerParameters,
|
|
143
|
+
query: queryParameters,
|
|
144
|
+
}, initOverrides);
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PlanFromJSON));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* List all plans
|
|
150
|
+
*/
|
|
151
|
+
listPlans(initOverrides) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const response = yield this.listPlansRaw(initOverrides);
|
|
154
|
+
return yield response.value();
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Update a plan
|
|
159
|
+
*/
|
|
160
|
+
updatePlanRaw(requestParameters, initOverrides) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
if (requestParameters['id'] == null) {
|
|
163
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updatePlan().');
|
|
164
|
+
}
|
|
165
|
+
if (requestParameters['updatePlanDto'] == null) {
|
|
166
|
+
throw new runtime.RequiredError('updatePlanDto', 'Required parameter "updatePlanDto" was null or undefined when calling updatePlan().');
|
|
167
|
+
}
|
|
168
|
+
const queryParameters = {};
|
|
169
|
+
const headerParameters = {};
|
|
170
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
171
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
172
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
173
|
+
}
|
|
174
|
+
let urlPath = `/api/v1/plans/{id}`;
|
|
175
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
176
|
+
const response = yield this.request({
|
|
177
|
+
path: urlPath,
|
|
178
|
+
method: 'PATCH',
|
|
179
|
+
headers: headerParameters,
|
|
180
|
+
query: queryParameters,
|
|
181
|
+
body: UpdatePlanDtoToJSON(requestParameters['updatePlanDto']),
|
|
182
|
+
}, initOverrides);
|
|
183
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlanFromJSON(jsonValue));
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Update a plan
|
|
188
|
+
*/
|
|
189
|
+
updatePlan(requestParameters, initOverrides) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
const response = yield this.updatePlanRaw(requestParameters, initOverrides);
|
|
192
|
+
return yield response.value();
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { QuizResponse, QuizSession, QuizSessionSummary, SubmitQuizResponseRequest, UpdateQuizSessionRequest } from '../models/index';
|
|
14
14
|
export interface CreateQuizSessionRequest {
|
|
15
|
-
xUserId: string;
|
|
16
15
|
quizId: string;
|
|
16
|
+
xUserId: string;
|
|
17
17
|
}
|
|
18
18
|
export interface GetQuizSessionSummaryRequest {
|
|
19
|
-
xUserId: string;
|
|
20
19
|
sessionId: string;
|
|
20
|
+
xUserId: string;
|
|
21
21
|
}
|
|
22
22
|
export interface SubmitQuizResponseOperationRequest {
|
|
23
|
-
xUserId: string;
|
|
24
23
|
sessionId: string;
|
|
24
|
+
xUserId: string;
|
|
25
25
|
submitQuizResponseRequest: SubmitQuizResponseRequest;
|
|
26
26
|
}
|
|
27
27
|
export interface UpdateQuizSessionOperationRequest {
|
|
28
|
-
xUserId: string;
|
|
29
28
|
sessionId: string;
|
|
29
|
+
xUserId: string;
|
|
30
30
|
updateQuizSessionRequest: UpdateQuizSessionRequest;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -32,12 +32,12 @@ export class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
32
32
|
*/
|
|
33
33
|
createQuizSessionRaw(requestParameters, initOverrides) {
|
|
34
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 createQuizSession().');
|
|
37
|
-
}
|
|
38
35
|
if (requestParameters['quizId'] == null) {
|
|
39
36
|
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling createQuizSession().');
|
|
40
37
|
}
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createQuizSession().');
|
|
40
|
+
}
|
|
41
41
|
const queryParameters = {};
|
|
42
42
|
const headerParameters = {};
|
|
43
43
|
if (requestParameters['xUserId'] != null) {
|
|
@@ -73,12 +73,12 @@ export class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
73
73
|
*/
|
|
74
74
|
getQuizSessionSummaryRaw(requestParameters, initOverrides) {
|
|
75
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
if (requestParameters['xUserId'] == null) {
|
|
77
|
-
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getQuizSessionSummary().');
|
|
78
|
-
}
|
|
79
76
|
if (requestParameters['sessionId'] == null) {
|
|
80
77
|
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getQuizSessionSummary().');
|
|
81
78
|
}
|
|
79
|
+
if (requestParameters['xUserId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getQuizSessionSummary().');
|
|
81
|
+
}
|
|
82
82
|
const queryParameters = {};
|
|
83
83
|
const headerParameters = {};
|
|
84
84
|
if (requestParameters['xUserId'] != null) {
|
|
@@ -114,12 +114,12 @@ export class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
114
114
|
*/
|
|
115
115
|
submitQuizResponseRaw(requestParameters, initOverrides) {
|
|
116
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
if (requestParameters['xUserId'] == null) {
|
|
118
|
-
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling submitQuizResponse().');
|
|
119
|
-
}
|
|
120
117
|
if (requestParameters['sessionId'] == null) {
|
|
121
118
|
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling submitQuizResponse().');
|
|
122
119
|
}
|
|
120
|
+
if (requestParameters['xUserId'] == null) {
|
|
121
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling submitQuizResponse().');
|
|
122
|
+
}
|
|
123
123
|
if (requestParameters['submitQuizResponseRequest'] == null) {
|
|
124
124
|
throw new runtime.RequiredError('submitQuizResponseRequest', 'Required parameter "submitQuizResponseRequest" was null or undefined when calling submitQuizResponse().');
|
|
125
125
|
}
|
|
@@ -160,12 +160,12 @@ export class QuizSessionsApi extends runtime.BaseAPI {
|
|
|
160
160
|
*/
|
|
161
161
|
updateQuizSessionRaw(requestParameters, initOverrides) {
|
|
162
162
|
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
-
if (requestParameters['xUserId'] == null) {
|
|
164
|
-
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling updateQuizSession().');
|
|
165
|
-
}
|
|
166
163
|
if (requestParameters['sessionId'] == null) {
|
|
167
164
|
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling updateQuizSession().');
|
|
168
165
|
}
|
|
166
|
+
if (requestParameters['xUserId'] == null) {
|
|
167
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling updateQuizSession().');
|
|
168
|
+
}
|
|
169
169
|
if (requestParameters['updateQuizSessionRequest'] == null) {
|
|
170
170
|
throw new runtime.RequiredError('updateQuizSessionRequest', 'Required parameter "updateQuizSessionRequest" was null or undefined when calling updateQuizSession().');
|
|
171
171
|
}
|
|
@@ -32,12 +32,12 @@ export class QuizzesApi extends runtime.BaseAPI {
|
|
|
32
32
|
*/
|
|
33
33
|
getQuizRaw(requestParameters, initOverrides) {
|
|
34
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 getQuiz().');
|
|
37
|
-
}
|
|
38
35
|
if (requestParameters['quizId'] == null) {
|
|
39
36
|
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling getQuiz().');
|
|
40
37
|
}
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getQuiz().');
|
|
40
|
+
}
|
|
41
41
|
const queryParameters = {};
|
|
42
42
|
const headerParameters = {};
|
|
43
43
|
if (requestParameters['xUserId'] != null) {
|
|
@@ -29,52 +29,42 @@ export interface UpdateServiceTokenRequest {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare class ServiceTokensApi extends runtime.BaseAPI {
|
|
31
31
|
/**
|
|
32
|
-
* Creates a new service token with the specified consumer name, role, and account ID (admin only). The generated token is only shown once.
|
|
33
32
|
* Create a new service token
|
|
34
33
|
*/
|
|
35
34
|
createServiceTokenRaw(requestParameters: CreateServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateTokenResponse>>;
|
|
36
35
|
/**
|
|
37
|
-
* Creates a new service token with the specified consumer name, role, and account ID (admin only). The generated token is only shown once.
|
|
38
36
|
* Create a new service token
|
|
39
37
|
*/
|
|
40
38
|
createServiceToken(requestParameters: CreateServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateTokenResponse>;
|
|
41
39
|
/**
|
|
42
|
-
* Permanently deletes a service token (admin only)
|
|
43
40
|
* Delete service token
|
|
44
41
|
*/
|
|
45
42
|
deleteServiceTokenRaw(requestParameters: DeleteServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
46
43
|
/**
|
|
47
|
-
* Permanently deletes a service token (admin only)
|
|
48
44
|
* Delete service token
|
|
49
45
|
*/
|
|
50
46
|
deleteServiceToken(requestParameters: DeleteServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
51
47
|
/**
|
|
52
|
-
* Retrieves details of a specific service token by its ID (admin only)
|
|
53
48
|
* Get service token by ID
|
|
54
49
|
*/
|
|
55
50
|
getServiceTokenRaw(requestParameters: GetServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceToken>>;
|
|
56
51
|
/**
|
|
57
|
-
* Retrieves details of a specific service token by its ID (admin only)
|
|
58
52
|
* Get service token by ID
|
|
59
53
|
*/
|
|
60
54
|
getServiceToken(requestParameters: GetServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceToken>;
|
|
61
55
|
/**
|
|
62
|
-
* Retrieves a list of all service tokens (admin only)
|
|
63
56
|
* List all service tokens
|
|
64
57
|
*/
|
|
65
58
|
listServiceTokensRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ServiceToken>>>;
|
|
66
59
|
/**
|
|
67
|
-
* Retrieves a list of all service tokens (admin only)
|
|
68
60
|
* List all service tokens
|
|
69
61
|
*/
|
|
70
62
|
listServiceTokens(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ServiceToken>>;
|
|
71
63
|
/**
|
|
72
|
-
* Updates the active status of a service token (admin only)
|
|
73
64
|
* Update service token status
|
|
74
65
|
*/
|
|
75
66
|
updateServiceTokenRaw(requestParameters: UpdateServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateTokenResponse>>;
|
|
76
67
|
/**
|
|
77
|
-
* Updates the active status of a service token (admin only)
|
|
78
68
|
* Update service token status
|
|
79
69
|
*/
|
|
80
70
|
updateServiceToken(requestParameters: UpdateServiceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateTokenResponse>;
|
|
@@ -27,7 +27,6 @@ import { CreateTokenRequestToJSON, CreateTokenResponseFromJSON, ServiceTokenFrom
|
|
|
27
27
|
*/
|
|
28
28
|
export class ServiceTokensApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Creates a new service token with the specified consumer name, role, and account ID (admin only). The generated token is only shown once.
|
|
31
30
|
* Create a new service token
|
|
32
31
|
*/
|
|
33
32
|
createServiceTokenRaw(requestParameters, initOverrides) {
|
|
@@ -53,7 +52,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
|
-
* Creates a new service token with the specified consumer name, role, and account ID (admin only). The generated token is only shown once.
|
|
57
55
|
* Create a new service token
|
|
58
56
|
*/
|
|
59
57
|
createServiceToken(requestParameters, initOverrides) {
|
|
@@ -63,7 +61,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
63
61
|
});
|
|
64
62
|
}
|
|
65
63
|
/**
|
|
66
|
-
* Permanently deletes a service token (admin only)
|
|
67
64
|
* Delete service token
|
|
68
65
|
*/
|
|
69
66
|
deleteServiceTokenRaw(requestParameters, initOverrides) {
|
|
@@ -88,7 +85,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
88
85
|
});
|
|
89
86
|
}
|
|
90
87
|
/**
|
|
91
|
-
* Permanently deletes a service token (admin only)
|
|
92
88
|
* Delete service token
|
|
93
89
|
*/
|
|
94
90
|
deleteServiceToken(requestParameters, initOverrides) {
|
|
@@ -97,7 +93,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
97
93
|
});
|
|
98
94
|
}
|
|
99
95
|
/**
|
|
100
|
-
* Retrieves details of a specific service token by its ID (admin only)
|
|
101
96
|
* Get service token by ID
|
|
102
97
|
*/
|
|
103
98
|
getServiceTokenRaw(requestParameters, initOverrides) {
|
|
@@ -122,7 +117,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
122
117
|
});
|
|
123
118
|
}
|
|
124
119
|
/**
|
|
125
|
-
* Retrieves details of a specific service token by its ID (admin only)
|
|
126
120
|
* Get service token by ID
|
|
127
121
|
*/
|
|
128
122
|
getServiceToken(requestParameters, initOverrides) {
|
|
@@ -132,7 +126,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
132
126
|
});
|
|
133
127
|
}
|
|
134
128
|
/**
|
|
135
|
-
* Retrieves a list of all service tokens (admin only)
|
|
136
129
|
* List all service tokens
|
|
137
130
|
*/
|
|
138
131
|
listServiceTokensRaw(initOverrides) {
|
|
@@ -153,7 +146,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
153
146
|
});
|
|
154
147
|
}
|
|
155
148
|
/**
|
|
156
|
-
* Retrieves a list of all service tokens (admin only)
|
|
157
149
|
* List all service tokens
|
|
158
150
|
*/
|
|
159
151
|
listServiceTokens(initOverrides) {
|
|
@@ -163,7 +155,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
163
155
|
});
|
|
164
156
|
}
|
|
165
157
|
/**
|
|
166
|
-
* Updates the active status of a service token (admin only)
|
|
167
158
|
* Update service token status
|
|
168
159
|
*/
|
|
169
160
|
updateServiceTokenRaw(requestParameters, initOverrides) {
|
|
@@ -193,7 +184,6 @@ export class ServiceTokensApi extends runtime.BaseAPI {
|
|
|
193
184
|
});
|
|
194
185
|
}
|
|
195
186
|
/**
|
|
196
|
-
* Updates the active status of a service token (admin only)
|
|
197
187
|
* Update service token status
|
|
198
188
|
*/
|
|
199
189
|
updateServiceToken(requestParameters, initOverrides) {
|
|
@@ -16,12 +16,10 @@ import type { Tag } from '../models/index';
|
|
|
16
16
|
*/
|
|
17
17
|
export declare class TagsApi extends runtime.BaseAPI {
|
|
18
18
|
/**
|
|
19
|
-
* Retrieves a list of all available tags
|
|
20
19
|
* List all tags
|
|
21
20
|
*/
|
|
22
21
|
listTagsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Tag>>>;
|
|
23
22
|
/**
|
|
24
|
-
* Retrieves a list of all available tags
|
|
25
23
|
* List all tags
|
|
26
24
|
*/
|
|
27
25
|
listTags(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Tag>>;
|
package/dist/esm/apis/TagsApi.js
CHANGED
|
@@ -27,7 +27,6 @@ import { TagFromJSON, } from '../models/index';
|
|
|
27
27
|
*/
|
|
28
28
|
export class TagsApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Retrieves a list of all available tags
|
|
31
30
|
* List all tags
|
|
32
31
|
*/
|
|
33
32
|
listTagsRaw(initOverrides) {
|
|
@@ -45,7 +44,6 @@ export class TagsApi extends runtime.BaseAPI {
|
|
|
45
44
|
});
|
|
46
45
|
}
|
|
47
46
|
/**
|
|
48
|
-
* Retrieves a list of all available tags
|
|
49
47
|
* List all tags
|
|
50
48
|
*/
|
|
51
49
|
listTags(initOverrides) {
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { UpsertVoteRequest, Vote, VotesResponse } from '../models/index';
|
|
14
|
+
export interface ListChatVotesRequest {
|
|
15
|
+
chatId: string;
|
|
16
|
+
xUserId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface UpsertChatVoteRequest {
|
|
19
|
+
chatId: string;
|
|
20
|
+
xUserId: string;
|
|
21
|
+
upsertVoteRequest: UpsertVoteRequest;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class VotesApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
* Returns all votes for the specified chat belonging to the authenticated account user.
|
|
29
|
+
* List votes for a chat
|
|
30
|
+
*/
|
|
31
|
+
listChatVotesRaw(requestParameters: ListChatVotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VotesResponse>>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns all votes for the specified chat belonging to the authenticated account user.
|
|
34
|
+
* List votes for a chat
|
|
35
|
+
*/
|
|
36
|
+
listChatVotes(requestParameters: ListChatVotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VotesResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates or updates a vote on a message in the specified chat. One vote per message is allowed.
|
|
39
|
+
* Create or update a vote
|
|
40
|
+
*/
|
|
41
|
+
upsertChatVoteRaw(requestParameters: UpsertChatVoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Vote>>;
|
|
42
|
+
/**
|
|
43
|
+
* Creates or updates a vote on a message in the specified chat. One vote per message is allowed.
|
|
44
|
+
* Create or update a vote
|
|
45
|
+
*/
|
|
46
|
+
upsertChatVote(requestParameters: UpsertChatVoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Vote>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
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 { UpsertVoteRequestToJSON, VoteFromJSON, VotesResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class VotesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns all votes for the specified chat belonging to the authenticated account user.
|
|
31
|
+
* List votes for a chat
|
|
32
|
+
*/
|
|
33
|
+
listChatVotesRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['chatId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling listChatVotes().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listChatVotes().');
|
|
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/chats/{chatId}/votes`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'GET',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VotesResponseFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns all votes for the specified chat belonging to the authenticated account user.
|
|
62
|
+
* List votes for a chat
|
|
63
|
+
*/
|
|
64
|
+
listChatVotes(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.listChatVotesRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates or updates a vote on a message in the specified chat. One vote per message is allowed.
|
|
72
|
+
* Create or update a vote
|
|
73
|
+
*/
|
|
74
|
+
upsertChatVoteRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['chatId'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling upsertChatVote().');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['xUserId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling upsertChatVote().');
|
|
81
|
+
}
|
|
82
|
+
if (requestParameters['upsertVoteRequest'] == null) {
|
|
83
|
+
throw new runtime.RequiredError('upsertVoteRequest', 'Required parameter "upsertVoteRequest" was null or undefined when calling upsertChatVote().');
|
|
84
|
+
}
|
|
85
|
+
const queryParameters = {};
|
|
86
|
+
const headerParameters = {};
|
|
87
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
88
|
+
if (requestParameters['xUserId'] != null) {
|
|
89
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
90
|
+
}
|
|
91
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
92
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
93
|
+
}
|
|
94
|
+
let urlPath = `/api/v1/chats/{chatId}/votes`;
|
|
95
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
96
|
+
const response = yield this.request({
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'PATCH',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
body: UpsertVoteRequestToJSON(requestParameters['upsertVoteRequest']),
|
|
102
|
+
}, initOverrides);
|
|
103
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VoteFromJSON(jsonValue));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Creates or updates a vote on a message in the specified chat. One vote per message is allowed.
|
|
108
|
+
* Create or update a vote
|
|
109
|
+
*/
|
|
110
|
+
upsertChatVote(requestParameters, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const response = yield this.upsertChatVoteRaw(requestParameters, initOverrides);
|
|
113
|
+
return yield response.value();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
export * from './AccountsApi';
|
|
2
2
|
export * from './ChatsApi';
|
|
3
|
+
export * from './FeatureOverridesApi';
|
|
4
|
+
export * from './FeaturesApi';
|
|
3
5
|
export * from './FilesApi';
|
|
4
6
|
export * from './HealthApi';
|
|
5
7
|
export * from './LearningDaysApi';
|
|
6
8
|
export * from './LearningMomentsApi';
|
|
7
9
|
export * from './LearningStreakApi';
|
|
8
10
|
export * from './MessagesApi';
|
|
11
|
+
export * from './PlansApi';
|
|
9
12
|
export * from './QuizSessionsApi';
|
|
10
13
|
export * from './QuizzesApi';
|
|
11
14
|
export * from './ServiceTokensApi';
|
|
12
15
|
export * from './TagsApi';
|
|
16
|
+
export * from './VotesApi';
|