Sync with backend, added deleted prop to users
This commit is contained in:
		
							parent
							
								
									471fb486d5
								
							
						
					
					
						commit
						bd74725263
					
				|  | @ -11,4 +11,4 @@ type PreRelease = Join<[['a' | 'b' | 'rc'], number], '.'>; | |||
| type PRVersion = BaseVersion | `${BaseVersion}${PreRelease}`; | ||||
| 
 | ||||
| /** A PEP440 subset used to describe backend module versions */ | ||||
| declare type PEP440Version = PRVersion | `${PRVersion}.dev${number}`; | ||||
| declare type PEP440Version = PRVersion | `${PRVersion}.dev${number}`; | ||||
|  |  | |||
|  | @ -0,0 +1,27 @@ | |||
| /// <reference path="PEP440.d.ts" />
 | ||||
| /** | ||||
|  * Types used for communicating with the API | ||||
|  */ | ||||
| 
 | ||||
| declare namespace FG { | ||||
|   interface BackendPlugin { | ||||
|     permissions: string[]; | ||||
|     version: PEP440Version; | ||||
|   } | ||||
|   interface Backend { | ||||
|     plugins: { [key: string]: BackendPlugin }; | ||||
|     version: PEP440Version; | ||||
|   } | ||||
|   interface PaginationFilter { | ||||
|     limit?: number; | ||||
|     offset?: number; | ||||
|     from?: Date; | ||||
|     to?: Date; | ||||
|     /** Default to ascending */ | ||||
|     descending?: boolean; | ||||
|   } | ||||
|   interface PaginationResponse<T> { | ||||
|     result: T[]; | ||||
|     count: number; | ||||
|   } | ||||
| } | ||||
|  | @ -1,4 +1,5 @@ | |||
| /// <reference path="flaschengeist.d.ts" />
 | ||||
| /// <reference path="api.d.ts" />
 | ||||
| /// <reference path="models.d.ts" />
 | ||||
| /// <reference path="PEP440.d.ts" />
 | ||||
| 
 | ||||
| export * from './plugin'; | ||||
|  |  | |||
|  | @ -1,17 +1,5 @@ | |||
| /// <reference path="PEP440.d.ts" />
 | ||||
| /** | ||||
|  * Types used for communicating with the API | ||||
|  */ | ||||
| 
 | ||||
| /** Models exported from backend */ | ||||
| declare namespace FG { | ||||
|   interface BackendPlugin { | ||||
|     permissions: string[]; | ||||
|     version: PEP440Version; | ||||
|   } | ||||
|   interface Backend { | ||||
|     plugins: {[key: string]: BackendPlugin}; | ||||
|     version: PEP440Version; | ||||
|   } | ||||
|   interface Notification { | ||||
|     id: number; | ||||
|     plugin: string; | ||||
|  | @ -21,6 +9,7 @@ declare namespace FG { | |||
|   } | ||||
|   interface User { | ||||
|     userid: string; | ||||
|     deleted: boolean; | ||||
|     display_name: string; | ||||
|     firstname: string; | ||||
|     lastname: string; | ||||
|  | @ -28,7 +17,6 @@ declare namespace FG { | |||
|     birthday?: Date; | ||||
|     roles: Array<string>; | ||||
|     permissions?: Array<string>; | ||||
|     avatar_url?: string; | ||||
|   } | ||||
|   interface Session { | ||||
|     expires: Date; | ||||
|  | @ -44,16 +32,4 @@ declare namespace FG { | |||
|     name: string; | ||||
|     permissions: Array<Permission>; | ||||
|   } | ||||
|   interface PaginationFilter { | ||||
|     limit?: number; | ||||
|     offset?: number; | ||||
|     from?: Date; | ||||
|     to?: Date; | ||||
|     /** Default to ascending */ | ||||
|     descending?: boolean; | ||||
|   } | ||||
|   interface PaginationResponse<T> { | ||||
|     result: T[]; | ||||
|     count: number; | ||||
|   } | ||||
| } | ||||
		Loading…
	
		Reference in New Issue