Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/spec/packages/aip-client-javascript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ export type {
RateCardMeteredEntitlement,
SubscriptionPhaseCreate,
SubscriptionEditStretchPhase,
GetCreditBalanceParamsFilter,
ListPlansParamsFilter,
CreateCreditGrantPlanFilter,
CreditGrantPlanFilter,
ValidationIssue,
GetCreditBalanceParamsFilter,
SubscriptionProRatingConfig,
RateCardProrationConfiguration,
UnitConfig,
Expand Down Expand Up @@ -461,6 +461,7 @@ export type {
MeterQueryGranularity,
EntitlementHistoryWindowSize,
StringFieldFilterExact,
NumericFieldFilter,
PricePaymentTerm,
BooleanFieldFilter,
BillingCurrencyCode,
Expand Down
204 changes: 106 additions & 98 deletions api/spec/packages/aip-client-javascript/src/models/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,48 @@ export const validationIssueSeverity = z
.enum(['critical', 'warning'])
.describe('Severity level of a billing validation issue.')

export const numericFieldFilter = z
.union([
z.number(),
z.object({
eq: z
.number()
.optional()
.describe('Value strictly equals the given numeric value.'),
neq: z
.number()
.optional()
.describe('Value does not equal the given numeric value.'),
oeq: z
.array(z.number())
.optional()

.describe(
'Returns entities that match any of the comma-delimited numeric values.',
),
lt: z
.number()
.optional()
.describe('Value is less than the given numeric value.'),
lte: z
.number()
.optional()
.describe('Value is less than or equal to the given numeric value.'),
gt: z
.number()
.optional()
.describe('Value is greater than the given numeric value.'),
gte: z
.number()
.optional()
.describe('Value is greater than or equal to the given numeric value.'),
}),
])

.describe(
'Filter by a numeric value. All properties are optional; provide exactly one to specify the comparison.',
)

export const creditGrantVoidPaymentAdjustment = z
.enum(['none'])

Expand Down Expand Up @@ -1542,48 +1584,6 @@ export const publicLabels = z
'Public labels store information about an entity that can be used for filtering a list of objects.',
)

export const numericFieldFilter = z
.union([
z.number(),
z.object({
eq: z
.number()
.optional()
.describe('Value strictly equals the given numeric value.'),
neq: z
.number()
.optional()
.describe('Value does not equal the given numeric value.'),
oeq: z
.array(z.number())
.optional()

.describe(
'Returns entities that match any of the comma-delimited numeric values.',
),
lt: z
.number()
.optional()
.describe('Value is less than the given numeric value.'),
lte: z
.number()
.optional()
.describe('Value is less than or equal to the given numeric value.'),
gt: z
.number()
.optional()
.describe('Value is greater than the given numeric value.'),
gte: z
.number()
.optional()
.describe('Value is greater than or equal to the given numeric value.'),
}),
])

.describe(
'Filter by a numeric value. All properties are optional; provide exactly one to specify the comparison.',
)

export const chargeCostBasisType = z
.enum(['dynamic', 'pinned', 'manual'])
.describe('Cost basis resolution mode of a charge.')
Expand Down Expand Up @@ -3354,13 +3354,6 @@ export const entitlementMeasureUsageFrom = z
'The time from which usage is measured, as a preset or an explicit timestamp.',
)

export const getCreditBalanceParamsFilter = z
.object({
currency: stringFieldFilterExact.optional(),
featureKey: stringFieldFilter.optional(),
})
.describe('Filter options for getting a credit balance.')

export const listPlansParamsFilter = z
.object({
key: stringFieldFilter.optional(),
Expand Down Expand Up @@ -3422,6 +3415,15 @@ export const validationIssue = z
})
.describe('A validation issue found while processing a billing resource.')

export const getCreditBalanceParamsFilter = z
.object({
currency: stringFieldFilterExact.optional(),
featureKey: stringFieldFilter.optional(),
planKey: stringFieldFilter.optional(),
planVersion: numericFieldFilter.optional(),
})
.describe('Filter options for getting a credit balance.')

export const voidCreditGrantRequest = z
.object({
paymentAdjustment: creditGrantVoidPaymentAdjustment
Expand Down Expand Up @@ -4021,6 +4023,8 @@ export const listCreditTransactionsParamsFilter = z
type: creditTransactionType.optional(),
currency: billingCurrencyCode.optional(),
featureKey: stringFieldFilter.optional(),
planKey: stringFieldFilter.optional(),
planVersion: numericFieldFilter.optional(),
})
.describe('Filter options for listing credit transactions.')

Expand Down Expand Up @@ -10507,6 +10511,48 @@ export const validationIssueSeverityWire = z
.enum(['critical', 'warning'])
.describe('Severity level of a billing validation issue.')

export const numericFieldFilterWire = z
.union([
z.number(),
z.strictObject({
eq: z
.number()
.optional()
.describe('Value strictly equals the given numeric value.'),
neq: z
.number()
.optional()
.describe('Value does not equal the given numeric value.'),
oeq: z
.array(z.number())
.optional()

.describe(
'Returns entities that match any of the comma-delimited numeric values.',
),
lt: z
.number()
.optional()
.describe('Value is less than the given numeric value.'),
lte: z
.number()
.optional()
.describe('Value is less than or equal to the given numeric value.'),
gt: z
.number()
.optional()
.describe('Value is greater than the given numeric value.'),
gte: z
.number()
.optional()
.describe('Value is greater than or equal to the given numeric value.'),
}),
])

.describe(
'Filter by a numeric value. All properties are optional; provide exactly one to specify the comparison.',
)

export const creditGrantVoidPaymentAdjustmentWire = z
.enum(['none'])

Expand Down Expand Up @@ -11368,48 +11414,6 @@ export const publicLabelsWire = z
'Public labels store information about an entity that can be used for filtering a list of objects.',
)

export const numericFieldFilterWire = z
.union([
z.number(),
z.strictObject({
eq: z
.number()
.optional()
.describe('Value strictly equals the given numeric value.'),
neq: z
.number()
.optional()
.describe('Value does not equal the given numeric value.'),
oeq: z
.array(z.number())
.optional()

.describe(
'Returns entities that match any of the comma-delimited numeric values.',
),
lt: z
.number()
.optional()
.describe('Value is less than the given numeric value.'),
lte: z
.number()
.optional()
.describe('Value is less than or equal to the given numeric value.'),
gt: z
.number()
.optional()
.describe('Value is greater than the given numeric value.'),
gte: z
.number()
.optional()
.describe('Value is greater than or equal to the given numeric value.'),
}),
])

.describe(
'Filter by a numeric value. All properties are optional; provide exactly one to specify the comparison.',
)

export const chargeCostBasisTypeWire = z
.enum(['dynamic', 'pinned', 'manual'])
.describe('Cost basis resolution mode of a charge.')
Expand Down Expand Up @@ -13172,13 +13176,6 @@ export const entitlementMeasureUsageFromWire = z
'The time from which usage is measured, as a preset or an explicit timestamp.',
)

export const getCreditBalanceParamsFilterWire = z
.strictObject({
currency: stringFieldFilterExactWire.optional(),
feature_key: stringFieldFilterWire.optional(),
})
.describe('Filter options for getting a credit balance.')

export const listPlansParamsFilterWire = z
.strictObject({
key: stringFieldFilterWire.optional(),
Expand Down Expand Up @@ -13240,6 +13237,15 @@ export const validationIssueWire = z
})
.describe('A validation issue found while processing a billing resource.')

export const getCreditBalanceParamsFilterWire = z
.strictObject({
currency: stringFieldFilterExactWire.optional(),
feature_key: stringFieldFilterWire.optional(),
plan_key: stringFieldFilterWire.optional(),
plan_version: numericFieldFilterWire.optional(),
})
.describe('Filter options for getting a credit balance.')

export const voidCreditGrantRequestWire = z
.strictObject({
payment_adjustment: creditGrantVoidPaymentAdjustmentWire.optional(),
Expand Down Expand Up @@ -13830,6 +13836,8 @@ export const listCreditTransactionsParamsFilterWire = z
type: creditTransactionTypeWire.optional(),
currency: billingCurrencyCodeWire.optional(),
feature_key: stringFieldFilterWire.optional(),
plan_key: stringFieldFilterWire.optional(),
plan_version: numericFieldFilterWire.optional(),
})
.describe('Filter options for listing credit transactions.')

Expand Down
Loading
Loading