@uipath/uipath-typescript 1.1.3 → 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.
@@ -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.1.3";
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 };