@trustgraph/client 1.7.2 → 2.0.3

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.
@@ -0,0 +1,26 @@
1
+ export interface BootstrapStatus {
2
+ bootstrapAvailable: boolean;
3
+ }
4
+ export interface LoginResult {
5
+ jwt: string;
6
+ jwtExpires: string;
7
+ }
8
+ export declare class AuthError extends Error {
9
+ status?: number;
10
+ constructor(message: string, status?: number);
11
+ }
12
+ export interface AuthApiOptions {
13
+ bootstrapStatusUrl?: string;
14
+ loginUrl?: string;
15
+ fetchImpl?: typeof fetch;
16
+ }
17
+ export declare class AuthApi {
18
+ private bootstrapStatusUrl;
19
+ private loginUrl;
20
+ private fetchImpl;
21
+ constructor(options?: AuthApiOptions);
22
+ bootstrapStatus(): Promise<BootstrapStatus>;
23
+ login(username: string, password: string, default_workspace?: string): Promise<LoginResult>;
24
+ }
25
+ export declare const createAuthApi: (options?: AuthApiOptions) => AuthApi;
26
+ //# sourceMappingURL=auth-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-api.d.ts","sourceRoot":"","sources":["../../src/auth/auth-api.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,SAAU,SAAQ,KAAK;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;gBACJ,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAK7C;AAED,MAAM,WAAW,cAAc;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,qBAAa,OAAO;IAClB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAe;gBAEpB,OAAO,GAAE,cAAmB;IAOlC,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB3C,KAAK,CACT,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,WAAW,CAAC;CAsBxB;AAED,eAAO,MAAM,aAAa,GAAI,UAAU,cAAc,YAChC,CAAC"}