@neuctra/authix 1.0.19 → 1.0.21

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.
@@ -7,6 +7,7 @@ interface UserProfileProps {
7
7
  homeUrl?: string;
8
8
  primaryColor?: string;
9
9
  onLogout: () => void;
10
+ onVerify?: (user: UserInfo) => void;
10
11
  }
11
12
  export declare const ReactUserProfile: React.FC<UserProfileProps>;
12
13
  export {};
@@ -123,64 +123,40 @@ export declare class NeuctraAuthix {
123
123
  * 🌐 Universal request helper with structured responses and error handling
124
124
  * @param method HTTP method (GET, POST, PUT, DELETE)
125
125
  * @param path API endpoint path
126
- * @param data optional request body
127
- * @param extraHeaders optional headers
126
+ * @param data Optional request body
127
+ * @param extraHeaders Optional custom headers
128
128
  */
129
129
  private request;
130
130
  /**
131
131
  * Register a new user
132
132
  * @param params user details
133
133
  */
134
- signup(params: SignupParams): Promise<{
135
- success: boolean;
136
- data?: any;
137
- message: string;
138
- }>;
134
+ signup(params: SignupParams): Promise<any>;
139
135
  /**
140
136
  * Login a user
141
137
  * @param params login details
142
138
  */
143
- login(params: LoginParams): Promise<{
144
- success: boolean;
145
- data?: any;
146
- message: string;
147
- }>;
139
+ login(params: LoginParams): Promise<any>;
148
140
  /**
149
141
  * Update an existing user
150
142
  * @param params fields to update
151
143
  */
152
- updateUser(params: UpdateUserParams): Promise<{
153
- success: boolean;
154
- data?: any;
155
- message: string;
156
- }>;
144
+ updateUser(params: UpdateUserParams): Promise<any>;
157
145
  /**
158
146
  * Change a user's password (Admin only)
159
147
  * @param params requires userId, currentPassword, newPassword
160
148
  */
161
- changePassword(params: ChangePasswordParams): Promise<{
162
- success: boolean;
163
- data?: any;
164
- message: string;
165
- }>;
149
+ changePassword(params: ChangePasswordParams): Promise<any>;
166
150
  /**
167
151
  * Delete a user
168
152
  * @param params requires userId and optionally appId
169
153
  */
170
- deleteUser(params: DeleteUserParams): Promise<{
171
- success: boolean;
172
- data?: any;
173
- message: string;
174
- }>;
154
+ deleteUser(params: DeleteUserParams): Promise<any>;
175
155
  /**
176
156
  * Get the profile of the authenticated user
177
157
  * @param params requires JWT token
178
158
  */
179
- getProfile(params: GetProfileParams): Promise<{
180
- success: boolean;
181
- data?: any;
182
- message: string;
183
- }>;
159
+ getProfile(params: GetProfileParams): Promise<any>;
184
160
  /**
185
161
  * Send verification OTP (requires logged-in user token)
186
162
  * @param params requires token
@@ -188,11 +164,7 @@ export declare class NeuctraAuthix {
188
164
  sendVerifyOTP(params: {
189
165
  token: string;
190
166
  appId?: string;
191
- }): Promise<{
192
- success: boolean;
193
- data?: any;
194
- message: string;
195
- }>;
167
+ }): Promise<any>;
196
168
  /**
197
169
  * Verify email with OTP (requires logged-in user token)
198
170
  * @param params requires token + otp
@@ -201,11 +173,7 @@ export declare class NeuctraAuthix {
201
173
  token: string;
202
174
  otp: string;
203
175
  appId?: string;
204
- }): Promise<{
205
- success: boolean;
206
- data?: any;
207
- message: string;
208
- }>;
176
+ }): Promise<any>;
209
177
  /**
210
178
  * Forgot password (public route)
211
179
  * @param params requires email
@@ -213,11 +181,7 @@ export declare class NeuctraAuthix {
213
181
  forgotPassword(params: {
214
182
  email: string;
215
183
  appId?: string;
216
- }): Promise<{
217
- success: boolean;
218
- data?: any;
219
- message: string;
220
- }>;
184
+ }): Promise<any>;
221
185
  /**
222
186
  * Reset password (public route)
223
187
  * @param params requires email, otp, newPassword
@@ -227,55 +191,31 @@ export declare class NeuctraAuthix {
227
191
  otp: string;
228
192
  newPassword: string;
229
193
  appId?: string;
230
- }): Promise<{
231
- success: boolean;
232
- data?: any;
233
- message: string;
234
- }>;
194
+ }): Promise<any>;
235
195
  /**
236
196
  * Get all data objects for a user
237
197
  * @param params requires userId
238
198
  */
239
- getUserData(params: GetUserDataParams): Promise<{
240
- success: boolean;
241
- data?: any;
242
- message: string;
243
- }>;
199
+ getUserData(params: GetUserDataParams): Promise<any>;
244
200
  /**
245
201
  * Get a single data object for a user
246
202
  * @param params requires userId and dataId
247
203
  */
248
- getSingleUserData(params: GetSingleUserDataParams): Promise<{
249
- success: boolean;
250
- data?: any;
251
- message: string;
252
- }>;
204
+ getSingleUserData(params: GetSingleUserDataParams): Promise<any>;
253
205
  /**
254
206
  * Add a new data object to a user
255
207
  * @param params requires userId and data object
256
208
  */
257
- addUserData(params: AddUserDataParams): Promise<{
258
- success: boolean;
259
- data?: any;
260
- message: string;
261
- }>;
209
+ addUserData(params: AddUserDataParams): Promise<any>;
262
210
  /**
263
211
  * Update a data object by its id
264
212
  * @param params requires userId, dataId, and updated fields
265
213
  */
266
- updateUserData(params: UpdateUserDataParams): Promise<{
267
- success: boolean;
268
- data?: any;
269
- message: string;
270
- }>;
214
+ updateUserData(params: UpdateUserDataParams): Promise<any>;
271
215
  /**
272
216
  * Delete a data object by its id
273
217
  * @param params requires userId and dataId
274
218
  */
275
- deleteUserData(params: DeleteUserDataParams): Promise<{
276
- success: boolean;
277
- data?: any;
278
- message: string;
279
- }>;
219
+ deleteUserData(params: DeleteUserDataParams): Promise<any>;
280
220
  }
281
221
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuctra/authix",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Authentication SDK and UI components library for React and Vue with TailwindCSS",
5
5
  "author": "Taha Asif",
6
6
  "license": "MIT",