shred-api-client 1.7.3 → 1.7.5

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.
@@ -9,7 +9,7 @@ declare class UserAPI implements UserAPISchema {
9
9
  confirmCode(email: string, code: number): Promise<boolean>;
10
10
  isEmailAvaliable(email: string): Promise<boolean>;
11
11
  authenticate(context: Context, system: System): Promise<string>;
12
- createUser(email: string, name: string, newPassword: string, newPasswordConfirmation: string, profession: string | null, invitationCode: string | null): Promise<any>;
12
+ createUser(email: string, name: string, password: string, passwordConfirmation: string, profession: string | null, invitationCode: string | null): Promise<any>;
13
13
  getUserInfo(context: Context): Promise<User>;
14
14
  }
15
15
  export default UserAPI;
@@ -30,17 +30,16 @@ class UserAPI {
30
30
  const data = await this.clientHTTP.makeRequest(this.env, `${endpointData.uri}`, endpointData.method, { system }, context);
31
31
  return data.isValid;
32
32
  }
33
- async createUser(email, name, newPassword, newPasswordConfirmation, profession, invitationCode) {
33
+ async createUser(email, name, password, passwordConfirmation, profession, invitationCode) {
34
34
  const endpointData = User_schema_1.UserEndpoints.CreateUser;
35
35
  const data = await this.clientHTTP.makeRequest(this.env, endpointData.uri, endpointData.method, {
36
36
  email,
37
37
  name,
38
- newPassword,
39
- newPasswordConfirmation,
38
+ password,
39
+ passwordConfirmation,
40
40
  profession,
41
41
  invitationCode,
42
- }, null, true //Use legacy api (old endpoints)
43
- );
42
+ }, null);
44
43
  return data;
45
44
  }
46
45
  async getUserInfo(context) {
@@ -5,7 +5,7 @@ interface UserAPISchema {
5
5
  sendValidationCode: (email: string) => Promise<boolean>;
6
6
  confirmCode: (email: string, code: number) => Promise<boolean>;
7
7
  authenticate: (context: Context, system: System) => Promise<string>;
8
- createUser: (email: string, name: string, newPassword: string, newPasswordConfirmation: string, profession: string | null, invitationCode: string | null) => Promise<User>;
8
+ createUser: (email: string, name: string, password: string, passwordConfirmation: string, profession: string | null, invitationCode: string | null) => Promise<User>;
9
9
  }
10
10
  declare const UserEndpoints: {
11
11
  GetUserInfo: {
@@ -27,7 +27,7 @@ const UserEndpoints = {
27
27
  method: "POST",
28
28
  },
29
29
  CreateUser: {
30
- uri: "/api/user/public/createAccount",
30
+ uri: "/accounts/public/create",
31
31
  method: "POST",
32
32
  },
33
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shred-api-client",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "description": "API Client for Shred",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",