@mitreka/coreflow-types 0.0.9 → 0.0.10

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.
Files changed (3) hide show
  1. package/auth.ts +20 -10
  2. package/package.json +1 -1
  3. package/resource.ts +2 -2
package/auth.ts CHANGED
@@ -40,29 +40,39 @@ export type AccessUser = {
40
40
  }
41
41
 
42
42
  export type AuthAccessType = 'offline' | 'online';
43
-
44
43
  export type AuthGrantType = 'authorization_code' | 'refresh_token';
45
-
46
44
  export type AuthResponseType = 'code' | 'token';
47
45
 
48
- /**
49
- * Authorization request
50
- */
51
- export type AuthorizationRequest = {
46
+ export type AuthorizationParam = {
52
47
  client_id: string;
53
48
  client_secret: string;
54
49
  code: string;
50
+ code_verifier: string;
55
51
  code_challenge: string;
56
52
  code_challenge_method: string;
57
- code_verifier: string;
58
53
  grant_type: AuthGrantType;
59
- response_type: AuthResponseType;
54
+ redirect_uri: string;
60
55
  refresh_token: string;
56
+ response_type: AuthResponseType;
61
57
  scope: string;
62
58
  state: string;
63
- redirect_uri: string;
64
59
  }
65
60
 
61
+ /**
62
+ * Authorization exchange
63
+ */
64
+ export type AuthorizationExchange = Omit<AuthorizationParam, 'code_challenge' | 'code_challenge_method' | 'refresh_token' | 'response_type' | 'scope' | 'state'>;
65
+
66
+ /**
67
+ * Authorization refresh
68
+ */
69
+ export type AuthorizationRefresh = Pick<AuthorizationParam, 'client_id' | 'client_secret' | 'grant_type' | 'refresh_token'>;
70
+
71
+ /**
72
+ * Authorization request
73
+ */
74
+ export type AuthorizationRequest = Omit<AuthorizationParam, 'client_secret' | 'code' | 'code_verifier' | 'grant_type' | 'refresh_token'>;
75
+
66
76
  export type ClientDetail = {
67
77
  name: string;
68
78
  description?: string;
@@ -73,7 +83,7 @@ export type IDToken = {
73
83
  aud: string; // Client ID
74
84
  sub: string; // User ID
75
85
  name: string;
76
- email: string;
86
+ email?: string;
77
87
  iat: number;
78
88
  exp: number;
79
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mitreka/coreflow-types",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "CoreFlow Types Definition",
5
5
  "author": {
6
6
  "name": "Riyan Widiyanto",
package/resource.ts CHANGED
@@ -12,11 +12,11 @@ export type ResourceCollection<T> = {
12
12
  }
13
13
 
14
14
  export type ResourceListRequest = {
15
+ id: string;
15
16
  order: string;
16
17
  page: number;
17
18
  limit: number;
18
- search: string;
19
- where: string;
19
+ q: string;
20
20
  }
21
21
 
22
22
  export type ResourceEntity<T> = {