| 618 | * response parser — no WSDL fetch. |
| 619 | */ |
| 620 | export async function createWorkdaySoapClient( |
| 621 | tenantUrl: string, |
| 622 | tenant: string, |
| 623 | service: WorkdayServiceKey, |
| 624 | username: string, |
| 625 | password: string |
| 626 | ): Promise<WorkdayClient> { |
| 627 | const endpoint = buildServiceUrl(tenantUrl, tenant, service) |
| 628 | logger.info('Creating Workday SOAP client', { service, endpoint }) |
| 629 | |
| 630 | function bind(operation: WorkdayOperation): SoapOperationFn { |
| 631 | return (args) => callOperation(operation, args, endpoint, username, password) |
| 632 | } |
| 633 | |
| 634 | return { |
| 635 | Get_WorkersAsync: bind('Get_Workers'), |
| 636 | Get_OrganizationsAsync: bind('Get_Organizations'), |
| 637 | Put_ApplicantAsync: bind('Put_Applicant'), |
| 638 | Hire_EmployeeAsync: bind('Hire_Employee'), |
| 639 | Change_JobAsync: bind('Change_Job'), |
| 640 | Terminate_EmployeeAsync: bind('Terminate_Employee'), |
| 641 | Change_Personal_InformationAsync: bind('Change_Personal_Information'), |
| 642 | Put_Onboarding_Plan_AssignmentAsync: bind('Put_Onboarding_Plan_Assignment'), |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | /** |
| 647 | * Builds a Workday object reference in the format the SOAP API expects. |