@authhero/kysely-adapter 0.25.2 → 0.25.4

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.
@@ -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;
@@ -640,22 +707,19 @@ declare const ClientSchema: z.ZodObject<{
640
707
  dkim_private_key: z.ZodOptional<z.ZodString>;
641
708
  dkim_public_key: z.ZodOptional<z.ZodString>;
642
709
  email_api_key: z.ZodOptional<z.ZodString>;
643
- email_service: z.ZodOptional<z.ZodUnion<[
644
- z.ZodLiteral<"mailgun">,
645
- z.ZodLiteral<"mailchannels">
646
- ]>>;
710
+ email_service: z.ZodOptional<z.ZodString>;
647
711
  }, "strip", z.ZodTypeAny, {
648
712
  domain: string;
649
713
  dkim_private_key?: string | undefined;
650
714
  dkim_public_key?: string | undefined;
651
715
  email_api_key?: string | undefined;
652
- email_service?: "mailgun" | "mailchannels" | undefined;
716
+ email_service?: string | undefined;
653
717
  }, {
654
718
  domain: string;
655
719
  dkim_private_key?: string | undefined;
656
720
  dkim_public_key?: string | undefined;
657
721
  email_api_key?: string | undefined;
658
- email_service?: "mailgun" | "mailchannels" | undefined;
722
+ email_service?: string | undefined;
659
723
  }>, "many">;
660
724
  tenant: z.ZodObject<{
661
725
  name: z.ZodString;
@@ -919,7 +983,7 @@ declare const ClientSchema: z.ZodObject<{
919
983
  dkim_private_key?: string | undefined;
920
984
  dkim_public_key?: string | undefined;
921
985
  email_api_key?: string | undefined;
922
- email_service?: "mailgun" | "mailchannels" | undefined;
986
+ email_service?: string | undefined;
923
987
  }[];
924
988
  tenant: {
925
989
  created_at: string;
@@ -997,7 +1061,7 @@ declare const ClientSchema: z.ZodObject<{
997
1061
  dkim_private_key?: string | undefined;
998
1062
  dkim_public_key?: string | undefined;
999
1063
  email_api_key?: string | undefined;
1000
- email_service?: "mailgun" | "mailchannels" | undefined;
1064
+ email_service?: string | undefined;
1001
1065
  }[];
1002
1066
  tenant: {
1003
1067
  created_at: string;
@@ -1361,28 +1425,25 @@ declare const domainSchema: z.ZodObject<z.objectUtil.extendShape<{
1361
1425
  dkim_private_key: z.ZodOptional<z.ZodString>;
1362
1426
  dkim_public_key: z.ZodOptional<z.ZodString>;
1363
1427
  email_api_key: z.ZodOptional<z.ZodString>;
1364
- email_service: z.ZodEnum<[
1365
- "mailgun",
1366
- "mailchannels"
1367
- ]>;
1428
+ email_service: z.ZodOptional<z.ZodString>;
1368
1429
  }>, "strip", z.ZodTypeAny, {
1369
1430
  created_at: string;
1370
1431
  updated_at: string;
1371
1432
  id: string;
1372
1433
  domain: string;
1373
- email_service: "mailgun" | "mailchannels";
1374
1434
  dkim_private_key?: string | undefined;
1375
1435
  dkim_public_key?: string | undefined;
1376
1436
  email_api_key?: string | undefined;
1437
+ email_service?: string | undefined;
1377
1438
  }, {
1378
1439
  created_at: string;
1379
1440
  updated_at: string;
1380
1441
  id: string;
1381
1442
  domain: string;
1382
- email_service: "mailgun" | "mailchannels";
1383
1443
  dkim_private_key?: string | undefined;
1384
1444
  dkim_public_key?: string | undefined;
1385
1445
  email_api_key?: string | undefined;
1446
+ email_service?: string | undefined;
1386
1447
  }>;
1387
1448
  export type Domain = z.infer<typeof domainSchema>;
1388
1449
  declare const hookInsertSchema: z.ZodObject<{
@@ -2993,7 +3054,7 @@ export interface ListUsersResponse extends Totals {
2993
3054
  }
2994
3055
  export interface UserDataAdapter {
2995
3056
  get(tenant_id: string, id: string): Promise<User | null>;
2996
- create(tenantId: string, user: User): Promise<User>;
3057
+ create(tenantId: string, user: UserInsert): Promise<User>;
2997
3058
  remove(tenantId: string, id: string): Promise<boolean>;
2998
3059
  list(tenantId: string, params: ListParams): Promise<ListUsersResponse>;
2999
3060
  update(tenantId: string, id: string, user: Partial<User>): Promise<boolean>;
@@ -3029,7 +3029,8 @@ const Un = i.object({
3029
3029
  last_login: i.string().optional(),
3030
3030
  user_id: i.string().optional(),
3031
3031
  provider: i.string().default("email"),
3032
- connection: i.string().default("email")
3032
+ connection: i.string().default("email"),
3033
+ is_social: i.boolean()
3033
3034
  });
3034
3035
  i.object({
3035
3036
  ...rs.shape,
@@ -3037,7 +3038,6 @@ i.object({
3037
3038
  user_id: i.string(),
3038
3039
  // TODO: this not might be correct if you use the username
3039
3040
  email: i.string(),
3040
- is_social: i.boolean(),
3041
3041
  login_count: i.number(),
3042
3042
  identities: i.array(as).optional()
3043
3043
  });
@@ -3207,7 +3207,7 @@ const ms = i.object({
3207
3207
  dkim_private_key: i.string().optional(),
3208
3208
  dkim_public_key: i.string().optional(),
3209
3209
  email_api_key: i.string().optional(),
3210
- email_service: i.union([i.literal("mailgun"), i.literal("mailchannels")]).optional()
3210
+ email_service: i.string().optional()
3211
3211
  });
3212
3212
  i.object({
3213
3213
  ...cs.shape,
@@ -3247,7 +3247,7 @@ const fs = i.enum([
3247
3247
  dkim_private_key: i.string().optional(),
3248
3248
  dkim_public_key: i.string().optional(),
3249
3249
  email_api_key: i.string().optional(),
3250
- email_service: i.enum(["mailgun", "mailchannels"])
3250
+ email_service: i.string().optional()
3251
3251
  });
3252
3252
  Un.extend({
3253
3253
  ...ys.shape,
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.25.2",
14
+ "version": "0.25.4",
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.32.1"
44
+ "@authhero/adapter-interfaces": "^0.34.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@hono/zod-openapi": "^0.16.4",