@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/authContext.d.ts +22 -0
- package/dist/authProfile.d.ts +11 -0
- package/dist/clientCredentials.d.ts +4 -0
- package/dist/envAuth.d.ts +1 -1
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.js +18735 -252
- package/dist/index.d.ts +14 -2
- package/dist/index.js +701 -259
- package/dist/interactive.d.ts +20 -0
- package/dist/loginStatus.d.ts +21 -5
- package/dist/logout.d.ts +4 -0
- package/dist/refreshCircuitBreaker.d.ts +42 -0
- package/dist/robotClientFallback.d.ts +4 -3
- package/dist/selectTenant.d.ts +35 -0
- package/dist/strategies/auth-strategy.d.ts +16 -1
- package/dist/strategies/browser-strategy.d.ts +3 -1
- package/dist/strategies/node-strategy.d.ts +2 -2
- package/dist/utils/envFile.d.ts +7 -2
- package/package.json +2 -2
package/dist/authContext.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GetLoginStatusOptions, type LoginStatus } from "./loginStatus";
|
|
1
2
|
export interface AuthContext {
|
|
2
3
|
baseUrl: string;
|
|
3
4
|
accessToken: string;
|
|
@@ -13,5 +14,26 @@ export interface GetAuthContextOptions {
|
|
|
13
14
|
requireOrganizationName?: boolean;
|
|
14
15
|
requireTenantId?: boolean;
|
|
15
16
|
requireTenantName?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Resolve credentials from this exact `.uipath/.auth` path instead of the
|
|
19
|
+
* default cwd→ancestors→home walk-up. Lets an in-process host (e.g. the VS
|
|
20
|
+
* Code extension) pin auth to a specific file — the same `envFilePath`
|
|
21
|
+
* {@link getLoginStatusAsync} already accepts — so concurrent operations
|
|
22
|
+
* against different credential files don't cross-contaminate.
|
|
23
|
+
*/
|
|
24
|
+
envFilePath?: string;
|
|
16
25
|
}
|
|
17
26
|
export declare const getAuthContext: (options?: GetAuthContextOptions) => Promise<AuthContext>;
|
|
27
|
+
export interface AuthEnvResult {
|
|
28
|
+
/** UiPath credential env vars to merge into a subprocess env. Empty when not logged in. */
|
|
29
|
+
authEnv: Record<string, string>;
|
|
30
|
+
/** The login status used to build {@link authEnv}, or undefined when it could not be read. */
|
|
31
|
+
loginStatus?: LoginStatus;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build UiPath credential env vars from the live `uip login` status, for
|
|
35
|
+
* injecting into a spawned process. The token is refreshed so the child gets
|
|
36
|
+
* a valid bearer token, not a stale one off disk. Never throws: returns an
|
|
37
|
+
* empty `authEnv` when there is no usable login.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getAuthEnv: (options?: GetLoginStatusOptions) => Promise<AuthEnvResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_AUTH_PROFILE = "default";
|
|
2
|
+
export declare class AuthProfileValidationError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare function normalizeAuthProfileName(profile: string | undefined): string | undefined;
|
|
6
|
+
export declare function setActiveAuthProfile(profile: string | undefined): void;
|
|
7
|
+
export declare function clearActiveAuthProfile(): void;
|
|
8
|
+
export declare function getActiveAuthProfile(): string | undefined;
|
|
9
|
+
export declare function runWithAuthProfile<T>(profile: string | undefined, fn: () => T): T;
|
|
10
|
+
export declare function resolveAuthProfileFilePath(profile: string): string;
|
|
11
|
+
export declare function getActiveAuthProfileFilePath(): string | undefined;
|
|
@@ -5,5 +5,9 @@ interface ClientCredentialsLoginProps {
|
|
|
5
5
|
scope?: string[];
|
|
6
6
|
authority?: string;
|
|
7
7
|
}
|
|
8
|
+
export declare class ClientCredentialsAuthenticationError extends Error {
|
|
9
|
+
readonly status: number;
|
|
10
|
+
constructor(message: string, status: number);
|
|
11
|
+
}
|
|
8
12
|
export declare const clientCredentialsLogin: ({ clientId, clientSecret, scope, authority, }: ClientCredentialsLoginProps) => Promise<BaseCredentials>;
|
|
9
13
|
export {};
|
package/dist/envAuth.d.ts
CHANGED