Skip to content

Commit 824e326

Browse files
committed
fix(rippling): add missing supergroup fields and fix validation issues
- Add 5 missing supergroup fields (allow_non_employees, can_override_role_states, priority, is_invisible, ignore_prov_group_matching) to types, list, and get tools - Fix ok fallback from true to false in supergroup inclusion/exclusion member update tools - Fix truthy check to null check for description param in create_custom_object_field
1 parent d873674 commit 824e326

File tree

6 files changed

+67
-3
lines changed

6 files changed

+67
-3
lines changed

apps/sim/tools/rippling/create_custom_object_field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const ripplingCreateCustomObjectFieldTool: ToolConfig<RipplingCreateCusto
6262
}),
6363
body: (params) => {
6464
const body: Record<string, unknown> = { name: params.name, data_type: params.dataType }
65-
if (params.description) body.description = params.description
65+
if (params.description != null) body.description = params.description
6666
if (params.isUnique != null) body.is_unique = params.isUnique
6767
if (params.enableHistory != null) body.enable_history = params.enableHistory
6868
return body

apps/sim/tools/rippling/get_supergroup.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ export const ripplingGetSupergroupTool: ToolConfig<RipplingGetSupergroupParams>
4444
mutually_exclusive_key: (data.mutually_exclusive_key as string) ?? null,
4545
cumulatively_exhaustive_default: (data.cumulatively_exhaustive_default as boolean) ?? null,
4646
include_terminated: (data.include_terminated as boolean) ?? null,
47+
allow_non_employees: (data.allow_non_employees as boolean) ?? null,
48+
can_override_role_states: (data.can_override_role_states as boolean) ?? null,
49+
priority: (data.priority as number) ?? null,
50+
is_invisible: (data.is_invisible as boolean) ?? null,
51+
ignore_prov_group_matching: (data.ignore_prov_group_matching as boolean) ?? null,
4752
},
4853
}
4954
},
@@ -74,5 +79,26 @@ export const ripplingGetSupergroupTool: ToolConfig<RipplingGetSupergroupParams>
7479
description: 'Whether the group includes terminated roles',
7580
optional: true,
7681
},
82+
allow_non_employees: {
83+
type: 'boolean',
84+
description: 'Whether the group allows non-employees',
85+
optional: true,
86+
},
87+
can_override_role_states: {
88+
type: 'boolean',
89+
description: 'Whether the group can override role states',
90+
optional: true,
91+
},
92+
priority: { type: 'number', description: 'Group priority', optional: true },
93+
is_invisible: {
94+
type: 'boolean',
95+
description: 'Whether the group is invisible',
96+
optional: true,
97+
},
98+
ignore_prov_group_matching: {
99+
type: 'boolean',
100+
description: 'Whether to ignore provisioning group matching',
101+
optional: true,
102+
},
77103
},
78104
}

apps/sim/tools/rippling/list_supergroups.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ export const ripplingListSupergroupsTool: ToolConfig<RipplingListSupergroupsPara
6464
cumulatively_exhaustive_default:
6565
(item.cumulatively_exhaustive_default as boolean) ?? null,
6666
include_terminated: (item.include_terminated as boolean) ?? null,
67+
allow_non_employees: (item.allow_non_employees as boolean) ?? null,
68+
can_override_role_states: (item.can_override_role_states as boolean) ?? null,
69+
priority: (item.priority as number) ?? null,
70+
is_invisible: (item.is_invisible as boolean) ?? null,
71+
ignore_prov_group_matching: (item.ignore_prov_group_matching as boolean) ?? null,
6772
})),
6873
totalCount: results.length,
6974
nextLink: (data.next_link as string) ?? null,

apps/sim/tools/rippling/types.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const COMPANY_OUTPUT_PROPERTIES = {
5959
primary_email: { type: 'string', description: 'Primary email' },
6060
parent_legal_entity_id: { type: 'string', description: 'Parent legal entity ID' },
6161
legal_entities_id: { type: 'json', description: 'Array of legal entity IDs' },
62+
physical_address: { type: 'json', description: 'Physical address of the holding entity' },
6263
} as const satisfies Record<string, OutputProperty>
6364

6465
/** Department output properties */
@@ -170,6 +171,32 @@ export const SUPERGROUP_OUTPUT_PROPERTIES = {
170171
app_owner_id: { type: 'string', description: 'App owner ID' },
171172
group_type: { type: 'string', description: 'Group type' },
172173
name: { type: 'string', description: 'Name' },
174+
sub_group_type: { type: 'string', description: 'Sub group type' },
175+
read_only: { type: 'boolean', description: 'Whether the group is read only' },
176+
parent: { type: 'string', description: 'Parent group ID' },
177+
mutually_exclusive_key: { type: 'string', description: 'Mutually exclusive key' },
178+
cumulatively_exhaustive_default: {
179+
type: 'boolean',
180+
description: 'Whether the group is the cumulatively exhaustive default',
181+
},
182+
include_terminated: {
183+
type: 'boolean',
184+
description: 'Whether the group includes terminated roles',
185+
},
186+
allow_non_employees: {
187+
type: 'boolean',
188+
description: 'Whether the group allows non-employees',
189+
},
190+
can_override_role_states: {
191+
type: 'boolean',
192+
description: 'Whether the group can override role states',
193+
},
194+
priority: { type: 'number', description: 'Group priority' },
195+
is_invisible: { type: 'boolean', description: 'Whether the group is invisible' },
196+
ignore_prov_group_matching: {
197+
type: 'boolean',
198+
description: 'Whether to ignore provisioning group matching',
199+
},
173200
} as const satisfies Record<string, OutputProperty>
174201

175202
/** Group member output properties */
@@ -192,6 +219,9 @@ export const CUSTOM_OBJECT_OUTPUT_PROPERTIES = {
192219
api_name: { type: 'string', description: 'API name' },
193220
plural_label: { type: 'string', description: 'Plural label' },
194221
category_id: { type: 'string', description: 'Category ID' },
222+
native_category_id: { type: 'string', description: 'Native category ID' },
223+
managed_package_install_id: { type: 'string', description: 'Package install ID' },
224+
owner_id: { type: 'string', description: 'Owner ID' },
195225
enable_history: { type: 'boolean', description: 'Whether history is enabled' },
196226
} as const satisfies Record<string, OutputProperty>
197227

@@ -209,6 +239,7 @@ export const CUSTOM_OBJECT_FIELD_OUTPUT_PROPERTIES = {
209239
is_immutable: { type: 'boolean', description: 'Whether the field is immutable' },
210240
is_standard: { type: 'boolean', description: 'Whether the field is standard' },
211241
enable_history: { type: 'boolean', description: 'Whether history is enabled' },
242+
managed_package_install_id: { type: 'string', description: 'Package install ID' },
212243
} as const satisfies Record<string, OutputProperty>
213244

214245
/** Custom object record output properties */
@@ -228,6 +259,8 @@ export const CUSTOM_APP_OUTPUT_PROPERTIES = {
228259
name: { type: 'string', description: 'App name' },
229260
api_name: { type: 'string', description: 'API name' },
230261
description: { type: 'string', description: 'Description' },
262+
icon: { type: 'string', description: 'Icon URL' },
263+
pages: { type: 'json', description: 'Array of page summaries' },
231264
} as const satisfies Record<string, OutputProperty>
232265

233266
/** Custom page output properties */

apps/sim/tools/rippling/update_supergroup_exclusion_members.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const ripplingUpdateSupergroupExclusionMembersTool: ToolConfig<RipplingUp
4444
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
4545
}
4646
const data = await response.json()
47-
return { success: true, output: { ok: data.ok ?? true } }
47+
return { success: true, output: { ok: data.ok ?? false } }
4848
},
4949
outputs: {
5050
ok: { type: 'boolean', description: 'Whether the operation succeeded' },

apps/sim/tools/rippling/update_supergroup_inclusion_members.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const ripplingUpdateSupergroupInclusionMembersTool: ToolConfig<RipplingUp
4444
throw new Error(`Rippling API error (${response.status}): ${errorText}`)
4545
}
4646
const data = await response.json()
47-
return { success: true, output: { ok: data.ok ?? true } }
47+
return { success: true, output: { ok: data.ok ?? false } }
4848
},
4949
outputs: {
5050
ok: { type: 'boolean', description: 'Whether the operation succeeded' },

0 commit comments

Comments
 (0)