web: fix remaining API Calls

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-16 18:52:27 +02:00
parent 69668a2a05
commit ec8490e105
19 changed files with 21 additions and 21 deletions

View file

@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
@customElement("ak-user-oauth-code-list")
export class UserOAuthCodeList extends Table<ExpiringBaseGrantModel> {
@property()
@property({ type: Number })
userId?: number;
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {

View file

@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
@customElement("ak-user-oauth-refresh-list")
export class UserOAuthRefreshList extends Table<ExpiringBaseGrantModel> {
@property()
@property({ type: Number })
userId?: number;
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {

View file

@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
@customElement("ak-user-consent-list")
export class UserConsentList extends Table<UserConsent> {
@property()
@property({ type: Number })
userId?: number;
apiEndpoint(page: number): Promise<AKResponse<UserConsent>> {

View file

@ -56,7 +56,7 @@ export class LibraryApplication extends LitElement {
if (!this.application) {
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">
${this.application.metaIcon
? html`<img class="app-icon pf-c-avatar" src="${ifDefined(this.application.metaIcon)}" alt="Application Icon"/>`

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";
@ -21,7 +21,7 @@ export class SAMLProviderImportForm extends Form<SAMLProvider> {
if (!file) {
throw new Error("No form data");
}
return new ProvidersApi(DEFAULT_CONFIG).providersSamlImportMetadata({
return new ProvidersApi(DEFAULT_CONFIG).providersSamlImportMetadataCreate({
file: file,
name: data.name,
authorizationFlow: data.authorizationFlow,

View file

@ -149,7 +149,7 @@ export class SAMLProviderViewPage extends LitElement {
<div class="pf-u-w-75">
<div class="pf-c-card">
<div class="pf-c-card__body">
${until(new ProvidersApi(DEFAULT_CONFIG).providersSamlMetadata({
${until(new ProvidersApi(DEFAULT_CONFIG).providersSamlMetadataRetrieve({
id: this.provider.pk || 0,
}).then(m => {
return html`<ak-codemirror mode="xml" ?readOnly=${true} value="${ifDefined(m.metadata)}"></ak-codemirror>`;

View file

@ -133,7 +133,7 @@ export class LDAPSourceViewPage extends LitElement {
<p>${t`Sync status`}</p>
</div>
<div class="pf-c-card__body">
${until(new SourcesApi(DEFAULT_CONFIG).sourcesLdapSyncStatus({
${until(new SourcesApi(DEFAULT_CONFIG).sourcesLdapSyncStatusRetrieve({
slug: this.source.slug
}).then((ls) => {
let header = html``;

View file

@ -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 { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement, property } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -136,7 +136,7 @@ export class SAMLSourceViewPage extends LitElement {
<div class="pf-u-w-75">
<div class="pf-c-card">
<div class="pf-c-card__body">
${until(new SourcesApi(DEFAULT_CONFIG).sourcesSamlMetadata({
${until(new SourcesApi(DEFAULT_CONFIG).sourcesSamlMetadataRetrieve({
slug: this.source.slug,
}).then(m => {
return html`<ak-codemirror mode="xml" ?readOnly=${true} value="${ifDefined(m.metadata)}"></ak-codemirror>`;

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";
@ -35,7 +35,7 @@ export class AuthenticatorStaticStageForm extends ModelForm<AuthenticatorStaticS
});
} else {
return new StagesApi(DEFAULT_CONFIG).stagesUserWriteCreate({
authenticatorStaticStageRequest: data
userWriteStageRequest: data
});
}
};

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";

View file

@ -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 { customElement } from "lit-element";
import { html, TemplateResult } from "lit-html";