UNPKG

@jupiterone/jupiterone-mcp

Version:

Model Context Protocol server for JupiterOne account rules and rule details

41 lines 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AccountService = void 0; const queries_js_1 = require("../graphql/queries.js"); class AccountService { client; constructor(client) { this.client = client; } /** * Get account information */ async getAccountInfo() { try { const response = await this.client.request(queries_js_1.GET_ACCOUNT_INFO); return { accountId: response.iamGetAccount.accountId, name: response.iamGetAccount.accountName, }; } catch (error) { console.error('Error getting account info', error); throw error; } } /** * Test the connection to JupiterOne */ async testConnection() { try { await this.client.request(queries_js_1.GET_ACCOUNT_INFO); return true; } catch (error) { console.error('Error testing connection to JupiterOne', error); return false; } } } exports.AccountService = AccountService; //# sourceMappingURL=account-service.js.map