ldco-contract 0.1.42 → 0.1.44
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
|
@@ -60,3 +60,4 @@ export { toUserDTO } from './lib/converters/toUserDTO';
|
|
|
60
60
|
export { toUserModel } from './lib/converters/toUserModel';
|
|
61
61
|
export { toVenueDTO } from './lib/converters/toVenueDTO';
|
|
62
62
|
export { toVenueModel } from './lib/converters/toVenueModel';
|
|
63
|
+
export { AuthStatus, AuthUser, AuthAdapter } from './types/auth/auth';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare type AuthStatus = 'loading' | 'authenticated' | 'unauthenticated';
|
|
2
|
+
export interface AuthUser {
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
avatarUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AuthAdapter {
|
|
9
|
+
me(): Promise<AuthUser | null>;
|
|
10
|
+
login?(opts?: {
|
|
11
|
+
redirectTo?: string;
|
|
12
|
+
}): void | Promise<void>;
|
|
13
|
+
logout?(opts?: {
|
|
14
|
+
redirectTo?: string;
|
|
15
|
+
}): void | Promise<void>;
|
|
16
|
+
subscribe?(cb: () => void): () => void;
|
|
17
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -73,3 +73,6 @@ export { toUserDTO } from './lib/converters/toUserDTO';
|
|
|
73
73
|
export { toUserModel } from './lib/converters/toUserModel';
|
|
74
74
|
export { toVenueDTO } from './lib/converters/toVenueDTO';
|
|
75
75
|
export { toVenueModel } from './lib/converters/toVenueModel';
|
|
76
|
+
|
|
77
|
+
// AUTH
|
|
78
|
+
export { AuthStatus, AuthUser, AuthAdapter } from './types/auth/auth';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type AuthStatus = 'loading' | 'authenticated' | 'unauthenticated';
|
|
2
|
+
export interface AuthUser { id: string; name?: string; email?: string; avatarUrl?: string; }
|
|
3
|
+
export interface AuthAdapter {
|
|
4
|
+
me(): Promise<AuthUser | null>;
|
|
5
|
+
login?(opts?: { redirectTo?: string }): void | Promise<void>;
|
|
6
|
+
logout?(opts?: { redirectTo?: string }): void | Promise<void>;
|
|
7
|
+
subscribe?(cb: () => void): () => void;
|
|
8
|
+
}
|