@koloseum/types 0.1.14 → 0.1.15
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/general.d.ts +18 -7
- package/package.json +1 -1
package/dist/general.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Database } from "./database.js";
|
|
2
2
|
import type { User } from "@supabase/supabase-js";
|
|
3
3
|
export type AccountType = "player" | "lounge";
|
|
4
|
-
export type AuthenticationType = "login" | "register" | "otp";
|
|
5
4
|
export interface AppMetadata {
|
|
6
5
|
providers: string[];
|
|
7
6
|
provider: string;
|
|
@@ -12,6 +11,7 @@ export interface AppMetadata {
|
|
|
12
11
|
pseudonym?: string;
|
|
13
12
|
};
|
|
14
13
|
}
|
|
14
|
+
export type AuthenticationType = "login" | "register" | "otp";
|
|
15
15
|
export interface AuthenticationJWT {
|
|
16
16
|
aud: string;
|
|
17
17
|
exp: number;
|
|
@@ -20,11 +20,7 @@ export interface AuthenticationJWT {
|
|
|
20
20
|
email: string;
|
|
21
21
|
phone: string;
|
|
22
22
|
app_metadata: AppMetadata;
|
|
23
|
-
user_metadata:
|
|
24
|
-
email_verified: boolean;
|
|
25
|
-
phone_verified: boolean;
|
|
26
|
-
sub: string;
|
|
27
|
-
};
|
|
23
|
+
user_metadata: UserMetadata;
|
|
28
24
|
role: string;
|
|
29
25
|
aal: string;
|
|
30
26
|
amr: [{
|
|
@@ -75,8 +71,23 @@ export type MicroserviceObject<MicroserviceGroup> = {
|
|
|
75
71
|
slug: Exclude<Microservice<MicroserviceGroup>, "account">;
|
|
76
72
|
roles: MicroserviceRole[];
|
|
77
73
|
});
|
|
78
|
-
export type
|
|
74
|
+
export type UserMetadata = {
|
|
75
|
+
email_verified: boolean;
|
|
76
|
+
phone_verified: boolean;
|
|
77
|
+
sub: string;
|
|
78
|
+
backroom?: {
|
|
79
|
+
welcome_notification_sent: boolean;
|
|
80
|
+
};
|
|
81
|
+
lounges?: {
|
|
82
|
+
welcome_notification_sent: boolean;
|
|
83
|
+
};
|
|
84
|
+
players?: {
|
|
85
|
+
welcome_notification_sent: boolean;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export type UserWithCustomMetadata = User & {
|
|
79
89
|
app_metadata: AppMetadata;
|
|
90
|
+
user_metadata: UserMetadata;
|
|
80
91
|
};
|
|
81
92
|
export interface PhoneOTPData {
|
|
82
93
|
awaitingOTP: boolean;
|