@openshift-console/dynamic-plugin-sdk
Version:
Provides core APIs, types and utilities used by dynamic plugins at runtime.
92 lines (91 loc) • 2.84 kB
TypeScript
import { ActionType as Action } from 'typesafe-actions';
import type { UserKind } from '@console/internal/module/k8s/types';
import { UserInfo } from '../../../extensions';
import { AdmissionWebhookWarning } from '../../redux-types';
export declare enum ActionType {
SetUser = "setUser",
SetUserResource = "setUserResource",
BeginImpersonate = "beginImpersonate",
EndImpersonate = "endImpersonate",
SetActiveCluster = "setActiveCluster",
SetAdmissionWebhookWarning = "setAdmissionWebhookWarning",
RemoveAdmissionWebhookWarning = "removeAdmissionWebhookWarning"
}
export declare const setUser: (userInfo: UserInfo) => {
type: ActionType.SetUser;
payload: {
userInfo: UserInfo;
};
};
export declare const setUserResource: (userResource: UserKind) => {
type: ActionType.SetUserResource;
payload: {
userResource: UserKind;
};
};
export declare const beginImpersonate: (kind: string, name: string, subprotocols: string[], groups?: string[]) => {
type: ActionType.BeginImpersonate;
payload: {
kind: string;
name: string;
subprotocols: string[];
groups: string[];
};
};
export declare const endImpersonate: () => {
type: ActionType.EndImpersonate;
};
export declare const setAdmissionWebhookWarning: (id: string, warning: AdmissionWebhookWarning) => {
type: ActionType.SetAdmissionWebhookWarning;
payload: {
id: string;
warning: AdmissionWebhookWarning;
};
};
export declare const removeAdmissionWebhookWarning: (id: any) => {
type: ActionType.RemoveAdmissionWebhookWarning;
payload: {
id: any;
};
};
declare const coreActions: {
setUser: (userInfo: UserInfo) => {
type: ActionType.SetUser;
payload: {
userInfo: UserInfo;
};
};
setUserResource: (userResource: UserKind) => {
type: ActionType.SetUserResource;
payload: {
userResource: UserKind;
};
};
beginImpersonate: (kind: string, name: string, subprotocols: string[], groups?: string[]) => {
type: ActionType.BeginImpersonate;
payload: {
kind: string;
name: string;
subprotocols: string[];
groups: string[];
};
};
endImpersonate: () => {
type: ActionType.EndImpersonate;
};
setAdmissionWebhookWarning: (id: string, warning: AdmissionWebhookWarning) => {
type: ActionType.SetAdmissionWebhookWarning;
payload: {
id: string;
warning: AdmissionWebhookWarning;
};
};
removeAdmissionWebhookWarning: (id: any) => {
type: ActionType.RemoveAdmissionWebhookWarning;
payload: {
id: any;
};
};
};
export type CoreAction = Action<typeof coreActions>;
export {};