@uipath/uipath-typescript 1.2.0 → 1.2.1

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.
@@ -1675,7 +1675,7 @@ const AssetMap = {
1675
1675
  // Connection string placeholder that will be replaced during build
1676
1676
  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";
1677
1677
  // SDK Version placeholder
1678
- const SDK_VERSION = "1.2.0";
1678
+ const SDK_VERSION = "1.2.1";
1679
1679
  const VERSION = "Version";
1680
1680
  const SERVICE = "Service";
1681
1681
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1673,7 +1673,7 @@ const AssetMap = {
1673
1673
  // Connection string placeholder that will be replaced during build
1674
1674
  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";
1675
1675
  // SDK Version placeholder
1676
- const SDK_VERSION = "1.2.0";
1676
+ const SDK_VERSION = "1.2.1";
1677
1677
  const VERSION = "Version";
1678
1678
  const SERVICE = "Service";
1679
1679
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1722,7 +1722,7 @@ const BucketMap = {
1722
1722
  // Connection string placeholder that will be replaced during build
1723
1723
  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";
1724
1724
  // SDK Version placeholder
1725
- const SDK_VERSION = "1.2.0";
1725
+ const SDK_VERSION = "1.2.1";
1726
1726
  const VERSION = "Version";
1727
1727
  const SERVICE = "Service";
1728
1728
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1720,7 +1720,7 @@ const BucketMap = {
1720
1720
  // Connection string placeholder that will be replaced during build
1721
1721
  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";
1722
1722
  // SDK Version placeholder
1723
- const SDK_VERSION = "1.2.0";
1723
+ const SDK_VERSION = "1.2.1";
1724
1724
  const VERSION = "Version";
1725
1725
  const SERVICE = "Service";
1726
1726
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1830,7 +1830,7 @@ const MAESTRO_ENDPOINTS = {
1830
1830
  // Connection string placeholder that will be replaced during build
1831
1831
  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";
1832
1832
  // SDK Version placeholder
1833
- const SDK_VERSION = "1.2.0";
1833
+ const SDK_VERSION = "1.2.1";
1834
1834
  const VERSION = "Version";
1835
1835
  const SERVICE = "Service";
1836
1836
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1828,7 +1828,7 @@ const MAESTRO_ENDPOINTS = {
1828
1828
  // Connection string placeholder that will be replaced during build
1829
1829
  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";
1830
1830
  // SDK Version placeholder
1831
- const SDK_VERSION = "1.2.0";
1831
+ const SDK_VERSION = "1.2.1";
1832
1832
  const VERSION = "Version";
1833
1833
  const SERVICE = "Service";
1834
1834
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -51,7 +51,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
51
51
  // Connection string placeholder that will be replaced during build
52
52
  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";
53
53
  // SDK Version placeholder
54
- const SDK_VERSION = "1.2.0";
54
+ const SDK_VERSION = "1.2.1";
55
55
  const VERSION = "Version";
56
56
  const SERVICE = "Service";
57
57
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6126,10 +6126,11 @@ class ConversationService extends BaseService {
6126
6126
  */
6127
6127
  async uploadAttachment(id, file) {
6128
6128
  // Step 1: Create attachment entry and get upload URL
6129
- const { fileUploadAccess, uri, name } = await this.createAttachment(id, file.name);
6129
+ const { fileUploadAccess, uri, name } = await this.getAttachmentUploadUri(id, file.name);
6130
6130
  // Step 2: Upload file to blob storage
6131
6131
  const uploadHeaders = {
6132
6132
  'Content-Type': file.type,
6133
+ 'x-ms-blob-type': 'BlockBlob',
6133
6134
  ...arrayDictionaryToRecord(fileUploadAccess.headers)
6134
6135
  };
6135
6136
  // Add auth header if required by the storage endpoint
@@ -6154,6 +6155,40 @@ class ConversationService extends BaseService {
6154
6155
  mimeType: file.type
6155
6156
  };
6156
6157
  }
6158
+ /**
6159
+ * Registers a file attachment for a conversation and returns a URI along with
6160
+ * pre-signed upload access details. Use the returned `fileUploadAccess` to upload
6161
+ * the file content to blob storage, then reference `uri` in subsequent messages.
6162
+ *
6163
+ * @param conversationId - The ID of the conversation to attach the file to
6164
+ * @param fileName - The name of the file to attach
6165
+ * @returns Promise resolving to {@link ConversationAttachmentCreateResponse} containing
6166
+ * the attachment `uri` and `fileUploadAccess` details needed to upload the file content
6167
+ *
6168
+ * @example <caption>Step 1 — Get the attachment URI and upload access</caption>
6169
+ * ```typescript
6170
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, 'report.pdf');
6171
+ * console.log(`Attachment URI: ${uri}`);
6172
+ * ```
6173
+ *
6174
+ * @example <caption>Step 2 — Upload the file content to the returned URL</caption>
6175
+ * ```typescript
6176
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, file.name);
6177
+ *
6178
+ * await fetch(fileUploadAccess.url, {
6179
+ * method: fileUploadAccess.verb,
6180
+ * body: file,
6181
+ * headers: { 'Content-Type': file.type },
6182
+ * });
6183
+ *
6184
+ * // Reference the URI in a message after upload
6185
+ * console.log(`File ready at: ${uri}`);
6186
+ * ```
6187
+ */
6188
+ async getAttachmentUploadUri(conversationId, fileName) {
6189
+ const response = await this.post(ATTACHMENT_ENDPOINTS.CREATE(conversationId), { name: fileName });
6190
+ return response.data;
6191
+ }
6157
6192
  // ==================== Real-time Event Handling ====================
6158
6193
  /**
6159
6194
  * Starts a real-time chat session for a conversation
@@ -6276,10 +6311,6 @@ class ConversationService extends BaseService {
6276
6311
  }
6277
6312
  return this._eventHelper;
6278
6313
  }
6279
- async createAttachment(conversationId, fileName) {
6280
- const response = await this.post(ATTACHMENT_ENDPOINTS.CREATE(conversationId), { name: fileName });
6281
- return response.data;
6282
- }
6283
6314
  }
6284
6315
  __decorate([
6285
6316
  track('ConversationalAgent.Conversations.Create')
@@ -6301,7 +6332,7 @@ __decorate([
6301
6332
  ], ConversationService.prototype, "uploadAttachment", null);
6302
6333
  __decorate([
6303
6334
  track('ConversationalAgent.Conversations.CreateAttachment')
6304
- ], ConversationService.prototype, "createAttachment", null);
6335
+ ], ConversationService.prototype, "getAttachmentUploadUri", null);
6305
6336
 
6306
6337
  /**
6307
6338
  * MessageService - Message operations for Conversations
@@ -3811,6 +3811,37 @@ interface ConversationServiceModel {
3811
3811
  * ```
3812
3812
  */
3813
3813
  uploadAttachment(id: string, file: File): Promise<ConversationAttachmentUploadResponse>;
3814
+ /**
3815
+ * Registers a file attachment for a conversation and returns a URI along with
3816
+ * pre-signed upload access details. Use the returned `fileUploadAccess` to upload
3817
+ * the file content to blob storage, then reference `uri` in subsequent messages.
3818
+ *
3819
+ * @param conversationId - The ID of the conversation to attach the file to
3820
+ * @param fileName - The name of the file to attach
3821
+ * @returns Promise resolving to {@link ConversationAttachmentCreateResponse} containing
3822
+ * the attachment `uri` and `fileUploadAccess` details needed to upload the file content
3823
+ *
3824
+ * @example <caption>Step 1 — Get the attachment URI and upload access</caption>
3825
+ * ```typescript
3826
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, 'report.pdf');
3827
+ * console.log(`Attachment URI: ${uri}`);
3828
+ * ```
3829
+ *
3830
+ * @example <caption>Step 2 — Upload the file content to the returned URL</caption>
3831
+ * ```typescript
3832
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, file.name);
3833
+ *
3834
+ * await fetch(fileUploadAccess.url, {
3835
+ * method: fileUploadAccess.verb,
3836
+ * body: file,
3837
+ * headers: { 'Content-Type': file.type },
3838
+ * });
3839
+ *
3840
+ * // Reference the URI in a message after upload
3841
+ * console.log(`File ready at: ${uri}`);
3842
+ * ```
3843
+ */
3844
+ getAttachmentUploadUri(conversationId: string, fileName: string): Promise<ConversationAttachmentCreateResponse>;
3814
3845
  /**
3815
3846
  * Starts a real-time chat session for a conversation
3816
3847
  *
@@ -6153,6 +6184,37 @@ declare class ConversationService extends BaseService implements ConversationSer
6153
6184
  * ```
6154
6185
  */
6155
6186
  uploadAttachment(id: string, file: File): Promise<ConversationAttachmentUploadResponse>;
6187
+ /**
6188
+ * Registers a file attachment for a conversation and returns a URI along with
6189
+ * pre-signed upload access details. Use the returned `fileUploadAccess` to upload
6190
+ * the file content to blob storage, then reference `uri` in subsequent messages.
6191
+ *
6192
+ * @param conversationId - The ID of the conversation to attach the file to
6193
+ * @param fileName - The name of the file to attach
6194
+ * @returns Promise resolving to {@link ConversationAttachmentCreateResponse} containing
6195
+ * the attachment `uri` and `fileUploadAccess` details needed to upload the file content
6196
+ *
6197
+ * @example <caption>Step 1 — Get the attachment URI and upload access</caption>
6198
+ * ```typescript
6199
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, 'report.pdf');
6200
+ * console.log(`Attachment URI: ${uri}`);
6201
+ * ```
6202
+ *
6203
+ * @example <caption>Step 2 — Upload the file content to the returned URL</caption>
6204
+ * ```typescript
6205
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, file.name);
6206
+ *
6207
+ * await fetch(fileUploadAccess.url, {
6208
+ * method: fileUploadAccess.verb,
6209
+ * body: file,
6210
+ * headers: { 'Content-Type': file.type },
6211
+ * });
6212
+ *
6213
+ * // Reference the URI in a message after upload
6214
+ * console.log(`File ready at: ${uri}`);
6215
+ * ```
6216
+ */
6217
+ getAttachmentUploadUri(conversationId: string, fileName: string): Promise<ConversationAttachmentCreateResponse>;
6156
6218
  /**
6157
6219
  * Starts a real-time chat session for a conversation
6158
6220
  *
@@ -6236,7 +6298,6 @@ declare class ConversationService extends BaseService implements ConversationSer
6236
6298
  */
6237
6299
  onConnectionStatusChanged(handler: ConnectionStatusChangedHandler): () => void;
6238
6300
  private _getEvents;
6239
- private createAttachment;
6240
6301
  }
6241
6302
 
6242
6303
  /**
@@ -49,7 +49,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
49
49
  // Connection string placeholder that will be replaced during build
50
50
  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";
51
51
  // SDK Version placeholder
52
- const SDK_VERSION = "1.2.0";
52
+ const SDK_VERSION = "1.2.1";
53
53
  const VERSION = "Version";
54
54
  const SERVICE = "Service";
55
55
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6124,10 +6124,11 @@ class ConversationService extends BaseService {
6124
6124
  */
6125
6125
  async uploadAttachment(id, file) {
6126
6126
  // Step 1: Create attachment entry and get upload URL
6127
- const { fileUploadAccess, uri, name } = await this.createAttachment(id, file.name);
6127
+ const { fileUploadAccess, uri, name } = await this.getAttachmentUploadUri(id, file.name);
6128
6128
  // Step 2: Upload file to blob storage
6129
6129
  const uploadHeaders = {
6130
6130
  'Content-Type': file.type,
6131
+ 'x-ms-blob-type': 'BlockBlob',
6131
6132
  ...arrayDictionaryToRecord(fileUploadAccess.headers)
6132
6133
  };
6133
6134
  // Add auth header if required by the storage endpoint
@@ -6152,6 +6153,40 @@ class ConversationService extends BaseService {
6152
6153
  mimeType: file.type
6153
6154
  };
6154
6155
  }
6156
+ /**
6157
+ * Registers a file attachment for a conversation and returns a URI along with
6158
+ * pre-signed upload access details. Use the returned `fileUploadAccess` to upload
6159
+ * the file content to blob storage, then reference `uri` in subsequent messages.
6160
+ *
6161
+ * @param conversationId - The ID of the conversation to attach the file to
6162
+ * @param fileName - The name of the file to attach
6163
+ * @returns Promise resolving to {@link ConversationAttachmentCreateResponse} containing
6164
+ * the attachment `uri` and `fileUploadAccess` details needed to upload the file content
6165
+ *
6166
+ * @example <caption>Step 1 — Get the attachment URI and upload access</caption>
6167
+ * ```typescript
6168
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, 'report.pdf');
6169
+ * console.log(`Attachment URI: ${uri}`);
6170
+ * ```
6171
+ *
6172
+ * @example <caption>Step 2 — Upload the file content to the returned URL</caption>
6173
+ * ```typescript
6174
+ * const { uri, fileUploadAccess } = await conversationalAgent.conversations.getAttachmentUploadUri(conversationId, file.name);
6175
+ *
6176
+ * await fetch(fileUploadAccess.url, {
6177
+ * method: fileUploadAccess.verb,
6178
+ * body: file,
6179
+ * headers: { 'Content-Type': file.type },
6180
+ * });
6181
+ *
6182
+ * // Reference the URI in a message after upload
6183
+ * console.log(`File ready at: ${uri}`);
6184
+ * ```
6185
+ */
6186
+ async getAttachmentUploadUri(conversationId, fileName) {
6187
+ const response = await this.post(ATTACHMENT_ENDPOINTS.CREATE(conversationId), { name: fileName });
6188
+ return response.data;
6189
+ }
6155
6190
  // ==================== Real-time Event Handling ====================
6156
6191
  /**
6157
6192
  * Starts a real-time chat session for a conversation
@@ -6274,10 +6309,6 @@ class ConversationService extends BaseService {
6274
6309
  }
6275
6310
  return this._eventHelper;
6276
6311
  }
6277
- async createAttachment(conversationId, fileName) {
6278
- const response = await this.post(ATTACHMENT_ENDPOINTS.CREATE(conversationId), { name: fileName });
6279
- return response.data;
6280
- }
6281
6312
  }
6282
6313
  __decorate([
6283
6314
  track('ConversationalAgent.Conversations.Create')
@@ -6299,7 +6330,7 @@ __decorate([
6299
6330
  ], ConversationService.prototype, "uploadAttachment", null);
6300
6331
  __decorate([
6301
6332
  track('ConversationalAgent.Conversations.CreateAttachment')
6302
- ], ConversationService.prototype, "createAttachment", null);
6333
+ ], ConversationService.prototype, "getAttachmentUploadUri", null);
6303
6334
 
6304
6335
  /**
6305
6336
  * MessageService - Message operations for Conversations
@@ -5186,7 +5186,7 @@ function normalizeBaseUrl(url) {
5186
5186
  // Connection string placeholder that will be replaced during build
5187
5187
  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";
5188
5188
  // SDK Version placeholder
5189
- const SDK_VERSION = "1.2.0";
5189
+ const SDK_VERSION = "1.2.1";
5190
5190
  const VERSION = "Version";
5191
5191
  const SERVICE = "Service";
5192
5192
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5717,6 +5717,15 @@ class UiPath {
5717
5717
  __classPrivateFieldGet(this, _UiPath_authService, "f")?.logout();
5718
5718
  __classPrivateFieldSet(this, _UiPath_initialized, false, "f");
5719
5719
  }
5720
+ /**
5721
+ * Updates the access token used for API requests.
5722
+ * Use this to inject or refresh a token externally.
5723
+ *
5724
+ * @param tokenInfo - The token information containing the access token, type, expiration, and optional refresh token
5725
+ */
5726
+ updateToken(tokenInfo) {
5727
+ __classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
5728
+ }
5720
5729
  }
5721
5730
  _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5722
5731
  // Validate and normalize the configuration
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Authentication token information
3
+ */
4
+ interface TokenInfo {
5
+ token: string;
6
+ type: 'secret' | 'oauth';
7
+ expiresAt?: Date;
8
+ refreshToken?: string;
9
+ }
10
+
1
11
  interface BaseConfig {
2
12
  baseUrl: string;
3
13
  orgName: string;
@@ -64,6 +74,13 @@ interface IUiPath {
64
74
  * After calling this method, the user will need to re-initialize to authenticate again.
65
75
  */
66
76
  logout(): void;
77
+ /**
78
+ * Updates the access token used for API requests.
79
+ * Use this to inject or refresh a token externally.
80
+ *
81
+ * @param tokenInfo - The token information containing the access token, type, expiration, and optional refresh token
82
+ */
83
+ updateToken(tokenInfo: TokenInfo): void;
67
84
  }
68
85
 
69
86
  /**
@@ -134,6 +151,13 @@ declare class UiPath implements IUiPath {
134
151
  * After calling this method, the user will need to re-initialize to authenticate again.
135
152
  */
136
153
  logout(): void;
154
+ /**
155
+ * Updates the access token used for API requests.
156
+ * Use this to inject or refresh a token externally.
157
+ *
158
+ * @param tokenInfo - The token information containing the access token, type, expiration, and optional refresh token
159
+ */
160
+ updateToken(tokenInfo: TokenInfo): void;
137
161
  }
138
162
 
139
163
  /**
@@ -495,7 +519,7 @@ declare const telemetryClient: TelemetryClient;
495
519
  * SDK Telemetry constants
496
520
  */
497
521
  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";
498
- declare const SDK_VERSION = "1.2.0";
522
+ declare const SDK_VERSION = "1.2.1";
499
523
  declare const VERSION = "Version";
500
524
  declare const SERVICE = "Service";
501
525
  declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -511,4 +535,4 @@ declare const SDK_RUN_EVENT = "Sdk.Run";
511
535
  declare const UNKNOWN = "";
512
536
 
513
537
  export { APP_NAME, AuthenticationError, AuthorizationError, 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, ErrorType, HttpStatus, MAX_PAGE_SIZE, NetworkError, NotFoundError, RateLimitError, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, ServerError, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
514
- export type { HasPaginationOptions, NonPaginatedResponse, PaginatedResponse, PaginationCursor, PaginationMethodUnion, PaginationOptions, UiPathSDKConfig };
538
+ export type { HasPaginationOptions, NonPaginatedResponse, PaginatedResponse, PaginationCursor, PaginationMethodUnion, PaginationOptions, TokenInfo, UiPathSDKConfig };
@@ -5184,7 +5184,7 @@ function normalizeBaseUrl(url) {
5184
5184
  // Connection string placeholder that will be replaced during build
5185
5185
  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";
5186
5186
  // SDK Version placeholder
5187
- const SDK_VERSION = "1.2.0";
5187
+ const SDK_VERSION = "1.2.1";
5188
5188
  const VERSION = "Version";
5189
5189
  const SERVICE = "Service";
5190
5190
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5715,6 +5715,15 @@ class UiPath {
5715
5715
  __classPrivateFieldGet(this, _UiPath_authService, "f")?.logout();
5716
5716
  __classPrivateFieldSet(this, _UiPath_initialized, false, "f");
5717
5717
  }
5718
+ /**
5719
+ * Updates the access token used for API requests.
5720
+ * Use this to inject or refresh a token externally.
5721
+ *
5722
+ * @param tokenInfo - The token information containing the access token, type, expiration, and optional refresh token
5723
+ */
5724
+ updateToken(tokenInfo) {
5725
+ __classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
5726
+ }
5718
5727
  }
5719
5728
  _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5720
5729
  // Validate and normalize the configuration
@@ -1649,6 +1649,13 @@ function createEntityMethods(entityData, service) {
1649
1649
  throw new Error('Entity ID is undefined');
1650
1650
  return service.insertRecordsById(entityData.id, data, options);
1651
1651
  },
1652
+ async updateRecord(recordId, data, options) {
1653
+ if (!entityData.id)
1654
+ throw new Error('Entity ID is undefined');
1655
+ if (!recordId)
1656
+ throw new Error('Record ID is undefined');
1657
+ return service.updateRecordById(entityData.id, recordId, data, options);
1658
+ },
1652
1659
  async updateRecords(data, options) {
1653
1660
  if (!entityData.id)
1654
1661
  throw new Error('Entity ID is undefined');
@@ -1734,6 +1741,7 @@ const DATA_FABRIC_ENDPOINTS = {
1734
1741
  GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read/${recordId}`,
1735
1742
  INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
1736
1743
  BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
1744
+ UPDATE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update/${recordId}`,
1737
1745
  UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
1738
1746
  DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
1739
1747
  DOWNLOAD_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
@@ -1895,7 +1903,7 @@ const EntityFieldTypeMap = {
1895
1903
  // Connection string placeholder that will be replaced during build
1896
1904
  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";
1897
1905
  // SDK Version placeholder
1898
- const SDK_VERSION = "1.2.0";
1906
+ const SDK_VERSION = "1.2.1";
1899
1907
  const VERSION = "Version";
1900
1908
  const SERVICE = "Service";
1901
1909
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -2362,6 +2370,42 @@ class EntityService extends BaseService {
2362
2370
  const camelResponse = pascalToCamelCaseKeys(response.data);
2363
2371
  return camelResponse;
2364
2372
  }
2373
+ /**
2374
+ * Updates a single record in an entity by entity ID
2375
+ *
2376
+ * @param entityId - UUID of the entity
2377
+ * @param recordId - UUID of the record to update
2378
+ * @param data - Key-value pairs of fields to update
2379
+ * @param options - Update options
2380
+ * @returns Promise resolving to the updated record
2381
+ *
2382
+ * @example
2383
+ * ```typescript
2384
+ * import { Entities } from '@uipath/uipath-typescript/entities';
2385
+ *
2386
+ * const entities = new Entities(sdk);
2387
+ *
2388
+ * // Basic usage
2389
+ * const result = await entities.updateRecordById("<entityId>", "<recordId>", { name: "John Updated", age: 31 });
2390
+ *
2391
+ * // With options
2392
+ * const result = await entities.updateRecordById("<entityId>", "<recordId>", { name: "John Updated", age: 31 }, {
2393
+ * expansionLevel: 1
2394
+ * });
2395
+ * ```
2396
+ */
2397
+ async updateRecordById(entityId, recordId, data, options = {}) {
2398
+ const params = createParams({
2399
+ expansionLevel: options.expansionLevel
2400
+ });
2401
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.UPDATE_RECORD_BY_ID(entityId, recordId), data, {
2402
+ params,
2403
+ ...options
2404
+ });
2405
+ // Convert PascalCase response to camelCase
2406
+ const camelResponse = pascalToCamelCaseKeys(response.data);
2407
+ return camelResponse;
2408
+ }
2365
2409
  /**
2366
2410
  * Updates data in an entity by entity ID
2367
2411
  *
@@ -2693,6 +2737,9 @@ __decorate([
2693
2737
  __decorate([
2694
2738
  track('Entities.InsertRecordsById')
2695
2739
  ], EntityService.prototype, "insertRecordsById", null);
2740
+ __decorate([
2741
+ track('Entities.UpdateRecordById')
2742
+ ], EntityService.prototype, "updateRecordById", null);
2696
2743
  __decorate([
2697
2744
  track('Entities.UpdateRecordsById')
2698
2745
  ], EntityService.prototype, "updateRecordsById", null);
@@ -368,9 +368,13 @@ type EntityBatchInsertOptions = EntityOperationOptions;
368
368
  * Options for inserting multiple records into an entity
369
369
  */
370
370
  type EntityInsertRecordsOptions = EntityOperationOptions;
371
+ /**
372
+ * Options for updating a single record in an entity
373
+ */
374
+ type EntityUpdateRecordOptions = EntityGetRecordByIdOptions;
371
375
  /**
372
376
  * Options for updating data in an entity
373
- * @deprecated Use {@link EntityUpdateRecordOptions} instead for better clarity on updating records in an entity. This type will be removed in future versions.
377
+ * @deprecated Use {@link EntityUpdateRecordsOptions} instead for better clarity on updating records in an entity. This type will be removed in future versions.
374
378
  */
375
379
  type EntityUpdateOptions = EntityOperationOptions;
376
380
  /**
@@ -431,6 +435,11 @@ interface EntityOperationResponse {
431
435
  * Returns the inserted record with its generated record ID and other fields
432
436
  */
433
437
  type EntityInsertResponse = EntityRecord;
438
+ /**
439
+ * Response from updating a single record in an entity
440
+ * Returns the updated record
441
+ */
442
+ type EntityUpdateRecordResponse = EntityRecord;
434
443
  /**
435
444
  * Response from batch inserting data into an entity
436
445
  */
@@ -827,9 +836,35 @@ interface EntityServiceModel {
827
836
  * @hidden
828
837
  */
829
838
  batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
839
+ /**
840
+ * Updates a single record in an entity by entity ID
841
+ *
842
+ * Note: Data Fabric supports trigger events only on individual updates, not on updating multiple records.
843
+ * Use this method if you need trigger events to fire for the updated record.
844
+ *
845
+ * @param entityId - UUID of the entity
846
+ * @param recordId - UUID of the record to update
847
+ * @param data - Key-value pairs of fields to update
848
+ * @param options - Update options
849
+ * @returns Promise resolving to the updated record
850
+ * {@link EntityUpdateRecordResponse}
851
+ * @example
852
+ * ```typescript
853
+ * // Basic usage
854
+ * const result = await entities.updateRecordById(<entityId>, <recordId>, { name: "John Updated", age: 31 });
855
+ *
856
+ * // With options
857
+ * const result = await entities.updateRecordById(<entityId>, <recordId>, { name: "John Updated", age: 31 }, {
858
+ * expansionLevel: 1
859
+ * });
860
+ * ```
861
+ */
862
+ updateRecordById(entityId: string, recordId: string, data: Record<string, any>, options?: EntityUpdateRecordOptions): Promise<EntityUpdateRecordResponse>;
830
863
  /**
831
864
  * Updates data in an entity by entity ID
832
865
  *
866
+ * Note: Records updated using updateRecordsById will not trigger Data Fabric trigger events. Use {@link updateRecordById} if you need trigger events to fire for each updated record.
867
+ *
833
868
  * @param id - UUID of the entity
834
869
  * @param data - Array of records to update. Each record MUST contain the record Id.
835
870
  * @param options - Update options
@@ -1028,9 +1063,24 @@ interface EntityMethods {
1028
1063
  * @returns Promise resolving to batch insert response
1029
1064
  */
1030
1065
  insertRecords(data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
1066
+ /**
1067
+ * Update a single record in this entity
1068
+ *
1069
+ * Note: Data Fabric supports trigger events only on individual updates, not on updating multiple records.
1070
+ * Use this method if you need trigger events to fire for the updated record.
1071
+ *
1072
+ * @param recordId - UUID of the record to update
1073
+ * @param data - Key-value pairs of fields to update
1074
+ * @param options - Update options
1075
+ * @returns Promise resolving to the updated record
1076
+ */
1077
+ updateRecord(recordId: string, data: Record<string, any>, options?: EntityUpdateRecordOptions): Promise<EntityUpdateRecordResponse>;
1031
1078
  /**
1032
1079
  * Update data in this entity
1033
1080
  *
1081
+ * Note: Records updated using updateRecords will not trigger Data Fabric trigger events. Use {@link updateRecord} if you need
1082
+ * trigger events to fire for each updated record.
1083
+ *
1034
1084
  * @param data - Array of records to update. Each record MUST contain the record Id,
1035
1085
  * otherwise the update will fail.
1036
1086
  * @param options - Update options
@@ -1266,6 +1316,31 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1266
1316
  * ```
1267
1317
  */
1268
1318
  insertRecordsById(id: string, data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
1319
+ /**
1320
+ * Updates a single record in an entity by entity ID
1321
+ *
1322
+ * @param entityId - UUID of the entity
1323
+ * @param recordId - UUID of the record to update
1324
+ * @param data - Key-value pairs of fields to update
1325
+ * @param options - Update options
1326
+ * @returns Promise resolving to the updated record
1327
+ *
1328
+ * @example
1329
+ * ```typescript
1330
+ * import { Entities } from '@uipath/uipath-typescript/entities';
1331
+ *
1332
+ * const entities = new Entities(sdk);
1333
+ *
1334
+ * // Basic usage
1335
+ * const result = await entities.updateRecordById("<entityId>", "<recordId>", { name: "John Updated", age: 31 });
1336
+ *
1337
+ * // With options
1338
+ * const result = await entities.updateRecordById("<entityId>", "<recordId>", { name: "John Updated", age: 31 }, {
1339
+ * expansionLevel: 1
1340
+ * });
1341
+ * ```
1342
+ */
1343
+ updateRecordById(entityId: string, recordId: string, data: Record<string, any>, options?: EntityUpdateRecordOptions): Promise<EntityUpdateRecordResponse>;
1269
1344
  /**
1270
1345
  * Updates data in an entity by entity ID
1271
1346
  *
@@ -1672,4 +1747,4 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
1672
1747
  }
1673
1748
 
1674
1749
  export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, ReferenceType, createEntityWithMethods };
1675
- export type { ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityDeleteAttachmentResponse, EntityDeleteOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityFileType, EntityGetAllRecordsOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateRecordsOptions, EntityUpdateResponse, EntityUploadAttachmentOptions, EntityUploadAttachmentResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, RawEntityGetResponse, SourceJoinCriteria };
1750
+ export type { ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityDeleteAttachmentResponse, EntityDeleteOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityFileType, EntityGetAllRecordsOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateRecordOptions, EntityUpdateRecordResponse, EntityUpdateRecordsOptions, EntityUpdateResponse, EntityUploadAttachmentOptions, EntityUploadAttachmentResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, RawEntityGetResponse, SourceJoinCriteria };