Skip to content

Commit 7c9ff4e

Browse files
committed
feat(api): update v3 invoice type
1 parent 52c79c6 commit 7c9ff4e

18 files changed

Lines changed: 3016 additions & 3270 deletions

File tree

.agents/skills/api/rules/aip-126-enums.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
Reference: https://kong-aip.netlify.app/aip/126/
44

55
- All enum wire values must be `snake_case` (enforced as an error by the `casing-aip-errors` linter rule).
6-
- Every enum must define an `unknown` member as the zero/default value.
6+
- 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.
77
- Prefer enums over booleans for two-state fields — this allows a third state to be added later without a breaking change.

api/spec/packages/aip-client-javascript/src/index.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ export type {
6464
CreateLabels,
6565
TaxConfigStripe,
6666
TaxConfigExternalInvoicing,
67-
FlatFeeDiscounts,
67+
ChargeFlatFeeDiscounts,
6868
PriceFree,
6969
WorkflowCollectionAlignmentSubscription,
7070
WorkflowPaymentChargeAutomaticallySettings,
7171
WorkflowPaymentSendInvoiceSettings,
72-
InvoiceExternalIds,
72+
InvoiceExternalReferences,
7373
InvoiceAvailableActionDetails,
7474
InvoiceWorkflowInvoicingSettings,
75-
InvoiceLineExternalIds,
75+
InvoiceLineExternalReferences,
7676
LlmCostProvider,
7777
LlmCostModel,
7878
RateCardStaticEntitlement,
@@ -157,7 +157,6 @@ export type {
157157
QueryFilterStringMapItem,
158158
CustomerKeyReference,
159159
CustomerUsageAttribution,
160-
BillingAddress,
161160
Address,
162161
AppStripeCreateCheckoutSessionCustomerUpdate,
163162
AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement,
@@ -232,9 +231,8 @@ export type {
232231
CreateCustomerRequest,
233232
Customer,
234233
UpsertCustomerRequest,
235-
InvoiceCustomer,
236234
PartyAddresses,
237-
Supplier,
235+
InvoiceCustomer,
238236
AppStripeCreateCheckoutSessionConsentCollection,
239237
ListCustomerEntitlementAccessResponseData,
240238
WorkflowCollectionAlignmentAnchored,
@@ -262,7 +260,7 @@ export type {
262260
PricePagePaginatedResponse,
263261
CreateCreditGrantRequest,
264262
CreditGrant,
265-
CreateFlatFeeChargeRequest,
263+
CreateChargeFlatFeeRequest,
266264
WorkflowTaxSettings,
267265
SubscriptionAddonPagePaginatedResponse,
268266
PlanAddonPagePaginatedResponse,
@@ -271,8 +269,7 @@ export type {
271269
MeterQueryRequest,
272270
CustomerPagePaginatedResponse,
273271
Party,
274-
InvoiceBase,
275-
CreditNoteInvoice,
272+
Supplier,
276273
AppStripeCreateCheckoutSessionRequestOptions,
277274
TaxCodePagePaginatedResponse,
278275
InvoiceWorkflowSettings,
@@ -284,14 +281,15 @@ export type {
284281
UpdateFeatureRequest,
285282
CreditGrantPagePaginatedResponse,
286283
BadRequest,
284+
InvoiceBase,
287285
CustomerStripeCreateCheckoutSessionRequest,
288286
WorkflowCollectionSettings,
289287
AppPagePaginatedResponse,
290288
ProfileApps,
291289
GovernanceQueryResponse,
292-
FlatFeeCharge,
293-
UsageBasedCharge,
294-
CreateUsageBasedChargeRequest,
290+
ChargeFlatFee,
291+
ChargeUsageBased,
292+
CreateChargeUsageBasedRequest,
295293
InvoiceLineRateCard,
296294
RateCard,
297295
FeaturePagePaginatedResponse,
@@ -310,7 +308,7 @@ export type {
310308
UpsertPlanRequest,
311309
AddonPagePaginatedResponse,
312310
ProfilePagePaginatedResponse,
313-
StandardInvoice,
311+
InvoiceStandard,
314312
PlanPagePaginatedResponse,
315313
SortQueryInput,
316314
BaseErrorInput,
@@ -368,6 +366,6 @@ export type {
368366
UpsertPlanRequestInput,
369367
AddonPagePaginatedResponseInput,
370368
ProfilePagePaginatedResponseInput,
371-
StandardInvoiceInput,
369+
InvoiceStandardInput,
372370
PlanPagePaginatedResponseInput,
373371
} from './models/types.js'

api/spec/packages/aip-client-javascript/src/models/operations/customers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import type {
55
AppStripeCreateCheckoutSessionResult,
66
AppStripeCreateCustomerPortalSessionResult,
77
ChargePagePaginatedResponse,
8+
CreateChargeFlatFeeRequest,
9+
CreateChargeUsageBasedRequest,
810
CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody,
911
CreateCreditGrantRequestInput,
1012
CreateCustomerRequest as CreateCustomerRequestBody,
11-
CreateFlatFeeChargeRequest,
12-
CreateUsageBasedChargeRequest,
1313
CreditAdjustment,
1414
CreditBalances,
1515
CreditGrant,
@@ -172,7 +172,7 @@ export type ListCustomerChargesResponse = ChargePagePaginatedResponse
172172

173173
export type CreateCustomerChargesRequest = {
174174
customerId: string
175-
body: CreateFlatFeeChargeRequest | CreateUsageBasedChargeRequest
175+
body: CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest
176176
}
177177
export type CreateCustomerChargesResponse = z.output<
178178
typeof schemas.createCustomerChargesResponse

0 commit comments

Comments
 (0)