@uipath/uipath-typescript 1.0.0-beta.18 → 1.1.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.
Files changed (39) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +100 -40
  3. package/dist/assets/index.cjs +2068 -0
  4. package/dist/assets/index.d.ts +513 -0
  5. package/dist/assets/index.mjs +2065 -0
  6. package/dist/buckets/index.cjs +2342 -0
  7. package/dist/buckets/index.d.ts +819 -0
  8. package/dist/buckets/index.mjs +2339 -0
  9. package/dist/cases/index.cjs +3475 -0
  10. package/dist/cases/index.d.ts +1397 -0
  11. package/dist/cases/index.mjs +3469 -0
  12. package/dist/conversational-agent/index.cjs +6622 -0
  13. package/dist/conversational-agent/index.d.ts +6579 -0
  14. package/dist/conversational-agent/index.mjs +6575 -0
  15. package/dist/core/index.cjs +5305 -0
  16. package/dist/core/index.d.ts +398 -0
  17. package/dist/core/index.mjs +5279 -0
  18. package/dist/entities/index.cjs +2727 -0
  19. package/dist/entities/index.d.ts +1513 -0
  20. package/dist/entities/index.mjs +2721 -0
  21. package/dist/index.cjs +3651 -2935
  22. package/dist/index.d.ts +5341 -590
  23. package/dist/index.mjs +3644 -2935
  24. package/dist/index.umd.js +8118 -11244
  25. package/dist/maestro-processes/index.cjs +2587 -0
  26. package/dist/maestro-processes/index.d.ts +1127 -0
  27. package/dist/maestro-processes/index.mjs +2578 -0
  28. package/dist/processes/index.cjs +2247 -0
  29. package/dist/processes/index.d.ts +800 -0
  30. package/dist/processes/index.mjs +2244 -0
  31. package/dist/queues/index.cjs +2053 -0
  32. package/dist/queues/index.d.ts +504 -0
  33. package/dist/queues/index.mjs +2050 -0
  34. package/dist/tasks/index.cjs +2653 -0
  35. package/dist/tasks/index.d.ts +1122 -0
  36. package/dist/tasks/index.mjs +2649 -0
  37. package/package.json +118 -6
  38. package/dist/index.d.cts +0 -5463
  39. package/dist/index.d.mts +0 -5463
package/LICENSE CHANGED
@@ -1,9 +1,9 @@
1
1
  MIT License
2
2
 
3
- Copyright 2025 UiPath
3
+ Copyright 2025-present UiPath
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
7
7
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
8
 
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -73,7 +73,9 @@ pnpm add @uipath/uipath-typescript
73
73
  ### Quick Start
74
74
 
75
75
  ```typescript
76
- import { UiPath } from '@uipath/uipath-typescript';
76
+ import { UiPath } from '@uipath/uipath-typescript/core';
77
+ import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
78
+ import { Tasks } from '@uipath/uipath-typescript/tasks';
77
79
 
78
80
  // Initialize the SDK with OAuth
79
81
  const sdk = new UiPath({
@@ -88,9 +90,13 @@ const sdk = new UiPath({
88
90
  // Initialize OAuth flow
89
91
  await sdk.initialize();
90
92
 
93
+ // Create service instances
94
+ const maestroProcesses = new MaestroProcesses(sdk);
95
+ const tasks = new Tasks(sdk);
96
+
91
97
  // Use the services
92
- const processes = await sdk.maestro.processes.getAll();
93
- const tasks = await sdk.tasks.getAll();
98
+ const processes = await maestroProcesses.getAll();
99
+ const allTasks = await tasks.getAll();
94
100
  ```
95
101
 
96
102
  <div align="right">
@@ -111,6 +117,8 @@ For OAuth, first create a non confidential [External App](https://docs.uipath.co
111
117
  <summary><strong>1. OAuth Authentication (Recommended)</strong></summary>
112
118
 
113
119
  ```typescript
120
+ import { UiPath } from '@uipath/uipath-typescript/core';
121
+
114
122
  const sdk = new UiPath({
115
123
  baseUrl: 'https://cloud.uipath.com',
116
124
  orgName: 'your-organization',
@@ -130,11 +138,13 @@ await sdk.initialize();
130
138
  <summary><strong>2. Secret-based Authentication</strong></summary>
131
139
 
132
140
  ```typescript
141
+ import { UiPath } from '@uipath/uipath-typescript/core';
142
+
133
143
  const sdk = new UiPath({
134
144
  baseUrl: 'https://cloud.uipath.com',
135
145
  orgName: 'your-organization',
136
146
  tenantName: 'your-tenant',
137
- secret: 'your-secret' //PAT Token or Bearer Token
147
+ secret: 'your-secret' //PAT Token or Bearer Token
138
148
  });
139
149
  ```
140
150
 
@@ -152,19 +162,26 @@ The `initialize()` method completes the authentication process for the SDK:
152
162
 
153
163
  #### Example: Secret Authentication (Auto-initialized)
154
164
  ```typescript
165
+ import { UiPath } from '@uipath/uipath-typescript/core';
166
+ import { Tasks } from '@uipath/uipath-typescript/tasks';
167
+
155
168
  const sdk = new UiPath({
156
169
  baseUrl: 'https://cloud.uipath.com',
157
170
  orgName: 'your-organization',
158
171
  tenantName: 'your-tenant',
159
- secret: 'your-secret' //PAT Token or Bearer Token
172
+ secret: 'your-secret' //PAT Token or Bearer Token
160
173
  });
161
174
 
162
175
  // Ready to use immediately - no initialize() needed
163
- const tasks = await sdk.tasks.getAll();
176
+ const tasks = new Tasks(sdk);
177
+ const allTasks = await tasks.getAll();
164
178
  ```
165
179
 
166
180
  #### Example: OAuth Authentication (Requires initialize)
167
181
  ```typescript
182
+ import { UiPath } from '@uipath/uipath-typescript/core';
183
+ import { Tasks } from '@uipath/uipath-typescript/tasks';
184
+
168
185
  const sdk = new UiPath({
169
186
  baseUrl: 'https://cloud.uipath.com',
170
187
  orgName: 'your-organization',
@@ -178,9 +195,10 @@ const sdk = new UiPath({
178
195
  try {
179
196
  await sdk.initialize();
180
197
  console.log('SDK initialized successfully');
181
-
198
+
182
199
  // Now you can use the SDK
183
- const tasks = await sdk.tasks.getAll();
200
+ const tasks = new Tasks(sdk);
201
+ const allTasks = await tasks.getAll();
184
202
  } catch (error) {
185
203
  console.error('Failed to initialize SDK:', error);
186
204
  }
@@ -195,6 +213,8 @@ try {
195
213
 
196
214
  #### Auto-login on App Load
197
215
  ```typescript
216
+ import { UiPath } from '@uipath/uipath-typescript/core';
217
+
198
218
  useEffect(() => {
199
219
  const initSDK = async () => {
200
220
  const sdk = new UiPath({...oauthConfig});
@@ -237,108 +257,130 @@ useEffect(() => {
237
257
 
238
258
  ## Usage
239
259
 
240
- The SDK provides access to the following services through a consistent API:
260
+ The SDK provides access to the following services through modular imports:
241
261
 
242
- - `sdk.maestro.processes` - Manage agentic maestro processes
243
- - `sdk.maestro.processes.instances` - Manage maestro process executions
244
- - `sdk.maestro.cases` - Manage maestro case management processes
245
- - `sdk.maestro.cases.instances` - Manage maestro case executions
246
- - `sdk.tasks` - Create and manage tasks
247
- - `sdk.entities` - Data Fabric entity operations
248
- - `sdk.processes` - Manage Orchestrator processes
249
- - `sdk.buckets` - Manage storage buckets in Orchestrator
250
- - `sdk.queues` - Manage Orchestrator queues
251
- - `sdk.assets` - Manage Orchestrator assets
262
+ - `MaestroProcesses` from `@uipath/uipath-typescript/maestro-processes` - Manage agentic maestro processes
263
+ - `ProcessInstances` from `@uipath/uipath-typescript/maestro-processes` - Manage maestro process executions
264
+ - `Cases` from `@uipath/uipath-typescript/cases` - Manage maestro case management processes
265
+ - `CaseInstances` from `@uipath/uipath-typescript/cases` - Manage maestro case executions
266
+ - `Tasks` from `@uipath/uipath-typescript/tasks` - Create and manage tasks
267
+ - `Entities` from `@uipath/uipath-typescript/entities` - Data Fabric entity operations
268
+ - `Processes` from `@uipath/uipath-typescript/processes` - Manage Orchestrator processes
269
+ - `Buckets` from `@uipath/uipath-typescript/buckets` - Manage storage buckets in Orchestrator
270
+ - `Queues` from `@uipath/uipath-typescript/queues` - Manage Orchestrator queues
271
+ - `Assets` from `@uipath/uipath-typescript/assets` - Manage Orchestrator assets
272
+ - `ConversationalAgent` from `@uipath/uipath-typescript/conversational-agent` - Interact with Conversational Agents (real-time streaming, conversations, sessions)
252
273
 
253
274
  <details>
254
275
  <summary><strong>View Example Usage</strong></summary>
255
276
 
256
277
  ```typescript
278
+ import { UiPath } from '@uipath/uipath-typescript/core';
279
+ import { MaestroProcesses, ProcessInstances } from '@uipath/uipath-typescript/maestro-processes';
280
+ import { Cases, CaseInstances } from '@uipath/uipath-typescript/cases';
281
+ import { Tasks, TaskType } from '@uipath/uipath-typescript/tasks';
282
+ import { Processes } from '@uipath/uipath-typescript/processes';
283
+ import { Buckets } from '@uipath/uipath-typescript/buckets';
284
+ import { Entities } from '@uipath/uipath-typescript/entities';
285
+
286
+ // Initialize SDK
287
+ const sdk = new UiPath({ /* config */ });
288
+
289
+ // Create service instances
290
+ const maestroProcesses = new MaestroProcesses(sdk);
291
+ const processInstances = new ProcessInstances(sdk);
292
+ const cases = new Cases(sdk);
293
+ const caseInstances = new CaseInstances(sdk);
294
+ const tasks = new Tasks(sdk);
295
+ const processes = new Processes(sdk);
296
+ const buckets = new Buckets(sdk);
297
+ const entities = new Entities(sdk);
298
+
257
299
  // Maestro - Get processes and their instances
258
- const processes = await sdk.maestro.processes.getAll();
259
- const instances = await sdk.maestro.processes.instances.getAll({
300
+ const allProcesses = await maestroProcesses.getAll();
301
+ const instances = await processInstances.getAll({
260
302
  processKey: 'my-process',
261
303
  pageSize: 10
262
304
  });
263
305
 
264
306
  // Control Process Instances
265
- await sdk.maestro.processes.instances.pause(instanceId, 'folder-key');
266
- await sdk.maestro.processes.instances.resume(instanceId, 'folder-key');
267
- await sdk.maestro.processes.instances.cancel(instanceId, 'folder-key', {
307
+ await processInstances.pause(instanceId, 'folder-key');
308
+ await processInstances.resume(instanceId, 'folder-key');
309
+ await processInstances.cancel(instanceId, 'folder-key', {
268
310
  comment: 'Cancelled due to error'
269
311
  });
270
312
 
271
313
  // Maestro Case Instances
272
- const caseInstance = await sdk.maestro.cases.instances.getById(instanceId, 'folder-key');
273
- const stages = await sdk.maestro.cases.instances.getStages(instanceId, 'folder-key');
314
+ const caseInstance = await caseInstances.getById(instanceId, 'folder-key');
315
+ const stages = await caseInstances.getStages(instanceId, 'folder-key');
274
316
 
275
317
  // Control Case Instances
276
- await sdk.maestro.cases.instances.close(instanceId, 'folder-key', {
318
+ await caseInstances.close(instanceId, 'folder-key', {
277
319
  comment: 'Case resolved successfully'
278
320
  });
279
321
 
280
322
  // Orchestrator Processes - Start a process
281
- const result = await sdk.processes.start({
323
+ const result = await processes.start({
282
324
  processKey: 'MyProcess_Key',
283
325
  }, folderId);
284
326
 
285
327
  // Tasks - Create, assign, and complete
286
- const task = await sdk.tasks.create({
328
+ const task = await tasks.create({
287
329
  title: 'Review Invoice',
288
330
  priority: 'High'
289
331
  }, folderId);
290
332
 
291
- await sdk.tasks.assign({
333
+ await tasks.assign({
292
334
  taskId: task.id,
293
335
  userNameOrEmail: 'user@company.com'
294
336
  }, folderId);
295
337
 
296
- await sdk.tasks.complete(TaskType.App, {
338
+ await tasks.complete(TaskType.App, {
297
339
  taskId: task.id,
298
340
  data: {},
299
341
  action: 'submit'
300
342
  }, folderId);
301
343
 
302
344
  // Buckets - File operations
303
- const bucket = await sdk.buckets.getById(bucketId, folderId);
304
- const fileMetadata = await sdk.buckets.getFileMetaData(bucketId, folderId, {
345
+ const bucket = await buckets.getById(bucketId, folderId);
346
+ const fileMetadata = await buckets.getFileMetaData(bucketId, folderId, {
305
347
  prefix: '/invoices/'
306
348
  });
307
349
 
308
350
  // Upload file
309
- await sdk.buckets.uploadFile({
351
+ await buckets.uploadFile({
310
352
  bucketId: bucketId,
311
353
  folderId: folderId,
312
354
  prefix: '/folder1'
313
355
  });
314
356
 
315
357
  // Get download URL
316
- const downloadUrl = await sdk.buckets.getReadUri({
358
+ const downloadUrl = await buckets.getReadUri({
317
359
  bucketId: bucketId,
318
360
  folderId: folderId,
319
361
  path: '/folder/file.pdf'
320
362
  });
321
363
 
322
364
  // Data Fabric Entities - CRUD operations
323
- const entity = await sdk.entities.getById('entity-uuid');
324
- const records = await sdk.entities.getRecordsById('entity-uuid', {
365
+ const entity = await entities.getById('entity-uuid');
366
+ const records = await entities.getAllRecords('entity-uuid', {
325
367
  pageSize: 100,
326
368
  expansionLevel: 1
327
369
  });
328
370
 
329
371
  // Insert records
330
- await sdk.entities.batchInsertById('entity-uuid', [
372
+ await entities.insertRecordsById('entity-uuid', [
331
373
  { name: 'John Doe', email: 'john@company.com', status: 'Active' },
332
374
  { name: 'Jane Smith', email: 'jane@company.com', status: 'Active' }
333
375
  ]);
334
376
 
335
377
  // Update records
336
- await sdk.entities.updateById('entity-uuid', [
378
+ await entities.updateRecordsById('entity-uuid', [
337
379
  { Id: 'record-id-1', status: 'Inactive' }
338
380
  ]);
339
381
 
340
382
  // Delete records
341
- await sdk.entities.deleteById('entity-uuid', ['record-id-1', 'record-id-2']);
383
+ await entities.deleteRecordsById('entity-uuid', ['record-id-1', 'record-id-2']);
342
384
  ```
343
385
 
344
386
  </details>
@@ -354,6 +396,7 @@ await sdk.entities.deleteById('entity-uuid', ['record-id-1', 'record-id-2']);
354
396
  Check out the [`/samples`](./samples) folder to see sample applications built using the SDK:
355
397
 
356
398
  - **[process-app](./samples/process-app)**: A Maestro process management application demonstrating OAuth authentication and SDK usage
399
+ - **[conversational-agent-app](./samples/conversational-agent-app)**: A Conversational Agent chat application with real-time streaming, conversation management, file attachments, tool call visualization, and feedback
357
400
 
358
401
  <div align="right">
359
402
 
@@ -365,6 +408,23 @@ Check out the [`/samples`](./samples) folder to see sample applications built us
365
408
 
366
409
  Before submitting a pull request, please review our [Contribution Guidelines](https://uipath.github.io/uipath-typescript/CONTRIBUTING/).
367
410
 
411
+ ### Running Documentation Locally
412
+
413
+ To build and serve the documentation locally using MkDocs:
414
+
415
+ **Prerequisites:**
416
+ - Python
417
+ - Node.js 18.x or higher
418
+ - npm 8.x or higher
419
+
420
+ **Steps:**
421
+ ```bash
422
+ pip3 install -r docs/requirements.txt
423
+ npm run docs:api
424
+ mkdocs build
425
+ mkdocs serve
426
+ ```
427
+
368
428
  <div align="right">
369
429
 
370
430
  [↑ Back to top](#uipath-typescript-sdk)