Skip to content

Commit a99a984

Browse files
committed
chore: update spec
1 parent e108cf2 commit a99a984

4 files changed

Lines changed: 714 additions & 758 deletions

File tree

api/spec/packages/aip/src/governance/governance.tsp

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ namespace Governance;
77
/**
88
* List of customer identifiers to evaluate access for.
99
*/
10-
@friendlyName("GovernanceQueryCustomersFilter")
11-
model GovernanceQueryCustomersFilter {
10+
@friendlyName("GovernanceQueryRequestCustomers")
11+
model GovernanceQueryRequestCustomers {
1212
/**
1313
* Each entry can be a customer `key` or a usage-attribution subject `key`.
1414
* Identifiers that cannot be resolved to a customer are reported in the response
1515
* `errors` array.
1616
*/
1717
@summary("Customer keys and usage-attribution subjects")
1818
@minItems(1)
19-
@maxItems(50)
19+
@maxItems(100)
2020
keys: string[];
2121
}
2222

@@ -25,27 +25,22 @@ model GovernanceQueryCustomersFilter {
2525
* available in the organization are returned. Providing this list is recommended
2626
* to reduce the response size and the load on the backend services.
2727
*/
28-
@friendlyName("GovernanceQueryFeaturesFilter")
29-
model GovernanceQueryFeaturesFilter {
28+
@friendlyName("GovernanceQueryRequestFeatures")
29+
model GovernanceQueryRequestFeatures {
3030
/**
3131
* List of feature keys to evaluate access for.
3232
*/
3333
@summary("Feature Keys")
3434
@minItems(1)
35-
@maxItems(50)
35+
@maxItems(100)
3636
keys: string[];
3737
}
3838

3939
/**
40-
* Filters to apply to the governance query.
40+
* Query to evaluate feature access for a list of customers.
4141
*/
42-
@friendlyName("GovernanceQueryFilters")
43-
model GovernanceQueryFilters {
44-
#suppress "@openmeter/api-spec-aip/doc-decorator" "-"
45-
customers: GovernanceQueryCustomersFilter;
46-
#suppress "@openmeter/api-spec-aip/doc-decorator" "-"
47-
features?: GovernanceQueryFeaturesFilter;
48-
42+
@friendlyName("GovernanceQueryRequest")
43+
model GovernanceQueryRequest {
4944
/**
5045
* Whether to include credit balance availability for each resolved customer. When
5146
* true, each result entry includes `has_available_credits`.
@@ -54,15 +49,14 @@ model GovernanceQueryFilters {
5449
*/
5550
@summary("Include credits")
5651
include_credits?: boolean = false;
57-
}
5852

59-
/**
60-
* Query to evaluate feature access for a list of customers.
61-
*/
62-
@friendlyName("GovernanceQueryRequest")
63-
model GovernanceQueryRequest {
6453
#suppress "@openmeter/api-spec-aip/doc-decorator" "-"
65-
filters: GovernanceQueryFilters;
54+
@summary("Customer")
55+
customer: GovernanceQueryRequestCustomers;
56+
57+
#suppress "@openmeter/api-spec-aip/doc-decorator" "-"
58+
@summary("Feature")
59+
feature?: GovernanceQueryRequestFeatures;
6660
}
6761

6862
/**
@@ -117,15 +111,6 @@ model GovernanceQueryResult {
117111
@summary("Customer")
118112
customer: Customers.Customer;
119113

120-
/**
121-
* Whether the customer has any available prepaid credit balance.
122-
*
123-
* Only populated when the request was made with `include_credits=true`.
124-
*/
125-
@visibility(Lifecycle.Read)
126-
@summary("Has available credits")
127-
has_available_credits?: boolean;
128-
129114
/**
130115
* Map of features with their access status.
131116
*

api/spec/packages/aip/src/governance/operations.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ interface GovernanceOperations {
2424
*/
2525
@extension(Shared.UnstableExtension, true)
2626
@extension(Shared.InternalExtension, true)
27+
@extension(Shared.PrivateExtension, true)
2728
@post
2829
@route("/query")
2930
@operationId("query-governance-access")

0 commit comments

Comments
 (0)