@acequants/aegis-contracts 0.1.13 → 0.1.15
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/dist/src/gen/auth/v1/auth.d.ts +329 -135
- package/dist/src/gen/auth/v1/auth.d.ts.map +1 -1
- package/dist/src/gen/auth/v1/auth.js +839 -237
- package/package.json +1 -1
- package/proto/auth/v1/auth.proto +122 -53
package/package.json
CHANGED
package/proto/auth/v1/auth.proto
CHANGED
|
@@ -5,72 +5,56 @@ package aegis.auth.v1;
|
|
|
5
5
|
option java_multiple_files = true;
|
|
6
6
|
|
|
7
7
|
// import "google/protobuf/empty.proto";
|
|
8
|
-
|
|
8
|
+
import "google/protobuf/timestamp.proto";
|
|
9
9
|
|
|
10
|
-
message
|
|
10
|
+
message GrpcDtoPagination {
|
|
11
11
|
int32 total_items = 1;
|
|
12
12
|
int32 total_pages = 2;
|
|
13
13
|
int32 current_page = 3;
|
|
14
14
|
int32 page_size = 4;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
message
|
|
19
|
-
string public_id = 1;
|
|
20
|
-
string name = 2;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
message DtoUserRoles {
|
|
24
|
-
DtoRole role = 1;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
message DtoUser {
|
|
28
|
-
string public_id = 1;
|
|
29
|
-
string email = 2;
|
|
30
|
-
string phone = 3;
|
|
31
|
-
optional string display_name = 4;
|
|
32
|
-
repeated DtoUserRoles roles = 5;
|
|
17
|
+
message GrpcDtoMessage {
|
|
18
|
+
string message = 1;
|
|
33
19
|
}
|
|
34
20
|
|
|
35
|
-
|
|
21
|
+
// ---- AUTH ----
|
|
22
|
+
message GrpcDtoService {
|
|
36
23
|
string publicId = 1;
|
|
37
24
|
string namespace = 2;
|
|
38
25
|
}
|
|
39
26
|
|
|
40
|
-
message
|
|
27
|
+
message GrpcDtoSession {
|
|
41
28
|
string public_id = 1;
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
GrpcDtoService service = 2;
|
|
30
|
+
GrpcDtoUser user = 3;
|
|
44
31
|
}
|
|
45
32
|
|
|
46
|
-
message
|
|
33
|
+
message GrpcDtoAuthenticate {
|
|
47
34
|
optional bool valid = 1;
|
|
48
35
|
optional string reason = 2;
|
|
49
|
-
optional
|
|
36
|
+
optional GrpcDtoSession session = 3;
|
|
50
37
|
}
|
|
51
38
|
|
|
52
|
-
message
|
|
39
|
+
message GrpcDtoAuthorize {
|
|
53
40
|
bool allowed = 1;
|
|
54
41
|
string reason = 2;
|
|
55
42
|
}
|
|
56
43
|
|
|
57
|
-
message
|
|
44
|
+
message GrpcInputAuthenticate {
|
|
58
45
|
string access_token = 1;
|
|
59
46
|
string user_agent = 2;
|
|
60
47
|
string ip = 3;
|
|
61
48
|
}
|
|
62
49
|
|
|
63
|
-
message
|
|
64
|
-
DtoSession context = 1;
|
|
65
|
-
}
|
|
50
|
+
message GrpcInputAuthorize {}
|
|
66
51
|
|
|
67
52
|
// ---- PERMISSION ----
|
|
68
|
-
|
|
69
|
-
message InputPermission {
|
|
53
|
+
message GrpcInputPermission {
|
|
70
54
|
string publicId = 1;
|
|
71
55
|
}
|
|
72
56
|
|
|
73
|
-
message
|
|
57
|
+
message GrpcInputPermissions {
|
|
74
58
|
optional int32 page = 1;
|
|
75
59
|
optional int32 page_size = 2;
|
|
76
60
|
optional string search = 3;
|
|
@@ -78,41 +62,126 @@ message InputPermissions {
|
|
|
78
62
|
optional string sort_order = 5;
|
|
79
63
|
}
|
|
80
64
|
|
|
81
|
-
message
|
|
65
|
+
message GrpcInputSeedPermission {
|
|
82
66
|
string name = 1;
|
|
83
67
|
}
|
|
84
68
|
|
|
85
|
-
message
|
|
86
|
-
repeated
|
|
69
|
+
message GrpcInputSeedPermissions {
|
|
70
|
+
repeated GrpcInputSeedPermission permissions = 1;
|
|
87
71
|
}
|
|
88
72
|
|
|
89
|
-
message
|
|
73
|
+
message GrpcDtoPermission {
|
|
90
74
|
string public_id = 1;
|
|
91
75
|
string name = 2;
|
|
92
76
|
string description = 3;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
77
|
+
google.protobuf.Timestamp created_at = 4;
|
|
78
|
+
google.protobuf.Timestamp updated_at = 5;
|
|
79
|
+
optional google.protobuf.Timestamp deleted_at = 6;
|
|
96
80
|
}
|
|
97
81
|
|
|
98
|
-
message
|
|
99
|
-
repeated
|
|
82
|
+
message GrpcDtoPermissions {
|
|
83
|
+
repeated GrpcDtoPermission permissions = 1;
|
|
100
84
|
}
|
|
101
85
|
|
|
102
|
-
message
|
|
103
|
-
repeated
|
|
104
|
-
|
|
86
|
+
message GrpcDtoPermissionsPaginated {
|
|
87
|
+
repeated GrpcDtoPermission items = 1;
|
|
88
|
+
GrpcDtoPagination meta = 2;
|
|
105
89
|
}
|
|
106
90
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
91
|
+
// ---- ROLE ----
|
|
92
|
+
message GrpcInputRoles {
|
|
93
|
+
optional string search = 1;
|
|
94
|
+
optional int32 page = 2;
|
|
95
|
+
optional int32 page_size = 3;
|
|
96
|
+
optional string sort_by = 4;
|
|
97
|
+
optional string sort_order = 5;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message GrpcInputRole {
|
|
101
|
+
string publicId = 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message GrpcInputRoleCreate {
|
|
105
|
+
string name = 1;
|
|
106
|
+
optional string description = 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message GrpcInputRoleUpdate {
|
|
110
|
+
string publicId = 1;
|
|
111
|
+
optional string name = 2;
|
|
112
|
+
optional string description = 3;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message GrpcInputRoleRecycle {
|
|
116
|
+
repeated string publicIds = 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
message GrpcInputRoleRestore {
|
|
120
|
+
repeated string publicIds = 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message GrpcInputRolePermissionsAdd {
|
|
124
|
+
string publicId=1;
|
|
125
|
+
repeated string permissionIds=2;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
message GrpcInputRolePermissionRemove {
|
|
129
|
+
repeated string publicRolePermissionIds=1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
message GrpcDtoRole {
|
|
133
|
+
string public_id = 1;
|
|
134
|
+
string name = 2;
|
|
135
|
+
optional string description = 3;
|
|
136
|
+
google.protobuf.Timestamp created_at = 4;
|
|
137
|
+
google.protobuf.Timestamp updated_at = 5;
|
|
138
|
+
optional google.protobuf.Timestamp deleted_at = 6;
|
|
139
|
+
repeated GrpcDtoPermission permissions = 7;
|
|
140
|
+
repeated GrpcDtoUser users = 8;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
message GrpcDtoRoles {
|
|
144
|
+
repeated GrpcDtoRole items = 1;
|
|
145
|
+
GrpcDtoPagination meta = 2;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
message GrpcDtoPermissionsAdd {
|
|
149
|
+
repeated GrpcDtoPermission permissions = 1;
|
|
150
|
+
}
|
|
111
151
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
rpc Permission (InputPermission) returns (DtoPermission);
|
|
152
|
+
// --- USER ---
|
|
153
|
+
message GrpcDtoUserRoles {
|
|
154
|
+
GrpcDtoRole role = 1;
|
|
116
155
|
}
|
|
117
156
|
|
|
118
|
-
|
|
157
|
+
message GrpcDtoUser {
|
|
158
|
+
string public_id = 1;
|
|
159
|
+
string email = 2;
|
|
160
|
+
string phone = 3;
|
|
161
|
+
bool isEmailVerified = 4;
|
|
162
|
+
optional string display_name = 5;
|
|
163
|
+
repeated GrpcDtoUserRoles roles = 6;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
service AuthService {
|
|
167
|
+
// --- authz ---
|
|
168
|
+
rpc Authenticate (GrpcInputAuthenticate) returns (GrpcDtoAuthenticate);
|
|
169
|
+
rpc Authorize (GrpcInputAuthorize) returns (GrpcDtoAuthorize);
|
|
170
|
+
|
|
171
|
+
// --- permission ---
|
|
172
|
+
rpc PermissionsSeed (GrpcInputSeedPermissions) returns (GrpcDtoPermissions);
|
|
173
|
+
rpc Permissions (GrpcInputPermissions) returns (GrpcDtoPermissionsPaginated);
|
|
174
|
+
rpc Permission (GrpcInputPermission) returns (GrpcDtoPermission);
|
|
175
|
+
|
|
176
|
+
// --- role ---
|
|
177
|
+
rpc Roles (GrpcInputRoles) returns (GrpcDtoRoles);
|
|
178
|
+
rpc Role (GrpcInputRole) returns (GrpcDtoRole);
|
|
179
|
+
rpc RoleCreate (GrpcInputRoleCreate) returns (GrpcDtoRole);
|
|
180
|
+
rpc RoleUpdate (GrpcInputRoleUpdate) returns (GrpcDtoRole);
|
|
181
|
+
rpc RolesRecycle (GrpcInputRoleRecycle) returns (GrpcDtoMessage);
|
|
182
|
+
rpc RolesRestore (GrpcInputRoleRestore) returns (GrpcDtoMessage);
|
|
183
|
+
rpc RolePermissionsAdd (GrpcInputRolePermissionsAdd) returns (GrpcDtoPermissionsAdd);
|
|
184
|
+
rpc RolePermissionsRemove (GrpcInputRolePermissionRemove) returns (GrpcDtoMessage);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// rpc Permissions (google.protobuf.Empty) returns (DtoPermissions);
|