web: make sure naming matches backend
This commit is contained in:
		| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./Client"; | ||||
| 
 | ||||
| export class Application { | ||||
|     pk: string; | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./Client"; | ||||
| 
 | ||||
| export enum FlowDesignation { | ||||
|     Authentication = "authentication", | ||||
							
								
								
									
										24
									
								
								web/src/api/Policies.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								web/src/api/Policies.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./Client"; | ||||
|  | ||||
| export class Policy { | ||||
|     pk: string; | ||||
|     name: string; | ||||
|  | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|     } | ||||
|  | ||||
|     static get(pk: string): Promise<Policy> { | ||||
|         return DefaultClient.fetch<Policy>(["policies", "all", pk]); | ||||
|     } | ||||
|  | ||||
|     static list(filter?: QueryArguments): Promise<PBResponse<Policy>> { | ||||
|         return DefaultClient.fetch<PBResponse<Policy>>(["policies", "all"], filter); | ||||
|     } | ||||
|  | ||||
|     static cached(): Promise<number> { | ||||
|         return DefaultClient.fetch<PBResponse<Policy>>(["policies", "cached"]).then(r => { | ||||
|             return r.pagination.count; | ||||
|         }); | ||||
|     } | ||||
| } | ||||
| @ -1,27 +1,5 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
| 
 | ||||
| export class Policy { | ||||
|     pk: string; | ||||
|     name: string; | ||||
| 
 | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|     } | ||||
| 
 | ||||
|     static get(pk: string): Promise<Policy> { | ||||
|         return DefaultClient.fetch<Policy>(["policies", "all", pk]); | ||||
|     } | ||||
| 
 | ||||
|     static list(filter?: QueryArguments): Promise<PBResponse<Policy>> { | ||||
|         return DefaultClient.fetch<PBResponse<Policy>>(["policies", "all"], filter); | ||||
|     } | ||||
| 
 | ||||
|     static cached(): Promise<number> { | ||||
|         return DefaultClient.fetch<PBResponse<Policy>>(["policies", "cached"]).then(r => { | ||||
|             return r.pagination.count; | ||||
|         }); | ||||
|     } | ||||
| } | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./Client"; | ||||
| import { Policy } from "./Policies"; | ||||
| 
 | ||||
| export class PolicyBinding { | ||||
|     pk: string; | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./Client"; | ||||
| 
 | ||||
| export class Provider { | ||||
|     pk: number; | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./client"; | ||||
| import { DefaultClient, PBResponse, QueryArguments } from "./Client"; | ||||
| 
 | ||||
| export class Source { | ||||
|     pk: string; | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient } from "./client"; | ||||
| import { DefaultClient } from "./Client"; | ||||
| 
 | ||||
| interface TokenResponse { | ||||
|     key: string; | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient, PBResponse } from "./client"; | ||||
| import { DefaultClient, PBResponse } from "./Client"; | ||||
| 
 | ||||
| let _globalMePromise: Promise<User>; | ||||
| 
 | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient } from "./client"; | ||||
| import { DefaultClient } from "./Client"; | ||||
| 
 | ||||
| export class Version { | ||||
| 
 | ||||
| @ -1,4 +1,4 @@ | ||||
| import { NotFoundError, RequestError } from "./errors"; | ||||
| import { NotFoundError, RequestError } from "./Error"; | ||||
|  | ||||
| export const VERSION = "v2beta"; | ||||
|  | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient } from "./client"; | ||||
| import { DefaultClient } from "./Client"; | ||||
| import * as Sentry from "@sentry/browser"; | ||||
| import { Integrations } from "@sentry/tracing"; | ||||
| import { VERSION } from "../constants"; | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| import { DefaultClient } from "./client"; | ||||
| import { DefaultClient } from "./Client"; | ||||
|  | ||||
| export class AuditEvent { | ||||
|     //audit/events/top_per_user/?filter_action=authorize_application | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer