@axium/core 0.0.1

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/README.md ADDED
@@ -0,0 +1 @@
1
+ # Axium Core
package/dist/api.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ import * as z from 'zod';
2
+ export declare const User: z.ZodObject<{
3
+ email: z.ZodString;
4
+ name: z.ZodString;
5
+ image: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ name: string;
8
+ email: string;
9
+ image: string;
10
+ }, {
11
+ name: string;
12
+ email: string;
13
+ image: string;
14
+ }>;
15
+ export type User = z.infer<typeof User>;
16
+ export declare const Login: z.ZodObject<{
17
+ email: z.ZodString;
18
+ password: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ email: string;
21
+ password: string;
22
+ }, {
23
+ email: string;
24
+ password: string;
25
+ }>;
26
+ export type Login = z.infer<typeof Login>;
27
+ export declare const Registration: z.ZodObject<z.objectUtil.extendShape<{
28
+ email: z.ZodString;
29
+ password: z.ZodString;
30
+ }, {
31
+ name: z.ZodString;
32
+ }>, "strip", z.ZodTypeAny, {
33
+ name: string;
34
+ email: string;
35
+ password: string;
36
+ }, {
37
+ name: string;
38
+ email: string;
39
+ password: string;
40
+ }>;
41
+ export type Registration = z.infer<typeof Registration>;
package/dist/api.js ADDED
@@ -0,0 +1,17 @@
1
+ import * as z from 'zod';
2
+ export const User = z.object({
3
+ email: z.string().email(),
4
+ name: z.string(),
5
+ image: z.string().url(),
6
+ });
7
+ export const Login = z.object({
8
+ email: z.string({ required_error: 'Email is required' }).min(1, 'Email is required').max(255, 'Email is too long').email('Invalid email'),
9
+ password: z
10
+ .string({ required_error: 'Password is required' })
11
+ .min(1, 'Password is required')
12
+ .min(8, 'Password must be more than 8 characters')
13
+ .max(255, 'Password must be less than 255 characters'),
14
+ });
15
+ export const Registration = Login.extend({
16
+ name: z.string({ required_error: 'Name is required' }),
17
+ });
@@ -0,0 +1 @@
1
+ export * as api from './api.js';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * as api from './api.js';
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@axium/core",
3
+ "version": "0.0.1",
4
+ "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
+ "funding": {
6
+ "type": "individual",
7
+ "url": "https://github.com/sponsors/james-pre"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/james-pre/axium.git"
12
+ },
13
+ "homepage": "https://github.com/james-pre/axium#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/james-pre/axium/issues"
16
+ },
17
+ "type": "module",
18
+ "main": "dist/index.js",
19
+ "types": "dist/index.d.ts",
20
+ "exports": {
21
+ ".": "./dist/index.js",
22
+ "./api": "./dist/api.js"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsc"
29
+ },
30
+ "dependencies": {
31
+ "zod": "^3.24.2"
32
+ }
33
+ }