@borealise/api 2.0.0-alpha.2 → 2.0.0-alpha.3
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.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -117,6 +117,12 @@ interface AuthResource {
|
|
|
117
117
|
message: string;
|
|
118
118
|
}>>;
|
|
119
119
|
me(): Promise<ApiResponse<MeResponse>>;
|
|
120
|
+
forgotPassword(email: string): Promise<ApiResponse<{
|
|
121
|
+
success: boolean;
|
|
122
|
+
}>>;
|
|
123
|
+
resetPassword(token: string, password: string): Promise<ApiResponse<{
|
|
124
|
+
success: boolean;
|
|
125
|
+
}>>;
|
|
120
126
|
}
|
|
121
127
|
declare const createAuthResource: (api: Api) => AuthResource;
|
|
122
128
|
|
package/dist/index.d.ts
CHANGED
|
@@ -117,6 +117,12 @@ interface AuthResource {
|
|
|
117
117
|
message: string;
|
|
118
118
|
}>>;
|
|
119
119
|
me(): Promise<ApiResponse<MeResponse>>;
|
|
120
|
+
forgotPassword(email: string): Promise<ApiResponse<{
|
|
121
|
+
success: boolean;
|
|
122
|
+
}>>;
|
|
123
|
+
resetPassword(token: string, password: string): Promise<ApiResponse<{
|
|
124
|
+
success: boolean;
|
|
125
|
+
}>>;
|
|
120
126
|
}
|
|
121
127
|
declare const createAuthResource: (api: Api) => AuthResource;
|
|
122
128
|
|
package/dist/index.js
CHANGED
|
@@ -225,7 +225,9 @@ var createAuthResource = (api) => ({
|
|
|
225
225
|
register: (data) => api.post(`${endpoint}/register`, data),
|
|
226
226
|
refresh: (refreshToken) => api.post(`${endpoint}/refresh`, { refreshToken }),
|
|
227
227
|
logout: () => api.post(`${endpoint}/logout`),
|
|
228
|
-
me: () => api.get(`${endpoint}/me`)
|
|
228
|
+
me: () => api.get(`${endpoint}/me`),
|
|
229
|
+
forgotPassword: (email) => api.post(`${endpoint}/forgot-password`, { email }),
|
|
230
|
+
resetPassword: (token, password) => api.post(`${endpoint}/reset-password`, { token, password })
|
|
229
231
|
});
|
|
230
232
|
|
|
231
233
|
// src/resources/user.ts
|
package/dist/index.mjs
CHANGED
|
@@ -176,7 +176,9 @@ var createAuthResource = (api) => ({
|
|
|
176
176
|
register: (data) => api.post(`${endpoint}/register`, data),
|
|
177
177
|
refresh: (refreshToken) => api.post(`${endpoint}/refresh`, { refreshToken }),
|
|
178
178
|
logout: () => api.post(`${endpoint}/logout`),
|
|
179
|
-
me: () => api.get(`${endpoint}/me`)
|
|
179
|
+
me: () => api.get(`${endpoint}/me`),
|
|
180
|
+
forgotPassword: (email) => api.post(`${endpoint}/forgot-password`, { email }),
|
|
181
|
+
resetPassword: (token, password) => api.post(`${endpoint}/reset-password`, { token, password })
|
|
180
182
|
});
|
|
181
183
|
|
|
182
184
|
// src/resources/user.ts
|