@mitreka/coreflow-types 0.0.8 → 0.0.9

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 +15 -6
  2. package/package.json +1 -1
  3. package/resource.ts +16 -6
package/auth.ts CHANGED
@@ -105,10 +105,20 @@ export interface OAuthGrantEntity {
105
105
  user_id: string;
106
106
  code: string;
107
107
  scopes: string;
108
+ auth_code: string;
109
+ redirect_uri: string;
108
110
  expired_at?: Date;
109
111
  granted_at?: Date;
110
112
  }
111
113
 
114
+ export type OAuthLogin = {
115
+ username: string;
116
+ password: string;
117
+ client_id: string;
118
+ redirect_uri: string;
119
+ scope: string;
120
+ }
121
+
112
122
  export interface OAuthScope extends BaseEntity, OAuthScopeEntity {
113
123
  id: string;
114
124
  }
@@ -152,6 +162,11 @@ export type RefreshTokenOptions = {
152
162
  scope?: string;
153
163
  }
154
164
 
165
+ export type SessionList = {
166
+ active: string;
167
+ list: string[];
168
+ }
169
+
155
170
  export type TokenExpires = {
156
171
  accessExpiresIn: string;
157
172
  refreshExpiresIn: string;
@@ -162,12 +177,6 @@ export type TokenPair = {
162
177
  refresh_token: string;
163
178
  }
164
179
 
165
- export type UserCredentials = {
166
- username: string;
167
- password: string;
168
- client_id?: string;
169
- }
170
-
171
180
  export type UserSession = {
172
181
  company: AccessCompany;
173
182
  roles: AccessRole[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mitreka/coreflow-types",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "CoreFlow Types Definition",
5
5
  "author": {
6
6
  "name": "Riyan Widiyanto",
package/resource.ts CHANGED
@@ -1,12 +1,22 @@
1
+ export type PageMetaData = {
2
+ page: number;
3
+ limit: number;
4
+ total: number;
5
+ total_pages: number;
6
+ }
7
+
1
8
  export type ResourceCollection<T> = {
2
9
  message: string;
3
10
  data: T[];
4
- meta: {
5
- page: number;
6
- limit: number;
7
- total: number;
8
- total_pages: number;
9
- };
11
+ meta: PageMetaData;
12
+ }
13
+
14
+ export type ResourceListRequest = {
15
+ order: string;
16
+ page: number;
17
+ limit: number;
18
+ search: string;
19
+ where: string;
10
20
  }
11
21
 
12
22
  export type ResourceEntity<T> = {