@acequants/aegis-contracts 0.1.46 → 0.1.48

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