UNPKG

mattermost-redux

Version:

Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client

35 lines (34 loc) 1.43 kB
"use strict"; // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. Object.defineProperty(exports, "__esModule", { value: true }); exports.getAgents = getAgents; exports.getAgentsStatus = getAgentsStatus; exports.getLLMServices = getLLMServices; const helpers_1 = require("./helpers"); const action_types_1 = require("../action_types"); const client_1 = require("../client"); function getAgents() { return (0, helpers_1.bindClientFunc)({ clientFunc: client_1.Client4.getAgents, onSuccess: [action_types_1.AgentTypes.RECEIVED_AGENTS], onFailure: action_types_1.AgentTypes.AGENTS_FAILURE, onRequest: action_types_1.AgentTypes.AGENTS_REQUEST, }); } function getAgentsStatus() { return (0, helpers_1.bindClientFunc)({ clientFunc: client_1.Client4.getAgentsStatus, onSuccess: [action_types_1.AgentTypes.RECEIVED_AGENTS_STATUS], onFailure: action_types_1.AgentTypes.AGENTS_STATUS_FAILURE, onRequest: action_types_1.AgentTypes.AGENTS_STATUS_REQUEST, }); } function getLLMServices() { return (0, helpers_1.bindClientFunc)({ clientFunc: client_1.Client4.getLLMServices, onSuccess: [action_types_1.AgentTypes.RECEIVED_LLM_SERVICES], onFailure: action_types_1.AgentTypes.LLM_SERVICES_FAILURE, onRequest: action_types_1.AgentTypes.LLM_SERVICES_REQUEST, }); }