Skip to content

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Nov 28, 2025

This PR regenerates code to match the latest API Definition.

@jackfischer jackfischer merged commit 331f6e3 into main Nov 28, 2025
3 checks passed
@greptile-apps
Copy link

greptile-apps bot commented Nov 28, 2025

Greptile Overview

Greptile Summary

This automated SDK regeneration adds a new export() endpoint to the copilots client for backing up and migrating copilot configurations.

Key Changes:

  • Added new export() method to CopilotsClient with proper authentication, error handling, and 60-second timeout
  • Created three new TypeScript types: ExportCopilotsRequest, ExportCopilotsResponse, and ExportedCopilot
  • Implemented pagination support with cursor, hasMore, and limit parameters
  • Added comprehensive test coverage for the new endpoint
  • Version bumped from 0.1.13 to 0.1.14 across package.json, version.ts, and BaseClient.ts
  • Updated reference documentation with usage examples

Code Quality:
The generated code follows existing patterns in the SDK, including consistent error handling (CredalError, CredalTimeoutError), proper type exports, and standard request/response structure. The use of unknown types for complex configuration fields in ExportedCopilot aligns with existing patterns in the codebase (e.g., ResponseChunk.structuredOutput).

Confidence Score: 5/5

  • This PR is safe to merge with no identified risks.
  • This is an automated SDK regeneration by Fern that follows established patterns, includes comprehensive tests, maintains version consistency across all files, and adds a well-structured new feature with proper error handling and documentation.
  • No files require special attention.

Important Files Changed

File Analysis

Filename Score Overview
src/api/resources/copilots/client/requests/ExportCopilotsRequest.ts 5/5 New request type for copilot export with date filters, pagination cursor, and limit.
src/api/resources/copilots/types/ExportedCopilot.ts 4/5 New type for exported copilot with unknown types for complex configuration fields.
src/api/resources/copilots/client/Client.ts 5/5 New export() method added with proper error handling, timeouts, and auth.
tests/wire/copilots.test.ts 5/5 New test case for export endpoint with mock server and response validation.

Sequence Diagram

sequenceDiagram
    participant Client as SDK Client
    participant Export as CopilotsClient
    participant Auth as Authentication
    participant API as Backend API
    
    Client->>Export: call export method
    Export->>Auth: request authentication
    Auth-->>Export: return auth data
    Export->>Export: prepare headers
    Export->>API: send POST request
    
    alt Success
        API-->>Export: return copilots
        Export-->>Client: ExportCopilotsResponse
    else Error
        API-->>Export: error response
        Export-->>Client: throw CredalError
    else Timeout
        API-->>Export: timeout occurs
        Export-->>Client: throw CredalTimeoutError
    end
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 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.

2 participants