web: fix remaining API Calls
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
69668a2a05
commit
ec8490e105
|
@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
|
|
||||||
@customElement("ak-user-oauth-code-list")
|
@customElement("ak-user-oauth-code-list")
|
||||||
export class UserOAuthCodeList extends Table<ExpiringBaseGrantModel> {
|
export class UserOAuthCodeList extends Table<ExpiringBaseGrantModel> {
|
||||||
@property()
|
@property({ type: Number })
|
||||||
userId?: number;
|
userId?: number;
|
||||||
|
|
||||||
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {
|
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
|
|
||||||
@customElement("ak-user-oauth-refresh-list")
|
@customElement("ak-user-oauth-refresh-list")
|
||||||
export class UserOAuthRefreshList extends Table<ExpiringBaseGrantModel> {
|
export class UserOAuthRefreshList extends Table<ExpiringBaseGrantModel> {
|
||||||
@property()
|
@property({ type: Number })
|
||||||
userId?: number;
|
userId?: number;
|
||||||
|
|
||||||
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {
|
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
|
|
||||||
@customElement("ak-user-consent-list")
|
@customElement("ak-user-consent-list")
|
||||||
export class UserConsentList extends Table<UserConsent> {
|
export class UserConsentList extends Table<UserConsent> {
|
||||||
@property()
|
@property({ type: Number })
|
||||||
userId?: number;
|
userId?: number;
|
||||||
|
|
||||||
apiEndpoint(page: number): Promise<AKResponse<UserConsent>> {
|
apiEndpoint(page: number): Promise<AKResponse<UserConsent>> {
|
||||||
|
|
|
@ -56,7 +56,7 @@ export class LibraryApplication extends LitElement {
|
||||||
if (!this.application) {
|
if (!this.application) {
|
||||||
return html`<ak-spinner></ak-spinner>`;
|
return html`<ak-spinner></ak-spinner>`;
|
||||||
}
|
}
|
||||||
return html` <a href="${ifDefined(this.application.launchUrl)}" class="pf-c-card pf-m-hoverable pf-m-compact">
|
return html` <a href="${ifDefined(this.application.launchUrl ?? "")}" class="pf-c-card pf-m-hoverable pf-m-compact">
|
||||||
<div class="pf-c-card__header">
|
<div class="pf-c-card__header">
|
||||||
${this.application.metaIcon
|
${this.application.metaIcon
|
||||||
? html`<img class="app-icon pf-c-avatar" src="${ifDefined(this.application.metaIcon)}" alt="Application Icon"/>`
|
? html`<img class="app-icon pf-c-avatar" src="${ifDefined(this.application.metaIcon)}" alt="Application Icon"/>`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowDesignationEnum, FlowsApi, ProvidersApi, LDAPProvider, CoreApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { FlowsApi, ProvidersApi, LDAPProvider, CoreApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CryptoApi, FlowDesignationEnum, FlowsApi, OAuth2Provider, ClientTypeEnum, IssuerModeEnum, JwtAlgEnum, SubModeEnum, PropertymappingsApi, ProvidersApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { CryptoApi, FlowsApi, OAuth2Provider, ClientTypeEnum, IssuerModeEnum, JwtAlgEnum, SubModeEnum, PropertymappingsApi, ProvidersApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement, property } from "lit-element";
|
import { customElement, property } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CryptoApi, FlowDesignationEnum, FlowsApi, FlowsInstancesListDesignationEnum, ProvidersApi, ProxyProvider } from "authentik-api";
|
import { CryptoApi, FlowsApi, FlowsInstancesListDesignationEnum, ProvidersApi, ProxyProvider } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement, property } from "lit-element";
|
import { customElement, property } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CryptoApi, FlowDesignationEnum, FlowsApi, SAMLProvider, ProvidersApi, PropertymappingsApi, SpBindingEnum, DigestAlgorithmEnum, SignatureAlgorithmEnum, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { CryptoApi, FlowsApi, SAMLProvider, ProvidersApi, PropertymappingsApi, SpBindingEnum, DigestAlgorithmEnum, SignatureAlgorithmEnum, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowDesignationEnum, FlowsApi, FlowsInstancesListDesignationEnum, ProvidersApi, SAMLProvider } from "authentik-api";
|
import { FlowsApi, FlowsInstancesListDesignationEnum, ProvidersApi, SAMLProvider } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
@ -21,7 +21,7 @@ export class SAMLProviderImportForm extends Form<SAMLProvider> {
|
||||||
if (!file) {
|
if (!file) {
|
||||||
throw new Error("No form data");
|
throw new Error("No form data");
|
||||||
}
|
}
|
||||||
return new ProvidersApi(DEFAULT_CONFIG).providersSamlImportMetadata({
|
return new ProvidersApi(DEFAULT_CONFIG).providersSamlImportMetadataCreate({
|
||||||
file: file,
|
file: file,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
authorizationFlow: data.authorizationFlow,
|
authorizationFlow: data.authorizationFlow,
|
||||||
|
|
|
@ -149,7 +149,7 @@ export class SAMLProviderViewPage extends LitElement {
|
||||||
<div class="pf-u-w-75">
|
<div class="pf-u-w-75">
|
||||||
<div class="pf-c-card">
|
<div class="pf-c-card">
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
${until(new ProvidersApi(DEFAULT_CONFIG).providersSamlMetadata({
|
${until(new ProvidersApi(DEFAULT_CONFIG).providersSamlMetadataRetrieve({
|
||||||
id: this.provider.pk || 0,
|
id: this.provider.pk || 0,
|
||||||
}).then(m => {
|
}).then(m => {
|
||||||
return html`<ak-codemirror mode="xml" ?readOnly=${true} value="${ifDefined(m.metadata)}"></ak-codemirror>`;
|
return html`<ak-codemirror mode="xml" ?readOnly=${true} value="${ifDefined(m.metadata)}"></ak-codemirror>`;
|
||||||
|
|
|
@ -133,7 +133,7 @@ export class LDAPSourceViewPage extends LitElement {
|
||||||
<p>${t`Sync status`}</p>
|
<p>${t`Sync status`}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
${until(new SourcesApi(DEFAULT_CONFIG).sourcesLdapSyncStatus({
|
${until(new SourcesApi(DEFAULT_CONFIG).sourcesLdapSyncStatusRetrieve({
|
||||||
slug: this.source.slug
|
slug: this.source.slug
|
||||||
}).then((ls) => {
|
}).then((ls) => {
|
||||||
let header = html``;
|
let header = html``;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { OAuthSource, SourcesApi, FlowsApi, FlowDesignationEnum, UserMatchingModeEnum, OAuthSourceRequest, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { OAuthSource, SourcesApi, FlowsApi, UserMatchingModeEnum, OAuthSourceRequest, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement, property } from "lit-element";
|
import { customElement, property } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { PlexSource, SourcesApi, FlowsApi, FlowDesignationEnum, UserMatchingModeEnum, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { PlexSource, SourcesApi, FlowsApi, UserMatchingModeEnum, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement, property } from "lit-element";
|
import { customElement, property } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { SAMLSource, SourcesApi, BindingTypeEnum, NameIdPolicyEnum, CryptoApi, DigestAlgorithmEnum, SignatureAlgorithmEnum, FlowsApi, FlowDesignatio, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { SAMLSource, SourcesApi, BindingTypeEnum, NameIdPolicyEnum, CryptoApi, DigestAlgorithmEnum, SignatureAlgorithmEnum, FlowsApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -136,7 +136,7 @@ export class SAMLSourceViewPage extends LitElement {
|
||||||
<div class="pf-u-w-75">
|
<div class="pf-u-w-75">
|
||||||
<div class="pf-c-card">
|
<div class="pf-c-card">
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
${until(new SourcesApi(DEFAULT_CONFIG).sourcesSamlMetadata({
|
${until(new SourcesApi(DEFAULT_CONFIG).sourcesSamlMetadataRetrieve({
|
||||||
slug: this.source.slug,
|
slug: this.source.slug,
|
||||||
}).then(m => {
|
}).then(m => {
|
||||||
return html`<ak-codemirror mode="xml" ?readOnly=${true} value="${ifDefined(m.metadata)}"></ak-codemirror>`;
|
return html`<ak-codemirror mode="xml" ?readOnly=${true} value="${ifDefined(m.metadata)}"></ak-codemirror>`;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowDesignationEnum, FlowsApi, AuthenticatorStaticStage, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { FlowsApi, AuthenticatorStaticStage, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
@ -35,7 +35,7 @@ export class AuthenticatorStaticStageForm extends ModelForm<AuthenticatorStaticS
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return new StagesApi(DEFAULT_CONFIG).stagesUserWriteCreate({
|
return new StagesApi(DEFAULT_CONFIG).stagesUserWriteCreate({
|
||||||
authenticatorStaticStageRequest: data
|
userWriteStageRequest: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowDesignationEnum, FlowsApi, AuthenticatorTOTPStage, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { FlowsApi, AuthenticatorTOTPStage, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowDesignationEnum, FlowsApi, IdentificationStage, UserFieldsEnum, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { FlowsApi, IdentificationStage, UserFieldsEnum, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { FlowDesignationEnum, FlowsApi, PasswordStage, BackendsEnum, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
import { FlowsApi, PasswordStage, BackendsEnum, StagesApi, FlowsInstancesListDesignationEnum } from "authentik-api";
|
||||||
import { t } from "@lingui/macro";
|
import { t } from "@lingui/macro";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { html, TemplateResult } from "lit-html";
|
import { html, TemplateResult } from "lit-html";
|
||||||
|
|
Reference in New Issue