Repository navigation
Analytics multi custom types - #61
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Disclaimer: This comment was AI-generated and is not necessarily completely accurate. Please take code comments with a grain of salt.
Greptile Overview
Greptile Summary
This PR updates the SDK to support multiple custom event types in analytics by replacing CustomEventTypeResponse with GetAllCustomEventTypeResponse.
Key Changes:
- Created new
GetAllCustomEventTypeResponsemodel that wraps an array ofCustomEventTypeResponseobjects - Updated
getCustomEventTypesByProject()return type insrc/lib/analytics.tsto use the new response model - Regenerated all API files with OpenAPI Generator, which reorganized imports and added
RequestFileimports across 84 files - Added export and type mapping for the new model in
src/internal/model/models.ts
Auto-Generated Code:
The vast majority of changes (83 files) are auto-generated by OpenAPI Generator and include standard formatting updates like import reordering and adding RequestFile imports. These changes are consistent and follow OpenAPI Generator patterns.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The changes are almost entirely auto-generated by OpenAPI Generator, which ensures consistency and correctness. The only manual change is updating the return type in
src/lib/analytics.tsto match the new API contract, which is a straightforward type update that maintains backward compatibility (returning an array instead of a single object) - No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| src/lib/analytics.ts | 5/5 | Updated return type from CustomEventTypeResponse to GetAllCustomEventTypeResponse to support multiple custom event types |
| src/internal/model/getAllCustomEventTypeResponse.ts | 5/5 | New auto-generated model that wraps an array of CustomEventTypeResponse objects |
| src/internal/api/analyticsApi.ts | 5/5 | Updated imports and return types to use GetAllCustomEventTypeResponse, reorganized import statements |
| src/internal/model/models.ts | 5/5 | Added export and type mapping for new GetAllCustomEventTypeResponse model |
Sequence Diagram
sequenceDiagram
participant Client
participant AnalyticsAPI
participant AnalyticsApi
participant Backend
Client->>AnalyticsAPI: getCustomEventTypesByProject(projectName)
AnalyticsAPI->>AnalyticsAPI: validateString(projectName)
AnalyticsAPI->>AnalyticsApi: analyticsControllerGetCustomEventTypes(projectName)
AnalyticsApi->>Backend: GET /analytics/custom-event-types
Backend-->>AnalyticsApi: GetAllCustomEventTypeResponse
Note over Backend,AnalyticsApi: Returns array of CustomEventTypeResponse
AnalyticsApi-->>AnalyticsAPI: response.body
AnalyticsAPI-->>Client: GetAllCustomEventTypeResponse
84 files reviewed, no comments
Contributor
Author
|
LGTM |
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.
Almost all auto-generated via OpenAPI (not OpenAI); added support for multiple custom types for analytics dashboard