@instructure/athena-api-client 2.5.0 → 2.7.0
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 +14 -0
- package/dist/apis/TaxonomiesApi.d.ts +62 -0
- package/dist/apis/TaxonomiesApi.js +147 -0
- package/dist/apis/TaxonomyEnrollmentsApi.d.ts +59 -0
- package/dist/apis/TaxonomyEnrollmentsApi.js +152 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/TaxonomiesApi.d.ts +62 -0
- package/dist/esm/apis/TaxonomiesApi.js +143 -0
- package/dist/esm/apis/TaxonomyEnrollmentsApi.d.ts +59 -0
- package/dist/esm/apis/TaxonomyEnrollmentsApi.js +148 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/EnrollmentTaxonomy.d.ts +58 -0
- package/dist/esm/models/EnrollmentTaxonomy.js +62 -0
- package/dist/esm/models/PaginatedTaxonomies.d.ts +39 -0
- package/dist/esm/models/PaginatedTaxonomies.js +48 -0
- package/dist/esm/models/TaxonomyDetail.d.ts +89 -0
- package/dist/esm/models/TaxonomyDetail.js +83 -0
- package/dist/esm/models/TaxonomyEnrollment.d.ts +64 -0
- package/dist/esm/models/TaxonomyEnrollment.js +66 -0
- package/dist/esm/models/TaxonomyEnrollmentWithTaxonomy.d.ts +71 -0
- package/dist/esm/models/TaxonomyEnrollmentWithTaxonomy.js +71 -0
- package/dist/esm/models/TaxonomyNode.d.ts +63 -0
- package/dist/esm/models/TaxonomyNode.js +64 -0
- package/dist/esm/models/TaxonomyNodeConcept.d.ts +32 -0
- package/dist/esm/models/TaxonomyNodeConcept.js +43 -0
- package/dist/esm/models/TaxonomySummary.d.ts +70 -0
- package/dist/esm/models/TaxonomySummary.js +70 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/EnrollmentTaxonomy.d.ts +58 -0
- package/dist/models/EnrollmentTaxonomy.js +70 -0
- package/dist/models/PaginatedTaxonomies.d.ts +39 -0
- package/dist/models/PaginatedTaxonomies.js +55 -0
- package/dist/models/TaxonomyDetail.d.ts +89 -0
- package/dist/models/TaxonomyDetail.js +91 -0
- package/dist/models/TaxonomyEnrollment.d.ts +64 -0
- package/dist/models/TaxonomyEnrollment.js +74 -0
- package/dist/models/TaxonomyEnrollmentWithTaxonomy.d.ts +71 -0
- package/dist/models/TaxonomyEnrollmentWithTaxonomy.js +79 -0
- package/dist/models/TaxonomyNode.d.ts +63 -0
- package/dist/models/TaxonomyNode.js +71 -0
- package/dist/models/TaxonomyNodeConcept.d.ts +32 -0
- package/dist/models/TaxonomyNodeConcept.js +50 -0
- package/dist/models/TaxonomySummary.d.ts +70 -0
- package/dist/models/TaxonomySummary.js +78 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,6 +113,12 @@ All URIs are relative to *http://localhost:3000*
|
|
|
113
113
|
*ServiceTokensApi* | [**listServiceTokens**](docs/ServiceTokensApi.md#listservicetokens) | **GET** /api/v1/tokens | List all service tokens
|
|
114
114
|
*ServiceTokensApi* | [**updateServiceToken**](docs/ServiceTokensApi.md#updateservicetoken) | **PATCH** /api/v1/tokens/{id} | Update service token status
|
|
115
115
|
*TagsApi* | [**listTags**](docs/TagsApi.md#listtags) | **GET** /api/v1/tags | List all tags
|
|
116
|
+
*TaxonomiesApi* | [**getTaxonomy**](docs/TaxonomiesApi.md#gettaxonomy) | **GET** /api/v1/taxonomies/{id} | Get taxonomy by ID with full tree
|
|
117
|
+
*TaxonomiesApi* | [**getTaxonomyBySlug**](docs/TaxonomiesApi.md#gettaxonomybyslug) | **GET** /api/v1/taxonomies/by-slug/{slug} | Get taxonomy by slug
|
|
118
|
+
*TaxonomiesApi* | [**listTaxonomies**](docs/TaxonomiesApi.md#listtaxonomies) | **GET** /api/v1/taxonomies | List available taxonomies
|
|
119
|
+
*TaxonomyEnrollmentsApi* | [**enrollInTaxonomy**](docs/TaxonomyEnrollmentsApi.md#enrollintaxonomy) | **POST** /api/v1/taxonomies/{id}/enroll | Enroll in a taxonomy
|
|
120
|
+
*TaxonomyEnrollmentsApi* | [**listMyEnrollments**](docs/TaxonomyEnrollmentsApi.md#listmyenrollments) | **GET** /api/v1/taxonomies/enrollments | List current user\'s active enrollments
|
|
121
|
+
*TaxonomyEnrollmentsApi* | [**unenrollFromTaxonomy**](docs/TaxonomyEnrollmentsApi.md#unenrollfromtaxonomy) | **DELETE** /api/v1/taxonomies/{id}/enroll | Unenroll from a taxonomy
|
|
116
122
|
*UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
|
|
117
123
|
*UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
|
|
118
124
|
*VotesApi* | [**listChatVotes**](docs/VotesApi.md#listchatvotes) | **GET** /api/v1/chats/{chatId}/votes | List votes for a chat
|
|
@@ -151,6 +157,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
151
157
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
152
158
|
- [CreateTokenResponse](docs/CreateTokenResponse.md)
|
|
153
159
|
- [DailyQuizStatus](docs/DailyQuizStatus.md)
|
|
160
|
+
- [EnrollmentTaxonomy](docs/EnrollmentTaxonomy.md)
|
|
154
161
|
- [FeatureEntity](docs/FeatureEntity.md)
|
|
155
162
|
- [FeatureOverrideEntity](docs/FeatureOverrideEntity.md)
|
|
156
163
|
- [HealthCheck](docs/HealthCheck.md)
|
|
@@ -165,6 +172,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
165
172
|
- [PaginatedChats](docs/PaginatedChats.md)
|
|
166
173
|
- [PaginatedLearningMoments](docs/PaginatedLearningMoments.md)
|
|
167
174
|
- [PaginatedMessages](docs/PaginatedMessages.md)
|
|
175
|
+
- [PaginatedTaxonomies](docs/PaginatedTaxonomies.md)
|
|
168
176
|
- [Plan](docs/Plan.md)
|
|
169
177
|
- [Quiz](docs/Quiz.md)
|
|
170
178
|
- [QuizQuestion](docs/QuizQuestion.md)
|
|
@@ -177,6 +185,12 @@ All URIs are relative to *http://localhost:3000*
|
|
|
177
185
|
- [ServiceToken](docs/ServiceToken.md)
|
|
178
186
|
- [SubmitQuizResponseRequest](docs/SubmitQuizResponseRequest.md)
|
|
179
187
|
- [Tag](docs/Tag.md)
|
|
188
|
+
- [TaxonomyDetail](docs/TaxonomyDetail.md)
|
|
189
|
+
- [TaxonomyEnrollment](docs/TaxonomyEnrollment.md)
|
|
190
|
+
- [TaxonomyEnrollmentWithTaxonomy](docs/TaxonomyEnrollmentWithTaxonomy.md)
|
|
191
|
+
- [TaxonomyNode](docs/TaxonomyNode.md)
|
|
192
|
+
- [TaxonomyNodeConcept](docs/TaxonomyNodeConcept.md)
|
|
193
|
+
- [TaxonomySummary](docs/TaxonomySummary.md)
|
|
180
194
|
- [UpdateAccountDto](docs/UpdateAccountDto.md)
|
|
181
195
|
- [UpdateChatRequest](docs/UpdateChatRequest.md)
|
|
182
196
|
- [UpdateFeatureDto](docs/UpdateFeatureDto.md)
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { PaginatedTaxonomies, TaxonomyDetail } from '../models/index';
|
|
14
|
+
export interface GetTaxonomyRequest {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetTaxonomyBySlugRequest {
|
|
18
|
+
slug: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListTaxonomiesRequest {
|
|
21
|
+
accountId?: string;
|
|
22
|
+
status?: ListTaxonomiesStatusEnum;
|
|
23
|
+
limit?: number;
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class TaxonomiesApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Get taxonomy by ID with full tree
|
|
32
|
+
*/
|
|
33
|
+
getTaxonomyRaw(requestParameters: GetTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaxonomyDetail>>;
|
|
34
|
+
/**
|
|
35
|
+
* Get taxonomy by ID with full tree
|
|
36
|
+
*/
|
|
37
|
+
getTaxonomy(requestParameters: GetTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaxonomyDetail>;
|
|
38
|
+
/**
|
|
39
|
+
* Get taxonomy by slug
|
|
40
|
+
*/
|
|
41
|
+
getTaxonomyBySlugRaw(requestParameters: GetTaxonomyBySlugRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaxonomyDetail>>;
|
|
42
|
+
/**
|
|
43
|
+
* Get taxonomy by slug
|
|
44
|
+
*/
|
|
45
|
+
getTaxonomyBySlug(requestParameters: GetTaxonomyBySlugRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaxonomyDetail>;
|
|
46
|
+
/**
|
|
47
|
+
* List available taxonomies
|
|
48
|
+
*/
|
|
49
|
+
listTaxonomiesRaw(requestParameters: ListTaxonomiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTaxonomies>>;
|
|
50
|
+
/**
|
|
51
|
+
* List available taxonomies
|
|
52
|
+
*/
|
|
53
|
+
listTaxonomies(requestParameters?: ListTaxonomiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTaxonomies>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const ListTaxonomiesStatusEnum: {
|
|
59
|
+
readonly Draft: "draft";
|
|
60
|
+
readonly Active: "active";
|
|
61
|
+
};
|
|
62
|
+
export type ListTaxonomiesStatusEnum = typeof ListTaxonomiesStatusEnum[keyof typeof ListTaxonomiesStatusEnum];
|
|
@@ -0,0 +1,147 @@
|
|
|
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.ListTaxonomiesStatusEnum = exports.TaxonomiesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class TaxonomiesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get taxonomy by ID with full tree
|
|
34
|
+
*/
|
|
35
|
+
getTaxonomyRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['id'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getTaxonomy().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
43
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
44
|
+
}
|
|
45
|
+
let urlPath = `/api/v1/taxonomies/{id}`;
|
|
46
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: urlPath,
|
|
49
|
+
method: 'GET',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TaxonomyDetailFromJSON)(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get taxonomy by ID with full tree
|
|
58
|
+
*/
|
|
59
|
+
getTaxonomy(requestParameters, initOverrides) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const response = yield this.getTaxonomyRaw(requestParameters, initOverrides);
|
|
62
|
+
return yield response.value();
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get taxonomy by slug
|
|
67
|
+
*/
|
|
68
|
+
getTaxonomyBySlugRaw(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (requestParameters['slug'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getTaxonomyBySlug().');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
76
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
77
|
+
}
|
|
78
|
+
let urlPath = `/api/v1/taxonomies/by-slug/{slug}`;
|
|
79
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
80
|
+
const response = yield this.request({
|
|
81
|
+
path: urlPath,
|
|
82
|
+
method: 'GET',
|
|
83
|
+
headers: headerParameters,
|
|
84
|
+
query: queryParameters,
|
|
85
|
+
}, initOverrides);
|
|
86
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TaxonomyDetailFromJSON)(jsonValue));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get taxonomy by slug
|
|
91
|
+
*/
|
|
92
|
+
getTaxonomyBySlug(requestParameters, initOverrides) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const response = yield this.getTaxonomyBySlugRaw(requestParameters, initOverrides);
|
|
95
|
+
return yield response.value();
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* List available taxonomies
|
|
100
|
+
*/
|
|
101
|
+
listTaxonomiesRaw(requestParameters, initOverrides) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const queryParameters = {};
|
|
104
|
+
if (requestParameters['accountId'] != null) {
|
|
105
|
+
queryParameters['accountId'] = requestParameters['accountId'];
|
|
106
|
+
}
|
|
107
|
+
if (requestParameters['status'] != null) {
|
|
108
|
+
queryParameters['status'] = requestParameters['status'];
|
|
109
|
+
}
|
|
110
|
+
if (requestParameters['limit'] != null) {
|
|
111
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
112
|
+
}
|
|
113
|
+
if (requestParameters['offset'] != null) {
|
|
114
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
115
|
+
}
|
|
116
|
+
const headerParameters = {};
|
|
117
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
118
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
119
|
+
}
|
|
120
|
+
let urlPath = `/api/v1/taxonomies`;
|
|
121
|
+
const response = yield this.request({
|
|
122
|
+
path: urlPath,
|
|
123
|
+
method: 'GET',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
}, initOverrides);
|
|
127
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedTaxonomiesFromJSON)(jsonValue));
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* List available taxonomies
|
|
132
|
+
*/
|
|
133
|
+
listTaxonomies() {
|
|
134
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
135
|
+
const response = yield this.listTaxonomiesRaw(requestParameters, initOverrides);
|
|
136
|
+
return yield response.value();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.TaxonomiesApi = TaxonomiesApi;
|
|
141
|
+
/**
|
|
142
|
+
* @export
|
|
143
|
+
*/
|
|
144
|
+
exports.ListTaxonomiesStatusEnum = {
|
|
145
|
+
Draft: 'draft',
|
|
146
|
+
Active: 'active'
|
|
147
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { TaxonomyEnrollment, TaxonomyEnrollmentWithTaxonomy } from '../models/index';
|
|
14
|
+
export interface EnrollInTaxonomyRequest {
|
|
15
|
+
id: string;
|
|
16
|
+
xUserId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ListMyEnrollmentsRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface UnenrollFromTaxonomyRequest {
|
|
22
|
+
id: string;
|
|
23
|
+
xUserId: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare class TaxonomyEnrollmentsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Enroll the current user in a taxonomy. Idempotent — re-enrolling a paused enrollment reactivates it.
|
|
31
|
+
* Enroll in a taxonomy
|
|
32
|
+
*/
|
|
33
|
+
enrollInTaxonomyRaw(requestParameters: EnrollInTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaxonomyEnrollment>>;
|
|
34
|
+
/**
|
|
35
|
+
* Enroll the current user in a taxonomy. Idempotent — re-enrolling a paused enrollment reactivates it.
|
|
36
|
+
* Enroll in a taxonomy
|
|
37
|
+
*/
|
|
38
|
+
enrollInTaxonomy(requestParameters: EnrollInTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaxonomyEnrollment>;
|
|
39
|
+
/**
|
|
40
|
+
* Returns active enrollment records with taxonomy metadata.
|
|
41
|
+
* List current user\'s active enrollments
|
|
42
|
+
*/
|
|
43
|
+
listMyEnrollmentsRaw(requestParameters: ListMyEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TaxonomyEnrollmentWithTaxonomy>>>;
|
|
44
|
+
/**
|
|
45
|
+
* Returns active enrollment records with taxonomy metadata.
|
|
46
|
+
* List current user\'s active enrollments
|
|
47
|
+
*/
|
|
48
|
+
listMyEnrollments(requestParameters: ListMyEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TaxonomyEnrollmentWithTaxonomy>>;
|
|
49
|
+
/**
|
|
50
|
+
* Sets enrollment status to paused. Does not delete the enrollment record.
|
|
51
|
+
* Unenroll from a taxonomy
|
|
52
|
+
*/
|
|
53
|
+
unenrollFromTaxonomyRaw(requestParameters: UnenrollFromTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaxonomyEnrollment>>;
|
|
54
|
+
/**
|
|
55
|
+
* Sets enrollment status to paused. Does not delete the enrollment record.
|
|
56
|
+
* Unenroll from a taxonomy
|
|
57
|
+
*/
|
|
58
|
+
unenrollFromTaxonomy(requestParameters: UnenrollFromTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaxonomyEnrollment>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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.TaxonomyEnrollmentsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class TaxonomyEnrollmentsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Enroll the current user in a taxonomy. Idempotent — re-enrolling a paused enrollment reactivates it.
|
|
34
|
+
* Enroll in a taxonomy
|
|
35
|
+
*/
|
|
36
|
+
enrollInTaxonomyRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['id'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling enrollInTaxonomy().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['xUserId'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling enrollInTaxonomy().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (requestParameters['xUserId'] != null) {
|
|
47
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
48
|
+
}
|
|
49
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
50
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/api/v1/taxonomies/{id}/enroll`;
|
|
53
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
54
|
+
const response = yield this.request({
|
|
55
|
+
path: urlPath,
|
|
56
|
+
method: 'POST',
|
|
57
|
+
headers: headerParameters,
|
|
58
|
+
query: queryParameters,
|
|
59
|
+
}, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TaxonomyEnrollmentFromJSON)(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Enroll the current user in a taxonomy. Idempotent — re-enrolling a paused enrollment reactivates it.
|
|
65
|
+
* Enroll in a taxonomy
|
|
66
|
+
*/
|
|
67
|
+
enrollInTaxonomy(requestParameters, initOverrides) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const response = yield this.enrollInTaxonomyRaw(requestParameters, initOverrides);
|
|
70
|
+
return yield response.value();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns active enrollment records with taxonomy metadata.
|
|
75
|
+
* List current user\'s active enrollments
|
|
76
|
+
*/
|
|
77
|
+
listMyEnrollmentsRaw(requestParameters, initOverrides) {
|
|
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 listMyEnrollments().');
|
|
81
|
+
}
|
|
82
|
+
const queryParameters = {};
|
|
83
|
+
const headerParameters = {};
|
|
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/taxonomies/enrollments`;
|
|
91
|
+
const response = yield this.request({
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'GET',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
}, initOverrides);
|
|
97
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.TaxonomyEnrollmentWithTaxonomyFromJSON));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Returns active enrollment records with taxonomy metadata.
|
|
102
|
+
* List current user\'s active enrollments
|
|
103
|
+
*/
|
|
104
|
+
listMyEnrollments(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.listMyEnrollmentsRaw(requestParameters, initOverrides);
|
|
107
|
+
return yield response.value();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Sets enrollment status to paused. Does not delete the enrollment record.
|
|
112
|
+
* Unenroll from a taxonomy
|
|
113
|
+
*/
|
|
114
|
+
unenrollFromTaxonomyRaw(requestParameters, initOverrides) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
if (requestParameters['id'] == null) {
|
|
117
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling unenrollFromTaxonomy().');
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['xUserId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling unenrollFromTaxonomy().');
|
|
121
|
+
}
|
|
122
|
+
const queryParameters = {};
|
|
123
|
+
const headerParameters = {};
|
|
124
|
+
if (requestParameters['xUserId'] != null) {
|
|
125
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
126
|
+
}
|
|
127
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
128
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
129
|
+
}
|
|
130
|
+
let urlPath = `/api/v1/taxonomies/{id}/enroll`;
|
|
131
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
132
|
+
const response = yield this.request({
|
|
133
|
+
path: urlPath,
|
|
134
|
+
method: 'DELETE',
|
|
135
|
+
headers: headerParameters,
|
|
136
|
+
query: queryParameters,
|
|
137
|
+
}, initOverrides);
|
|
138
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TaxonomyEnrollmentFromJSON)(jsonValue));
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Sets enrollment status to paused. Does not delete the enrollment record.
|
|
143
|
+
* Unenroll from a taxonomy
|
|
144
|
+
*/
|
|
145
|
+
unenrollFromTaxonomy(requestParameters, initOverrides) {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
const response = yield this.unenrollFromTaxonomyRaw(requestParameters, initOverrides);
|
|
148
|
+
return yield response.value();
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
exports.TaxonomyEnrollmentsApi = TaxonomyEnrollmentsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -16,5 +16,7 @@ export * from './QuizSessionsApi';
|
|
|
16
16
|
export * from './QuizzesApi';
|
|
17
17
|
export * from './ServiceTokensApi';
|
|
18
18
|
export * from './TagsApi';
|
|
19
|
+
export * from './TaxonomiesApi';
|
|
20
|
+
export * from './TaxonomyEnrollmentsApi';
|
|
19
21
|
export * from './UserContextApi';
|
|
20
22
|
export * from './VotesApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -34,5 +34,7 @@ __exportStar(require("./QuizSessionsApi"), exports);
|
|
|
34
34
|
__exportStar(require("./QuizzesApi"), exports);
|
|
35
35
|
__exportStar(require("./ServiceTokensApi"), exports);
|
|
36
36
|
__exportStar(require("./TagsApi"), exports);
|
|
37
|
+
__exportStar(require("./TaxonomiesApi"), exports);
|
|
38
|
+
__exportStar(require("./TaxonomyEnrollmentsApi"), exports);
|
|
37
39
|
__exportStar(require("./UserContextApi"), exports);
|
|
38
40
|
__exportStar(require("./VotesApi"), exports);
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { PaginatedTaxonomies, TaxonomyDetail } from '../models/index';
|
|
14
|
+
export interface GetTaxonomyRequest {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetTaxonomyBySlugRequest {
|
|
18
|
+
slug: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListTaxonomiesRequest {
|
|
21
|
+
accountId?: string;
|
|
22
|
+
status?: ListTaxonomiesStatusEnum;
|
|
23
|
+
limit?: number;
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class TaxonomiesApi extends runtime.BaseAPI {
|
|
30
|
+
/**
|
|
31
|
+
* Get taxonomy by ID with full tree
|
|
32
|
+
*/
|
|
33
|
+
getTaxonomyRaw(requestParameters: GetTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaxonomyDetail>>;
|
|
34
|
+
/**
|
|
35
|
+
* Get taxonomy by ID with full tree
|
|
36
|
+
*/
|
|
37
|
+
getTaxonomy(requestParameters: GetTaxonomyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaxonomyDetail>;
|
|
38
|
+
/**
|
|
39
|
+
* Get taxonomy by slug
|
|
40
|
+
*/
|
|
41
|
+
getTaxonomyBySlugRaw(requestParameters: GetTaxonomyBySlugRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TaxonomyDetail>>;
|
|
42
|
+
/**
|
|
43
|
+
* Get taxonomy by slug
|
|
44
|
+
*/
|
|
45
|
+
getTaxonomyBySlug(requestParameters: GetTaxonomyBySlugRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TaxonomyDetail>;
|
|
46
|
+
/**
|
|
47
|
+
* List available taxonomies
|
|
48
|
+
*/
|
|
49
|
+
listTaxonomiesRaw(requestParameters: ListTaxonomiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedTaxonomies>>;
|
|
50
|
+
/**
|
|
51
|
+
* List available taxonomies
|
|
52
|
+
*/
|
|
53
|
+
listTaxonomies(requestParameters?: ListTaxonomiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedTaxonomies>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const ListTaxonomiesStatusEnum: {
|
|
59
|
+
readonly Draft: "draft";
|
|
60
|
+
readonly Active: "active";
|
|
61
|
+
};
|
|
62
|
+
export type ListTaxonomiesStatusEnum = typeof ListTaxonomiesStatusEnum[keyof typeof ListTaxonomiesStatusEnum];
|