@drax/identity-front 0.1.7 → 0.3.0

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.1.7",
6
+ "version": "0.3.0",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -24,9 +24,9 @@
24
24
  "format": "prettier --write src/"
25
25
  },
26
26
  "dependencies": {
27
- "@drax/common-front": "^0.1.0",
28
- "@drax/common-share": "^0.1.0",
29
- "@drax/identity-share": "^0.1.6"
27
+ "@drax/common-front": "^0.3.0",
28
+ "@drax/common-share": "^0.3.0",
29
+ "@drax/identity-share": "^0.3.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@rushstack/eslint-patch": "^1.8.0",
@@ -48,5 +48,5 @@
48
48
  "vite-plugin-dts": "^3.9.1",
49
49
  "vitest": "^1.4.0"
50
50
  },
51
- "gitHead": "b58c8353d9dd283ba5cd4b40866fb5ee679f43be"
51
+ "gitHead": "5ec8cb15b649fb29c69fbb7f248346487e0e9be2"
52
52
  }
@@ -58,13 +58,13 @@ class RoleGqlProvider implements IRoleProvider {
58
58
  return data.deleteRole
59
59
  }
60
60
 
61
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
61
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
62
62
  const query: string = `query paginateRole($options: PaginateOptions) {
63
63
  paginateRole(options: $options) {
64
64
  total, page, limit, items{id name permissions childRoles{id name} readonly }
65
65
  }
66
66
  }`
67
- const variables = {options: {page, limit, orderBy, orderDesc, search}}
67
+ const variables = {options: {page, limit, orderBy, order, search}}
68
68
  let data = await this.gqlClient.query(query, variables)
69
69
  return data.paginateRole
70
70
  }
@@ -52,13 +52,13 @@ class TenantGqlProvider implements ITenantProvider {
52
52
  return data.deleteTenant
53
53
  }
54
54
 
55
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<ITenant>> {
55
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<ITenant>> {
56
56
  const query: string = `query paginateTenant($options: PaginateOptions) {
57
57
  paginateTenant(options: $options) {
58
58
  total page limit items{ id name createdAt updatedAt }
59
59
  }
60
60
  }`
61
- const variables = {options: {page, limit, orderBy, orderDesc, search}}
61
+ const variables = {options: {page, limit, orderBy, order, search}}
62
62
  let data = await this.gqlClient.query(query, variables)
63
63
  return data.paginateTenant
64
64
  }
@@ -48,13 +48,13 @@ class UserApiKeyGqlProvider implements IUserApiKeyProvider {
48
48
  return data.deleteUserApiKey
49
49
  }
50
50
 
51
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IUserApiKey>> {
51
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUserApiKey>> {
52
52
  const query: string = `query paginateUserApiKey($options: PaginateOptions) {
53
53
  paginateUserApiKey(options: $options) {
54
54
  total page limit items{ id name ipv4 ipv6 user{id username} createdAt updatedAt }
55
55
  }
56
56
  }`
57
- const variables = {options: {page, limit, orderBy, orderDesc, search}}
57
+ const variables = {options: {page, limit, orderBy, order, search}}
58
58
  let data = await this.gqlClient.query(query, variables)
59
59
  return data.paginateUserApiKey
60
60
  }
@@ -49,13 +49,13 @@ class UserGqlProvider implements IUserProvider {
49
49
  return data.deleteUser
50
50
  }
51
51
 
52
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IUser>> {
52
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUser>> {
53
53
  const query: string = `query paginateUser($options: PaginateOptions) {
54
54
  paginateUser(options: $options) {
55
55
  total page limit items{ id name username email phone active role{id, name} tenant{id name} createdAt updatedAt }
56
56
  }
57
57
  }`
58
- const variables = {options: {page, limit, orderBy, orderDesc, search}}
58
+ const variables = {options: {page, limit, orderBy, order, search}}
59
59
  let data = await this.gqlClient.query(query, variables)
60
60
  return data.paginateUser
61
61
  }
@@ -41,9 +41,9 @@ class RoleRestProvider implements IRoleProvider {
41
41
  return user
42
42
  }
43
43
 
44
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
44
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
45
45
  const url = '/api/roles'
46
- const params = {page, limit, orderBy, orderDesc, search}
46
+ const params = {page, limit, orderBy, order, search}
47
47
  let paginatedRoles = await this.httpClient.get(url, {params})
48
48
  return paginatedRoles as IDraxPaginateResult<IRole>
49
49
 
@@ -36,9 +36,9 @@ class TenantRestProvider implements ITenantProvider {
36
36
  return user
37
37
  }
38
38
 
39
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<ITenant>> {
39
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<ITenant>> {
40
40
  const url = '/api/tenants'
41
- const params = {page, limit, orderBy, orderDesc, search}
41
+ const params = {page, limit, orderBy, order, search}
42
42
  let paginatedTenants = await this.httpClient.get(url, {params})
43
43
  return paginatedTenants as IDraxPaginateResult<ITenant>
44
44
 
@@ -31,9 +31,9 @@ class UserApiKeyRestProvider implements IUserApiKeyProvider {
31
31
  return user
32
32
  }
33
33
 
34
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IUserApiKey>> {
34
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUserApiKey>> {
35
35
  const url = '/api/user-api-keys'
36
- const params = {page, limit, orderBy, orderDesc, search}
36
+ const params = {page, limit, orderBy, order, search}
37
37
  let paginatedUsers = await this.httpClient.get(url, {params})
38
38
  return paginatedUsers as IDraxPaginateResult<IUserApiKey>
39
39
 
@@ -31,9 +31,9 @@ class UserRestProvider implements IUserProvider {
31
31
  return user
32
32
  }
33
33
 
34
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IUser>> {
34
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUser>> {
35
35
  const url = '/api/users'
36
- const params = {page, limit, orderBy, orderDesc, search}
36
+ const params = {page, limit, orderBy, order, search}
37
37
  let paginatedUsers = await this.httpClient.get(url, {params})
38
38
  return paginatedUsers as IDraxPaginateResult<IUser>
39
39
 
@@ -21,8 +21,8 @@ class RoleSystem implements IRoleProvider {
21
21
  return this._provider.fetchPermissions()
22
22
  }
23
23
 
24
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
25
- return this._provider.paginate({page, limit, orderBy, orderDesc, search})
24
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
25
+ return this._provider.paginate({page, limit, orderBy, order, search})
26
26
  }
27
27
 
28
28
  async create(userPayload: IRoleBase):Promise<IRole> {
@@ -17,8 +17,8 @@ class TenantSystem {
17
17
  return this._provider.fetchTenant()
18
18
  }
19
19
 
20
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}):Promise<IDraxPaginateResult<ITenant>> {
21
- return this._provider.paginate({page, limit, orderBy, orderDesc, search})
20
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}):Promise<IDraxPaginateResult<ITenant>> {
21
+ return this._provider.paginate({page, limit, orderBy, order, search})
22
22
  }
23
23
 
24
24
  async create(userPayload: ITenantBase):Promise<ITenant> {
@@ -13,8 +13,8 @@ class UserApiKeySystem {
13
13
  this.prototype = 'UserSystem'
14
14
  }
15
15
 
16
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}):Promise<IDraxPaginateResult<IUserApiKey>> {
17
- return this._provider.paginate({page, limit, orderBy, orderDesc, search})
16
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}):Promise<IDraxPaginateResult<IUserApiKey>> {
17
+ return this._provider.paginate({page, limit, orderBy, order, search})
18
18
  }
19
19
 
20
20
  async create(userPayload: IUserApiKeyBase):Promise<IUserApiKey> {
@@ -13,8 +13,8 @@ class UserSystem {
13
13
  this.prototype = 'UserSystem'
14
14
  }
15
15
 
16
- async paginate({page= 1, limit= 5, orderBy="", orderDesc=false, search = ""}):Promise<IDraxPaginateResult<IUser>> {
17
- return this._provider.paginate({page, limit, orderBy, orderDesc, search})
16
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}):Promise<IDraxPaginateResult<IUser>> {
17
+ return this._provider.paginate({page, limit, orderBy, order, search})
18
18
  }
19
19
 
20
20
  async create(userPayload: IUserCreate):Promise<IUser> {