adamo-types 1.0.17 → 1.0.21
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/README.md +34 -7
- package/{bss-bridge → admin/product-catalog}/index.ts +0 -0
- package/{common/rename → admin/user}/index.ts +0 -0
- package/admin/user/request/admin.user.request.ts +14 -0
- package/admin/user/response/admin.user.response.ts +0 -0
- package/bss/index.ts +0 -0
- package/common/login/index.ts +2 -2
- package/common/login/{interface/request → request}/login.request.interface.ts +0 -0
- package/common/login/{interface/response → response}/login.response.interface.ts +6 -0
- package/common/user/auth/user.auth.ts +8 -0
- package/common/user/data/user.data.ts +12 -0
- package/common/user/index.ts +2 -0
- package/package.json +1 -1
- package/web/order/index.ts +2 -0
- package/web/order/request/web.order.request.ts +0 -0
- package/web/order/response/web.order.response.ts +0 -0
package/README.md
CHANGED
|
@@ -25,6 +25,28 @@ Describes web specific interfaces
|
|
|
25
25
|
### Summary
|
|
26
26
|
Describes admind specific interfaces
|
|
27
27
|
|
|
28
|
+
#### User Creation within SYS03/Infonova
|
|
29
|
+
|
|
30
|
+
**Creation Request**
|
|
31
|
+
```typescript
|
|
32
|
+
interface UserCreationDTO {
|
|
33
|
+
name: string
|
|
34
|
+
email: string
|
|
35
|
+
language: string
|
|
36
|
+
givenName: string
|
|
37
|
+
familyName: string
|
|
38
|
+
workGroupName: string
|
|
39
|
+
password: string
|
|
40
|
+
role: string
|
|
41
|
+
channel: string[]
|
|
42
|
+
salesman: boolean
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Creation Response**
|
|
47
|
+
```json
|
|
48
|
+
```
|
|
49
|
+
|
|
28
50
|
## Common
|
|
29
51
|
### Summary
|
|
30
52
|
Describes common interfaces between the various tenents
|
|
@@ -33,7 +55,7 @@ Describes common interfaces between the various tenents
|
|
|
33
55
|
### Login
|
|
34
56
|
**login request**
|
|
35
57
|
```typescript
|
|
36
|
-
export interface
|
|
58
|
+
export interface UserLoginDTO {
|
|
37
59
|
username: string
|
|
38
60
|
password: string
|
|
39
61
|
}
|
|
@@ -41,19 +63,25 @@ export interface LoginRequest {
|
|
|
41
63
|
|
|
42
64
|
**login response**
|
|
43
65
|
```typescript
|
|
44
|
-
export interface
|
|
66
|
+
export interface UserLoginAccessToken {
|
|
45
67
|
username: string
|
|
46
|
-
|
|
47
|
-
role: string
|
|
68
|
+
access_token: string
|
|
48
69
|
}
|
|
49
70
|
```
|
|
50
71
|
|
|
72
|
+
`access_token` - is a JWT consisting of metadata related to the user that signed in:
|
|
73
|
+
- channels
|
|
74
|
+
- roles
|
|
75
|
+
- tenentPermissions
|
|
76
|
+
- iat
|
|
77
|
+
each `access_token` is valid (currently) for 24 hours
|
|
78
|
+
|
|
51
79
|
**example**
|
|
52
80
|
```typescript
|
|
53
81
|
try {
|
|
54
82
|
import { LoginRequest, LoginResponse } from 'adamo-types/common/login'
|
|
55
83
|
|
|
56
|
-
const data:
|
|
84
|
+
const data: UserLoginDTO = {
|
|
57
85
|
username: 'username',
|
|
58
86
|
password: 'password'
|
|
59
87
|
}
|
|
@@ -63,8 +91,7 @@ try {
|
|
|
63
91
|
data
|
|
64
92
|
})
|
|
65
93
|
|
|
66
|
-
const loginResponse:
|
|
67
|
-
|
|
94
|
+
const loginResponse: UserLoginDTO = response.data
|
|
68
95
|
} catch(e: unknown) {
|
|
69
96
|
// do something incase of error
|
|
70
97
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Users {
|
|
2
|
+
name: string
|
|
3
|
+
email: string
|
|
4
|
+
language: string
|
|
5
|
+
givenName: string
|
|
6
|
+
familyName: string
|
|
7
|
+
workGroupName: string
|
|
8
|
+
password: string
|
|
9
|
+
role: string
|
|
10
|
+
channel: string[]
|
|
11
|
+
salesman: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type UserCreationDTO = Users[]
|
|
File without changes
|
package/bss/index.ts
ADDED
|
File without changes
|
package/common/login/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './request/login.request.interface'
|
|
2
|
+
export * from './response/login.response.interface'
|
|
3
3
|
|
|
File without changes
|
|
@@ -2,6 +2,12 @@ export interface UserLoginPayload {
|
|
|
2
2
|
username: string
|
|
3
3
|
channels: string[]
|
|
4
4
|
roles: string[]
|
|
5
|
+
tenentPermissions: string[]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface UserLoginAccessToken {
|
|
9
|
+
username: string
|
|
10
|
+
access_token: string
|
|
5
11
|
}
|
|
6
12
|
|
|
7
13
|
export interface AclUserRolesPayload {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|