Repository navigation
Add WhatsApp analytics and collector metrics commands - #66
Merged
Merged
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
✨ Finishing Touches📝 Generate docstrings
Comment |
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.
Adds
analytics getandanalytics metricsfor scoped WhatsApp business analytics. Customers can filter by project/number and RFC3339 range, inspect message/call vitals, retrieve complete JSON, or print Prometheus/OpenMetrics collector text and response metadata. Invalid ranges, windows and formats fail before transport; HTML upstream failures produce safe errors.JSON preserves observed phone activity spans, quiet gaps, weighted averages and sample counts. These describe observed intervals, not device power state.
The CLI pins published SDK
0.1.0-dev.20261004011426, using its nativeanalytics.getandanalytics.metricsmethods and shared aggregate types. This removes duplicated response models and local request construction. The SDK's complete contracts pin merged API revision171a9683ff45d11a4b5d3917dc428ad2722b0d99from API/Console #473, including Logs and Usage. This PR inherits Usage CLI #67.Validation: all 1,018 CLI tests across 107 files pass on Node 22 with three workers, including project-confined Analytics and collector HTTP requests, complete interval JSON, call vitals and safe HTML failures. Formatting, lint, typecheck, production build and package dry-run pass. The production dependency audit reports zero vulnerabilities. All eight SDK packages are confirmed in npm at the exact version, and the installed SDK lock integrity matches the registry.
SDK publication is verified separately from CLI publication. This PR does not publish the CLI or deploy the API.
Summary by CodeRabbit
analytics getto retrieve WhatsApp analytics for a selected time range or session.analytics metricsto retrieve activity metrics in Prometheus or OpenMetrics format, with optional session and segment filters.