Skip to content

Commit

Permalink
Add filtering to entitlement entities OM-778 OM-736 OM-732 (#1257)
Browse files Browse the repository at this point in the history
* feat: add new fields to API

* fix(api): rename filterMeter to filterMeterSlug for clarity

* feat: add filtering to all entities

* fix(api): fix casing mismatch in API ordering

* style: fix lint
  • Loading branch information
GAlexIHU authored Jul 26, 2024
1 parent 2069507 commit d0ae77e
Show file tree
Hide file tree
Showing 20 changed files with 1,513 additions and 592 deletions.
674 changes: 402 additions & 272 deletions api/api.gen.go

Large diffs are not rendered by default.

738 changes: 466 additions & 272 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions api/client/node/schemas/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,18 @@ export interface components {
* Usage: `?feature=feature-1&feature=feature-2`
*/
queryFilterFeature?: string[]
/**
* @description Filtering by multiple meterSlug.
*
* Usage: `?meterSlug=meter-1&meterSlug=meter-2`
*/
queryFilterMeterSlug?: string[]
/**
* @description Filtering by multiple entitlement types.
*
* Usage: `?entitlementType=metered&entitlementType=static`
*/
queryFilterEntitlementType?: string[]
queryFilterGroupBy?: {
[key: string]: string
}
Expand Down Expand Up @@ -2210,6 +2222,10 @@ export interface operations {
pageSize?: components['parameters']['queryPageSize']
limit?: components['parameters']['queryLimit']
offset?: components['parameters']['queryOffset']
subject?: components['parameters']['queryFilterSubject']
feature?: components['parameters']['queryFilterFeature']
entitlementType?: components['parameters']['queryFilterEntitlementType']
order?: components['parameters']['order']
/** @description Order by field */
orderBy?: 'createdAt' | 'updatedAt'
}
Expand Down Expand Up @@ -2237,6 +2253,8 @@ export interface operations {
pageSize?: components['parameters']['queryPageSize']
limit?: components['parameters']['queryLimit']
offset?: components['parameters']['queryOffset']
meterSlug?: components['parameters']['queryFilterMeterSlug']
order?: components['parameters']['order']
/** @description Order by field */
orderBy?: 'id' | 'createdAt' | 'updatedAt'
/** @description Include archived features. */
Expand Down Expand Up @@ -2337,6 +2355,8 @@ export interface operations {
pageSize?: components['parameters']['queryPageSize']
limit?: components['parameters']['queryLimit']
offset?: components['parameters']['queryOffset']
subject?: components['parameters']['queryFilterSubject']
feature?: components['parameters']['queryFilterFeature']
order?: components['parameters']['order']
/** @description Order by field */
orderBy?: 'id' | 'createdAt' | 'updatedAt'
Expand Down
72 changes: 72 additions & 0 deletions api/client/python/src/openmeter/_operations/_operations.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions api/client/python/src/openmeter/aio/_operations/_operations.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions api/client/web/src/client/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,18 @@ export interface components {
* Usage: `?feature=feature-1&feature=feature-2`
*/
queryFilterFeature?: string[]
/**
* @description Filtering by multiple meterSlug.
*
* Usage: `?meterSlug=meter-1&meterSlug=meter-2`
*/
queryFilterMeterSlug?: string[]
/**
* @description Filtering by multiple entitlement types.
*
* Usage: `?entitlementType=metered&entitlementType=static`
*/
queryFilterEntitlementType?: string[]
queryFilterGroupBy?: {
[key: string]: string
}
Expand Down Expand Up @@ -2210,6 +2222,10 @@ export interface operations {
pageSize?: components['parameters']['queryPageSize']
limit?: components['parameters']['queryLimit']
offset?: components['parameters']['queryOffset']
subject?: components['parameters']['queryFilterSubject']
feature?: components['parameters']['queryFilterFeature']
entitlementType?: components['parameters']['queryFilterEntitlementType']
order?: components['parameters']['order']
/** @description Order by field */
orderBy?: 'createdAt' | 'updatedAt'
}
Expand Down Expand Up @@ -2237,6 +2253,8 @@ export interface operations {
pageSize?: components['parameters']['queryPageSize']
limit?: components['parameters']['queryLimit']
offset?: components['parameters']['queryOffset']
meterSlug?: components['parameters']['queryFilterMeterSlug']
order?: components['parameters']['order']
/** @description Order by field */
orderBy?: 'id' | 'createdAt' | 'updatedAt'
/** @description Include archived features. */
Expand Down Expand Up @@ -2337,6 +2355,8 @@ export interface operations {
pageSize?: components['parameters']['queryPageSize']
limit?: components['parameters']['queryLimit']
offset?: components['parameters']['queryOffset']
subject?: components['parameters']['queryFilterSubject']
feature?: components['parameters']['queryFilterFeature']
order?: components['parameters']['order']
/** @description Order by field */
orderBy?: 'id' | 'createdAt' | 'updatedAt'
Expand Down
Loading

0 comments on commit d0ae77e

Please sign in to comment.