web: rewrite aggregate cards to separate components
This commit is contained in:
		| @ -1,9 +1,20 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
| 
 | ||||
| export interface Policy { | ||||
| export class Policy { | ||||
|     pk: string; | ||||
|     name: string; | ||||
|     [key: string]: unknown; | ||||
| 
 | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|     } | ||||
| 
 | ||||
|     static get(pk: string): Promise<PolicyBinding> { | ||||
|         return DefaultClient.fetch<PolicyBinding>(["policies", "all", pk]); | ||||
|     } | ||||
| 
 | ||||
|     static list(filter?: QueryArguments): Promise<PBResponse<PolicyBinding>> { | ||||
|         return DefaultClient.fetch<PBResponse<PolicyBinding>>(["policies", "all"], filter); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| export class PolicyBinding { | ||||
							
								
								
									
										19
									
								
								web/src/api/provider.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								web/src/api/provider.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
|  | ||||
| export class Provider { | ||||
|     pk: number; | ||||
|     name: string; | ||||
|     authorization_flow: string; | ||||
|  | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|     } | ||||
|  | ||||
|     static get(slug: string): Promise<Provider> { | ||||
|         return DefaultClient.fetch<Provider>(["providers", "all", slug]); | ||||
|     } | ||||
|  | ||||
|     static list(filter?: QueryArguments): Promise<PBResponse<Provider>> { | ||||
|         return DefaultClient.fetch<PBResponse<Provider>>(["providers", "all"], filter); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer