@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.
@@ -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: import("zod").ZodObject<{
7
- identity: import("zod").ZodString;
8
- password: import("zod").ZodString;
9
- }, "strip", import("zod").ZodTypeAny, {
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: import("zod").ZodObject<{
19
- token: import("zod").ZodString;
20
- identity: import("zod").ZodString;
21
- name: import("zod").ZodString;
22
- }, "strip", import("zod").ZodTypeAny, {
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: import("zod").ZodObject<{
32
- reason: import("zod").ZodOptional<import("zod").ZodString>;
33
- error: import("zod").ZodOptional<import("zod").ZodString>;
34
- details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
35
- message: import("zod").ZodOptional<import("zod").ZodString>;
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: import("zod").ZodLiteral<400>;
38
- }, "strip", import("zod").ZodTypeAny, {
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: import("zod").ZodObject<{
52
- reason: import("zod").ZodOptional<import("zod").ZodString>;
53
- error: import("zod").ZodOptional<import("zod").ZodString>;
54
- details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
55
- message: import("zod").ZodOptional<import("zod").ZodString>;
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: import("zod").ZodLiteral<401>;
58
- }, "strip", import("zod").ZodTypeAny, {
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: import("zod").ZodObject<{
72
- reason: import("zod").ZodOptional<import("zod").ZodString>;
73
- error: import("zod").ZodOptional<import("zod").ZodString>;
74
- details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
75
- message: import("zod").ZodOptional<import("zod").ZodString>;
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: import("zod").ZodLiteral<500>;
78
- }, "strip", import("zod").ZodTypeAny, {
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>;
@@ -20,4 +20,8 @@ export declare class AuthRepository extends BaseRepository<typeof authContract>
20
20
  user: User;
21
21
  token: string;
22
22
  }>;
23
+ updatePassword(props: {
24
+ oldPassword: string;
25
+ newPassword: string;
26
+ }): Promise<boolean>;
23
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temboplus/tembo-dashboard",
3
- "version": "0.1.2",
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",