@twin.org/api-auth-entity-storage-rest-client 0.0.1 → 0.0.2-next.2

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.
@@ -60,6 +60,27 @@ class EntityStorageAuthenticationClient extends apiCore.BaseRestClient {
60
60
  });
61
61
  return response.body;
62
62
  }
63
+ /**
64
+ * Update the user's password.
65
+ * @param email The email address of the user to update.
66
+ * @param currentPassword The current password for the user.
67
+ * @param newPassword The new password for the user.
68
+ * @returns Nothing.
69
+ */
70
+ async updatePassword(email, currentPassword, newPassword) {
71
+ core.Guards.stringValue(this.CLASS_NAME, "email", email);
72
+ core.Guards.stringValue(this.CLASS_NAME, "currentPassword", currentPassword);
73
+ core.Guards.stringValue(this.CLASS_NAME, "newPassword", newPassword);
74
+ await this.fetch("/:email/password", "PUT", {
75
+ pathParams: {
76
+ email
77
+ },
78
+ body: {
79
+ currentPassword,
80
+ newPassword
81
+ }
82
+ });
83
+ }
63
84
  }
64
85
 
65
86
  exports.EntityStorageAuthenticationClient = EntityStorageAuthenticationClient;
@@ -58,6 +58,27 @@ class EntityStorageAuthenticationClient extends BaseRestClient {
58
58
  });
59
59
  return response.body;
60
60
  }
61
+ /**
62
+ * Update the user's password.
63
+ * @param email The email address of the user to update.
64
+ * @param currentPassword The current password for the user.
65
+ * @param newPassword The new password for the user.
66
+ * @returns Nothing.
67
+ */
68
+ async updatePassword(email, currentPassword, newPassword) {
69
+ Guards.stringValue(this.CLASS_NAME, "email", email);
70
+ Guards.stringValue(this.CLASS_NAME, "currentPassword", currentPassword);
71
+ Guards.stringValue(this.CLASS_NAME, "newPassword", newPassword);
72
+ await this.fetch("/:email/password", "PUT", {
73
+ pathParams: {
74
+ email
75
+ },
76
+ body: {
77
+ currentPassword,
78
+ newPassword
79
+ }
80
+ });
81
+ }
61
82
  }
62
83
 
63
84
  export { EntityStorageAuthenticationClient };
@@ -39,4 +39,12 @@ export declare class EntityStorageAuthenticationClient extends BaseRestClient im
39
39
  token?: string;
40
40
  expiry: number;
41
41
  }>;
42
+ /**
43
+ * Update the user's password.
44
+ * @param email The email address of the user to update.
45
+ * @param currentPassword The current password for the user.
46
+ * @param newPassword The new password for the user.
47
+ * @returns Nothing.
48
+ */
49
+ updatePassword(email: string, currentPassword: string, newPassword: string): Promise<void>;
42
50
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @twin.org/api-auth-entity-storage-rest-client - Changelog
2
2
 
3
+ ## [0.0.2-next.2](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-rest-client-v0.0.2-next.1...api-auth-entity-storage-rest-client-v0.0.2-next.2) (2025-07-17)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **api-auth-entity-storage-rest-client:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.1 to 0.0.2-next.2
16
+ * @twin.org/api-core bumped from 0.0.2-next.1 to 0.0.2-next.2
17
+ * @twin.org/api-models bumped from 0.0.2-next.1 to 0.0.2-next.2
18
+
19
+ ## [0.0.2-next.1](https://github.com/twinfoundation/api/compare/api-auth-entity-storage-rest-client-v0.0.2-next.0...api-auth-entity-storage-rest-client-v0.0.2-next.1) (2025-07-08)
20
+
21
+
22
+ ### Features
23
+
24
+ * add json-ld mime type processor and auth admin component ([8861791](https://github.com/twinfoundation/api/commit/88617916e23bfbca023dbae1976fe421983a02ff))
25
+ * update dependencies ([1171dc4](https://github.com/twinfoundation/api/commit/1171dc416a9481737f6a640e3cf30145768f37e9))
26
+ * use shared store mechanism ([#19](https://github.com/twinfoundation/api/issues/19)) ([32116df](https://github.com/twinfoundation/api/commit/32116df3b4380a30137f5056f242a5c99afa2df9))
27
+
28
+
29
+ ### Dependencies
30
+
31
+ * The following workspace dependencies were updated
32
+ * dependencies
33
+ * @twin.org/api-auth-entity-storage-models bumped from 0.0.2-next.0 to 0.0.2-next.1
34
+ * @twin.org/api-core bumped from 0.0.2-next.0 to 0.0.2-next.1
35
+ * @twin.org/api-models bumped from 0.0.2-next.0 to 0.0.2-next.1
36
+
3
37
  ## 0.0.1 (2025-07-03)
4
38
 
5
39
 
@@ -129,3 +129,41 @@ The refreshed token, if it uses a mechanism with public access.
129
129
  #### Implementation of
130
130
 
131
131
  `IAuthenticationComponent.refresh`
132
+
133
+ ***
134
+
135
+ ### updatePassword()
136
+
137
+ > **updatePassword**(`email`, `currentPassword`, `newPassword`): `Promise`\<`void`\>
138
+
139
+ Update the user's password.
140
+
141
+ #### Parameters
142
+
143
+ ##### email
144
+
145
+ `string`
146
+
147
+ The email address of the user to update.
148
+
149
+ ##### currentPassword
150
+
151
+ `string`
152
+
153
+ The current password for the user.
154
+
155
+ ##### newPassword
156
+
157
+ `string`
158
+
159
+ The new password for the user.
160
+
161
+ #### Returns
162
+
163
+ `Promise`\<`void`\>
164
+
165
+ Nothing.
166
+
167
+ #### Implementation of
168
+
169
+ `IAuthenticationComponent.updatePassword`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-auth-entity-storage-rest-client",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.2",
4
4
  "description": "Perform REST authentication using entity storage.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,12 +14,12 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-auth-entity-storage-models": "^0.0.1",
18
- "@twin.org/api-core": "^0.0.1",
19
- "@twin.org/api-models": "^0.0.1",
20
- "@twin.org/core": "^0.0.1",
21
- "@twin.org/nameof": "^0.0.1",
22
- "@twin.org/web": "^0.0.1"
17
+ "@twin.org/api-auth-entity-storage-models": "0.0.2-next.2",
18
+ "@twin.org/api-core": "0.0.2-next.2",
19
+ "@twin.org/api-models": "0.0.2-next.2",
20
+ "@twin.org/core": "next",
21
+ "@twin.org/nameof": "next",
22
+ "@twin.org/web": "next"
23
23
  },
24
24
  "main": "./dist/cjs/index.cjs",
25
25
  "module": "./dist/esm/index.mjs",