@@ -40,6 +40,9 @@ export interface paths {
40
40
} ;
41
41
} ;
42
42
} ;
43
+ '/users/own-info' : {
44
+ get : operations [ 'getOwnInfo' ] ;
45
+ } ;
43
46
'/authz/roles' : {
44
47
get : operations [ 'getRoles' ] ;
45
48
post : operations [ 'createRole' ] ;
@@ -64,13 +67,16 @@ export interface paths {
64
67
get : operations [ 'getRolesForUser' ] ;
65
68
} ;
66
69
'/authz/users/{id}/assign' : {
67
- post : operations [ 'assignRole ' ] ;
70
+ post : operations [ 'assignRoleToUser ' ] ;
68
71
} ;
69
72
'/authz/users/{id}/revoke' : {
70
- post : operations [ 'revokeRole' ] ;
73
+ post : operations [ 'revokeRoleFromUser' ] ;
74
+ } ;
75
+ '/authz/groups/{id}/assign' : {
76
+ post : operations [ 'assignRoleToGroup' ] ;
71
77
} ;
72
- '/authz/users/own-roles ' : {
73
- get : operations [ 'getRolesForOwnUser ' ] ;
78
+ '/authz/groups/{id}/revoke ' : {
79
+ post : operations [ 'revokeRoleFromGroup ' ] ;
74
80
} ;
75
81
'/objects' : {
76
82
/** Lists all Objects in reverse order of creation, owned by the user that belongs to the used token. */
@@ -225,6 +231,13 @@ export interface paths {
225
231
}
226
232
227
233
export interface definitions {
234
+ UserInfo : {
235
+ /** @description The groups associated to the user */
236
+ groups ?: string [ ] ;
237
+ roles ?: definitions [ 'Role' ] [ ] ;
238
+ /** @description The username associated with the provided key */
239
+ username : string ;
240
+ } ;
228
241
Role : {
229
242
/** @description role name */
230
243
name : string ;
@@ -272,13 +285,40 @@ export interface definitions {
272
285
*/
273
286
collection ?: string ;
274
287
} ;
288
+ /** @description resources applicable for user actions */
289
+ users ?: {
290
+ /**
291
+ * @description string or regex. if a specific name, if left empty it will be ALL or *
292
+ * @default *
293
+ */
294
+ users ?: string ;
295
+ } ;
296
+ /** @description resources applicable for tenant actions */
297
+ tenants ?: {
298
+ /**
299
+ * @description string or regex. if a specific collection name, if left empty it will be ALL or *
300
+ * @default *
301
+ */
302
+ collection ?: string ;
303
+ /**
304
+ * @description string or regex. if a specific tenant name, if left empty it will be ALL or *
305
+ * @default *
306
+ */
307
+ tenant ?: string ;
308
+ } ;
275
309
/** @description resources applicable for role actions */
276
310
roles ?: {
277
311
/**
278
312
* @description string or regex. if a specific role name, if left empty it will be ALL or *
279
313
* @default *
280
314
*/
281
315
role ?: string ;
316
+ /**
317
+ * @description set the scope for the manage role permission
318
+ * @default match
319
+ * @enum {string}
320
+ */
321
+ scope ?: 'all' | 'match' ;
282
322
} ;
283
323
/** @description resources applicable for collection and/or tenant actions */
284
324
collections ?: {
@@ -287,11 +327,6 @@ export interface definitions {
287
327
* @default *
288
328
*/
289
329
collection ?: string ;
290
- /**
291
- * @description string or regex. if a specific tenant name, if left empty it will be ALL or *
292
- * @default *
293
- */
294
- tenant ?: string ;
295
330
} ;
296
331
/**
297
332
* @description allowed actions in weaviate.
@@ -300,19 +335,22 @@ export interface definitions {
300
335
action :
301
336
| 'manage_backups'
302
337
| 'read_cluster'
303
- | 'manage_data'
304
338
| 'create_data'
305
339
| 'read_data'
306
340
| 'update_data'
307
341
| 'delete_data'
308
342
| 'read_nodes'
309
343
| 'manage_roles'
310
344
| 'read_roles'
311
- | 'manage_collections'
312
345
| 'create_collections'
313
346
| 'read_collections'
314
347
| 'update_collections'
315
- | 'delete_collections' ;
348
+ | 'delete_collections'
349
+ | 'assign_and_revoke_users'
350
+ | 'create_tenants'
351
+ | 'read_tenants'
352
+ | 'update_tenants'
353
+ | 'delete_tenants' ;
316
354
} ;
317
355
/** @description list of roles */
318
356
RolesListResponse : definitions [ 'Role' ] [ ] ;
@@ -374,7 +412,7 @@ export interface definitions {
374
412
/** @description A vector representation of the object in the Contextionary. If provided at object creation, this wil take precedence over any vectorizer setting. */
375
413
C11yVector : number [ ] ;
376
414
/** @description A vector representation of the object. If provided at object creation, this wil take precedence over any vectorizer setting. */
377
- Vector : number [ ] ;
415
+ Vector : { [ key : string ] : unknown } ;
378
416
/** @description A map of named vectors for multi-vector representations. */
379
417
Vectors : { [ key : string ] : definitions [ 'Vector' ] } ;
380
418
/** @description Receive question based on array of classes, properties and values. */
@@ -1504,12 +1542,6 @@ export interface definitions {
1504
1542
TenantResponse : definitions [ 'Tenant' ] & {
1505
1543
/** @description The list of nodes that owns that tenant data. */
1506
1544
belongsToNodes ?: string [ ] ;
1507
- /**
1508
- * @description Experimental. The data version of the tenant is a monotonically increasing number starting from 0 which is incremented each time a tenant's data is offloaded to cloud storage.
1509
- * @default 0
1510
- * @example 3
1511
- */
1512
- dataVersion ?: number ;
1513
1545
} ;
1514
1546
}
1515
1547
@@ -1576,6 +1608,20 @@ export interface operations {
1576
1608
503 : unknown ;
1577
1609
} ;
1578
1610
} ;
1611
+ getOwnInfo : {
1612
+ responses : {
1613
+ /** Info about the user */
1614
+ 200 : {
1615
+ schema : definitions [ 'UserInfo' ] ;
1616
+ } ;
1617
+ /** Unauthorized or invalid credentials. */
1618
+ 401 : unknown ;
1619
+ /** An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. */
1620
+ 500 : {
1621
+ schema : definitions [ 'ErrorResponse' ] ;
1622
+ } ;
1623
+ } ;
1624
+ } ;
1579
1625
getRoles : {
1580
1626
responses : {
1581
1627
/** Successful response. */
@@ -1860,7 +1906,7 @@ export interface operations {
1860
1906
} ;
1861
1907
} ;
1862
1908
} ;
1863
- assignRole : {
1909
+ assignRoleToUser : {
1864
1910
parameters : {
1865
1911
path : {
1866
1912
/** user name */
@@ -1894,7 +1940,7 @@ export interface operations {
1894
1940
} ;
1895
1941
} ;
1896
1942
} ;
1897
- revokeRole : {
1943
+ revokeRoleFromUser : {
1898
1944
parameters : {
1899
1945
path : {
1900
1946
/** user name */
@@ -1928,14 +1974,68 @@ export interface operations {
1928
1974
} ;
1929
1975
} ;
1930
1976
} ;
1931
- getRolesForOwnUser : {
1977
+ assignRoleToGroup : {
1978
+ parameters : {
1979
+ path : {
1980
+ /** group name */
1981
+ id : string ;
1982
+ } ;
1983
+ body : {
1984
+ body : {
1985
+ /** @description the roles that assigned to group */
1986
+ roles ?: string [ ] ;
1987
+ } ;
1988
+ } ;
1989
+ } ;
1990
+ responses : {
1991
+ /** Role assigned successfully */
1992
+ 200 : unknown ;
1993
+ /** Bad request */
1994
+ 400 : {
1995
+ schema : definitions [ 'ErrorResponse' ] ;
1996
+ } ;
1997
+ /** Unauthorized or invalid credentials. */
1998
+ 401 : unknown ;
1999
+ /** Forbidden */
2000
+ 403 : {
2001
+ schema : definitions [ 'ErrorResponse' ] ;
2002
+ } ;
2003
+ /** role or group is not found. */
2004
+ 404 : unknown ;
2005
+ /** An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. */
2006
+ 500 : {
2007
+ schema : definitions [ 'ErrorResponse' ] ;
2008
+ } ;
2009
+ } ;
2010
+ } ;
2011
+ revokeRoleFromGroup : {
2012
+ parameters : {
2013
+ path : {
2014
+ /** group name */
2015
+ id : string ;
2016
+ } ;
2017
+ body : {
2018
+ body : {
2019
+ /** @description the roles that revoked from group */
2020
+ roles ?: string [ ] ;
2021
+ } ;
2022
+ } ;
2023
+ } ;
1932
2024
responses : {
1933
- /** Role assigned to own users */
1934
- 200 : {
1935
- schema : definitions [ 'RolesListResponse' ] ;
2025
+ /** Role revoked successfully */
2026
+ 200 : unknown ;
2027
+ /** Bad request */
2028
+ 400 : {
2029
+ schema : definitions [ 'ErrorResponse' ] ;
1936
2030
} ;
1937
2031
/** Unauthorized or invalid credentials. */
1938
2032
401 : unknown ;
2033
+ /** Forbidden */
2034
+ 403 : {
2035
+ schema : definitions [ 'ErrorResponse' ] ;
2036
+ } ;
2037
+ /** role or group is not found. */
2038
+ 404 : unknown ;
1939
2039
/** An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. */
1940
2040
500 : {
1941
2041
schema : definitions [ 'ErrorResponse' ] ;
0 commit comments