@dyrected/sdk 2.5.17 → 2.5.19

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 CHANGED
@@ -1083,9 +1083,17 @@ var DyrectedClient = class {
1083
1083
  * Admin-initiated password reset. Sends a reset link to the given email address.
1084
1084
  * Wraps the existing POST /forgot-password endpoint.
1085
1085
  */
1086
- sendResetLink: (email) => this.request(`/api/collections/${slug}/forgot-password`, {
1086
+ sendResetLink: (email, resetUrl) => this.request(`/api/collections/${slug}/forgot-password`, {
1087
1087
  method: "POST",
1088
- body: JSON.stringify({ email })
1088
+ body: JSON.stringify({ email, resetUrl })
1089
+ }),
1090
+ /**
1091
+ * Reset password using a reset token.
1092
+ * Wraps the POST /reset-password endpoint.
1093
+ */
1094
+ resetPassword: (token, password) => this.request(`/api/collections/${slug}/reset-password`, {
1095
+ method: "POST",
1096
+ body: JSON.stringify({ token, password })
1089
1097
  })
1090
1098
  };
1091
1099
  }
package/dist/index.d.cts CHANGED
@@ -207,7 +207,15 @@ declare class DyrectedClient<TSchema extends BaseSchema = any> {
207
207
  * Admin-initiated password reset. Sends a reset link to the given email address.
208
208
  * Wraps the existing POST /forgot-password endpoint.
209
209
  */
210
- sendResetLink: (email: string) => Promise<{
210
+ sendResetLink: (email: string, resetUrl?: string) => Promise<{
211
+ success: boolean;
212
+ message: string;
213
+ }>;
214
+ /**
215
+ * Reset password using a reset token.
216
+ * Wraps the POST /reset-password endpoint.
217
+ */
218
+ resetPassword: (token: string, password: string) => Promise<{
211
219
  success: boolean;
212
220
  message: string;
213
221
  }>;
package/dist/index.d.ts CHANGED
@@ -207,7 +207,15 @@ declare class DyrectedClient<TSchema extends BaseSchema = any> {
207
207
  * Admin-initiated password reset. Sends a reset link to the given email address.
208
208
  * Wraps the existing POST /forgot-password endpoint.
209
209
  */
210
- sendResetLink: (email: string) => Promise<{
210
+ sendResetLink: (email: string, resetUrl?: string) => Promise<{
211
+ success: boolean;
212
+ message: string;
213
+ }>;
214
+ /**
215
+ * Reset password using a reset token.
216
+ * Wraps the POST /reset-password endpoint.
217
+ */
218
+ resetPassword: (token: string, password: string) => Promise<{
211
219
  success: boolean;
212
220
  message: string;
213
221
  }>;
package/dist/index.js CHANGED
@@ -1053,9 +1053,17 @@ var DyrectedClient = class {
1053
1053
  * Admin-initiated password reset. Sends a reset link to the given email address.
1054
1054
  * Wraps the existing POST /forgot-password endpoint.
1055
1055
  */
1056
- sendResetLink: (email) => this.request(`/api/collections/${slug}/forgot-password`, {
1056
+ sendResetLink: (email, resetUrl) => this.request(`/api/collections/${slug}/forgot-password`, {
1057
1057
  method: "POST",
1058
- body: JSON.stringify({ email })
1058
+ body: JSON.stringify({ email, resetUrl })
1059
+ }),
1060
+ /**
1061
+ * Reset password using a reset token.
1062
+ * Wraps the POST /reset-password endpoint.
1063
+ */
1064
+ resetPassword: (token, password) => this.request(`/api/collections/${slug}/reset-password`, {
1065
+ method: "POST",
1066
+ body: JSON.stringify({ token, password })
1059
1067
  })
1060
1068
  };
1061
1069
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/sdk",
3
- "version": "2.5.17",
3
+ "version": "2.5.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "tsup": "^8.5.1",
31
31
  "typescript": "^5.4.5",
32
32
  "vitest": "^1.0.0",
33
- "@dyrected/core": "2.5.17"
33
+ "@dyrected/core": "2.5.19"
34
34
  },
35
35
  "license": "BSL-1.1",
36
36
  "author": "Busola Okeowo <busolaokemoney@gmail.com>",