1 import { API_CODES } from '../../constants';
3 const { GLOBAL_SUCCESS, SINGLE_SUCCESS } = API_CODES;
6 Response: { Code: number };
11 Responses?: Response[];
14 export const allSucceded = ({ Code, Responses = [] }: Responses): boolean => {
15 if (Code !== GLOBAL_SUCCESS) {
18 return !Responses.some(({ Response: { Code } }) => Code !== SINGLE_SUCCESS);