UNPKG

@kontent-ai/management-sdk

Version:
10 lines (9 loc) 503 B
/** * Validates a value that will be interpolated into a URL path segment and returns it * unchanged when it is safe. Throws when the value is empty/whitespace or contains a * path separator or traversal/query sequence that could hijack the request route. * * @param value Raw value to be placed into the URL path * @param segmentName Human-readable name of the segment (used in the error message) */ export declare function assertValidUrlPathSegment(value: string, segmentName: string): string;