@drax/identity-front 0.11.5 → 0.12.7

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.11.5",
6
+ "version": "0.12.7",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -25,9 +25,9 @@
25
25
  "format": "prettier --write src/"
26
26
  },
27
27
  "dependencies": {
28
- "@drax/common-front": "^0.11.5",
29
- "@drax/crud-share": "^0.11.5",
30
- "@drax/identity-share": "^0.11.5"
28
+ "@drax/common-front": "^0.12.1",
29
+ "@drax/crud-share": "^0.12.1",
30
+ "@drax/identity-share": "^0.12.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@rushstack/eslint-patch": "^1.8.0",
@@ -49,5 +49,5 @@
49
49
  "vite-plugin-dts": "^3.9.1",
50
50
  "vitest": "^1.4.0"
51
51
  },
52
- "gitHead": "e67f10f0af29468c9d30f16135cfdbdff166d916"
52
+ "gitHead": "2a0174e7fff0e4778ff45b5e1f3752b06164e93a"
53
53
  }
@@ -2,7 +2,7 @@ const messages = {
2
2
  en: {
3
3
  userapikey: {
4
4
  entity: 'ApiKey',
5
- menu: 'ApiKey',
5
+ menu: 'ApiKeys',
6
6
  crud: 'Manage UserApiKey',
7
7
  field:{
8
8
  name: "Reference Name",
@@ -21,7 +21,7 @@ const messages = {
21
21
  es: {
22
22
  userapikey:{
23
23
  entity: 'ApiKey',
24
- menu: 'ApiKey',
24
+ menu: 'ApiKeys',
25
25
  crud: 'Gestionar ApiKey',
26
26
  field:{
27
27
  name: "Nombre de referencia",
@@ -9,7 +9,7 @@ interface IAuthProvider {
9
9
  changeOwnPassword(currentPassword:string, newPassword:string):Promise<boolean>
10
10
  recoveryPasswordRequest(email:string):Promise<boolean>
11
11
  recoveryPasswordComplete(recoveryCode:string, newPassword:string):Promise<boolean>
12
- register(form:IUserRegistration):Promise<boolean>
12
+ register(form:IUserRegistration):Promise<{success:boolean, message: string}>
13
13
  changeAvatar(file: File): Promise<boolean>
14
14
  }
15
15
 
@@ -3,8 +3,6 @@ import type {IAuthProvider} from "../../interfaces/IAuthProvider.ts";
3
3
  import type {IAuthUser} from "../../interfaces/IAuthUser";
4
4
  import type {ILoginResponse} from "../../interfaces/ILoginResponse";
5
5
  import type {IUserRegistration} from "../../interfaces/IUserRegistration";
6
- import type {Promise} from "cypress/types/cy-bluebird";
7
- import type {File} from "vitest";
8
6
 
9
7
  class AuthGqlProvider implements IAuthProvider {
10
8
 
@@ -58,7 +56,7 @@ class AuthGqlProvider implements IAuthProvider {
58
56
  return /true/i.test(r as string)
59
57
  }
60
58
 
61
- async changeAvatar(file: File): Promise<boolean> {
59
+ async changeAvatar(file: Blob): Promise<boolean> {
62
60
  //const query: string = `mutation changeAvatar( $file: File!) { changeAvatar }`
63
61
  const operations = `{ "query": "mutation ($file: File!) { changeAvatar(file: $file) }", "variables": { "file": null } }`
64
62
  const data = new FormData()
@@ -78,7 +76,7 @@ class AuthGqlProvider implements IAuthProvider {
78
76
  throw new Error('Not implemented')
79
77
  }
80
78
 
81
- register(form: IUserRegistration): Promise<boolean> {
79
+ register(form: IUserRegistration): Promise<{success: boolean; message: string}> {
82
80
  throw new Error('Not implemented')
83
81
  }
84
82
  }
@@ -62,10 +62,10 @@ class AuthRestProvider implements IAuthProvider {
62
62
  return /true/i.test(r as string)
63
63
  }
64
64
 
65
- async register(form: IUserRegistration): Promise<boolean> {
65
+ async register(form: IUserRegistration): Promise<{success: boolean; message: string}> {
66
66
  const url = '/api/users/register'
67
67
  let r = await this.httpClient.post(url, form)
68
- return /true/i.test(r as string)
68
+ return r as {success: boolean; message: string}
69
69
  }
70
70
 
71
71
  async changeAvatar(file: File): Promise<boolean> {
@@ -46,7 +46,7 @@ class RoleRestProvider implements IRoleProvider {
46
46
  return user
47
47
  }
48
48
 
49
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IRole>> {
49
+ async paginate({page= 1, limit= 5, orderBy="", order= "asc", search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IRole>> {
50
50
  const url = '/api/roles'
51
51
  const params = {page, limit, orderBy, order, search}
52
52
  let paginatedRoles = await this.httpClient.get(url, {params})
@@ -41,7 +41,7 @@ class TenantRestProvider implements ITenantProvider {
41
41
  return user
42
42
  }
43
43
 
44
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<ITenant>> {
44
+ async paginate({page= 1, limit= 5, orderBy="", order= "asc", search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<ITenant>> {
45
45
  const url = '/api/tenants'
46
46
  const params = {page, limit, orderBy, order, search}
47
47
  let paginatedTenants = await this.httpClient.get(url, {params})
@@ -36,7 +36,7 @@ class UserRestProvider implements IUserProvider {
36
36
  return user
37
37
  }
38
38
 
39
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IUser>> {
39
+ async paginate({page= 1, limit= 5, orderBy="",order= "asc", search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IUser>> {
40
40
  const url = '/api/users'
41
41
  const params = {page, limit, orderBy, order, search}
42
42
  let paginatedUsers = await this.httpClient.get(url, {params})
@@ -41,8 +41,8 @@ class AuthSystem implements IAuthProvider {
41
41
  return result
42
42
  }
43
43
 
44
- async register(form: IUserRegistration):Promise<boolean> {
45
- const result: boolean = await this._provider.register(form)
44
+ async register(form: IUserRegistration):Promise<{success:boolean, message: string}> {
45
+ const result = await this._provider.register(form)
46
46
  return result
47
47
  }
48
48
 
@@ -35,7 +35,7 @@ class RoleSystem implements IRoleProvider {
35
35
  return this._provider.fetchPermissions()
36
36
  }
37
37
 
38
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = "", filters = []}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IRole>> {
38
+ async paginate({page= 1, limit= 5, orderBy="", order="asc", search = "", filters = []}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IRole>> {
39
39
  return this._provider.paginate({page, limit, orderBy, order, search, filters})
40
40
  }
41
41
 
@@ -35,7 +35,7 @@ class TenantSystem implements IDraxCrudProvider<ITenant, ITenantBase, ITenantBas
35
35
  page = 1,
36
36
  limit = 5,
37
37
  orderBy = "",
38
- order = false,
38
+ order = "asc",
39
39
  search = "",
40
40
  filters = []
41
41
  }: IDraxPaginateOptions): Promise<IDraxPaginateResult<ITenant>> {
@@ -22,7 +22,7 @@ class UserApiKeySystem implements IUserApiKeyProvider{
22
22
  return this._provider.search(value)
23
23
  }
24
24
 
25
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = "", filters = []}: IDraxPaginateOptions):Promise<IDraxPaginateResult<IUserApiKey>> {
25
+ async paginate({page= 1, limit= 5, orderBy="", order="asc", search = "", filters = []}: IDraxPaginateOptions):Promise<IDraxPaginateResult<IUserApiKey>> {
26
26
  return this._provider.paginate({page, limit, orderBy, order, search, filters})
27
27
  }
28
28
 
@@ -27,7 +27,7 @@ class UserSystem implements IUserProvider{
27
27
  return this._provider.search(value)
28
28
  }
29
29
 
30
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = "", filters = []}: IDraxPaginateOptions):Promise<IDraxPaginateResult<IUser>> {
30
+ async paginate({page= 1, limit= 5, orderBy= "", order= "asc", search = "", filters = []}: IDraxPaginateOptions):Promise<IDraxPaginateResult<IUser>> {
31
31
  return this._provider.paginate({page, limit, orderBy, order, search, filters})
32
32
  }
33
33