Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// NOTE(miguel) Typescript types ignored since this file will be removed
import { Dispatch } from "redux";
import { ActionType, createActionDeprecated } from "typesafe-actions";
import Function from "../shared/Function";
import KubelessConfig from "../shared/KubelessConfig";
import { definedNamespaces } from "../shared/Namespace";
import { IFunction, IRuntime } from "../shared/types";
export const requestFunctions = createActionDeprecated("REQUEST_FUNCTIONS");
export const receiveFunctions = createActionDeprecated(
"RECEIVE_FUNCTIONS",
(functions: IFunction[]) => ({
functions,
type: "RECEIVE_FUNCTIONS",
}),
);
export const errorFunctions = createActionDeprecated(
"ERROR_FUNCTIONS",
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
// NOTE(miguel) Typescript types ignored since this file will be removed
import { Dispatch } from "redux";
import { ActionType, createActionDeprecated } from "typesafe-actions";
import Function from "../shared/Function";
import KubelessConfig from "../shared/KubelessConfig";
import { definedNamespaces } from "../shared/Namespace";
import { IFunction, IRuntime } from "../shared/types";
export const requestFunctions = createActionDeprecated("REQUEST_FUNCTIONS");
export const receiveFunctions = createActionDeprecated(
"RECEIVE_FUNCTIONS",
(functions: IFunction[]) => ({
functions,
type: "RECEIVE_FUNCTIONS",
}),
);
export const errorFunctions = createActionDeprecated(
"ERROR_FUNCTIONS",
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
f,
export const receiveFunctions = createActionDeprecated(
"RECEIVE_FUNCTIONS",
(functions: IFunction[]) => ({
functions,
type: "RECEIVE_FUNCTIONS",
}),
);
export const errorFunctions = createActionDeprecated(
"ERROR_FUNCTIONS",
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
f,
type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
name,
type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
"RECEIVE_RUNTIMES",
(runtimes: IRuntime[]) => ({
runtimes,
type: "RECEIVE_RUNTIMES",
}),
);
const allActions = [
type: "RECEIVE_FUNCTIONS",
}),
);
export const errorFunctions = createActionDeprecated(
"ERROR_FUNCTIONS",
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
f,
type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
name,
type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
"RECEIVE_RUNTIMES",
(runtimes: IRuntime[]) => ({
runtimes,
type: "RECEIVE_RUNTIMES",
}),
);
const allActions = [
requestFunctions,
receiveFunctions,
requestRuntimes,
receiveRuntimes,
import { ActionType, createActionDeprecated } from "typesafe-actions";
import Function from "../shared/Function";
import KubelessConfig from "../shared/KubelessConfig";
import { definedNamespaces } from "../shared/Namespace";
import { IFunction, IRuntime } from "../shared/types";
export const requestFunctions = createActionDeprecated("REQUEST_FUNCTIONS");
export const receiveFunctions = createActionDeprecated(
"RECEIVE_FUNCTIONS",
(functions: IFunction[]) => ({
functions,
type: "RECEIVE_FUNCTIONS",
}),
);
export const errorFunctions = createActionDeprecated(
"ERROR_FUNCTIONS",
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
f,
type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
name,
type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
f,
type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
name,
type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
"RECEIVE_RUNTIMES",
(runtimes: IRuntime[]) => ({
runtimes,
type: "RECEIVE_RUNTIMES",
}),
);
const allActions = [
requestFunctions,
receiveFunctions,
requestRuntimes,
receiveRuntimes,
errorFunctions,
selectFunction,
setPodName,
];
export type FunctionsAction = ActionType;
"ERROR_FUNCTIONS",
(err: Error, op: "create" | "update" | "fetch" | "delete") => ({
err,
op,
type: "ERROR_FUNCTIONS",
}),
);
export const selectFunction = createActionDeprecated("SELECT_FUNCTION", (f: IFunction) => ({
f,
type: "SELECT_FUNCTION",
}));
export const setPodName = createActionDeprecated("SET_FUNCTION_POD_NAME", (name: string) => ({
name,
type: "SET_FUNCTION_POD_NAME",
}));
export const requestRuntimes = createActionDeprecated("REQUEST_RUNTIMES");
export const receiveRuntimes = createActionDeprecated(
"RECEIVE_RUNTIMES",
(runtimes: IRuntime[]) => ({
runtimes,
type: "RECEIVE_RUNTIMES",
}),
);
const allActions = [
requestFunctions,
receiveFunctions,
requestRuntimes,
receiveRuntimes,
errorFunctions,
selectFunction,
setPodName,
];