Skip to content

Analytics multi custom types - #61

Merged
UZ9 merged 4 commits into
mainfrom
ryder/analytics-multi-custom-types
Nov 10, 2025
Merged

UZ9 merged 4 commits into
mainfrom
ryder/analytics-multi-custom-types

Conversation

@UZ9

@UZ9 UZ9 commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

Almost all auto-generated via OpenAPI (not OpenAI); added support for multiple custom types for analytics dashboard

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GetAllCustomEventTypeResponse model that wraps an array of CustomEventTypeResponse objects
  • Updated getCustomEventTypesByProject() return type in src/lib/analytics.ts to use the new response model
  • Regenerated all API files with OpenAPI Generator, which reorganized imports and added RequestFile imports 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.ts to 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
Loading

84 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@UZ9

UZ9 commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

LGTM

@UZ9
UZ9 merged commit f44a8e5 into main Nov 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant