// config/constants.js
export const TIMEOUTS = Object.freeze({
SHORT: 5000,
MEDIUM: 15000,
LONG: 30000,
});export const ENVIRONMENTS = {
staging: {
baseUrl: "https://staging.targetqa.com",
apiUrl: "https://api.staging.targetqa.com",
defaultTimeout: TIMEOUTS.MEDIUM,
},
production: {
baseUrl: "https://targetqa.com",
apiUrl: "https://api.targetqa.com",
defaultTimeout: TIMEOUTS.LONG,
},
};
export class StringFormatter {
static extractOrderId(text) {
const match = text.match(/Order #(\d+)/);
if (!match) throw new Error(Order ID not found in text: ${text});
return match[1];
}
}