Skip to content

Commit 8120712

Browse files
committed
fix SOAP API
1 parent 70ff0ee commit 8120712

File tree

16 files changed

+48
-101
lines changed

16 files changed

+48
-101
lines changed

apps/sim/app/api/tools/workday/assign-onboarding/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const RequestSchema = z.object({
1717
workerId: z.string().min(1),
1818
onboardingPlanId: z.string().min(1),
1919
actionEventId: z.string().min(1),
20-
stages: z.string().optional(),
2120
})
2221

2322
export async function POST(request: NextRequest) {
@@ -43,7 +42,7 @@ export async function POST(request: NextRequest) {
4342
const [result] = await client.Put_Onboarding_Plan_AssignmentAsync({
4443
Onboarding_Plan_Assignment_Data: {
4544
Onboarding_Plan_Reference: wdRef('Onboarding_Plan_ID', data.onboardingPlanId),
46-
Person_Reference: wdRef('Employee_ID', data.workerId),
45+
Person_Reference: wdRef('WID', data.workerId),
4746
Action_Event_Reference: wdRef('Background_Check_ID', data.actionEventId),
4847
Assignment_Effective_Moment: new Date().toISOString(),
4948
Active: true,

apps/sim/app/api/tools/workday/create-prehire/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const RequestSchema = z.object({
1818
email: z.string().optional(),
1919
phoneNumber: z.string().optional(),
2020
address: z.string().optional(),
21-
sourceId: z.string().optional(),
2221
})
2322

2423
export async function POST(request: NextRequest) {

apps/sim/app/api/tools/workday/hire/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ const RequestSchema = z.object({
1717
preHireId: z.string().min(1),
1818
positionId: z.string().min(1),
1919
hireDate: z.string().min(1),
20-
jobProfileId: z.string().optional(),
21-
locationId: z.string().optional(),
22-
managerId: z.string().optional(),
2320
employeeType: z.string().optional(),
2421
})
2522

apps/sim/app/api/tools/workday/list-workers/route.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const RequestSchema = z.object({
1414
tenant: z.string().min(1),
1515
username: z.string().min(1),
1616
password: z.string().min(1),
17-
search: z.string().optional(),
1817
limit: z.number().optional(),
1918
offset: z.number().optional(),
2019
})

apps/sim/app/api/tools/workday/update-worker/route.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,15 @@ export async function POST(request: NextRequest) {
4444
Run_Now: true,
4545
},
4646
Change_Personal_Information_Data: {
47-
Worker_Reference: wdRef('Employee_ID', data.workerId),
47+
Person_Reference: wdRef('Employee_ID', data.workerId),
4848
Personal_Information_Data: data.fields,
4949
},
5050
})
5151

52-
const eventRef = result?.Event_Reference
53-
5452
return NextResponse.json({
5553
success: true,
5654
output: {
57-
eventId: extractRefId(eventRef),
55+
eventId: extractRefId(result?.Personal_Information_Change_Event_Reference),
5856
workerId: data.workerId,
5957
},
6058
})

apps/sim/blocks/blocks/workday.ts

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,6 @@ export const WorkdayBlock: BlockConfig = {
9595
},
9696

9797
// List Workers
98-
{
99-
id: 'search',
100-
title: 'Search',
101-
type: 'short-input',
102-
placeholder: 'Search by name or ID',
103-
condition: { field: 'operation', value: 'list_workers' },
104-
},
10598
{
10699
id: 'limit',
107100
title: 'Limit',
@@ -151,14 +144,6 @@ export const WorkdayBlock: BlockConfig = {
151144
condition: { field: 'operation', value: 'create_prehire' },
152145
mode: 'advanced',
153146
},
154-
{
155-
id: 'sourceId',
156-
title: 'Recruiting Source',
157-
type: 'short-input',
158-
placeholder: 'Source ID (e.g., referral, job board)',
159-
condition: { field: 'operation', value: 'create_prehire' },
160-
mode: 'advanced',
161-
},
162147

163148
// Hire Employee
164149
{
@@ -175,7 +160,7 @@ export const WorkdayBlock: BlockConfig = {
175160
type: 'short-input',
176161
placeholder: 'Position to assign',
177162
condition: { field: 'operation', value: ['hire_employee', 'change_job'] },
178-
required: { field: 'operation', value: 'hire_employee' },
163+
required: { field: 'operation', value: ['hire_employee'] },
179164
},
180165
{
181166
id: 'hireDate',
@@ -195,23 +180,23 @@ export const WorkdayBlock: BlockConfig = {
195180
title: 'Job Profile ID',
196181
type: 'short-input',
197182
placeholder: 'Job profile ID',
198-
condition: { field: 'operation', value: ['hire_employee', 'change_job'] },
183+
condition: { field: 'operation', value: 'change_job' },
199184
mode: 'advanced',
200185
},
201186
{
202187
id: 'locationId',
203188
title: 'Location ID',
204189
type: 'short-input',
205190
placeholder: 'Work location ID',
206-
condition: { field: 'operation', value: ['hire_employee', 'change_job'] },
191+
condition: { field: 'operation', value: 'change_job' },
207192
mode: 'advanced',
208193
},
209194
{
210195
id: 'managerId',
211196
title: 'Manager ID',
212197
type: 'short-input',
213198
placeholder: 'Manager worker ID',
214-
condition: { field: 'operation', value: ['hire_employee', 'change_job'] },
199+
condition: { field: 'operation', value: 'change_job' },
215200
mode: 'advanced',
216201
},
217202
{
@@ -277,14 +262,6 @@ Output: {"businessTitle": "Senior Engineer"}`,
277262
condition: { field: 'operation', value: 'assign_onboarding' },
278263
required: { field: 'operation', value: 'assign_onboarding' },
279264
},
280-
{
281-
id: 'stages',
282-
title: 'Stage IDs (JSON)',
283-
type: 'short-input',
284-
placeholder: '["stage1", "stage2"]',
285-
condition: { field: 'operation', value: 'assign_onboarding' },
286-
mode: 'advanced',
287-
},
288265

289266
// Get Organizations
290267
{
@@ -402,14 +379,12 @@ Output: {"businessTitle": "Senior Engineer"}`,
402379
username: { type: 'string', description: 'ISU username' },
403380
password: { type: 'string', description: 'ISU password' },
404381
workerId: { type: 'string', description: 'Worker ID' },
405-
search: { type: 'string', description: 'Search term' },
406382
limit: { type: 'number', description: 'Result limit' },
407383
offset: { type: 'number', description: 'Pagination offset' },
408384
legalName: { type: 'string', description: 'Legal name for pre-hire' },
409385
email: { type: 'string', description: 'Email address' },
410386
phoneNumber: { type: 'string', description: 'Phone number' },
411387
address: { type: 'string', description: 'Address' },
412-
sourceId: { type: 'string', description: 'Recruiting source ID' },
413388
preHireId: { type: 'string', description: 'Pre-hire record ID' },
414389
positionId: { type: 'string', description: 'Position ID' },
415390
hireDate: { type: 'string', description: 'Hire date (YYYY-MM-DD)' },
@@ -420,7 +395,6 @@ Output: {"businessTitle": "Senior Engineer"}`,
420395
fields: { type: 'json', description: 'Fields to update' },
421396
onboardingPlanId: { type: 'string', description: 'Onboarding plan ID' },
422397
actionEventId: { type: 'string', description: 'Action event ID for onboarding' },
423-
stages: { type: 'string', description: 'Onboarding stage IDs' },
424398
orgType: { type: 'string', description: 'Organization type filter' },
425399
effectiveDate: { type: 'string', description: 'Effective date (YYYY-MM-DD)' },
426400
reason: { type: 'string', description: 'Reason for change or termination' },
@@ -433,7 +407,7 @@ Output: {"businessTitle": "Senior Engineer"}`,
433407
workers: { type: 'json', description: 'Array of worker profiles' },
434408
total: { type: 'number', description: 'Total count of results' },
435409
preHireId: { type: 'string', description: 'Created pre-hire ID' },
436-
descriptor: { type: 'string', description: 'Display name' },
410+
descriptor: { type: 'string', description: 'Display name of pre-hire' },
437411
workerId: { type: 'string', description: 'Worker ID' },
438412
employeeId: { type: 'string', description: 'Employee ID' },
439413
hireDate: { type: 'string', description: 'Hire date' },

apps/sim/tools/workday/assign_onboarding.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ export const assignOnboardingTool: ToolConfig<
5757
visibility: 'user-or-llm',
5858
description: 'Action event ID that enables the onboarding plan (e.g., the hiring event ID)',
5959
},
60-
stages: {
61-
type: 'string',
62-
required: false,
63-
visibility: 'user-or-llm',
64-
description:
65-
'JSON array of onboarding stage IDs to include (optional, defaults to all stages)',
66-
},
6760
},
6861

6962
request: {

apps/sim/tools/workday/create_prehire.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ export const createPrehireTool: ToolConfig<
6363
visibility: 'user-or-llm',
6464
description: 'Address of the pre-hire',
6565
},
66-
sourceId: {
67-
type: 'string',
68-
required: false,
69-
visibility: 'user-or-llm',
70-
description: 'Recruiting source ID (e.g., referral, job board)',
71-
},
7266
},
7367

7468
request: {

apps/sim/tools/workday/get_compensation.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ export const getCompensationTool: ToolConfig<
2626
visibility: 'user-only',
2727
description: 'Workday tenant name',
2828
},
29-
accessToken: {
29+
username: {
3030
type: 'string',
3131
required: true,
32-
visibility: 'hidden',
33-
description: 'OAuth 2.0 access token for Workday REST API',
32+
visibility: 'user-only',
33+
description: 'Integration System User username',
34+
},
35+
password: {
36+
type: 'string',
37+
required: true,
38+
visibility: 'user-only',
39+
description: 'Integration System User password',
3440
},
3541
workerId: {
3642
type: 'string',

apps/sim/tools/workday/get_organizations.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ export const getOrganizationsTool: ToolConfig<
2626
visibility: 'user-only',
2727
description: 'Workday tenant name',
2828
},
29-
accessToken: {
29+
username: {
3030
type: 'string',
3131
required: true,
32-
visibility: 'hidden',
33-
description: 'OAuth 2.0 access token for Workday REST API',
32+
visibility: 'user-only',
33+
description: 'Integration System User username',
34+
},
35+
password: {
36+
type: 'string',
37+
required: true,
38+
visibility: 'user-only',
39+
description: 'Integration System User password',
3440
},
3541
type: {
3642
type: 'string',

0 commit comments

Comments
 (0)