Skip to content

Commit 73ca849

Browse files
feat(ontologies): add Ontologies service for UiPath knowledge graph management
Implements the full OntologyService covering CRUD on ontologies and component file operations (upsert, bulk-upsert, get, list, delete, validate). Wires up the `@uipath/uipath-typescript/ontologies` subpath export with ESM/CJS/UMD dist output. Integration tests are skipped pending API deployment (target mid-July 2026). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2e2b7e9 commit 73ca849

23 files changed

Lines changed: 1723 additions & 3 deletions

File tree

docs/oauth-scopes.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,20 @@ The `ConversationalAgents` scope is required for real-time WebSocket sessions (`
272272
| `getSpansByReference()` | `Insights.RealTimeData Insights OR.Folders.Read` |
273273
| `getGovernanceDecisions()` | `Traces.Api Insights.RealTimeData Insights OR.Folders.Read` |
274274
| `getGovernanceSummary()` | `Traces.Api Insights.RealTimeData Insights OR.Folders.Read` |
275+
276+
## Ontologies
277+
278+
| Method | OAuth Scope |
279+
|--------|-------------|
280+
| `create()` | `DataFabric` or `DataFabric.Write` |
281+
| `getAll()` | `DataFabric` or `DataFabric.Read` |
282+
| `getById()` | `DataFabric` or `DataFabric.Read` |
283+
| `update()` | `DataFabric` or `DataFabric.Write` |
284+
| `deleteById()` | `DataFabric` or `DataFabric.Write` |
285+
| `listArtifacts()` | `DataFabric` or `DataFabric.Read` |
286+
| `getArtifact()` | `DataFabric` or `DataFabric.Read` |
287+
| `upsertArtifact()` | `DataFabric` or `DataFabric.Write` |
288+
| `uploadArtifacts()` | `DataFabric` or `DataFabric.Write` |
289+
| `deleteArtifact()` | `DataFabric` or `DataFabric.Write` |
290+
| `validateArtifact()` | `DataFabric` or `DataFabric.Read` |
291+
| `exportOntology()` | `DataFabric` or `DataFabric.Read` |

docs/pagination.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,4 @@ console.log(`Total count: ${allAssets.totalCount}`);
141141
| Traces | `getById()` | ❌ No |
142142
| Traces | `getSpansByIds()` | ❌ No |
143143
| Governance | `getPolicyTraces()` | ✅ Yes |
144+
| Ontologies | `getAll()` | ✅ Yes |

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ nav:
199199
- api/interfaces/entity/index.md
200200
- Choice Sets: api/interfaces/ChoiceSetServiceModel.md
201201
- Governance: api/interfaces/GovernanceServiceModel.md
202+
- Ontologies: api/interfaces/OntologyServiceModel.md
202203
- Maestro:
203204
- Processes: api/interfaces/MaestroProcessesServiceModel.md
204205
- Process Instances: api/interfaces/ProcessInstancesServiceModel.md

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,16 @@
225225
"types": "./dist/notifications/index.d.ts",
226226
"default": "./dist/notifications/index.cjs"
227227
}
228+
},
229+
"./ontologies": {
230+
"import": {
231+
"types": "./dist/ontologies/index.d.ts",
232+
"default": "./dist/ontologies/index.mjs"
233+
},
234+
"require": {
235+
"types": "./dist/ontologies/index.d.ts",
236+
"default": "./dist/ontologies/index.cjs"
237+
}
228238
}
229239
},
230240
"files": [

rollup.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ const serviceEntries = [
233233
name: 'notifications',
234234
input: 'src/services/notification/index.ts',
235235
output: 'notifications/index'
236+
},
237+
{
238+
name: 'ontologies',
239+
input: 'src/services/ontology/index.ts',
240+
output: 'ontologies/index'
236241
}
237242
];
238243

src/core/http/api-client.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,14 @@ export class ApiClient {
9393
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
9494

9595
let body = undefined;
96-
97-
if(options.body) {
98-
body = isFormData ? (options.body as FormData) : JSON.stringify(options.body)
96+
if (options.body) {
97+
if (isFormData) {
98+
body = options.body as FormData;
99+
} else if (options.bodyOptions?.stringify === false) {
100+
body = options.body as string;
101+
} else {
102+
body = JSON.stringify(options.body);
103+
}
99104
}
100105

101106
try {
@@ -132,6 +137,9 @@ export class ApiClient {
132137
if (!text) {
133138
return undefined as T;
134139
}
140+
if (options.responseType === RESPONSE_TYPES.TEXT) {
141+
return text as T;
142+
}
135143
try {
136144
return JSON.parse(text);
137145
} catch (error) {

0 commit comments

Comments
 (0)