@timothyw/pat-common 1.0.26 → 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.
@@ -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 './login-types';
1
+ export * from './sign-in-types';
2
2
  export * from './refresh-auth-types';
3
- export * from './register-types';
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("./login-types"), exports);
17
+ __exportStar(require("./sign-in-types"), exports);
18
18
  __exportStar(require("./refresh-auth-types"), exports);
19
- __exportStar(require("./register-types"), exports);
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
+ });
@@ -15,9 +15,7 @@ export interface ProgramConfigData {
15
15
  expo: {
16
16
  token: string;
17
17
  };
18
- redis: {
19
- url: string;
20
- };
18
+ redisUrl: string;
21
19
  updatedAt: Date;
22
20
  createdAt: Date;
23
21
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@timothyw/pat-common",
3
3
  "description": "",
4
4
  "author": "Timothy Washburn",
5
- "version": "1.0.26",
5
+ "version": "1.0.28",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -1,15 +1,15 @@
1
1
  import { z } from "zod";
2
2
 
3
- export const registerRequestSchema = z.object({
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 RegisterRequest = z.infer<typeof registerRequestSchema>;
10
+ export type CreateAccountRequest = z.infer<typeof createAccountRequestSchema>;
11
11
 
12
- export interface RegisterResponse {
12
+ export interface CreateAccountResponse {
13
13
  id: string;
14
14
  name: string;
15
15
  email: string;
@@ -1,5 +1,5 @@
1
- export * from './login-types'
1
+ export * from './sign-in-types'
2
2
  export * from './refresh-auth-types'
3
- export * from './register-types'
3
+ export * from './create-account-types'
4
4
  export * from './resend-verification-types'
5
5
  export * from './verify-email-types'
@@ -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 loginRequestSchema = z.object({
5
+ export const signInRequestSchema = z.object({
6
6
  email: z.string().email(),
7
7
  password: z.string()
8
8
  });
9
9
 
10
- export type LoginRequest = z.infer<typeof loginRequestSchema>;
10
+ export type SignInRequest = z.infer<typeof signInRequestSchema>;
11
11
 
12
- export interface LoginResponse {
12
+ export interface SignInResponse {
13
13
  tokenData: AuthTokens;
14
14
  authData: PublicAuthData;
15
15
  user: UserData;
@@ -15,9 +15,7 @@ export interface ProgramConfigData {
15
15
  expo: {
16
16
  token: string;
17
17
  },
18
- redis: {
19
- url: string;
20
- }
18
+ redisUrl: string;
21
19
  updatedAt: Date;
22
20
  createdAt: Date;
23
21
  }