import { FronteggApiError, ITeamUserPermission, ITeamUserRole, MachineToMachineAuthStrategy } from '@frontegg/rest-api'; import { LoaderIndicatorState, WithCallback } from '../../interfaces'; export interface ApiTokensState { loaders: LoaderIndicatorState; apiTokensDataTenant: ITenantApiTokensData[]; apiTokensDataUser: IApiTokensData[]; showAddTokenDialog: boolean; createdByUserIdColumn?: createdByUserIdColumn; deleteTokenDialog: { open: boolean; clientId?: string; id?: string; }; successDialog: { open: boolean; secret?: string; clientId?: string; }; apiTokenType: ApiTokenType; roles: ITeamUserRole[]; permissions: ITeamUserPermission[]; errors?: any; } export type ApiTokenType = 'user' | 'tenant' | null; export type createdByUserIdColumn = 'show' | 'hide' | undefined; export { MachineToMachineAuthStrategy }; export interface IApiTokensData { clientId?: string; createdAt: string; secret?: string; description: string; metadata?: {}; expires?: any; id?: string; title?: string; } export interface IUserApiTokensData extends IApiTokensData { type?: MachineToMachineAuthStrategy; } export interface IUserApiAccessTokensData { accessTokens: IUserApiTokensData[]; } export interface ITenantApiTokensData extends IApiTokensData { roleIds: string[]; tenantId: string; createdByUserId: string; type?: MachineToMachineAuthStrategy; } export interface ITenantApiAccessTokensData { accessTokens: ITenantApiTokensData[]; } export type ApiStateIndicator = { key: ApiStateKeys; value: string | boolean | FronteggApiError; }; export declare enum ApiStateKeys { LOAD_API_TOKENS = "LOAD_API_TOKENS", ADD_API_TOKEN = "ADD_API_TOKEN", DELETE_API_TOKEN = "DELETE_API_TOKEN" } export type AddTenantApiTokenPayload = WithCallback>; export type AddUserApiTokenPayload = WithCallback>;