Skip to content

Commit a73a0fb

Browse files
committed
fix(rippling): guard startDate by operation and clarify totalCount descriptions
- Guard startDate/endDate with operation check to prevent candidateStartDate from clobbering date filters on leave/activity operations - Update totalCount output descriptions on paginated tools to clarify it reflects page size, not total record count
1 parent 2beee21 commit a73a0fb

File tree

10 files changed

+14
-12
lines changed

10 files changed

+14
-12
lines changed

apps/sim/blocks/blocks/rippling.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ export const RipplingBlock: BlockConfig = {
333333
if (params.lastName) mapped.lastName = params.lastName
334334
if (params.email) mapped.email = params.email
335335
if (params.jobTitle) mapped.jobTitle = params.jobTitle
336-
if (params.startDate) mapped.startDate = params.startDate
337-
if (params.endDate) mapped.endDate = params.endDate
336+
if (params.startDate && params.operation !== 'push_candidate')
337+
mapped.startDate = params.startDate
338+
if (params.endDate && params.operation !== 'push_candidate') mapped.endDate = params.endDate
338339
if (params.status) mapped.status = params.status
339340
if (params.managedBy) mapped.managedBy = params.managedBy
340341

@@ -344,7 +345,8 @@ export const RipplingBlock: BlockConfig = {
344345
if (params.groupName) mapped.name = params.groupName
345346
if (params.candidatePhone) mapped.phone = params.candidatePhone
346347
if (params.candidateDepartment) mapped.department = params.candidateDepartment
347-
if (params.candidateStartDate) mapped.startDate = params.candidateStartDate
348+
if (params.candidateStartDate && params.operation === 'push_candidate')
349+
mapped.startDate = params.candidateStartDate
348350
if (params.nextCursor) mapped.next = params.nextCursor
349351

350352
if (params.users) {

apps/sim/tools/rippling/get_company_activity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const ripplingGetCompanyActivityTool: ToolConfig<
114114
},
115115
totalCount: {
116116
type: 'number',
117-
description: 'Total number of activity events returned',
117+
description: 'Number of activity events returned on this page',
118118
},
119119
nextCursor: {
120120
type: 'string',

apps/sim/tools/rippling/list_custom_fields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const ripplingListCustomFieldsTool: ToolConfig<
9090
},
9191
totalCount: {
9292
type: 'number',
93-
description: 'Total number of custom fields returned',
93+
description: 'Number of custom fields returned on this page',
9494
},
9595
},
9696
}

apps/sim/tools/rippling/list_departments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const ripplingListDepartmentsTool: ToolConfig<
8888
},
8989
totalCount: {
9090
type: 'number',
91-
description: 'Total number of departments returned',
91+
description: 'Number of departments returned on this page',
9292
},
9393
},
9494
}

apps/sim/tools/rippling/list_employees.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const ripplingListEmployeesTool: ToolConfig<
106106
},
107107
totalCount: {
108108
type: 'number',
109-
description: 'Total number of employees returned',
109+
description: 'Number of employees returned on this page',
110110
},
111111
},
112112
}

apps/sim/tools/rippling/list_employees_with_terminated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const ripplingListEmployeesWithTerminatedTool: ToolConfig<
107107
},
108108
totalCount: {
109109
type: 'number',
110-
description: 'Total number of employees returned',
110+
description: 'Number of employees returned on this page',
111111
},
112112
},
113113
}

apps/sim/tools/rippling/list_leave_balances.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const ripplingListLeaveBalancesTool: ToolConfig<
101101
},
102102
totalCount: {
103103
type: 'number',
104-
description: 'Total number of leave balances returned',
104+
description: 'Number of leave balances returned on this page',
105105
},
106106
},
107107
}

apps/sim/tools/rippling/list_levels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const ripplingListLevelsTool: ToolConfig<
8585
},
8686
totalCount: {
8787
type: 'number',
88-
description: 'Total number of levels returned',
88+
description: 'Number of levels returned on this page',
8989
},
9090
},
9191
}

apps/sim/tools/rippling/list_teams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const ripplingListTeamsTool: ToolConfig<RipplingListTeamsParams, Rippling
8383
},
8484
totalCount: {
8585
type: 'number',
86-
description: 'Total number of teams returned',
86+
description: 'Number of teams returned on this page',
8787
},
8888
},
8989
}

apps/sim/tools/rippling/list_work_locations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const ripplingListWorkLocationsTool: ToolConfig<
9696
},
9797
totalCount: {
9898
type: 'number',
99-
description: 'Total number of work locations returned',
99+
description: 'Number of work locations returned on this page',
100100
},
101101
},
102102
}

0 commit comments

Comments
 (0)