web: use API as dedicated module
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
5
web/src/api/.gitignore
vendored
5
web/src/api/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
apis/**
|
||||
models/**
|
||||
index.ts
|
||||
runtime.ts
|
||||
.openapi-generator/**
|
||||
@ -1,23 +0,0 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@ -5,12 +5,10 @@ export interface QueryArguments {
|
||||
}
|
||||
|
||||
export interface BaseInheritanceModel {
|
||||
|
||||
objectType: string;
|
||||
|
||||
verboseName: string;
|
||||
verboseNamePlural: string;
|
||||
|
||||
}
|
||||
|
||||
export interface AKPagination {
|
||||
|
||||
@ -2,9 +2,7 @@ import * as Sentry from "@sentry/browser";
|
||||
import { Integrations } from "@sentry/tracing";
|
||||
import { VERSION } from "../constants";
|
||||
import { SentryIgnoredError } from "../common/errors";
|
||||
import { Configuration } from "./runtime";
|
||||
import { RootApi } from "./apis";
|
||||
import { Config } from ".";
|
||||
import { Config, Configuration, RootApi } from "authentik-api";
|
||||
import { getCookie } from "../utils";
|
||||
|
||||
export const DEFAULT_CONFIG = new Configuration({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Event } from "./models";
|
||||
import { Event } from "authentik-api";
|
||||
|
||||
export interface EventUser {
|
||||
pk: number;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ChallengeTypeEnum } from "./models";
|
||||
import { ChallengeTypeEnum } from "authentik-api";
|
||||
|
||||
export interface Error {
|
||||
code: string;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { CoreApi } from "./apis";
|
||||
import { CoreApi, User } from "authentik-api";
|
||||
import { DEFAULT_CONFIG } from "./Config";
|
||||
import { User } from "./models";
|
||||
|
||||
let _globalMePromise: Promise<User>;
|
||||
export function me(): Promise<User> {
|
||||
|
||||
Reference in New Issue
Block a user