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