@drax/identity-front 0.3.0 → 0.4.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.3.0",
6
+ "version": "0.4.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.3.0",
28
- "@drax/common-share": "^0.3.0",
29
- "@drax/identity-share": "^0.3.0"
27
+ "@drax/common-front": "^0.4.0",
28
+ "@drax/common-share": "^0.4.0",
29
+ "@drax/identity-share": "^0.4.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": "5ec8cb15b649fb29c69fbb7f248346487e0e9be2"
51
+ "gitHead": "481b302fe72f403abf092806ceca540dd2765dfa"
52
52
  }
@@ -1,7 +1,7 @@
1
1
  import type {IGqlClient} from '@drax/common-front'
2
2
  import type {IRoleProvider} from "../../interfaces/IRoleProvider";
3
3
  import type {IRole, IRoleBase} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
 
7
7
  class RoleGqlProvider implements IRoleProvider {
@@ -58,7 +58,7 @@ class RoleGqlProvider implements IRoleProvider {
58
58
  return data.deleteRole
59
59
  }
60
60
 
61
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
61
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): 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 }
@@ -1,7 +1,7 @@
1
1
  import type {IGqlClient} from '@drax/common-front'
2
2
  import type {ITenantProvider} from "../../interfaces/ITenantProvider";
3
3
  import type {ITenant, ITenantBase} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
 
7
7
  class TenantGqlProvider implements ITenantProvider {
@@ -52,7 +52,7 @@ class TenantGqlProvider implements ITenantProvider {
52
52
  return data.deleteTenant
53
53
  }
54
54
 
55
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<ITenant>> {
55
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): 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 }
@@ -1,7 +1,7 @@
1
1
  import type {IGqlClient} from '@drax/common-front'
2
2
  import type {IUserApiKeyProvider} from "../../interfaces/IUserApiKeyProvider";
3
3
  import type {IUserApiKey, IUserApiKeyBase} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
  class UserApiKeyGqlProvider implements IUserApiKeyProvider {
7
7
 
@@ -48,7 +48,7 @@ class UserApiKeyGqlProvider implements IUserApiKeyProvider {
48
48
  return data.deleteUserApiKey
49
49
  }
50
50
 
51
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUserApiKey>> {
51
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): 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 }
@@ -1,7 +1,7 @@
1
1
  import type {IGqlClient} from '@drax/common-front'
2
2
  import type {IUserProvider} from "../../interfaces/IUserProvider";
3
3
  import type {IUser, IUserCreate, IUserUpdate} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
  class UserGqlProvider implements IUserProvider {
7
7
 
@@ -49,7 +49,7 @@ class UserGqlProvider implements IUserProvider {
49
49
  return data.deleteUser
50
50
  }
51
51
 
52
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUser>> {
52
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}:IDraxPaginateOptions): 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 }
@@ -1,7 +1,7 @@
1
1
  import type {IHttpClient} from '@drax/common-front'
2
2
  import type {IRoleProvider} from "../../interfaces/IRoleProvider.ts";
3
3
  import type {IRole, IRoleBase} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
  class RoleRestProvider implements IRoleProvider {
7
7
 
@@ -41,7 +41,7 @@ class RoleRestProvider implements IRoleProvider {
41
41
  return user
42
42
  }
43
43
 
44
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IRole>> {
44
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IRole>> {
45
45
  const url = '/api/roles'
46
46
  const params = {page, limit, orderBy, order, search}
47
47
  let paginatedRoles = await this.httpClient.get(url, {params})
@@ -1,7 +1,7 @@
1
1
  import type {IHttpClient} from '@drax/common-front'
2
2
  import type {ITenantProvider} from "../../interfaces/ITenantProvider.ts";
3
3
  import type {ITenant, ITenantBase} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
  class TenantRestProvider implements ITenantProvider {
7
7
 
@@ -36,7 +36,7 @@ class TenantRestProvider implements ITenantProvider {
36
36
  return user
37
37
  }
38
38
 
39
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<ITenant>> {
39
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<ITenant>> {
40
40
  const url = '/api/tenants'
41
41
  const params = {page, limit, orderBy, order, search}
42
42
  let paginatedTenants = await this.httpClient.get(url, {params})
@@ -1,7 +1,7 @@
1
1
  import type {IHttpClient} from '@drax/common-front'
2
2
  import type {IUserApiKeyProvider} from "../../interfaces/IUserApiKeyProvider";
3
3
  import type {IUserApiKey, IUserApiKeyBase} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
 
7
7
  class UserApiKeyRestProvider implements IUserApiKeyProvider {
@@ -31,7 +31,7 @@ class UserApiKeyRestProvider implements IUserApiKeyProvider {
31
31
  return user
32
32
  }
33
33
 
34
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUserApiKey>> {
34
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IUserApiKey>> {
35
35
  const url = '/api/user-api-keys'
36
36
  const params = {page, limit, orderBy, order, search}
37
37
  let paginatedUsers = await this.httpClient.get(url, {params})
@@ -1,7 +1,7 @@
1
1
  import type {IHttpClient} from '@drax/common-front'
2
2
  import type {IUserProvider} from "../../interfaces/IUserProvider.ts";
3
3
  import type {IUser, IUserCreate, IUserUpdate} from "@drax/identity-share";
4
- import type {IDraxPaginateResult} from "@drax/common-share";
4
+ import type {IDraxPaginateOptions, IDraxPaginateResult} from "@drax/common-share";
5
5
 
6
6
 
7
7
  class UserRestProvider implements IUserProvider {
@@ -31,7 +31,7 @@ class UserRestProvider implements IUserProvider {
31
31
  return user
32
32
  }
33
33
 
34
- async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}): Promise<IDraxPaginateResult<IUser>> {
34
+ async paginate({page= 1, limit= 5, orderBy="", order=false, search = ""}: IDraxPaginateOptions): Promise<IDraxPaginateResult<IUser>> {
35
35
  const url = '/api/users'
36
36
  const params = {page, limit, orderBy, order, search}
37
37
  let paginatedUsers = await this.httpClient.get(url, {params})