@acequants/aegis-contracts 0.1.46 → 0.1.47

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": "@acequants/aegis-contracts",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -7,18 +7,16 @@ option java_multiple_files = true;
7
7
  import "google/protobuf/timestamp.proto";
8
8
  // import "shared/v1/shared.proto";
9
9
 
10
+ message GrpcDtoMessage {
11
+ string message = 1;
12
+ }
10
13
 
11
- // ********************************* SHARED *********************************
12
14
  message GrpcDtoPagination {
13
15
  int32 total_items = 1;
14
16
  int32 total_pages = 2;
15
17
  int32 current_page = 3;
16
18
  int32 page_size = 4;
17
- }
18
-
19
- message GrpcDtoMessage {
20
- string message = 1;
21
- }
19
+ }
22
20
 
23
21
  message GrpcDtoPermission {
24
22
  string public_id = 1;
@@ -28,10 +26,69 @@ message GrpcDtoPermission {
28
26
  google.protobuf.Timestamp updated_at = 5;
29
27
  }
30
28
 
31
- message GrpcDtoPermissionsAdd {
29
+ message GrpcInputSeedPermission {
30
+ string name = 1;
31
+ string description = 2;
32
+ repeated string scopes = 3;
33
+ }
34
+
35
+ message GrpcInputSeedPermissions {
36
+ repeated GrpcInputSeedPermission permissions = 1;
37
+ }
38
+
39
+ message GrpcInputPermissions {
40
+ optional string search = 1;
41
+
42
+ optional int32 page = 2;
43
+ optional int32 page_size = 3;
44
+
45
+ optional string sort_by = 4;
46
+ optional string sort_order = 5;
47
+ }
48
+
49
+ message GrpcDtoPermissions {
32
50
  repeated GrpcDtoPermission permissions = 1;
33
51
  }
34
52
 
53
+ message GrpcDtoPermissionsPaginated {
54
+ GrpcDtoPagination meta = 1;
55
+ repeated GrpcDtoPermission items = 2;
56
+ }
57
+
58
+ message GrpcDtoGeoCurrency {
59
+ string public_id = 1;
60
+ string code = 2;
61
+ string name = 3;
62
+ string symbol = 4;
63
+ string is_base = 5;
64
+ string is_active = 6;
65
+ string exchange_rate = 7;
66
+ google.protobuf.Timestamp created_at = 8;
67
+ google.protobuf.Timestamp updated_at = 9;
68
+ google.protobuf.Timestamp deleted_at = 10;
69
+ }
70
+
71
+ message GrpcDtoGeoLanguage {
72
+ string public_id = 1;
73
+ string iso639_1 = 2;
74
+ string iso639_2 = 3;
75
+ string name = 4;
76
+ string is_active = 5;
77
+ google.protobuf.Timestamp created_at = 6;
78
+ google.protobuf.Timestamp updated_at = 7;
79
+ google.protobuf.Timestamp deleted_at = 8;
80
+ }
81
+
82
+ message GrpcDtoGeoTimezone {
83
+ string public_id = 1;
84
+
85
+ string iana = 2;
86
+
87
+ google.protobuf.Timestamp created_at = 3;
88
+ google.protobuf.Timestamp updated_at = 4;
89
+ google.protobuf.Timestamp deleted_at = 5;
90
+ }
91
+
35
92
  message GrpcDtoClientType {
36
93
  string public_id = 1;
37
94
  string name = 2;
@@ -41,246 +98,331 @@ message GrpcDtoClientType {
41
98
  }
42
99
 
43
100
  message GrpcDtoClient {
44
- string publicId = 1;
101
+ string public_id = 1;
45
102
  string name = 2;
103
+
46
104
  optional string description = 3;
47
- optional GrpcDtoClientType clientType = 4;
105
+ optional GrpcDtoClientType client_type = 4;
106
+
48
107
  google.protobuf.Timestamp createdAt = 5;
49
108
  google.protobuf.Timestamp updatedAt = 6;
50
109
  google.protobuf.Timestamp deletedAt = 7;
51
110
  }
52
111
 
53
- // *************************** /end to be shared/ ***************************
54
-
55
- // ------------------------------- PERMISSION -------------------------------
56
-
57
- // INPUT
58
-
59
- message GrpcInputSeedPermission {
60
- string name = 1;
61
- string description = 2;
62
- repeated string scopes = 3;
63
- }
64
-
65
- message GrpcInputSeedPermissions {
66
- repeated GrpcInputSeedPermission permissions = 1;
67
- }
112
+ message GrpcDtoApiKey {
113
+ string public_id = 1;
68
114
 
69
- // OUTPUT
115
+ string key = 2;
116
+ optional string scopes = 3;
117
+ string revoked = 4;
118
+ optional string expiresAt = 5;
119
+ optional string expireStatus = 6;
120
+ optional string lastUsedAt = 7;
121
+ optional string lastUsedIp = 8;
122
+
123
+ google.protobuf.Timestamp created_at = 9;
124
+ google.protobuf.Timestamp updated_at = 10;
125
+ google.protobuf.Timestamp deleted_at = 11;
70
126
 
71
- message GrpcDtoPermissions {
72
- repeated GrpcDtoPermission permissions = 1;
127
+ optional GrpcDtoService service = 12;
73
128
  }
74
129
 
75
- // --------------------------------------------------------------------------
76
-
77
- // ---- AUTH ----
78
130
  message GrpcDtoService {
79
131
  string publicId = 1;
80
- string namespace = 2;
81
- }
82
132
 
83
- message GrpcDtoSession {
84
- string public_id = 1;
85
- GrpcDtoService service = 2;
86
- GrpcDtoUser user = 3;
87
- }
133
+ string namespace = 2;
134
+ string origin = 3;
135
+ string reset_path = 4;
136
+ string captcha_score_threshold = 5;
137
+ string captcha_provider = 6;
88
138
 
89
- message GrpcDtoAuthenticate {
90
- optional bool valid = 1;
91
- optional string reason = 2;
92
- optional GrpcDtoSession session = 3;
93
- }
139
+ optional string description = 7;
140
+ optional GrpcDtoGeoCurrency default_currency = 8;
141
+ optional GrpcDtoGeoLanguage default_language = 9;
142
+ optional GrpcDtoGeoTimezone default_timezone =10;
94
143
 
95
- message GrpcDtoAuthorize {
96
- bool allowed = 1;
97
- string reason = 2;
144
+ repeated GrpcDtoApiKey apiKeys = 11;
145
+
146
+ google.protobuf.Timestamp created_at = 12;
147
+ google.protobuf.Timestamp updated_at = 13;
148
+ google.protobuf.Timestamp deleted_at = 14;
98
149
  }
99
150
 
100
- message GrpcInputAuthenticate {
101
- string access_token = 1;
102
- string user_agent = 2;
103
- string ip = 3;
104
- }
151
+ message GrpcDtoRole {
152
+ string public_id = 1;
153
+ bool is_agent = 2;
154
+ string name = 3;
155
+ optional string description = 4;
105
156
 
106
- message GrpcInputAuthorize {}
157
+ google.protobuf.Timestamp created_at = 5;
158
+ google.protobuf.Timestamp updated_at = 6;
159
+ google.protobuf.Timestamp deleted_at = 7;
107
160
 
108
- message GrpcInputPermission {
109
- string publicId = 1;
110
- }
161
+ optional GrpcDtoService service = 8;
162
+ optional GrpcDtoClient client = 9;
111
163
 
112
- message GrpcInputPermissions {
113
- optional string search = 1;
114
- optional int32 page = 2;
115
- optional int32 page_size = 3;
116
- optional string sort_by = 4;
117
- optional string sort_order = 5;
164
+ repeated GrpcDtoPermission permissions = 10;
165
+ repeated GrpcDtoUser users = 11;
118
166
  }
119
167
 
120
- message GrpcInputRolePermissions {
121
- string rolePublicId = 1;
122
- }
168
+ message GrpcDtoRolePermission {
169
+ string public_id = 1;
170
+ string source = 2;
123
171
 
124
- message GrpcInputVendorFeatures {
125
- string vendorPublicId = 1;
126
- optional string search = 2;
127
- optional int32 page = 3;
128
- optional int32 pageSize = 4;
129
- optional string sortBy = 5;
130
- optional string sortOrder = 6;
131
- }
172
+ optional string source_feature_public_id = 3;
173
+ optional string source_feature_permission_public_id = 4;
174
+ optional string source_subscription_public_id = 5;
132
175
 
133
- message GrpcInputGetFeaturePermissions {
134
- string featurePublicId=1;
135
- optional string search=2;
136
- optional int32 page=3;
137
- optional int32 pageSize=4;
138
- optional string sortBy=5;
139
- optional string sortOrder=6;
176
+ google.protobuf.Timestamp created_at = 6;
177
+ google.protobuf.Timestamp updated_at = 7;
178
+ google.protobuf.Timestamp deleted_at = 8;
179
+
180
+ optional GrpcDtoRole role = 9;
181
+ optional GrpcDtoPermission permission = 10;
140
182
  }
141
183
 
142
- message GrpcDtoRolePermission {
184
+ message GrpcDtoUserRole {
143
185
  string public_id = 1;
144
- GrpcDtoPermission permission = 2;
186
+
187
+ optional GrpcDtoUser user = 2;
145
188
  optional GrpcDtoRole role = 3;
146
- }
147
189
 
148
- message GrpcDtoRolePermissions {
149
- repeated GrpcDtoRolePermission rolePermissions = 1;
190
+ google.protobuf.Timestamp created_at = 4;
191
+ google.protobuf.Timestamp updated_at = 5;
150
192
  }
151
193
 
152
- message GrpcDtoPermissionsPaginated {
153
- repeated GrpcDtoPermission items = 1;
154
- GrpcDtoPagination meta = 2;
194
+ message GrpcDtoUserAccountType {
195
+ string public_id = 1;
196
+ string name = 2;
197
+ google.protobuf.Timestamp created_at = 3;
198
+ google.protobuf.Timestamp updated_at = 4;
199
+ google.protobuf.Timestamp deleted_at = 5;
155
200
  }
156
201
 
157
- message GrpcDtoVendorFeature {
158
- string publicId = 1;
159
- string name = 2;
160
- optional string description = 3;
161
- optional int32 permissionsCount = 4;
202
+ message GrpcDtoUser {
203
+ string public_id = 1;
204
+ string email = 2;
205
+ string phone = 3;
206
+ string name = 4;
207
+ string status = 5;
208
+
209
+ optional string locked_at =6;
210
+ optional string lock_reason =7;
211
+ optional string last_login_at = 8;
212
+ optional string last_password_change_at = 9;
213
+
214
+ bool is_email_verified = 10;
215
+ bool is_phone_verified = 11;
216
+ bool mfa_enabled = 12;
217
+
218
+ optional bool user_can_edit = 13;
219
+
220
+ google.protobuf.Timestamp created_at = 14;
221
+ google.protobuf.Timestamp updated_at = 15;
222
+ google.protobuf.Timestamp deleted_at = 16;
223
+
224
+ optional GrpcDtoService service=17;
225
+ optional GrpcDtoUserAccountType user_account_type=18;
226
+ optional GrpcDtoGeoLanguage language=19;
227
+ optional GrpcDtoGeoTimezone timezone=20;
228
+ optional GrpcDtoClient client=21;
229
+
230
+ repeated GrpcDtoUserRole roles=22;
162
231
  }
163
232
 
164
- message GrpcDtoVendorFeatures {
165
- repeated GrpcDtoVendorFeature items = 1;
166
- GrpcDtoPagination meta = 2;
233
+ message GrpcDtoRoles {
234
+ GrpcDtoPagination meta = 1;
235
+ repeated GrpcDtoRole items = 2;
167
236
  }
168
237
 
169
- message GrpcDtoFeaturePermissions {
170
- repeated GrpcDtoPermission items = 1;
171
- GrpcDtoPagination meta = 2;
238
+ message GrpcInputRole {
239
+ string public_id = 1;
172
240
  }
173
241
 
174
- // ---- ROLE ----
175
242
  message GrpcInputRoles {
176
- optional string clientPublicId = 1;
243
+ optional string client_public_id = 1;
177
244
  optional string search = 2;
178
- int32 page = 3;
179
- int32 page_size = 4;
245
+
246
+ optional int32 page = 3;
247
+ optional int32 page_size = 4;
248
+
180
249
  optional string sort_by = 5;
181
250
  optional string sort_order = 6;
182
251
  }
183
252
 
184
- message GrpcInputRole {
185
- string publicId = 1;
253
+ message GrpcInputPermission {
254
+ string public_id = 1;
255
+ }
256
+
257
+ message GrpcInputRolePermissions {
258
+ string role_public_id = 1;
259
+ }
260
+
261
+ message GrpcDtoRolePermissions {
262
+ repeated GrpcDtoRolePermission role_permissions = 1;
186
263
  }
187
264
 
188
265
  message GrpcInputRoleCreate {
189
266
  string name = 1;
190
267
  optional string description = 2;
191
- optional bool isAgent = 3;
192
- optional string clientPublicId = 4;
268
+ optional bool is_agent = 3;
269
+ optional string client_public_id = 4;
193
270
  }
194
271
 
195
272
  message GrpcInputRoleUpdate {
196
- string publicId = 1;
273
+ string public_id = 1;
197
274
  optional string name = 2;
198
275
  optional string description = 3;
199
- optional bool isAgent = 4;
276
+ optional bool is_agent = 4;
200
277
  }
201
278
 
202
279
  message GrpcInputRoleRecycle {
203
- repeated string publicIds = 1;
280
+ repeated string public_ids = 1;
204
281
  }
205
282
 
206
283
  message GrpcInputRoleRestore {
207
- repeated string publicIds = 1;
284
+ repeated string public_ids = 1;
208
285
  }
209
286
 
210
287
  message GrpcInputRolePermissionsAdd {
211
- string publicId=1;
212
- repeated string permissionIds=2;
213
- optional string source= 3;
214
- optional string sourceFeaturePublicId = 4;
215
- repeated string sourceFeaturePermissionPublicIds = 5;
288
+ string public_id=1;
289
+
290
+ optional string source= 2;
291
+ optional string source_feature_public_id = 3;
292
+
293
+ repeated string permission_ids=4;
294
+ repeated string source_feature_permission_public_ids = 5;
295
+ }
296
+
297
+ message GrpcDtoPermissionsAdd {
298
+ repeated GrpcDtoPermission permissions = 1;
216
299
  }
217
300
 
218
301
  message GrpcInputRolePermissionsRemove {
219
- repeated string publicRolePermissionIds=1;
302
+ repeated string public_role_permission_ids = 1;
303
+ string reason = 2;
220
304
  }
221
305
 
222
- message GrpcDtoRole {
306
+ message GrpcInputAuthNZ {
307
+ string user_agent = 1;
308
+ string ip = 2;
309
+ string permission_name = 3;
310
+ repeated string permission_scopes = 4;
311
+ }
312
+
313
+ message GrpcDtoAuthNZ {
314
+ optional bool valid = 1;
315
+ optional string reason = 2;
316
+ optional GrpcDtoIdentity identity = 3;
317
+ }
318
+
319
+ message GrpcDtoIdentity {
320
+ GrpcDtoIdentitySession session = 1;
321
+ GrpcDtoIdentityService service = 2;
322
+ GrpcDtoIdentityUser user = 3;
323
+
324
+ optional GrpcDtoIdentityAgent agent = 4;
325
+ optional GrpcDtoIdentityClient client = 5;
326
+
327
+ repeated GrpcDtoIdentityRole roles = 6;
328
+ }
329
+
330
+ message GrpcDtoIdentitySession {
331
+ string public_id = 1;
332
+ google.protobuf.Timestamp expires_at = 2;
333
+ }
334
+
335
+ message GrpcDtoIdentityService {
336
+ string publicId = 1;
337
+ string namespace = 2;
338
+
339
+ GrpcDtoIdentityGeoLanguage default_language = 3;
340
+ GrpcDtoIdentityGeoTimezone default_timezone = 4;
341
+ GrpcDtoIdentityGeoCurrency default_currency = 5;
342
+ }
343
+
344
+ message GrpcDtoIdentityGeoLanguage {
345
+ string public_id = 1;
346
+ string iso639_1 = 2;
347
+ string name = 3;
348
+ }
349
+
350
+ message GrpcDtoIdentityGeoTimezone {
351
+ string public_id = 1;
352
+ string iana = 2;
353
+ }
354
+
355
+ message GrpcDtoIdentityGeoCurrency {
356
+ string public_id = 1;
357
+ string code = 2;
358
+ string name = 3;
359
+
360
+ optional string symbol = 4;
361
+ }
362
+
363
+ message GrpcDtoIdentityUser {
223
364
  string public_id = 1;
224
365
  string name = 2;
225
- bool isAgent = 3;
226
- optional string description = 4;
227
- google.protobuf.Timestamp created_at = 5;
228
- google.protobuf.Timestamp updated_at = 6;
229
- google.protobuf.Timestamp deleted_at = 7;
230
- optional GrpcDtoService service = 8;
231
- optional GrpcDtoClient client = 9;
232
- repeated GrpcDtoPermission permissions = 10;
233
- repeated GrpcDtoUser users = 11;
366
+ string status = 3;
367
+
368
+ GrpcDtoIdentityGeoLanguage language = 4;
369
+ GrpcDtoIdentityGeoTimezone timezone =5;
370
+
371
+ optional GrpcDtoIdentityAccountType account_type = 6;
234
372
  }
235
373
 
236
- message GrpcDtoRoles {
237
- repeated GrpcDtoRole items = 1;
238
- GrpcDtoPagination meta = 2;
374
+ message GrpcDtoIdentityAccountType {
375
+ string public_id = 1;
376
+ string name = 2;
239
377
  }
240
378
 
241
- // message GrpcDtoPermissionsAdd {
242
- // repeated GrpcDtoPermission permissions = 1;
243
- // }
379
+ message GrpcDtoIdentityRole {
380
+ string public_id = 1;
381
+ string name = 2;
382
+ }
244
383
 
245
- // --- USER ---
246
- message GrpcDtoUserRole {
247
- GrpcDtoRole role = 1;
384
+ message GrpcDtoIdentityAgent {
385
+ string user_public_id = 1;
248
386
  }
249
387
 
250
- message GrpcDtoUser {
388
+ message GrpcDtoIdentityClient {
251
389
  string public_id = 1;
252
- string email = 2;
253
- string phone = 3;
254
- bool isEmailVerified = 4;
255
- optional string display_name = 5;
256
- google.protobuf.Timestamp created_at = 6;
257
- google.protobuf.Timestamp updated_at = 7;
258
- google.protobuf.Timestamp deleted_at = 8;
259
- repeated GrpcDtoUserRole roles = 9;
390
+ string name = 2;
391
+ string type = 3;
392
+
393
+ optional string is_independent_vendor = 4;
394
+ optional GrpcDtoIdentityManagedBy managed_by = 5;
395
+
396
+ repeated GrpcDtoIdentityManagingVendor managing_vendors = 6;
397
+ }
398
+
399
+ message GrpcDtoIdentityManagedBy {
400
+ string client_public_id = 1;
401
+ }
402
+
403
+ message GrpcDtoIdentityManagingVendor {
404
+ string user_public_id = 1;
260
405
  }
261
406
 
262
407
  service AuthService {
263
- // --- permission ---
408
+ /** PERMISSION */
264
409
  rpc PermissionsSeed (GrpcInputSeedPermissions) returns (GrpcDtoPermissions);
265
410
  rpc Permissions (GrpcInputPermissions) returns (GrpcDtoPermissionsPaginated);
266
411
  rpc Permission (GrpcInputPermission) returns (GrpcDtoPermission);
267
- rpc GetVendorFeatures (GrpcInputVendorFeatures) returns (GrpcDtoVendorFeatures);
268
- rpc GetFeaturePermissions (GrpcInputGetFeaturePermissions) returns (GrpcDtoFeaturePermissions);
269
412
 
270
- // --- authz ---
271
- rpc Authenticate (GrpcInputAuthenticate) returns (GrpcDtoAuthenticate);
272
- rpc Authorize (GrpcInputAuthorize) returns (GrpcDtoAuthorize);
273
-
274
- // --- role ---
413
+ /** ROLE */
275
414
  rpc Roles (GrpcInputRoles) returns (GrpcDtoRoles);
276
415
  rpc Role (GrpcInputRole) returns (GrpcDtoRole);
416
+ rpc RolePermissions (GrpcInputRolePermissions) returns (GrpcDtoRolePermissions);
277
417
  rpc RoleCreate (GrpcInputRoleCreate) returns (GrpcDtoRole);
278
418
  rpc RoleUpdate (GrpcInputRoleUpdate) returns (GrpcDtoRole);
279
419
  rpc RolesRecycle (GrpcInputRoleRecycle) returns (GrpcDtoMessage);
280
420
  rpc RolesRestore (GrpcInputRoleRestore) returns (GrpcDtoMessage);
281
- rpc RolePermissions (GrpcInputRolePermissions) returns (GrpcDtoRolePermissions);
282
421
  rpc RolePermissionsAdd (GrpcInputRolePermissionsAdd) returns (GrpcDtoPermissionsAdd);
283
422
  rpc RolePermissionsRemove (GrpcInputRolePermissionsRemove) returns (GrpcDtoMessage);
423
+
424
+ /** AUTH-Z */
425
+ rpc AuthNZ (GrpcInputAuthNZ) returns (GrpcDtoAuthNZ);
426
+
427
+ // rpc Permissions (google.protobuf.Empty) returns (DtoPermissions);
284
428
  }
285
-
286
- // rpc Permissions (google.protobuf.Empty) returns (DtoPermissions);