@uipath/uipath-typescript 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/index.cjs +204 -2
  3. package/dist/assets/index.d.ts +112 -13
  4. package/dist/assets/index.mjs +204 -2
  5. package/dist/attachments/index.cjs +3 -2
  6. package/dist/attachments/index.d.ts +7 -0
  7. package/dist/attachments/index.mjs +3 -2
  8. package/dist/buckets/index.cjs +172 -2
  9. package/dist/buckets/index.d.ts +56 -12
  10. package/dist/buckets/index.mjs +172 -2
  11. package/dist/cases/index.cjs +3 -2
  12. package/dist/cases/index.d.ts +7 -0
  13. package/dist/cases/index.mjs +3 -2
  14. package/dist/conversational-agent/index.cjs +196 -81
  15. package/dist/conversational-agent/index.d.ts +326 -80
  16. package/dist/conversational-agent/index.mjs +195 -80
  17. package/dist/core/index.cjs +44 -7
  18. package/dist/core/index.d.ts +11 -1
  19. package/dist/core/index.mjs +44 -7
  20. package/dist/entities/index.cjs +35 -6
  21. package/dist/entities/index.d.ts +101 -11
  22. package/dist/entities/index.mjs +36 -7
  23. package/dist/feedback/index.cjs +40 -5
  24. package/dist/feedback/index.d.ts +59 -1
  25. package/dist/feedback/index.mjs +40 -5
  26. package/dist/index.cjs +312 -14
  27. package/dist/index.d.ts +515 -32
  28. package/dist/index.mjs +313 -15
  29. package/dist/index.umd.js +312 -14
  30. package/dist/jobs/index.cjs +172 -2
  31. package/dist/jobs/index.d.ts +67 -23
  32. package/dist/jobs/index.mjs +172 -2
  33. package/dist/maestro-processes/index.cjs +3 -2
  34. package/dist/maestro-processes/index.d.ts +7 -0
  35. package/dist/maestro-processes/index.mjs +3 -2
  36. package/dist/processes/index.cjs +240 -3
  37. package/dist/processes/index.d.ts +124 -2
  38. package/dist/processes/index.mjs +240 -3
  39. package/dist/queues/index.cjs +172 -2
  40. package/dist/queues/index.d.ts +56 -12
  41. package/dist/queues/index.mjs +172 -2
  42. package/dist/tasks/index.cjs +3 -2
  43. package/dist/tasks/index.d.ts +7 -0
  44. package/dist/tasks/index.mjs +3 -2
  45. package/package.json +1 -1
@@ -221,6 +221,13 @@ interface ApiResponse<T> {
221
221
  */
222
222
  declare class BaseService {
223
223
  #private;
224
+ /**
225
+ * SDK configuration (read-only). Available to subclasses so they can
226
+ * fall back to init-time defaults like `folderKey`.
227
+ */
228
+ protected readonly config: {
229
+ folderKey?: string;
230
+ };
224
231
  /**
225
232
  * Creates a base service instance with dependency injection.
226
233
  *
@@ -1163,7 +1170,34 @@ interface ToolCallStartEvent {
1163
1170
  * Optional metadata pertaining to the tool call.
1164
1171
  */
1165
1172
  metaData?: MetaData;
1173
+ /**
1174
+ * Indicates that the tool call requires user confirmation before execution.
1175
+ * When true, the client should render a confirmation UI and respond with a
1176
+ * `confirmToolCall` event on the same tool call.
1177
+ */
1178
+ requireConfirmation?: boolean;
1179
+ /**
1180
+ * JSON schema describing the tool's input parameters. Present when
1181
+ * `requireConfirmation` is true so the client can render an editable form.
1182
+ */
1183
+ inputSchema?: JSONValue;
1166
1184
  }
1185
+ /**
1186
+ * Sent by the client to approve or reject a tool call that was emitted with
1187
+ * `requireConfirmation: true`. Carries the user's decision and, when approved,
1188
+ * the (possibly edited) input the tool should execute with.
1189
+ *
1190
+ * `input` is required when `approved` is `true` and optional when `approved`
1191
+ * is `false`. The discriminated union enforces this at compile time so
1192
+ * `{ approved: true }` (no `input`) is a type error.
1193
+ */
1194
+ type ToolCallConfirmationEvent = {
1195
+ approved: true;
1196
+ input: JSONValue;
1197
+ } | {
1198
+ approved: false;
1199
+ input?: JSONValue;
1200
+ };
1167
1201
  /**
1168
1202
  * Signals the end of a tool call.
1169
1203
  */
@@ -1224,6 +1258,11 @@ interface ToolCallEvent {
1224
1258
  * Signals the end of a tool call.
1225
1259
  */
1226
1260
  endToolCall?: ToolCallEndEvent;
1261
+ /**
1262
+ * Signals the user's approve/reject decision for a tool call that was
1263
+ * emitted with `requireConfirmation: true`.
1264
+ */
1265
+ confirmToolCall?: ToolCallConfirmationEvent;
1227
1266
  /**
1228
1267
  * Allows additional events to be sent in the context of the enclosing event stream.
1229
1268
  */
@@ -1235,6 +1274,11 @@ interface ToolCallEvent {
1235
1274
  }
1236
1275
  /**
1237
1276
  * Schema for tool call confirmation interrupt value.
1277
+ *
1278
+ * @deprecated Tool call confirmation now travels on {@link ToolCallStartEvent} via
1279
+ * `requireConfirmation: true` / `inputSchema` and is responded to with
1280
+ * {@link ToolCallConfirmationEvent}. This shape is retained for agents on the legacy
1281
+ * runtime that still emit confirmations as interrupts.
1238
1282
  */
1239
1283
  interface ToolCallConfirmationValue {
1240
1284
  /**
@@ -1256,6 +1300,10 @@ interface ToolCallConfirmationValue {
1256
1300
  }
1257
1301
  /**
1258
1302
  * Schema for tool call confirmation end value.
1303
+ *
1304
+ * @deprecated Confirmation responses now use {@link ToolCallConfirmationEvent} (sent via
1305
+ * {@link ToolCallStream.sendToolCallConfirm}). This shape is retained for agents on the
1306
+ * legacy runtime that consume confirmations through the interrupt-end channel.
1259
1307
  */
1260
1308
  interface ToolCallConfirmationEndValue {
1261
1309
  /**
@@ -1269,6 +1317,11 @@ interface ToolCallConfirmationEndValue {
1269
1317
  }
1270
1318
  /**
1271
1319
  * Known interrupt start event for tool call confirmation.
1320
+ *
1321
+ * @deprecated Emitted only by agents on the legacy runtime. Agents on the current runtime
1322
+ * express confirmation as `requireConfirmation: true` on {@link ToolCallStartEvent}, with
1323
+ * the client responding via {@link ToolCallConfirmationEvent} (`confirmToolCall` on
1324
+ * {@link ToolCallEvent}).
1272
1325
  */
1273
1326
  interface ToolCallConfirmationInterruptStartEvent {
1274
1327
  /**
@@ -1858,6 +1911,36 @@ type CompletedToolCall = ToolCallStartEvent & ToolCallEndEvent & {
1858
1911
  * });
1859
1912
  * });
1860
1913
  * ```
1914
+ *
1915
+ * @example Migrating from legacy interrupt-based confirmation
1916
+ * ```typescript
1917
+ * // BEFORE — legacy interrupt flow
1918
+ * message.onInterruptStart(async ({ interruptId, startEvent }) => {
1919
+ * if (startEvent.type !== InterruptType.ToolCallConfirmation) return;
1920
+ * const { toolName, inputSchema, inputValue } = startEvent.value;
1921
+ *
1922
+ * const decision = await showConfirmationDialog({
1923
+ * toolName, inputSchema, input: inputValue,
1924
+ * });
1925
+ * message.sendInterruptEnd(interruptId, {
1926
+ * approved: decision.approved,
1927
+ * input: decision.editedInput,
1928
+ * });
1929
+ * });
1930
+ *
1931
+ * // AFTER — new tool-call confirmation flow
1932
+ * message.onToolCallStart(async (toolCall) => {
1933
+ * const { toolName, input, requireConfirmation, inputSchema } = toolCall.startEvent;
1934
+ * if (!requireConfirmation) return;
1935
+ *
1936
+ * const decision = await showConfirmationDialog({ toolName, inputSchema, input });
1937
+ * if (decision.approved) {
1938
+ * toolCall.sendToolCallConfirm({ approved: true, input: decision.editedInput });
1939
+ * } else {
1940
+ * toolCall.sendToolCallConfirm({ approved: false });
1941
+ * }
1942
+ * });
1943
+ * ```
1861
1944
  */
1862
1945
  interface ToolCallStream {
1863
1946
  /** Unique identifier for this tool call */
@@ -1912,6 +1995,23 @@ interface ToolCallStream {
1912
1995
  * ```
1913
1996
  */
1914
1997
  onToolCallEnd(cb: (endToolCall: ToolCallEndEvent) => void): () => void;
1998
+ /**
1999
+ * Registers a handler for tool call confirmation events. Fired when the
2000
+ * peer responds to a tool call that was emitted with
2001
+ * `requireConfirmation: true` on its start event.
2002
+ *
2003
+ * @param callback - Callback receiving the confirmation event
2004
+ * @returns Cleanup function to remove the handler
2005
+ *
2006
+ * @example Handling a confirmation response (agent-side)
2007
+ * ```typescript
2008
+ * toolCall.onToolCallConfirm(({ approved, input }) => {
2009
+ * if (approved) executeTool(toolCall.startEvent.toolName, input);
2010
+ * else cancelToolCall();
2011
+ * });
2012
+ * ```
2013
+ */
2014
+ onToolCallConfirm(callback: (confirmToolCall: ToolCallConfirmationEvent) => void): () => void;
1915
2015
  /**
1916
2016
  * Ends the tool call
1917
2017
  *
@@ -1925,6 +2025,25 @@ interface ToolCallStream {
1925
2025
  * ```
1926
2026
  */
1927
2027
  sendToolCallEnd(endToolCall?: ToolCallEndEvent): void;
2028
+ /**
2029
+ * Sends a tool call confirmation (approve or reject) for a tool call that
2030
+ * was emitted with `requireConfirmation: true`. Replaces the legacy
2031
+ * interrupt-based confirmation flow.
2032
+ *
2033
+ * @param confirmToolCall - The user's decision and (when approved) the
2034
+ * possibly-edited input the tool should execute with
2035
+ *
2036
+ * @example Approving a tool call
2037
+ * ```typescript
2038
+ * toolCall.sendToolCallConfirm({ approved: true, input: editedInput });
2039
+ * ```
2040
+ *
2041
+ * @example Rejecting a tool call
2042
+ * ```typescript
2043
+ * toolCall.sendToolCallConfirm({ approved: false });
2044
+ * ```
2045
+ */
2046
+ sendToolCallConfirm(confirmToolCall: ToolCallConfirmationEvent): void;
1928
2047
  /**
1929
2048
  * Sends an error start event for this tool call
1930
2049
  * @param args - Error details including optional error ID and message
@@ -2543,6 +2662,28 @@ interface MessageStream {
2543
2662
  * ```
2544
2663
  */
2545
2664
  sendInterruptEnd(interruptId: string, endInterrupt: InterruptEndEvent): void;
2665
+ /**
2666
+ * Registers a handler for tool-call confirmation events on this message
2667
+ *
2668
+ * Fired when a peer responds to a tool call that was emitted with
2669
+ * `requireConfirmation: true`. The handler runs at the message level, so it
2670
+ * fires even if no per-tool-call stream exists for the confirmed `toolCallId`.
2671
+ *
2672
+ * @param callback - Callback receiving the toolCallId and the confirmation event
2673
+ * @returns Cleanup function to remove the handler
2674
+ *
2675
+ * @example Handling a tool-call confirmation response
2676
+ * ```typescript
2677
+ * message.onToolCallConfirm(({ toolCallId, confirmEvent }) => {
2678
+ * if (confirmEvent.approved) executeTool(toolCallId, confirmEvent.input);
2679
+ * else cancelToolCall(toolCallId);
2680
+ * });
2681
+ * ```
2682
+ */
2683
+ onToolCallConfirm(callback: (args: {
2684
+ toolCallId: string;
2685
+ confirmEvent: ToolCallConfirmationEvent;
2686
+ }) => void): () => void;
2546
2687
  /**
2547
2688
  * Starts a new content part stream in this message
2548
2689
  *
@@ -4385,7 +4526,7 @@ declare const AgentMap: {
4385
4526
  };
4386
4527
 
4387
4528
  /**
4388
- * Types for User Service
4529
+ * Types for User Settings Service
4389
4530
  */
4390
4531
  /**
4391
4532
  * Response for getting user settings
@@ -4463,46 +4604,92 @@ interface UserSettingsUpdateOptions {
4463
4604
  }
4464
4605
 
4465
4606
  /**
4466
- * Service for managing UiPath User Settings
4607
+ * Service for reading and updating the current user's profile and context settings.
4467
4608
  *
4468
- * User settings are passed to the agent for all conversations
4469
- * to provide user context (name, email, role, timezone, etc.).
4609
+ * User settings are user-supplied profile fields (name, email, role, department, company,
4610
+ * country, timezone) that the SDK passes to a UiPath Conversational Agent on every conversation
4611
+ * so the agent can personalize its responses. Settings are scoped to the calling user — identified
4612
+ * by the access token for user tokens, or by the externalUserId option for app-scoped tokens.
4470
4613
  *
4471
- * @internal
4614
+ * Accessed via `conversationalAgent.user`.
4615
+ *
4616
+ * @example Read current settings
4617
+ * ```typescript
4618
+ * import { ConversationalAgent } from '@uipath/uipath-typescript/conversational-agent';
4619
+ *
4620
+ * const conversationalAgent = new ConversationalAgent(sdk);
4621
+ *
4622
+ * const settings = await conversationalAgent.user.getSettings();
4623
+ * console.log(settings.name, settings.email, settings.timezone);
4624
+ * ```
4625
+ *
4626
+ * @example Update specific fields (partial update)
4627
+ * ```typescript
4628
+ * await conversationalAgent.user.updateSettings({
4629
+ * name: 'John Doe',
4630
+ * timezone: 'America/New_York'
4631
+ * });
4632
+ * ```
4633
+ *
4634
+ * @example Clear a field by setting it to null
4635
+ * ```typescript
4636
+ * await conversationalAgent.user.updateSettings({
4637
+ * department: null
4638
+ * });
4639
+ * ```
4472
4640
  */
4473
- interface UserServiceModel {
4641
+ interface UserSettingsServiceModel {
4474
4642
  /**
4475
- * Gets the current user's profile and context settings
4643
+ * Gets the current user's profile and context settings.
4644
+ *
4645
+ * Returns the full user settings record — profile fields the agent uses for personalization
4646
+ * (name, email, role, department, company, country, timezone) plus identifiers and timestamps.
4647
+ * Fields the user has not set are returned as `null`.
4476
4648
  *
4477
- * @returns Promise resolving to user settings object
4649
+ * @returns Promise resolving to the current user's settings
4478
4650
  * {@link UserSettingsGetResponse}
4651
+ *
4479
4652
  * @example
4480
4653
  * ```typescript
4481
- * const userSettings = await userService.getSettings();
4482
- * console.log(userSettings.name);
4483
- * console.log(userSettings.email);
4654
+ * const settings = await conversationalAgent.user.getSettings();
4655
+ * console.log(settings.name); // e.g. 'John Doe' or null
4656
+ * console.log(settings.email); // e.g. 'john@example.com' or null
4657
+ * console.log(settings.timezone); // e.g. 'America/New_York' or null
4484
4658
  * ```
4485
4659
  */
4486
4660
  getSettings(): Promise<UserSettingsGetResponse>;
4487
4661
  /**
4488
- * Updates the current user's profile and context settings
4662
+ * Updates the current user's profile and context settings.
4489
4663
  *
4490
- * @param options - Fields to update
4491
- * @returns Promise resolving to updated user settings
4664
+ * Accepts a partial payload — only fields included in `options` are changed. Pass `null` to
4665
+ * explicitly clear a field. Omitting a field leaves it unchanged. Returns the full updated
4666
+ * settings record.
4667
+ *
4668
+ * @param options - Fields to update; omit fields to leave them unchanged, set to `null` to clear
4669
+ * @returns Promise resolving to the updated user settings
4492
4670
  * {@link UserSettingsUpdateResponse}
4493
- * @example
4671
+ *
4672
+ * @example Partial update
4494
4673
  * ```typescript
4495
- * const updatedUserSettings = await userService.updateSettings({
4674
+ * const updated = await conversationalAgent.user.updateSettings({
4496
4675
  * name: 'John Doe',
4497
4676
  * timezone: 'America/New_York'
4498
4677
  * });
4499
4678
  * ```
4679
+ *
4680
+ * @example Clear fields by setting to null
4681
+ * ```typescript
4682
+ * await conversationalAgent.user.updateSettings({
4683
+ * role: null,
4684
+ * department: null
4685
+ * });
4686
+ * ```
4500
4687
  */
4501
4688
  updateSettings(options: UserSettingsUpdateOptions): Promise<UserSettingsUpdateResponse>;
4502
4689
  }
4503
4690
 
4504
4691
  /**
4505
- * Constants for User Service
4692
+ * Constants for User Settings Service
4506
4693
  */
4507
4694
  /**
4508
4695
  * Maps fields for User Settings entities to ensure consistent SDK naming
@@ -4664,6 +4851,8 @@ interface ConversationalAgentServiceModel {
4664
4851
  onConnectionStatusChanged(handler: (status: ConnectionStatus, error: Error | null) => void): () => void;
4665
4852
  /** Service for creating and managing conversations. See {@link ConversationServiceModel}. */
4666
4853
  readonly conversations: ConversationServiceModel;
4854
+ /** Service for reading and updating the current user's profile/context settings. See {@link UserSettingsServiceModel}. */
4855
+ readonly user: UserSettingsServiceModel;
4667
4856
  /**
4668
4857
  * Gets feature flags for the current tenant
4669
4858
  *
@@ -4682,6 +4871,21 @@ interface ConversationalAgentOptions {
4682
4871
  * external app client; omit for standard UiPath user tokens.
4683
4872
  */
4684
4873
  externalUserId?: string;
4874
+ /**
4875
+ * Optional identifier used in UiPath logs to identify the implementing service
4876
+ * of requests. External consumers do not need to set it; the server logs
4877
+ * missing values as "unknown".
4878
+ *
4879
+ * @internal
4880
+ */
4881
+ surfaceName?: string;
4882
+ /**
4883
+ * Optional version of the implementing service of requests. Paired with
4884
+ * `surfaceName` for internal telemetry.
4885
+ *
4886
+ * @internal
4887
+ */
4888
+ surfaceVersion?: string;
4685
4889
  /** Log level for debugging */
4686
4890
  logLevel?: LogLevel;
4687
4891
  }
@@ -4913,6 +5117,7 @@ declare abstract class ToolCallEventHelper extends ConversationEventHelperBase<T
4913
5117
  */
4914
5118
  readonly startEventMaybe: ToolCallStartEvent | undefined;
4915
5119
  protected readonly _endHandlers: ToolCallEndHandler[];
5120
+ protected readonly _confirmHandlers: ToolCallConfirmationHandler[];
4916
5121
  constructor(message: MessageEventHelper, toolCallId: string,
4917
5122
  /**
4918
5123
  * ToolCallStartEvent used to initialize the ToolCallEventHelper. Will be undefined if some other sub-event was
@@ -4951,6 +5156,19 @@ declare abstract class ToolCallEventHelper extends ConversationEventHelperBase<T
4951
5156
  * @deprecated Use onToolCallEnd
4952
5157
  */
4953
5158
  onEndToolCall(cb: ToolCallEndHandler): void;
5159
+ /**
5160
+ * Registers a handler for tool call confirmation events. Fired when the
5161
+ * peer responds to a tool call that was emitted with `requireConfirmation`.
5162
+ * @returns Cleanup function to remove the handler.
5163
+ */
5164
+ onToolCallConfirm(callback: ToolCallConfirmationHandler): () => void;
5165
+ /**
5166
+ * Sends a tool call confirmation (approve/reject) for a tool call that was
5167
+ * emitted with `requireConfirmation: true`. Replaces the legacy
5168
+ * `sendInterruptEnd` flow for tool call confirmation.
5169
+ * @throws Error if tool call has already ended.
5170
+ */
5171
+ sendToolCallConfirm(confirmToolCall: ToolCallConfirmationEvent): void;
4954
5172
  /**
4955
5173
  * Sends an error start event for this tool call.
4956
5174
  */
@@ -4992,6 +5210,7 @@ declare abstract class MessageEventHelper extends ConversationEventHelperBase<Me
4992
5210
  protected readonly _toolCallMap: Map<string, ToolCallEventHelperImpl>;
4993
5211
  protected readonly _interruptStartHandlers: InterruptStartHandler[];
4994
5212
  protected readonly _interruptEndHandlers: InterruptEndHandler[];
5213
+ protected readonly _toolCallConfirmHandlers: ToolCallConfirmHandler[];
4995
5214
  constructor(exchange: ExchangeEventHelper, messageId: string,
4996
5215
  /**
4997
5216
  * MessageStartEvent used to initialize the MessageEventHelper. Will be undefined if some other sub-event was
@@ -5125,6 +5344,18 @@ declare abstract class MessageEventHelper extends ConversationEventHelperBase<Me
5125
5344
  * @returns Cleanup function to remove the handler.
5126
5345
  */
5127
5346
  onInterruptEnd(cb: InterruptEndHandler): () => void;
5347
+ /**
5348
+ * Registers a handler for tool-call confirmation events. Fired when a peer
5349
+ * responds to a tool call that was emitted with `requireConfirmation: true`.
5350
+ *
5351
+ * Fires at the message level before the event is delegated to the per-tool-call
5352
+ * helper, so this handler runs even when no `ToolCallEventHelper` exists for the
5353
+ * confirmed tool call (e.g. on the agent side after the originating helper has
5354
+ * been cleaned up, or on the client side if no `onToolCallStart` is registered).
5355
+ *
5356
+ * @returns Cleanup function to remove the handler.
5357
+ */
5358
+ onToolCallConfirm(callback: ToolCallConfirmHandler): () => void;
5128
5359
  /**
5129
5360
  * Sends an interrupt start event.
5130
5361
  */
@@ -5869,6 +6100,8 @@ type SessionStartHandlerAsync = (session: SessionEventHelper) => Promise<Session
5869
6100
  type ToolCallEndHandler = (endToolCall: ToolCallEndEvent) => void;
5870
6101
  type ToolCallStartHandler = (toolCall: ToolCallEventHelper) => void;
5871
6102
  type ToolCallStartHandlerAsync = (toolCall: ToolCallEventHelper) => Promise<ToolCallEndEvent | void>;
6103
+ type ToolCallConfirmationHandler = (confirmToolCall: ToolCallConfirmationEvent) => void;
6104
+ type ToolCallConfirmHandler = (args: ToolCallConfirmationHandlerArgs) => void;
5872
6105
  type ToolCallCompletedHandler = (completedToolCall: CompletedToolCall) => void;
5873
6106
  type ContentPartCompletedHandler = (completedContentPart: CompletedContentPart) => void;
5874
6107
  type MessageCompletedHandler = (completedMessage: CompletedMessage) => void;
@@ -5939,6 +6172,10 @@ type InterruptCompletedHandlerArgs = {
5939
6172
  startEvent: InterruptStartEvent;
5940
6173
  endEvent: InterruptEndEvent;
5941
6174
  };
6175
+ type ToolCallConfirmationHandlerArgs = {
6176
+ toolCallId: string;
6177
+ confirmEvent: ToolCallConfirmationEvent;
6178
+ };
5942
6179
  type ConversationEventErrorSource = ConversationEventHelperBase<any, any>;
5943
6180
  type SendMessageWithContentPartOptions = Simplify<MakeRequired<Omit<ContentPartChunkEvent, 'contentPartSequence'>, 'data'> & MessageStartEventOptions & MakeOptional<ContentPartStartEvent, 'mimeType'>>;
5944
6181
  type ConversationEventHelperManagerConfig = {
@@ -6573,6 +6810,74 @@ declare class MessageService extends BaseService implements MessageServiceModel
6573
6810
  getContentPartById(conversationId: string, exchangeId: string, messageId: string, contentPartId: string): Promise<ContentPartGetResponse>;
6574
6811
  }
6575
6812
 
6813
+ /**
6814
+ * UserSettingsService - Service for managing user profile and context settings
6815
+ */
6816
+
6817
+ /**
6818
+ * Service for reading and updating the current user's profile and context settings.
6819
+ *
6820
+ * User settings are user-supplied profile fields (name, email, role, department, company,
6821
+ * country, timezone) that the SDK passes to a UiPath Conversational Agent on every conversation
6822
+ * so the agent can personalize its responses.
6823
+ */
6824
+ declare class UserSettingsService extends BaseService implements UserSettingsServiceModel {
6825
+ /**
6826
+ * Creates an instance of the UserSettingsService.
6827
+ *
6828
+ * @param instance - UiPath SDK instance providing authentication and configuration
6829
+ * @param options - Optional configuration (e.g. externalUserId for external app auth)
6830
+ */
6831
+ constructor(instance: IUiPath$1, options?: ConversationalAgentOptions);
6832
+ /**
6833
+ * Gets the current user's profile and context settings.
6834
+ *
6835
+ * Returns the full user settings record — profile fields the agent uses for personalization
6836
+ * (name, email, role, department, company, country, timezone) plus identifiers and timestamps.
6837
+ * Fields the user has not set are returned as `null`.
6838
+ *
6839
+ * @returns Promise resolving to the current user's settings
6840
+ * {@link UserSettingsGetResponse}
6841
+ *
6842
+ * @example
6843
+ * ```typescript
6844
+ * const settings = await conversationalAgent.user.getSettings();
6845
+ * console.log(settings.name); // e.g. 'John Doe' or null
6846
+ * console.log(settings.email); // e.g. 'john@example.com' or null
6847
+ * console.log(settings.timezone); // e.g. 'America/New_York' or null
6848
+ * ```
6849
+ */
6850
+ getSettings(): Promise<UserSettingsGetResponse>;
6851
+ /**
6852
+ * Updates the current user's profile and context settings.
6853
+ *
6854
+ * Accepts a partial payload — only fields included in `options` are changed. Pass `null` to
6855
+ * explicitly clear a field. Omitting a field leaves it unchanged. Returns the full updated
6856
+ * settings record.
6857
+ *
6858
+ * @param options - Fields to update; omit fields to leave them unchanged, set to `null` to clear
6859
+ * @returns Promise resolving to the updated user settings
6860
+ * {@link UserSettingsUpdateResponse}
6861
+ *
6862
+ * @example Partial update
6863
+ * ```typescript
6864
+ * const updated = await conversationalAgent.user.updateSettings({
6865
+ * name: 'John Doe',
6866
+ * timezone: 'America/New_York'
6867
+ * });
6868
+ * ```
6869
+ *
6870
+ * @example Clear fields by setting to null
6871
+ * ```typescript
6872
+ * await conversationalAgent.user.updateSettings({
6873
+ * role: null,
6874
+ * department: null
6875
+ * });
6876
+ * ```
6877
+ */
6878
+ updateSettings(options: UserSettingsUpdateOptions): Promise<UserSettingsUpdateResponse>;
6879
+ }
6880
+
6576
6881
  /**
6577
6882
  * ConversationalAgentService - Main entry point for Conversational Agent functionality
6578
6883
  */
@@ -6583,6 +6888,8 @@ declare class MessageService extends BaseService implements MessageServiceModel
6583
6888
  declare class ConversationalAgentService extends BaseService implements ConversationalAgentServiceModel {
6584
6889
  /** Service for creating and managing conversations. See {@link ConversationServiceModel}. */
6585
6890
  readonly conversations: ConversationService;
6891
+ /** Service for reading and updating the current user's profile/context settings. See {@link UserSettingsServiceModel}. */
6892
+ readonly user: UserSettingsService;
6586
6893
  /**
6587
6894
  * Creates an instance of the ConversationalAgent service.
6588
6895
  *
@@ -6655,66 +6962,5 @@ declare class ConversationalAgentService extends BaseService implements Conversa
6655
6962
  getFeatureFlags(): Promise<FeatureFlags>;
6656
6963
  }
6657
6964
 
6658
- /**
6659
- * UserService - Service for managing user profile and context settings
6660
- */
6661
-
6662
- /**
6663
- * Service for managing user profile and context settings
6664
- *
6665
- * User settings are passed to the agent for all conversations
6666
- * to provide user context (name, email, role, timezone, etc.).
6667
- *
6668
- * @internal
6669
- */
6670
- declare class UserService extends BaseService implements UserServiceModel {
6671
- /**
6672
- * Gets the current user's profile and context settings
6673
- *
6674
- * @returns Promise resolving to user settings object containing profile information
6675
- *
6676
- * @example
6677
- * ```typescript
6678
- * const userSettings = await userService.getSettings();
6679
- * console.log(userSettings.name); // User's name
6680
- * console.log(userSettings.email); // User's email
6681
- * console.log(userSettings.timezone); // User's timezone
6682
- * ```
6683
- */
6684
- getSettings(): Promise<UserSettingsGetResponse>;
6685
- /**
6686
- * Updates the current user's profile and context settings
6687
- *
6688
- * All fields are optional - only send the fields you want to change.
6689
- * Set fields to `null` to explicitly clear them.
6690
- * Omitting fields means no change.
6691
- *
6692
- * @param options - Fields to update
6693
- * @returns Promise resolving to updated user settings object
6694
- *
6695
- * @example
6696
- * ```typescript
6697
- * // Update specific fields
6698
- * const updatedUserSettings = await userService.updateSettings({
6699
- * name: 'John Doe',
6700
- * email: 'john@example.com',
6701
- * timezone: 'America/New_York'
6702
- * });
6703
- *
6704
- * // Partial update - only change timezone
6705
- * await userService.updateSettings({
6706
- * timezone: 'Europe/London'
6707
- * });
6708
- *
6709
- * // Clear fields by setting to null
6710
- * await userService.updateSettings({
6711
- * role: null,
6712
- * department: null
6713
- * });
6714
- * ```
6715
- */
6716
- updateSettings(options: UserSettingsUpdateOptions): Promise<UserSettingsUpdateResponse>;
6717
- }
6718
-
6719
- export { AgentMap, AsyncInputStreamEventHelper, AsyncInputStreamEventHelperImpl, AsyncToolCallEventHelper, AsyncToolCallEventHelperImpl, CitationErrorType, ContentPartEventHelper, ContentPartEventHelperImpl, ContentPartHelper, ConversationEventHelperBase, ConversationEventHelperManager, ConversationEventHelperManagerImpl, ConversationEventInvalidOperationError, ConversationEventValidationError, ConversationMap, ConversationalAgentService as ConversationalAgent, ConversationalAgentService, EventErrorId, ExchangeEventHelper, ExchangeEventHelperImpl, ExchangeMap, ExchangeService, ExchangeService as Exchanges, FeedbackRating, InputStreamSpeechSensitivity, InterruptType, MessageEventHelper, MessageEventHelperImpl, MessageMap, MessageRole, MessageService, MessageService as Messages, SessionEventHelper, SessionEventHelperImpl, SortOrder, ToolCallEventHelper, ToolCallEventHelperImpl, UserService as User, UserService, UserSettingsMap, assertCitationSourceMedia, assertCitationSourceUrl, assertExternalValue, assertInlineValue, createAgentWithMethods, createConversationWithMethods, isCitationSourceMedia, isCitationSourceUrl, isExternalValue, isInlineValue, transformExchange, transformExchanges, transformMessage };
6720
- export type { AgentAppearance, AgentConversationServiceModel, AgentCreateConversationOptions, AgentGetByIdResponse, AgentGetResponse, AgentInput, AgentMethods, AgentStartingPrompt, AnyErrorEndHandler, AnyErrorEndHandlerArgs, AnyErrorStartHandler, AnyErrorStartHandlerArgs, AsyncInputStream, AsyncInputStreamChunkEvent, AsyncInputStreamChunkHandler, AsyncInputStreamEndEvent, AsyncInputStreamEndHandler, AsyncInputStreamEvent, AsyncInputStreamStartEvent, AsyncToolCallStartHandler, AsyncToolCallStartHandlerAsync, AsyncToolCallStream, ChunkHandler, Citation, CitationEndEvent, CitationError, CitationEvent, CitationOptions, CitationSource, CitationSourceBase, CitationSourceMedia, CitationSourceUrl, CitationStartEvent, CompletedContentPart, CompletedMessage, CompletedToolCall, ContentPart, ContentPartChunkEvent, ContentPartCompletedHandler, ContentPartData, ContentPartEndEvent, ContentPartEndHandler, ContentPartEvent, ContentPartGetResponse, ContentPartInterrupted, ContentPartStartEvent, ContentPartStartEventOptions, ContentPartStartEventWithData, ContentPartStartHandler, ContentPartStartHandlerAsync, ContentPartStartMetaData, ContentPartStream, ConversationAttachmentCreateResponse, ConversationAttachmentUploadResponse, ConversationCreateOptions, ConversationCreateResponse, ConversationDeleteResponse, ConversationEvent, ConversationEventEmitter, ConversationEventErrorSource, ConversationEventHandler, ConversationEventHelperManagerConfig, ConversationEventHelperProperties, ConversationExchangeServiceModel, ConversationGetAllOptions, ConversationGetResponse, ConversationJobStartOverrides, ConversationMethods, ConversationServiceModel, ConversationSessionMethods, ConversationSessionOptions, ConversationUpdateOptions, ConversationUpdateResponse, ConversationalAgentOptions, ConversationalAgentServiceModel, CreateFeedbackOptions, DeletedHandler, ErrorEndEvent, ErrorEndEventOptions, ErrorEndHandler, ErrorEndHandlerArgs, ErrorEvent, ErrorStartEvent, ErrorStartEventOptions, ErrorStartHandler, ErrorStartHandlerArgs, Exchange, ExchangeEndEvent, ExchangeEndHandler, ExchangeEvent, ExchangeGetAllOptions, ExchangeGetByIdOptions, ExchangeGetResponse, ExchangeServiceModel, ExchangeStartEvent, ExchangeStartEventOptions, ExchangeStartHandler, ExchangeStartHandlerAsync, ExchangeStream, ExternalValue, FeatureFlags, FeedbackCreateResponse, FileUploadAccess, GenericInterruptStartEvent, InlineOrExternalValue, InlineValue, InputStreamStartEventOptions, InputStreamStartHandler, Interrupt, InterruptCompletedHandler, InterruptCompletedHandlerArgs, InterruptEndEvent, InterruptEndHandler, InterruptEndHandlerArgs, InterruptEvent, InterruptStartEvent, InterruptStartHandler, InterruptStartHandlerArgs, JSONArray, JSONObject, JSONPrimitive, JSONValue, LabelUpdatedEvent, LabelUpdatedHandler, MakeOptional, MakeRequired, Message, MessageCompletedHandler, MessageEndEvent, MessageEndHandler, MessageEvent, MessageGetResponse, MessageServiceModel, MessageStartEvent, MessageStartEventOptions, MessageStartHandler, MessageStartHandlerAsync, MessageStream, MetaData, MetaEvent, MetaEventHandler, RawAgentGetByIdResponse, RawAgentGetResponse, RawConversationGetResponse, SendMessageWithContentPartOptions, SessionCapabilities, SessionEndEvent, SessionEndHandler, SessionEndingEvent, SessionEndingHandler, SessionStartEvent, SessionStartEventOptions, SessionStartHandler, SessionStartHandlerAsync, SessionStartedEvent, SessionStartedHandler, SessionStream, Simplify, ToolCall, ToolCallCompletedHandler, ToolCallConfirmationEndValue, ToolCallConfirmationInterruptStartEvent, ToolCallConfirmationValue, ToolCallEndEvent, ToolCallEndHandler, ToolCallEvent, ToolCallInputValue, ToolCallOutputValue, ToolCallResult, ToolCallStartEvent, ToolCallStartEventWithId, ToolCallStartHandler, ToolCallStartHandlerAsync, ToolCallStream, UnhandledErrorEndHandler, UnhandledErrorEndHandlerArgs, UnhandledErrorStartHandler, UnhandledErrorStartHandlerArgs, UserServiceModel, UserSettingsGetResponse, UserSettingsUpdateOptions, UserSettingsUpdateResponse };
6965
+ export { AgentMap, AsyncInputStreamEventHelper, AsyncInputStreamEventHelperImpl, AsyncToolCallEventHelper, AsyncToolCallEventHelperImpl, CitationErrorType, ContentPartEventHelper, ContentPartEventHelperImpl, ContentPartHelper, ConversationEventHelperBase, ConversationEventHelperManager, ConversationEventHelperManagerImpl, ConversationEventInvalidOperationError, ConversationEventValidationError, ConversationMap, ConversationalAgentService as ConversationalAgent, ConversationalAgentService, EventErrorId, ExchangeEventHelper, ExchangeEventHelperImpl, ExchangeMap, ExchangeService, ExchangeService as Exchanges, FeedbackRating, InputStreamSpeechSensitivity, InterruptType, MessageEventHelper, MessageEventHelperImpl, MessageMap, MessageRole, MessageService, MessageService as Messages, SessionEventHelper, SessionEventHelperImpl, SortOrder, ToolCallEventHelper, ToolCallEventHelperImpl, UserSettingsService as UserSettings, UserSettingsMap, UserSettingsService, assertCitationSourceMedia, assertCitationSourceUrl, assertExternalValue, assertInlineValue, createAgentWithMethods, createConversationWithMethods, isCitationSourceMedia, isCitationSourceUrl, isExternalValue, isInlineValue, transformExchange, transformExchanges, transformMessage };
6966
+ export type { AgentAppearance, AgentConversationServiceModel, AgentCreateConversationOptions, AgentGetByIdResponse, AgentGetResponse, AgentInput, AgentMethods, AgentStartingPrompt, AnyErrorEndHandler, AnyErrorEndHandlerArgs, AnyErrorStartHandler, AnyErrorStartHandlerArgs, AsyncInputStream, AsyncInputStreamChunkEvent, AsyncInputStreamChunkHandler, AsyncInputStreamEndEvent, AsyncInputStreamEndHandler, AsyncInputStreamEvent, AsyncInputStreamStartEvent, AsyncToolCallStartHandler, AsyncToolCallStartHandlerAsync, AsyncToolCallStream, ChunkHandler, Citation, CitationEndEvent, CitationError, CitationEvent, CitationOptions, CitationSource, CitationSourceBase, CitationSourceMedia, CitationSourceUrl, CitationStartEvent, CompletedContentPart, CompletedMessage, CompletedToolCall, ContentPart, ContentPartChunkEvent, ContentPartCompletedHandler, ContentPartData, ContentPartEndEvent, ContentPartEndHandler, ContentPartEvent, ContentPartGetResponse, ContentPartInterrupted, ContentPartStartEvent, ContentPartStartEventOptions, ContentPartStartEventWithData, ContentPartStartHandler, ContentPartStartHandlerAsync, ContentPartStartMetaData, ContentPartStream, ConversationAttachmentCreateResponse, ConversationAttachmentUploadResponse, ConversationCreateOptions, ConversationCreateResponse, ConversationDeleteResponse, ConversationEvent, ConversationEventEmitter, ConversationEventErrorSource, ConversationEventHandler, ConversationEventHelperManagerConfig, ConversationEventHelperProperties, ConversationExchangeServiceModel, ConversationGetAllOptions, ConversationGetResponse, ConversationJobStartOverrides, ConversationMethods, ConversationServiceModel, ConversationSessionMethods, ConversationSessionOptions, ConversationUpdateOptions, ConversationUpdateResponse, ConversationalAgentOptions, ConversationalAgentServiceModel, CreateFeedbackOptions, DeletedHandler, ErrorEndEvent, ErrorEndEventOptions, ErrorEndHandler, ErrorEndHandlerArgs, ErrorEvent, ErrorStartEvent, ErrorStartEventOptions, ErrorStartHandler, ErrorStartHandlerArgs, Exchange, ExchangeEndEvent, ExchangeEndHandler, ExchangeEvent, ExchangeGetAllOptions, ExchangeGetByIdOptions, ExchangeGetResponse, ExchangeServiceModel, ExchangeStartEvent, ExchangeStartEventOptions, ExchangeStartHandler, ExchangeStartHandlerAsync, ExchangeStream, ExternalValue, FeatureFlags, FeedbackCreateResponse, FileUploadAccess, GenericInterruptStartEvent, InlineOrExternalValue, InlineValue, InputStreamStartEventOptions, InputStreamStartHandler, Interrupt, InterruptCompletedHandler, InterruptCompletedHandlerArgs, InterruptEndEvent, InterruptEndHandler, InterruptEndHandlerArgs, InterruptEvent, InterruptStartEvent, InterruptStartHandler, InterruptStartHandlerArgs, JSONArray, JSONObject, JSONPrimitive, JSONValue, LabelUpdatedEvent, LabelUpdatedHandler, MakeOptional, MakeRequired, Message, MessageCompletedHandler, MessageEndEvent, MessageEndHandler, MessageEvent, MessageGetResponse, MessageServiceModel, MessageStartEvent, MessageStartEventOptions, MessageStartHandler, MessageStartHandlerAsync, MessageStream, MetaData, MetaEvent, MetaEventHandler, RawAgentGetByIdResponse, RawAgentGetResponse, RawConversationGetResponse, SendMessageWithContentPartOptions, SessionCapabilities, SessionEndEvent, SessionEndHandler, SessionEndingEvent, SessionEndingHandler, SessionStartEvent, SessionStartEventOptions, SessionStartHandler, SessionStartHandlerAsync, SessionStartedEvent, SessionStartedHandler, SessionStream, Simplify, ToolCall, ToolCallCompletedHandler, ToolCallConfirmHandler, ToolCallConfirmationEndValue, ToolCallConfirmationEvent, ToolCallConfirmationHandler, ToolCallConfirmationHandlerArgs, ToolCallConfirmationInterruptStartEvent, ToolCallConfirmationValue, ToolCallEndEvent, ToolCallEndHandler, ToolCallEvent, ToolCallInputValue, ToolCallOutputValue, ToolCallResult, ToolCallStartEvent, ToolCallStartEventWithId, ToolCallStartHandler, ToolCallStartHandlerAsync, ToolCallStream, UnhandledErrorEndHandler, UnhandledErrorEndHandlerArgs, UnhandledErrorStartHandler, UnhandledErrorStartHandlerArgs, UserSettingsGetResponse, UserSettingsServiceModel, UserSettingsUpdateOptions, UserSettingsUpdateResponse };