@instructure/athena-api-client 2.6.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/apis/TaxonomiesApi.d.ts +0 -1
- package/dist/apis/TaxonomiesApi.js +0 -3
- package/dist/apis/TaxonomyEnrollmentsApi.d.ts +59 -0
- package/dist/apis/TaxonomyEnrollmentsApi.js +152 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/TaxonomiesApi.d.ts +0 -1
- package/dist/esm/apis/TaxonomiesApi.js +0 -3
- package/dist/esm/apis/TaxonomyEnrollmentsApi.d.ts +59 -0
- package/dist/esm/apis/TaxonomyEnrollmentsApi.js +148 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/EnrollmentTaxonomy.d.ts +58 -0
- package/dist/esm/models/EnrollmentTaxonomy.js +62 -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/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/EnrollmentTaxonomy.d.ts +58 -0
- package/dist/models/EnrollmentTaxonomy.js +70 -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/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,6 +116,9 @@ All URIs are relative to *http://localhost:3000*
|
|
|
116
116
|
*TaxonomiesApi* | [**getTaxonomy**](docs/TaxonomiesApi.md#gettaxonomy) | **GET** /api/v1/taxonomies/{id} | Get taxonomy by ID with full tree
|
|
117
117
|
*TaxonomiesApi* | [**getTaxonomyBySlug**](docs/TaxonomiesApi.md#gettaxonomybyslug) | **GET** /api/v1/taxonomies/by-slug/{slug} | Get taxonomy by slug
|
|
118
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
|
|
119
122
|
*UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
|
|
120
123
|
*UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
|
|
121
124
|
*VotesApi* | [**listChatVotes**](docs/VotesApi.md#listchatvotes) | **GET** /api/v1/chats/{chatId}/votes | List votes for a chat
|
|
@@ -154,6 +157,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
154
157
|
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
155
158
|
- [CreateTokenResponse](docs/CreateTokenResponse.md)
|
|
156
159
|
- [DailyQuizStatus](docs/DailyQuizStatus.md)
|
|
160
|
+
- [EnrollmentTaxonomy](docs/EnrollmentTaxonomy.md)
|
|
157
161
|
- [FeatureEntity](docs/FeatureEntity.md)
|
|
158
162
|
- [FeatureOverrideEntity](docs/FeatureOverrideEntity.md)
|
|
159
163
|
- [HealthCheck](docs/HealthCheck.md)
|
|
@@ -182,6 +186,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
182
186
|
- [SubmitQuizResponseRequest](docs/SubmitQuizResponseRequest.md)
|
|
183
187
|
- [Tag](docs/Tag.md)
|
|
184
188
|
- [TaxonomyDetail](docs/TaxonomyDetail.md)
|
|
189
|
+
- [TaxonomyEnrollment](docs/TaxonomyEnrollment.md)
|
|
190
|
+
- [TaxonomyEnrollmentWithTaxonomy](docs/TaxonomyEnrollmentWithTaxonomy.md)
|
|
185
191
|
- [TaxonomyNode](docs/TaxonomyNode.md)
|
|
186
192
|
- [TaxonomyNodeConcept](docs/TaxonomyNodeConcept.md)
|
|
187
193
|
- [TaxonomySummary](docs/TaxonomySummary.md)
|
|
@@ -101,9 +101,6 @@ class TaxonomiesApi extends runtime.BaseAPI {
|
|
|
101
101
|
listTaxonomiesRaw(requestParameters, initOverrides) {
|
|
102
102
|
return __awaiter(this, void 0, void 0, function* () {
|
|
103
103
|
const queryParameters = {};
|
|
104
|
-
if (requestParameters['accountId'] != null) {
|
|
105
|
-
queryParameters['accountId'] = requestParameters['accountId'];
|
|
106
|
-
}
|
|
107
104
|
if (requestParameters['status'] != null) {
|
|
108
105
|
queryParameters['status'] = requestParameters['status'];
|
|
109
106
|
}
|
|
@@ -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
package/dist/apis/index.js
CHANGED
|
@@ -35,5 +35,6 @@ __exportStar(require("./QuizzesApi"), exports);
|
|
|
35
35
|
__exportStar(require("./ServiceTokensApi"), exports);
|
|
36
36
|
__exportStar(require("./TagsApi"), exports);
|
|
37
37
|
__exportStar(require("./TaxonomiesApi"), exports);
|
|
38
|
+
__exportStar(require("./TaxonomyEnrollmentsApi"), exports);
|
|
38
39
|
__exportStar(require("./UserContextApi"), exports);
|
|
39
40
|
__exportStar(require("./VotesApi"), exports);
|
|
@@ -98,9 +98,6 @@ export class TaxonomiesApi extends runtime.BaseAPI {
|
|
|
98
98
|
listTaxonomiesRaw(requestParameters, initOverrides) {
|
|
99
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
100
|
const queryParameters = {};
|
|
101
|
-
if (requestParameters['accountId'] != null) {
|
|
102
|
-
queryParameters['accountId'] = requestParameters['accountId'];
|
|
103
|
-
}
|
|
104
101
|
if (requestParameters['status'] != null) {
|
|
105
102
|
queryParameters['status'] = requestParameters['status'];
|
|
106
103
|
}
|
|
@@ -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,148 @@
|
|
|
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 { TaxonomyEnrollmentFromJSON, TaxonomyEnrollmentWithTaxonomyFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export 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, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['id'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling enrollInTaxonomy().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling enrollInTaxonomy().');
|
|
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/taxonomies/{id}/enroll`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TaxonomyEnrollmentFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Enroll the current user in a taxonomy. Idempotent — re-enrolling a paused enrollment reactivates it.
|
|
62
|
+
* Enroll in a taxonomy
|
|
63
|
+
*/
|
|
64
|
+
enrollInTaxonomy(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.enrollInTaxonomyRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns active enrollment records with taxonomy metadata.
|
|
72
|
+
* List current user\'s active enrollments
|
|
73
|
+
*/
|
|
74
|
+
listMyEnrollmentsRaw(requestParameters, initOverrides) {
|
|
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 listMyEnrollments().');
|
|
78
|
+
}
|
|
79
|
+
const queryParameters = {};
|
|
80
|
+
const headerParameters = {};
|
|
81
|
+
if (requestParameters['xUserId'] != null) {
|
|
82
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
83
|
+
}
|
|
84
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
85
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
86
|
+
}
|
|
87
|
+
let urlPath = `/api/v1/taxonomies/enrollments`;
|
|
88
|
+
const response = yield this.request({
|
|
89
|
+
path: urlPath,
|
|
90
|
+
method: 'GET',
|
|
91
|
+
headers: headerParameters,
|
|
92
|
+
query: queryParameters,
|
|
93
|
+
}, initOverrides);
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TaxonomyEnrollmentWithTaxonomyFromJSON));
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns active enrollment records with taxonomy metadata.
|
|
99
|
+
* List current user\'s active enrollments
|
|
100
|
+
*/
|
|
101
|
+
listMyEnrollments(requestParameters, initOverrides) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const response = yield this.listMyEnrollmentsRaw(requestParameters, initOverrides);
|
|
104
|
+
return yield response.value();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Sets enrollment status to paused. Does not delete the enrollment record.
|
|
109
|
+
* Unenroll from a taxonomy
|
|
110
|
+
*/
|
|
111
|
+
unenrollFromTaxonomyRaw(requestParameters, initOverrides) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
if (requestParameters['id'] == null) {
|
|
114
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling unenrollFromTaxonomy().');
|
|
115
|
+
}
|
|
116
|
+
if (requestParameters['xUserId'] == null) {
|
|
117
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling unenrollFromTaxonomy().');
|
|
118
|
+
}
|
|
119
|
+
const queryParameters = {};
|
|
120
|
+
const headerParameters = {};
|
|
121
|
+
if (requestParameters['xUserId'] != null) {
|
|
122
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
123
|
+
}
|
|
124
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
125
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
126
|
+
}
|
|
127
|
+
let urlPath = `/api/v1/taxonomies/{id}/enroll`;
|
|
128
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
129
|
+
const response = yield this.request({
|
|
130
|
+
path: urlPath,
|
|
131
|
+
method: 'DELETE',
|
|
132
|
+
headers: headerParameters,
|
|
133
|
+
query: queryParameters,
|
|
134
|
+
}, initOverrides);
|
|
135
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TaxonomyEnrollmentFromJSON(jsonValue));
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Sets enrollment status to paused. Does not delete the enrollment record.
|
|
140
|
+
* Unenroll from a taxonomy
|
|
141
|
+
*/
|
|
142
|
+
unenrollFromTaxonomy(requestParameters, initOverrides) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const response = yield this.unenrollFromTaxonomyRaw(requestParameters, initOverrides);
|
|
145
|
+
return yield response.value();
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EnrollmentTaxonomy
|
|
16
|
+
*/
|
|
17
|
+
export interface EnrollmentTaxonomy {
|
|
18
|
+
/**
|
|
19
|
+
* Taxonomy ID
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EnrollmentTaxonomy
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Taxonomy slug
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EnrollmentTaxonomy
|
|
28
|
+
*/
|
|
29
|
+
slug: string;
|
|
30
|
+
/**
|
|
31
|
+
* Taxonomy name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof EnrollmentTaxonomy
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Taxonomy status
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof EnrollmentTaxonomy
|
|
40
|
+
*/
|
|
41
|
+
status: EnrollmentTaxonomyStatusEnum;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export declare const EnrollmentTaxonomyStatusEnum: {
|
|
47
|
+
readonly Draft: "draft";
|
|
48
|
+
readonly Active: "active";
|
|
49
|
+
};
|
|
50
|
+
export type EnrollmentTaxonomyStatusEnum = typeof EnrollmentTaxonomyStatusEnum[keyof typeof EnrollmentTaxonomyStatusEnum];
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the EnrollmentTaxonomy interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfEnrollmentTaxonomy(value: object): value is EnrollmentTaxonomy;
|
|
55
|
+
export declare function EnrollmentTaxonomyFromJSON(json: any): EnrollmentTaxonomy;
|
|
56
|
+
export declare function EnrollmentTaxonomyFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrollmentTaxonomy;
|
|
57
|
+
export declare function EnrollmentTaxonomyToJSON(json: any): EnrollmentTaxonomy;
|
|
58
|
+
export declare function EnrollmentTaxonomyToJSONTyped(value?: EnrollmentTaxonomy | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const EnrollmentTaxonomyStatusEnum = {
|
|
18
|
+
Draft: 'draft',
|
|
19
|
+
Active: 'active'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the EnrollmentTaxonomy interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfEnrollmentTaxonomy(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('slug' in value) || value['slug'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export function EnrollmentTaxonomyFromJSON(json) {
|
|
36
|
+
return EnrollmentTaxonomyFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function EnrollmentTaxonomyFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'slug': json['slug'],
|
|
45
|
+
'name': json['name'],
|
|
46
|
+
'status': json['status'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function EnrollmentTaxonomyToJSON(json) {
|
|
50
|
+
return EnrollmentTaxonomyToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
export function EnrollmentTaxonomyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'id': value['id'],
|
|
58
|
+
'slug': value['slug'],
|
|
59
|
+
'name': value['name'],
|
|
60
|
+
'status': value['status'],
|
|
61
|
+
};
|
|
62
|
+
}
|