sfcc-dev-mcp
Version:
MCP server for Salesforce B2C Commerce Cloud development assistance including logs, debugging, and development tools
48 lines • 1.48 kB
TypeScript
/**
* Validation Utilities
*
* This module provides validation functions for SFCC API parameters and inputs.
* It includes common validation patterns used across different API clients.
*/
/**
* Custom validation error class
*/
export declare class ValidationError extends Error {
constructor(message: string);
}
/**
* Valid instance types for SFCC site preferences
*/
declare const VALID_INSTANCE_TYPES: readonly ["staging", "development", "sandbox", "production"];
export type InstanceType = typeof VALID_INSTANCE_TYPES[number];
/**
* Validation utility class
*/
export declare class Validator {
/**
* Validate that required fields are present and not empty
*/
static validateRequired(params: Record<string, any>, requiredFields: string[]): void;
/**
* Validate instance type for site preferences
*/
static validateInstanceType(instanceType: string): InstanceType;
/**
* Validate that a string is not empty
*/
static validateNotEmpty(value: string, fieldName: string): void;
/**
* Validate that a value is a positive number
*/
static validatePositiveNumber(value: number, fieldName: string): void;
/**
* Validate object type for system objects
*/
static validateObjectType(objectType: string): void;
/**
* Validate search request structure
*/
static validateSearchRequest(searchRequest: any): void;
}
export {};
//# sourceMappingURL=validator.d.ts.map