import { WithStatus, WithCallback } from '../../../interfaces'; import { IPRestrictionsConfig, IpRestriction, GetIPRestrictionsParams, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig, CountryRestrictionConfig, CountryRestrictionRule, UpdateCountryRestrictionConfig } from '@frontegg/rest-api'; export type IPRestrictionsState = WithStatus & { data?: { config: IPRestrictionsConfig; restrictions: IpRestriction[]; }; pagination: GetIPRestrictionsParams; totalPages: number; userIpValid: boolean; }; export type EmailDomainRestrictionsState = WithStatus & { data?: { config: DomainRestrictionConfig; restrictions: DomainRestriction[]; }; }; export type SaveEmailDomainRestrictionsPayload = WithCallback; export type SaveEmailDomainRestrictionConfigPayload = WithCallback; export type CountryRestrictionsState = WithStatus & { data?: { config: CountryRestrictionConfig; restrictions: CountryRestrictionRule[]; }; }; export type SaveCountryRestrictionConfigPayload = WithCallback>; export type SaveCountryRestrictionsPayload = WithCallback<{ countryCodes: string[]; }>; export type AddCurrentUserCountryAndActivatePayload = WithCallback<{ countryCode?: string | null; }>; export interface RestrictionsState { ipRestrictions: IPRestrictionsState; emailDomainRestrictions: EmailDomainRestrictionsState; countryRestrictions: CountryRestrictionsState; }