@authhero/kysely-adapter 0.25.3 → 0.26.0
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/kysely-adapter.d.ts
CHANGED
|
@@ -8,10 +8,76 @@ export interface Totals {
|
|
|
8
8
|
limit: number;
|
|
9
9
|
length: number;
|
|
10
10
|
}
|
|
11
|
+
declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
12
|
+
email: z.ZodOptional<z.ZodString>;
|
|
13
|
+
username: z.ZodOptional<z.ZodString>;
|
|
14
|
+
given_name: z.ZodOptional<z.ZodString>;
|
|
15
|
+
family_name: z.ZodOptional<z.ZodString>;
|
|
16
|
+
nickname: z.ZodOptional<z.ZodString>;
|
|
17
|
+
name: z.ZodOptional<z.ZodString>;
|
|
18
|
+
picture: z.ZodOptional<z.ZodString>;
|
|
19
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
20
|
+
linked_to: z.ZodOptional<z.ZodString>;
|
|
21
|
+
profileData: z.ZodOptional<z.ZodString>;
|
|
22
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
app_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
|
|
24
|
+
user_metadata: z.ZodOptional<z.ZodDefault<z.ZodAny>>;
|
|
25
|
+
}, {
|
|
26
|
+
email_verified: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
+
verify_email: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
last_ip: z.ZodOptional<z.ZodString>;
|
|
29
|
+
last_login: z.ZodOptional<z.ZodString>;
|
|
30
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
31
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
32
|
+
connection: z.ZodDefault<z.ZodString>;
|
|
33
|
+
is_social: z.ZodBoolean;
|
|
34
|
+
}>, "strip", z.ZodTypeAny, {
|
|
35
|
+
email_verified: boolean;
|
|
36
|
+
connection: string;
|
|
37
|
+
provider: string;
|
|
38
|
+
is_social: boolean;
|
|
39
|
+
email?: string | undefined;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
username?: string | undefined;
|
|
42
|
+
given_name?: string | undefined;
|
|
43
|
+
family_name?: string | undefined;
|
|
44
|
+
user_id?: string | undefined;
|
|
45
|
+
profileData?: string | undefined;
|
|
46
|
+
nickname?: string | undefined;
|
|
47
|
+
picture?: string | undefined;
|
|
48
|
+
locale?: string | undefined;
|
|
49
|
+
linked_to?: string | undefined;
|
|
50
|
+
app_metadata?: any;
|
|
51
|
+
user_metadata?: any;
|
|
52
|
+
verify_email?: boolean | undefined;
|
|
53
|
+
last_ip?: string | undefined;
|
|
54
|
+
last_login?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
is_social: boolean;
|
|
57
|
+
email?: string | undefined;
|
|
58
|
+
email_verified?: boolean | undefined;
|
|
59
|
+
name?: string | undefined;
|
|
60
|
+
username?: string | undefined;
|
|
61
|
+
given_name?: string | undefined;
|
|
62
|
+
family_name?: string | undefined;
|
|
63
|
+
connection?: string | undefined;
|
|
64
|
+
user_id?: string | undefined;
|
|
65
|
+
provider?: string | undefined;
|
|
66
|
+
profileData?: string | undefined;
|
|
67
|
+
nickname?: string | undefined;
|
|
68
|
+
picture?: string | undefined;
|
|
69
|
+
locale?: string | undefined;
|
|
70
|
+
linked_to?: string | undefined;
|
|
71
|
+
app_metadata?: any;
|
|
72
|
+
user_metadata?: any;
|
|
73
|
+
verify_email?: boolean | undefined;
|
|
74
|
+
last_ip?: string | undefined;
|
|
75
|
+
last_login?: string | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
export type UserInsert = z.infer<typeof userInsertSchema>;
|
|
11
78
|
declare const userSchema: z.ZodObject<{
|
|
12
79
|
user_id: z.ZodString;
|
|
13
80
|
email: z.ZodString;
|
|
14
|
-
is_social: z.ZodBoolean;
|
|
15
81
|
login_count: z.ZodNumber;
|
|
16
82
|
identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
83
|
connection: z.ZodString;
|
|
@@ -105,6 +171,7 @@ declare const userSchema: z.ZodObject<{
|
|
|
105
171
|
last_login: z.ZodOptional<z.ZodString>;
|
|
106
172
|
provider: z.ZodDefault<z.ZodString>;
|
|
107
173
|
connection: z.ZodDefault<z.ZodString>;
|
|
174
|
+
is_social: z.ZodBoolean;
|
|
108
175
|
}, "strip", z.ZodTypeAny, {
|
|
109
176
|
created_at: string;
|
|
110
177
|
updated_at: string;
|
|
@@ -2987,7 +3054,7 @@ export interface ListUsersResponse extends Totals {
|
|
|
2987
3054
|
}
|
|
2988
3055
|
export interface UserDataAdapter {
|
|
2989
3056
|
get(tenant_id: string, id: string): Promise<User | null>;
|
|
2990
|
-
create(tenantId: string, user:
|
|
3057
|
+
create(tenantId: string, user: UserInsert): Promise<User>;
|
|
2991
3058
|
remove(tenantId: string, id: string): Promise<boolean>;
|
|
2992
3059
|
list(tenantId: string, params: ListParams): Promise<ListUsersResponse>;
|
|
2993
3060
|
update(tenantId: string, id: string, user: Partial<User>): Promise<boolean>;
|
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -27,6 +27,7 @@ function Ga(t) {
|
|
|
27
27
|
...r,
|
|
28
28
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29
29
|
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
30
|
+
login_count: 0,
|
|
30
31
|
tenant_id: e,
|
|
31
32
|
email_verified: n.email_verified ? 1 : 0,
|
|
32
33
|
is_social: n.is_social ? 1 : 0,
|
|
@@ -3029,7 +3030,8 @@ const Un = i.object({
|
|
|
3029
3030
|
last_login: i.string().optional(),
|
|
3030
3031
|
user_id: i.string().optional(),
|
|
3031
3032
|
provider: i.string().default("email"),
|
|
3032
|
-
connection: i.string().default("email")
|
|
3033
|
+
connection: i.string().default("email"),
|
|
3034
|
+
is_social: i.boolean()
|
|
3033
3035
|
});
|
|
3034
3036
|
i.object({
|
|
3035
3037
|
...rs.shape,
|
|
@@ -3037,7 +3039,6 @@ i.object({
|
|
|
3037
3039
|
user_id: i.string(),
|
|
3038
3040
|
// TODO: this not might be correct if you use the username
|
|
3039
3041
|
email: i.string(),
|
|
3040
|
-
is_social: i.boolean(),
|
|
3041
3042
|
login_count: i.number(),
|
|
3042
3043
|
identities: i.array(as).optional()
|
|
3043
3044
|
});
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.26.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"kysely": "^0.27.4",
|
|
43
43
|
"nanoid": "^5.0.8",
|
|
44
|
-
"@authhero/adapter-interfaces": "^0.
|
|
44
|
+
"@authhero/adapter-interfaces": "^0.34.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@hono/zod-openapi": "^0.16.4",
|