Skip to content

Commit

Permalink
Remove @wso2is/admin.extensions.v2
Browse files Browse the repository at this point in the history
  • Loading branch information
brionmario committed Jul 31, 2024
1 parent 1742d24 commit d558b1e
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 1,679 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

import { AsgardeoSPAClient, HttpClientInstance } from "@asgardeo/auth-react";
import { OrganizationInterface } from "@wso2is/admin.administrators.v1/models/organization";
import { store } from "@wso2is/admin.core.v1/store";
import { HttpMethods } from "@wso2is/core/models";
import { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
import { OrganizationInterface } from "../models/organization";

/**
* Initialize an axios Http client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* under the License.
*/

import { OrganizationInterface } from "@wso2is/admin.administrators.v1/models/organization";
import useRequest, {
RequestConfigInterface,
RequestErrorInterface,
Expand All @@ -25,6 +24,7 @@ import useRequest, {
} from "@wso2is/admin.core.v1/hooks/use-request";
import { store } from "@wso2is/admin.core.v1/store";
import { HttpMethods } from "@wso2is/core/models";
import { OrganizationInterface } from "../models/organization";

/**
* Hook to get enterprise login enable config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
* under the License.
*/

import { ExtendedFeatureResourceEndpointsInterfaceV2 } from "./models/endpoint";
import { AdministratorsResourceEndpointsInterface } from "../models/endpoint";

/**
* Get the resource endpoints for the extended features.
* Get the resource endpoints for the Administrators feature.
*
* @param serverHost - Server Host.
* @returns Interface for the resource endpoints of extended features.
* @returns Interface for the resource endpoints of Administrators feature.
*/
export const getExtendedFeatureResourceEndpointsV2 = (serverHost: string):
ExtendedFeatureResourceEndpointsInterfaceV2 => {
export const getAdministratorsResourceEndpoints = (serverHost: string): AdministratorsResourceEndpointsInterface => {
return {
organizationEndpointV2: `${ serverHost }/api/asgardeo-enterprise-login/v2/business-user-login/{organization}`,
organizationPatchEndpointV2: `${ serverHost }/api/asgardeo-enterprise-login/v2/business-user-login`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/

/**
* Interface for the resource endpoints of extended features.
* Interface for the Administrators resource endpoints.
*/
export interface ExtendedFeatureResourceEndpointsInterfaceV2 {
export interface AdministratorsResourceEndpointsInterface {
/**
* Resource endpoint to fetch business user login configuration.
*/
Expand Down
1 change: 0 additions & 1 deletion features/admin.administrators.v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@wso2is/admin.authentication.v1": "workspace:^2.20.96",
"@wso2is/admin.core.v1": "^2.23.26",
"@wso2is/admin.extensions.v1": "^2.21.66",
"@wso2is/admin.extensions.v2": "^2.20.96",
"@wso2is/admin.roles.v2": "^2.20.96",
"@wso2is/admin.server-configurations.v1": "^2.21.38",
"@wso2is/admin.users.v1": "^2.20.96",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
*/

import { history, store } from "@wso2is/admin.core.v1";
import {
updateOrganizationConfigV2
} from "@wso2is/admin.extensions.v2/components/administrators/api/updateOrganizationConfigV2";
import {
useOrganizationConfigV2
} from "@wso2is/admin.extensions.v2/components/administrators/api/useOrganizationConfigV2";
import { AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
import { DocumentationLink, PageLayout, useDocumentation } from "@wso2is/react-components";
Expand All @@ -32,6 +26,8 @@ import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
import { Dispatch } from "redux";
import { Checkbox, CheckboxProps, Icon, Message } from "semantic-ui-react";
import { updateOrganizationConfigV2 } from "../api/updateOrganizationConfigV2";
import { useOrganizationConfigV2 } from "../api/useOrganizationConfigV2";
import { AdministratorConstants } from "../constants";
import { OrganizationInterface, UseOrganizationConfigType } from "../models/organization";

Expand Down
4 changes: 1 addition & 3 deletions features/admin.administrators.v1/pages/administrators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ import { getAssociationType } from "@wso2is/admin.extensions.v1/components/tenan
import { getAgentConnections } from "@wso2is/admin.extensions.v1/components/user-stores/api/remote-user-stores";
import { AgentConnectionInterface } from "@wso2is/admin.extensions.v1/components/user-stores/models/remote-user-stores";
import { administratorConfig } from "@wso2is/admin.extensions.v1/configs/administrator";
import {
useOrganizationConfigV2
} from "@wso2is/admin.extensions.v2/components/administrators/api/useOrganizationConfigV2";
import { getRoleById, searchRoleList } from "@wso2is/admin.roles.v2/api/roles";
import { RoleAudienceTypes } from "@wso2is/admin.roles.v2/constants";
import { RolesV2Interface, SearchRoleInterface } from "@wso2is/admin.roles.v2/models/roles";
Expand Down Expand Up @@ -99,6 +96,7 @@ import {
PaginationProps,
TabProps
} from "semantic-ui-react";
import { useOrganizationConfigV2 } from "../api/useOrganizationConfigV2";
import { GuestUsersList, OnboardedGuestUsersList } from "../components";
import {
ADVANCED_USER_MGT,
Expand Down
4 changes: 2 additions & 2 deletions features/admin.core.v1/configs/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* under the License.
*/

import { getAdministratorsResourceEndpoints } from "@wso2is/admin.administrators.v1/config/endpoints";
import { getAPIResourceEndpoints } from "@wso2is/admin.api-resources.v2/configs/endpoint";
import { getApplicationsResourceEndpoints } from "@wso2is/admin.applications.v1/configs/endpoints";
import { getBrandingResourceEndpoints } from "@wso2is/admin.branding.v1/configs/endpoints";
Expand All @@ -26,7 +27,6 @@ import { getConsoleSettingsResourceEndpoints } from "@wso2is/admin.console-setti
import { getEmailTemplatesResourceEndpoints } from "@wso2is/admin.email-templates.v1";
import { getFeatureGateResourceEndpoints } from "@wso2is/admin.extensions.v1/components/feature-gate/configs";
import { getExtendedFeatureResourceEndpoints } from "@wso2is/admin.extensions.v1/configs/endpoints";
import { getExtendedFeatureResourceEndpointsV2 } from "@wso2is/admin.extensions.v2/config/endpoints";
import { getGroupsResourceEndpoints } from "@wso2is/admin.groups.v1";
import { getIDVPResourceEndpoints } from "@wso2is/admin.identity-verification-providers.v1";
import { getScopesResourceEndpoints } from "@wso2is/admin.oidc-scopes.v1";
Expand Down Expand Up @@ -233,6 +233,7 @@ export class Config {
public static getServiceResourceEndpoints(): ServiceResourceEndpointsInterface {
return {
...getAPIResourceEndpoints(this.resolveServerHost()),
...getAdministratorsResourceEndpoints(this.resolveServerHost()),
...getApplicationsResourceEndpoints(this.resolveServerHost()),
...getApprovalsResourceEndpoints(this.getDeploymentConfig()?.serverHost),
...getBrandingResourceEndpoints(this.resolveServerHost()),
Expand All @@ -251,7 +252,6 @@ export class Config {
...getRemoteFetchConfigResourceEndpoints(this.getDeploymentConfig()?.serverHost),
...getSecretsManagementEndpoints(this.getDeploymentConfig()?.serverHost),
...getExtendedFeatureResourceEndpoints(this.resolveServerHost(), this.getDeploymentConfig()),
...getExtendedFeatureResourceEndpointsV2(this.resolveServerHost()),
...getOrganizationsResourceEndpoints(this.resolveServerHost(true), this.getDeploymentConfig().serverHost),
...getTenantResourceEndpoints(this.getDeploymentConfig().serverOrigin),
...getFeatureGateResourceEndpoints(this.resolveServerHostforFG(false)),
Expand Down
2 changes: 1 addition & 1 deletion features/admin.core.v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@oxygen-ui/react": "^1.13.3",
"@oxygen-ui/react-icons": "^1.13.3",
"@wso2is/access-control": "^3.0.20",
"@wso2is/admin.administrators.v1": "^2.21.66",
"@wso2is/admin.api-resources.v1": "^2.20.96",
"@wso2is/admin.api-resources.v2": "^2.20.96",
"@wso2is/admin.applications.v1": "^2.22.26",
Expand All @@ -31,7 +32,6 @@
"@wso2is/admin.email-providers.v1": "^2.20.96",
"@wso2is/admin.email-templates.v1": "^2.20.96",
"@wso2is/admin.extensions.v1": "^2.21.66",
"@wso2is/admin.extensions.v2": "^2.20.96",
"@wso2is/admin.groups.v1": "^2.20.96",
"@wso2is/admin.identity-providers.v1": "^2.21.26",
"@wso2is/admin.identity-verification-providers.v1": "^2.20.96",
Expand Down
1 change: 0 additions & 1 deletion features/admin.extensions.v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@wso2is/admin.claims.v1": "^2.20.96",
"@wso2is/admin.connections.v1": "^2.21.26",
"@wso2is/admin.core.v1": "^2.23.26",
"@wso2is/admin.extensions.v2": "^2.20.96",
"@wso2is/admin.groups.v1": "^2.20.96",
"@wso2is/admin.identity-providers.v1": "^2.21.26",
"@wso2is/admin.organizations.v1": "^2.20.96",
Expand Down
Loading

0 comments on commit d558b1e

Please sign in to comment.