From 4a106bb9e214675e5fd373ddf6549c344698fa59 Mon Sep 17 00:00:00 2001 From: Shenali Date: Wed, 5 Feb 2025 14:51:38 +0530 Subject: [PATCH 1/4] Add isDefault to PUT payload --- .../components/edit/connection-edit.tsx | 1 + features/admin.connections.v1/models/connection.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/features/admin.connections.v1/components/edit/connection-edit.tsx b/features/admin.connections.v1/components/edit/connection-edit.tsx index bf7c49710f0..496774b9e61 100644 --- a/features/admin.connections.v1/components/edit/connection-edit.tsx +++ b/features/admin.connections.v1/components/edit/connection-edit.tsx @@ -467,6 +467,7 @@ export const EditConnection: FunctionComponent = ( }, uri: changedFields?.endpointUri ? values.endpointUri : undefined }, + isDefault: true, isEnabled: identityProvider.isEnabled, isPrimary: identityProvider.isPrimary }; diff --git a/features/admin.connections.v1/models/connection.ts b/features/admin.connections.v1/models/connection.ts index 1b8965093ce..8a677987858 100644 --- a/features/admin.connections.v1/models/connection.ts +++ b/features/admin.connections.v1/models/connection.ts @@ -753,7 +753,7 @@ export interface CustomAuthGeneralDetailsFormValuesInterface { /** * Display name of the connection */ - displayName?: string + displayName?: string; /** * Description of the connection */ @@ -770,6 +770,10 @@ export interface CustomAuthGeneralDetailsFormValuesInterface { * Set is enabled connection */ isEnabled?: boolean; + /** + * Set is default authenticator + */ + isDefault?: boolean; } export interface OutboundProvisioningConnectorMetaDataInterface { From bca369ca82c22729b4693685cc3cdf8342a6fdc4 Mon Sep 17 00:00:00 2001 From: Shenali Date: Wed, 5 Feb 2025 17:18:27 +0530 Subject: [PATCH 2/4] Update the condition --- .../components/edit/connection-edit.tsx | 2 +- .../admin.connections.v1/models/connection.ts | 42 +------------------ 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/features/admin.connections.v1/components/edit/connection-edit.tsx b/features/admin.connections.v1/components/edit/connection-edit.tsx index 496774b9e61..4115ec03ad0 100644 --- a/features/admin.connections.v1/components/edit/connection-edit.tsx +++ b/features/admin.connections.v1/components/edit/connection-edit.tsx @@ -467,7 +467,6 @@ export const EditConnection: FunctionComponent = ( }, uri: changedFields?.endpointUri ? values.endpointUri : undefined }, - isDefault: true, isEnabled: identityProvider.isEnabled, isPrimary: identityProvider.isPrimary }; @@ -502,6 +501,7 @@ export const EditConnection: FunctionComponent = ( }, uri: values.endpointUri }, + isDefault: true, isEnabled: identityProvider.isEnabled }; diff --git a/features/admin.connections.v1/models/connection.ts b/features/admin.connections.v1/models/connection.ts index 8a677987858..4f60917336d 100644 --- a/features/admin.connections.v1/models/connection.ts +++ b/features/admin.connections.v1/models/connection.ts @@ -770,10 +770,6 @@ export interface CustomAuthGeneralDetailsFormValuesInterface { * Set is enabled connection */ isEnabled?: boolean; - /** - * Set is default authenticator - */ - isDefault?: boolean; } export interface OutboundProvisioningConnectorMetaDataInterface { @@ -853,46 +849,10 @@ export interface CustomAuthenticationCreateWizardGeneralFormValuesInterface { * Endpoint Authentication Update configuration. */ export interface EndpointAuthenticationUpdateInterface extends CustomAuthGeneralDetailsFormValuesInterface { - /** - * Name of the Action. - */ - name?: string; - /** - * Description of the Action. - */ - description?: string; /** * Endpoint configuration of the Action. */ - endpoint?: Partial; -} - -/** - * Endpoint configuration. - */ -export interface EndpointInterface { - /** - * External endpoint. - */ - uri: string; - /** - * Authentication configurations of the Action. - */ - authentication: AuthenticationInterface; -} - -/** - * Endpoint authentication configuration. - */ -interface AuthenticationInterface { - /** - * Authentication Type. - */ - type: EndpointAuthenticationType; - /** - * Authentication properties. - */ - properties: Partial; + endpoint?: Partial; } /** From 8ccf4ae097eac87ddeaee83830d283ae00957784 Mon Sep 17 00:00:00 2001 From: Shenali Date: Wed, 5 Feb 2025 17:24:37 +0530 Subject: [PATCH 3/4] Add changeset --- .changeset/pink-jars-shake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pink-jars-shake.md diff --git a/.changeset/pink-jars-shake.md b/.changeset/pink-jars-shake.md new file mode 100644 index 00000000000..a439a911278 --- /dev/null +++ b/.changeset/pink-jars-shake.md @@ -0,0 +1,5 @@ +--- +"@wso2is/admin.connections.v1": patch +--- + +Set isDefault Property of the Custom Federated Authenticator when updating Endpoint Details #7510 From 30be8078020ffc7ec02aeb6a061e7e4c9e9654da Mon Sep 17 00:00:00 2001 From: Ashan Thamara Palihakkara <75057725+ashanthamara@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:41:08 +0530 Subject: [PATCH 4/4] Remove unused import --- features/admin.connections.v1/models/connection.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/features/admin.connections.v1/models/connection.ts b/features/admin.connections.v1/models/connection.ts index 4f60917336d..bac269f6120 100644 --- a/features/admin.connections.v1/models/connection.ts +++ b/features/admin.connections.v1/models/connection.ts @@ -16,7 +16,6 @@ * under the License. */ -import { EndpointConfigFormPropertyInterface } from "@wso2is/admin.actions.v1/models/actions"; import { IdentifiableComponentInterface, LinkInterface, TestableComponentInterface } from "@wso2is/core/models"; import { GenericIconProps } from "@wso2is/react-components"; import { ComponentType, LazyExoticComponent, ReactElement } from "react";