Skip to content

Conversation

@charlietlamb
Copy link

@charlietlamb charlietlamb commented Jan 2, 2026

Greptile Summary

Enhanced the list customers endpoint by transitioning from GET with query parameters to POST with request body, enabling more complex filtering capabilities.

Key Changes:

API changes

  • Changed listCustomers method from GET /customers to POST /customers/list
  • Added plans parameter to filter customers by product plans and versions
  • Added subscription_status parameter to filter by subscription state (active, scheduled)
  • Added search parameter for text-based customer searching

Improvements

  • Replaced query string approach with POST body for better support of complex filter structures

Confidence Score: 4/5

  • This PR is safe to merge with one minor cleanup opportunity
  • The changes are straightforward - transitioning from GET to POST for the list customers endpoint and adding new filter parameters. Type definitions are properly updated with Zod schemas. The only issue is an unused import that should be removed for code cleanliness.
  • No files require special attention - the unused import in cusMethods.ts is a minor style issue

Important Files Changed

Filename Overview
package/src/sdk/customers/cusTypes.ts Added new filtering parameters (plans, subscription_status, search) to ListCustomersParamsSchema for enhanced customer querying
package/src/sdk/customers/cusMethods.ts Changed listCustomers from GET with query params to POST with body; unused buildPathWithQuery import remains

Sequence Diagram

sequenceDiagram
    participant Client
    participant SDK
    participant API

    Client->>SDK: list(params)
    SDK->>SDK: staticWrapper(listCustomers, instance, {params})
    SDK->>API: POST /customers/list
    Note over SDK,API: Body: {limit?, offset?, plans?, subscription_status?, search?}
    API-->>SDK: {list: Customer[], total, limit, offset}
    SDK-->>Client: AutumnPromise<CustomerList>
Loading

@vercel
Copy link

vercel bot commented Jan 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
autumn-ui Error Error Jan 2, 2026 10:01pm

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.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

import type { Autumn } from "../client";
import { AutumnError } from "../error";
import type { AutumnPromise } from "../response";
import { buildPathWithQuery, staticWrapper } from "../utils";
Copy link

Choose a reason for hiding this comment

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

style: buildPathWithQuery is no longer used in this file

Suggested change
import { buildPathWithQuery, staticWrapper } from "../utils";
import { staticWrapper } from "../utils";
Prompt To Fix With AI
This is a comment left during a code review.
Path: package/src/sdk/customers/cusMethods.ts
Line: 4:4

Comment:
**style:** `buildPathWithQuery` is no longer used in this file

```suggestion
import { staticWrapper } from "../utils";
```

How can I resolve this? If you propose a fix, please make it concise.

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