@uipath/auth 1.195.0 → 1.197.0-preview.59

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/dist/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  export * from "./authContext";
2
+ export * from "./authProfile";
2
3
  export * from "./clientCredentials";
3
4
  export { type AuthFileConfig, InvalidBaseUrlError, setAuthFileConfig, } from "./config";
4
5
  export { ENFORCE_ROBOT_AUTH_VAR, ENV_AUTH_ENABLE_VAR, ENV_AUTH_VARS, EnvAuthConfigError, isEnvAuthEnabled, isRobotAuthEnforced, readAuthFromEnv, } from "./envAuth";
5
6
  export * from "./interactive";
6
7
  export * from "./loginStatus";
7
8
  export * from "./logout";
8
- export { type SelectFromList, selectTenantWithDeps } from "./selectTenant";
9
+ export { clearRefreshBreaker, loadRefreshBreaker, type RefreshBreakerState, refreshTokenFingerprint, saveRefreshBreaker, } from "./refreshCircuitBreaker";
10
+ export { INVALID_TENANT_CODE, InvalidTenantError, isTenantSelectionError, type SelectFromList, selectTenantWithDeps, TENANT_SELECTION_REQUIRED_CODE, TenantSelectionError, TenantSelectionRequiredError, } from "./selectTenant";
9
11
  export { AUTH_TIMEOUT_ERROR_CODE } from "./server";
10
12
  export { fetchTenantsAndOrganizations, type Tenant, type TenantsAndOrganizations, } from "./tenantSelection";
11
13
  export * from "./tokenRefresh";
@@ -20,8 +22,18 @@ interface AuthenticateOptions {
20
22
  redirectUri?: URL;
21
23
  scope?: string[];
22
24
  organization?: string;
25
+ /** Max ms to wait for the browser callback; forwarded to the strategy's
26
+ * local callback server. Defaults to the server's 5-min cap. */
27
+ timeoutMs?: number;
28
+ /** When true (Node path only), do not launch the system browser; surface
29
+ * the authorize URL via `onAuthUrl` and block on the existing callback.
30
+ * Requires `onAuthUrl`. */
31
+ noBrowser?: boolean;
32
+ /** Invoked with the authorize URL when `noBrowser` is set (once, when the
33
+ * callback server starts listening). Mandatory whenever `noBrowser` is true. */
34
+ onAuthUrl?: (url: string) => void;
23
35
  }
24
- export declare const authenticate: ({ baseUrl, clientId, clientSecret, redirectUri, scope, organization, }: AuthenticateOptions) => Promise<{
36
+ export declare const authenticate: ({ baseUrl, clientId, clientSecret, redirectUri, scope, organization, timeoutMs, noBrowser, onAuthUrl, }: AuthenticateOptions) => Promise<{
25
37
  accessToken: string;
26
38
  refreshToken: string;
27
39
  }>;