Skip to content

Ryder/file and analytics sdk update - #56

Merged
UZ9 merged 2 commits into
mainfrom
ryder/file-and-analytics-sdk-update
Oct 20, 2025
Merged

UZ9 merged 2 commits into
mainfrom
ryder/file-and-analytics-sdk-update

Conversation

@UZ9

@UZ9 UZ9 commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@UZ9
UZ9 merged commit e48d187 into main Oct 20, 2025
2 checks passed

@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

Summary

This PR updates the Juno SDK with new email analytics capabilities and file service enhancements. The changes are primarily auto-generated SDK updates from OpenAPI specifications.

Key Changes

  • Email Analytics API: Added emailControllerGetStatistics method to retrieve email statistics with support for date range filtering, pagination, and time-based aggregation (day/week/month)
  • File Service Setup: Added fileConfigControllerSetup endpoint to initialize file services for projects/environments
  • Enhanced Authentication: Added API_Key authentication checks across all file-related APIs (upload, download, bucket, provider, config) for improved security
  • New Models: Introduced SendEmailStatisticsResponse, SendEmailStatisticsResponses, SetupFileServiceResponse, and AggregateInterval enum
  • Cleanup: Removed unused FileBucketResponse model and refactored ProjectResponses to use TypeScript declaration format
  • Import Organization: Minor import reordering in project.ts for consistency

All changes follow consistent patterns with existing SDK methods and include proper parameter validation and error handling.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are auto-generated SDK updates that follow consistent patterns with existing code. Authentication enhancements add security without breaking changes. All new methods include proper parameter validation, type safety, and error handling. The removal of unused code reduces technical debt.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/internal/api/emailApi.ts 5/5 Added emailControllerGetStatistics method for retrieving email analytics with proper parameter validation and authentication
src/internal/api/fileConfigApi.ts 5/5 Added fileConfigControllerSetup method and API_Key authentication check for file config retrieval
src/internal/model/sendEmailStatisticsResponse.ts 5/5 New response model with comprehensive email statistics fields and proper snake_case to camelCase mapping
src/internal/model/projectResponses.ts 5/5 Converted from class implementation to declare class (TypeScript declaration file format)

Sequence Diagram

sequenceDiagram
    participant Client
    participant EmailApi
    participant FileConfigApi
    participant FileServiceApis
    participant Auth
    participant Backend

    Note over Client,Backend: Email Analytics Flow
    Client->>EmailApi: emailControllerGetStatistics(startDate, limit?, offset?, aggregatedBy?, endDate?)
    EmailApi->>Auth: Check API_Key.accessToken
    Auth-->>EmailApi: Authentication applied
    EmailApi->>Backend: GET /email/analytics
    Backend-->>EmailApi: SendEmailStatisticsResponses
    EmailApi-->>Client: Return analytics data

    Note over Client,Backend: File Service Setup Flow
    Client->>FileConfigApi: fileConfigControllerSetup()
    FileConfigApi->>Auth: Check API_Key.accessToken
    Auth-->>FileConfigApi: Authentication applied
    FileConfigApi->>Backend: POST /file/config/setup
    Backend-->>FileConfigApi: SetupFileServiceResponse
    FileConfigApi-->>Client: Return setup status

    Note over Client,Backend: File Operations with Enhanced Auth
    Client->>FileServiceApis: File operations (upload, download, bucket, provider)
    FileServiceApis->>Auth: Check API_Key.accessToken (NEW)
    Auth-->>FileServiceApis: Authentication applied
    FileServiceApis->>Backend: File operation requests
    Backend-->>FileServiceApis: Response
    FileServiceApis-->>Client: Return result
Loading

14 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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