octopian-configuration-apis 1.0.21 → 1.0.23
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/package.json +1 -1
- package/src/CoreServices/configurationServices.js +31 -0
- package/src/index.d.ts +26 -0
- package/src/index.js +4 -0
- package/src/modals/input-modals/AddOntologyInput.ts +2 -2
- package/src/modals/output-modals/AddOntologyModelOutput.ts +1 -0
- package/src/modals/output-modals/AddOntologyOutput.ts +2 -2
- package/src/modals/output-modals/GetOntologyLevelListOutput.ts +5 -0
- package/src/web-services/apiConstants.js +6 -0
package/package.json
CHANGED
|
@@ -2600,6 +2600,21 @@ export async function DeleteOntology(id, AuthToken = null, Timeout = 30000) {
|
|
|
2600
2600
|
return APIResponse;
|
|
2601
2601
|
}
|
|
2602
2602
|
|
|
2603
|
+
/**
|
|
2604
|
+
* Get the list of ontology levels
|
|
2605
|
+
* @param {string} AuthToken - The authentication token
|
|
2606
|
+
* @param {number} Timeout - The timeout in milliseconds
|
|
2607
|
+
* @returns {Promise<BaseResponse<GetOntologyLevelListOutput[] | BaseErrorResponse>>} - The response from the API
|
|
2608
|
+
*/
|
|
2609
|
+
export async function GetOntologyLevelList(AuthToken = null, Timeout = 30000) {
|
|
2610
|
+
let APIResponse = await apiHandler.GetMethod(
|
|
2611
|
+
ConfigurationAPIConstants.uriGetOntologyLevelList(),
|
|
2612
|
+
AuthToken,
|
|
2613
|
+
Timeout
|
|
2614
|
+
);
|
|
2615
|
+
return APIResponse;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2603
2618
|
/**
|
|
2604
2619
|
* Get the list of meta ontologies
|
|
2605
2620
|
* @param {string} AuthToken - The authentication token
|
|
@@ -2615,6 +2630,22 @@ export async function GetOntologyModelList(AuthToken = null, Timeout = 30000) {
|
|
|
2615
2630
|
return APIResponse;
|
|
2616
2631
|
}
|
|
2617
2632
|
|
|
2633
|
+
/**
|
|
2634
|
+
* Get the detail of a ontology model
|
|
2635
|
+
* @param {number} id - The ID of the ontology model
|
|
2636
|
+
* @param {string} AuthToken - The authentication token
|
|
2637
|
+
* @param {number} Timeout - The timeout in milliseconds
|
|
2638
|
+
* @returns {Promise<BaseResponse<GetOntologyModelDetailOutput | BaseErrorResponse>>} - The response from the API
|
|
2639
|
+
*/
|
|
2640
|
+
export async function GetOntologyModelDetail(id, AuthToken = null, Timeout = 30000) {
|
|
2641
|
+
let APIResponse = await apiHandler.GetMethod(
|
|
2642
|
+
ConfigurationAPIConstants.uriGetOntologyModelDetail(id),
|
|
2643
|
+
AuthToken,
|
|
2644
|
+
Timeout
|
|
2645
|
+
);
|
|
2646
|
+
return APIResponse;
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2618
2649
|
/**
|
|
2619
2650
|
* Add a new meta ontology
|
|
2620
2651
|
* @param {AddOntologyModelInput} Input - The input for the API
|
package/src/index.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ import { GetKnowledgeOutput } from "./modals/output-modals/GetKnowledgeOutput";
|
|
|
113
113
|
import { AddOntologyOutput } from "./modals/output-modals/AddOntologyOutput";
|
|
114
114
|
import { AddOntologyInput } from "./modals/input-modals/AddOntologyInput";
|
|
115
115
|
import { GetKnowledgeByOntologyIdInput } from "./modals/input-modals/GetKnowledgeByOntologyIdInput";
|
|
116
|
+
import { GetOntologyLevelListOutput } from "./modals/output-modals/GetOntologyLevelListOutput";
|
|
116
117
|
// Define each module with its specific functions
|
|
117
118
|
interface ConfigurationServices {
|
|
118
119
|
/**
|
|
@@ -1818,6 +1819,17 @@ interface ConfigurationServices {
|
|
|
1818
1819
|
) => BaseResponse<GetStyleListOutput[] | BaseErrorResponse>;
|
|
1819
1820
|
|
|
1820
1821
|
|
|
1822
|
+
/**
|
|
1823
|
+
* Get the list of ontology levels
|
|
1824
|
+
* @param {string} AuthToken - The authentication token
|
|
1825
|
+
* @param {number} Timeout - The timeout in milliseconds
|
|
1826
|
+
* @returns {Promise<BaseResponse<GetOntologyLevelListOutput[] | BaseErrorResponse>>} - The response from the API
|
|
1827
|
+
*/
|
|
1828
|
+
GetOntologyLevelList: (
|
|
1829
|
+
AuthToken?: string | null,
|
|
1830
|
+
Timeout?: number | null,
|
|
1831
|
+
) => BaseResponse<GetOntologyLevelListOutput[] | BaseErrorResponse>;
|
|
1832
|
+
|
|
1821
1833
|
/**
|
|
1822
1834
|
* Get the list of ontologies
|
|
1823
1835
|
* @param {string} AuthToken - The authentication token
|
|
@@ -1879,6 +1891,19 @@ interface ConfigurationServices {
|
|
|
1879
1891
|
Timeout?: number | null,
|
|
1880
1892
|
) => BaseResponse<AddOntologyModelOutput[] | BaseErrorResponse>;
|
|
1881
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* Get the detail of a ontology model
|
|
1896
|
+
* @param {number} id - The ID of the ontology model
|
|
1897
|
+
* @param {string} AuthToken - The authentication token
|
|
1898
|
+
* @param {number} Timeout - The timeout in milliseconds
|
|
1899
|
+
* @returns {Promise<BaseResponse<GetOntologyModelDetailOutput | BaseErrorResponse>>} - The response from the API
|
|
1900
|
+
*/
|
|
1901
|
+
GetOntologyModelDetail: (
|
|
1902
|
+
id: number,
|
|
1903
|
+
AuthToken?: string | null,
|
|
1904
|
+
Timeout?: number | null,
|
|
1905
|
+
) => BaseResponse<AddOntologyModelOutput | BaseErrorResponse>;
|
|
1906
|
+
|
|
1882
1907
|
/**
|
|
1883
1908
|
* Add a new meta ontology
|
|
1884
1909
|
* @param {AddMetaOntologyInput} Input - The input for the API
|
|
@@ -2222,4 +2247,5 @@ export {
|
|
|
2222
2247
|
AddOntologyInput,
|
|
2223
2248
|
AddOntologyOutput,
|
|
2224
2249
|
GetKnowledgeByOntologyIdInput,
|
|
2250
|
+
GetOntologyLevelListOutput,
|
|
2225
2251
|
};
|
package/src/index.js
CHANGED
|
@@ -62,7 +62,9 @@ const {
|
|
|
62
62
|
CopyAsset,
|
|
63
63
|
CopyItem,
|
|
64
64
|
MaintainIntegrationList,
|
|
65
|
+
GetOntologyLevelList,
|
|
65
66
|
GetOntologyModelList,
|
|
67
|
+
GetOntologyModelDetail,
|
|
66
68
|
AddOntologyModel,
|
|
67
69
|
UpdateOntologyModel,
|
|
68
70
|
DeleteOntologyModel,
|
|
@@ -160,7 +162,9 @@ const ConfigurationServices = {
|
|
|
160
162
|
CopyAsset,
|
|
161
163
|
CopyItem,
|
|
162
164
|
MaintainIntegrationList,
|
|
165
|
+
GetOntologyLevelList,
|
|
163
166
|
GetOntologyModelList,
|
|
167
|
+
GetOntologyModelDetail,
|
|
164
168
|
AddOntologyModel,
|
|
165
169
|
UpdateOntologyModel,
|
|
166
170
|
DeleteOntologyModel,
|
|
@@ -189,9 +189,15 @@ export class ConfigurationAPIConstants {
|
|
|
189
189
|
static uriMaintainIntegrationMethodList() {
|
|
190
190
|
return ConfigurationURI + "/api/Extra/MaintainIntegrationMethodList";
|
|
191
191
|
}
|
|
192
|
+
static uriGetOntologyLevelList() {
|
|
193
|
+
return ontologyURI + "/api/GetOntologyLevelList";
|
|
194
|
+
}
|
|
192
195
|
static uriGetOntologyModelList() {
|
|
193
196
|
return ontologyURI + "/api/GetOntologyModelList";
|
|
194
197
|
}
|
|
198
|
+
static uriGetOntologyModelDetail( id ) {
|
|
199
|
+
return ontologyURI + `/api/GetOntologyModelDetail?ontologyModelId=${id}`;
|
|
200
|
+
}
|
|
195
201
|
static uriAddOntologyModel() {
|
|
196
202
|
return ontologyURI + "/api/AddOntologyModel";
|
|
197
203
|
}
|