@things-factory/auth-base 7.0.1-alpha.93 → 7.0.1-alpha.94

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-base",
3
- "version": "7.0.1-alpha.93",
3
+ "version": "7.0.1-alpha.94",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -45,5 +45,5 @@
45
45
  "passport-local": "^1.0.0",
46
46
  "popsicle-cookie-jar": "^1.0.0"
47
47
  },
48
- "gitHead": "50cb52ff55459ed050508abea46b15e24973dd53"
48
+ "gitHead": "70511fc686b5e2aa61c2278a91de7e40d78b3916"
49
49
  }
@@ -30,7 +30,8 @@ export class Appliance {
30
30
  readonly id: string
31
31
 
32
32
  @ManyToOne(type => Domain)
33
- domain: Domain
33
+ @Field(type => Domain)
34
+ domain?: Domain
34
35
 
35
36
  @RelationId((appliance: Appliance) => appliance.domain)
36
37
  domainId: string
@@ -71,8 +72,8 @@ export class Appliance {
71
72
  DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
72
73
  ? 'longtext'
73
74
  : DATABASE_TYPE == 'oracle'
74
- ? 'clob'
75
- : 'varchar'
75
+ ? 'clob'
76
+ : 'varchar'
76
77
  })
77
78
  @Field({ nullable: true })
78
79
  @Directive('@privilege(category: "security", privilege: "query", domainOwnerGranted: true)')
@@ -54,6 +54,7 @@ export class Application {
54
54
  readonly id?: string
55
55
 
56
56
  @ManyToOne(type => Domain)
57
+ @Field(type => Domain)
57
58
  domain?: Domain
58
59
 
59
60
  @RelationId((application: Application) => application.domain)
@@ -97,8 +98,8 @@ export class Application {
97
98
  DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
98
99
  ? 'longtext'
99
100
  : DATABASE_TYPE == 'oracle'
100
- ? 'clob'
101
- : 'varchar'
101
+ ? 'clob'
102
+ : 'varchar'
102
103
  })
103
104
  @Field({ nullable: true })
104
105
  @Directive('@privilege(category: "security", privilege: "query", domainOwnerGranted: true)')
@@ -113,8 +114,8 @@ export class Application {
113
114
  DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
114
115
  ? 'enum'
115
116
  : DATABASE_TYPE == 'oracle'
116
- ? 'varchar2'
117
- : 'smallint',
117
+ ? 'varchar2'
118
+ : 'smallint',
118
119
  enum: ApplicationType,
119
120
  default: ApplicationType.OTHERS
120
121
  })
@@ -19,8 +19,8 @@ export class GrantedRole {
19
19
  roleId: string
20
20
 
21
21
  @ManyToOne(type => Domain)
22
- @Field()
23
- domain: Domain
22
+ @Field(type => Domain)
23
+ domain?: Domain
24
24
 
25
25
  @RelationId((grantedRole: GrantedRole) => grantedRole.domain)
26
26
  domainId: string
@@ -14,14 +14,14 @@ export class LoginHistory {
14
14
  readonly id: string
15
15
 
16
16
  @ManyToOne(type => Domain)
17
- @Field()
18
- accessDomain: Domain
17
+ @Field(type => Domain)
18
+ accessDomain?: Domain
19
19
 
20
20
  @RelationId((loginHistory: LoginHistory) => loginHistory.accessDomain)
21
21
  accessDomainId: string
22
22
 
23
23
  @ManyToOne(type => User)
24
- @Field()
24
+ @Field(type => User)
25
25
  accessUser: User
26
26
 
27
27
  @RelationId((loginHistory: LoginHistory) => loginHistory.accessUser)
@@ -20,25 +20,25 @@ export class Partner {
20
20
  readonly id: string
21
21
 
22
22
  @ManyToOne(type => Domain)
23
- @Field()
24
- domain: Domain
23
+ @Field(type => Domain)
24
+ domain?: Domain
25
25
 
26
26
  @RelationId((partner: Partner) => partner.domain)
27
27
  domainId: string
28
28
 
29
29
  @ManyToOne(type => Domain)
30
- @Field()
31
- partnerDomain: Domain
30
+ @Field(type => Domain)
31
+ partnerDomain?: Domain
32
32
 
33
33
  @RelationId((partner: Partner) => partner.partnerDomain)
34
34
  partnerDomainId: string
35
35
 
36
36
  @CreateDateColumn()
37
- @Field()
37
+ @Field({ nullable: true })
38
38
  requestedAt: Date
39
39
 
40
40
  @UpdateDateColumn()
41
- @Field()
41
+ @Field({ nullable: true })
42
42
  approvedAt: Date
43
43
 
44
44
  @ManyToOne(type => User, { nullable: true })
@@ -24,13 +24,14 @@ export class Role {
24
24
  readonly id: string
25
25
 
26
26
  @ManyToOne(type => Domain)
27
- domain: Domain
27
+ @Field(type => Domain)
28
+ domain?: Domain
28
29
 
29
30
  @RelationId((role: Role) => role.domain)
30
31
  domainId: string
31
32
 
32
33
  @Column()
33
- @Field()
34
+ @Field({ nullable: true })
34
35
  name: string
35
36
 
36
37
  @ManyToMany(type => User, user => user.roles)