From d8e8cc062b9f6c1c6d7682d1dec3450908f8101c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 15 Aug 2021 21:32:06 +0200 Subject: [PATCH 01/12] ci: add pipeline to build and push js api package Signed-off-by: Jens Langhammer --- .github/workflows/web-api-publish.yml | 22 ++++++++++++++++++++++ Makefile | 5 ++--- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/web-api-publish.yml diff --git a/.github/workflows/web-api-publish.yml b/.github/workflows/web-api-publish.yml new file mode 100644 index 000000000..5a7750a3c --- /dev/null +++ b/.github/workflows/web-api-publish.yml @@ -0,0 +1,22 @@ +name: authentik-web-api-publish +on: + push: + branches: [ master, '*', next, version* ] + paths: + - 'schema.yml' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v2 + with: + node-version: '12.x' + registry-url: 'https://registry.npmjs.org' + - run: make gen-web + - run: | + cd web/api/ + npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/Makefile b/Makefile index 33c52b3bf..a036ebdbb 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ PWD = $(shell pwd) UID = $(shell id -u) GID = $(shell id -g) +TIMESTAMP = $(shell date "+%s") all: lint-fix lint test gen @@ -42,9 +43,7 @@ gen-web: -i /local/schema.yml \ -g typescript-fetch \ -o /local/web/api \ - --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0 - # npm i runs tsc as part of the installation process - cd web/api && npm i + --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${TIMESTAMP}.0.0 gen-outpost: docker run \ From 0344e5d9b3caa68489ffc8c2f7e7ebb48e4dbae9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 15 Aug 2021 21:32:17 +0200 Subject: [PATCH 02/12] root: remove usage of make-gen Signed-off-by: Jens Langhammer --- .github/workflows/release.yml | 1 - azure-pipelines.yml | 1 - website/developer-docs/frontend-only-dev-environment.md | 5 ++--- website/developer-docs/translation.md | 4 +--- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a866c2587..95fbf4720 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -163,7 +163,6 @@ jobs: - name: Build web api client and web ui run: | export NODE_ENV=production - make gen-web cd web npm i npm run build diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aeb8d7305..211f6e455 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -309,7 +309,6 @@ stages: displayName: Build static files for e2e inputs: script: | - make gen-web cd web cd api && npm i && cd .. npm i diff --git a/website/developer-docs/frontend-only-dev-environment.md b/website/developer-docs/frontend-only-dev-environment.md index 5de863c20..ef0aacac8 100644 --- a/website/developer-docs/frontend-only-dev-environment.md +++ b/website/developer-docs/frontend-only-dev-environment.md @@ -43,9 +43,8 @@ If you want to only make changes on the UI, you don't need a backend running fro This makes the local web files and the config file available to the authentik server. 5. Run `docker-compose up -d` to apply those changes to your containers. -6. Run `make gen-web` in the project root directory to generate the API Client used by the web interfaces -7. `cd web` -8. Run `npm i` and then `npm run watch` to start the build process. +6. `cd web` +7. Run `npm i` and then `npm run watch` to start the build process. You can now access authentik on http://localhost:9000 (or https://localhost:9443). diff --git a/website/developer-docs/translation.md b/website/developer-docs/translation.md index 337d8b817..ce2191a56 100644 --- a/website/developer-docs/translation.md +++ b/website/developer-docs/translation.md @@ -18,9 +18,7 @@ To simplify translation you can use https://www.transifex.com/beryjuorg/authenti - Make (again, any recent version should work) - Docker -In the root of the cloned repository, run `make gen-web` to generate the API Client used by the webinterface. - -Afterwards, run `npm i` in the `/web` folder to install all dependencies. +Run `npm i` in the `/web` folder to install all dependencies. Ensure the language code is in the `package.json` file in `web/`: From 1d4b941a3ba5974b1452d6865aa9cd3191e37f73 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 15 Aug 2021 21:32:28 +0200 Subject: [PATCH 03/12] web: migrate to @goauthentik/api Signed-off-by: Jens Langhammer --- web/package-lock.json | 11 +++++++++++ web/package.json | 2 +- web/src/api/Config.ts | 2 +- web/src/api/Events.ts | 2 +- web/src/api/Sentry.ts | 2 +- web/src/api/Users.ts | 2 +- web/src/elements/buttons/TokenCopyButton.ts | 2 +- web/src/elements/charts/AdminLoginsChart.ts | 2 +- web/src/elements/charts/ApplicationAuthorizeChart.ts | 2 +- web/src/elements/charts/UserChart.ts | 2 +- web/src/elements/events/ObjectChangelog.ts | 2 +- web/src/elements/events/UserEvents.ts | 2 +- web/src/elements/forms/DeleteBulkForm.ts | 2 +- web/src/elements/forms/DeleteForm.ts | 2 +- web/src/elements/forms/Form.ts | 2 +- web/src/elements/forms/FormElement.ts | 2 +- web/src/elements/messages/Middleware.ts | 2 +- web/src/elements/notifications/APIDrawer.ts | 2 +- web/src/elements/notifications/NotificationDrawer.ts | 2 +- web/src/elements/oauth/UserCodeList.ts | 2 +- web/src/elements/oauth/UserRefreshList.ts | 2 +- web/src/elements/sidebar/SidebarBrand.ts | 2 +- web/src/elements/user/SessionList.ts | 2 +- web/src/elements/user/UserConsentList.ts | 2 +- web/src/flows/FlowExecutor.ts | 2 +- web/src/flows/access_denied/FlowAccessDenied.ts | 2 +- web/src/flows/sources/plex/PlexLoginInit.ts | 4 ++-- .../stages/authenticator_duo/AuthenticatorDuoStage.ts | 2 +- .../authenticator_static/AuthenticatorStaticStage.ts | 2 +- .../authenticator_totp/AuthenticatorTOTPStage.ts | 2 +- .../AuthenticatorValidateStage.ts | 2 +- .../AuthenticatorValidateStageCode.ts | 2 +- .../AuthenticatorValidateStageDuo.ts | 2 +- .../AuthenticatorValidateStageWebAuthn.ts | 2 +- .../WebAuthnAuthenticatorRegisterStage.ts | 2 +- web/src/flows/stages/autosubmit/AutosubmitStage.ts | 2 +- web/src/flows/stages/base.ts | 2 +- web/src/flows/stages/captcha/CaptchaStage.ts | 2 +- web/src/flows/stages/consent/ConsentStage.ts | 2 +- web/src/flows/stages/dummy/DummyStage.ts | 2 +- web/src/flows/stages/email/EmailStage.ts | 2 +- .../stages/identification/IdentificationStage.ts | 2 +- web/src/flows/stages/password/PasswordStage.ts | 2 +- web/src/flows/stages/prompt/PromptStage.ts | 2 +- web/src/interfaces/AdminInterface.ts | 2 +- web/src/pages/LibraryPage.ts | 2 +- web/src/pages/admin-overview/TopApplicationsTable.ts | 2 +- .../pages/admin-overview/cards/BackupStatusCard.ts | 2 +- .../pages/admin-overview/cards/SystemStatusCard.ts | 2 +- .../pages/admin-overview/cards/VersionStatusCard.ts | 2 +- .../pages/admin-overview/cards/WorkerStatusCard.ts | 2 +- .../pages/admin-overview/charts/FlowStatusChart.ts | 2 +- .../admin-overview/charts/GroupCountStatusChart.ts | 2 +- .../admin-overview/charts/LDAPSyncStatusChart.ts | 2 +- .../pages/admin-overview/charts/OutpostStatusChart.ts | 2 +- .../pages/admin-overview/charts/PolicyStatusChart.ts | 2 +- .../admin-overview/charts/UserCountStatusChart.ts | 2 +- .../pages/applications/ApplicationCheckAccessForm.ts | 2 +- web/src/pages/applications/ApplicationForm.ts | 2 +- web/src/pages/applications/ApplicationListPage.ts | 2 +- web/src/pages/applications/ApplicationViewPage.ts | 2 +- web/src/pages/crypto/CertificateGenerateForm.ts | 2 +- web/src/pages/crypto/CertificateKeyPairForm.ts | 2 +- web/src/pages/crypto/CertificateKeyPairListPage.ts | 2 +- web/src/pages/events/EventInfo.ts | 2 +- web/src/pages/events/EventInfoPage.ts | 2 +- web/src/pages/events/EventListPage.ts | 2 +- web/src/pages/events/RuleForm.ts | 2 +- web/src/pages/events/RuleListPage.ts | 2 +- web/src/pages/events/TransportForm.ts | 2 +- web/src/pages/events/TransportListPage.ts | 2 +- web/src/pages/events/utils.ts | 2 +- web/src/pages/flows/BoundStagesList.ts | 2 +- web/src/pages/flows/FlowDiagram.ts | 2 +- web/src/pages/flows/FlowForm.ts | 2 +- web/src/pages/flows/FlowImportForm.ts | 2 +- web/src/pages/flows/FlowListPage.ts | 2 +- web/src/pages/flows/FlowViewPage.ts | 2 +- web/src/pages/flows/StageBindingForm.ts | 2 +- web/src/pages/groups/GroupForm.ts | 2 +- web/src/pages/groups/GroupListPage.ts | 2 +- web/src/pages/groups/MemberSelectModal.ts | 2 +- web/src/pages/outposts/OutpostDeploymentModal.ts | 2 +- web/src/pages/outposts/OutpostForm.ts | 2 +- web/src/pages/outposts/OutpostHealth.ts | 2 +- web/src/pages/outposts/OutpostHealthSimple.ts | 2 +- web/src/pages/outposts/OutpostListPage.ts | 2 +- web/src/pages/outposts/ServiceConnectionDockerForm.ts | 2 +- .../pages/outposts/ServiceConnectionKubernetesForm.ts | 2 +- web/src/pages/outposts/ServiceConnectionListPage.ts | 2 +- web/src/pages/policies/BoundPoliciesList.ts | 2 +- web/src/pages/policies/PolicyBindingForm.ts | 2 +- web/src/pages/policies/PolicyListPage.ts | 2 +- web/src/pages/policies/PolicyTestForm.ts | 2 +- web/src/pages/policies/dummy/DummyPolicyForm.ts | 2 +- .../policies/event_matcher/EventMatcherPolicyForm.ts | 2 +- web/src/pages/policies/expiry/ExpiryPolicyForm.ts | 2 +- .../pages/policies/expression/ExpressionPolicyForm.ts | 2 +- .../pages/policies/hibp/HaveIBeenPwnedPolicyForm.ts | 2 +- web/src/pages/policies/password/PasswordPolicyForm.ts | 2 +- .../pages/policies/reputation/IPReputationListPage.ts | 2 +- .../pages/policies/reputation/ReputationPolicyForm.ts | 2 +- .../policies/reputation/UserReputationListPage.ts | 2 +- .../property-mappings/PropertyMappingLDAPForm.ts | 2 +- .../property-mappings/PropertyMappingListPage.ts | 2 +- .../property-mappings/PropertyMappingSAMLForm.ts | 2 +- .../property-mappings/PropertyMappingScopeForm.ts | 2 +- .../property-mappings/PropertyMappingTestForm.ts | 2 +- web/src/pages/providers/ProviderListPage.ts | 2 +- web/src/pages/providers/ProviderViewPage.ts | 2 +- web/src/pages/providers/RelatedApplicationButton.ts | 2 +- web/src/pages/providers/ldap/LDAPProviderForm.ts | 2 +- web/src/pages/providers/ldap/LDAPProviderViewPage.ts | 2 +- web/src/pages/providers/oauth2/OAuth2ProviderForm.ts | 2 +- .../pages/providers/oauth2/OAuth2ProviderViewPage.ts | 2 +- web/src/pages/providers/proxy/ProxyProviderForm.ts | 2 +- .../pages/providers/proxy/ProxyProviderViewPage.ts | 2 +- web/src/pages/providers/saml/SAMLProviderForm.ts | 2 +- .../pages/providers/saml/SAMLProviderImportForm.ts | 2 +- web/src/pages/providers/saml/SAMLProviderViewPage.ts | 2 +- web/src/pages/sources/SourceViewPage.ts | 2 +- web/src/pages/sources/SourcesListPage.ts | 2 +- web/src/pages/sources/ldap/LDAPSourceForm.ts | 2 +- web/src/pages/sources/ldap/LDAPSourceViewPage.ts | 2 +- web/src/pages/sources/oauth/OAuthSourceForm.ts | 2 +- web/src/pages/sources/oauth/OAuthSourceViewPage.ts | 2 +- web/src/pages/sources/plex/PlexSourceForm.ts | 2 +- web/src/pages/sources/plex/PlexSourceViewPage.ts | 2 +- web/src/pages/sources/saml/SAMLSourceForm.ts | 2 +- web/src/pages/sources/saml/SAMLSourceViewPage.ts | 2 +- web/src/pages/stages/StageListPage.ts | 2 +- .../authenticator_duo/AuthenticatorDuoStageForm.ts | 2 +- .../AuthenticatorStaticStageForm.ts | 2 +- .../authenticator_totp/AuthenticatorTOTPStageForm.ts | 2 +- .../AuthenticatorValidateStageForm.ts | 2 +- .../AuthenticateWebAuthnStageForm.ts | 2 +- web/src/pages/stages/captcha/CaptchaStageForm.ts | 2 +- web/src/pages/stages/consent/ConsentStageForm.ts | 2 +- web/src/pages/stages/deny/DenyStageForm.ts | 2 +- web/src/pages/stages/dummy/DummyStageForm.ts | 2 +- web/src/pages/stages/email/EmailStageForm.ts | 2 +- .../stages/identification/IdentificationStageForm.ts | 2 +- web/src/pages/stages/invitation/InvitationForm.ts | 2 +- web/src/pages/stages/invitation/InvitationListLink.ts | 2 +- web/src/pages/stages/invitation/InvitationListPage.ts | 2 +- .../pages/stages/invitation/InvitationStageForm.ts | 2 +- web/src/pages/stages/password/PasswordStageForm.ts | 2 +- web/src/pages/stages/prompt/PromptForm.ts | 2 +- web/src/pages/stages/prompt/PromptListPage.ts | 2 +- web/src/pages/stages/prompt/PromptStageForm.ts | 2 +- .../pages/stages/user_delete/UserDeleteStageForm.ts | 2 +- web/src/pages/stages/user_login/UserLoginStageForm.ts | 2 +- .../pages/stages/user_logout/UserLogoutStageForm.ts | 2 +- web/src/pages/stages/user_write/UserWriteStageForm.ts | 2 +- web/src/pages/system-tasks/SystemTaskListPage.ts | 2 +- web/src/pages/tenants/TenantForm.ts | 2 +- web/src/pages/tenants/TenantListPage.ts | 2 +- web/src/pages/tokens/TokenListPage.ts | 2 +- web/src/pages/user-settings/UserSelfForm.ts | 2 +- web/src/pages/user-settings/UserSettingsPage.ts | 2 +- .../user-settings/settings/SourceSettingsOAuth.ts | 2 +- .../settings/UserSettingsAuthenticatorDuo.ts | 2 +- .../settings/UserSettingsAuthenticatorStatic.ts | 2 +- .../settings/UserSettingsAuthenticatorTOTP.ts | 2 +- .../settings/UserSettingsAuthenticatorWebAuthn.ts | 2 +- web/src/pages/user-settings/tokens/UserTokenForm.ts | 2 +- web/src/pages/user-settings/tokens/UserTokenList.ts | 2 +- web/src/pages/users/GroupSelectModal.ts | 2 +- web/src/pages/users/UserForm.ts | 2 +- web/src/pages/users/UserListPage.ts | 2 +- web/src/pages/users/UserResetEmailForm.ts | 2 +- web/src/pages/users/UserViewPage.ts | 2 +- 172 files changed, 183 insertions(+), 172 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 74498d2b3..239c35849 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15,6 +15,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", + "@goauthentik/api": "^1629055619.0.0", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", @@ -1743,6 +1744,11 @@ "node": ">=6" } }, + "node_modules/@goauthentik/api": { + "version": "1629055619.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629055619.0.0.tgz", + "integrity": "sha512-FQR1hoYC8hEGAm/oHC6VPoB/T8zb+V7pccx4LRJlKo8VxdsRAxgGn9nm/5h/1zIg8VmuRQqsXFNQMRT86nzyjw==" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", @@ -9236,6 +9242,11 @@ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==" }, + "@goauthentik/api": { + "version": "1629055619.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629055619.0.0.tgz", + "integrity": "sha512-FQR1hoYC8hEGAm/oHC6VPoB/T8zb+V7pccx4LRJlKo8VxdsRAxgGn9nm/5h/1zIg8VmuRQqsXFNQMRT86nzyjw==" + }, "@humanwhocodes/config-array": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", diff --git a/web/package.json b/web/package.json index 0cd43ff5f..fb66d7595 100644 --- a/web/package.json +++ b/web/package.json @@ -46,6 +46,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", + "@goauthentik/api": "^1629055619.0.0", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", @@ -63,7 +64,6 @@ "@typescript-eslint/eslint-plugin": "^4.29.1", "@typescript-eslint/parser": "^4.29.1", "@webcomponents/webcomponentsjs": "^2.6.0", - "authentik-api": "file:api", "babel-plugin-macros": "^3.1.0", "base64-js": "^1.5.1", "chart.js": "^3.5.0", diff --git a/web/src/api/Config.ts b/web/src/api/Config.ts index ed8b98484..2b6dceb3a 100644 --- a/web/src/api/Config.ts +++ b/web/src/api/Config.ts @@ -1,4 +1,4 @@ -import { Config, Configuration, CoreApi, CurrentTenant, Middleware, ResponseContext, RootApi, Tenant } from "authentik-api"; +import { Config, Configuration, CoreApi, CurrentTenant, Middleware, ResponseContext, RootApi, Tenant } from "@goauthentik/api"; import { getCookie } from "../utils"; import { APIMiddleware } from "../elements/notifications/APIDrawer"; import { MessageMiddleware } from "../elements/messages/Middleware"; diff --git a/web/src/api/Events.ts b/web/src/api/Events.ts index 1cf2b4c92..b8af9f675 100644 --- a/web/src/api/Events.ts +++ b/web/src/api/Events.ts @@ -1,4 +1,4 @@ -import { Event } from "authentik-api"; +import { Event } from "@goauthentik/api"; export interface EventUser { pk: number; diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index 84dc572a4..620317166 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -4,7 +4,7 @@ import { VERSION } from "../constants"; import { SentryIgnoredError } from "../common/errors"; import { me } from "./Users"; import { config } from "./Config"; -import { Config } from "authentik-api"; +import { Config } from "@goauthentik/api"; export const TAG_SENTRY_COMPONENT = "authentik.component"; export const TAG_SENTRY_CAPABILITIES = "authentik.capabilities"; diff --git a/web/src/api/Users.ts b/web/src/api/Users.ts index 5117828b5..cfe1ef9ea 100644 --- a/web/src/api/Users.ts +++ b/web/src/api/Users.ts @@ -1,4 +1,4 @@ -import { CoreApi, SessionUser } from "authentik-api"; +import { CoreApi, SessionUser } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "./Config"; let globalMePromise: Promise; diff --git a/web/src/elements/buttons/TokenCopyButton.ts b/web/src/elements/buttons/TokenCopyButton.ts index 79b0fbcca..048984ea0 100644 --- a/web/src/elements/buttons/TokenCopyButton.ts +++ b/web/src/elements/buttons/TokenCopyButton.ts @@ -1,5 +1,5 @@ import { customElement, property } from "lit-element"; -import { CoreApi } from "authentik-api"; +import { CoreApi } from "@goauthentik/api"; import { PRIMARY_CLASS, SUCCESS_CLASS } from "../../constants"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ActionButton } from "./ActionButton"; diff --git a/web/src/elements/charts/AdminLoginsChart.ts b/web/src/elements/charts/AdminLoginsChart.ts index 211471e15..34f2d7a91 100644 --- a/web/src/elements/charts/AdminLoginsChart.ts +++ b/web/src/elements/charts/AdminLoginsChart.ts @@ -1,6 +1,6 @@ import { customElement } from "lit-element"; import { ChartData } from "chart.js"; -import { AdminApi, LoginMetrics } from "authentik-api"; +import { AdminApi, LoginMetrics } from "@goauthentik/api"; import { AKChart } from "./Chart"; import { DEFAULT_CONFIG } from "../../api/Config"; diff --git a/web/src/elements/charts/ApplicationAuthorizeChart.ts b/web/src/elements/charts/ApplicationAuthorizeChart.ts index 3e39f5a05..55d7d2ce2 100644 --- a/web/src/elements/charts/ApplicationAuthorizeChart.ts +++ b/web/src/elements/charts/ApplicationAuthorizeChart.ts @@ -1,5 +1,5 @@ import { customElement, property } from "lit-element"; -import { Coordinate, CoreApi } from "authentik-api"; +import { Coordinate, CoreApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { AKChart } from "./Chart"; import { ChartData } from "chart.js"; diff --git a/web/src/elements/charts/UserChart.ts b/web/src/elements/charts/UserChart.ts index 549eb3538..d732cd3b6 100644 --- a/web/src/elements/charts/UserChart.ts +++ b/web/src/elements/charts/UserChart.ts @@ -1,5 +1,5 @@ import { customElement, property } from "lit-element"; -import { CoreApi, UserMetrics } from "authentik-api"; +import { CoreApi, UserMetrics } from "@goauthentik/api"; import { AKChart } from "./Chart"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ChartData } from "chart.js"; diff --git a/web/src/elements/events/ObjectChangelog.ts b/web/src/elements/events/ObjectChangelog.ts index 5d22ce77e..11320cbd6 100644 --- a/web/src/elements/events/ObjectChangelog.ts +++ b/web/src/elements/events/ObjectChangelog.ts @@ -2,7 +2,7 @@ import { t } from "@lingui/macro"; import { customElement, html, property, TemplateResult } from "lit-element"; import { AKResponse } from "../../api/Client"; import { Table, TableColumn } from "../table/Table"; -import { Event, EventsApi } from "authentik-api"; +import { Event, EventsApi } from "@goauthentik/api"; import "../Tabs"; import "../buttons/ModalButton"; diff --git a/web/src/elements/events/UserEvents.ts b/web/src/elements/events/UserEvents.ts index eb2947f01..17c0796f2 100644 --- a/web/src/elements/events/UserEvents.ts +++ b/web/src/elements/events/UserEvents.ts @@ -2,7 +2,7 @@ import { t } from "@lingui/macro"; import { customElement, html, property, TemplateResult } from "lit-element"; import { AKResponse } from "../../api/Client"; import { Table, TableColumn } from "../table/Table"; -import { Event, EventsApi } from "authentik-api"; +import { Event, EventsApi } from "@goauthentik/api"; import "../Tabs"; import "../buttons/ModalButton"; diff --git a/web/src/elements/forms/DeleteBulkForm.ts b/web/src/elements/forms/DeleteBulkForm.ts index 88c8c3e1d..323788838 100644 --- a/web/src/elements/forms/DeleteBulkForm.ts +++ b/web/src/elements/forms/DeleteBulkForm.ts @@ -5,7 +5,7 @@ import { ModalButton } from "../buttons/ModalButton"; import { MessageLevel } from "../messages/Message"; import { showMessage } from "../messages/MessageContainer"; import "../buttons/SpinnerButton"; -import { UsedBy, UsedByActionEnum } from "authentik-api"; +import { UsedBy, UsedByActionEnum } from "@goauthentik/api"; import PFList from "@patternfly/patternfly/components/List/list.css"; import { until } from "lit-html/directives/until"; import { Table, TableColumn } from "../table/Table"; diff --git a/web/src/elements/forms/DeleteForm.ts b/web/src/elements/forms/DeleteForm.ts index 0e942525b..cd6bad53d 100644 --- a/web/src/elements/forms/DeleteForm.ts +++ b/web/src/elements/forms/DeleteForm.ts @@ -5,7 +5,7 @@ import { ModalButton } from "../buttons/ModalButton"; import { MessageLevel } from "../messages/Message"; import { showMessage } from "../messages/MessageContainer"; import "../buttons/SpinnerButton"; -import { UsedBy, UsedByActionEnum } from "authentik-api"; +import { UsedBy, UsedByActionEnum } from "@goauthentik/api"; import PFList from "@patternfly/patternfly/components/List/list.css"; import { until } from "lit-html/directives/until"; diff --git a/web/src/elements/forms/Form.ts b/web/src/elements/forms/Form.ts index 2ef6e09bc..dfdccd898 100644 --- a/web/src/elements/forms/Form.ts +++ b/web/src/elements/forms/Form.ts @@ -22,7 +22,7 @@ import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-gro import { MessageLevel } from "../messages/Message"; import { IronFormElement } from "@polymer/iron-form/iron-form"; import { camelToSnake, convertToSlug } from "../../utils"; -import { ValidationError } from "authentik-api"; +import { ValidationError } from "@goauthentik/api"; import { EVENT_REFRESH } from "../../constants"; export class APIError extends Error { diff --git a/web/src/elements/forms/FormElement.ts b/web/src/elements/forms/FormElement.ts index 00c48e1d4..a906a6835 100644 --- a/web/src/elements/forms/FormElement.ts +++ b/web/src/elements/forms/FormElement.ts @@ -2,7 +2,7 @@ import { customElement, LitElement, CSSResult, property, css } from "lit-element import { TemplateResult, html } from "lit-html"; import PFForm from "@patternfly/patternfly/components/Form/form.css"; import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css"; -import { ErrorDetail } from "authentik-api"; +import { ErrorDetail } from "@goauthentik/api"; @customElement("ak-form-element") export class FormElement extends LitElement { diff --git a/web/src/elements/messages/Middleware.ts b/web/src/elements/messages/Middleware.ts index 3b3d8c102..5a06b3dbd 100644 --- a/web/src/elements/messages/Middleware.ts +++ b/web/src/elements/messages/Middleware.ts @@ -1,4 +1,4 @@ -import { Middleware, ResponseContext } from "authentik-api"; +import { Middleware, ResponseContext } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { MessageLevel } from "./Message"; import { showMessage } from "./MessageContainer"; diff --git a/web/src/elements/notifications/APIDrawer.ts b/web/src/elements/notifications/APIDrawer.ts index a36ef8d1e..b4aaacbba 100644 --- a/web/src/elements/notifications/APIDrawer.ts +++ b/web/src/elements/notifications/APIDrawer.ts @@ -1,4 +1,4 @@ -import { Middleware, ResponseContext } from "authentik-api"; +import { Middleware, ResponseContext } from "@goauthentik/api"; import { css, CSSResult, diff --git a/web/src/elements/notifications/NotificationDrawer.ts b/web/src/elements/notifications/NotificationDrawer.ts index 91fb6d1e8..c68e281e0 100644 --- a/web/src/elements/notifications/NotificationDrawer.ts +++ b/web/src/elements/notifications/NotificationDrawer.ts @@ -8,7 +8,7 @@ import { property, TemplateResult, } from "lit-element"; -import { EventsApi, Notification } from "authentik-api"; +import { EventsApi, Notification } from "@goauthentik/api"; import { AKResponse } from "../../api/Client"; import { DEFAULT_CONFIG } from "../../api/Config"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; diff --git a/web/src/elements/oauth/UserCodeList.ts b/web/src/elements/oauth/UserCodeList.ts index 9a846697f..27203151d 100644 --- a/web/src/elements/oauth/UserCodeList.ts +++ b/web/src/elements/oauth/UserCodeList.ts @@ -5,7 +5,7 @@ import { Table, TableColumn } from "../table/Table"; import "../forms/DeleteBulkForm"; import { PAGE_SIZE } from "../../constants"; -import { ExpiringBaseGrantModel, Oauth2Api } from "authentik-api"; +import { ExpiringBaseGrantModel, Oauth2Api } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-user-oauth-code-list") diff --git a/web/src/elements/oauth/UserRefreshList.ts b/web/src/elements/oauth/UserRefreshList.ts index a0fae670b..d19f42574 100644 --- a/web/src/elements/oauth/UserRefreshList.ts +++ b/web/src/elements/oauth/UserRefreshList.ts @@ -6,7 +6,7 @@ import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css"; import "../forms/DeleteBulkForm"; import { PAGE_SIZE } from "../../constants"; -import { RefreshTokenModel, Oauth2Api, ExpiringBaseGrantModel } from "authentik-api"; +import { RefreshTokenModel, Oauth2Api, ExpiringBaseGrantModel } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-user-oauth-refresh-list") diff --git a/web/src/elements/sidebar/SidebarBrand.ts b/web/src/elements/sidebar/SidebarBrand.ts index 7a324ee3c..facfa54e8 100644 --- a/web/src/elements/sidebar/SidebarBrand.ts +++ b/web/src/elements/sidebar/SidebarBrand.ts @@ -14,7 +14,7 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css"; import AKGlobal from "../../authentik.css"; import { configureSentry } from "../../api/Sentry"; -import { CurrentTenant } from "authentik-api"; +import { CurrentTenant } from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; import { EVENT_SIDEBAR_TOGGLE } from "../../constants"; import { tenant } from "../../api/Config"; diff --git a/web/src/elements/user/SessionList.ts b/web/src/elements/user/SessionList.ts index 16b44545d..c37595efb 100644 --- a/web/src/elements/user/SessionList.ts +++ b/web/src/elements/user/SessionList.ts @@ -5,7 +5,7 @@ import { Table, TableColumn } from "../table/Table"; import "../forms/DeleteBulkForm"; import { PAGE_SIZE } from "../../constants"; -import { CoreApi, AuthenticatedSession } from "authentik-api"; +import { CoreApi, AuthenticatedSession } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-user-session-list") diff --git a/web/src/elements/user/UserConsentList.ts b/web/src/elements/user/UserConsentList.ts index 5a8a27ad1..6b0a7e217 100644 --- a/web/src/elements/user/UserConsentList.ts +++ b/web/src/elements/user/UserConsentList.ts @@ -5,7 +5,7 @@ import { Table, TableColumn } from "../table/Table"; import "../forms/DeleteBulkForm"; import { PAGE_SIZE } from "../../constants"; -import { CoreApi, UserConsent } from "authentik-api"; +import { CoreApi, UserConsent } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-user-consent-list") diff --git a/web/src/flows/FlowExecutor.ts b/web/src/flows/FlowExecutor.ts index 9613bf6b4..cc760e249 100644 --- a/web/src/flows/FlowExecutor.ts +++ b/web/src/flows/FlowExecutor.ts @@ -43,7 +43,7 @@ import { FlowsApi, RedirectChallenge, ShellChallenge, -} from "authentik-api"; +} from "@goauthentik/api"; import { DEFAULT_CONFIG, tenant } from "../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; import { until } from "lit-html/directives/until"; diff --git a/web/src/flows/access_denied/FlowAccessDenied.ts b/web/src/flows/access_denied/FlowAccessDenied.ts index 1f5fe54a8..389146c27 100644 --- a/web/src/flows/access_denied/FlowAccessDenied.ts +++ b/web/src/flows/access_denied/FlowAccessDenied.ts @@ -1,4 +1,4 @@ -import { AccessDeniedChallenge, FlowChallengeResponseRequest } from "authentik-api"; +import { AccessDeniedChallenge, FlowChallengeResponseRequest } from "@goauthentik/api"; import { CSSResult, customElement, html, TemplateResult } from "lit-element"; import { BaseStage } from "../stages/base"; import PFLogin from "@patternfly/patternfly/components/Login/login.css"; diff --git a/web/src/flows/sources/plex/PlexLoginInit.ts b/web/src/flows/sources/plex/PlexLoginInit.ts index 02214dee4..3b174b33b 100644 --- a/web/src/flows/sources/plex/PlexLoginInit.ts +++ b/web/src/flows/sources/plex/PlexLoginInit.ts @@ -2,7 +2,7 @@ import { t } from "@lingui/macro"; import { PlexAuthenticationChallenge, PlexAuthenticationChallengeResponseRequest, -} from "authentik-api"; +} from "@goauthentik/api"; import PFLogin from "@patternfly/patternfly/components/Login/login.css"; import PFForm from "@patternfly/patternfly/components/Form/form.css"; import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css"; @@ -15,7 +15,7 @@ import { html, TemplateResult } from "lit-html"; import { BaseStage } from "../../stages/base"; import { PlexAPIClient, popupCenterScreen } from "./API"; import { DEFAULT_CONFIG } from "../../../api/Config"; -import { SourcesApi } from "authentik-api"; +import { SourcesApi } from "@goauthentik/api"; import { showMessage } from "../../../elements/messages/MessageContainer"; import { MessageLevel } from "../../../elements/messages/Message"; diff --git a/web/src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts b/web/src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts index ec3b6f94b..a06f1ce54 100644 --- a/web/src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts +++ b/web/src/flows/stages/authenticator_duo/AuthenticatorDuoStage.ts @@ -15,7 +15,7 @@ import { AuthenticatorDuoChallenge, AuthenticatorDuoChallengeResponseRequest, StagesApi, -} from "authentik-api"; +} from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts b/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts index cfa379a0c..0db675f9c 100644 --- a/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts +++ b/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts @@ -14,7 +14,7 @@ import "../../FormStatic"; import { AuthenticatorStaticChallenge, AuthenticatorStaticChallengeResponseRequest, -} from "authentik-api"; +} from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; export const STATIC_TOKEN_STYLE = css` diff --git a/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts b/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts index 9d46b4894..31670802b 100644 --- a/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts +++ b/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts @@ -17,7 +17,7 @@ import { MessageLevel } from "../../../elements/messages/Message"; import { AuthenticatorTOTPChallenge, AuthenticatorTOTPChallengeResponseRequest, -} from "authentik-api"; +} from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-stage-authenticator-totp") diff --git a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts index d61a31e55..76e26decf 100644 --- a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts +++ b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStage.ts @@ -16,7 +16,7 @@ import { AuthenticatorValidationChallenge, AuthenticatorValidationChallengeResponseRequest, DeviceChallenge, -} from "authentik-api"; +} from "@goauthentik/api"; export enum DeviceClasses { STATIC = "static", diff --git a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageCode.ts b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageCode.ts index 88977e4aa..0be36ab30 100644 --- a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageCode.ts +++ b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageCode.ts @@ -17,7 +17,7 @@ import { AuthenticatorValidationChallenge, AuthenticatorValidationChallengeResponseRequest, DeviceChallenge, -} from "authentik-api"; +} from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-stage-authenticator-validate-code") diff --git a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageDuo.ts b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageDuo.ts index 93d950e97..dc430446b 100644 --- a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageDuo.ts +++ b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageDuo.ts @@ -16,7 +16,7 @@ import { AuthenticatorValidationChallenge, AuthenticatorValidationChallengeResponseRequest, DeviceChallenge, -} from "authentik-api"; +} from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-stage-authenticator-validate-duo") diff --git a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageWebAuthn.ts b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageWebAuthn.ts index a7bbb41ca..35f41b6ac 100644 --- a/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageWebAuthn.ts +++ b/web/src/flows/stages/authenticator_validate/AuthenticatorValidateStageWebAuthn.ts @@ -18,7 +18,7 @@ import { AuthenticatorValidationChallenge, AuthenticatorValidationChallengeResponseRequest, DeviceChallenge, -} from "authentik-api"; +} from "@goauthentik/api"; @customElement("ak-stage-authenticator-validate-webauthn") export class AuthenticatorValidateStageWebAuthn extends BaseStage< diff --git a/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts b/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts index b28aa4eda..50f4a6d10 100644 --- a/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts +++ b/web/src/flows/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts @@ -17,7 +17,7 @@ import { import { AuthenticatorWebAuthnChallenge, AuthenticatorWebAuthnChallengeResponseRequest, -} from "authentik-api"; +} from "@goauthentik/api"; export interface WebAuthnAuthenticatorRegisterChallengeResponse { response: Assertion; diff --git a/web/src/flows/stages/autosubmit/AutosubmitStage.ts b/web/src/flows/stages/autosubmit/AutosubmitStage.ts index 44d3deb57..c56b8b910 100644 --- a/web/src/flows/stages/autosubmit/AutosubmitStage.ts +++ b/web/src/flows/stages/autosubmit/AutosubmitStage.ts @@ -9,7 +9,7 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css"; import AKGlobal from "../../../authentik.css"; import { BaseStage } from "../base"; import "../../../elements/EmptyState"; -import { AutosubmitChallenge, AutoSubmitChallengeResponseRequest } from "authentik-api"; +import { AutosubmitChallenge, AutoSubmitChallengeResponseRequest } from "@goauthentik/api"; @customElement("ak-stage-autosubmit") export class AutosubmitStage extends BaseStage< diff --git a/web/src/flows/stages/base.ts b/web/src/flows/stages/base.ts index dc0b1d73d..b188d4669 100644 --- a/web/src/flows/stages/base.ts +++ b/web/src/flows/stages/base.ts @@ -1,4 +1,4 @@ -import { ErrorDetail } from "authentik-api"; +import { ErrorDetail } from "@goauthentik/api"; import { html, LitElement, property, TemplateResult } from "lit-element"; export interface StageHost { diff --git a/web/src/flows/stages/captcha/CaptchaStage.ts b/web/src/flows/stages/captcha/CaptchaStage.ts index 9ac948e99..dde16949e 100644 --- a/web/src/flows/stages/captcha/CaptchaStage.ts +++ b/web/src/flows/stages/captcha/CaptchaStage.ts @@ -12,7 +12,7 @@ import { BaseStage } from "../base"; import "../../../elements/forms/FormElement"; import "../../../elements/EmptyState"; import "../../FormStatic"; -import { CaptchaChallenge, CaptchaChallengeResponseRequest } from "authentik-api"; +import { CaptchaChallenge, CaptchaChallengeResponseRequest } from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-stage-captcha") diff --git a/web/src/flows/stages/consent/ConsentStage.ts b/web/src/flows/stages/consent/ConsentStage.ts index 52f579252..3ade523d7 100644 --- a/web/src/flows/stages/consent/ConsentStage.ts +++ b/web/src/flows/stages/consent/ConsentStage.ts @@ -12,7 +12,7 @@ import AKGlobal from "../../../authentik.css"; import { BaseStage } from "../base"; import "../../../elements/EmptyState"; import "../../FormStatic"; -import { ConsentChallenge, ConsentChallengeResponseRequest } from "authentik-api"; +import { ConsentChallenge, ConsentChallengeResponseRequest } from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-stage-consent") diff --git a/web/src/flows/stages/dummy/DummyStage.ts b/web/src/flows/stages/dummy/DummyStage.ts index fc2655220..41a3245a1 100644 --- a/web/src/flows/stages/dummy/DummyStage.ts +++ b/web/src/flows/stages/dummy/DummyStage.ts @@ -10,7 +10,7 @@ import AKGlobal from "../../../authentik.css"; import { BaseStage } from "../base"; import "../../../elements/EmptyState"; import "../../FormStatic"; -import { DummyChallenge, DummyChallengeResponseRequest } from "authentik-api"; +import { DummyChallenge, DummyChallengeResponseRequest } from "@goauthentik/api"; @customElement("ak-stage-dummy") export class DummyStage extends BaseStage { diff --git a/web/src/flows/stages/email/EmailStage.ts b/web/src/flows/stages/email/EmailStage.ts index 76613efa3..e3c1f1fb7 100644 --- a/web/src/flows/stages/email/EmailStage.ts +++ b/web/src/flows/stages/email/EmailStage.ts @@ -9,7 +9,7 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css"; import AKGlobal from "../../../authentik.css"; import { BaseStage } from "../base"; import "../../../elements/EmptyState"; -import { EmailChallenge, EmailChallengeResponseRequest } from "authentik-api"; +import { EmailChallenge, EmailChallengeResponseRequest } from "@goauthentik/api"; @customElement("ak-stage-email") export class EmailStage extends BaseStage { diff --git a/web/src/flows/stages/identification/IdentificationStage.ts b/web/src/flows/stages/identification/IdentificationStage.ts index 0dfe52fdf..bd6382175 100644 --- a/web/src/flows/stages/identification/IdentificationStage.ts +++ b/web/src/flows/stages/identification/IdentificationStage.ts @@ -16,7 +16,7 @@ import { IdentificationChallengeResponseRequest, LoginSource, UserFieldsEnum, -} from "authentik-api"; +} from "@goauthentik/api"; export const PasswordManagerPrefill: { password: string | undefined; diff --git a/web/src/flows/stages/password/PasswordStage.ts b/web/src/flows/stages/password/PasswordStage.ts index 850acc1c8..067d85199 100644 --- a/web/src/flows/stages/password/PasswordStage.ts +++ b/web/src/flows/stages/password/PasswordStage.ts @@ -12,7 +12,7 @@ import "../../../elements/forms/FormElement"; import "../../../elements/EmptyState"; import { PasswordManagerPrefill } from "../identification/IdentificationStage"; import "../../FormStatic"; -import { PasswordChallenge, PasswordChallengeResponseRequest } from "authentik-api"; +import { PasswordChallenge, PasswordChallengeResponseRequest } from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-stage-password") diff --git a/web/src/flows/stages/prompt/PromptStage.ts b/web/src/flows/stages/prompt/PromptStage.ts index 864a618da..70ca53b79 100644 --- a/web/src/flows/stages/prompt/PromptStage.ts +++ b/web/src/flows/stages/prompt/PromptStage.ts @@ -13,7 +13,7 @@ import { BaseStage } from "../base"; import "../../../elements/forms/FormElement"; import "../../../elements/EmptyState"; import "../../../elements/Divider"; -import { PromptChallenge, PromptChallengeResponseRequest, StagePrompt } from "authentik-api"; +import { PromptChallenge, PromptChallengeResponseRequest, StagePrompt } from "@goauthentik/api"; @customElement("ak-stage-prompt") export class PromptStage extends BaseStage { diff --git a/web/src/interfaces/AdminInterface.ts b/web/src/interfaces/AdminInterface.ts index a5b210ebe..cc249867e 100644 --- a/web/src/interfaces/AdminInterface.ts +++ b/web/src/interfaces/AdminInterface.ts @@ -30,7 +30,7 @@ import { EVENT_SIDEBAR_TOGGLE, VERSION, } from "../constants"; -import { AdminApi, Version } from "authentik-api"; +import { AdminApi, Version } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../api/Config"; import { WebsocketClient } from "../common/ws"; diff --git a/web/src/pages/LibraryPage.ts b/web/src/pages/LibraryPage.ts index c0ed56ddf..c576a734d 100644 --- a/web/src/pages/LibraryPage.ts +++ b/web/src/pages/LibraryPage.ts @@ -10,7 +10,7 @@ import { } from "lit-element"; import { ifDefined } from "lit-html/directives/if-defined"; import { until } from "lit-html/directives/until"; -import { Application, CoreApi } from "authentik-api"; +import { Application, CoreApi } from "@goauthentik/api"; import { AKResponse } from "../api/Client"; import { DEFAULT_CONFIG } from "../api/Config"; import { me } from "../api/Users"; diff --git a/web/src/pages/admin-overview/TopApplicationsTable.ts b/web/src/pages/admin-overview/TopApplicationsTable.ts index 7a6b99b10..24905debd 100644 --- a/web/src/pages/admin-overview/TopApplicationsTable.ts +++ b/web/src/pages/admin-overview/TopApplicationsTable.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { EventsApi, EventTopPerUser } from "authentik-api"; +import { EventsApi, EventTopPerUser } from "@goauthentik/api"; import PFTable from "@patternfly/patternfly/components/Table/table.css"; import AKGlobal from "../../authentik.css"; diff --git a/web/src/pages/admin-overview/cards/BackupStatusCard.ts b/web/src/pages/admin-overview/cards/BackupStatusCard.ts index d638f926d..cc2623bdd 100644 --- a/web/src/pages/admin-overview/cards/BackupStatusCard.ts +++ b/web/src/pages/admin-overview/cards/BackupStatusCard.ts @@ -1,7 +1,7 @@ import { t } from "@lingui/macro"; import { customElement, html, TemplateResult } from "lit-element"; import { AdminStatus, AdminStatusCard } from "./AdminStatusCard"; -import { AdminApi, StatusEnum, CapabilitiesEnum } from "authentik-api"; +import { AdminApi, StatusEnum, CapabilitiesEnum } from "@goauthentik/api"; import { config, DEFAULT_CONFIG } from "../../../api/Config"; import { convertToTitle } from "../../../utils"; diff --git a/web/src/pages/admin-overview/cards/SystemStatusCard.ts b/web/src/pages/admin-overview/cards/SystemStatusCard.ts index eeb04e768..f961a9476 100644 --- a/web/src/pages/admin-overview/cards/SystemStatusCard.ts +++ b/web/src/pages/admin-overview/cards/SystemStatusCard.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement, html, TemplateResult } from "lit-element"; -import { AdminApi, System } from "authentik-api"; +import { AdminApi, System } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { AdminStatusCard, AdminStatus } from "./AdminStatusCard"; diff --git a/web/src/pages/admin-overview/cards/VersionStatusCard.ts b/web/src/pages/admin-overview/cards/VersionStatusCard.ts index bf5952efb..ccfa91c02 100644 --- a/web/src/pages/admin-overview/cards/VersionStatusCard.ts +++ b/web/src/pages/admin-overview/cards/VersionStatusCard.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement, html, TemplateResult } from "lit-element"; -import { AdminApi, Version } from "authentik-api"; +import { AdminApi, Version } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { AdminStatusCard, AdminStatus } from "./AdminStatusCard"; diff --git a/web/src/pages/admin-overview/cards/WorkerStatusCard.ts b/web/src/pages/admin-overview/cards/WorkerStatusCard.ts index 0363565bb..e701083a4 100644 --- a/web/src/pages/admin-overview/cards/WorkerStatusCard.ts +++ b/web/src/pages/admin-overview/cards/WorkerStatusCard.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement, html } from "lit-element"; -import { AdminApi } from "authentik-api"; +import { AdminApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { AdminStatus, AdminStatusCard } from "./AdminStatusCard"; diff --git a/web/src/pages/admin-overview/charts/FlowStatusChart.ts b/web/src/pages/admin-overview/charts/FlowStatusChart.ts index b835bbd25..93b04ceef 100644 --- a/web/src/pages/admin-overview/charts/FlowStatusChart.ts +++ b/web/src/pages/admin-overview/charts/FlowStatusChart.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement } from "lit-element"; -import { FlowsApi } from "authentik-api"; +import { FlowsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import "../../../elements/forms/ConfirmationForm"; import { AKChart } from "../../../elements/charts/Chart"; diff --git a/web/src/pages/admin-overview/charts/GroupCountStatusChart.ts b/web/src/pages/admin-overview/charts/GroupCountStatusChart.ts index 98f0580c4..664f6d1ac 100644 --- a/web/src/pages/admin-overview/charts/GroupCountStatusChart.ts +++ b/web/src/pages/admin-overview/charts/GroupCountStatusChart.ts @@ -1,5 +1,5 @@ import { customElement } from "lit-element"; -import { CoreApi } from "authentik-api"; +import { CoreApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { AKChart } from "../../../elements/charts/Chart"; import { t } from "@lingui/macro"; diff --git a/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts b/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts index e5327f577..ae2876448 100644 --- a/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts +++ b/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement } from "lit-element"; -import { SourcesApi, StatusEnum } from "authentik-api"; +import { SourcesApi, StatusEnum } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import "../../../elements/forms/ConfirmationForm"; import { AKChart } from "../../../elements/charts/Chart"; diff --git a/web/src/pages/admin-overview/charts/OutpostStatusChart.ts b/web/src/pages/admin-overview/charts/OutpostStatusChart.ts index f01a77e9b..54bd3f1bc 100644 --- a/web/src/pages/admin-overview/charts/OutpostStatusChart.ts +++ b/web/src/pages/admin-overview/charts/OutpostStatusChart.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement } from "lit-element"; -import { OutpostsApi } from "authentik-api"; +import { OutpostsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import "../../../elements/forms/ConfirmationForm"; import { AKChart } from "../../../elements/charts/Chart"; diff --git a/web/src/pages/admin-overview/charts/PolicyStatusChart.ts b/web/src/pages/admin-overview/charts/PolicyStatusChart.ts index cc586e0e1..5ce453b0c 100644 --- a/web/src/pages/admin-overview/charts/PolicyStatusChart.ts +++ b/web/src/pages/admin-overview/charts/PolicyStatusChart.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement } from "lit-element"; -import { PoliciesApi } from "authentik-api"; +import { PoliciesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import "../../../elements/forms/ConfirmationForm"; import { AKChart } from "../../../elements/charts/Chart"; diff --git a/web/src/pages/admin-overview/charts/UserCountStatusChart.ts b/web/src/pages/admin-overview/charts/UserCountStatusChart.ts index e27ba106b..484296365 100644 --- a/web/src/pages/admin-overview/charts/UserCountStatusChart.ts +++ b/web/src/pages/admin-overview/charts/UserCountStatusChart.ts @@ -1,5 +1,5 @@ import { customElement } from "lit-element"; -import { CoreApi } from "authentik-api"; +import { CoreApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { AKChart } from "../../../elements/charts/Chart"; import { t } from "@lingui/macro"; diff --git a/web/src/pages/applications/ApplicationCheckAccessForm.ts b/web/src/pages/applications/ApplicationCheckAccessForm.ts index a2b7fcb11..61072fce0 100644 --- a/web/src/pages/applications/ApplicationCheckAccessForm.ts +++ b/web/src/pages/applications/ApplicationCheckAccessForm.ts @@ -1,4 +1,4 @@ -import { Application, CoreApi, PolicyTestResult } from "authentik-api"; +import { Application, CoreApi, PolicyTestResult } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/applications/ApplicationForm.ts b/web/src/pages/applications/ApplicationForm.ts index 5f93f2e30..e7aab90a5 100644 --- a/web/src/pages/applications/ApplicationForm.ts +++ b/web/src/pages/applications/ApplicationForm.ts @@ -5,7 +5,7 @@ import { Provider, PolicyEngineMode, CapabilitiesEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { CSSResult, customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/applications/ApplicationListPage.ts b/web/src/pages/applications/ApplicationListPage.ts index aec042ae9..3a9b40b75 100644 --- a/web/src/pages/applications/ApplicationListPage.ts +++ b/web/src/pages/applications/ApplicationListPage.ts @@ -9,7 +9,7 @@ import "../../elements/forms/DeleteBulkForm"; import "../../elements/buttons/SpinnerButton"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { Application, CoreApi } from "authentik-api"; +import { Application, CoreApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "./ApplicationForm"; diff --git a/web/src/pages/applications/ApplicationViewPage.ts b/web/src/pages/applications/ApplicationViewPage.ts index c4bdd7261..4370c8387 100644 --- a/web/src/pages/applications/ApplicationViewPage.ts +++ b/web/src/pages/applications/ApplicationViewPage.ts @@ -10,7 +10,7 @@ import "../policies/BoundPoliciesList"; import "./ApplicationForm"; import "./ApplicationCheckAccessForm"; import "../../elements/PageHeader"; -import { Application, CoreApi } from "authentik-api"; +import { Application, CoreApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; diff --git a/web/src/pages/crypto/CertificateGenerateForm.ts b/web/src/pages/crypto/CertificateGenerateForm.ts index ff1296050..4404d88f0 100644 --- a/web/src/pages/crypto/CertificateGenerateForm.ts +++ b/web/src/pages/crypto/CertificateGenerateForm.ts @@ -1,4 +1,4 @@ -import { CertificateGenerationRequest, CertificateKeyPair, CryptoApi } from "authentik-api"; +import { CertificateGenerationRequest, CertificateKeyPair, CryptoApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/crypto/CertificateKeyPairForm.ts b/web/src/pages/crypto/CertificateKeyPairForm.ts index 8c110d620..9330b47f2 100644 --- a/web/src/pages/crypto/CertificateKeyPairForm.ts +++ b/web/src/pages/crypto/CertificateKeyPairForm.ts @@ -1,4 +1,4 @@ -import { CertificateKeyPair, CertificateKeyPairRequest, CryptoApi } from "authentik-api"; +import { CertificateKeyPair, CertificateKeyPairRequest, CryptoApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/crypto/CertificateKeyPairListPage.ts b/web/src/pages/crypto/CertificateKeyPairListPage.ts index e24189b2e..dbd5d666b 100644 --- a/web/src/pages/crypto/CertificateKeyPairListPage.ts +++ b/web/src/pages/crypto/CertificateKeyPairListPage.ts @@ -4,7 +4,7 @@ import { AKResponse } from "../../api/Client"; import { TablePage } from "../../elements/table/TablePage"; import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css"; -import { CryptoApi, CertificateKeyPair } from "authentik-api"; +import { CryptoApi, CertificateKeyPair } from "@goauthentik/api"; import "../../elements/forms/ModalForm"; import "../../elements/buttons/SpinnerButton"; diff --git a/web/src/pages/events/EventInfo.ts b/web/src/pages/events/EventInfo.ts index 179503b3c..5bb86ee8a 100644 --- a/web/src/pages/events/EventInfo.ts +++ b/web/src/pages/events/EventInfo.ts @@ -9,7 +9,7 @@ import { TemplateResult, } from "lit-element"; import { until } from "lit-html/directives/until"; -import { EventActions, FlowsApi } from "authentik-api"; +import { EventActions, FlowsApi } from "@goauthentik/api"; import "../../elements/Spinner"; import "../../elements/Expand"; import { PFSize } from "../../elements/Spinner"; diff --git a/web/src/pages/events/EventInfoPage.ts b/web/src/pages/events/EventInfoPage.ts index e5c91501c..254f14188 100644 --- a/web/src/pages/events/EventInfoPage.ts +++ b/web/src/pages/events/EventInfoPage.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { EventsApi } from "authentik-api"; +import { EventsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { EventWithContext } from "../../api/Events"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; diff --git a/web/src/pages/events/EventListPage.ts b/web/src/pages/events/EventListPage.ts index 998aa4b98..4d8c22126 100644 --- a/web/src/pages/events/EventListPage.ts +++ b/web/src/pages/events/EventListPage.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { Event, EventsApi } from "authentik-api"; +import { Event, EventsApi } from "@goauthentik/api"; import { AKResponse } from "../../api/Client"; import { DEFAULT_CONFIG } from "../../api/Config"; import { EventWithContext } from "../../api/Events"; diff --git a/web/src/pages/events/RuleForm.ts b/web/src/pages/events/RuleForm.ts index 294eff386..b7bbb495b 100644 --- a/web/src/pages/events/RuleForm.ts +++ b/web/src/pages/events/RuleForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, EventsApi, NotificationRule, SeverityEnum } from "authentik-api"; +import { CoreApi, EventsApi, NotificationRule, SeverityEnum } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/events/RuleListPage.ts b/web/src/pages/events/RuleListPage.ts index e3bacb7bb..5270627c8 100644 --- a/web/src/pages/events/RuleListPage.ts +++ b/web/src/pages/events/RuleListPage.ts @@ -8,7 +8,7 @@ import "../../elements/buttons/SpinnerButton"; import "../../elements/forms/ModalForm"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { EventsApi, NotificationRule } from "authentik-api"; +import { EventsApi, NotificationRule } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "../../elements/forms/DeleteBulkForm"; import "./RuleForm"; diff --git a/web/src/pages/events/TransportForm.ts b/web/src/pages/events/TransportForm.ts index e882df252..6be637f25 100644 --- a/web/src/pages/events/TransportForm.ts +++ b/web/src/pages/events/TransportForm.ts @@ -1,4 +1,4 @@ -import { EventsApi, NotificationTransport, NotificationTransportModeEnum } from "authentik-api"; +import { EventsApi, NotificationTransport, NotificationTransportModeEnum } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/events/TransportListPage.ts b/web/src/pages/events/TransportListPage.ts index cc6fba751..95a1a5bd0 100644 --- a/web/src/pages/events/TransportListPage.ts +++ b/web/src/pages/events/TransportListPage.ts @@ -8,7 +8,7 @@ import "../../elements/forms/ModalForm"; import "../../elements/buttons/SpinnerButton"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { EventsApi, NotificationTransport } from "authentik-api"; +import { EventsApi, NotificationTransport } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "../../elements/forms/DeleteBulkForm"; import "./TransportForm"; diff --git a/web/src/pages/events/utils.ts b/web/src/pages/events/utils.ts index eb521ceb2..2b18915e9 100644 --- a/web/src/pages/events/utils.ts +++ b/web/src/pages/events/utils.ts @@ -1,5 +1,5 @@ import { t } from "@lingui/macro"; -import { EventActions } from "authentik-api"; +import { EventActions } from "@goauthentik/api"; export function ActionToLabel(action?: EventActions): string { if (!action) return ""; diff --git a/web/src/pages/flows/BoundStagesList.ts b/web/src/pages/flows/BoundStagesList.ts index 35553e476..ab83c39c7 100644 --- a/web/src/pages/flows/BoundStagesList.ts +++ b/web/src/pages/flows/BoundStagesList.ts @@ -13,7 +13,7 @@ import "../../elements/buttons/Dropdown"; import "../policies/BoundPoliciesList"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { FlowsApi, FlowStageBinding, StagesApi } from "authentik-api"; +import { FlowsApi, FlowStageBinding, StagesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/flows/FlowDiagram.ts b/web/src/pages/flows/FlowDiagram.ts index e6a3acec0..f211b58c8 100644 --- a/web/src/pages/flows/FlowDiagram.ts +++ b/web/src/pages/flows/FlowDiagram.ts @@ -1,7 +1,7 @@ import { customElement, html, LitElement, property, TemplateResult } from "lit-element"; import FlowChart from "flowchart.js"; import { loading } from "../../utils"; -import { FlowsApi } from "authentik-api"; +import { FlowsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { EVENT_REFRESH } from "../../constants"; diff --git a/web/src/pages/flows/FlowForm.ts b/web/src/pages/flows/FlowForm.ts index 42d599632..f7d1222df 100644 --- a/web/src/pages/flows/FlowForm.ts +++ b/web/src/pages/flows/FlowForm.ts @@ -4,7 +4,7 @@ import { PolicyEngineMode, FlowsApi, CapabilitiesEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/flows/FlowImportForm.ts b/web/src/pages/flows/FlowImportForm.ts index 435216a0d..066a2e9ce 100644 --- a/web/src/pages/flows/FlowImportForm.ts +++ b/web/src/pages/flows/FlowImportForm.ts @@ -1,4 +1,4 @@ -import { Flow, FlowsApi } from "authentik-api"; +import { Flow, FlowsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/flows/FlowListPage.ts b/web/src/pages/flows/FlowListPage.ts index 2c7b75415..6096a0dcc 100644 --- a/web/src/pages/flows/FlowListPage.ts +++ b/web/src/pages/flows/FlowListPage.ts @@ -11,7 +11,7 @@ import "./FlowForm"; import "./FlowImportForm"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { Flow, FlowsApi } from "authentik-api"; +import { Flow, FlowsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-flow-list") diff --git a/web/src/pages/flows/FlowViewPage.ts b/web/src/pages/flows/FlowViewPage.ts index acbb4405a..d1e336ced 100644 --- a/web/src/pages/flows/FlowViewPage.ts +++ b/web/src/pages/flows/FlowViewPage.ts @@ -16,7 +16,7 @@ import "../../elements/buttons/SpinnerButton"; import "../policies/BoundPoliciesList"; import "./BoundStagesList"; import "./FlowDiagram"; -import { Flow, FlowsApi } from "authentik-api"; +import { Flow, FlowsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; diff --git a/web/src/pages/flows/StageBindingForm.ts b/web/src/pages/flows/StageBindingForm.ts index 1cf188668..cd6972170 100644 --- a/web/src/pages/flows/StageBindingForm.ts +++ b/web/src/pages/flows/StageBindingForm.ts @@ -5,7 +5,7 @@ import { PolicyEngineMode, Stage, StagesApi, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/groups/GroupForm.ts b/web/src/pages/groups/GroupForm.ts index 5b90a8c28..48e4a273c 100644 --- a/web/src/pages/groups/GroupForm.ts +++ b/web/src/pages/groups/GroupForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, Group, User } from "authentik-api"; +import { CoreApi, Group, User } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/groups/GroupListPage.ts b/web/src/pages/groups/GroupListPage.ts index 662811895..298e06837 100644 --- a/web/src/pages/groups/GroupListPage.ts +++ b/web/src/pages/groups/GroupListPage.ts @@ -7,7 +7,7 @@ import "../../elements/forms/DeleteBulkForm"; import "../../elements/buttons/SpinnerButton"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { CoreApi, Group } from "authentik-api"; +import { CoreApi, Group } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "../../elements/forms/ModalForm"; import "./GroupForm"; diff --git a/web/src/pages/groups/MemberSelectModal.ts b/web/src/pages/groups/MemberSelectModal.ts index 823f59a44..afcca4bfb 100644 --- a/web/src/pages/groups/MemberSelectModal.ts +++ b/web/src/pages/groups/MemberSelectModal.ts @@ -1,5 +1,5 @@ import { t } from "@lingui/macro"; -import { CoreApi, User } from "authentik-api"; +import { CoreApi, User } from "@goauthentik/api"; import { customElement, property } from "lit-element"; import { TemplateResult, html } from "lit-html"; import { AKResponse } from "../../api/Client"; diff --git a/web/src/pages/outposts/OutpostDeploymentModal.ts b/web/src/pages/outposts/OutpostDeploymentModal.ts index bb7c1bde4..fc6f67160 100644 --- a/web/src/pages/outposts/OutpostDeploymentModal.ts +++ b/web/src/pages/outposts/OutpostDeploymentModal.ts @@ -1,4 +1,4 @@ -import { Outpost } from "authentik-api"; +import { Outpost } from "@goauthentik/api"; import { customElement, html, property, TemplateResult } from "lit-element"; import { t } from "@lingui/macro"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/outposts/OutpostForm.ts b/web/src/pages/outposts/OutpostForm.ts index 5ef084d70..28a9725e5 100644 --- a/web/src/pages/outposts/OutpostForm.ts +++ b/web/src/pages/outposts/OutpostForm.ts @@ -1,4 +1,4 @@ -import { Outpost, OutpostsApi, OutpostTypeEnum, ProvidersApi } from "authentik-api"; +import { Outpost, OutpostsApi, OutpostTypeEnum, ProvidersApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/outposts/OutpostHealth.ts b/web/src/pages/outposts/OutpostHealth.ts index 888b58a91..bcaf172b4 100644 --- a/web/src/pages/outposts/OutpostHealth.ts +++ b/web/src/pages/outposts/OutpostHealth.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { OutpostHealth } from "authentik-api"; +import { OutpostHealth } from "@goauthentik/api"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import "../../elements/Spinner"; import AKGlobal from "../../authentik.css"; diff --git a/web/src/pages/outposts/OutpostHealthSimple.ts b/web/src/pages/outposts/OutpostHealthSimple.ts index 365aedf90..2d3ad1e2a 100644 --- a/web/src/pages/outposts/OutpostHealthSimple.ts +++ b/web/src/pages/outposts/OutpostHealthSimple.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { OutpostHealth, OutpostsApi } from "authentik-api"; +import { OutpostHealth, OutpostsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import "../../elements/Spinner"; diff --git a/web/src/pages/outposts/OutpostListPage.ts b/web/src/pages/outposts/OutpostListPage.ts index 486f428ab..467b7faa3 100644 --- a/web/src/pages/outposts/OutpostListPage.ts +++ b/web/src/pages/outposts/OutpostListPage.ts @@ -14,7 +14,7 @@ import "../../elements/buttons/SpinnerButton"; import "../../elements/forms/ModalForm"; import "../../elements/forms/DeleteBulkForm"; import { PAGE_SIZE } from "../../constants"; -import { Outpost, OutpostsApi } from "authentik-api"; +import { Outpost, OutpostsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; import { PFSize } from "../../elements/Spinner"; diff --git a/web/src/pages/outposts/ServiceConnectionDockerForm.ts b/web/src/pages/outposts/ServiceConnectionDockerForm.ts index d72c26cf4..542f0dee3 100644 --- a/web/src/pages/outposts/ServiceConnectionDockerForm.ts +++ b/web/src/pages/outposts/ServiceConnectionDockerForm.ts @@ -1,4 +1,4 @@ -import { CryptoApi, DockerServiceConnection, OutpostsApi } from "authentik-api"; +import { CryptoApi, DockerServiceConnection, OutpostsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/outposts/ServiceConnectionKubernetesForm.ts b/web/src/pages/outposts/ServiceConnectionKubernetesForm.ts index a2df09b3e..b02b42a8a 100644 --- a/web/src/pages/outposts/ServiceConnectionKubernetesForm.ts +++ b/web/src/pages/outposts/ServiceConnectionKubernetesForm.ts @@ -1,4 +1,4 @@ -import { KubernetesServiceConnection, OutpostsApi } from "authentik-api"; +import { KubernetesServiceConnection, OutpostsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/outposts/ServiceConnectionListPage.ts b/web/src/pages/outposts/ServiceConnectionListPage.ts index 8859330c1..ec7a0140b 100644 --- a/web/src/pages/outposts/ServiceConnectionListPage.ts +++ b/web/src/pages/outposts/ServiceConnectionListPage.ts @@ -14,7 +14,7 @@ import "./ServiceConnectionKubernetesForm"; import "./ServiceConnectionDockerForm"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { OutpostsApi, ServiceConnection } from "authentik-api"; +import { OutpostsApi, ServiceConnection } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "../../elements/forms/ProxyForm"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/policies/BoundPoliciesList.ts b/web/src/pages/policies/BoundPoliciesList.ts index 5a435b76d..a33b4f65f 100644 --- a/web/src/pages/policies/BoundPoliciesList.ts +++ b/web/src/pages/policies/BoundPoliciesList.ts @@ -2,7 +2,7 @@ import { t } from "@lingui/macro"; import { customElement, html, property, TemplateResult } from "lit-element"; import { AKResponse } from "../../api/Client"; import { Table, TableColumn } from "../../elements/table/Table"; -import { PoliciesApi, PolicyBinding } from "authentik-api"; +import { PoliciesApi, PolicyBinding } from "@goauthentik/api"; import "../../elements/forms/DeleteBulkForm"; import "../../elements/Tabs"; diff --git a/web/src/pages/policies/PolicyBindingForm.ts b/web/src/pages/policies/PolicyBindingForm.ts index b60ee28d6..0677c3656 100644 --- a/web/src/pages/policies/PolicyBindingForm.ts +++ b/web/src/pages/policies/PolicyBindingForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, PoliciesApi, Policy, PolicyBinding } from "authentik-api"; +import { CoreApi, PoliciesApi, Policy, PolicyBinding } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { css, CSSResult, customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/PolicyListPage.ts b/web/src/pages/policies/PolicyListPage.ts index 9723fdd9d..4068122da 100644 --- a/web/src/pages/policies/PolicyListPage.ts +++ b/web/src/pages/policies/PolicyListPage.ts @@ -13,7 +13,7 @@ import "./PolicyTestForm"; import { TableColumn } from "../../elements/table/Table"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { PoliciesApi, Policy } from "authentik-api"; +import { PoliciesApi, Policy } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; import "./dummy/DummyPolicyForm"; diff --git a/web/src/pages/policies/PolicyTestForm.ts b/web/src/pages/policies/PolicyTestForm.ts index f046720e2..65143c92a 100644 --- a/web/src/pages/policies/PolicyTestForm.ts +++ b/web/src/pages/policies/PolicyTestForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, PoliciesApi, Policy, PolicyTestRequest, PolicyTestResult } from "authentik-api"; +import { CoreApi, PoliciesApi, Policy, PolicyTestRequest, PolicyTestResult } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/dummy/DummyPolicyForm.ts b/web/src/pages/policies/dummy/DummyPolicyForm.ts index 9b06412f3..62051acac 100644 --- a/web/src/pages/policies/dummy/DummyPolicyForm.ts +++ b/web/src/pages/policies/dummy/DummyPolicyForm.ts @@ -1,4 +1,4 @@ -import { DummyPolicy, PoliciesApi } from "authentik-api"; +import { DummyPolicy, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/event_matcher/EventMatcherPolicyForm.ts b/web/src/pages/policies/event_matcher/EventMatcherPolicyForm.ts index f4dd088a9..9e0fb2e6c 100644 --- a/web/src/pages/policies/event_matcher/EventMatcherPolicyForm.ts +++ b/web/src/pages/policies/event_matcher/EventMatcherPolicyForm.ts @@ -1,4 +1,4 @@ -import { AdminApi, EventMatcherPolicy, EventsApi, PoliciesApi } from "authentik-api"; +import { AdminApi, EventMatcherPolicy, EventsApi, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/expiry/ExpiryPolicyForm.ts b/web/src/pages/policies/expiry/ExpiryPolicyForm.ts index de2ca39d4..adcead17a 100644 --- a/web/src/pages/policies/expiry/ExpiryPolicyForm.ts +++ b/web/src/pages/policies/expiry/ExpiryPolicyForm.ts @@ -1,4 +1,4 @@ -import { PasswordExpiryPolicy, PoliciesApi } from "authentik-api"; +import { PasswordExpiryPolicy, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/expression/ExpressionPolicyForm.ts b/web/src/pages/policies/expression/ExpressionPolicyForm.ts index 696990fa3..98dbad22a 100644 --- a/web/src/pages/policies/expression/ExpressionPolicyForm.ts +++ b/web/src/pages/policies/expression/ExpressionPolicyForm.ts @@ -1,4 +1,4 @@ -import { ExpressionPolicy, PoliciesApi } from "authentik-api"; +import { ExpressionPolicy, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/hibp/HaveIBeenPwnedPolicyForm.ts b/web/src/pages/policies/hibp/HaveIBeenPwnedPolicyForm.ts index 7ac557b0f..abdbd6ce0 100644 --- a/web/src/pages/policies/hibp/HaveIBeenPwnedPolicyForm.ts +++ b/web/src/pages/policies/hibp/HaveIBeenPwnedPolicyForm.ts @@ -1,4 +1,4 @@ -import { HaveIBeenPwendPolicy, PoliciesApi } from "authentik-api"; +import { HaveIBeenPwendPolicy, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/password/PasswordPolicyForm.ts b/web/src/pages/policies/password/PasswordPolicyForm.ts index 400398144..c60e6e8c8 100644 --- a/web/src/pages/policies/password/PasswordPolicyForm.ts +++ b/web/src/pages/policies/password/PasswordPolicyForm.ts @@ -1,4 +1,4 @@ -import { PasswordPolicy, PoliciesApi } from "authentik-api"; +import { PasswordPolicy, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/reputation/IPReputationListPage.ts b/web/src/pages/policies/reputation/IPReputationListPage.ts index 16cb45e65..223651dc3 100644 --- a/web/src/pages/policies/reputation/IPReputationListPage.ts +++ b/web/src/pages/policies/reputation/IPReputationListPage.ts @@ -9,7 +9,7 @@ import "../../../elements/forms/DeleteBulkForm"; import "../../../elements/forms/ModalForm"; import { TableColumn } from "../../../elements/table/Table"; import { PAGE_SIZE } from "../../../constants"; -import { IPReputation, PoliciesApi } from "authentik-api"; +import { IPReputation, PoliciesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; @customElement("ak-policy-reputation-ip-list") diff --git a/web/src/pages/policies/reputation/ReputationPolicyForm.ts b/web/src/pages/policies/reputation/ReputationPolicyForm.ts index d56b0f5da..e3330b6d5 100644 --- a/web/src/pages/policies/reputation/ReputationPolicyForm.ts +++ b/web/src/pages/policies/reputation/ReputationPolicyForm.ts @@ -1,4 +1,4 @@ -import { ReputationPolicy, PoliciesApi } from "authentik-api"; +import { ReputationPolicy, PoliciesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/policies/reputation/UserReputationListPage.ts b/web/src/pages/policies/reputation/UserReputationListPage.ts index f2e972a0f..826c5190d 100644 --- a/web/src/pages/policies/reputation/UserReputationListPage.ts +++ b/web/src/pages/policies/reputation/UserReputationListPage.ts @@ -9,7 +9,7 @@ import "../../../elements/forms/DeleteBulkForm"; import "../../../elements/forms/ModalForm"; import { TableColumn } from "../../../elements/table/Table"; import { PAGE_SIZE } from "../../../constants"; -import { UserReputation, PoliciesApi } from "authentik-api"; +import { UserReputation, PoliciesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; @customElement("ak-policy-reputation-user-list") diff --git a/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts b/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts index a784272de..2f666fdb3 100644 --- a/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingLDAPForm.ts @@ -1,4 +1,4 @@ -import { LDAPPropertyMapping, PropertymappingsApi } from "authentik-api"; +import { LDAPPropertyMapping, PropertymappingsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/property-mappings/PropertyMappingListPage.ts b/web/src/pages/property-mappings/PropertyMappingListPage.ts index 494198fbb..02284a962 100644 --- a/web/src/pages/property-mappings/PropertyMappingListPage.ts +++ b/web/src/pages/property-mappings/PropertyMappingListPage.ts @@ -15,7 +15,7 @@ import "./PropertyMappingSAMLForm"; import { TableColumn } from "../../elements/table/Table"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { PropertyMapping, PropertymappingsApi } from "authentik-api"; +import { PropertyMapping, PropertymappingsApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts b/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts index 7445c160b..423729f7f 100644 --- a/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingSAMLForm.ts @@ -1,4 +1,4 @@ -import { SAMLPropertyMapping, PropertymappingsApi } from "authentik-api"; +import { SAMLPropertyMapping, PropertymappingsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/property-mappings/PropertyMappingScopeForm.ts b/web/src/pages/property-mappings/PropertyMappingScopeForm.ts index a7f78132d..0783ec5f4 100644 --- a/web/src/pages/property-mappings/PropertyMappingScopeForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingScopeForm.ts @@ -1,4 +1,4 @@ -import { ScopeMapping, PropertymappingsApi } from "authentik-api"; +import { ScopeMapping, PropertymappingsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/property-mappings/PropertyMappingTestForm.ts b/web/src/pages/property-mappings/PropertyMappingTestForm.ts index 04fb84c97..ddc82a28e 100644 --- a/web/src/pages/property-mappings/PropertyMappingTestForm.ts +++ b/web/src/pages/property-mappings/PropertyMappingTestForm.ts @@ -4,7 +4,7 @@ import { PropertyMapping, PropertymappingsApi, PropertyMappingTestResult, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/providers/ProviderListPage.ts b/web/src/pages/providers/ProviderListPage.ts index beb461172..f1189233a 100644 --- a/web/src/pages/providers/ProviderListPage.ts +++ b/web/src/pages/providers/ProviderListPage.ts @@ -16,7 +16,7 @@ import "./saml/SAMLProviderImportForm"; import { TableColumn } from "../../elements/table/Table"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { Provider, ProvidersApi } from "authentik-api"; +import { Provider, ProvidersApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/providers/ProviderViewPage.ts b/web/src/pages/providers/ProviderViewPage.ts index b9a100f7d..f6cff18d9 100644 --- a/web/src/pages/providers/ProviderViewPage.ts +++ b/web/src/pages/providers/ProviderViewPage.ts @@ -8,7 +8,7 @@ import "./saml/SAMLProviderViewPage"; import "./oauth2/OAuth2ProviderViewPage"; import "./proxy/ProxyProviderViewPage"; import "./ldap/LDAPProviderViewPage"; -import { Provider, ProvidersApi } from "authentik-api"; +import { Provider, ProvidersApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/providers/RelatedApplicationButton.ts b/web/src/pages/providers/RelatedApplicationButton.ts index 5ef00783f..2e6574f6d 100644 --- a/web/src/pages/providers/RelatedApplicationButton.ts +++ b/web/src/pages/providers/RelatedApplicationButton.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { Provider } from "authentik-api"; +import { Provider } from "@goauthentik/api"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; diff --git a/web/src/pages/providers/ldap/LDAPProviderForm.ts b/web/src/pages/providers/ldap/LDAPProviderForm.ts index 2ed02dd49..4a792e6c8 100644 --- a/web/src/pages/providers/ldap/LDAPProviderForm.ts +++ b/web/src/pages/providers/ldap/LDAPProviderForm.ts @@ -5,7 +5,7 @@ import { CoreApi, FlowsInstancesListDesignationEnum, CryptoApi, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/providers/ldap/LDAPProviderViewPage.ts b/web/src/pages/providers/ldap/LDAPProviderViewPage.ts index 122cb7568..e5f3a8461 100644 --- a/web/src/pages/providers/ldap/LDAPProviderViewPage.ts +++ b/web/src/pages/providers/ldap/LDAPProviderViewPage.ts @@ -19,7 +19,7 @@ import "../../../elements/Tabs"; import "../../../elements/events/ObjectChangelog"; import "../RelatedApplicationButton"; import "./LDAPProviderForm"; -import { ProvidersApi, LDAPProvider } from "authentik-api"; +import { ProvidersApi, LDAPProvider } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; diff --git a/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts b/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts index 3b9d1aa57..882b6d462 100644 --- a/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts +++ b/web/src/pages/providers/oauth2/OAuth2ProviderForm.ts @@ -9,7 +9,7 @@ import { PropertymappingsApi, ProvidersApi, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts b/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts index 7c4989b74..db23a1b83 100644 --- a/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts +++ b/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts @@ -22,7 +22,7 @@ import "../../../elements/events/ObjectChangelog"; import "../RelatedApplicationButton"; import "./OAuth2ProviderForm"; import { convertToTitle } from "../../../utils"; -import { OAuth2Provider, OAuth2ProviderSetupURLs, ProvidersApi } from "authentik-api"; +import { OAuth2Provider, OAuth2ProviderSetupURLs, ProvidersApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; diff --git a/web/src/pages/providers/proxy/ProxyProviderForm.ts b/web/src/pages/providers/proxy/ProxyProviderForm.ts index dd60b3b94..4bc9a4e08 100644 --- a/web/src/pages/providers/proxy/ProxyProviderForm.ts +++ b/web/src/pages/providers/proxy/ProxyProviderForm.ts @@ -5,7 +5,7 @@ import { ProvidersApi, ProxyMode, ProxyProvider, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { css, CSSResult, customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/providers/proxy/ProxyProviderViewPage.ts b/web/src/pages/providers/proxy/ProxyProviderViewPage.ts index 226edd366..830050925 100644 --- a/web/src/pages/providers/proxy/ProxyProviderViewPage.ts +++ b/web/src/pages/providers/proxy/ProxyProviderViewPage.ts @@ -17,7 +17,7 @@ import "../../../elements/Tabs"; import "../../../elements/events/ObjectChangelog"; import "../RelatedApplicationButton"; import "./ProxyProviderForm"; -import { ProvidersApi, ProxyProvider } from "authentik-api"; +import { ProvidersApi, ProxyProvider } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; import { convertToTitle } from "../../../utils"; diff --git a/web/src/pages/providers/saml/SAMLProviderForm.ts b/web/src/pages/providers/saml/SAMLProviderForm.ts index 2082d86b6..135e2960d 100644 --- a/web/src/pages/providers/saml/SAMLProviderForm.ts +++ b/web/src/pages/providers/saml/SAMLProviderForm.ts @@ -8,7 +8,7 @@ import { DigestAlgorithmEnum, SignatureAlgorithmEnum, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/providers/saml/SAMLProviderImportForm.ts b/web/src/pages/providers/saml/SAMLProviderImportForm.ts index 5e5646b83..09ad4d787 100644 --- a/web/src/pages/providers/saml/SAMLProviderImportForm.ts +++ b/web/src/pages/providers/saml/SAMLProviderImportForm.ts @@ -3,7 +3,7 @@ import { FlowsInstancesListDesignationEnum, ProvidersApi, SAMLProvider, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/providers/saml/SAMLProviderViewPage.ts b/web/src/pages/providers/saml/SAMLProviderViewPage.ts index 98e25d18f..122304964 100644 --- a/web/src/pages/providers/saml/SAMLProviderViewPage.ts +++ b/web/src/pages/providers/saml/SAMLProviderViewPage.ts @@ -21,7 +21,7 @@ import "../../../elements/Tabs"; import "../../../elements/events/ObjectChangelog"; import "../RelatedApplicationButton"; import "./SAMLProviderForm"; -import { ProvidersApi, SAMLProvider } from "authentik-api"; +import { ProvidersApi, SAMLProvider } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/sources/SourceViewPage.ts b/web/src/pages/sources/SourceViewPage.ts index c65dedbbf..3c7e86cf2 100644 --- a/web/src/pages/sources/SourceViewPage.ts +++ b/web/src/pages/sources/SourceViewPage.ts @@ -1,5 +1,5 @@ import { customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { Source, SourcesApi } from "authentik-api"; +import { Source, SourcesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "../../elements/buttons/SpinnerButton"; diff --git a/web/src/pages/sources/SourcesListPage.ts b/web/src/pages/sources/SourcesListPage.ts index d952fe0bf..7d750e6b0 100644 --- a/web/src/pages/sources/SourcesListPage.ts +++ b/web/src/pages/sources/SourcesListPage.ts @@ -11,7 +11,7 @@ import "../../elements/forms/ModalForm"; import "../../elements/forms/ProxyForm"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { Source, SourcesApi } from "authentik-api"; +import { Source, SourcesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; import "./ldap/LDAPSourceForm"; diff --git a/web/src/pages/sources/ldap/LDAPSourceForm.ts b/web/src/pages/sources/ldap/LDAPSourceForm.ts index 84dde8e6a..f468f88c9 100644 --- a/web/src/pages/sources/ldap/LDAPSourceForm.ts +++ b/web/src/pages/sources/ldap/LDAPSourceForm.ts @@ -1,4 +1,4 @@ -import { LDAPSource, SourcesApi, PropertymappingsApi, LDAPSourceRequest } from "authentik-api"; +import { LDAPSource, SourcesApi, PropertymappingsApi, LDAPSourceRequest } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/sources/ldap/LDAPSourceViewPage.ts b/web/src/pages/sources/ldap/LDAPSourceViewPage.ts index 54e8b8ab5..f2a57f7f9 100644 --- a/web/src/pages/sources/ldap/LDAPSourceViewPage.ts +++ b/web/src/pages/sources/ldap/LDAPSourceViewPage.ts @@ -21,7 +21,7 @@ import "../../../elements/events/ObjectChangelog"; import "../../../elements/forms/ModalForm"; import "./LDAPSourceForm"; import { until } from "lit-html/directives/until"; -import { LDAPSource, SourcesApi, StatusEnum } from "authentik-api"; +import { LDAPSource, SourcesApi, StatusEnum } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; diff --git a/web/src/pages/sources/oauth/OAuthSourceForm.ts b/web/src/pages/sources/oauth/OAuthSourceForm.ts index 0e4a9dc07..9bc4cc71c 100644 --- a/web/src/pages/sources/oauth/OAuthSourceForm.ts +++ b/web/src/pages/sources/oauth/OAuthSourceForm.ts @@ -5,7 +5,7 @@ import { UserMatchingModeEnum, OAuthSourceRequest, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/sources/oauth/OAuthSourceViewPage.ts b/web/src/pages/sources/oauth/OAuthSourceViewPage.ts index 90f07505a..02df2a598 100644 --- a/web/src/pages/sources/oauth/OAuthSourceViewPage.ts +++ b/web/src/pages/sources/oauth/OAuthSourceViewPage.ts @@ -20,7 +20,7 @@ import "../../../elements/events/ObjectChangelog"; import "../../../elements/forms/ModalForm"; import "../../policies/BoundPoliciesList"; import "./OAuthSourceForm"; -import { OAuthSource, SourcesApi } from "authentik-api"; +import { OAuthSource, SourcesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; diff --git a/web/src/pages/sources/plex/PlexSourceForm.ts b/web/src/pages/sources/plex/PlexSourceForm.ts index f4f65e384..702fc1b3b 100644 --- a/web/src/pages/sources/plex/PlexSourceForm.ts +++ b/web/src/pages/sources/plex/PlexSourceForm.ts @@ -4,7 +4,7 @@ import { FlowsApi, UserMatchingModeEnum, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/sources/plex/PlexSourceViewPage.ts b/web/src/pages/sources/plex/PlexSourceViewPage.ts index 2a8dd08ab..68ca2ea22 100644 --- a/web/src/pages/sources/plex/PlexSourceViewPage.ts +++ b/web/src/pages/sources/plex/PlexSourceViewPage.ts @@ -20,7 +20,7 @@ import "../../../elements/events/ObjectChangelog"; import "../../../elements/forms/ModalForm"; import "../../policies/BoundPoliciesList"; import "./PlexSourceForm"; -import { PlexSource, SourcesApi } from "authentik-api"; +import { PlexSource, SourcesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; diff --git a/web/src/pages/sources/saml/SAMLSourceForm.ts b/web/src/pages/sources/saml/SAMLSourceForm.ts index b2b3d2c8a..0a171dd67 100644 --- a/web/src/pages/sources/saml/SAMLSourceForm.ts +++ b/web/src/pages/sources/saml/SAMLSourceForm.ts @@ -8,7 +8,7 @@ import { SignatureAlgorithmEnum, FlowsApi, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/sources/saml/SAMLSourceViewPage.ts b/web/src/pages/sources/saml/SAMLSourceViewPage.ts index c7b1ccede..a2d9619c0 100644 --- a/web/src/pages/sources/saml/SAMLSourceViewPage.ts +++ b/web/src/pages/sources/saml/SAMLSourceViewPage.ts @@ -21,7 +21,7 @@ import "../../../elements/events/ObjectChangelog"; import "../../../elements/forms/ModalForm"; import "../../policies/BoundPoliciesList"; import "./SAMLSourceForm"; -import { SAMLSource, SourcesApi } from "authentik-api"; +import { SAMLSource, SourcesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { EVENT_REFRESH } from "../../../constants"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/stages/StageListPage.ts b/web/src/pages/stages/StageListPage.ts index 560c432af..298ce5b07 100644 --- a/web/src/pages/stages/StageListPage.ts +++ b/web/src/pages/stages/StageListPage.ts @@ -11,7 +11,7 @@ import "../../elements/forms/ProxyForm"; import "../../elements/forms/ModalForm"; import { until } from "lit-html/directives/until"; import { PAGE_SIZE } from "../../constants"; -import { Stage, StagesApi } from "authentik-api"; +import { Stage, StagesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts b/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts index c842618ba..abb387049 100644 --- a/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts +++ b/web/src/pages/stages/authenticator_duo/AuthenticatorDuoStageForm.ts @@ -4,7 +4,7 @@ import { StagesApi, FlowsInstancesListDesignationEnum, AuthenticatorDuoStageRequest, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts b/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts index 12ea893a7..f87434578 100644 --- a/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts +++ b/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts @@ -3,7 +3,7 @@ import { AuthenticatorStaticStage, StagesApi, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts b/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts index 2419b225a..6b2c230a5 100644 --- a/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts +++ b/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts @@ -3,7 +3,7 @@ import { AuthenticatorTOTPStage, StagesApi, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts b/web/src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts index 73fe51fc6..3888ccfda 100644 --- a/web/src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts +++ b/web/src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts @@ -3,7 +3,7 @@ import { NotConfiguredActionEnum, DeviceClassesEnum, StagesApi, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/authenticator_webauthn/AuthenticateWebAuthnStageForm.ts b/web/src/pages/stages/authenticator_webauthn/AuthenticateWebAuthnStageForm.ts index e5130ab03..9bec8fc4e 100644 --- a/web/src/pages/stages/authenticator_webauthn/AuthenticateWebAuthnStageForm.ts +++ b/web/src/pages/stages/authenticator_webauthn/AuthenticateWebAuthnStageForm.ts @@ -1,4 +1,4 @@ -import { AuthenticateWebAuthnStage, StagesApi } from "authentik-api"; +import { AuthenticateWebAuthnStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/captcha/CaptchaStageForm.ts b/web/src/pages/stages/captcha/CaptchaStageForm.ts index d12689f34..95d2a4d31 100644 --- a/web/src/pages/stages/captcha/CaptchaStageForm.ts +++ b/web/src/pages/stages/captcha/CaptchaStageForm.ts @@ -1,4 +1,4 @@ -import { CaptchaStage, CaptchaStageRequest, StagesApi } from "authentik-api"; +import { CaptchaStage, CaptchaStageRequest, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/consent/ConsentStageForm.ts b/web/src/pages/stages/consent/ConsentStageForm.ts index bb1089f1b..3b89b7e04 100644 --- a/web/src/pages/stages/consent/ConsentStageForm.ts +++ b/web/src/pages/stages/consent/ConsentStageForm.ts @@ -1,4 +1,4 @@ -import { ConsentStage, ConsentStageModeEnum, StagesApi } from "authentik-api"; +import { ConsentStage, ConsentStageModeEnum, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/deny/DenyStageForm.ts b/web/src/pages/stages/deny/DenyStageForm.ts index 4a995a462..e06b88bbf 100644 --- a/web/src/pages/stages/deny/DenyStageForm.ts +++ b/web/src/pages/stages/deny/DenyStageForm.ts @@ -1,4 +1,4 @@ -import { DenyStage, StagesApi } from "authentik-api"; +import { DenyStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/dummy/DummyStageForm.ts b/web/src/pages/stages/dummy/DummyStageForm.ts index f3c177b72..425651e82 100644 --- a/web/src/pages/stages/dummy/DummyStageForm.ts +++ b/web/src/pages/stages/dummy/DummyStageForm.ts @@ -1,4 +1,4 @@ -import { DummyStage, StagesApi } from "authentik-api"; +import { DummyStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/email/EmailStageForm.ts b/web/src/pages/stages/email/EmailStageForm.ts index 751bceee3..6176021c9 100644 --- a/web/src/pages/stages/email/EmailStageForm.ts +++ b/web/src/pages/stages/email/EmailStageForm.ts @@ -1,4 +1,4 @@ -import { EmailStage, StagesApi } from "authentik-api"; +import { EmailStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/identification/IdentificationStageForm.ts b/web/src/pages/stages/identification/IdentificationStageForm.ts index 9d42f05ba..dd9b67097 100644 --- a/web/src/pages/stages/identification/IdentificationStageForm.ts +++ b/web/src/pages/stages/identification/IdentificationStageForm.ts @@ -5,7 +5,7 @@ import { StagesApi, FlowsInstancesListDesignationEnum, SourcesApi, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/invitation/InvitationForm.ts b/web/src/pages/stages/invitation/InvitationForm.ts index c33c0f79c..91708c770 100644 --- a/web/src/pages/stages/invitation/InvitationForm.ts +++ b/web/src/pages/stages/invitation/InvitationForm.ts @@ -1,4 +1,4 @@ -import { Invitation, StagesApi } from "authentik-api"; +import { Invitation, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/invitation/InvitationListLink.ts b/web/src/pages/stages/invitation/InvitationListLink.ts index 1506d41fb..8ff9c8682 100644 --- a/web/src/pages/stages/invitation/InvitationListLink.ts +++ b/web/src/pages/stages/invitation/InvitationListLink.ts @@ -6,7 +6,7 @@ import PFFormControl from "@patternfly/patternfly/components/FormControl/form-co import AKGlobal from "../../../authentik.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css"; -import { FlowsApi, FlowsInstancesListDesignationEnum } from "authentik-api"; +import { FlowsApi, FlowsInstancesListDesignationEnum } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css"; diff --git a/web/src/pages/stages/invitation/InvitationListPage.ts b/web/src/pages/stages/invitation/InvitationListPage.ts index 427bd42b6..2e6ed1dd3 100644 --- a/web/src/pages/stages/invitation/InvitationListPage.ts +++ b/web/src/pages/stages/invitation/InvitationListPage.ts @@ -11,7 +11,7 @@ import "./InvitationForm"; import "./InvitationListLink"; import { TableColumn } from "../../../elements/table/Table"; import { PAGE_SIZE } from "../../../constants"; -import { Invitation, StagesApi } from "authentik-api"; +import { Invitation, StagesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; @customElement("ak-stage-invitation-list") diff --git a/web/src/pages/stages/invitation/InvitationStageForm.ts b/web/src/pages/stages/invitation/InvitationStageForm.ts index 5b3b9909e..d2625e575 100644 --- a/web/src/pages/stages/invitation/InvitationStageForm.ts +++ b/web/src/pages/stages/invitation/InvitationStageForm.ts @@ -1,4 +1,4 @@ -import { InvitationStage, StagesApi } from "authentik-api"; +import { InvitationStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/password/PasswordStageForm.ts b/web/src/pages/stages/password/PasswordStageForm.ts index 1c4070acf..07152dfc4 100644 --- a/web/src/pages/stages/password/PasswordStageForm.ts +++ b/web/src/pages/stages/password/PasswordStageForm.ts @@ -4,7 +4,7 @@ import { BackendsEnum, StagesApi, FlowsInstancesListDesignationEnum, -} from "authentik-api"; +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/prompt/PromptForm.ts b/web/src/pages/stages/prompt/PromptForm.ts index fd67ea842..7fafebab7 100644 --- a/web/src/pages/stages/prompt/PromptForm.ts +++ b/web/src/pages/stages/prompt/PromptForm.ts @@ -1,4 +1,4 @@ -import { Prompt, PromptTypeEnum, StagesApi } from "authentik-api"; +import { Prompt, PromptTypeEnum, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/prompt/PromptListPage.ts b/web/src/pages/stages/prompt/PromptListPage.ts index 0d9110b99..640ac29d5 100644 --- a/web/src/pages/stages/prompt/PromptListPage.ts +++ b/web/src/pages/stages/prompt/PromptListPage.ts @@ -10,7 +10,7 @@ import "../../../elements/forms/ModalForm"; import "./PromptForm"; import { TableColumn } from "../../../elements/table/Table"; import { PAGE_SIZE } from "../../../constants"; -import { Prompt, StagesApi } from "authentik-api"; +import { Prompt, StagesApi } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; @customElement("ak-stage-prompt-list") diff --git a/web/src/pages/stages/prompt/PromptStageForm.ts b/web/src/pages/stages/prompt/PromptStageForm.ts index 3d4fe2c00..b74d8c576 100644 --- a/web/src/pages/stages/prompt/PromptStageForm.ts +++ b/web/src/pages/stages/prompt/PromptStageForm.ts @@ -1,4 +1,4 @@ -import { PoliciesApi, PromptStage, StagesApi } from "authentik-api"; +import { PoliciesApi, PromptStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/user_delete/UserDeleteStageForm.ts b/web/src/pages/stages/user_delete/UserDeleteStageForm.ts index 0bb36efbc..4cbc30b4e 100644 --- a/web/src/pages/stages/user_delete/UserDeleteStageForm.ts +++ b/web/src/pages/stages/user_delete/UserDeleteStageForm.ts @@ -1,4 +1,4 @@ -import { UserDeleteStage, StagesApi } from "authentik-api"; +import { UserDeleteStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/user_login/UserLoginStageForm.ts b/web/src/pages/stages/user_login/UserLoginStageForm.ts index ed88f99d0..2c0ac3ee6 100644 --- a/web/src/pages/stages/user_login/UserLoginStageForm.ts +++ b/web/src/pages/stages/user_login/UserLoginStageForm.ts @@ -1,4 +1,4 @@ -import { UserLoginStage, StagesApi } from "authentik-api"; +import { UserLoginStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/user_logout/UserLogoutStageForm.ts b/web/src/pages/stages/user_logout/UserLogoutStageForm.ts index bdc23f142..5c2dcd7c4 100644 --- a/web/src/pages/stages/user_logout/UserLogoutStageForm.ts +++ b/web/src/pages/stages/user_logout/UserLogoutStageForm.ts @@ -1,4 +1,4 @@ -import { UserLogoutStage, StagesApi } from "authentik-api"; +import { UserLogoutStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/stages/user_write/UserWriteStageForm.ts b/web/src/pages/stages/user_write/UserWriteStageForm.ts index e9107aee4..402b05bb5 100644 --- a/web/src/pages/stages/user_write/UserWriteStageForm.ts +++ b/web/src/pages/stages/user_write/UserWriteStageForm.ts @@ -1,4 +1,4 @@ -import { UserWriteStage, StagesApi } from "authentik-api"; +import { UserWriteStage, StagesApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/system-tasks/SystemTaskListPage.ts b/web/src/pages/system-tasks/SystemTaskListPage.ts index da45200b5..9412c839b 100644 --- a/web/src/pages/system-tasks/SystemTaskListPage.ts +++ b/web/src/pages/system-tasks/SystemTaskListPage.ts @@ -7,7 +7,7 @@ import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList import "../../elements/buttons/SpinnerButton"; import "../../elements/buttons/ActionButton"; import { TableColumn } from "../../elements/table/Table"; -import { AdminApi, Task, StatusEnum } from "authentik-api"; +import { AdminApi, Task, StatusEnum } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { PFColor } from "../../elements/Label"; diff --git a/web/src/pages/tenants/TenantForm.ts b/web/src/pages/tenants/TenantForm.ts index 2a70a1b0f..a73ee3fa8 100644 --- a/web/src/pages/tenants/TenantForm.ts +++ b/web/src/pages/tenants/TenantForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, FlowsApi, FlowsInstancesListDesignationEnum, Tenant } from "authentik-api"; +import { CoreApi, FlowsApi, FlowsInstancesListDesignationEnum, Tenant } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/tenants/TenantListPage.ts b/web/src/pages/tenants/TenantListPage.ts index 720793b0b..c93ad291f 100644 --- a/web/src/pages/tenants/TenantListPage.ts +++ b/web/src/pages/tenants/TenantListPage.ts @@ -7,7 +7,7 @@ import "../../elements/forms/DeleteBulkForm"; import "../../elements/buttons/SpinnerButton"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { CoreApi, Tenant } from "authentik-api"; +import { CoreApi, Tenant } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import "../../elements/forms/ModalForm"; import "./TenantForm"; diff --git a/web/src/pages/tokens/TokenListPage.ts b/web/src/pages/tokens/TokenListPage.ts index a2f77c3d2..cec399447 100644 --- a/web/src/pages/tokens/TokenListPage.ts +++ b/web/src/pages/tokens/TokenListPage.ts @@ -8,7 +8,7 @@ import "../../elements/buttons/TokenCopyButton"; import "../../elements/forms/DeleteBulkForm"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { CoreApi, Token } from "authentik-api"; +import { CoreApi, Token } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; @customElement("ak-token-list") diff --git a/web/src/pages/user-settings/UserSelfForm.ts b/web/src/pages/user-settings/UserSelfForm.ts index 2fa33a9c9..ffacc10f6 100644 --- a/web/src/pages/user-settings/UserSelfForm.ts +++ b/web/src/pages/user-settings/UserSelfForm.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { customElement, html, TemplateResult } from "lit-element"; -import { CoreApi, UserSelf } from "authentik-api"; +import { CoreApi, UserSelf } from "@goauthentik/api"; import { ifDefined } from "lit-html/directives/if-defined"; import { DEFAULT_CONFIG, tenant } from "../../api/Config"; import "../../elements/forms/FormElement"; diff --git a/web/src/pages/user-settings/UserSettingsPage.ts b/web/src/pages/user-settings/UserSettingsPage.ts index 9784f2ef4..c24fc7f59 100644 --- a/web/src/pages/user-settings/UserSettingsPage.ts +++ b/web/src/pages/user-settings/UserSettingsPage.ts @@ -13,7 +13,7 @@ import AKGlobal from "../../authentik.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFForm from "@patternfly/patternfly/components/Form/form.css"; import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css"; -import { SourcesApi, StagesApi, UserSetting } from "authentik-api"; +import { SourcesApi, StagesApi, UserSetting } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { until } from "lit-html/directives/until"; import { ifDefined } from "lit-html/directives/if-defined"; diff --git a/web/src/pages/user-settings/settings/SourceSettingsOAuth.ts b/web/src/pages/user-settings/settings/SourceSettingsOAuth.ts index b64b36922..500b2bfd7 100644 --- a/web/src/pages/user-settings/settings/SourceSettingsOAuth.ts +++ b/web/src/pages/user-settings/settings/SourceSettingsOAuth.ts @@ -1,6 +1,6 @@ import { customElement, html, property, TemplateResult } from "lit-element"; import { BaseUserSettings } from "./BaseUserSettings"; -import { SourcesApi } from "authentik-api"; +import { SourcesApi } from "@goauthentik/api"; import { until } from "lit-html/directives/until"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { t } from "@lingui/macro"; diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts index da01fa963..86f34c66b 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts @@ -1,4 +1,4 @@ -import { AuthenticatorsApi } from "authentik-api"; +import { AuthenticatorsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, html, TemplateResult } from "lit-element"; import { until } from "lit-html/directives/until"; diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts index 902ddab38..077980a92 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts @@ -1,4 +1,4 @@ -import { AuthenticatorsApi } from "authentik-api"; +import { AuthenticatorsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { CSSResult, customElement, html, TemplateResult } from "lit-element"; import { until } from "lit-html/directives/until"; diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts index a79feb050..827973df1 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts @@ -1,4 +1,4 @@ -import { AuthenticatorsApi } from "authentik-api"; +import { AuthenticatorsApi } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, html, TemplateResult } from "lit-element"; import { until } from "lit-html/directives/until"; diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts index f03f9f6f3..eda60bb0f 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts @@ -1,6 +1,6 @@ import { CSSResult, customElement, html, TemplateResult } from "lit-element"; import { t } from "@lingui/macro"; -import { AuthenticatorsApi, WebAuthnDevice } from "authentik-api"; +import { AuthenticatorsApi, WebAuthnDevice } from "@goauthentik/api"; import { until } from "lit-html/directives/until"; import { DEFAULT_CONFIG } from "../../../api/Config"; import { BaseUserSettings } from "./BaseUserSettings"; diff --git a/web/src/pages/user-settings/tokens/UserTokenForm.ts b/web/src/pages/user-settings/tokens/UserTokenForm.ts index 62e9a6a3e..68a035d7a 100644 --- a/web/src/pages/user-settings/tokens/UserTokenForm.ts +++ b/web/src/pages/user-settings/tokens/UserTokenForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, Token } from "authentik-api"; +import { CoreApi, Token } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/user-settings/tokens/UserTokenList.ts b/web/src/pages/user-settings/tokens/UserTokenList.ts index 81bd4fc90..2b542d32b 100644 --- a/web/src/pages/user-settings/tokens/UserTokenList.ts +++ b/web/src/pages/user-settings/tokens/UserTokenList.ts @@ -10,7 +10,7 @@ import "../../../elements/buttons/Dropdown"; import "../../../elements/buttons/TokenCopyButton"; import { Table, TableColumn } from "../../../elements/table/Table"; import { PAGE_SIZE } from "../../../constants"; -import { CoreApi, Token } from "authentik-api"; +import { CoreApi, Token } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../../api/Config"; import "./UserTokenForm"; diff --git a/web/src/pages/users/GroupSelectModal.ts b/web/src/pages/users/GroupSelectModal.ts index 92b993d06..8762d3241 100644 --- a/web/src/pages/users/GroupSelectModal.ts +++ b/web/src/pages/users/GroupSelectModal.ts @@ -1,5 +1,5 @@ import { t } from "@lingui/macro"; -import { CoreApi, Group } from "authentik-api"; +import { CoreApi, Group } from "@goauthentik/api"; import { customElement, property } from "lit-element"; import { TemplateResult, html } from "lit-html"; import { AKResponse } from "../../api/Client"; diff --git a/web/src/pages/users/UserForm.ts b/web/src/pages/users/UserForm.ts index 99ca087d3..98ed0be80 100644 --- a/web/src/pages/users/UserForm.ts +++ b/web/src/pages/users/UserForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, Group, User } from "authentik-api"; +import { CoreApi, Group, User } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/users/UserListPage.ts b/web/src/pages/users/UserListPage.ts index dfa31640c..de1a1041d 100644 --- a/web/src/pages/users/UserListPage.ts +++ b/web/src/pages/users/UserListPage.ts @@ -8,7 +8,7 @@ import "../../elements/forms/ModalForm"; import "../../elements/buttons/ActionButton"; import { TableColumn } from "../../elements/table/Table"; import { PAGE_SIZE } from "../../constants"; -import { CoreApi, User } from "authentik-api"; +import { CoreApi, User } from "@goauthentik/api"; import { DEFAULT_CONFIG, tenant } from "../../api/Config"; import "../../elements/forms/DeleteBulkForm"; import "./UserActiveForm"; diff --git a/web/src/pages/users/UserResetEmailForm.ts b/web/src/pages/users/UserResetEmailForm.ts index e4915a9f7..beb3b557c 100644 --- a/web/src/pages/users/UserResetEmailForm.ts +++ b/web/src/pages/users/UserResetEmailForm.ts @@ -1,4 +1,4 @@ -import { CoreApi, CoreUsersRecoveryEmailRetrieveRequest, StagesApi, User } from "authentik-api"; +import { CoreApi, CoreUsersRecoveryEmailRetrieveRequest, StagesApi, User } from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; diff --git a/web/src/pages/users/UserViewPage.ts b/web/src/pages/users/UserViewPage.ts index 94b6a1c6f..52761d3f4 100644 --- a/web/src/pages/users/UserViewPage.ts +++ b/web/src/pages/users/UserViewPage.ts @@ -27,7 +27,7 @@ import "../../elements/Tabs"; import "../../elements/user/SessionList"; import "../../elements/user/UserConsentList"; import "./UserForm"; -import { CoreApi, User } from "authentik-api"; +import { CoreApi, User } from "@goauthentik/api"; import { DEFAULT_CONFIG } from "../../api/Config"; import { EVENT_REFRESH } from "../../constants"; import { showMessage } from "../../elements/messages/MessageContainer"; From 14fb0c3d612717de1f7d77e307cdf22e9998c492 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 15 Aug 2021 21:48:18 +0200 Subject: [PATCH 04/12] web: cleanup Signed-off-by: Jens Langhammer --- .github/workflows/web-api-publish.yml | 1 + web/package-lock.json | 33 +----------------------- web/rollup.config.js | 29 --------------------- web/src/api/Config.ts | 2 +- web/src/elements/PageHeader.ts | 2 +- web/src/pages/policies/PolicyTestForm.ts | 8 +++++- 6 files changed, 11 insertions(+), 64 deletions(-) diff --git a/.github/workflows/web-api-publish.yml b/.github/workflows/web-api-publish.yml index 5a7750a3c..eceaf581c 100644 --- a/.github/workflows/web-api-publish.yml +++ b/.github/workflows/web-api-publish.yml @@ -17,6 +17,7 @@ jobs: - run: make gen-web - run: | cd web/api/ + npm run build npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/web/package-lock.json b/web/package-lock.json index 239c35849..b3e06bf3e 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -33,7 +33,6 @@ "@typescript-eslint/eslint-plugin": "^4.29.1", "@typescript-eslint/parser": "^4.29.1", "@webcomponents/webcomponentsjs": "^2.6.0", - "authentik-api": "file:api", "babel-plugin-macros": "^3.1.0", "base64-js": "^1.5.1", "chart.js": "^3.5.0", @@ -69,23 +68,11 @@ "api": { "name": "authentik-api", "version": "1.0.0", + "extraneous": true, "devDependencies": { "typescript": "^3.9.5" } }, - "api/node_modules/typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/@apitools/openapi-parser": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/@apitools/openapi-parser/-/openapi-parser-0.0.7.tgz", @@ -2994,10 +2981,6 @@ "node": ">= 4.5.0" } }, - "node_modules/authentik-api": { - "resolved": "api", - "link": true - }, "node_modules/babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -10233,20 +10216,6 @@ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" }, - "authentik-api": { - "version": "file:api", - "requires": { - "typescript": "^3.9.5" - }, - "dependencies": { - "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true - } - } - }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", diff --git a/web/rollup.config.js b/web/rollup.config.js index 8d1d60e26..259203f8a 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -2,7 +2,6 @@ import resolve from "rollup-plugin-node-resolve"; import commonjs from "rollup-plugin-commonjs"; import { terser } from "rollup-plugin-terser"; import sourcemaps from "rollup-plugin-sourcemaps"; -import typescript from "@rollup/plugin-typescript"; import cssimport from "rollup-plugin-cssimport"; import copy from "rollup-plugin-copy"; import babel from "@rollup/plugin-babel"; @@ -47,9 +46,6 @@ const resources = [ const isProdBuild = process.env.NODE_ENV === "production"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function manualChunks(id) { - if (id.endsWith("web/api/dist/index.js")) { - return "api"; - } if (id.includes("locales")) { const parts = id.split("/"); const file = parts[parts.length - 1]; @@ -64,31 +60,6 @@ function manualChunks(id) { } export default [ - // Autogenerated API Client - { - input: "./api/src/index.ts", - output: [ - { - format: "es", - dir: "./api/dist/", - sourcemap: true, - }, - ], - plugins: [ - typescript({ - declaration: true, - outDir: "./api/dist/", - }), - isProdBuild && terser(), - copy({ - targets: [...resources], - copyOnce: false, - }), - ].filter((p) => p), - watch: { - clearScreen: false, - }, - }, // Polyfills (imported first) { input: "./poly.ts", diff --git a/web/src/api/Config.ts b/web/src/api/Config.ts index 2b6dceb3a..b204feaa4 100644 --- a/web/src/api/Config.ts +++ b/web/src/api/Config.ts @@ -1,4 +1,4 @@ -import { Config, Configuration, CoreApi, CurrentTenant, Middleware, ResponseContext, RootApi, Tenant } from "@goauthentik/api"; +import { Config, Configuration, CoreApi, CurrentTenant, Middleware, ResponseContext, RootApi } from "@goauthentik/api"; import { getCookie } from "../utils"; import { APIMiddleware } from "../elements/notifications/APIDrawer"; import { MessageMiddleware } from "../elements/messages/Middleware"; diff --git a/web/src/elements/PageHeader.ts b/web/src/elements/PageHeader.ts index 59357efd3..c05611920 100644 --- a/web/src/elements/PageHeader.ts +++ b/web/src/elements/PageHeader.ts @@ -19,7 +19,7 @@ import { TITLE_DEFAULT, } from "../constants"; import { DEFAULT_CONFIG, tenant } from "../api/Config"; -import { EventsApi } from "../../api/dist"; +import { EventsApi } from "@goauthentik/api"; @customElement("ak-page-header") export class PageHeader extends LitElement { diff --git a/web/src/pages/policies/PolicyTestForm.ts b/web/src/pages/policies/PolicyTestForm.ts index 65143c92a..030172e36 100644 --- a/web/src/pages/policies/PolicyTestForm.ts +++ b/web/src/pages/policies/PolicyTestForm.ts @@ -1,4 +1,10 @@ -import { CoreApi, PoliciesApi, Policy, PolicyTestRequest, PolicyTestResult } from "@goauthentik/api"; +import { + CoreApi, + PoliciesApi, + Policy, + PolicyTestRequest, + PolicyTestResult, +} from "@goauthentik/api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; From 450d69a1a4454c3bd19a31dbade1baf8b2dcdbac Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 09:49:09 +0200 Subject: [PATCH 05/12] web: build. api in different folder Signed-off-by: Jens Langhammer --- .github/workflows/web-api-publish.yml | 4 ++-- Makefile | 2 +- web/package-lock.json | 14 +++++++------- web/package.json | 2 +- web/rollup.config.js | 4 ++++ 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/web-api-publish.yml b/.github/workflows/web-api-publish.yml index ff688549c..820da081b 100644 --- a/.github/workflows/web-api-publish.yml +++ b/.github/workflows/web-api-publish.yml @@ -16,8 +16,8 @@ jobs: registry-url: 'https://registry.npmjs.org' - run: make gen-web - run: | - cd web/api/ - npm run build + cd web-api/ + npm i npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/Makefile b/Makefile index a036ebdbb..f48fa0f31 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ gen-web: openapitools/openapi-generator-cli generate \ -i /local/schema.yml \ -g typescript-fetch \ - -o /local/web/api \ + -o /local/web-api \ --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${TIMESTAMP}.0.0 gen-outpost: diff --git a/web/package-lock.json b/web/package-lock.json index db02494c2..f167d8b0a 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^1629055619.0.0", + "@goauthentik/api": "^1629704636.0.0", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", @@ -1690,9 +1690,9 @@ } }, "node_modules/@goauthentik/api": { - "version": "1629055619.0.0", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629055619.0.0.tgz", - "integrity": "sha512-FQR1hoYC8hEGAm/oHC6VPoB/T8zb+V7pccx4LRJlKo8VxdsRAxgGn9nm/5h/1zIg8VmuRQqsXFNQMRT86nzyjw==" + "version": "1629704636.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629704636.0.0.tgz", + "integrity": "sha512-rjUjp7Gbf/Tzw0hGPx2ig5InXa4bPqj4FkFnIEgR6T1w6jbHV+q2BghztVFDc2hK2ib2NnQUQp6LWIAcYLAdSw==" }, "node_modules/@humanwhocodes/config-array": { "version": "0.5.0", @@ -9567,9 +9567,9 @@ "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==" }, "@goauthentik/api": { - "version": "1629055619.0.0", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629055619.0.0.tgz", - "integrity": "sha512-FQR1hoYC8hEGAm/oHC6VPoB/T8zb+V7pccx4LRJlKo8VxdsRAxgGn9nm/5h/1zIg8VmuRQqsXFNQMRT86nzyjw==" + "version": "1629704636.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629704636.0.0.tgz", + "integrity": "sha512-rjUjp7Gbf/Tzw0hGPx2ig5InXa4bPqj4FkFnIEgR6T1w6jbHV+q2BghztVFDc2hK2ib2NnQUQp6LWIAcYLAdSw==" }, "@humanwhocodes/config-array": { "version": "0.5.0", diff --git a/web/package.json b/web/package.json index 62a0e9b0b..e260d7e59 100644 --- a/web/package.json +++ b/web/package.json @@ -46,7 +46,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^1629704307.0.0", + "@goauthentik/api": "^1629704636.0.0", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", diff --git a/web/rollup.config.js b/web/rollup.config.js index 259203f8a..19f124b0c 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -75,6 +75,10 @@ export default [ resolve({ browser: true }), commonjs(), isProdBuild && terser(), + copy({ + targets: [...resources], + copyOnce: false, + }), ].filter((p) => p), watch: { clearScreen: false, From e9989190972fcd149a8a95c2c6143df742ac9490 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 10:02:39 +0200 Subject: [PATCH 06/12] web: fix build not working Signed-off-by: Jens Langhammer --- web/rollup.config.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/web/rollup.config.js b/web/rollup.config.js index 19f124b0c..888953df2 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -6,6 +6,7 @@ import cssimport from "rollup-plugin-cssimport"; import copy from "rollup-plugin-copy"; import babel from "@rollup/plugin-babel"; import replace from "@rollup/plugin-replace"; +import * as authentik from "@goauthentik/api"; const extensions = [".js", ".jsx", ".ts", ".tsx"]; @@ -99,7 +100,11 @@ export default [ plugins: [ cssimport(), resolve({ extensions, browser: true }), - commonjs(), + // Because the API Client uses star exports from typescript, we have to explicitly tell rollup + // Which classes can be imported + commonjs({ + namedExports: { '@goauthentik/api': Object.keys(authentik) }, + }), babel({ extensions, babelHelpers: "runtime", @@ -131,7 +136,11 @@ export default [ plugins: [ cssimport(), resolve({ extensions, browser: true }), - commonjs(), + // Because the API Client uses star exports from typescript, we have to explicitly tell rollup + // Which classes can be imported + commonjs({ + namedExports: { '@goauthentik/api': Object.keys(authentik) }, + }), babel({ extensions, babelHelpers: "runtime", From 9469f86f65579a2c7edb030867882d428b47c24f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 10:09:56 +0200 Subject: [PATCH 07/12] web: improve api client versioning Signed-off-by: Jens Langhammer --- Makefile | 4 ++-- scripts/npm_version.py | 6 ++++++ web/package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 scripts/npm_version.py diff --git a/Makefile b/Makefile index f48fa0f31..c93abdf14 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PWD = $(shell pwd) UID = $(shell id -u) GID = $(shell id -g) -TIMESTAMP = $(shell date "+%s") +NPM_VERSION = $(shell python -m scripts.npm_version) all: lint-fix lint test gen @@ -43,7 +43,7 @@ gen-web: -i /local/schema.yml \ -g typescript-fetch \ -o /local/web-api \ - --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${TIMESTAMP}.0.0 + --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} gen-outpost: docker run \ diff --git a/scripts/npm_version.py b/scripts/npm_version.py new file mode 100644 index 000000000..2c0d3a9e2 --- /dev/null +++ b/scripts/npm_version.py @@ -0,0 +1,6 @@ +"""Helper script to generate an NPM Version""" +from time import time + +from authentik import __version__ + +print("%s-%d" % (__version__, time())) diff --git a/web/package.json b/web/package.json index e260d7e59..e57620c7c 100644 --- a/web/package.json +++ b/web/package.json @@ -46,7 +46,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^1629704636.0.0", + "@goauthentik/api": "^2021.8.1-rc1+1629705955", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", From 507b8d43fb88b1de4a617d4a6852a5f2bffa5fca Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 10:16:24 +0200 Subject: [PATCH 08/12] root: remove remainders from gen Signed-off-by: Jens Langhammer --- Dockerfile | 12 ------------ web/azure-pipelines.yml | 38 -------------------------------------- 2 files changed, 50 deletions(-) diff --git a/Dockerfile b/Dockerfile index f079270f9..22ef80e19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,17 +18,6 @@ COPY ./website /static/ ENV NODE_ENV=production RUN cd /static && npm i && npm run build-docs-only -# Stage 3: Build web API -FROM openapitools/openapi-generator-cli as web-api-builder - -COPY ./schema.yml /local/schema.yml - -RUN docker-entrypoint.sh generate \ - -i /local/schema.yml \ - -g typescript-fetch \ - -o /local/web/api \ - --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0 - # Stage 3: Generate API Client FROM openapitools/openapi-generator-cli as go-api-builder @@ -48,7 +37,6 @@ RUN docker-entrypoint.sh generate \ FROM node as web-builder COPY ./web /static/ -COPY --from=web-api-builder /local/web/api /static/api ENV NODE_ENV=production RUN cd /static && npm i && npm run build diff --git a/web/azure-pipelines.yml b/web/azure-pipelines.yml index 21bead4d5..513499846 100644 --- a/web/azure-pipelines.yml +++ b/web/azure-pipelines.yml @@ -7,24 +7,6 @@ trigger: - version-* stages: - - stage: generate - jobs: - - job: generate_api - pool: - vmImage: 'ubuntu-latest' - steps: - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - task: CmdLine@2 - inputs: - script: make gen-web - - task: PublishPipelineArtifact@1 - inputs: - targetPath: 'web/api/' - artifact: 'ts_api_client' - publishLocation: 'pipeline' - stage: lint jobs: - job: eslint @@ -35,11 +17,6 @@ stages: inputs: versionSpec: '16.x' displayName: 'Install Node.js' - - task: DownloadPipelineArtifact@2 - inputs: - buildType: 'current' - artifactName: 'ts_api_client' - path: "web/api/" - task: Npm@1 inputs: command: 'install' @@ -57,11 +34,6 @@ stages: inputs: versionSpec: '16.x' displayName: 'Install Node.js' - - task: DownloadPipelineArtifact@2 - inputs: - buildType: 'current' - artifactName: 'ts_api_client' - path: "web/api/" - task: Npm@1 inputs: command: 'install' @@ -79,11 +51,6 @@ stages: inputs: versionSpec: '16.x' displayName: 'Install Node.js' - - task: DownloadPipelineArtifact@2 - inputs: - buildType: 'current' - artifactName: 'ts_api_client' - path: "web/api/" - task: Npm@1 inputs: command: 'install' @@ -103,11 +70,6 @@ stages: inputs: versionSpec: '16.x' displayName: 'Install Node.js' - - task: DownloadPipelineArtifact@2 - inputs: - buildType: 'current' - artifactName: 'ts_api_client' - path: "web/api/" - task: Npm@1 inputs: command: 'install' From 439454a71bce0899693645aeb271ffdfd8ad42ce Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 10:32:37 +0200 Subject: [PATCH 09/12] website: add docs for making schema changes Signed-off-by: Jens Langhammer --- .gitignore | 1 + Makefile | 3 +++ .../developer-docs/making-schema-changes.md | 23 +++++++++++++++++++ website/sidebarsDev.js | 4 ++++ 4 files changed, 31 insertions(+) create mode 100644 website/developer-docs/making-schema-changes.md diff --git a/.gitignore b/.gitignore index a1c635a7a..2e452fe10 100644 --- a/.gitignore +++ b/.gitignore @@ -201,3 +201,4 @@ media/ .idea/ /api/ +/web-api/ diff --git a/Makefile b/Makefile index c93abdf14..11101ef88 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,9 @@ gen-web: -g typescript-fetch \ -o /local/web-api \ --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} + mkdir -p web/node_modules/@goauthentik/api + cd web-api && npm i + \cp -rfv web-api/* web/node_modules/@goauthentik/api gen-outpost: docker run \ diff --git a/website/developer-docs/making-schema-changes.md b/website/developer-docs/making-schema-changes.md new file mode 100644 index 000000000..775326b31 --- /dev/null +++ b/website/developer-docs/making-schema-changes.md @@ -0,0 +1,23 @@ +--- +title: Making schema changes +--- + +Some backend changes might require new/different fields or remove other fields. To create a new schema after changing a Serializer, run `make gen-build`. + +This will update the `schema.yml` file in the root of the repository. + +## Building the Go Client + +The Go client is used by the Outpost to communicate with the backend authentik server. To build the go client, run `make gen-outpost`. + +The generated files are stored in `/api` in the root of the repository. + +## Building the Web Client + +The web client is used by the web-interface and web-FlowExecutor to communicate with authentik. To build the client, run `make gen-web`. + +Since the client is normally distributed as an npm package, running `make gen-web` will overwrite the locally installed client with the newly built one. + +:::warning +Running `npm i` in the `/web` folder after using `make gen-web` will overwrite the custom client and revert to the upstream client. +::: diff --git a/website/sidebarsDev.js b/website/sidebarsDev.js index dd46082f4..0435711d5 100644 --- a/website/sidebarsDev.js +++ b/website/sidebarsDev.js @@ -12,6 +12,10 @@ module.exports = { type: "doc", id: "frontend-only-dev-environment", }, + { + type: "doc", + id: "making-schema-changes", + }, { type: "doc", id: "api", From 1ff19e146768148ee4adeb0e41a02514b33a5c37 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 10:33:45 +0200 Subject: [PATCH 10/12] web: fix formatting Signed-off-by: Jens Langhammer --- web/rollup.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/rollup.config.js b/web/rollup.config.js index 888953df2..f74706ca5 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -103,7 +103,7 @@ export default [ // Because the API Client uses star exports from typescript, we have to explicitly tell rollup // Which classes can be imported commonjs({ - namedExports: { '@goauthentik/api': Object.keys(authentik) }, + namedExports: { "@goauthentik/api": Object.keys(authentik) }, }), babel({ extensions, @@ -139,7 +139,7 @@ export default [ // Because the API Client uses star exports from typescript, we have to explicitly tell rollup // Which classes can be imported commonjs({ - namedExports: { '@goauthentik/api': Object.keys(authentik) }, + namedExports: { "@goauthentik/api": Object.keys(authentik) }, }), babel({ extensions, From ac47fc9295d1b232f38196e5b9c18c7efd98418a Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 10:35:03 +0200 Subject: [PATCH 11/12] web: use custom client for web linting Signed-off-by: Jens Langhammer --- azure-pipelines.yml | 1 - web/azure-pipelines.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c0990024d..72477570b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -310,7 +310,6 @@ stages: inputs: script: | cd web - cd api && npm i && cd .. npm i npm run build - task: CmdLine@2 diff --git a/web/azure-pipelines.yml b/web/azure-pipelines.yml index 513499846..27f1f0c47 100644 --- a/web/azure-pipelines.yml +++ b/web/azure-pipelines.yml @@ -21,6 +21,9 @@ stages: inputs: command: 'install' workingDir: 'web/' + - task: CmdLine@2 + inputs: + script: make gen-web - task: Npm@1 inputs: command: 'custom' @@ -38,6 +41,9 @@ stages: inputs: command: 'install' workingDir: 'web/' + - task: CmdLine@2 + inputs: + script: make gen-web - task: Npm@1 inputs: command: 'custom' @@ -55,6 +61,9 @@ stages: inputs: command: 'install' workingDir: 'web/' + - task: CmdLine@2 + inputs: + script: make gen-web - task: Npm@1 inputs: command: 'custom' @@ -74,6 +83,9 @@ stages: inputs: command: 'install' workingDir: 'web/' + - task: CmdLine@2 + inputs: + script: make gen-web - task: Npm@1 inputs: command: 'custom' From 08f3294a1d0ffef990b3986841ee0af1e0e12e45 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 11:11:18 +0200 Subject: [PATCH 12/12] web: add ESM to generated Client https://github.com/OpenAPITools/openapi-generator/issues/8881 Signed-off-by: Jens Langhammer --- Makefile | 1 + scripts/web_api_esm.py | 29 +++++++++++++++++++++++++++++ web/package-lock.json | 14 +++++++------- web/package.json | 2 +- web/rollup.config.js | 16 +++++----------- 5 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 scripts/web_api_esm.py diff --git a/Makefile b/Makefile index 11101ef88..316d67e18 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ gen-web: -o /local/web-api \ --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} mkdir -p web/node_modules/@goauthentik/api + python -m scripts.web_api_esm cd web-api && npm i \cp -rfv web-api/* web/node_modules/@goauthentik/api diff --git a/scripts/web_api_esm.py b/scripts/web_api_esm.py new file mode 100644 index 000000000..d9ad1acd6 --- /dev/null +++ b/scripts/web_api_esm.py @@ -0,0 +1,29 @@ +"""Enable ESM Modules for generated Web API""" +from json import loads, dumps + +TSCONFIG_ESM = { + "compilerOptions": { + "declaration": True, + "target": "es6", + "module": "esnext", + "moduleResolution": "node", + "outDir": "./dist/esm", + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} + + +with open("web-api/package.json", encoding="utf-8") as _package: + package = loads(_package.read()) + package["module"] = "./dist/esm/index.js" + package["sideEffects"] = False + package["scripts"]["build"] = "tsc && tsc --project tsconfig.esm.json" + +open("web-api/package.json", "w+", encoding="utf-8").write(dumps(package)) +open("web-api/tsconfig.esm.json", "w+", encoding="utf-8").write(dumps(TSCONFIG_ESM)) diff --git a/web/package-lock.json b/web/package-lock.json index f167d8b0a..fb0382c0c 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15,7 +15,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^1629704636.0.0", + "@goauthentik/api": "^2021.8.1-rc1-1629709535", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", @@ -1690,9 +1690,9 @@ } }, "node_modules/@goauthentik/api": { - "version": "1629704636.0.0", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629704636.0.0.tgz", - "integrity": "sha512-rjUjp7Gbf/Tzw0hGPx2ig5InXa4bPqj4FkFnIEgR6T1w6jbHV+q2BghztVFDc2hK2ib2NnQUQp6LWIAcYLAdSw==" + "version": "2021.8.1-rc1-1629709535", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-2021.8.1-rc1-1629709535.tgz", + "integrity": "sha512-rlOt63gF3ALGuRIn8RiWRT5cZ4JhKu9koCtdFA7FDOYYU9jWBJ3e/YlFLLOLQrL8Cyl2g553We98t0n8AyDOBQ==" }, "node_modules/@humanwhocodes/config-array": { "version": "0.5.0", @@ -9567,9 +9567,9 @@ "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==" }, "@goauthentik/api": { - "version": "1629704636.0.0", - "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-1629704636.0.0.tgz", - "integrity": "sha512-rjUjp7Gbf/Tzw0hGPx2ig5InXa4bPqj4FkFnIEgR6T1w6jbHV+q2BghztVFDc2hK2ib2NnQUQp6LWIAcYLAdSw==" + "version": "2021.8.1-rc1-1629709535", + "resolved": "https://registry.npmjs.org/@goauthentik/api/-/api-2021.8.1-rc1-1629709535.tgz", + "integrity": "sha512-rlOt63gF3ALGuRIn8RiWRT5cZ4JhKu9koCtdFA7FDOYYU9jWBJ3e/YlFLLOLQrL8Cyl2g553We98t0n8AyDOBQ==" }, "@humanwhocodes/config-array": { "version": "0.5.0", diff --git a/web/package.json b/web/package.json index e57620c7c..27ace2e48 100644 --- a/web/package.json +++ b/web/package.json @@ -46,7 +46,7 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", "@fortawesome/fontawesome-free": "^5.15.4", - "@goauthentik/api": "^2021.8.1-rc1+1629705955", + "@goauthentik/api": "^2021.8.1-rc1-1629709535", "@lingui/cli": "^3.10.2", "@lingui/core": "^3.10.4", "@lingui/macro": "^3.10.2", diff --git a/web/rollup.config.js b/web/rollup.config.js index f74706ca5..89f19ddf0 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -6,7 +6,6 @@ import cssimport from "rollup-plugin-cssimport"; import copy from "rollup-plugin-copy"; import babel from "@rollup/plugin-babel"; import replace from "@rollup/plugin-replace"; -import * as authentik from "@goauthentik/api"; const extensions = [".js", ".jsx", ".ts", ".tsx"]; @@ -47,6 +46,9 @@ const resources = [ const isProdBuild = process.env.NODE_ENV === "production"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function manualChunks(id) { + if (id.includes("@goauthentik/api")) { + return "api"; + } if (id.includes("locales")) { const parts = id.split("/"); const file = parts[parts.length - 1]; @@ -100,11 +102,7 @@ export default [ plugins: [ cssimport(), resolve({ extensions, browser: true }), - // Because the API Client uses star exports from typescript, we have to explicitly tell rollup - // Which classes can be imported - commonjs({ - namedExports: { "@goauthentik/api": Object.keys(authentik) }, - }), + commonjs(), babel({ extensions, babelHelpers: "runtime", @@ -136,11 +134,7 @@ export default [ plugins: [ cssimport(), resolve({ extensions, browser: true }), - // Because the API Client uses star exports from typescript, we have to explicitly tell rollup - // Which classes can be imported - commonjs({ - namedExports: { "@goauthentik/api": Object.keys(authentik) }, - }), + commonjs(), babel({ extensions, babelHelpers: "runtime",