Skip to content

Commit f24ade2

Browse files
waleedlatif1claude
andcommitted
fix(apollo): harden people_search pagination, correct bulk-update output docs
- people_search: read pagination from both the nested `pagination` object (legacy /mixed_people/search) and top-level fields, avoiding silent fallback to defaults - account_bulk_update: correct output descriptions — accounts support up to 1000 per request and async is opt-in (not auto-triggered at 100 like contacts) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a71f790 commit f24ade2

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

apps/sim/tools/apollo/account_bulk_update.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,15 @@ export const apolloAccountBulkUpdateTool: ToolConfig<
143143
outputs: {
144144
accounts: {
145145
type: 'json',
146-
description:
147-
'Updated accounts (synchronous response, ≤100 accounts): [{id, account_stage_id, ...}]',
146+
description: 'Updated accounts (synchronous response): [{id, account_stage_id, ...}]',
148147
},
149148
account_ids: {
150149
type: 'json',
151150
description: 'IDs of accounts that were updated',
152151
},
153152
entity_progress_job: {
154153
type: 'json',
155-
description: 'Async job descriptor (>100 accounts or async=true)',
154+
description: 'Async job descriptor (when async=true is passed with account_ids)',
156155
optional: true,
157156
},
158157
job_id: {

apps/sim/tools/apollo/people_search.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,17 @@ export const apolloPeopleSearchTool: ToolConfig<
165165

166166
const data = await response.json()
167167

168+
// The legacy /mixed_people/search endpoint nests pagination under `pagination`,
169+
// while api_search returns these top-level. Read both shapes defensively.
170+
const pagination = data.pagination ?? {}
171+
168172
return {
169173
success: true,
170174
output: {
171175
people: data.people || [],
172-
page: data.pagination?.page || 1,
173-
per_page: data.pagination?.per_page || 25,
174-
total_entries: data.pagination?.total_entries || 0,
176+
page: pagination.page ?? data.page ?? 1,
177+
per_page: pagination.per_page ?? data.per_page ?? 25,
178+
total_entries: pagination.total_entries ?? data.total_entries ?? 0,
175179
},
176180
}
177181
},

0 commit comments

Comments
 (0)