Skip to content

Commit 750e29d

Browse files
committed
fix(rippling): add missing response fields, fix truthy checks, and improve UX
- Add 9 missing Worker fields (location, gender, date_of_birth, race, ethnicity, citizenship, termination_details, custom_fields, country_fields) - Add 5 missing User fields (name, emails, phone_numbers, addresses, photos) - Add worker expandable field to GroupMember types and all 3 member list tools - Add 5 optional params to trigger_report_run (includeObjectIds, includeTotalRows, formatDateFields, formatCurrencyFields, outputType) - Fix truthy checks to null checks in create_department, create/update_work_location - Fix customObjectId subBlock label to say "API Name" instead of "ID"
1 parent 2397fd0 commit 750e29d

13 files changed

+117
-15
lines changed

apps/sim/blocks/blocks/rippling.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ export const RipplingBlock: BlockConfig = {
326326
},
327327
{
328328
id: 'customObjectId',
329-
title: 'Custom Object ID',
329+
title: 'Custom Object API Name',
330330
type: 'short-input',
331-
placeholder: 'Enter the custom object ID',
331+
placeholder: 'Enter the custom object API name (e.g. my_object__c)',
332332
condition: { field: 'operation', value: [...CUSTOM_OBJECT_ID_OPS] },
333333
required: { field: 'operation', value: [...CUSTOM_OBJECT_ID_OPS] },
334334
},

apps/sim/tools/rippling/create_department.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export const ripplingCreateDepartmentTool: ToolConfig<RipplingCreateDepartmentPa
4242
}),
4343
body: (params) => {
4444
const body: Record<string, unknown> = { name: params.name }
45-
if (params.parentId) body.parent_id = params.parentId
46-
if (params.referenceCode) body.reference_code = params.referenceCode
45+
if (params.parentId != null) body.parent_id = params.parentId
46+
if (params.referenceCode != null) body.reference_code = params.referenceCode
4747
return body
4848
},
4949
},

apps/sim/tools/rippling/create_work_location.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ export const ripplingCreateWorkLocationTool: ToolConfig<RipplingCreateWorkLocati
5656
body: (params) => {
5757
const body: Record<string, unknown> = { name: params.name }
5858
const address: Record<string, string> = {}
59-
if (params.streetAddress) address.street_address = params.streetAddress
60-
if (params.locality) address.locality = params.locality
61-
if (params.region) address.region = params.region
62-
if (params.postalCode) address.postal_code = params.postalCode
63-
if (params.country) address.country = params.country
59+
if (params.streetAddress != null) address.street_address = params.streetAddress
60+
if (params.locality != null) address.locality = params.locality
61+
if (params.region != null) address.region = params.region
62+
if (params.postalCode != null) address.postal_code = params.postalCode
63+
if (params.country != null) address.country = params.country
6464
if (Object.keys(address).length > 0) body.address = address
6565
return body
6666
},

apps/sim/tools/rippling/get_user.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export const ripplingGetUserTool: ToolConfig<RipplingGetUserParams> = {
3939
locale: (data.locale as string) ?? null,
4040
timezone: (data.timezone as string) ?? null,
4141
number: (data.number as string) ?? null,
42+
name: data.name ?? null,
43+
emails: data.emails ?? [],
44+
phone_numbers: data.phone_numbers ?? [],
45+
addresses: data.addresses ?? [],
46+
photos: data.photos ?? [],
4247
},
4348
}
4449
},
@@ -53,5 +58,10 @@ export const ripplingGetUserTool: ToolConfig<RipplingGetUserParams> = {
5358
locale: { type: 'string', description: 'Locale', optional: true },
5459
timezone: { type: 'string', description: 'Timezone', optional: true },
5560
number: { type: 'string', description: 'Profile number', optional: true },
61+
name: { type: 'json', description: 'User name object', optional: true },
62+
emails: { type: 'json', description: 'Email addresses', optional: true },
63+
phone_numbers: { type: 'json', description: 'Phone numbers', optional: true },
64+
addresses: { type: 'json', description: 'Addresses', optional: true },
65+
photos: { type: 'json', description: 'Photos', optional: true },
5666
},
5767
}

apps/sim/tools/rippling/get_worker.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ export const ripplingGetWorkerTool: ToolConfig<RipplingGetWorkerParams> = {
6262
overtime_exemption: (data.overtime_exemption as string) ?? null,
6363
title_effective_date: (data.title_effective_date as string) ?? null,
6464
business_partners_id: (data.business_partners_id as unknown[]) ?? [],
65+
location: data.location ?? null,
66+
gender: (data.gender as string) ?? null,
67+
date_of_birth: (data.date_of_birth as string) ?? null,
68+
race: (data.race as string) ?? null,
69+
ethnicity: (data.ethnicity as string) ?? null,
70+
citizenship: (data.citizenship as string) ?? null,
71+
termination_details: data.termination_details ?? null,
72+
custom_fields: data.custom_fields ?? null,
73+
country_fields: data.country_fields ?? null,
6574
},
6675
}
6776
},
@@ -89,5 +98,14 @@ export const ripplingGetWorkerTool: ToolConfig<RipplingGetWorkerParams> = {
8998
overtime_exemption: { type: 'string', description: 'Overtime exemption', optional: true },
9099
title_effective_date: { type: 'string', description: 'Title effective date', optional: true },
91100
business_partners_id: { type: 'json', description: 'Business partner IDs', optional: true },
101+
location: { type: 'json', description: 'Worker location', optional: true },
102+
gender: { type: 'string', description: 'Gender', optional: true },
103+
date_of_birth: { type: 'string', description: 'Date of birth', optional: true },
104+
race: { type: 'string', description: 'Race', optional: true },
105+
ethnicity: { type: 'string', description: 'Ethnicity', optional: true },
106+
citizenship: { type: 'string', description: 'Citizenship', optional: true },
107+
termination_details: { type: 'json', description: 'Termination details', optional: true },
108+
custom_fields: { type: 'json', description: 'Custom fields', optional: true },
109+
country_fields: { type: 'json', description: 'Country-specific fields', optional: true },
92110
},
93111
}

apps/sim/tools/rippling/list_supergroup_exclusion_members.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const ripplingListSupergroupExclusionMembersTool: ToolConfig<RipplingList
6565
full_name: (item.full_name as string) ?? null,
6666
work_email: (item.work_email as string) ?? null,
6767
worker_id: (item.worker_id as string) ?? null,
68+
worker: item.worker ?? null,
6869
})),
6970
totalCount: results.length,
7071
nextLink: (data.next_link as string) ?? null,

apps/sim/tools/rippling/list_supergroup_inclusion_members.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const ripplingListSupergroupInclusionMembersTool: ToolConfig<RipplingList
6565
full_name: (item.full_name as string) ?? null,
6666
work_email: (item.work_email as string) ?? null,
6767
worker_id: (item.worker_id as string) ?? null,
68+
worker: item.worker ?? null,
6869
})),
6970
totalCount: results.length,
7071
nextLink: (data.next_link as string) ?? null,

apps/sim/tools/rippling/list_supergroup_members.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const ripplingListSupergroupMembersTool: ToolConfig<RipplingListSupergrou
6161
full_name: (item.full_name as string) ?? null,
6262
work_email: (item.work_email as string) ?? null,
6363
worker_id: (item.worker_id as string) ?? null,
64+
worker: item.worker ?? null,
6465
})),
6566
totalCount: results.length,
6667
nextLink: (data.next_link as string) ?? null,

apps/sim/tools/rippling/list_users.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ export const ripplingListUsersTool: ToolConfig<RipplingListUsersParams> = {
5959
locale: (item.locale as string) ?? null,
6060
timezone: (item.timezone as string) ?? null,
6161
number: (item.number as string) ?? null,
62+
name: item.name ?? null,
63+
emails: item.emails ?? [],
64+
phone_numbers: item.phone_numbers ?? [],
65+
addresses: item.addresses ?? [],
66+
photos: item.photos ?? [],
6267
})),
6368
totalCount: results.length,
6469
nextLink: (data.next_link as string) ?? null,

apps/sim/tools/rippling/list_workers.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ export const ripplingListWorkersTool: ToolConfig<RipplingListWorkersParams> = {
8686
overtime_exemption: (item.overtime_exemption as string) ?? null,
8787
title_effective_date: (item.title_effective_date as string) ?? null,
8888
business_partners_id: (item.business_partners_id as unknown[]) ?? [],
89+
location: item.location ?? null,
90+
gender: (item.gender as string) ?? null,
91+
date_of_birth: (item.date_of_birth as string) ?? null,
92+
race: (item.race as string) ?? null,
93+
ethnicity: (item.ethnicity as string) ?? null,
94+
citizenship: (item.citizenship as string) ?? null,
95+
termination_details: item.termination_details ?? null,
96+
custom_fields: item.custom_fields ?? null,
97+
country_fields: item.country_fields ?? null,
8998
})),
9099
totalCount: results.length,
91100
nextLink: (data.next_link as string) ?? null,

0 commit comments

Comments
 (0)