@timothyw/pat-common 1.0.27 → 1.0.28
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/types/api/auth/create-account-types.d.ts +23 -0
- package/dist/types/api/auth/create-account-types.js +10 -0
- package/dist/types/api/auth/index.d.ts +2 -2
- package/dist/types/api/auth/index.js +2 -2
- package/dist/types/api/auth/sign-in-types.d.ts +19 -0
- package/dist/types/api/auth/sign-in-types.js +8 -0
- package/package.json +1 -1
- package/src/types/api/auth/{register-types.ts → create-account-types.ts} +3 -3
- package/src/types/api/auth/index.ts +2 -2
- package/src/types/api/auth/{login-types.ts → sign-in-types.ts} +3 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const createAccountRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
email: z.ZodString;
|
|
5
|
+
password: z.ZodString;
|
|
6
|
+
skipVerificationEmail: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
email: string;
|
|
9
|
+
name: string;
|
|
10
|
+
password: string;
|
|
11
|
+
skipVerificationEmail?: boolean | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
email: string;
|
|
14
|
+
name: string;
|
|
15
|
+
password: string;
|
|
16
|
+
skipVerificationEmail?: boolean | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
|
|
19
|
+
export interface CreateAccountResponse {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
email: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAccountRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.createAccountRequestSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string().trim().min(1),
|
|
7
|
+
email: zod_1.z.string().trim().email(),
|
|
8
|
+
password: zod_1.z.string().min(4),
|
|
9
|
+
skipVerificationEmail: zod_1.z.boolean().optional()
|
|
10
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './sign-in-types';
|
|
2
2
|
export * from './refresh-auth-types';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './create-account-types';
|
|
4
4
|
export * from './resend-verification-types';
|
|
5
5
|
export * from './verify-email-types';
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./sign-in-types"), exports);
|
|
18
18
|
__exportStar(require("./refresh-auth-types"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./create-account-types"), exports);
|
|
20
20
|
__exportStar(require("./resend-verification-types"), exports);
|
|
21
21
|
__exportStar(require("./verify-email-types"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AuthTokens } from "../../auth-tokens";
|
|
3
|
+
import { PublicAuthData, UserData } from "../../models";
|
|
4
|
+
export declare const signInRequestSchema: z.ZodObject<{
|
|
5
|
+
email: z.ZodString;
|
|
6
|
+
password: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
}, {
|
|
11
|
+
email: string;
|
|
12
|
+
password: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type SignInRequest = z.infer<typeof signInRequestSchema>;
|
|
15
|
+
export interface SignInResponse {
|
|
16
|
+
tokenData: AuthTokens;
|
|
17
|
+
authData: PublicAuthData;
|
|
18
|
+
user: UserData;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signInRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.signInRequestSchema = zod_1.z.object({
|
|
6
|
+
email: zod_1.z.string().email(),
|
|
7
|
+
password: zod_1.z.string()
|
|
8
|
+
});
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const createAccountRequestSchema = z.object({
|
|
4
4
|
name: z.string().trim().min(1),
|
|
5
5
|
email: z.string().trim().email(),
|
|
6
6
|
password: z.string().min(4),
|
|
7
7
|
skipVerificationEmail: z.boolean().optional()
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
|
|
11
11
|
|
|
12
|
-
export interface
|
|
12
|
+
export interface CreateAccountResponse {
|
|
13
13
|
id: string;
|
|
14
14
|
name: string;
|
|
15
15
|
email: string;
|
|
@@ -2,14 +2,14 @@ import { z } from "zod";
|
|
|
2
2
|
import { AuthTokens } from "../../auth-tokens";
|
|
3
3
|
import { PublicAuthData, UserData } from "../../models";
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const signInRequestSchema = z.object({
|
|
6
6
|
email: z.string().email(),
|
|
7
7
|
password: z.string()
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type SignInRequest = z.infer<typeof signInRequestSchema>;
|
|
11
11
|
|
|
12
|
-
export interface
|
|
12
|
+
export interface SignInResponse {
|
|
13
13
|
tokenData: AuthTokens;
|
|
14
14
|
authData: PublicAuthData;
|
|
15
15
|
user: UserData;
|