Skip to main content
Glama

SFCC Development MCP Server

by taurgis
code-versions-client.ts1.51 kB
/** * OCAPI Code Versions Client * * This module handles all SFCC code version related operations including * retrieving code versions and activating specific versions for deployment management. */ import { OCAPIConfig } from '../../types/types.js'; import { OCAPIAuthClient } from '../base/ocapi-auth-client.js'; import { Validator } from '../../utils/validator.js'; import { buildOCAPIBaseUrl } from '../../utils/ocapi-url-builder.js'; /** * OCAPI Code Versions Client * Handles code version management operations for SFCC instances */ export class OCAPICodeVersionsClient extends OCAPIAuthClient { constructor(config: OCAPIConfig) { super(config); // Override the baseUrl for this specialized client this.baseUrl = buildOCAPIBaseUrl(config); } /** * Get all code versions from the SFCC instance * * @returns {Promise<any>} Code version result with data array containing version information */ async getCodeVersions(): Promise<any> { return this.get('/code_versions'); } /** * Activate a specific code version by setting its active flag to true * * @param {string} codeVersionId - The ID of the code version to activate * @returns {Promise<any>} Updated code version object */ async activateCodeVersion(codeVersionId: string): Promise<any> { Validator.validateRequired({ codeVersionId }, ['codeVersionId']); const requestBody = { active: true, }; return this.patch(`/code_versions/${codeVersionId}`, requestBody); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/taurgis/sfcc-dev-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server