Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .changeset/lazy-radios-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wso2is/myaccount": patch
"@wso2is/console": patch
---

Remove unused exported enum members and unlisted dependencies
4 changes: 2 additions & 2 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:

jobs:
knip:
name: 🔪 Knip (DEAD CODE)
name: ✂️ Knip (DEAD CODE)
if: ${{ github.event_name == 'pull_request' || github.event.label.name == 'trigger-pr-builder' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
id: install-dependencies
run: pnpm install

- name: 🔪 Run Knip
- name: ✂️ Run Knip
id: run-knip
# Knip findings and runtime failures will fail CI.
run: pnpm knip:ci
Expand Down
1 change: 0 additions & 1 deletion apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "WSO2 Identity Server Console",
"author": "WSO2",
"license": "Apache-2.0",
"main": "index.js",
"scripts": {
"build": "pnpm build:prod",
"build:prod": "pnpm nx run console:build",
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/decorated-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { UserPreferencesInterface } from "./models/user-preferences";
/**
* Props interface of {@link DecoratedApp}
*/
export type DecoratedAppProps = PropsWithChildren<Record<string, unknown>> & IdentifiableComponentInterface;
type DecoratedAppProps = PropsWithChildren<Record<string, unknown>> & IdentifiableComponentInterface;

/**
* `DecoratedApp` is a higher-order component that wraps children with `UserPreferencesProvider`.
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/hooks/use-routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { getAppViewRoutes } from "../configs/routes";
/**
* Props interface of {@link useOrganizations}
*/
export type useRoutesInterface = {
type useRoutesInterface = {
filterRoutes: (
onRoutesFilterComplete: () => void,
isUserTenantless: boolean,
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/layouts/default-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import "./default-layout.scss";
/**
* Default page layout component Prop types.
*/
export interface DefaultLayoutPropsInterface extends RouteComponentProps {
interface DefaultLayoutPropsInterface extends RouteComponentProps {
/**
* Is layout fluid.
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/layouts/error-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { getErrorLayoutRoutes } from "../configs/routes";
/**
* Error layout Prop types.
*/
export interface ErrorLayoutPropsInterface {
interface ErrorLayoutPropsInterface {
/**
* Is layout fluid.
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "WSO2 Identity Server My Account",
"author": "WSO2",
"license": "Apache-2.0",
"main": "index.js",
"scripts": {
"build": "pnpm build:prod",
"build:prod": "pnpm nx run myaccount:build",
Expand Down Expand Up @@ -48,6 +47,7 @@
"@wso2is/common.users.v1": "workspace:^",
"@wso2is/common.workflow-approvals.v1": "^1.0.15",
"@wso2is/core": "^2.13.1",
"@wso2is/form": "^2.10.2",
"@wso2is/forms": "^2.3.27",
"@wso2is/i18n": "^2.38.7",
"@wso2is/react-components": "^2.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const FILTER_VALUES_FIELD_IDENTIFIER: string = "filterValues";
/**
* Prop types for the application search component.
*/
export interface AdvancedSearchWithBasicFiltersPropsInterface extends
interface AdvancedSearchWithBasicFiltersPropsInterface extends
StrictAdvancedSearchWithBasicFiltersPropsInterface,
TestableComponentInterface {
[ key: string ]: any;
Expand All @@ -62,7 +62,7 @@ interface FilterAttributeOptionInterface {
/**
* Strict prop types for the application search component.
*/
export interface StrictAdvancedSearchWithBasicFiltersPropsInterface extends TestableComponentInterface {
interface StrictAdvancedSearchWithBasicFiltersPropsInterface extends TestableComponentInterface {
/**
* Default Search attribute. ex: "name"
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/components/shared/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { initializeAlertSystem } from "../../store/actions";
* Prop types for the Alert component.
* Also see {@link Alert.defaultProps}
*/
export interface AlertProps extends TestableComponentInterface {
interface AlertProps extends TestableComponentInterface {
dismissInterval?: number;
alertsPosition?: "tr" | "tl" | "tc" | "br" | "bl" | "bc";
}
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/components/shared/app-avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { getAppIconBackgrounds } from "../../configs";
/**
* Prop types for the App Avatar component.
*/
export interface AppAvatarProps extends AvatarProps, TestableComponentInterface {
interface AppAvatarProps extends AvatarProps, TestableComponentInterface {
onCard?: boolean;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/components/shared/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface AvatarProps extends TestableComponentInterface {
/**
* Type to handle Avatar sizes.
*/
export type AvatarSizes = SemanticSIZES | "little";
type AvatarSizes = SemanticSIZES | "little";

/**
* Avatar component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SystemNotificationAlertState } from "../../models";
/**
* SystemNotificationAlert component props.
*/
export type SystemNotificationAlertProps = IdentifiableComponentInterface;
type SystemNotificationAlertProps = IdentifiableComponentInterface;

/**
* System Notification Alert component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
import { LinkButton } from "@wso2is/react-components";
import { IdentityAppsApiException } from "modules/core/dist/types/exceptions";
import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import React, { FunctionComponent, ReactElement } from "react";
import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
Expand Down
3 changes: 1 addition & 2 deletions apps/myaccount/src/constants/profile-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ export class ProfileConstants {
* @readonly
*/
export enum LocaleJoiningSymbol {
HYPHEN = "-",
UNDERSCORE = "_"
HYPHEN = "-"
}
Comment thread
pavinduLakshan marked this conversation as resolved.

export enum OTPVerificationRecoveryScenario {
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/decorated-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { AppState } from "./store";
/**
* Props interface of {@link DecoratedApp}
*/
export type DecoratedAppProps = PropsWithChildren<Record<string, unknown>> & IdentifiableComponentInterface;
type DecoratedAppProps = PropsWithChildren<Record<string, unknown>> & IdentifiableComponentInterface;

/**
* `DecoratedApp` is a higher-order component that wraps children with `UserPreferencesProvider`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
* under the License.
*/

export interface AccountRecoveryConfig {
interface AccountRecoveryConfig {
sections: {
accountRecovery: {
description: string
}
}
}

export {};
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* under the License.
*/

export interface PasswordValidationConfig {
interface PasswordValidationConfig {
showPasswordValidation: boolean;
}

export {};
2 changes: 1 addition & 1 deletion apps/myaccount/src/hooks/use-app-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import AppSettingsContext, { AppSettingsContextProps } from "../contexts/app-set
/**
* Props interface of {@link UseAppSettings}
*/
export type UseAppSettingsInterface = AppSettingsContextProps;
type UseAppSettingsInterface = AppSettingsContextProps;

/**
* Hook that provides access to the local App settings context.
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/hooks/use-organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { MultiTenantConstants } from "../constants/multi-tenant-constants";
/**
* Interface for the return type of the UseOrganizations hook.
*/
export interface UseOrganizationsInterface {
interface UseOrganizationsInterface {
/**
* Set the organization id in the local storage.
* @param orgId - Organization id.
Expand Down
4 changes: 2 additions & 2 deletions apps/myaccount/src/hooks/use-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const httpClient: HttpClientInstance = AsgardeoSPAClient.getInstance()
.httpRequest.bind(AsgardeoSPAClient.getInstance())
.bind(AsgardeoSPAClient.getInstance());

export type GetRequest = AxiosRequestConfig | null
type GetRequest = AxiosRequestConfig | null

/**
* Request error interface.
Expand Down Expand Up @@ -85,7 +85,7 @@ export interface RequestErrorInterface {
traceId: string;
}

export interface SWRConfig<Data = unknown, Error = unknown>
interface SWRConfig<Data = unknown, Error = unknown>
extends Omit<
SWRConfiguration<AxiosResponse<Data>, AxiosError<Error>>,
"fallbackData"
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/hooks/use-sign-in.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const LOGOUT_URL: string = "sign_out_url";
/**
* Props interface of {@link useSignIn}
*/
export interface UseSignInInterface {
interface UseSignInInterface {
/**
* Handles the sign-in process.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/layouts/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import { AppUtils, CommonUtils as MyAccountCommonUtils, filterRoutes } from "../
/**
* Dashboard page layout component Prop types.
*/
export interface DashboardLayoutPropsInterface {
interface DashboardLayoutPropsInterface {
/**
* Is layout fluid.
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/layouts/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { AppConstants } from "../constants";
/**
* Error layout Prop types.
*/
export interface ErrorLayoutPropsInterface {
interface ErrorLayoutPropsInterface {
/**
* Is layout fluid.
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/models/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface HttpResponse extends AxiosResponse {}
* from Axios library.
*/
/* eslint-disable @typescript-eslint/no-empty-interface */
export interface HttpError extends AxiosError {}
interface HttpError extends AxiosError {}

/**
* Enum for HTTP methods.
Expand Down
4 changes: 2 additions & 2 deletions apps/myaccount/src/models/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export interface ServiceResourceEndpointsInterface {
/**
* Authenticator app interface.
*/
export interface AuthenticatorAppInterface {
interface AuthenticatorAppInterface {
link: string;
name: string;
}
Expand Down Expand Up @@ -236,7 +236,7 @@ export interface AppUtilsInterface {
updateTenantQualifiedBaseName: (tenant: string) => void;
}

export interface InitialConfigInterface {
interface InitialConfigInterface {
consoleAppOrigin: string;
contextPath: string;
serverOrigin: string;
Expand Down
4 changes: 2 additions & 2 deletions apps/myaccount/src/models/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* Application list model.
*/
export interface ApplicationList {
interface ApplicationList {
/**
* The total number of results matching the query.
*/
Expand Down Expand Up @@ -79,7 +79,7 @@ export interface Application {
/**
* Link model.
*/
export interface Link {
interface Link {
/**
* Path to the target resource.
*/
Expand Down
10 changes: 6 additions & 4 deletions apps/myaccount/src/models/approvals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* Approval Task Summary model.
*/
export interface ApprovalTaskSummary {
interface ApprovalTaskSummary {
/**
* Unique ID to represent an Approval Task
*/
Expand Down Expand Up @@ -61,7 +61,7 @@ export interface ApprovalTaskSummary {
/**
* Approval Task Details model.
*/
export interface ApprovalTaskDetails {
interface ApprovalTaskDetails {
/**
* Unique ID to represent a approval task
*/
Expand Down Expand Up @@ -107,7 +107,7 @@ interface Property {
/**
* Approval Action model.
*/
export interface ApprovalAction {
interface ApprovalAction {
/**
* Action to perform on the task.
*/
Expand All @@ -119,7 +119,7 @@ export interface ApprovalAction {
*
* @readonly
*/
export enum ApprovalStatus {
enum ApprovalStatus {
READY = "READY",
COMPLETED = "COMPLETED",
RESERVED = "RESERVED",
Expand All @@ -130,3 +130,5 @@ export enum ApprovalStatus {
REJECT = "REJECT",
ALL = "ALL"
}

export {};
4 changes: 3 additions & 1 deletion apps/myaccount/src/models/authenticated-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
/**
* Interface of the authenticated user.
*/
export interface AuthenticatedUserInterface {
interface AuthenticatedUserInterface {
display_name?: string;
email?: string;
username: string;
scope?: string;
}

export {};
2 changes: 1 addition & 1 deletion apps/myaccount/src/models/consents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export interface PIICategoryWithStatus extends PIICategory {
status: PIICategoryStatus;
}

export type PIICategoryStatus = "accepted" | "denied";
type PIICategoryStatus = "accepted" | "denied";

/**
* PIICategory Model
Expand Down
2 changes: 1 addition & 1 deletion apps/myaccount/src/models/federated-associations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface FederatedAssociation {
/**
* Model of the IDP attribute in FederatedAssociation
*/
export interface IdentityProvider {
interface IdentityProvider {
id: string;
name: string;
displayName: string;
Expand Down
6 changes: 4 additions & 2 deletions apps/myaccount/src/models/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* Model for the common namespace
*/
export interface Common {
interface Common {
access: string;
active: string;
add: string;
Expand Down Expand Up @@ -98,7 +98,7 @@ export interface Common {
/**
* Model for the views namespace
*/
export interface Views {
interface Views {
components: {
accountRecovery: {
codeRecovery: {
Expand Down Expand Up @@ -876,3 +876,5 @@ interface Placeholder {
interface PlaceholderSubtitle {
[key: number]: string;
}

export {};
Loading
Loading