Skip to content

Commit 6ed4b74

Browse files
feat(api): add filter by key support to list-customers operation (#3694)
1 parent 490acf6 commit 6ed4b74

File tree

4 files changed

+177
-107
lines changed

4 files changed

+177
-107
lines changed

api/spec/src/v3/customers/operations.tsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ using TypeSpec.OpenAPI;
1313

1414
namespace Customers;
1515

16+
/**
17+
* Filter options for listing customers.
18+
*/
19+
@friendlyName("ListCustomersParamsFilter")
20+
model ListCustomersParamsFilter {
21+
/**
22+
* Filter customers by key.
23+
* Case-insensitive partial match.
24+
*/
25+
key?: Shared.ExternalResourceKey;
26+
}
27+
1628
/**
1729
* Query params for listing customers.
1830
*/
@@ -32,6 +44,14 @@ model ListCustomersParams {
3244
*/
3345
@query(#{ name: "sort" })
3446
sort?: Common.SortQuery;
47+
48+
/**
49+
* Filter customers returned in the response.
50+
*
51+
* To filter customers by key add the following query param: filter[key]=my-db-id
52+
*/
53+
@query(#{ style: "deepObject", explode: true })
54+
filter?: ListCustomersParamsFilter;
3555
}
3656

3757
interface CustomersOperations {

0 commit comments

Comments
 (0)