@uipath/uipath-typescript 1.0.0-beta.17 → 1.0.0-beta.18

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.
package/README.md CHANGED
@@ -327,7 +327,7 @@ const records = await sdk.entities.getRecordsById('entity-uuid', {
327
327
  });
328
328
 
329
329
  // Insert records
330
- await sdk.entities.insertById('entity-uuid', [
330
+ await sdk.entities.batchInsertById('entity-uuid', [
331
331
  { name: 'John Doe', email: 'john@company.com', status: 'Active' },
332
332
  { name: 'Jane Smith', email: 'jane@company.com', status: 'Active' }
333
333
  ]);
package/dist/index.cjs CHANGED
@@ -5937,7 +5937,8 @@ const DATA_FABRIC_ENDPOINTS = {
5937
5937
  GET_ALL: `${DATAFABRIC_BASE}/api/Entity`,
5938
5938
  GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
5939
5939
  GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
5940
- INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
5940
+ INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
5941
+ BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
5941
5942
  UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
5942
5943
  DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
5943
5944
  DOWNLOAD_ATTACHMENT: (entityName, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/${entityName}/${recordId}/${fieldName}`,
@@ -6374,6 +6375,11 @@ function createEntityMethods(entityData, service) {
6374
6375
  throw new Error('Entity ID is undefined');
6375
6376
  return service.insertById(entityData.id, data, options);
6376
6377
  },
6378
+ async batchInsert(data, options) {
6379
+ if (!entityData.id)
6380
+ throw new Error('Entity ID is undefined');
6381
+ return service.batchInsertById(entityData.id, data, options);
6382
+ },
6377
6383
  async update(data, options) {
6378
6384
  if (!entityData.id)
6379
6385
  throw new Error('Entity ID is undefined');
@@ -6561,7 +6567,7 @@ const EntityFieldTypeMap = {
6561
6567
  // Connection string placeholder that will be replaced during build
6562
6568
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
6563
6569
  // SDK Version placeholder
6564
- const SDK_VERSION = "1.0.0-beta.17";
6570
+ const SDK_VERSION = "1.0.0-beta.18";
6565
6571
  const VERSION = "Version";
6566
6572
  const SERVICE = "Service";
6567
6573
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6859,8 +6865,13 @@ class EntityService extends BaseService {
6859
6865
  * // Call operations directly on the entity
6860
6866
  * const records = await entity.getRecords();
6861
6867
  *
6862
- * const insertResult = await entity.insert([
6863
- * { name: "John", age: 30 }
6868
+ * // Insert a single record
6869
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
6870
+ *
6871
+ * // Or batch insert multiple records
6872
+ * const batchResult = await entity.batchInsert([
6873
+ * { name: "Jane", age: 25 },
6874
+ * { name: "Bob", age: 35 }
6864
6875
  * ]);
6865
6876
  * ```
6866
6877
  */
@@ -6922,7 +6933,38 @@ class EntityService extends BaseService {
6922
6933
  }, options);
6923
6934
  }
6924
6935
  /**
6925
- * Inserts data into an entity by entity ID
6936
+ * Inserts a single record into an entity by entity ID
6937
+ *
6938
+ * @param entityId - UUID of the entity
6939
+ * @param data - Record to insert
6940
+ * @param options - Insert options
6941
+ * @returns Promise resolving to the inserted record with generated record ID
6942
+ *
6943
+ * @example
6944
+ * ```typescript
6945
+ * // Basic usage
6946
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
6947
+ *
6948
+ * // With options
6949
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
6950
+ * expansionLevel: 1
6951
+ * });
6952
+ * ```
6953
+ */
6954
+ async insertById(id, data, options = {}) {
6955
+ const params = createParams({
6956
+ expansionLevel: options.expansionLevel
6957
+ });
6958
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.INSERT_BY_ID(id), data, {
6959
+ params,
6960
+ ...options
6961
+ });
6962
+ // Convert PascalCase response to camelCase
6963
+ const camelResponse = pascalToCamelCaseKeys(response.data);
6964
+ return camelResponse;
6965
+ }
6966
+ /**
6967
+ * Inserts data into an entity by entity ID using batch insert
6926
6968
  *
6927
6969
  * @param entityId - UUID of the entity
6928
6970
  * @param data - Array of records to insert
@@ -6932,13 +6974,13 @@ class EntityService extends BaseService {
6932
6974
  * @example
6933
6975
  * ```typescript
6934
6976
  * // Basic usage
6935
- * const result = await sdk.entities.insertById(<entityId>, [
6977
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
6936
6978
  * { name: "John", age: 30 },
6937
6979
  * { name: "Jane", age: 25 }
6938
6980
  * ]);
6939
6981
  *
6940
6982
  * // With options
6941
- * const result = await sdk.entities.insertById(<entityId>, [
6983
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
6942
6984
  * { name: "John", age: 30 },
6943
6985
  * { name: "Jane", age: 25 }
6944
6986
  * ], {
@@ -6947,12 +6989,12 @@ class EntityService extends BaseService {
6947
6989
  * });
6948
6990
  * ```
6949
6991
  */
6950
- async insertById(id, data, options = {}) {
6992
+ async batchInsertById(id, data, options = {}) {
6951
6993
  const params = createParams({
6952
6994
  expansionLevel: options.expansionLevel,
6953
6995
  failOnFirst: options.failOnFirst
6954
6996
  });
6955
- const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.INSERT_BY_ID(id), data, {
6997
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.BATCH_INSERT_BY_ID(id), data, {
6956
6998
  params,
6957
6999
  ...options
6958
7000
  });
@@ -7156,6 +7198,9 @@ __decorate([
7156
7198
  __decorate([
7157
7199
  track('Entities.InsertById')
7158
7200
  ], EntityService.prototype, "insertById", null);
7201
+ __decorate([
7202
+ track('Entities.BatchInsertById')
7203
+ ], EntityService.prototype, "batchInsertById", null);
7159
7204
  __decorate([
7160
7205
  track('Entities.UpdateById')
7161
7206
  ], EntityService.prototype, "updateById", null);
package/dist/index.d.cts CHANGED
@@ -457,9 +457,16 @@ interface EntityOperationOptions {
457
457
  failOnFirst?: boolean;
458
458
  }
459
459
  /**
460
- * Options for inserting data into an entity
460
+ * Options for inserting a single record into an entity
461
461
  */
462
- type EntityInsertOptions = EntityOperationOptions;
462
+ interface EntityInsertOptions {
463
+ /** Level of entity expansion (default: 0) */
464
+ expansionLevel?: number;
465
+ }
466
+ /**
467
+ * Options for batch inserting data into an entity
468
+ */
469
+ type EntityBatchInsertOptions = EntityOperationOptions;
463
470
  /**
464
471
  * Options for updating data in an entity
465
472
  */
@@ -501,9 +508,14 @@ interface EntityOperationResponse {
501
508
  failureRecords: FailureRecord[];
502
509
  }
503
510
  /**
504
- * Response from inserting data into an entity
511
+ * Response from inserting a single record into an entity
512
+ * Returns the inserted record with its generated record ID and other fields
513
+ */
514
+ type EntityInsertResponse = EntityRecord;
515
+ /**
516
+ * Response from batch inserting data into an entity
505
517
  */
506
- type EntityInsertResponse = EntityOperationResponse;
518
+ type EntityBatchInsertResponse = EntityOperationResponse;
507
519
  /**
508
520
  * Response from updating data in an entity
509
521
  */
@@ -715,8 +727,13 @@ interface EntityServiceModel {
715
727
  * const records = await customerEntity.getRecords();
716
728
  * console.log(`Customer records: ${records.items.length}`);
717
729
  *
718
- * const insertResult = await customerEntity.insert([
719
- * { name: "John", age: 30 }
730
+ * // Insert a single record
731
+ * const insertResult = await customerEntity.insert({ name: "John", age: 30 });
732
+ *
733
+ * // Or batch insert multiple records
734
+ * const batchResult = await customerEntity.batchInsert([
735
+ * { name: "Jane", age: 25 },
736
+ * { name: "Bob", age: 35 }
720
737
  * ]);
721
738
  * }
722
739
  * ```
@@ -742,8 +759,13 @@ interface EntityServiceModel {
742
759
  * const choiceSetValues = await sdk.entities.choicesets.getById(choiceSetId);
743
760
  * }
744
761
  *
745
- * const insertResult = await entity.insert([
746
- * { name: "John", age: 30 }
762
+ * // Insert a single record
763
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
764
+ *
765
+ * // Or batch insert multiple records
766
+ * const batchResult = await entity.batchInsert([
767
+ * { name: "Jane", age: 25 },
768
+ * { name: "Bob", age: 35 }
747
769
  * ]);
748
770
  * ```
749
771
  */
@@ -780,23 +802,49 @@ interface EntityServiceModel {
780
802
  */
781
803
  getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
782
804
  /**
783
- * Inserts data into an entity by entity ID
805
+ * Inserts a single record into an entity by entity ID
806
+ *
807
+ * Note: Data Fabric supports trigger events only on individual inserts, not on batch inserts.
808
+ * Use this method if you need trigger events to fire for the inserted record.
809
+ *
810
+ * @param id - UUID of the entity
811
+ * @param data - Record to insert
812
+ * @param options - Insert options
813
+ * @returns Promise resolving to the inserted record with generated record ID
814
+ * {@link EntityInsertResponse}
815
+ * @example
816
+ * ```typescript
817
+ * // Basic usage
818
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
819
+ *
820
+ * // With options
821
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
822
+ * expansionLevel: 1
823
+ * });
824
+ * ```
825
+ */
826
+ insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
827
+ /**
828
+ * Inserts one or more records into an entity by entity ID using batch insert
829
+ *
830
+ * Note: Batch inserts do not trigger Data Fabric trigger events. Use {@link insertById} if you need
831
+ * trigger events to fire for each inserted record.
784
832
  *
785
833
  * @param id - UUID of the entity
786
834
  * @param data - Array of records to insert
787
835
  * @param options - Insert options
788
836
  * @returns Promise resolving to insert response
789
- * {@link EntityInsertResponse}
837
+ * {@link EntityBatchInsertResponse}
790
838
  * @example
791
839
  * ```typescript
792
840
  * // Basic usage
793
- * const result = await sdk.entities.insertById(<entityId>, [
841
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
794
842
  * { name: "John", age: 30 },
795
843
  * { name: "Jane", age: 25 }
796
844
  * ]);
797
845
  *
798
846
  * // With options
799
- * const result = await sdk.entities.insertById(<entityId>, [
847
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
800
848
  * { name: "John", age: 30 },
801
849
  * { name: "Jane", age: 25 }
802
850
  * ], {
@@ -805,7 +853,7 @@ interface EntityServiceModel {
805
853
  * });
806
854
  * ```
807
855
  */
808
- insertById(id: string, data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
856
+ batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
809
857
  /**
810
858
  * Updates data in an entity by entity ID
811
859
  *
@@ -899,13 +947,27 @@ interface EntityServiceModel {
899
947
  */
900
948
  interface EntityMethods {
901
949
  /**
902
- * Insert data into this entity
950
+ * Insert a single record into this entity
951
+ *
952
+ * Note: Data Fabric supports trigger events only on individual inserts, not on batch inserts.
953
+ * Use this method if you need trigger events to fire for the inserted record.
954
+ *
955
+ * @param data - Record to insert
956
+ * @param options - Insert options
957
+ * @returns Promise resolving to the inserted record with generated record ID
958
+ */
959
+ insert(data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
960
+ /**
961
+ * Insert multiple records into this entity using batch insert
962
+ *
963
+ * Note: Batch inserts do not trigger Data Fabric trigger events. Use {@link insert} if you need
964
+ * trigger events to fire for each inserted record.
903
965
  *
904
966
  * @param data - Array of records to insert
905
967
  * @param options - Insert options
906
- * @returns Promise resolving to insert response
968
+ * @returns Promise resolving to batch insert response
907
969
  */
908
- insert(data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
970
+ batchInsert(data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
909
971
  /**
910
972
  * Update data in this entity
911
973
  *
@@ -974,8 +1036,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
974
1036
  * // Call operations directly on the entity
975
1037
  * const records = await entity.getRecords();
976
1038
  *
977
- * const insertResult = await entity.insert([
978
- * { name: "John", age: 30 }
1039
+ * // Insert a single record
1040
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
1041
+ *
1042
+ * // Or batch insert multiple records
1043
+ * const batchResult = await entity.batchInsert([
1044
+ * { name: "Jane", age: 25 },
1045
+ * { name: "Bob", age: 35 }
979
1046
  * ]);
980
1047
  * ```
981
1048
  */
@@ -1012,7 +1079,27 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1012
1079
  */
1013
1080
  getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
1014
1081
  /**
1015
- * Inserts data into an entity by entity ID
1082
+ * Inserts a single record into an entity by entity ID
1083
+ *
1084
+ * @param entityId - UUID of the entity
1085
+ * @param data - Record to insert
1086
+ * @param options - Insert options
1087
+ * @returns Promise resolving to the inserted record with generated record ID
1088
+ *
1089
+ * @example
1090
+ * ```typescript
1091
+ * // Basic usage
1092
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
1093
+ *
1094
+ * // With options
1095
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
1096
+ * expansionLevel: 1
1097
+ * });
1098
+ * ```
1099
+ */
1100
+ insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
1101
+ /**
1102
+ * Inserts data into an entity by entity ID using batch insert
1016
1103
  *
1017
1104
  * @param entityId - UUID of the entity
1018
1105
  * @param data - Array of records to insert
@@ -1022,13 +1109,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1022
1109
  * @example
1023
1110
  * ```typescript
1024
1111
  * // Basic usage
1025
- * const result = await sdk.entities.insertById(<entityId>, [
1112
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
1026
1113
  * { name: "John", age: 30 },
1027
1114
  * { name: "Jane", age: 25 }
1028
1115
  * ]);
1029
1116
  *
1030
1117
  * // With options
1031
- * const result = await sdk.entities.insertById(<entityId>, [
1118
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
1032
1119
  * { name: "John", age: 30 },
1033
1120
  * { name: "Jane", age: 25 }
1034
1121
  * ], {
@@ -1037,7 +1124,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1037
1124
  * });
1038
1125
  * ```
1039
1126
  */
1040
- insertById(id: string, data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
1127
+ batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
1041
1128
  /**
1042
1129
  * Updates data in an entity by entity ID
1043
1130
  *
@@ -5357,7 +5444,7 @@ declare const telemetryClient: TelemetryClient;
5357
5444
  * SDK Telemetry constants
5358
5445
  */
5359
5446
  declare const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
5360
- declare const SDK_VERSION = "1.0.0-beta.17";
5447
+ declare const SDK_VERSION = "1.0.0-beta.18";
5361
5448
  declare const VERSION = "Version";
5362
5449
  declare const SERVICE = "Service";
5363
5450
  declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5373,4 +5460,4 @@ declare const SDK_RUN_EVENT = "Sdk.Run";
5373
5460
  declare const UNKNOWN = "";
5374
5461
 
5375
5462
  export { APP_NAME, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, FieldDisplayType, HttpStatus, JobPriority, JobState, JobType, JoinType, MAX_PAGE_SIZE, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createCaseInstanceWithMethods, createEntityWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
5376
- export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
5463
+ export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
package/dist/index.d.mts CHANGED
@@ -457,9 +457,16 @@ interface EntityOperationOptions {
457
457
  failOnFirst?: boolean;
458
458
  }
459
459
  /**
460
- * Options for inserting data into an entity
460
+ * Options for inserting a single record into an entity
461
461
  */
462
- type EntityInsertOptions = EntityOperationOptions;
462
+ interface EntityInsertOptions {
463
+ /** Level of entity expansion (default: 0) */
464
+ expansionLevel?: number;
465
+ }
466
+ /**
467
+ * Options for batch inserting data into an entity
468
+ */
469
+ type EntityBatchInsertOptions = EntityOperationOptions;
463
470
  /**
464
471
  * Options for updating data in an entity
465
472
  */
@@ -501,9 +508,14 @@ interface EntityOperationResponse {
501
508
  failureRecords: FailureRecord[];
502
509
  }
503
510
  /**
504
- * Response from inserting data into an entity
511
+ * Response from inserting a single record into an entity
512
+ * Returns the inserted record with its generated record ID and other fields
513
+ */
514
+ type EntityInsertResponse = EntityRecord;
515
+ /**
516
+ * Response from batch inserting data into an entity
505
517
  */
506
- type EntityInsertResponse = EntityOperationResponse;
518
+ type EntityBatchInsertResponse = EntityOperationResponse;
507
519
  /**
508
520
  * Response from updating data in an entity
509
521
  */
@@ -715,8 +727,13 @@ interface EntityServiceModel {
715
727
  * const records = await customerEntity.getRecords();
716
728
  * console.log(`Customer records: ${records.items.length}`);
717
729
  *
718
- * const insertResult = await customerEntity.insert([
719
- * { name: "John", age: 30 }
730
+ * // Insert a single record
731
+ * const insertResult = await customerEntity.insert({ name: "John", age: 30 });
732
+ *
733
+ * // Or batch insert multiple records
734
+ * const batchResult = await customerEntity.batchInsert([
735
+ * { name: "Jane", age: 25 },
736
+ * { name: "Bob", age: 35 }
720
737
  * ]);
721
738
  * }
722
739
  * ```
@@ -742,8 +759,13 @@ interface EntityServiceModel {
742
759
  * const choiceSetValues = await sdk.entities.choicesets.getById(choiceSetId);
743
760
  * }
744
761
  *
745
- * const insertResult = await entity.insert([
746
- * { name: "John", age: 30 }
762
+ * // Insert a single record
763
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
764
+ *
765
+ * // Or batch insert multiple records
766
+ * const batchResult = await entity.batchInsert([
767
+ * { name: "Jane", age: 25 },
768
+ * { name: "Bob", age: 35 }
747
769
  * ]);
748
770
  * ```
749
771
  */
@@ -780,23 +802,49 @@ interface EntityServiceModel {
780
802
  */
781
803
  getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
782
804
  /**
783
- * Inserts data into an entity by entity ID
805
+ * Inserts a single record into an entity by entity ID
806
+ *
807
+ * Note: Data Fabric supports trigger events only on individual inserts, not on batch inserts.
808
+ * Use this method if you need trigger events to fire for the inserted record.
809
+ *
810
+ * @param id - UUID of the entity
811
+ * @param data - Record to insert
812
+ * @param options - Insert options
813
+ * @returns Promise resolving to the inserted record with generated record ID
814
+ * {@link EntityInsertResponse}
815
+ * @example
816
+ * ```typescript
817
+ * // Basic usage
818
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
819
+ *
820
+ * // With options
821
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
822
+ * expansionLevel: 1
823
+ * });
824
+ * ```
825
+ */
826
+ insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
827
+ /**
828
+ * Inserts one or more records into an entity by entity ID using batch insert
829
+ *
830
+ * Note: Batch inserts do not trigger Data Fabric trigger events. Use {@link insertById} if you need
831
+ * trigger events to fire for each inserted record.
784
832
  *
785
833
  * @param id - UUID of the entity
786
834
  * @param data - Array of records to insert
787
835
  * @param options - Insert options
788
836
  * @returns Promise resolving to insert response
789
- * {@link EntityInsertResponse}
837
+ * {@link EntityBatchInsertResponse}
790
838
  * @example
791
839
  * ```typescript
792
840
  * // Basic usage
793
- * const result = await sdk.entities.insertById(<entityId>, [
841
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
794
842
  * { name: "John", age: 30 },
795
843
  * { name: "Jane", age: 25 }
796
844
  * ]);
797
845
  *
798
846
  * // With options
799
- * const result = await sdk.entities.insertById(<entityId>, [
847
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
800
848
  * { name: "John", age: 30 },
801
849
  * { name: "Jane", age: 25 }
802
850
  * ], {
@@ -805,7 +853,7 @@ interface EntityServiceModel {
805
853
  * });
806
854
  * ```
807
855
  */
808
- insertById(id: string, data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
856
+ batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
809
857
  /**
810
858
  * Updates data in an entity by entity ID
811
859
  *
@@ -899,13 +947,27 @@ interface EntityServiceModel {
899
947
  */
900
948
  interface EntityMethods {
901
949
  /**
902
- * Insert data into this entity
950
+ * Insert a single record into this entity
951
+ *
952
+ * Note: Data Fabric supports trigger events only on individual inserts, not on batch inserts.
953
+ * Use this method if you need trigger events to fire for the inserted record.
954
+ *
955
+ * @param data - Record to insert
956
+ * @param options - Insert options
957
+ * @returns Promise resolving to the inserted record with generated record ID
958
+ */
959
+ insert(data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
960
+ /**
961
+ * Insert multiple records into this entity using batch insert
962
+ *
963
+ * Note: Batch inserts do not trigger Data Fabric trigger events. Use {@link insert} if you need
964
+ * trigger events to fire for each inserted record.
903
965
  *
904
966
  * @param data - Array of records to insert
905
967
  * @param options - Insert options
906
- * @returns Promise resolving to insert response
968
+ * @returns Promise resolving to batch insert response
907
969
  */
908
- insert(data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
970
+ batchInsert(data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
909
971
  /**
910
972
  * Update data in this entity
911
973
  *
@@ -974,8 +1036,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
974
1036
  * // Call operations directly on the entity
975
1037
  * const records = await entity.getRecords();
976
1038
  *
977
- * const insertResult = await entity.insert([
978
- * { name: "John", age: 30 }
1039
+ * // Insert a single record
1040
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
1041
+ *
1042
+ * // Or batch insert multiple records
1043
+ * const batchResult = await entity.batchInsert([
1044
+ * { name: "Jane", age: 25 },
1045
+ * { name: "Bob", age: 35 }
979
1046
  * ]);
980
1047
  * ```
981
1048
  */
@@ -1012,7 +1079,27 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1012
1079
  */
1013
1080
  getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
1014
1081
  /**
1015
- * Inserts data into an entity by entity ID
1082
+ * Inserts a single record into an entity by entity ID
1083
+ *
1084
+ * @param entityId - UUID of the entity
1085
+ * @param data - Record to insert
1086
+ * @param options - Insert options
1087
+ * @returns Promise resolving to the inserted record with generated record ID
1088
+ *
1089
+ * @example
1090
+ * ```typescript
1091
+ * // Basic usage
1092
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
1093
+ *
1094
+ * // With options
1095
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
1096
+ * expansionLevel: 1
1097
+ * });
1098
+ * ```
1099
+ */
1100
+ insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
1101
+ /**
1102
+ * Inserts data into an entity by entity ID using batch insert
1016
1103
  *
1017
1104
  * @param entityId - UUID of the entity
1018
1105
  * @param data - Array of records to insert
@@ -1022,13 +1109,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1022
1109
  * @example
1023
1110
  * ```typescript
1024
1111
  * // Basic usage
1025
- * const result = await sdk.entities.insertById(<entityId>, [
1112
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
1026
1113
  * { name: "John", age: 30 },
1027
1114
  * { name: "Jane", age: 25 }
1028
1115
  * ]);
1029
1116
  *
1030
1117
  * // With options
1031
- * const result = await sdk.entities.insertById(<entityId>, [
1118
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
1032
1119
  * { name: "John", age: 30 },
1033
1120
  * { name: "Jane", age: 25 }
1034
1121
  * ], {
@@ -1037,7 +1124,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1037
1124
  * });
1038
1125
  * ```
1039
1126
  */
1040
- insertById(id: string, data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
1127
+ batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
1041
1128
  /**
1042
1129
  * Updates data in an entity by entity ID
1043
1130
  *
@@ -5357,7 +5444,7 @@ declare const telemetryClient: TelemetryClient;
5357
5444
  * SDK Telemetry constants
5358
5445
  */
5359
5446
  declare const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
5360
- declare const SDK_VERSION = "1.0.0-beta.17";
5447
+ declare const SDK_VERSION = "1.0.0-beta.18";
5361
5448
  declare const VERSION = "Version";
5362
5449
  declare const SERVICE = "Service";
5363
5450
  declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5373,4 +5460,4 @@ declare const SDK_RUN_EVENT = "Sdk.Run";
5373
5460
  declare const UNKNOWN = "";
5374
5461
 
5375
5462
  export { APP_NAME, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, FieldDisplayType, HttpStatus, JobPriority, JobState, JobType, JoinType, MAX_PAGE_SIZE, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createCaseInstanceWithMethods, createEntityWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
5376
- export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
5463
+ export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
package/dist/index.d.ts CHANGED
@@ -457,9 +457,16 @@ interface EntityOperationOptions {
457
457
  failOnFirst?: boolean;
458
458
  }
459
459
  /**
460
- * Options for inserting data into an entity
460
+ * Options for inserting a single record into an entity
461
461
  */
462
- type EntityInsertOptions = EntityOperationOptions;
462
+ interface EntityInsertOptions {
463
+ /** Level of entity expansion (default: 0) */
464
+ expansionLevel?: number;
465
+ }
466
+ /**
467
+ * Options for batch inserting data into an entity
468
+ */
469
+ type EntityBatchInsertOptions = EntityOperationOptions;
463
470
  /**
464
471
  * Options for updating data in an entity
465
472
  */
@@ -501,9 +508,14 @@ interface EntityOperationResponse {
501
508
  failureRecords: FailureRecord[];
502
509
  }
503
510
  /**
504
- * Response from inserting data into an entity
511
+ * Response from inserting a single record into an entity
512
+ * Returns the inserted record with its generated record ID and other fields
513
+ */
514
+ type EntityInsertResponse = EntityRecord;
515
+ /**
516
+ * Response from batch inserting data into an entity
505
517
  */
506
- type EntityInsertResponse = EntityOperationResponse;
518
+ type EntityBatchInsertResponse = EntityOperationResponse;
507
519
  /**
508
520
  * Response from updating data in an entity
509
521
  */
@@ -715,8 +727,13 @@ interface EntityServiceModel {
715
727
  * const records = await customerEntity.getRecords();
716
728
  * console.log(`Customer records: ${records.items.length}`);
717
729
  *
718
- * const insertResult = await customerEntity.insert([
719
- * { name: "John", age: 30 }
730
+ * // Insert a single record
731
+ * const insertResult = await customerEntity.insert({ name: "John", age: 30 });
732
+ *
733
+ * // Or batch insert multiple records
734
+ * const batchResult = await customerEntity.batchInsert([
735
+ * { name: "Jane", age: 25 },
736
+ * { name: "Bob", age: 35 }
720
737
  * ]);
721
738
  * }
722
739
  * ```
@@ -742,8 +759,13 @@ interface EntityServiceModel {
742
759
  * const choiceSetValues = await sdk.entities.choicesets.getById(choiceSetId);
743
760
  * }
744
761
  *
745
- * const insertResult = await entity.insert([
746
- * { name: "John", age: 30 }
762
+ * // Insert a single record
763
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
764
+ *
765
+ * // Or batch insert multiple records
766
+ * const batchResult = await entity.batchInsert([
767
+ * { name: "Jane", age: 25 },
768
+ * { name: "Bob", age: 35 }
747
769
  * ]);
748
770
  * ```
749
771
  */
@@ -780,23 +802,49 @@ interface EntityServiceModel {
780
802
  */
781
803
  getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
782
804
  /**
783
- * Inserts data into an entity by entity ID
805
+ * Inserts a single record into an entity by entity ID
806
+ *
807
+ * Note: Data Fabric supports trigger events only on individual inserts, not on batch inserts.
808
+ * Use this method if you need trigger events to fire for the inserted record.
809
+ *
810
+ * @param id - UUID of the entity
811
+ * @param data - Record to insert
812
+ * @param options - Insert options
813
+ * @returns Promise resolving to the inserted record with generated record ID
814
+ * {@link EntityInsertResponse}
815
+ * @example
816
+ * ```typescript
817
+ * // Basic usage
818
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
819
+ *
820
+ * // With options
821
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
822
+ * expansionLevel: 1
823
+ * });
824
+ * ```
825
+ */
826
+ insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
827
+ /**
828
+ * Inserts one or more records into an entity by entity ID using batch insert
829
+ *
830
+ * Note: Batch inserts do not trigger Data Fabric trigger events. Use {@link insertById} if you need
831
+ * trigger events to fire for each inserted record.
784
832
  *
785
833
  * @param id - UUID of the entity
786
834
  * @param data - Array of records to insert
787
835
  * @param options - Insert options
788
836
  * @returns Promise resolving to insert response
789
- * {@link EntityInsertResponse}
837
+ * {@link EntityBatchInsertResponse}
790
838
  * @example
791
839
  * ```typescript
792
840
  * // Basic usage
793
- * const result = await sdk.entities.insertById(<entityId>, [
841
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
794
842
  * { name: "John", age: 30 },
795
843
  * { name: "Jane", age: 25 }
796
844
  * ]);
797
845
  *
798
846
  * // With options
799
- * const result = await sdk.entities.insertById(<entityId>, [
847
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
800
848
  * { name: "John", age: 30 },
801
849
  * { name: "Jane", age: 25 }
802
850
  * ], {
@@ -805,7 +853,7 @@ interface EntityServiceModel {
805
853
  * });
806
854
  * ```
807
855
  */
808
- insertById(id: string, data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
856
+ batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
809
857
  /**
810
858
  * Updates data in an entity by entity ID
811
859
  *
@@ -899,13 +947,27 @@ interface EntityServiceModel {
899
947
  */
900
948
  interface EntityMethods {
901
949
  /**
902
- * Insert data into this entity
950
+ * Insert a single record into this entity
951
+ *
952
+ * Note: Data Fabric supports trigger events only on individual inserts, not on batch inserts.
953
+ * Use this method if you need trigger events to fire for the inserted record.
954
+ *
955
+ * @param data - Record to insert
956
+ * @param options - Insert options
957
+ * @returns Promise resolving to the inserted record with generated record ID
958
+ */
959
+ insert(data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
960
+ /**
961
+ * Insert multiple records into this entity using batch insert
962
+ *
963
+ * Note: Batch inserts do not trigger Data Fabric trigger events. Use {@link insert} if you need
964
+ * trigger events to fire for each inserted record.
903
965
  *
904
966
  * @param data - Array of records to insert
905
967
  * @param options - Insert options
906
- * @returns Promise resolving to insert response
968
+ * @returns Promise resolving to batch insert response
907
969
  */
908
- insert(data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
970
+ batchInsert(data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
909
971
  /**
910
972
  * Update data in this entity
911
973
  *
@@ -974,8 +1036,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
974
1036
  * // Call operations directly on the entity
975
1037
  * const records = await entity.getRecords();
976
1038
  *
977
- * const insertResult = await entity.insert([
978
- * { name: "John", age: 30 }
1039
+ * // Insert a single record
1040
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
1041
+ *
1042
+ * // Or batch insert multiple records
1043
+ * const batchResult = await entity.batchInsert([
1044
+ * { name: "Jane", age: 25 },
1045
+ * { name: "Bob", age: 35 }
979
1046
  * ]);
980
1047
  * ```
981
1048
  */
@@ -1012,7 +1079,27 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1012
1079
  */
1013
1080
  getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
1014
1081
  /**
1015
- * Inserts data into an entity by entity ID
1082
+ * Inserts a single record into an entity by entity ID
1083
+ *
1084
+ * @param entityId - UUID of the entity
1085
+ * @param data - Record to insert
1086
+ * @param options - Insert options
1087
+ * @returns Promise resolving to the inserted record with generated record ID
1088
+ *
1089
+ * @example
1090
+ * ```typescript
1091
+ * // Basic usage
1092
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
1093
+ *
1094
+ * // With options
1095
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
1096
+ * expansionLevel: 1
1097
+ * });
1098
+ * ```
1099
+ */
1100
+ insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
1101
+ /**
1102
+ * Inserts data into an entity by entity ID using batch insert
1016
1103
  *
1017
1104
  * @param entityId - UUID of the entity
1018
1105
  * @param data - Array of records to insert
@@ -1022,13 +1109,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1022
1109
  * @example
1023
1110
  * ```typescript
1024
1111
  * // Basic usage
1025
- * const result = await sdk.entities.insertById(<entityId>, [
1112
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
1026
1113
  * { name: "John", age: 30 },
1027
1114
  * { name: "Jane", age: 25 }
1028
1115
  * ]);
1029
1116
  *
1030
1117
  * // With options
1031
- * const result = await sdk.entities.insertById(<entityId>, [
1118
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
1032
1119
  * { name: "John", age: 30 },
1033
1120
  * { name: "Jane", age: 25 }
1034
1121
  * ], {
@@ -1037,7 +1124,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1037
1124
  * });
1038
1125
  * ```
1039
1126
  */
1040
- insertById(id: string, data: Record<string, any>[], options?: EntityInsertOptions): Promise<EntityInsertResponse>;
1127
+ batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
1041
1128
  /**
1042
1129
  * Updates data in an entity by entity ID
1043
1130
  *
@@ -5357,7 +5444,7 @@ declare const telemetryClient: TelemetryClient;
5357
5444
  * SDK Telemetry constants
5358
5445
  */
5359
5446
  declare const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
5360
- declare const SDK_VERSION = "1.0.0-beta.17";
5447
+ declare const SDK_VERSION = "1.0.0-beta.18";
5361
5448
  declare const VERSION = "Version";
5362
5449
  declare const SERVICE = "Service";
5363
5450
  declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5373,4 +5460,4 @@ declare const SDK_RUN_EVENT = "Sdk.Run";
5373
5460
  declare const UNKNOWN = "";
5374
5461
 
5375
5462
  export { APP_NAME, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, FieldDisplayType, HttpStatus, JobPriority, JobState, JobType, JoinType, MAX_PAGE_SIZE, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createCaseInstanceWithMethods, createEntityWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
5376
- export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
5463
+ export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
package/dist/index.mjs CHANGED
@@ -5935,7 +5935,8 @@ const DATA_FABRIC_ENDPOINTS = {
5935
5935
  GET_ALL: `${DATAFABRIC_BASE}/api/Entity`,
5936
5936
  GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
5937
5937
  GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
5938
- INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
5938
+ INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
5939
+ BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
5939
5940
  UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
5940
5941
  DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
5941
5942
  DOWNLOAD_ATTACHMENT: (entityName, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/${entityName}/${recordId}/${fieldName}`,
@@ -6372,6 +6373,11 @@ function createEntityMethods(entityData, service) {
6372
6373
  throw new Error('Entity ID is undefined');
6373
6374
  return service.insertById(entityData.id, data, options);
6374
6375
  },
6376
+ async batchInsert(data, options) {
6377
+ if (!entityData.id)
6378
+ throw new Error('Entity ID is undefined');
6379
+ return service.batchInsertById(entityData.id, data, options);
6380
+ },
6375
6381
  async update(data, options) {
6376
6382
  if (!entityData.id)
6377
6383
  throw new Error('Entity ID is undefined');
@@ -6559,7 +6565,7 @@ const EntityFieldTypeMap = {
6559
6565
  // Connection string placeholder that will be replaced during build
6560
6566
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
6561
6567
  // SDK Version placeholder
6562
- const SDK_VERSION = "1.0.0-beta.17";
6568
+ const SDK_VERSION = "1.0.0-beta.18";
6563
6569
  const VERSION = "Version";
6564
6570
  const SERVICE = "Service";
6565
6571
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6857,8 +6863,13 @@ class EntityService extends BaseService {
6857
6863
  * // Call operations directly on the entity
6858
6864
  * const records = await entity.getRecords();
6859
6865
  *
6860
- * const insertResult = await entity.insert([
6861
- * { name: "John", age: 30 }
6866
+ * // Insert a single record
6867
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
6868
+ *
6869
+ * // Or batch insert multiple records
6870
+ * const batchResult = await entity.batchInsert([
6871
+ * { name: "Jane", age: 25 },
6872
+ * { name: "Bob", age: 35 }
6862
6873
  * ]);
6863
6874
  * ```
6864
6875
  */
@@ -6920,7 +6931,38 @@ class EntityService extends BaseService {
6920
6931
  }, options);
6921
6932
  }
6922
6933
  /**
6923
- * Inserts data into an entity by entity ID
6934
+ * Inserts a single record into an entity by entity ID
6935
+ *
6936
+ * @param entityId - UUID of the entity
6937
+ * @param data - Record to insert
6938
+ * @param options - Insert options
6939
+ * @returns Promise resolving to the inserted record with generated record ID
6940
+ *
6941
+ * @example
6942
+ * ```typescript
6943
+ * // Basic usage
6944
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
6945
+ *
6946
+ * // With options
6947
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
6948
+ * expansionLevel: 1
6949
+ * });
6950
+ * ```
6951
+ */
6952
+ async insertById(id, data, options = {}) {
6953
+ const params = createParams({
6954
+ expansionLevel: options.expansionLevel
6955
+ });
6956
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.INSERT_BY_ID(id), data, {
6957
+ params,
6958
+ ...options
6959
+ });
6960
+ // Convert PascalCase response to camelCase
6961
+ const camelResponse = pascalToCamelCaseKeys(response.data);
6962
+ return camelResponse;
6963
+ }
6964
+ /**
6965
+ * Inserts data into an entity by entity ID using batch insert
6924
6966
  *
6925
6967
  * @param entityId - UUID of the entity
6926
6968
  * @param data - Array of records to insert
@@ -6930,13 +6972,13 @@ class EntityService extends BaseService {
6930
6972
  * @example
6931
6973
  * ```typescript
6932
6974
  * // Basic usage
6933
- * const result = await sdk.entities.insertById(<entityId>, [
6975
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
6934
6976
  * { name: "John", age: 30 },
6935
6977
  * { name: "Jane", age: 25 }
6936
6978
  * ]);
6937
6979
  *
6938
6980
  * // With options
6939
- * const result = await sdk.entities.insertById(<entityId>, [
6981
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
6940
6982
  * { name: "John", age: 30 },
6941
6983
  * { name: "Jane", age: 25 }
6942
6984
  * ], {
@@ -6945,12 +6987,12 @@ class EntityService extends BaseService {
6945
6987
  * });
6946
6988
  * ```
6947
6989
  */
6948
- async insertById(id, data, options = {}) {
6990
+ async batchInsertById(id, data, options = {}) {
6949
6991
  const params = createParams({
6950
6992
  expansionLevel: options.expansionLevel,
6951
6993
  failOnFirst: options.failOnFirst
6952
6994
  });
6953
- const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.INSERT_BY_ID(id), data, {
6995
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.BATCH_INSERT_BY_ID(id), data, {
6954
6996
  params,
6955
6997
  ...options
6956
6998
  });
@@ -7154,6 +7196,9 @@ __decorate([
7154
7196
  __decorate([
7155
7197
  track('Entities.InsertById')
7156
7198
  ], EntityService.prototype, "insertById", null);
7199
+ __decorate([
7200
+ track('Entities.BatchInsertById')
7201
+ ], EntityService.prototype, "batchInsertById", null);
7157
7202
  __decorate([
7158
7203
  track('Entities.UpdateById')
7159
7204
  ], EntityService.prototype, "updateById", null);
package/dist/index.umd.js CHANGED
@@ -5938,7 +5938,8 @@
5938
5938
  GET_ALL: `${DATAFABRIC_BASE}/api/Entity`,
5939
5939
  GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
5940
5940
  GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
5941
- INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
5941
+ INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
5942
+ BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
5942
5943
  UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
5943
5944
  DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
5944
5945
  DOWNLOAD_ATTACHMENT: (entityName, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/${entityName}/${recordId}/${fieldName}`,
@@ -6375,6 +6376,11 @@
6375
6376
  throw new Error('Entity ID is undefined');
6376
6377
  return service.insertById(entityData.id, data, options);
6377
6378
  },
6379
+ async batchInsert(data, options) {
6380
+ if (!entityData.id)
6381
+ throw new Error('Entity ID is undefined');
6382
+ return service.batchInsertById(entityData.id, data, options);
6383
+ },
6378
6384
  async update(data, options) {
6379
6385
  if (!entityData.id)
6380
6386
  throw new Error('Entity ID is undefined');
@@ -10317,7 +10323,7 @@
10317
10323
  // Connection string placeholder that will be replaced during build
10318
10324
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
10319
10325
  // SDK Version placeholder
10320
- const SDK_VERSION = "1.0.0-beta.17";
10326
+ const SDK_VERSION = "1.0.0-beta.18";
10321
10327
  const VERSION$2 = "Version";
10322
10328
  const SERVICE = "Service";
10323
10329
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -10615,8 +10621,13 @@
10615
10621
  * // Call operations directly on the entity
10616
10622
  * const records = await entity.getRecords();
10617
10623
  *
10618
- * const insertResult = await entity.insert([
10619
- * { name: "John", age: 30 }
10624
+ * // Insert a single record
10625
+ * const insertResult = await entity.insert({ name: "John", age: 30 });
10626
+ *
10627
+ * // Or batch insert multiple records
10628
+ * const batchResult = await entity.batchInsert([
10629
+ * { name: "Jane", age: 25 },
10630
+ * { name: "Bob", age: 35 }
10620
10631
  * ]);
10621
10632
  * ```
10622
10633
  */
@@ -10678,7 +10689,38 @@
10678
10689
  }, options);
10679
10690
  }
10680
10691
  /**
10681
- * Inserts data into an entity by entity ID
10692
+ * Inserts a single record into an entity by entity ID
10693
+ *
10694
+ * @param entityId - UUID of the entity
10695
+ * @param data - Record to insert
10696
+ * @param options - Insert options
10697
+ * @returns Promise resolving to the inserted record with generated record ID
10698
+ *
10699
+ * @example
10700
+ * ```typescript
10701
+ * // Basic usage
10702
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 });
10703
+ *
10704
+ * // With options
10705
+ * const result = await sdk.entities.insertById(<entityId>, { name: "John", age: 30 }, {
10706
+ * expansionLevel: 1
10707
+ * });
10708
+ * ```
10709
+ */
10710
+ async insertById(id, data, options = {}) {
10711
+ const params = createParams({
10712
+ expansionLevel: options.expansionLevel
10713
+ });
10714
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.INSERT_BY_ID(id), data, {
10715
+ params,
10716
+ ...options
10717
+ });
10718
+ // Convert PascalCase response to camelCase
10719
+ const camelResponse = pascalToCamelCaseKeys(response.data);
10720
+ return camelResponse;
10721
+ }
10722
+ /**
10723
+ * Inserts data into an entity by entity ID using batch insert
10682
10724
  *
10683
10725
  * @param entityId - UUID of the entity
10684
10726
  * @param data - Array of records to insert
@@ -10688,13 +10730,13 @@
10688
10730
  * @example
10689
10731
  * ```typescript
10690
10732
  * // Basic usage
10691
- * const result = await sdk.entities.insertById(<entityId>, [
10733
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
10692
10734
  * { name: "John", age: 30 },
10693
10735
  * { name: "Jane", age: 25 }
10694
10736
  * ]);
10695
10737
  *
10696
10738
  * // With options
10697
- * const result = await sdk.entities.insertById(<entityId>, [
10739
+ * const result = await sdk.entities.batchInsertById(<entityId>, [
10698
10740
  * { name: "John", age: 30 },
10699
10741
  * { name: "Jane", age: 25 }
10700
10742
  * ], {
@@ -10703,12 +10745,12 @@
10703
10745
  * });
10704
10746
  * ```
10705
10747
  */
10706
- async insertById(id, data, options = {}) {
10748
+ async batchInsertById(id, data, options = {}) {
10707
10749
  const params = createParams({
10708
10750
  expansionLevel: options.expansionLevel,
10709
10751
  failOnFirst: options.failOnFirst
10710
10752
  });
10711
- const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.INSERT_BY_ID(id), data, {
10753
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.BATCH_INSERT_BY_ID(id), data, {
10712
10754
  params,
10713
10755
  ...options
10714
10756
  });
@@ -10912,6 +10954,9 @@
10912
10954
  __decorate([
10913
10955
  track('Entities.InsertById')
10914
10956
  ], EntityService.prototype, "insertById", null);
10957
+ __decorate([
10958
+ track('Entities.BatchInsertById')
10959
+ ], EntityService.prototype, "batchInsertById", null);
10915
10960
  __decorate([
10916
10961
  track('Entities.UpdateById')
10917
10962
  ], EntityService.prototype, "updateById", null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/uipath-typescript",
3
- "version": "1.0.0-beta.17",
3
+ "version": "1.0.0-beta.18",
4
4
  "description": "UiPath TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "keywords": [