Repository navigation
feat(web-api): add admin.analytics.members.activity method - #2873
Draft
lukegalbraithrussell wants to merge 1 commit into
Draft
lukegalbraithrussell wants to merge 1 commit into
lukegalbraithrussell wants to merge 1 commit into
Conversation
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
🦋 Changeset detectedLatest commit: cb9a433 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2873 +/- ##
==========================================
+ Coverage 94.48% 94.63% +0.15%
==========================================
Files 68 68
Lines 10906 10918 +12
Branches 697 700 +3
==========================================
+ Hits 10304 10332 +28
+ Misses 572 561 -11
+ Partials 30 25 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
1 of 9 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds the
admin.analytics.members.activitymethod to@slack/web-api.client.admin.analytics.members.activity()returns activity metrics for each member of an organization or workspace for one day. All of its arguments are optional (date,team_id,member_types,user_ids,limit, andcursor), so it binds withbindApiCallWithOptionalArgument.member_typesis typed with the method's member type values.admin.analytics:read.AdminAnalyticsMembersActivityResponseis generated withscripts/code_generator.rbfrom thejson-logssample for this method in java-slack-sdk, feat: add admin.analytics.members.activity method java-slack-sdk#1716. Running the generator also rewrote 10 unrelated response files that have drifted from java-slack-sdk's samples, and those changes are left out.This pull request is independent of #2874, which adds
admin.analytics.members.metadata, so either one can be reviewed and merged first. Whichever merges second needs a rebase, since both editadmin.analyticsinmethods.tsand the request types.Testing
With an org admin's user token that has
admin.analytics:read:client.admin.analytics.members.activity()and confirm the response hasdate,available_date_range,members, andtotal_count.dateset to a day inavailable_date_rangeanduser_idsset to an array of member IDs, and confirm only those members are returned.limit: 3and followresponse_metadata.next_cursoruntil it's empty.Live check: these calls ran against an Enterprise developer sandbox with this branch's built
WebClient.datereturns the requested day,user_idsandmember_typesas arrays filter the results, andlimit: 3withcursorpages through every member with no repeats.WebClientsends arrays as JSON strings, and the method accepts that as well as comma-separated values.Requirements
🤖 Generated with Claude Code