1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-23 13:46:45 +02:00

fix: initial UI draft (#3191)

Initial draft for notifications UI behind a feature flag. I'd like to
get this merged because the PR is cluttered by open api generation. In
the next PR I will:
* Clean up the SX and introduce styled components
* Add a component for single notifications and implement the
notification list
This commit is contained in:
Fredrik Strand Oseberg 2023-02-24 11:31:37 +01:00 committed by GitHub
parent 898160b295
commit 20d3dfd895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
269 changed files with 591 additions and 271 deletions

View File

@ -0,0 +1,61 @@
import Settings from '@mui/icons-material/Settings';
import { Paper, Typography, Box, IconButton } from '@mui/material';
import { useNotifications } from 'hooks/api/getters/useNotifications/useNotifications';
export const Notifications = () => {
const { notifications } = useNotifications({ refreshInterval: 15 });
console.log(notifications);
return (
<Paper
elevation={0}
sx={theme => ({
minWidth: '400px',
boxShadow: theme.boxShadows.popup,
borderRadius: `${theme.shape.borderRadiusLarge}px`,
position: 'absolute',
right: -20,
top: 60,
})}
>
<Box
sx={theme => ({
padding: theme.spacing(1, 3),
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
})}
>
<Typography fontWeight="bold">Notifications</Typography>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<IconButton>
<Settings />
</IconButton>
</Box>
</Box>
<Box
sx={theme => ({
backgroundColor: theme.palette.neutral.light,
padding: theme.spacing(1, 3),
})}
>
<Typography
sx={theme => ({
fontWeight: 'bold',
fontSize: theme.fontSizes.smallBody,
color: theme.palette.primary.main,
textAlign: 'center',
})}
>
Mark all as read ({notifications?.length})
</Typography>
</Box>
<Box sx={theme => ({ padding: theme.spacing(2, 3) })}>
List goes here
</Box>
</Paper>
);
};

View File

@ -11,6 +11,7 @@ import {
Switch,
styled,
Theme,
Box,
} from '@mui/material';
import MenuIcon from '@mui/icons-material/Menu';
import SettingsIcon from '@mui/icons-material/Settings';
@ -19,6 +20,7 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit
import MenuBookIcon from '@mui/icons-material/MenuBook';
import { ReactComponent as UnleashLogo } from 'assets/img/logoDarkWithText.svg';
import { ReactComponent as UnleashLogoWhite } from 'assets/img/logoWithWhiteText.svg';
import NotificationsIcon from '@mui/icons-material/Notifications';
import { DrawerMenu } from './DrawerMenu/DrawerMenu';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
@ -31,13 +33,14 @@ import {
adminMenuRoutes,
getCondensedRoutes,
} from 'component/menu/routes';
import { KeyboardArrowDown } from '@mui/icons-material';
import { KeyboardArrowDown, NotificationAdd } from '@mui/icons-material';
import { filterByConfig } from 'component/common/util';
import { useAuthPermissions } from 'hooks/api/getters/useAuth/useAuthPermissions';
import { useId } from 'hooks/useId';
import { INavigationMenuItem } from 'interfaces/route';
import { ThemeMode } from 'component/common/ThemeMode/ThemeMode';
import { useThemeMode } from 'hooks/useThemeMode';
import { Notifications } from 'component/common/Notifications/Notifications';
const StyledHeader = styled(AppBar)(({ theme }) => ({
backgroundColor: theme.palette.headerBackground,
@ -115,6 +118,7 @@ const Header: VFC = () => {
const configId = useId();
const [adminRef, setAdminRef] = useState<HTMLButtonElement | null>(null);
const [configRef, setConfigRef] = useState<HTMLButtonElement | null>(null);
const [showNotifications, setShowNotifications] = useState(false);
const [admin, setAdmin] = useState(false);
const { permissions } = useAuthPermissions();
@ -209,6 +213,7 @@ const Header: VFC = () => {
}
/>
</StyledLink>
<StyledNav>
<StyledLinks>
<StyledLink to="/projects">Projects</StyledLink>
@ -282,6 +287,27 @@ const Header: VFC = () => {
</Tooltip>
}
/>
<ConditionallyRender
condition={Boolean(uiConfig?.flags?.notifications)}
show={
<Box sx={{ position: 'relative' }}>
<StyledIconButton
onClick={() =>
setShowNotifications(
!showNotifications
)
}
>
<NotificationsIcon />
</StyledIconButton>
<ConditionallyRender
condition={showNotifications}
show={<Notifications />}
/>
</Box>
}
/>
<NavigationMenu
id={adminId}
options={filteredMainRoutes.adminRoutes}

View File

@ -0,0 +1,32 @@
import useSWR, { SWRConfiguration } from 'swr';
import { useCallback, useMemo } from 'react';
import { formatApiPath } from 'utils/formatPath';
import handleErrorResponses from '../httpErrorResponseHandler';
import { NotificationsSchema } from 'openapi';
export const useNotifications = (options: SWRConfiguration = {}) => {
const path = formatApiPath(`api/admin/notifications`);
const { data, error, mutate } = useSWR<NotificationsSchema>(
path,
fetcher,
options
);
const refetchNotifications = useCallback(() => {
mutate().catch(console.warn);
}, [mutate]);
console.log(data);
return {
notifications: data,
error,
loading: !error && !data,
refetchNotifications,
};
};
const fetcher = async (path: string): Promise<NotificationsSchema> => {
const res = await fetch(path).then(handleErrorResponses('Notifications'));
const data = await res.json();
return data;
};

View File

@ -14,7 +14,6 @@ export interface IUiConfig {
disablePasswordAuth?: boolean;
emailEnabled?: boolean;
networkViewEnabled: boolean;
maintenanceMode?: boolean;
toast?: IProclamationToast;
segmentValuesLimit?: number;
@ -48,6 +47,7 @@ export interface IFlags {
crOnVariants?: boolean;
showProjectApiAccess?: boolean;
proPlanAutoCharge?: boolean;
notifications?: boolean;
}
export interface IVersionInfo {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type _ExportFormat = typeof _ExportFormat[keyof typeof _ExportFormat];

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { _ExportFormat } from './_exportFormat';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface AddonParameterSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { AddonSchemaParameters } from './addonSchemaParameters';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type AddonSchemaParameters = { [key: string]: any };

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { TagTypeSchema } from './tagTypeSchema';
import type { AddonParameterSchema } from './addonParameterSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { AddonSchema } from './addonSchema';
import type { AddonTypeSchema } from './addonTypeSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface AdminFeaturesQuerySchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface AdminPermissionSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { AdminPermissionsSchemaPermissions } from './adminPermissionsSchemaPermissions';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { AdminPermissionSchema } from './adminPermissionSchema';
import type { AdminPermissionsSchemaPermissionsEnvironmentsItem } from './adminPermissionsSchemaPermissionsEnvironmentsItem';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { AdminPermissionSchema } from './adminPermissionSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ConstraintSchema } from './constraintSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ApiTokenSchemaType } from './apiTokenSchemaType';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ApiTokenSchemaType =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ApiTokenSchema } from './apiTokenSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ApplicationSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ApplicationSchema } from './applicationSchema';

View File

@ -0,0 +1,13 @@
/**
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { BulkRegistrationSchema } from './bulkRegistrationSchema';
import type { ClientMetricsSchema } from './clientMetricsSchema';
export interface BulkMetricsSchema {
applications?: BulkRegistrationSchema[];
metrics?: ClientMetricsSchema[];
}

View File

@ -0,0 +1,17 @@
/**
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface BulkRegistrationSchema {
connectVia?: string[];
appName: string;
environment?: string;
instanceId: string;
interval?: number;
started?: number;
strategies?: string[];
sdkVersion?: string;
}

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ChangePasswordSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ChangeProjectSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ChangeRequestAddCommentSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestApprovalSchemaCreatedBy } from './changeRequestApprovalSchemaCreatedBy';

View File

@ -2,11 +2,11 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestApprovalSchemaCreatedBy = {
id?: number;
username?: string | null;
imageUrl?: string | null;
username?: string;
imageUrl?: string;
};

View File

@ -2,11 +2,12 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCommentSchemaCreatedBy } from './changeRequestCommentSchemaCreatedBy';
export interface ChangeRequestCommentSchema {
id?: number;
text: string;
createdBy: ChangeRequestCommentSchemaCreatedBy;
createdAt: string;

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCommentSchemaCreatedBy = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestEnvironmentConfigSchema } from './changeRequestEnvironmentConfigSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCreateSchemaOneOf } from './changeRequestCreateSchemaOneOf';
import type { ChangeRequestCreateSchemaOneOfFour } from './changeRequestCreateSchemaOneOfFour';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCreateSchemaOneOfAction } from './changeRequestCreateSchemaOneOfAction';
import type { ChangeRequestCreateSchemaOneOfPayload } from './changeRequestCreateSchemaOneOfPayload';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfAction =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCreateSchemaOneOfEightAction } from './changeRequestCreateSchemaOneOfEightAction';
import type { ChangeRequestCreateSchemaOneOfEightPayload } from './changeRequestCreateSchemaOneOfEightPayload';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfEightAction =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfEightPayload = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCreateSchemaOneOfFourAction } from './changeRequestCreateSchemaOneOfFourAction';
import type { CreateFeatureStrategySchema } from './createFeatureStrategySchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfFourAction =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCreateSchemaOneOfOneoneAction } from './changeRequestCreateSchemaOneOfOneoneAction';
import type { ChangeRequestCreateSchemaOneOfOneonePayload } from './changeRequestCreateSchemaOneOfOneonePayload';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfOneoneAction =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { VariantSchema } from './variantSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfPayload = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestCreateSchemaOneOfSixAction } from './changeRequestCreateSchemaOneOfSixAction';
import type { UpdateFeatureStrategySchema } from './updateFeatureStrategySchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestCreateSchemaOneOfSixAction =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ChangeRequestEnvironmentConfigSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestEventSchemaPayload } from './changeRequestEventSchemaPayload';
import type { ChangeRequestEventSchemaCreatedBy } from './changeRequestEventSchemaCreatedBy';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestEventSchemaCreatedBy = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestEventSchemaPayloadOneOf } from './changeRequestEventSchemaPayloadOneOf';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestEventSchemaPayloadOneOf = { [key: string]: any };

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestEventSchema } from './changeRequestEventSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestSchemaState } from './changeRequestSchemaState';
import type { ChangeRequestFeatureSchema } from './changeRequestFeatureSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestSchemaCreatedBy = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestSchemaState =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestStateSchemaState } from './changeRequestStateSchemaState';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ChangeRequestStateSchemaState =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ChangeRequestSchema } from './changeRequestSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ClientApplicationSchemaStarted } from './clientApplicationSchemaStarted';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ClientApplicationSchemaStarted = string | number;

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { FeatureStrategySchema } from './featureStrategySchema';
import type { VariantSchema } from './variantSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ClientFeaturesQuerySchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ClientFeatureSchema } from './clientFeatureSchema';
import type { SegmentSchema } from './segmentSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ClientMetricsSchemaBucket } from './clientMetricsSchemaBucket';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { DateSchema } from './dateSchema';
import type { ClientMetricsSchemaBucketToggles } from './clientMetricsSchemaBucketToggles';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ClientMetricsSchemaBucketTogglesVariants } from './clientMetricsSchemaBucketTogglesVariants';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ClientMetricsSchemaBucketTogglesVariants = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CloneEnvironmentSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CloneFeatureSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ConstraintSchemaOperator } from './constraintSchemaOperator';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
/**

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { LegalValueSchema } from './legalValueSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ContextFieldSchema } from './contextFieldSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateApiTokenSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateEnvironmentSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateFeatureSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { ConstraintSchema } from './constraintSchema';
import type { ParametersSchema } from './parametersSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateInvitedUserSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateProjectSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { CreateRoleWithPermissionsSchemaPermissionsItem } from './createRoleWithPermissionsSchemaPermissionsItem';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type CreateRoleWithPermissionsSchemaPermissionsItem = {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateServiceAccountSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface CreateUserSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type DateSchema = string | number;

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { EdgeTokenSchemaType } from './edgeTokenSchemaType';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type EdgeTokenSchemaType =

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface EmailSchema {

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface EnvironmentProjectSchema {

View File

@ -2,16 +2,26 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
/**
* A definition of the project environment
*/
export interface EnvironmentSchema {
/** The name of the environment */
name: string;
/** The type of the environment */
type: string;
/** `true` if the environment is enabled for the project, otherwise `false`. */
enabled: boolean;
protected?: boolean;
/** The sort order of the environment in the environments list */
sortOrder?: number;
/** The number of projects with this environment */
projectCount?: number | null;
/** The number of API tokens for the project environment */
apiTokenCount?: number | null;
/** The number of enabled toggles for the project environment */
enabledToggleCount?: number | null;
}

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { EnvironmentProjectSchema } from './environmentProjectSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { EnvironmentSchema } from './environmentSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { EventSchemaData } from './eventSchemaData';
import type { EventSchemaPreData } from './eventSchemaPreData';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type EventSchemaData = { [key: string]: any };

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export type EventSchemaPreData = { [key: string]: any };

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { EventSchema } from './eventSchema';

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface ExportQuerySchema {

View File

@ -2,14 +2,15 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { FeatureSchema } from './featureSchema';
import type { FeatureStrategySchema } from './featureStrategySchema';
import type { FeatureEnvironmentSchema } from './featureEnvironmentSchema';
import type { ContextFieldSchema } from './contextFieldSchema';
import type { FeatureTagSchema } from './featureTagSchema';
import type { SegmentSchema } from './segmentSchema';
import type { ExportResultSchemaSegmentsItem } from './exportResultSchemaSegmentsItem';
import type { TagTypeSchema } from './tagTypeSchema';
export interface ExportResultSchema {
features: FeatureSchema[];
@ -17,5 +18,6 @@ export interface ExportResultSchema {
featureEnvironments?: FeatureEnvironmentSchema[];
contextFields?: ContextFieldSchema[];
featureTags?: FeatureTagSchema[];
segments?: SegmentSchema[];
segments?: ExportResultSchemaSegmentsItem[];
tagTypes: TagTypeSchema[];
}

View File

@ -0,0 +1,11 @@
/**
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.22.0-beta.3
*/
export type ExportResultSchemaSegmentsItem = {
id: number;
name?: string;
};

View File

@ -2,7 +2,7 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
export interface FeatureEnvironmentMetricsSchema {

View File

@ -2,19 +2,28 @@
* Generated by orval v6.11.0 🍺
* Do not edit manually.
* Unleash API
* OpenAPI spec version: 4.21.0-beta.1
* OpenAPI spec version: 4.22.0-beta.3
*/
import type { FeatureStrategySchema } from './featureStrategySchema';
import type { VariantSchema } from './variantSchema';
/**
* A detailed description of the feature environment
*/
export interface FeatureEnvironmentSchema {
/** The name of the environment */
name: string;
featureName?: string;
environment?: string;
/** The type of the environment */
type?: string;
/** `true` if the feature is enabled for the environment, otherwise `false`. */
enabled: boolean;
/** The sort order of the feature environment in the feature environments list */
sortOrder?: number;
variantCount?: number;
/** A list of activation strategies for the feature environment */
strategies?: FeatureStrategySchema[];
/** A list of variants for the feature environment */
variants?: VariantSchema[];
}

Some files were not shown because too many files have changed in this diff Show More