PLT-92682 modualrization of services #136
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Modularization of Services
Changes
Screenshots
Core Authentication
import { UiPath } from '@uipath/uipath-typescript/core';
const uiPath = new UiPath({
baseUrl: 'https://cloud.uipath.com',
orgName: 'your-org',
tenantName: 'your-tenant',
secret: 'your-secret' // or use OAuth config
});
await uiPath.initialize();
Service Imports
Data Fabric - Entities
import { Entities } from '@uipath/uipath-typescript/entities';
const entitiesService = new Entities(uiPath);
const entities = await entitiesService.getAll();
const entity = await entitiesService.getById('entity-id');
const records = await entitiesService.getRecordsById('entity-id');
Action Center - Tasks
import { Tasks } from '@uipath/uipath-typescript/tasks';
const tasksService = new Tasks(uiPath);
const tasks = await tasksService.getAll();
const task = await tasksService.getById('task-id');
await tasksService.complete('task-id', { data: {...} });
Orchestrator - Assets
import { Assets } from '@uipath/uipath-typescript/assets';
const assetsService = new Assets(uiPath);
const assets = await assetsService.getAll();
const asset = await assetsService.getById('asset-id');
Orchestrator - Queues
import { Queues } from '@uipath/uipath-typescript/queues';
const queuesService = new Queues(uiPath);
const queues = await queuesService.getAll();
const queue = await queuesService.getById('queue-id');
Orchestrator - Buckets
import { Buckets } from '@uipath/uipath-typescript/buckets';
const bucketsService = new Buckets(uiPath);
const buckets = await bucketsService.getAll();
Orchestrator - Processes
import { Processes } from '@uipath/uipath-typescript/orchestrator-processes';
const processesService = new Processes(uiPath);
const processes = await processesService.getAll();
await processesService.start('release-key', { strategy: 'Specific' });
Maestro - Cases
import { Cases, CaseInstances } from '@uipath/uipath-typescript/maestro-cases';
const casesService = new Cases(uiPath);
const cases = await casesService.getAll();
const caseInstancesService = new CaseInstances(uiPath);
const instances = await caseInstancesService.getAll();
await caseInstancesService.close('instance-id', 'folder-key', { comment: 'Done' });
Maestro - Processes
import { Processes, ProcessInstances, ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
const processesService = new Processes(uiPath);
const processes = await processesService.getAll();
const instancesService = new ProcessInstances(uiPath);
const instances = await instancesService.getAll();
await instancesService.cancel('instance-id', 'folder-key', { comment: 'Cancelled' });
const incidentsService = new ProcessIncidents(uiPath);
const incidents = await incidentsService.getAll();