@instructure/athena-api-client 2.4.1 → 2.6.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 +8 -0
- package/dist/apis/TaxonomiesApi.d.ts +62 -0
- package/dist/apis/TaxonomiesApi.js +147 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/TaxonomiesApi.d.ts +62 -0
- package/dist/esm/apis/TaxonomiesApi.js +143 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -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/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 +5 -0
- package/dist/esm/models/index.js +5 -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/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 +5 -0
- package/dist/models/index.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,6 +113,9 @@ 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
|
|
116
119
|
*UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
|
|
117
120
|
*UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
|
|
118
121
|
*VotesApi* | [**listChatVotes**](docs/VotesApi.md#listchatvotes) | **GET** /api/v1/chats/{chatId}/votes | List votes for a chat
|
|
@@ -165,6 +168,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
165
168
|
- [PaginatedChats](docs/PaginatedChats.md)
|
|
166
169
|
- [PaginatedLearningMoments](docs/PaginatedLearningMoments.md)
|
|
167
170
|
- [PaginatedMessages](docs/PaginatedMessages.md)
|
|
171
|
+
- [PaginatedTaxonomies](docs/PaginatedTaxonomies.md)
|
|
168
172
|
- [Plan](docs/Plan.md)
|
|
169
173
|
- [Quiz](docs/Quiz.md)
|
|
170
174
|
- [QuizQuestion](docs/QuizQuestion.md)
|
|
@@ -177,6 +181,10 @@ All URIs are relative to *http://localhost:3000*
|
|
|
177
181
|
- [ServiceToken](docs/ServiceToken.md)
|
|
178
182
|
- [SubmitQuizResponseRequest](docs/SubmitQuizResponseRequest.md)
|
|
179
183
|
- [Tag](docs/Tag.md)
|
|
184
|
+
- [TaxonomyDetail](docs/TaxonomyDetail.md)
|
|
185
|
+
- [TaxonomyNode](docs/TaxonomyNode.md)
|
|
186
|
+
- [TaxonomyNodeConcept](docs/TaxonomyNodeConcept.md)
|
|
187
|
+
- [TaxonomySummary](docs/TaxonomySummary.md)
|
|
180
188
|
- [UpdateAccountDto](docs/UpdateAccountDto.md)
|
|
181
189
|
- [UpdateChatRequest](docs/UpdateChatRequest.md)
|
|
182
190
|
- [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
|
+
};
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -34,5 +34,6 @@ __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);
|
|
37
38
|
__exportStar(require("./UserContextApi"), exports);
|
|
38
39
|
__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];
|
|
@@ -0,0 +1,143 @@
|
|
|
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 { PaginatedTaxonomiesFromJSON, TaxonomyDetailFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class TaxonomiesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Get taxonomy by ID with full tree
|
|
31
|
+
*/
|
|
32
|
+
getTaxonomyRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['id'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getTaxonomy().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
40
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
41
|
+
}
|
|
42
|
+
let urlPath = `/api/v1/taxonomies/{id}`;
|
|
43
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
44
|
+
const response = yield this.request({
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'GET',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
}, initOverrides);
|
|
50
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TaxonomyDetailFromJSON(jsonValue));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get taxonomy by ID with full tree
|
|
55
|
+
*/
|
|
56
|
+
getTaxonomy(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const response = yield this.getTaxonomyRaw(requestParameters, initOverrides);
|
|
59
|
+
return yield response.value();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get taxonomy by slug
|
|
64
|
+
*/
|
|
65
|
+
getTaxonomyBySlugRaw(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
if (requestParameters['slug'] == null) {
|
|
68
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getTaxonomyBySlug().');
|
|
69
|
+
}
|
|
70
|
+
const queryParameters = {};
|
|
71
|
+
const headerParameters = {};
|
|
72
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
73
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
74
|
+
}
|
|
75
|
+
let urlPath = `/api/v1/taxonomies/by-slug/{slug}`;
|
|
76
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
77
|
+
const response = yield this.request({
|
|
78
|
+
path: urlPath,
|
|
79
|
+
method: 'GET',
|
|
80
|
+
headers: headerParameters,
|
|
81
|
+
query: queryParameters,
|
|
82
|
+
}, initOverrides);
|
|
83
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TaxonomyDetailFromJSON(jsonValue));
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get taxonomy by slug
|
|
88
|
+
*/
|
|
89
|
+
getTaxonomyBySlug(requestParameters, initOverrides) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const response = yield this.getTaxonomyBySlugRaw(requestParameters, initOverrides);
|
|
92
|
+
return yield response.value();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* List available taxonomies
|
|
97
|
+
*/
|
|
98
|
+
listTaxonomiesRaw(requestParameters, initOverrides) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const queryParameters = {};
|
|
101
|
+
if (requestParameters['accountId'] != null) {
|
|
102
|
+
queryParameters['accountId'] = requestParameters['accountId'];
|
|
103
|
+
}
|
|
104
|
+
if (requestParameters['status'] != null) {
|
|
105
|
+
queryParameters['status'] = requestParameters['status'];
|
|
106
|
+
}
|
|
107
|
+
if (requestParameters['limit'] != null) {
|
|
108
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
109
|
+
}
|
|
110
|
+
if (requestParameters['offset'] != null) {
|
|
111
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
112
|
+
}
|
|
113
|
+
const headerParameters = {};
|
|
114
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
115
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
116
|
+
}
|
|
117
|
+
let urlPath = `/api/v1/taxonomies`;
|
|
118
|
+
const response = yield this.request({
|
|
119
|
+
path: urlPath,
|
|
120
|
+
method: 'GET',
|
|
121
|
+
headers: headerParameters,
|
|
122
|
+
query: queryParameters,
|
|
123
|
+
}, initOverrides);
|
|
124
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedTaxonomiesFromJSON(jsonValue));
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* List available taxonomies
|
|
129
|
+
*/
|
|
130
|
+
listTaxonomies() {
|
|
131
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
132
|
+
const response = yield this.listTaxonomiesRaw(requestParameters, initOverrides);
|
|
133
|
+
return yield response.value();
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @export
|
|
139
|
+
*/
|
|
140
|
+
export const ListTaxonomiesStatusEnum = {
|
|
141
|
+
Draft: 'draft',
|
|
142
|
+
Active: 'active'
|
|
143
|
+
};
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
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 type { TaxonomySummary } from './TaxonomySummary';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedTaxonomies
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedTaxonomies {
|
|
19
|
+
/**
|
|
20
|
+
* Array of taxonomy summaries
|
|
21
|
+
* @type {Array<TaxonomySummary>}
|
|
22
|
+
* @memberof PaginatedTaxonomies
|
|
23
|
+
*/
|
|
24
|
+
data: Array<TaxonomySummary>;
|
|
25
|
+
/**
|
|
26
|
+
* Total count of matching taxonomies
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof PaginatedTaxonomies
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the PaginatedTaxonomies interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfPaginatedTaxonomies(value: object): value is PaginatedTaxonomies;
|
|
36
|
+
export declare function PaginatedTaxonomiesFromJSON(json: any): PaginatedTaxonomies;
|
|
37
|
+
export declare function PaginatedTaxonomiesFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedTaxonomies;
|
|
38
|
+
export declare function PaginatedTaxonomiesToJSON(json: any): PaginatedTaxonomies;
|
|
39
|
+
export declare function PaginatedTaxonomiesToJSONTyped(value?: PaginatedTaxonomies | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
import { TaxonomySummaryFromJSON, TaxonomySummaryToJSON, } from './TaxonomySummary';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the PaginatedTaxonomies interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfPaginatedTaxonomies(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function PaginatedTaxonomiesFromJSON(json) {
|
|
26
|
+
return PaginatedTaxonomiesFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function PaginatedTaxonomiesFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(TaxonomySummaryFromJSON)),
|
|
34
|
+
'total': json['total'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function PaginatedTaxonomiesToJSON(json) {
|
|
38
|
+
return PaginatedTaxonomiesToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function PaginatedTaxonomiesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(TaxonomySummaryToJSON)),
|
|
46
|
+
'total': value['total'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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 type { TaxonomyNode } from './TaxonomyNode';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface TaxonomyDetail
|
|
17
|
+
*/
|
|
18
|
+
export interface TaxonomyDetail {
|
|
19
|
+
/**
|
|
20
|
+
* Taxonomy ID
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof TaxonomyDetail
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* URL slug
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof TaxonomyDetail
|
|
29
|
+
*/
|
|
30
|
+
slug: string;
|
|
31
|
+
/**
|
|
32
|
+
* Taxonomy name
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof TaxonomyDetail
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* Taxonomy description
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof TaxonomyDetail
|
|
41
|
+
*/
|
|
42
|
+
description: string;
|
|
43
|
+
/**
|
|
44
|
+
* Taxonomy status
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof TaxonomyDetail
|
|
47
|
+
*/
|
|
48
|
+
status: TaxonomyDetailStatusEnum;
|
|
49
|
+
/**
|
|
50
|
+
* Mastery threshold (decimal)
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof TaxonomyDetail
|
|
53
|
+
*/
|
|
54
|
+
masteryThreshold: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Creation timestamp
|
|
57
|
+
* @type {Date}
|
|
58
|
+
* @memberof TaxonomyDetail
|
|
59
|
+
*/
|
|
60
|
+
createdAt: Date;
|
|
61
|
+
/**
|
|
62
|
+
* Last update timestamp
|
|
63
|
+
* @type {Date}
|
|
64
|
+
* @memberof TaxonomyDetail
|
|
65
|
+
*/
|
|
66
|
+
updatedAt: Date;
|
|
67
|
+
/**
|
|
68
|
+
* Root-level nodes of the taxonomy tree
|
|
69
|
+
* @type {Array<TaxonomyNode>}
|
|
70
|
+
* @memberof TaxonomyDetail
|
|
71
|
+
*/
|
|
72
|
+
nodes: Array<TaxonomyNode>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @export
|
|
76
|
+
*/
|
|
77
|
+
export declare const TaxonomyDetailStatusEnum: {
|
|
78
|
+
readonly Draft: "draft";
|
|
79
|
+
readonly Active: "active";
|
|
80
|
+
};
|
|
81
|
+
export type TaxonomyDetailStatusEnum = typeof TaxonomyDetailStatusEnum[keyof typeof TaxonomyDetailStatusEnum];
|
|
82
|
+
/**
|
|
83
|
+
* Check if a given object implements the TaxonomyDetail interface.
|
|
84
|
+
*/
|
|
85
|
+
export declare function instanceOfTaxonomyDetail(value: object): value is TaxonomyDetail;
|
|
86
|
+
export declare function TaxonomyDetailFromJSON(json: any): TaxonomyDetail;
|
|
87
|
+
export declare function TaxonomyDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaxonomyDetail;
|
|
88
|
+
export declare function TaxonomyDetailToJSON(json: any): TaxonomyDetail;
|
|
89
|
+
export declare function TaxonomyDetailToJSONTyped(value?: TaxonomyDetail | null, ignoreDiscriminator?: boolean): any;
|