MCPcopy Index your code
hub / github.com/simstudioai/sim / buildServiceUrl

Function buildServiceUrl

apps/sim/tools/workday/soap.ts:181–193  ·  view source on GitHub ↗
(
  tenantUrl: string,
  tenant: string,
  service: WorkdayServiceKey
)

Source from the content-addressed store, hash-verified

179 * @throws Error if tenantUrl is not a trusted Workday-hosted URL (SSRF guard)
180 */
181export function buildServiceUrl(
182 tenantUrl: string,
183 tenant: string,
184 service: WorkdayServiceKey
185): string {
186 const validation = validateWorkdayTenantUrl(tenantUrl)
187 if (!validation.isValid) {
188 throw new Error(validation.error ?? 'Invalid tenantUrl')
189 }
190 const svc = WORKDAY_SERVICES[service]
191 const baseUrl = (validation.sanitized ?? tenantUrl).replace(/\/$/, '')
192 return `${baseUrl}/ccx/service/${tenant}/${svc.name}/${svc.version}`
193}
194
195/**
196 * Builds the WSDL URL for a Workday SOAP service. Retained for backwards compatibility

Callers 2

buildWsdlUrlFunction · 0.85
createWorkdaySoapClientFunction · 0.85

Calls 2

validateWorkdayTenantUrlFunction · 0.90
replaceMethod · 0.65

Tested by

no test coverage detected