@temboplus/tembo-dashboard 0.1.2 → 0.1.3-beta.0
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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/auth/auth.api-contract.d.ts +110 -30
- package/dist/modules/auth/auth.dtos.d.ts +11 -0
- package/dist/modules/auth/auth.repository.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import z from "zod";
|
|
1
2
|
export declare const authContract: {
|
|
2
3
|
login: {
|
|
3
4
|
summary: "User login";
|
|
4
5
|
description: "Authenticate user with email and password";
|
|
5
6
|
method: "POST";
|
|
6
|
-
body:
|
|
7
|
-
identity:
|
|
8
|
-
password:
|
|
9
|
-
}, "strip",
|
|
7
|
+
body: z.ZodObject<{
|
|
8
|
+
identity: z.ZodString;
|
|
9
|
+
password: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
identity: string;
|
|
11
12
|
password: string;
|
|
12
13
|
}, {
|
|
@@ -15,11 +16,11 @@ export declare const authContract: {
|
|
|
15
16
|
}>;
|
|
16
17
|
path: "/login";
|
|
17
18
|
responses: {
|
|
18
|
-
201:
|
|
19
|
-
token:
|
|
20
|
-
identity:
|
|
21
|
-
name:
|
|
22
|
-
}, "strip",
|
|
19
|
+
201: z.ZodObject<{
|
|
20
|
+
token: z.ZodString;
|
|
21
|
+
identity: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
24
|
token: string;
|
|
24
25
|
identity: string;
|
|
25
26
|
name: string;
|
|
@@ -28,14 +29,14 @@ export declare const authContract: {
|
|
|
28
29
|
identity: string;
|
|
29
30
|
name: string;
|
|
30
31
|
}>;
|
|
31
|
-
400:
|
|
32
|
-
reason:
|
|
33
|
-
error:
|
|
34
|
-
details:
|
|
35
|
-
message:
|
|
32
|
+
400: z.ZodObject<{
|
|
33
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
34
|
+
error: z.ZodOptional<z.ZodString>;
|
|
35
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
36
|
+
message: z.ZodOptional<z.ZodString>;
|
|
36
37
|
} & {
|
|
37
|
-
statusCode:
|
|
38
|
-
}, "strip",
|
|
38
|
+
statusCode: z.ZodLiteral<400>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
40
|
statusCode: 400;
|
|
40
41
|
message?: string | undefined;
|
|
41
42
|
error?: string | undefined;
|
|
@@ -48,14 +49,14 @@ export declare const authContract: {
|
|
|
48
49
|
details?: Record<string, unknown> | undefined;
|
|
49
50
|
reason?: string | undefined;
|
|
50
51
|
}>;
|
|
51
|
-
401:
|
|
52
|
-
reason:
|
|
53
|
-
error:
|
|
54
|
-
details:
|
|
55
|
-
message:
|
|
52
|
+
401: z.ZodObject<{
|
|
53
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
54
|
+
error: z.ZodOptional<z.ZodString>;
|
|
55
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
message: z.ZodOptional<z.ZodString>;
|
|
56
57
|
} & {
|
|
57
|
-
statusCode:
|
|
58
|
-
}, "strip",
|
|
58
|
+
statusCode: z.ZodLiteral<401>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
60
|
statusCode: 401;
|
|
60
61
|
message?: string | undefined;
|
|
61
62
|
error?: string | undefined;
|
|
@@ -68,14 +69,93 @@ export declare const authContract: {
|
|
|
68
69
|
details?: Record<string, unknown> | undefined;
|
|
69
70
|
reason?: string | undefined;
|
|
70
71
|
}>;
|
|
71
|
-
500:
|
|
72
|
-
reason:
|
|
73
|
-
error:
|
|
74
|
-
details:
|
|
75
|
-
message:
|
|
72
|
+
500: z.ZodObject<{
|
|
73
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
74
|
+
error: z.ZodOptional<z.ZodString>;
|
|
75
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
|
+
message: z.ZodOptional<z.ZodString>;
|
|
76
77
|
} & {
|
|
77
|
-
statusCode:
|
|
78
|
-
}, "strip",
|
|
78
|
+
statusCode: z.ZodLiteral<500>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
statusCode: 500;
|
|
81
|
+
message?: string | undefined;
|
|
82
|
+
error?: string | undefined;
|
|
83
|
+
details?: Record<string, unknown> | undefined;
|
|
84
|
+
reason?: string | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
statusCode: 500;
|
|
87
|
+
message?: string | undefined;
|
|
88
|
+
error?: string | undefined;
|
|
89
|
+
details?: Record<string, unknown> | undefined;
|
|
90
|
+
reason?: string | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
updatePassword: {
|
|
95
|
+
summary: "Update password";
|
|
96
|
+
description: "Update user password";
|
|
97
|
+
method: "POST";
|
|
98
|
+
body: z.ZodObject<{
|
|
99
|
+
oldPassword: z.ZodString;
|
|
100
|
+
newPassword: z.ZodString;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
oldPassword: string;
|
|
103
|
+
newPassword: string;
|
|
104
|
+
}, {
|
|
105
|
+
oldPassword: string;
|
|
106
|
+
newPassword: string;
|
|
107
|
+
}>;
|
|
108
|
+
path: "/update-password";
|
|
109
|
+
responses: {
|
|
110
|
+
201: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
111
|
+
400: z.ZodObject<{
|
|
112
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
113
|
+
error: z.ZodOptional<z.ZodString>;
|
|
114
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
115
|
+
message: z.ZodOptional<z.ZodString>;
|
|
116
|
+
} & {
|
|
117
|
+
statusCode: z.ZodLiteral<400>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
statusCode: 400;
|
|
120
|
+
message?: string | undefined;
|
|
121
|
+
error?: string | undefined;
|
|
122
|
+
details?: Record<string, unknown> | undefined;
|
|
123
|
+
reason?: string | undefined;
|
|
124
|
+
}, {
|
|
125
|
+
statusCode: 400;
|
|
126
|
+
message?: string | undefined;
|
|
127
|
+
error?: string | undefined;
|
|
128
|
+
details?: Record<string, unknown> | undefined;
|
|
129
|
+
reason?: string | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
401: z.ZodObject<{
|
|
132
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
133
|
+
error: z.ZodOptional<z.ZodString>;
|
|
134
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
135
|
+
message: z.ZodOptional<z.ZodString>;
|
|
136
|
+
} & {
|
|
137
|
+
statusCode: z.ZodLiteral<401>;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
statusCode: 401;
|
|
140
|
+
message?: string | undefined;
|
|
141
|
+
error?: string | undefined;
|
|
142
|
+
details?: Record<string, unknown> | undefined;
|
|
143
|
+
reason?: string | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
statusCode: 401;
|
|
146
|
+
message?: string | undefined;
|
|
147
|
+
error?: string | undefined;
|
|
148
|
+
details?: Record<string, unknown> | undefined;
|
|
149
|
+
reason?: string | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
500: z.ZodObject<{
|
|
152
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
153
|
+
error: z.ZodOptional<z.ZodString>;
|
|
154
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
155
|
+
message: z.ZodOptional<z.ZodString>;
|
|
156
|
+
} & {
|
|
157
|
+
statusCode: z.ZodLiteral<500>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
159
|
statusCode: 500;
|
|
80
160
|
message?: string | undefined;
|
|
81
161
|
error?: string | undefined;
|
|
@@ -23,6 +23,17 @@ export declare const AuthDTOSchemas: {
|
|
|
23
23
|
identity: string;
|
|
24
24
|
password: string;
|
|
25
25
|
}>;
|
|
26
|
+
updatePassword: z.ZodObject<{
|
|
27
|
+
oldPassword: z.ZodString;
|
|
28
|
+
newPassword: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
oldPassword: string;
|
|
31
|
+
newPassword: string;
|
|
32
|
+
}, {
|
|
33
|
+
oldPassword: string;
|
|
34
|
+
newPassword: string;
|
|
35
|
+
}>;
|
|
26
36
|
};
|
|
27
37
|
export type UserDTO = z.infer<typeof AuthDTOSchemas.user>;
|
|
28
38
|
export type LoginRequestDTO = z.infer<typeof AuthDTOSchemas.loginRequest>;
|
|
39
|
+
export type UpdatePasswordDTO = z.infer<typeof AuthDTOSchemas.updatePassword>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/tembo-dashboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3-beta.0",
|
|
4
4
|
"description": "A foundational library for Temboplus-Dashboard projects providing type-safe data layer abstraction with API contracts, domain models, and repositories.",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|