@uipath/uipath-typescript 1.3.11 → 1.4.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 (56) hide show
  1. package/dist/agent-memory/index.cjs +1765 -0
  2. package/dist/agent-memory/index.d.ts +588 -0
  3. package/dist/agent-memory/index.mjs +1763 -0
  4. package/dist/agents/index.cjs +1726 -0
  5. package/dist/agents/index.d.ts +502 -0
  6. package/dist/agents/index.mjs +1724 -0
  7. package/dist/assets/index.cjs +155 -30
  8. package/dist/assets/index.d.ts +84 -5
  9. package/dist/assets/index.mjs +155 -30
  10. package/dist/attachments/index.cjs +37 -6
  11. package/dist/attachments/index.d.ts +1 -0
  12. package/dist/attachments/index.mjs +37 -6
  13. package/dist/buckets/index.cjs +37 -6
  14. package/dist/buckets/index.d.ts +1 -0
  15. package/dist/buckets/index.mjs +37 -6
  16. package/dist/cases/index.cjs +141 -10
  17. package/dist/cases/index.d.ts +118 -7
  18. package/dist/cases/index.mjs +141 -11
  19. package/dist/conversational-agent/index.cjs +124 -57
  20. package/dist/conversational-agent/index.d.ts +190 -122
  21. package/dist/conversational-agent/index.mjs +124 -57
  22. package/dist/core/index.cjs +413 -105
  23. package/dist/core/index.d.ts +15 -0
  24. package/dist/core/index.mjs +413 -105
  25. package/dist/entities/index.cjs +122 -43
  26. package/dist/entities/index.d.ts +140 -35
  27. package/dist/entities/index.mjs +122 -43
  28. package/dist/feedback/index.cjs +37 -6
  29. package/dist/feedback/index.d.ts +1 -0
  30. package/dist/feedback/index.mjs +37 -6
  31. package/dist/governance/index.cjs +1782 -0
  32. package/dist/governance/index.d.ts +598 -0
  33. package/dist/governance/index.mjs +1780 -0
  34. package/dist/index.cjs +956 -283
  35. package/dist/index.d.ts +1138 -121
  36. package/dist/index.mjs +956 -284
  37. package/dist/index.umd.js +3113 -2423
  38. package/dist/jobs/index.cjs +37 -6
  39. package/dist/jobs/index.d.ts +1 -0
  40. package/dist/jobs/index.mjs +37 -6
  41. package/dist/maestro-processes/index.cjs +173 -18
  42. package/dist/maestro-processes/index.d.ts +131 -9
  43. package/dist/maestro-processes/index.mjs +173 -18
  44. package/dist/processes/index.cjs +37 -6
  45. package/dist/processes/index.d.ts +1 -0
  46. package/dist/processes/index.mjs +37 -6
  47. package/dist/queues/index.cjs +37 -6
  48. package/dist/queues/index.d.ts +1 -0
  49. package/dist/queues/index.mjs +37 -6
  50. package/dist/tasks/index.cjs +37 -6
  51. package/dist/tasks/index.d.ts +1 -0
  52. package/dist/tasks/index.mjs +37 -6
  53. package/dist/traces/index.cjs +37 -6
  54. package/dist/traces/index.d.ts +1 -0
  55. package/dist/traces/index.mjs +37 -6
  56. package/package.json +32 -2
@@ -107,6 +107,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
107
107
  tokenParam?: string;
108
108
  countParam?: string;
109
109
  convertToSkip?: boolean;
110
+ zeroBased?: boolean;
110
111
  };
111
112
  };
112
113
  }
@@ -341,7 +342,7 @@ interface EntityRecord {
341
342
  type EntityGetRecordsByIdOptions = {
342
343
  /** Level of entity expansion (default: 0) */
343
344
  expansionLevel?: number;
344
- } & PaginationOptions;
345
+ } & PaginationOptions & EntityFolderScopedOptions;
345
346
  /**
346
347
  * Options for getting all records of an entity
347
348
  */
@@ -349,14 +350,14 @@ type EntityGetAllRecordsOptions = EntityGetRecordsByIdOptions;
349
350
  /**
350
351
  * Options for getting a single entity record by entity ID and record ID
351
352
  */
352
- interface EntityGetRecordByIdOptions {
353
+ interface EntityGetRecordByIdOptions extends EntityFolderScopedOptions {
353
354
  /** Level of entity expansion (default: 0) */
354
355
  expansionLevel?: number;
355
356
  }
356
357
  /**
357
358
  * Common options for entity operations that modify multiple records
358
359
  */
359
- interface EntityOperationOptions {
360
+ interface EntityOperationOptions extends EntityFolderScopedOptions {
360
361
  /** Level of entity expansion (default: 0) */
361
362
  expansionLevel?: number;
362
363
  /** Whether to fail on first error (default: false) */
@@ -366,7 +367,7 @@ interface EntityOperationOptions {
366
367
  * Options for inserting a single record into an entity
367
368
  * @deprecated Use {@link EntityInsertRecordOptions} instead for better clarity on inserting a single record into an entity. This type will be removed in future versions.
368
369
  */
369
- interface EntityInsertOptions {
370
+ interface EntityInsertOptions extends EntityFolderScopedOptions {
370
371
  /** Level of entity expansion (default: 0) */
371
372
  expansionLevel?: number;
372
373
  }
@@ -406,7 +407,7 @@ interface EntityUpdateRecordsOptions extends EntityOperationOptions {
406
407
  * Options for deleting data from an entity
407
408
  * @deprecated Use {@link EntityDeleteRecordsOptions} instead for better clarity on deleting records from an entity. This type will be removed in future versions.
408
409
  */
409
- interface EntityDeleteOptions {
410
+ interface EntityDeleteOptions extends EntityFolderScopedOptions {
410
411
  /** Whether to fail on first error (default: false) */
411
412
  failOnFirst?: boolean;
412
413
  }
@@ -415,6 +416,16 @@ interface EntityDeleteOptions {
415
416
  */
416
417
  interface EntityDeleteRecordsOptions extends EntityDeleteOptions {
417
418
  }
419
+ /**
420
+ * Options for {@link EntityServiceModel.deleteRecordById}
421
+ */
422
+ interface EntityDeleteRecordByIdOptions extends EntityFolderScopedOptions {
423
+ }
424
+ /**
425
+ * Options for {@link EntityServiceModel.importRecordsById}
426
+ */
427
+ interface EntityImportRecordsByIdOptions extends EntityFolderScopedOptions {
428
+ }
418
429
  /**
419
430
  * Logical operator for combining query filter groups
420
431
  */
@@ -523,7 +534,7 @@ type EntityQueryRecordsOptions = {
523
534
  aggregates?: EntityAggregate[];
524
535
  /** Field names to group aggregate results by. */
525
536
  groupBy?: string[];
526
- } & PaginationOptions;
537
+ } & PaginationOptions & EntityFolderScopedOptions;
527
538
  /**
528
539
  * Response from querying entity records
529
540
  */
@@ -580,16 +591,32 @@ interface EntityCreateFieldOptions extends EntityFieldBase {
580
591
  /** UUID of the referenced field on the target entity (required when `type` is `RELATIONSHIP` or `FILE`) */
581
592
  referenceFieldId?: string;
582
593
  }
594
+ /**
595
+ * Common shape for every folder-scoped Data Fabric entity operation.
596
+ * Forwarded on the wire as the `X-UIPATH-FolderKey` header.
597
+ */
598
+ interface EntityFolderScopedOptions {
599
+ /** Key identifying the folder the entity belongs to. Omit for tenant-level entities. */
600
+ folderKey?: string;
601
+ }
602
+ /**
603
+ * Options for {@link EntityServiceModel.getById}
604
+ */
605
+ interface EntityGetByIdOptions extends EntityFolderScopedOptions {
606
+ }
607
+ /**
608
+ * Options for {@link EntityServiceModel.deleteById}
609
+ */
610
+ interface EntityDeleteByIdOptions extends EntityFolderScopedOptions {
611
+ }
583
612
  /**
584
613
  * Options for creating a new Data Fabric entity
585
614
  */
586
- interface EntityCreateOptions {
615
+ interface EntityCreateOptions extends EntityFolderScopedOptions {
587
616
  /** Human-readable display name shown in the UI (defaults to `name` if omitted) */
588
617
  displayName?: string;
589
618
  /** Optional entity description */
590
619
  description?: string;
591
- /** UUID of the folder to place the entity in (defaults to the tenant-level folder) */
592
- folderKey?: string;
593
620
  /** Whether role-based access control is enabled for this entity (default: false) */
594
621
  isRbacEnabled?: boolean;
595
622
  /** Whether Analytics integration is enabled for this entity (default: false) */
@@ -618,7 +645,7 @@ interface EntityRemoveFieldOptions {
618
645
  * (`displayName`, `description`, `isRbacEnabled`) can be combined; each is applied
619
646
  * only when the corresponding fields are provided.
620
647
  */
621
- interface EntityUpdateByIdOptions {
648
+ interface EntityUpdateByIdOptions extends EntityFolderScopedOptions {
622
649
  /** New fields to add */
623
650
  addFields?: EntityCreateFieldOptions[];
624
651
  /** Fields to remove, each identified by field name */
@@ -650,10 +677,20 @@ type EntityFileType = Blob | File | Uint8Array;
650
677
  /**
651
678
  * Optional options for uploading an attachment to an entity record
652
679
  */
653
- interface EntityUploadAttachmentOptions {
680
+ interface EntityUploadAttachmentOptions extends EntityFolderScopedOptions {
654
681
  /** Optional expansion level (default: 0) */
655
682
  expansionLevel?: number;
656
683
  }
684
+ /**
685
+ * Optional options for downloading an attachment from an entity record
686
+ */
687
+ interface EntityDownloadAttachmentOptions extends EntityFolderScopedOptions {
688
+ }
689
+ /**
690
+ * Optional options for deleting an attachment from an entity record
691
+ */
692
+ interface EntityDeleteAttachmentOptions extends EntityFolderScopedOptions {
693
+ }
657
694
  /**
658
695
  * Response from uploading an attachment to an entity record
659
696
  */
@@ -953,6 +990,7 @@ interface EntityServiceModel {
953
990
  * Gets entity metadata by entity ID with attached operation methods
954
991
  *
955
992
  * @param id - UUID of the entity
993
+ * @param options - Optional {@link EntityGetByIdOptions} (e.g. `folderKey` for folder-scoped entities)
956
994
  * @returns Promise resolving to entity metadata with operation methods
957
995
  * {@link EntityGetResponse}
958
996
  * @example
@@ -965,6 +1003,9 @@ interface EntityServiceModel {
965
1003
  * // Get entity metadata with methods
966
1004
  * const entity = await entities.getById("<entityId>");
967
1005
  *
1006
+ * // Folder-scoped: pass the entity's folder key
1007
+ * const folderEntity = await entities.getById("<entityId>", { folderKey: "<folderKey>" });
1008
+ *
968
1009
  * // Call operations directly on the entity
969
1010
  * const records = await entity.getAllRecords();
970
1011
  *
@@ -984,7 +1025,7 @@ interface EntityServiceModel {
984
1025
  * ]);
985
1026
  * ```
986
1027
  */
987
- getById(id: string): Promise<EntityGetResponse>;
1028
+ getById(id: string, options?: EntityGetByIdOptions): Promise<EntityGetResponse>;
988
1029
  /**
989
1030
  * Gets entity records by entity ID
990
1031
  *
@@ -1188,6 +1229,7 @@ interface EntityServiceModel {
1188
1229
  *
1189
1230
  * @param entityId - UUID of the entity
1190
1231
  * @param recordId - UUID of the record to delete
1232
+ * @param options - Optional {@link EntityDeleteRecordByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1191
1233
  * @returns Promise resolving to void on success
1192
1234
  * @example
1193
1235
  * ```typescript
@@ -1196,9 +1238,12 @@ interface EntityServiceModel {
1196
1238
  * const entities = new Entities(sdk);
1197
1239
  *
1198
1240
  * await entities.deleteRecordById("<entityId>", "<recordId>");
1241
+ *
1242
+ * // Folder-scoped: pass the entity's folder key
1243
+ * await entities.deleteRecordById("<entityId>", "<recordId>", { folderKey: "<folderKey>" });
1199
1244
  * ```
1200
1245
  */
1201
- deleteRecordById(entityId: string, recordId: string): Promise<void>;
1246
+ deleteRecordById(entityId: string, recordId: string, options?: EntityDeleteRecordByIdOptions): Promise<void>;
1202
1247
  /**
1203
1248
  * Queries entity records with filters, sorting, aggregates, and SDK-managed pagination
1204
1249
  *
@@ -1252,6 +1297,7 @@ interface EntityServiceModel {
1252
1297
  *
1253
1298
  * @param id - UUID of the entity
1254
1299
  * @param file - CSV file to import as a Blob or File or Uint8Array
1300
+ * @param options - Optional {@link EntityImportRecordsByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1255
1301
  * @returns Promise resolving to {@link EntityImportRecordsResponse} with record counts
1256
1302
  * @example
1257
1303
  * ```typescript
@@ -1259,16 +1305,19 @@ interface EntityServiceModel {
1259
1305
  * const fileInput = document.getElementById('csv-input') as HTMLInputElement;
1260
1306
  * const result = await entities.importRecordsById(<id>, fileInput.files[0]);
1261
1307
  * console.log(`Inserted ${result.insertedRecords} of ${result.totalRecords} records`);
1308
+ *
1309
+ * // Folder-scoped entity: pass the entity's folder key
1310
+ * await entities.importRecordsById(<id>, fileInput.files[0], { folderKey: "<folderKey>" });
1262
1311
  * ```
1263
- * @internal
1264
1312
  */
1265
- importRecordsById(id: string, file: EntityFileType): Promise<EntityImportRecordsResponse>;
1313
+ importRecordsById(id: string, file: EntityFileType, options?: EntityImportRecordsByIdOptions): Promise<EntityImportRecordsResponse>;
1266
1314
  /**
1267
1315
  * Downloads an attachment stored in a File-type field of an entity record.
1268
1316
  *
1269
1317
  * @param entityId - UUID of the entity
1270
1318
  * @param recordId - UUID of the record containing the attachment
1271
1319
  * @param fieldName - Name of the File-type field containing the attachment
1320
+ * @param options - Optional {@link EntityDownloadAttachmentOptions} (e.g. `folderKey` for folder-scoped entities)
1272
1321
  * @returns Promise resolving to Blob containing the file content
1273
1322
  * @example
1274
1323
  * ```typescript
@@ -1315,7 +1364,7 @@ interface EntityServiceModel {
1315
1364
  * fs.writeFileSync('attachment.pdf', buffer);
1316
1365
  * ```
1317
1366
  */
1318
- downloadAttachment(entityId: string, recordId: string, fieldName: string): Promise<Blob>;
1367
+ downloadAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDownloadAttachmentOptions): Promise<Blob>;
1319
1368
  /**
1320
1369
  * Uploads an attachment to a File-type field of an entity record.
1321
1370
  *
@@ -1325,7 +1374,7 @@ interface EntityServiceModel {
1325
1374
  * @param recordId - UUID of the record to upload the attachment to
1326
1375
  * @param fieldName - Name of the File-type field
1327
1376
  * @param file - File to upload (Blob, File, or Uint8Array)
1328
- * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel)
1377
+ * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. `expansionLevel`, `folderKey` for folder-scoped entities)
1329
1378
  * @returns Promise resolving to {@link EntityUploadAttachmentResponse}
1330
1379
  * @example
1331
1380
  * ```typescript
@@ -1346,6 +1395,9 @@ interface EntityServiceModel {
1346
1395
  * const file = fileInput.files[0];
1347
1396
  * const response = await entities.uploadAttachment(entityId, recordId, 'Documents', file);
1348
1397
  *
1398
+ * // Folder-scoped entity: pass the entity's folder key
1399
+ * await entities.uploadAttachment(entityId, recordId, 'Documents', file, { folderKey: "<folderKey>" });
1400
+ *
1349
1401
  * // Node.js: Upload a file from disk
1350
1402
  * const fileBuffer = fs.readFileSync('document.pdf');
1351
1403
  * const blob = new Blob([fileBuffer], { type: 'application/pdf' });
@@ -1359,6 +1411,7 @@ interface EntityServiceModel {
1359
1411
  * @param entityId - UUID of the entity
1360
1412
  * @param recordId - UUID of the record containing the attachment
1361
1413
  * @param fieldName - Name of the File-type field containing the attachment
1414
+ * @param options - Optional {@link EntityDeleteAttachmentOptions} (e.g. `folderKey` for folder-scoped entities)
1362
1415
  * @returns Promise resolving to {@link EntityDeleteAttachmentResponse}
1363
1416
  * @example
1364
1417
  * ```typescript
@@ -1382,7 +1435,7 @@ interface EntityServiceModel {
1382
1435
  * await entity.deleteAttachment(recordId, 'Documents');
1383
1436
  * ```
1384
1437
  */
1385
- deleteAttachment(entityId: string, recordId: string, fieldName: string): Promise<EntityDeleteAttachmentResponse>;
1438
+ deleteAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDeleteAttachmentOptions): Promise<EntityDeleteAttachmentResponse>;
1386
1439
  /**
1387
1440
  * Creates a new Data Fabric entity with the given schema
1388
1441
  *
@@ -1416,14 +1469,18 @@ interface EntityServiceModel {
1416
1469
  * Deletes a Data Fabric entity and all its records
1417
1470
  *
1418
1471
  * @param id - UUID of the entity to delete
1472
+ * @param options - Optional {@link EntityDeleteByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1419
1473
  * @returns Promise resolving when the entity is deleted
1420
1474
  * @example
1421
1475
  * ```typescript
1422
1476
  * await entities.deleteById(<id>);
1477
+ *
1478
+ * // Folder-scoped: pass the entity's folder key
1479
+ * await entities.deleteById(<id>, { folderKey: "<folderKey>" });
1423
1480
  * ```
1424
1481
  * @internal
1425
1482
  */
1426
- deleteById(id: string): Promise<void>;
1483
+ deleteById(id: string, options?: EntityDeleteByIdOptions): Promise<void>;
1427
1484
  /**
1428
1485
  * Updates an existing Data Fabric entity — schema and/or metadata.
1429
1486
  *
@@ -1432,7 +1489,6 @@ interface EntityServiceModel {
1432
1489
  * only when the corresponding fields are provided.
1433
1490
  *
1434
1491
  * @param id - UUID of the entity to update
1435
- * @param name - name of the entity (required by the API)
1436
1492
  * @param options - Changes to apply ({@link EntityUpdateByIdOptions})
1437
1493
  * @returns Promise resolving when the update is complete
1438
1494
  *
@@ -1466,6 +1522,12 @@ interface EntityServiceModel {
1466
1522
  * { id: <fieldId>, lengthLimit: 1000 },
1467
1523
  * ],
1468
1524
  * });
1525
+ *
1526
+ * // Folder-scoped entity: add a field to an entity that lives in a non-tenant folder
1527
+ * await entities.updateById(<id>, {
1528
+ * folderKey: "<folderKey>",
1529
+ * addFields: [{ fieldName: "notes", type: EntityFieldDataType.MULTILINE_TEXT }],
1530
+ * });
1469
1531
  * ```
1470
1532
  * @internal
1471
1533
  */
@@ -1538,9 +1600,10 @@ interface EntityMethods {
1538
1600
  * Use this method if you need trigger events to fire for the deleted record.
1539
1601
  *
1540
1602
  * @param recordId - UUID of the record to delete
1603
+ * @param options - Optional {@link EntityDeleteRecordByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1541
1604
  * @returns Promise resolving to void on success
1542
1605
  */
1543
- deleteRecord(recordId: string): Promise<void>;
1606
+ deleteRecord(recordId: string, options?: EntityDeleteRecordByIdOptions): Promise<void>;
1544
1607
  /**
1545
1608
  * Get all records from this entity
1546
1609
  *
@@ -1561,16 +1624,17 @@ interface EntityMethods {
1561
1624
  *
1562
1625
  * @param recordId - UUID of the record containing the attachment
1563
1626
  * @param fieldName - Name of the File-type field containing the attachment
1627
+ * @param options - Optional {@link EntityDownloadAttachmentOptions} (e.g. folderKey)
1564
1628
  * @returns Promise resolving to Blob containing the file content
1565
1629
  */
1566
- downloadAttachment(recordId: string, fieldName: string): Promise<Blob>;
1630
+ downloadAttachment(recordId: string, fieldName: string, options?: EntityDownloadAttachmentOptions): Promise<Blob>;
1567
1631
  /**
1568
1632
  * Uploads an attachment to a File-type field of an entity record
1569
1633
  *
1570
1634
  * @param recordId - UUID of the record to upload the attachment to
1571
1635
  * @param fieldName - Name of the File-type field
1572
1636
  * @param file - File to upload (Blob, File, or Uint8Array)
1573
- * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel)
1637
+ * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel, folderKey)
1574
1638
  * @returns Promise resolving to {@link EntityUploadAttachmentResponse}
1575
1639
  */
1576
1640
  uploadAttachment(recordId: string, fieldName: string, file: EntityFileType, options?: EntityUploadAttachmentOptions): Promise<EntityUploadAttachmentResponse>;
@@ -1579,9 +1643,10 @@ interface EntityMethods {
1579
1643
  *
1580
1644
  * @param recordId - UUID of the record containing the attachment
1581
1645
  * @param fieldName - Name of the File-type field containing the attachment
1646
+ * @param options - Optional {@link EntityDeleteAttachmentOptions} (e.g. folderKey)
1582
1647
  * @returns Promise resolving to {@link EntityDeleteAttachmentResponse}
1583
1648
  */
1584
- deleteAttachment(recordId: string, fieldName: string): Promise<EntityDeleteAttachmentResponse>;
1649
+ deleteAttachment(recordId: string, fieldName: string, options?: EntityDeleteAttachmentOptions): Promise<EntityDeleteAttachmentResponse>;
1585
1650
  /**
1586
1651
  * @deprecated Use {@link insertRecord} instead.
1587
1652
  * @hidden
@@ -1637,6 +1702,7 @@ interface EntityMethods {
1637
1702
  * Imports records from a CSV file into this entity
1638
1703
  *
1639
1704
  * @param file - CSV file to import as a Blob, File, or Uint8Array
1705
+ * @param options - Optional {@link EntityImportRecordsByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1640
1706
  * @returns Promise resolving to {@link EntityImportRecordsResponse} with record counts
1641
1707
  * @example
1642
1708
  * ```typescript
@@ -1644,9 +1710,12 @@ interface EntityMethods {
1644
1710
  * const fileInput = document.getElementById('csv-input') as HTMLInputElement;
1645
1711
  * const result = await entity.importRecords(fileInput.files[0]);
1646
1712
  * console.log(`Inserted ${result.insertedRecords} of ${result.totalRecords} records`);
1713
+ *
1714
+ * // Folder-scoped entity: pass the entity's folder key
1715
+ * await entity.importRecords(fileInput.files[0], { folderKey: "<folderKey>" });
1647
1716
  * ```
1648
1717
  */
1649
- importRecords(file: EntityFileType): Promise<EntityImportRecordsResponse>;
1718
+ importRecords(file: EntityFileType, options?: EntityImportRecordsByIdOptions): Promise<EntityImportRecordsResponse>;
1650
1719
  /**
1651
1720
  * @deprecated Use {@link getAllRecords} instead.
1652
1721
  * @hidden
@@ -1655,15 +1724,19 @@ interface EntityMethods {
1655
1724
  /**
1656
1725
  * Deletes this entity and all its records
1657
1726
  *
1727
+ * @param options - Optional {@link EntityDeleteByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1658
1728
  * @returns Promise resolving when the entity is deleted
1659
1729
  * @example
1660
1730
  * ```typescript
1661
1731
  * const entity = await entities.getById(<id>);
1662
1732
  * await entity.delete();
1733
+ *
1734
+ * // Folder-scoped entity: pass the entity's folder key
1735
+ * await entity.delete({ folderKey: "<folderKey>" });
1663
1736
  * ```
1664
1737
  * @internal
1665
1738
  */
1666
- delete(): Promise<void>;
1739
+ delete(options?: EntityDeleteByIdOptions): Promise<void>;
1667
1740
  /**
1668
1741
  * Updates this entity — schema and/or metadata.
1669
1742
  *
@@ -1710,6 +1783,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1710
1783
  * Gets entity metadata by entity ID with attached operation methods
1711
1784
  *
1712
1785
  * @param id - UUID of the entity
1786
+ * @param options - Optional {@link EntityGetByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1713
1787
  * @returns Promise resolving to entity metadata with schema information and operation methods
1714
1788
  *
1715
1789
  * @example
@@ -1719,6 +1793,9 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1719
1793
  * const entities = new Entities(sdk);
1720
1794
  * const entity = await entities.getById("<entityId>");
1721
1795
  *
1796
+ * // Folder-scoped: pass the entity's folder key
1797
+ * const folderEntity = await entities.getById("<entityId>", { folderKey: "<folderKey>" });
1798
+ *
1722
1799
  * // Call operations directly on the entity
1723
1800
  * const records = await entity.getAllRecords();
1724
1801
  *
@@ -1732,7 +1809,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1732
1809
  * ]);
1733
1810
  * ```
1734
1811
  */
1735
- getById(id: string): Promise<EntityGetResponse>;
1812
+ getById(id: string, options?: EntityGetByIdOptions): Promise<EntityGetResponse>;
1736
1813
  /**
1737
1814
  * Gets entity records by entity ID
1738
1815
  *
@@ -1931,6 +2008,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1931
2008
  *
1932
2009
  * @param entityId - UUID of the entity
1933
2010
  * @param recordId - UUID of the record to delete
2011
+ * @param options - Optional {@link EntityDeleteRecordByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1934
2012
  * @returns Promise resolving to void on success
1935
2013
  * @example
1936
2014
  * ```typescript
@@ -1939,9 +2017,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1939
2017
  * const entities = new Entities(sdk);
1940
2018
  *
1941
2019
  * await entities.deleteRecordById("<entityId>", "<recordId>");
2020
+ *
2021
+ * // Folder-scoped: pass the entity's folder key
2022
+ * await entities.deleteRecordById("<entityId>", "<recordId>", { folderKey: "<folderKey>" });
1942
2023
  * ```
1943
2024
  */
1944
- deleteRecordById(entityId: string, recordId: string): Promise<void>;
2025
+ deleteRecordById(entityId: string, recordId: string, options?: EntityDeleteRecordByIdOptions): Promise<void>;
1945
2026
  /**
1946
2027
  * Gets all entities in the system
1947
2028
  *
@@ -2020,6 +2101,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2020
2101
  *
2021
2102
  * @param id - UUID of the entity
2022
2103
  * @param file - CSV file to import (Blob, File, or Uint8Array)
2104
+ * @param options - Optional {@link EntityImportRecordsByIdOptions} (e.g. `folderKey` for folder-scoped entities)
2023
2105
  * @returns Promise resolving to import result with record counts
2024
2106
  *
2025
2107
  * @example
@@ -2040,16 +2122,19 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2040
2122
  * if (result.errorFileLink) {
2041
2123
  * console.log(`Error file link: ${result.errorFileLink}`);
2042
2124
  * }
2125
+ *
2126
+ * // Folder-scoped entity: pass the entity's folder key
2127
+ * await entities.importRecordsById("<entityId>", fileInput.files[0], { folderKey: "<folderKey>" });
2043
2128
  * ```
2044
- * @internal
2045
2129
  */
2046
- importRecordsById(id: string, file: EntityFileType): Promise<EntityImportRecordsResponse>;
2130
+ importRecordsById(id: string, file: EntityFileType, options?: EntityImportRecordsByIdOptions): Promise<EntityImportRecordsResponse>;
2047
2131
  /**
2048
2132
  * Downloads an attachment from an entity record field
2049
2133
  *
2050
2134
  * @param entityId - UUID of the entity
2051
2135
  * @param recordId - UUID of the record containing the attachment
2052
2136
  * @param fieldName - Name of the File-type field containing the attachment
2137
+ * @param options - Optional {@link EntityDownloadAttachmentOptions} (e.g. `folderKey` for folder-scoped entities)
2053
2138
  * @returns Promise resolving to Blob containing the file content
2054
2139
  *
2055
2140
  * @example
@@ -2068,9 +2153,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2068
2153
  *
2069
2154
  * // Download attachment for a specific record and field
2070
2155
  * const blob = await entities.downloadAttachment(entityId, recordId, 'Documents');
2156
+ *
2157
+ * // Folder-scoped: pass the entity's folder key
2158
+ * const blob = await entities.downloadAttachment(entityId, recordId, 'Documents', { folderKey: "<folderKey>" });
2071
2159
  * ```
2072
2160
  */
2073
- downloadAttachment(entityId: string, recordId: string, fieldName: string): Promise<Blob>;
2161
+ downloadAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDownloadAttachmentOptions): Promise<Blob>;
2074
2162
  /**
2075
2163
  * Uploads an attachment to a File-type field of an entity record
2076
2164
  *
@@ -2078,7 +2166,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2078
2166
  * @param recordId - UUID of the record to upload the attachment to
2079
2167
  * @param fieldName - Name of the File-type field
2080
2168
  * @param file - File to upload (Blob, File, or Uint8Array)
2081
- * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel)
2169
+ * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. `expansionLevel`, `folderKey` for folder-scoped entities)
2082
2170
  * @returns Promise resolving to {@link EntityUploadAttachmentResponse}
2083
2171
  *
2084
2172
  * @example
@@ -2097,6 +2185,9 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2097
2185
  *
2098
2186
  * // Upload a file attachment
2099
2187
  * const response = await entities.uploadAttachment(entityId, recordId, 'Documents', file);
2188
+ *
2189
+ * // Folder-scoped entity: pass the entity's folder key
2190
+ * await entities.uploadAttachment(entityId, recordId, 'Documents', file, { folderKey: "<folderKey>" });
2100
2191
  * ```
2101
2192
  */
2102
2193
  uploadAttachment(entityId: string, recordId: string, fieldName: string, file: EntityFileType, options?: EntityUploadAttachmentOptions): Promise<EntityUploadAttachmentResponse>;
@@ -2106,6 +2197,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2106
2197
  * @param entityId - UUID of the entity
2107
2198
  * @param recordId - UUID of the record containing the attachment
2108
2199
  * @param fieldName - Name of the File-type field containing the attachment
2200
+ * @param options - Optional {@link EntityDeleteAttachmentOptions} (e.g. `folderKey` for folder-scoped entities)
2109
2201
  * @returns Promise resolving to {@link EntityDeleteAttachmentResponse}
2110
2202
  *
2111
2203
  * @example
@@ -2124,9 +2216,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2124
2216
  *
2125
2217
  * // Delete attachment for a specific record and field
2126
2218
  * await entities.deleteAttachment(entityId, recordId, 'Documents');
2219
+ *
2220
+ * // Folder-scoped: pass the entity's folder key
2221
+ * await entities.deleteAttachment(entityId, recordId, 'Documents', { folderKey: "<folderKey>" });
2127
2222
  * ```
2128
2223
  */
2129
- deleteAttachment(entityId: string, recordId: string, fieldName: string): Promise<EntityDeleteAttachmentResponse>;
2224
+ deleteAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDeleteAttachmentOptions): Promise<EntityDeleteAttachmentResponse>;
2130
2225
  /**
2131
2226
  * @hidden
2132
2227
  * @deprecated Use {@link getAllRecords} instead.
@@ -2172,15 +2267,19 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2172
2267
  * Deletes a Data Fabric entity and all its records
2173
2268
  *
2174
2269
  * @param id - UUID of the entity to delete
2270
+ * @param options - Optional {@link EntityDeleteByIdOptions} (e.g. `folderKey` for folder-scoped entities)
2175
2271
  * @returns Promise resolving when the entity is deleted
2176
2272
  *
2177
2273
  * @example
2178
2274
  * ```typescript
2179
2275
  * await entities.deleteById("<entityId>");
2276
+ *
2277
+ * // Folder-scoped: pass the entity's folder key
2278
+ * await entities.deleteById("<entityId>", { folderKey: "<folderKey>" });
2180
2279
  * ```
2181
2280
  * @internal
2182
2281
  */
2183
- deleteById(id: string): Promise<void>;
2282
+ deleteById(id: string, options?: EntityDeleteByIdOptions): Promise<void>;
2184
2283
  /**
2185
2284
  * Updates an existing Data Fabric entity — schema and/or metadata.
2186
2285
  *
@@ -2226,6 +2325,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2226
2325
  * { id: "<fieldId>", lengthLimit: 1000 },
2227
2326
  * ],
2228
2327
  * });
2328
+ *
2329
+ * // Folder-scoped entity: add a field to an entity that lives in a non-tenant folder
2330
+ * await entities.updateById("<entityId>", {
2331
+ * folderKey: "<folderKey>",
2332
+ * addFields: [{ fieldName: "notes", type: EntityFieldDataType.MULTILINE_TEXT }],
2333
+ * });
2229
2334
  * ```
2230
2335
  * @internal
2231
2336
  */
@@ -2798,4 +2903,4 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
2798
2903
  }
2799
2904
 
2800
2905
  export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityAggregateFunction, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, LogicalOperator, QueryFilterOperator, ReferenceType, createEntityWithMethods };
2801
- export type { ChoiceSetCreateOptions, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, ChoiceSetUpdateOptions, ChoiceSetValueInsertOptions, ChoiceSetValueInsertResponse, ChoiceSetValueUpdateResponse, EntityAggregate, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityCreateFieldOptions, EntityCreateOptions, EntityDeleteAttachmentResponse, EntityDeleteOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityFieldBase, EntityFieldUpdateOptions, EntityFileType, EntityGetAllRecordsOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityImportRecordsResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityQueryFilter, EntityQueryFilterGroup, EntityQueryRecordsOptions, EntityQueryRecordsResponse, EntityQuerySortOption, EntityRecord, EntityRemoveFieldOptions, EntityServiceModel, EntityUpdateByIdOptions, EntityUpdateOptions, EntityUpdateRecordOptions, EntityUpdateRecordResponse, EntityUpdateRecordsOptions, EntityUpdateResponse, EntityUploadAttachmentOptions, EntityUploadAttachmentResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, RawEntityGetResponse, SourceJoinCriteria, SqlType };
2906
+ export type { ChoiceSetCreateOptions, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, ChoiceSetUpdateOptions, ChoiceSetValueInsertOptions, ChoiceSetValueInsertResponse, ChoiceSetValueUpdateResponse, EntityAggregate, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityCreateFieldOptions, EntityCreateOptions, EntityDeleteAttachmentOptions, EntityDeleteAttachmentResponse, EntityDeleteByIdOptions, EntityDeleteOptions, EntityDeleteRecordByIdOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityFieldBase, EntityFieldUpdateOptions, EntityFileType, EntityFolderScopedOptions, EntityGetAllRecordsOptions, EntityGetByIdOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityImportRecordsByIdOptions, EntityImportRecordsResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityQueryFilter, EntityQueryFilterGroup, EntityQueryRecordsOptions, EntityQueryRecordsResponse, EntityQuerySortOption, EntityRecord, EntityRemoveFieldOptions, EntityServiceModel, EntityUpdateByIdOptions, EntityUpdateOptions, EntityUpdateRecordOptions, EntityUpdateRecordResponse, EntityUpdateRecordsOptions, EntityUpdateResponse, EntityUploadAttachmentOptions, EntityUploadAttachmentResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, RawEntityGetResponse, SourceJoinCriteria, SqlType };