Commit 2749a08
feat: add total field to user search API response
The search API returns both users array and total count, but the SDK
was only returning the users array. This change updates the SDK to
return both fields in a UserSearchResponse object.
Changes:
- Added UserSearchResponse type with users and total fields
- Updated search() and searchTestUsers() to return UserSearchResponse
- Updated internal MultipleUsersResponse type to include total field
- Updated tests to verify total field is returned
- Kept deprecated searchAll() unchanged for backward compatibility
Fixes issue where SDK users couldn't access the total count returned
by the API, making pagination planning difficult.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 24d4316 commit 2749a08
3 files changed
+19
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
585 | 590 | | |
586 | 591 | | |
587 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
1012 | 1014 | | |
1013 | 1015 | | |
1014 | 1016 | | |
1015 | | - | |
| 1017 | + | |
1016 | 1018 | | |
1017 | 1019 | | |
1018 | 1020 | | |
| |||
1050 | 1052 | | |
1051 | 1053 | | |
1052 | 1054 | | |
1053 | | - | |
| 1055 | + | |
1054 | 1056 | | |
1055 | 1057 | | |
1056 | 1058 | | |
| |||
1069 | 1071 | | |
1070 | 1072 | | |
1071 | 1073 | | |
1072 | | - | |
| 1074 | + | |
1073 | 1075 | | |
1074 | 1076 | | |
1075 | 1077 | | |
| |||
1105 | 1107 | | |
1106 | 1108 | | |
1107 | 1109 | | |
1108 | | - | |
| 1110 | + | |
1109 | 1111 | | |
1110 | 1112 | | |
1111 | 1113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
618 | 620 | | |
619 | 621 | | |
620 | 622 | | |
621 | | - | |
622 | | - | |
| 623 | + | |
| 624 | + | |
623 | 625 | | |
624 | 626 | | |
625 | 627 | | |
626 | 628 | | |
627 | 629 | | |
628 | 630 | | |
629 | 631 | | |
630 | | - | |
| 632 | + | |
631 | 633 | | |
632 | | - | |
633 | | - | |
| 634 | + | |
| 635 | + | |
634 | 636 | | |
635 | 637 | | |
636 | 638 | | |
637 | 639 | | |
638 | 640 | | |
639 | | - | |
| 641 | + | |
640 | 642 | | |
641 | 643 | | |
642 | 644 | | |
| |||
0 commit comments