Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .agents/skills/api/rules/aip-126-enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Reference: https://kong-aip.netlify.app/aip/126/

- All enum wire values must be `snake_case` (enforced as an error by the `casing-aip-errors` linter rule).
- Every enum must define an `unknown` member as the zero/default value.
- Prefer defining an `unknown` member as the zero/default value. This is a recommendation, not a requirement — most domains (charges, subscriptions, currencies) omit it, so do not flag its absence as a violation.
- Prefer enums over booleans for two-state fields — this allows a third state to be added later without a breaking change.
26 changes: 12 additions & 14 deletions api/spec/packages/aip-client-javascript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ export type {
CreateLabels,
TaxConfigStripe,
TaxConfigExternalInvoicing,
FlatFeeDiscounts,
ChargeFlatFeeDiscounts,
PriceFree,
WorkflowCollectionAlignmentSubscription,
WorkflowPaymentChargeAutomaticallySettings,
WorkflowPaymentSendInvoiceSettings,
InvoiceExternalIds,
InvoiceExternalReferences,
InvoiceAvailableActionDetails,
InvoiceWorkflowInvoicingSettings,
InvoiceLineExternalIds,
InvoiceLineExternalReferences,
LlmCostProvider,
LlmCostModel,
RateCardStaticEntitlement,
Expand Down Expand Up @@ -157,7 +157,6 @@ export type {
QueryFilterStringMapItem,
CustomerKeyReference,
CustomerUsageAttribution,
BillingAddress,
Address,
AppStripeCreateCheckoutSessionCustomerUpdate,
AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement,
Expand Down Expand Up @@ -232,9 +231,8 @@ export type {
CreateCustomerRequest,
Customer,
UpsertCustomerRequest,
InvoiceCustomer,
PartyAddresses,
Supplier,
InvoiceCustomer,
AppStripeCreateCheckoutSessionConsentCollection,
ListCustomerEntitlementAccessResponseData,
WorkflowCollectionAlignmentAnchored,
Expand Down Expand Up @@ -262,7 +260,7 @@ export type {
PricePagePaginatedResponse,
CreateCreditGrantRequest,
CreditGrant,
CreateFlatFeeChargeRequest,
CreateChargeFlatFeeRequest,
WorkflowTaxSettings,
SubscriptionAddonPagePaginatedResponse,
PlanAddonPagePaginatedResponse,
Expand All @@ -271,8 +269,7 @@ export type {
MeterQueryRequest,
CustomerPagePaginatedResponse,
Party,
InvoiceBase,
CreditNoteInvoice,
Supplier,
AppStripeCreateCheckoutSessionRequestOptions,
TaxCodePagePaginatedResponse,
InvoiceWorkflowSettings,
Expand All @@ -284,14 +281,15 @@ export type {
UpdateFeatureRequest,
CreditGrantPagePaginatedResponse,
BadRequest,
InvoiceBase,
CustomerStripeCreateCheckoutSessionRequest,
WorkflowCollectionSettings,
AppPagePaginatedResponse,
ProfileApps,
GovernanceQueryResponse,
FlatFeeCharge,
UsageBasedCharge,
CreateUsageBasedChargeRequest,
ChargeFlatFee,
ChargeUsageBased,
CreateChargeUsageBasedRequest,
InvoiceLineRateCard,
RateCard,
FeaturePagePaginatedResponse,
Expand All @@ -310,7 +308,7 @@ export type {
UpsertPlanRequest,
AddonPagePaginatedResponse,
ProfilePagePaginatedResponse,
StandardInvoice,
InvoiceStandard,
PlanPagePaginatedResponse,
SortQueryInput,
BaseErrorInput,
Expand Down Expand Up @@ -368,6 +366,6 @@ export type {
UpsertPlanRequestInput,
AddonPagePaginatedResponseInput,
ProfilePagePaginatedResponseInput,
StandardInvoiceInput,
InvoiceStandardInput,
PlanPagePaginatedResponseInput,
} from './models/types.js'
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import type {
AppStripeCreateCheckoutSessionResult,
AppStripeCreateCustomerPortalSessionResult,
ChargePagePaginatedResponse,
CreateChargeFlatFeeRequest,
CreateChargeUsageBasedRequest,
CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody,
CreateCreditGrantRequestInput,
CreateCustomerRequest as CreateCustomerRequestBody,
CreateFlatFeeChargeRequest,
CreateUsageBasedChargeRequest,
CreditAdjustment,
CreditBalances,
CreditGrant,
Expand Down Expand Up @@ -172,7 +172,7 @@ export type ListCustomerChargesResponse = ChargePagePaginatedResponse

export type CreateCustomerChargesRequest = {
customerId: string
body: CreateFlatFeeChargeRequest | CreateUsageBasedChargeRequest
body: CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest
}
export type CreateCustomerChargesResponse = z.output<
typeof schemas.createCustomerChargesResponse
Expand Down
Loading