@axium/core 0.4.4 → 0.4.5

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/schemas.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import z from 'zod';
1
+ import * as z from 'zod';
2
2
  export declare function zFunction<T extends z.core.$ZodFunction>(schema: T): z.ZodCustom<Parameters<T["implement"]>[0], Parameters<T["implement"]>[0]>;
3
3
  export declare function zAsyncFunction<T extends z.core.$ZodFunction>(schema: T): z.ZodCustom<Parameters<T["implementAsync"]>[0], Parameters<T["implementAsync"]>[0]>;
4
4
  export declare const authenticatorAttachment: z.ZodOptional<z.ZodLiteral<"cross-platform" | "platform">>;
@@ -20,11 +20,11 @@ export declare const PasskeyRegistration: z.ZodObject<{
20
20
  }>>>;
21
21
  publicKeyAlgorithm: z.ZodOptional<z.ZodNumber>;
22
22
  publicKey: z.ZodOptional<z.ZodString>;
23
- }, z.z.core.$strip>;
23
+ }, z.core.$strip>;
24
24
  authenticatorAttachment: z.ZodOptional<z.ZodLiteral<"cross-platform" | "platform">>;
25
25
  clientExtensionResults: z.ZodRecord<z.ZodAny, z.ZodAny>;
26
26
  type: z.ZodLiteral<"public-key">;
27
- }, z.z.core.$strip>;
27
+ }, z.core.$strip>;
28
28
  /**
29
29
  * POSTed to the `/users/:id/login` endpoint.
30
30
  */
@@ -36,11 +36,11 @@ export declare const PasskeyAuthenticationResponse: z.ZodObject<{
36
36
  authenticatorData: z.ZodString;
37
37
  signature: z.ZodString;
38
38
  userHandle: z.ZodOptional<z.ZodString>;
39
- }, z.z.core.$strip>;
39
+ }, z.core.$strip>;
40
40
  authenticatorAttachment: z.ZodOptional<z.ZodLiteral<"cross-platform" | "platform">>;
41
41
  clientExtensionResults: z.ZodRecord<z.ZodAny, z.ZodAny>;
42
42
  type: z.ZodLiteral<"public-key">;
43
- }, z.z.core.$strip>;
43
+ }, z.core.$strip>;
44
44
  export declare const APIUserRegistration: z.ZodObject<{
45
45
  name: z.ZodString;
46
46
  email: z.ZodEmail;
@@ -63,20 +63,20 @@ export declare const APIUserRegistration: z.ZodObject<{
63
63
  }>>>;
64
64
  publicKeyAlgorithm: z.ZodOptional<z.ZodNumber>;
65
65
  publicKey: z.ZodOptional<z.ZodString>;
66
- }, z.z.core.$strip>;
66
+ }, z.core.$strip>;
67
67
  authenticatorAttachment: z.ZodOptional<z.ZodLiteral<"cross-platform" | "platform">>;
68
68
  clientExtensionResults: z.ZodRecord<z.ZodAny, z.ZodAny>;
69
69
  type: z.ZodLiteral<"public-key">;
70
- }, z.z.core.$strip>;
71
- }, z.z.core.$strip>;
70
+ }, z.core.$strip>;
71
+ }, z.core.$strip>;
72
72
  export declare const PasskeyChangeable: z.ZodObject<{
73
73
  name: z.ZodOptional<z.ZodString>;
74
- }, z.z.core.$strip>;
74
+ }, z.core.$strip>;
75
75
  export declare const UserAuthOptions: z.ZodObject<{
76
76
  type: z.ZodLiteral<"login" | "action">;
77
- }, z.z.core.$strip>;
77
+ }, z.core.$strip>;
78
78
  export type UserAuthOptions = z.infer<typeof UserAuthOptions>;
79
79
  export declare const LogoutSessions: z.ZodObject<{
80
80
  id: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
81
81
  confirm_all: z.ZodOptional<z.ZodBoolean>;
82
- }, z.z.core.$strip>;
82
+ }, z.core.$strip>;
package/dist/schemas.js CHANGED
@@ -1,4 +1,4 @@
1
- import z from 'zod';
1
+ import * as z from 'zod';
2
2
  export function zFunction(schema) {
3
3
  return z.custom((fn) => schema.implement(fn));
4
4
  }
package/dist/user.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import z from 'zod';
1
+ import * as z from 'zod';
2
2
  /**
3
3
  * User preferences.
4
4
  * Modify with `declare module ...`
@@ -14,7 +14,7 @@ export declare const User: z.ZodObject<{
14
14
  preferences: z.ZodRecord<z.ZodString, z.ZodAny>;
15
15
  roles: z.ZodArray<z.ZodString>;
16
16
  registeredAt: z.ZodDate;
17
- }, z.z.core.$strip>;
17
+ }, z.core.$strip>;
18
18
  export interface User extends z.infer<typeof User> {
19
19
  preferences: Preferences;
20
20
  }
@@ -28,7 +28,7 @@ export declare const UserChangeable: z.ZodObject<{
28
28
  name: z.ZodOptional<z.ZodString>;
29
29
  image: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
30
30
  preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
31
- }, z.z.core.$strip>;
31
+ }, z.core.$strip>;
32
32
  export type UserChangeable = z.infer<typeof UserChangeable>;
33
33
  export declare function getUserImage(user: {
34
34
  name?: string;
package/dist/user.js CHANGED
@@ -1,4 +1,4 @@
1
- import z from 'zod';
1
+ import * as z from 'zod';
2
2
  export const User = z.object({
3
3
  id: z.uuid(),
4
4
  name: z.string().min(1, 'Name is required').max(255, 'Name is too long'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/core",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "funding": {
6
6
  "type": "individual",