@uipath/uipath-typescript 1.3.10 → 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 +192 -10
  17. package/dist/cases/index.d.ts +208 -7
  18. package/dist/cases/index.mjs +192 -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 +135 -70
  26. package/dist/entities/index.d.ts +146 -45
  27. package/dist/entities/index.mjs +135 -70
  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 +1050 -291
  35. package/dist/index.d.ts +1313 -134
  36. package/dist/index.mjs +1050 -292
  37. package/dist/index.umd.js +4546 -3770
  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 +224 -18
  42. package/dist/maestro-processes/index.d.ts +221 -9
  43. package/dist/maestro-processes/index.mjs +224 -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 +1933 -0
  54. package/dist/traces/index.d.ts +566 -0
  55. package/dist/traces/index.mjs +1931 -0
  56. package/package.json +42 -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
  */
@@ -549,6 +560,8 @@ interface EntityFieldBase {
549
560
  isRbacEnabled?: boolean;
550
561
  /** Whether the field value is encrypted at rest (default: false) */
551
562
  isEncrypted?: boolean;
563
+ /** Whether the field is hidden from the UI (default: false) */
564
+ isHiddenField?: boolean;
552
565
  /** Default value for the field */
553
566
  defaultValue?: string;
554
567
  /** Maximum character length for STRING fields (default: 200, range: 1–4000) and MULTILINE_TEXT fields (default: 200, range: 1–10000). */
@@ -573,21 +586,37 @@ interface EntityCreateFieldOptions extends EntityFieldBase {
573
586
  type?: EntityFieldDataType;
574
587
  /** Choice set ID for choice-set fields */
575
588
  choiceSetId?: string;
576
- /** Name of the referenced entity for relationship fields */
577
- referenceEntityName?: string;
578
- /** Name of the field in the referenced entity */
579
- referenceFieldName?: string;
589
+ /** UUID of the referenced entity (required when `type` is `RELATIONSHIP` or `FILE`) */
590
+ referenceEntityId?: string;
591
+ /** UUID of the referenced field on the target entity (required when `type` is `RELATIONSHIP` or `FILE`) */
592
+ referenceFieldId?: string;
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 {
580
611
  }
581
612
  /**
582
613
  * Options for creating a new Data Fabric entity
583
614
  */
584
- interface EntityCreateOptions {
615
+ interface EntityCreateOptions extends EntityFolderScopedOptions {
585
616
  /** Human-readable display name shown in the UI (defaults to `name` if omitted) */
586
617
  displayName?: string;
587
618
  /** Optional entity description */
588
619
  description?: string;
589
- /** UUID of the folder to place the entity in (defaults to the tenant-level folder) */
590
- folderKey?: string;
591
620
  /** Whether role-based access control is enabled for this entity (default: false) */
592
621
  isRbacEnabled?: boolean;
593
622
  /** Whether Analytics integration is enabled for this entity (default: false) */
@@ -616,7 +645,7 @@ interface EntityRemoveFieldOptions {
616
645
  * (`displayName`, `description`, `isRbacEnabled`) can be combined; each is applied
617
646
  * only when the corresponding fields are provided.
618
647
  */
619
- interface EntityUpdateByIdOptions {
648
+ interface EntityUpdateByIdOptions extends EntityFolderScopedOptions {
620
649
  /** New fields to add */
621
650
  addFields?: EntityCreateFieldOptions[];
622
651
  /** Fields to remove, each identified by field name */
@@ -648,10 +677,20 @@ type EntityFileType = Blob | File | Uint8Array;
648
677
  /**
649
678
  * Optional options for uploading an attachment to an entity record
650
679
  */
651
- interface EntityUploadAttachmentOptions {
680
+ interface EntityUploadAttachmentOptions extends EntityFolderScopedOptions {
652
681
  /** Optional expansion level (default: 0) */
653
682
  expansionLevel?: number;
654
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
+ }
655
694
  /**
656
695
  * Response from uploading an attachment to an entity record
657
696
  */
@@ -806,10 +845,6 @@ interface FieldMetaData {
806
845
  referenceType?: ReferenceType;
807
846
  choiceSetId?: string;
808
847
  defaultValue?: string;
809
- /** Name of the referenced entity (used on write payloads for relationship fields) */
810
- referenceEntityName?: string;
811
- /** Name of the field in the referenced entity (used on write payloads for relationship fields) */
812
- referenceFieldName?: string;
813
848
  }
814
849
  /**
815
850
  * External object details
@@ -955,6 +990,7 @@ interface EntityServiceModel {
955
990
  * Gets entity metadata by entity ID with attached operation methods
956
991
  *
957
992
  * @param id - UUID of the entity
993
+ * @param options - Optional {@link EntityGetByIdOptions} (e.g. `folderKey` for folder-scoped entities)
958
994
  * @returns Promise resolving to entity metadata with operation methods
959
995
  * {@link EntityGetResponse}
960
996
  * @example
@@ -967,6 +1003,9 @@ interface EntityServiceModel {
967
1003
  * // Get entity metadata with methods
968
1004
  * const entity = await entities.getById("<entityId>");
969
1005
  *
1006
+ * // Folder-scoped: pass the entity's folder key
1007
+ * const folderEntity = await entities.getById("<entityId>", { folderKey: "<folderKey>" });
1008
+ *
970
1009
  * // Call operations directly on the entity
971
1010
  * const records = await entity.getAllRecords();
972
1011
  *
@@ -986,7 +1025,7 @@ interface EntityServiceModel {
986
1025
  * ]);
987
1026
  * ```
988
1027
  */
989
- getById(id: string): Promise<EntityGetResponse>;
1028
+ getById(id: string, options?: EntityGetByIdOptions): Promise<EntityGetResponse>;
990
1029
  /**
991
1030
  * Gets entity records by entity ID
992
1031
  *
@@ -1190,6 +1229,7 @@ interface EntityServiceModel {
1190
1229
  *
1191
1230
  * @param entityId - UUID of the entity
1192
1231
  * @param recordId - UUID of the record to delete
1232
+ * @param options - Optional {@link EntityDeleteRecordByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1193
1233
  * @returns Promise resolving to void on success
1194
1234
  * @example
1195
1235
  * ```typescript
@@ -1198,9 +1238,12 @@ interface EntityServiceModel {
1198
1238
  * const entities = new Entities(sdk);
1199
1239
  *
1200
1240
  * await entities.deleteRecordById("<entityId>", "<recordId>");
1241
+ *
1242
+ * // Folder-scoped: pass the entity's folder key
1243
+ * await entities.deleteRecordById("<entityId>", "<recordId>", { folderKey: "<folderKey>" });
1201
1244
  * ```
1202
1245
  */
1203
- deleteRecordById(entityId: string, recordId: string): Promise<void>;
1246
+ deleteRecordById(entityId: string, recordId: string, options?: EntityDeleteRecordByIdOptions): Promise<void>;
1204
1247
  /**
1205
1248
  * Queries entity records with filters, sorting, aggregates, and SDK-managed pagination
1206
1249
  *
@@ -1254,6 +1297,7 @@ interface EntityServiceModel {
1254
1297
  *
1255
1298
  * @param id - UUID of the entity
1256
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)
1257
1301
  * @returns Promise resolving to {@link EntityImportRecordsResponse} with record counts
1258
1302
  * @example
1259
1303
  * ```typescript
@@ -1261,16 +1305,19 @@ interface EntityServiceModel {
1261
1305
  * const fileInput = document.getElementById('csv-input') as HTMLInputElement;
1262
1306
  * const result = await entities.importRecordsById(<id>, fileInput.files[0]);
1263
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>" });
1264
1311
  * ```
1265
- * @internal
1266
1312
  */
1267
- importRecordsById(id: string, file: EntityFileType): Promise<EntityImportRecordsResponse>;
1313
+ importRecordsById(id: string, file: EntityFileType, options?: EntityImportRecordsByIdOptions): Promise<EntityImportRecordsResponse>;
1268
1314
  /**
1269
1315
  * Downloads an attachment stored in a File-type field of an entity record.
1270
1316
  *
1271
1317
  * @param entityId - UUID of the entity
1272
1318
  * @param recordId - UUID of the record containing the attachment
1273
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)
1274
1321
  * @returns Promise resolving to Blob containing the file content
1275
1322
  * @example
1276
1323
  * ```typescript
@@ -1317,7 +1364,7 @@ interface EntityServiceModel {
1317
1364
  * fs.writeFileSync('attachment.pdf', buffer);
1318
1365
  * ```
1319
1366
  */
1320
- downloadAttachment(entityId: string, recordId: string, fieldName: string): Promise<Blob>;
1367
+ downloadAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDownloadAttachmentOptions): Promise<Blob>;
1321
1368
  /**
1322
1369
  * Uploads an attachment to a File-type field of an entity record.
1323
1370
  *
@@ -1327,7 +1374,7 @@ interface EntityServiceModel {
1327
1374
  * @param recordId - UUID of the record to upload the attachment to
1328
1375
  * @param fieldName - Name of the File-type field
1329
1376
  * @param file - File to upload (Blob, File, or Uint8Array)
1330
- * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel)
1377
+ * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. `expansionLevel`, `folderKey` for folder-scoped entities)
1331
1378
  * @returns Promise resolving to {@link EntityUploadAttachmentResponse}
1332
1379
  * @example
1333
1380
  * ```typescript
@@ -1348,6 +1395,9 @@ interface EntityServiceModel {
1348
1395
  * const file = fileInput.files[0];
1349
1396
  * const response = await entities.uploadAttachment(entityId, recordId, 'Documents', file);
1350
1397
  *
1398
+ * // Folder-scoped entity: pass the entity's folder key
1399
+ * await entities.uploadAttachment(entityId, recordId, 'Documents', file, { folderKey: "<folderKey>" });
1400
+ *
1351
1401
  * // Node.js: Upload a file from disk
1352
1402
  * const fileBuffer = fs.readFileSync('document.pdf');
1353
1403
  * const blob = new Blob([fileBuffer], { type: 'application/pdf' });
@@ -1361,6 +1411,7 @@ interface EntityServiceModel {
1361
1411
  * @param entityId - UUID of the entity
1362
1412
  * @param recordId - UUID of the record containing the attachment
1363
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)
1364
1415
  * @returns Promise resolving to {@link EntityDeleteAttachmentResponse}
1365
1416
  * @example
1366
1417
  * ```typescript
@@ -1384,7 +1435,7 @@ interface EntityServiceModel {
1384
1435
  * await entity.deleteAttachment(recordId, 'Documents');
1385
1436
  * ```
1386
1437
  */
1387
- deleteAttachment(entityId: string, recordId: string, fieldName: string): Promise<EntityDeleteAttachmentResponse>;
1438
+ deleteAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDeleteAttachmentOptions): Promise<EntityDeleteAttachmentResponse>;
1388
1439
  /**
1389
1440
  * Creates a new Data Fabric entity with the given schema
1390
1441
  *
@@ -1418,14 +1469,18 @@ interface EntityServiceModel {
1418
1469
  * Deletes a Data Fabric entity and all its records
1419
1470
  *
1420
1471
  * @param id - UUID of the entity to delete
1472
+ * @param options - Optional {@link EntityDeleteByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1421
1473
  * @returns Promise resolving when the entity is deleted
1422
1474
  * @example
1423
1475
  * ```typescript
1424
1476
  * await entities.deleteById(<id>);
1477
+ *
1478
+ * // Folder-scoped: pass the entity's folder key
1479
+ * await entities.deleteById(<id>, { folderKey: "<folderKey>" });
1425
1480
  * ```
1426
1481
  * @internal
1427
1482
  */
1428
- deleteById(id: string): Promise<void>;
1483
+ deleteById(id: string, options?: EntityDeleteByIdOptions): Promise<void>;
1429
1484
  /**
1430
1485
  * Updates an existing Data Fabric entity — schema and/or metadata.
1431
1486
  *
@@ -1434,7 +1489,6 @@ interface EntityServiceModel {
1434
1489
  * only when the corresponding fields are provided.
1435
1490
  *
1436
1491
  * @param id - UUID of the entity to update
1437
- * @param name - name of the entity (required by the API)
1438
1492
  * @param options - Changes to apply ({@link EntityUpdateByIdOptions})
1439
1493
  * @returns Promise resolving when the update is complete
1440
1494
  *
@@ -1468,6 +1522,12 @@ interface EntityServiceModel {
1468
1522
  * { id: <fieldId>, lengthLimit: 1000 },
1469
1523
  * ],
1470
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
+ * });
1471
1531
  * ```
1472
1532
  * @internal
1473
1533
  */
@@ -1540,9 +1600,10 @@ interface EntityMethods {
1540
1600
  * Use this method if you need trigger events to fire for the deleted record.
1541
1601
  *
1542
1602
  * @param recordId - UUID of the record to delete
1603
+ * @param options - Optional {@link EntityDeleteRecordByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1543
1604
  * @returns Promise resolving to void on success
1544
1605
  */
1545
- deleteRecord(recordId: string): Promise<void>;
1606
+ deleteRecord(recordId: string, options?: EntityDeleteRecordByIdOptions): Promise<void>;
1546
1607
  /**
1547
1608
  * Get all records from this entity
1548
1609
  *
@@ -1563,16 +1624,17 @@ interface EntityMethods {
1563
1624
  *
1564
1625
  * @param recordId - UUID of the record containing the attachment
1565
1626
  * @param fieldName - Name of the File-type field containing the attachment
1627
+ * @param options - Optional {@link EntityDownloadAttachmentOptions} (e.g. folderKey)
1566
1628
  * @returns Promise resolving to Blob containing the file content
1567
1629
  */
1568
- downloadAttachment(recordId: string, fieldName: string): Promise<Blob>;
1630
+ downloadAttachment(recordId: string, fieldName: string, options?: EntityDownloadAttachmentOptions): Promise<Blob>;
1569
1631
  /**
1570
1632
  * Uploads an attachment to a File-type field of an entity record
1571
1633
  *
1572
1634
  * @param recordId - UUID of the record to upload the attachment to
1573
1635
  * @param fieldName - Name of the File-type field
1574
1636
  * @param file - File to upload (Blob, File, or Uint8Array)
1575
- * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel)
1637
+ * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel, folderKey)
1576
1638
  * @returns Promise resolving to {@link EntityUploadAttachmentResponse}
1577
1639
  */
1578
1640
  uploadAttachment(recordId: string, fieldName: string, file: EntityFileType, options?: EntityUploadAttachmentOptions): Promise<EntityUploadAttachmentResponse>;
@@ -1581,9 +1643,10 @@ interface EntityMethods {
1581
1643
  *
1582
1644
  * @param recordId - UUID of the record containing the attachment
1583
1645
  * @param fieldName - Name of the File-type field containing the attachment
1646
+ * @param options - Optional {@link EntityDeleteAttachmentOptions} (e.g. folderKey)
1584
1647
  * @returns Promise resolving to {@link EntityDeleteAttachmentResponse}
1585
1648
  */
1586
- deleteAttachment(recordId: string, fieldName: string): Promise<EntityDeleteAttachmentResponse>;
1649
+ deleteAttachment(recordId: string, fieldName: string, options?: EntityDeleteAttachmentOptions): Promise<EntityDeleteAttachmentResponse>;
1587
1650
  /**
1588
1651
  * @deprecated Use {@link insertRecord} instead.
1589
1652
  * @hidden
@@ -1639,6 +1702,7 @@ interface EntityMethods {
1639
1702
  * Imports records from a CSV file into this entity
1640
1703
  *
1641
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)
1642
1706
  * @returns Promise resolving to {@link EntityImportRecordsResponse} with record counts
1643
1707
  * @example
1644
1708
  * ```typescript
@@ -1646,9 +1710,12 @@ interface EntityMethods {
1646
1710
  * const fileInput = document.getElementById('csv-input') as HTMLInputElement;
1647
1711
  * const result = await entity.importRecords(fileInput.files[0]);
1648
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>" });
1649
1716
  * ```
1650
1717
  */
1651
- importRecords(file: EntityFileType): Promise<EntityImportRecordsResponse>;
1718
+ importRecords(file: EntityFileType, options?: EntityImportRecordsByIdOptions): Promise<EntityImportRecordsResponse>;
1652
1719
  /**
1653
1720
  * @deprecated Use {@link getAllRecords} instead.
1654
1721
  * @hidden
@@ -1657,15 +1724,19 @@ interface EntityMethods {
1657
1724
  /**
1658
1725
  * Deletes this entity and all its records
1659
1726
  *
1727
+ * @param options - Optional {@link EntityDeleteByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1660
1728
  * @returns Promise resolving when the entity is deleted
1661
1729
  * @example
1662
1730
  * ```typescript
1663
1731
  * const entity = await entities.getById(<id>);
1664
1732
  * await entity.delete();
1733
+ *
1734
+ * // Folder-scoped entity: pass the entity's folder key
1735
+ * await entity.delete({ folderKey: "<folderKey>" });
1665
1736
  * ```
1666
1737
  * @internal
1667
1738
  */
1668
- delete(): Promise<void>;
1739
+ delete(options?: EntityDeleteByIdOptions): Promise<void>;
1669
1740
  /**
1670
1741
  * Updates this entity — schema and/or metadata.
1671
1742
  *
@@ -1712,6 +1783,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1712
1783
  * Gets entity metadata by entity ID with attached operation methods
1713
1784
  *
1714
1785
  * @param id - UUID of the entity
1786
+ * @param options - Optional {@link EntityGetByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1715
1787
  * @returns Promise resolving to entity metadata with schema information and operation methods
1716
1788
  *
1717
1789
  * @example
@@ -1721,6 +1793,9 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1721
1793
  * const entities = new Entities(sdk);
1722
1794
  * const entity = await entities.getById("<entityId>");
1723
1795
  *
1796
+ * // Folder-scoped: pass the entity's folder key
1797
+ * const folderEntity = await entities.getById("<entityId>", { folderKey: "<folderKey>" });
1798
+ *
1724
1799
  * // Call operations directly on the entity
1725
1800
  * const records = await entity.getAllRecords();
1726
1801
  *
@@ -1734,7 +1809,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1734
1809
  * ]);
1735
1810
  * ```
1736
1811
  */
1737
- getById(id: string): Promise<EntityGetResponse>;
1812
+ getById(id: string, options?: EntityGetByIdOptions): Promise<EntityGetResponse>;
1738
1813
  /**
1739
1814
  * Gets entity records by entity ID
1740
1815
  *
@@ -1933,6 +2008,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1933
2008
  *
1934
2009
  * @param entityId - UUID of the entity
1935
2010
  * @param recordId - UUID of the record to delete
2011
+ * @param options - Optional {@link EntityDeleteRecordByIdOptions} (e.g. `folderKey` for folder-scoped entities)
1936
2012
  * @returns Promise resolving to void on success
1937
2013
  * @example
1938
2014
  * ```typescript
@@ -1941,9 +2017,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1941
2017
  * const entities = new Entities(sdk);
1942
2018
  *
1943
2019
  * await entities.deleteRecordById("<entityId>", "<recordId>");
2020
+ *
2021
+ * // Folder-scoped: pass the entity's folder key
2022
+ * await entities.deleteRecordById("<entityId>", "<recordId>", { folderKey: "<folderKey>" });
1944
2023
  * ```
1945
2024
  */
1946
- deleteRecordById(entityId: string, recordId: string): Promise<void>;
2025
+ deleteRecordById(entityId: string, recordId: string, options?: EntityDeleteRecordByIdOptions): Promise<void>;
1947
2026
  /**
1948
2027
  * Gets all entities in the system
1949
2028
  *
@@ -2022,6 +2101,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2022
2101
  *
2023
2102
  * @param id - UUID of the entity
2024
2103
  * @param file - CSV file to import (Blob, File, or Uint8Array)
2104
+ * @param options - Optional {@link EntityImportRecordsByIdOptions} (e.g. `folderKey` for folder-scoped entities)
2025
2105
  * @returns Promise resolving to import result with record counts
2026
2106
  *
2027
2107
  * @example
@@ -2042,16 +2122,19 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2042
2122
  * if (result.errorFileLink) {
2043
2123
  * console.log(`Error file link: ${result.errorFileLink}`);
2044
2124
  * }
2125
+ *
2126
+ * // Folder-scoped entity: pass the entity's folder key
2127
+ * await entities.importRecordsById("<entityId>", fileInput.files[0], { folderKey: "<folderKey>" });
2045
2128
  * ```
2046
- * @internal
2047
2129
  */
2048
- importRecordsById(id: string, file: EntityFileType): Promise<EntityImportRecordsResponse>;
2130
+ importRecordsById(id: string, file: EntityFileType, options?: EntityImportRecordsByIdOptions): Promise<EntityImportRecordsResponse>;
2049
2131
  /**
2050
2132
  * Downloads an attachment from an entity record field
2051
2133
  *
2052
2134
  * @param entityId - UUID of the entity
2053
2135
  * @param recordId - UUID of the record containing the attachment
2054
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)
2055
2138
  * @returns Promise resolving to Blob containing the file content
2056
2139
  *
2057
2140
  * @example
@@ -2070,9 +2153,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2070
2153
  *
2071
2154
  * // Download attachment for a specific record and field
2072
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>" });
2073
2159
  * ```
2074
2160
  */
2075
- downloadAttachment(entityId: string, recordId: string, fieldName: string): Promise<Blob>;
2161
+ downloadAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDownloadAttachmentOptions): Promise<Blob>;
2076
2162
  /**
2077
2163
  * Uploads an attachment to a File-type field of an entity record
2078
2164
  *
@@ -2080,7 +2166,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2080
2166
  * @param recordId - UUID of the record to upload the attachment to
2081
2167
  * @param fieldName - Name of the File-type field
2082
2168
  * @param file - File to upload (Blob, File, or Uint8Array)
2083
- * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. expansionLevel)
2169
+ * @param options - Optional {@link EntityUploadAttachmentOptions} (e.g. `expansionLevel`, `folderKey` for folder-scoped entities)
2084
2170
  * @returns Promise resolving to {@link EntityUploadAttachmentResponse}
2085
2171
  *
2086
2172
  * @example
@@ -2099,6 +2185,9 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2099
2185
  *
2100
2186
  * // Upload a file attachment
2101
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>" });
2102
2191
  * ```
2103
2192
  */
2104
2193
  uploadAttachment(entityId: string, recordId: string, fieldName: string, file: EntityFileType, options?: EntityUploadAttachmentOptions): Promise<EntityUploadAttachmentResponse>;
@@ -2108,6 +2197,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2108
2197
  * @param entityId - UUID of the entity
2109
2198
  * @param recordId - UUID of the record containing the attachment
2110
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)
2111
2201
  * @returns Promise resolving to {@link EntityDeleteAttachmentResponse}
2112
2202
  *
2113
2203
  * @example
@@ -2126,9 +2216,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2126
2216
  *
2127
2217
  * // Delete attachment for a specific record and field
2128
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>" });
2129
2222
  * ```
2130
2223
  */
2131
- deleteAttachment(entityId: string, recordId: string, fieldName: string): Promise<EntityDeleteAttachmentResponse>;
2224
+ deleteAttachment(entityId: string, recordId: string, fieldName: string, options?: EntityDeleteAttachmentOptions): Promise<EntityDeleteAttachmentResponse>;
2132
2225
  /**
2133
2226
  * @hidden
2134
2227
  * @deprecated Use {@link getAllRecords} instead.
@@ -2174,15 +2267,19 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2174
2267
  * Deletes a Data Fabric entity and all its records
2175
2268
  *
2176
2269
  * @param id - UUID of the entity to delete
2270
+ * @param options - Optional {@link EntityDeleteByIdOptions} (e.g. `folderKey` for folder-scoped entities)
2177
2271
  * @returns Promise resolving when the entity is deleted
2178
2272
  *
2179
2273
  * @example
2180
2274
  * ```typescript
2181
2275
  * await entities.deleteById("<entityId>");
2276
+ *
2277
+ * // Folder-scoped: pass the entity's folder key
2278
+ * await entities.deleteById("<entityId>", { folderKey: "<folderKey>" });
2182
2279
  * ```
2183
2280
  * @internal
2184
2281
  */
2185
- deleteById(id: string): Promise<void>;
2282
+ deleteById(id: string, options?: EntityDeleteByIdOptions): Promise<void>;
2186
2283
  /**
2187
2284
  * Updates an existing Data Fabric entity — schema and/or metadata.
2188
2285
  *
@@ -2228,6 +2325,12 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2228
2325
  * { id: "<fieldId>", lengthLimit: 1000 },
2229
2326
  * ],
2230
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
+ * });
2231
2334
  * ```
2232
2335
  * @internal
2233
2336
  */
@@ -2296,8 +2399,6 @@ declare class EntityService extends BaseService implements EntityServiceModel {
2296
2399
  * override the defaults where the type accepts overrides.
2297
2400
  */
2298
2401
  private buildSqlTypeConstraints;
2299
- private static readonly RESERVED_FIELD_NAMES;
2300
- private validateName;
2301
2402
  }
2302
2403
 
2303
2404
  /**
@@ -2802,4 +2903,4 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
2802
2903
  }
2803
2904
 
2804
2905
  export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityAggregateFunction, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, LogicalOperator, QueryFilterOperator, ReferenceType, createEntityWithMethods };
2805
- 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 };