@openmeter/client 1.0.0-beta-2c15264f1a5f → 1.0.0-beta-e67013138e53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/funcs/customers.d.ts +14 -1
- package/dist/funcs/customers.js +42 -0
- package/dist/index.d.ts +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/customers.d.ts +7 -1
- package/dist/models/schemas.d.ts +28 -0
- package/dist/models/schemas.js +37 -0
- package/dist/models/types.d.ts +36 -0
- package/dist/sdk/internal.d.ts +14 -1
- package/dist/sdk/internal.js +16 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -427,6 +427,7 @@ they can change or be removed without notice or semver consideration.
|
|
|
427
427
|
| `client.internal.customers.entitlements.getHistory` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history` | Get the balance and usage history of a metered entitlement. The queried range may span multiple usage periods. `windowed_history` groups usage into windows of the requested size and reports the balance at the start of each window. `burndown_history` lists the periods in which grants were consumed in a fixed order, together with the usage taken from each grant. |
|
|
428
428
|
| `client.internal.customers.entitlements.get` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Get an entitlement of the customer by ID. For checking entitlement access, use the entitlement access endpoints instead. |
|
|
429
429
|
| `client.internal.customers.entitlements.list` | `GET /openmeter/customers/{customerId}/entitlements` | List the entitlements of the customer that are active at the time of the request. For checking entitlement access, use the entitlement access endpoints instead. |
|
|
430
|
+
| `client.internal.customers.entitlements.resetUsage` | `POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset` | Reset the usage of a metered entitlement. The reset starts a new usage period: usage is zeroed and grants roll over according to their rollover settings. Usage is reset automatically at the end of each usage period. Use this operation to reset it earlier, for example to align the entitlement with the customer's billing period. The usage period anchor can be moved at the same time. |
|
|
430
431
|
| `client.internal.customers.credits.grants.void` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void` | Void a credit grant, forfeiting the remaining unused balance. Voiding is a forward-looking, irreversible operation. Credits already consumed by usage remain unaffected — only the remaining balance is forfeited. The grant reads as `voided` status afterwards. Payment state is not adjusted when `payment_adjustment` is `none`, so invoice-backed or externally collected payments may still collect the original amount. Only `active` grants can be voided; voiding a pending, expired, or fully consumed grant returns a conflict. Retrying a successful void is an idempotent success. |
|
|
431
432
|
| `client.internal.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
|
|
432
433
|
| `client.internal.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
3
|
+
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
/**
|
|
5
5
|
* Create customer
|
|
6
6
|
*
|
|
@@ -125,6 +125,19 @@ export declare function getCustomerEntitlement(client: Client, req: GetCustomerE
|
|
|
125
125
|
* GET /openmeter/customers/{customerId}/entitlements
|
|
126
126
|
*/
|
|
127
127
|
export declare function listCustomerEntitlements(client: Client, req: ListCustomerEntitlementsRequest, options?: RequestOptions): Promise<Result<ListCustomerEntitlementsResponse>>;
|
|
128
|
+
/**
|
|
129
|
+
* Reset customer entitlement usage
|
|
130
|
+
*
|
|
131
|
+
* Reset the usage of a metered entitlement. The reset starts a new usage period:
|
|
132
|
+
* usage is zeroed and grants roll over according to their rollover settings.
|
|
133
|
+
*
|
|
134
|
+
* Usage is reset automatically at the end of each usage period. Use this operation
|
|
135
|
+
* to reset it earlier, for example to align the entitlement with the customer's
|
|
136
|
+
* billing period. The usage period anchor can be moved at the same time.
|
|
137
|
+
*
|
|
138
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset
|
|
139
|
+
*/
|
|
140
|
+
export declare function resetCustomerEntitlementUsage(client: Client, req: ResetCustomerEntitlementUsageRequest, options?: RequestOptions): Promise<Result<ResetCustomerEntitlementUsageResponse>>;
|
|
128
141
|
/**
|
|
129
142
|
* Create a new credit grant
|
|
130
143
|
*
|
package/dist/funcs/customers.js
CHANGED
|
@@ -542,6 +542,48 @@ export function listCustomerEntitlements(client, req, options) {
|
|
|
542
542
|
});
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
|
+
/**
|
|
546
|
+
* Reset customer entitlement usage
|
|
547
|
+
*
|
|
548
|
+
* Reset the usage of a metered entitlement. The reset starts a new usage period:
|
|
549
|
+
* usage is zeroed and grants roll over according to their rollover settings.
|
|
550
|
+
*
|
|
551
|
+
* Usage is reset automatically at the end of each usage period. Use this operation
|
|
552
|
+
* to reset it earlier, for example to align the entitlement with the customer's
|
|
553
|
+
* billing period. The usage period anchor can be moved at the same time.
|
|
554
|
+
*
|
|
555
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset
|
|
556
|
+
*/
|
|
557
|
+
export function resetCustomerEntitlementUsage(client, req, options) {
|
|
558
|
+
return request(async () => {
|
|
559
|
+
const pathParamsInput = {
|
|
560
|
+
customerId: req.customerId,
|
|
561
|
+
entitlementId: req.entitlementId,
|
|
562
|
+
};
|
|
563
|
+
const pathParams = client._options.validate
|
|
564
|
+
? toPathWire(pathParamsInput, schemas.resetCustomerEntitlementUsagePathParams)
|
|
565
|
+
: pathParamsInput;
|
|
566
|
+
if (client._options.validate) {
|
|
567
|
+
assertValid(schemas.resetCustomerEntitlementUsagePathParamsWire, pathParams);
|
|
568
|
+
}
|
|
569
|
+
const path = `openmeter/customers/${(() => {
|
|
570
|
+
if (pathParams.customerId === undefined) {
|
|
571
|
+
throw new Error('missing path parameter: customerId');
|
|
572
|
+
}
|
|
573
|
+
return encodeURIComponent(String(pathParams.customerId));
|
|
574
|
+
})()}/entitlements/${(() => {
|
|
575
|
+
if (pathParams.entitlementId === undefined) {
|
|
576
|
+
throw new Error('missing path parameter: entitlementId');
|
|
577
|
+
}
|
|
578
|
+
return encodeURIComponent(String(pathParams.entitlementId));
|
|
579
|
+
})()}/reset`;
|
|
580
|
+
const body = toWire(req.body, schemas.resetCustomerEntitlementUsageBody);
|
|
581
|
+
if (client._options.validate) {
|
|
582
|
+
assertValid(schemas.resetCustomerEntitlementUsageBodyWire, body);
|
|
583
|
+
}
|
|
584
|
+
await http(client).post(path, { ...options, json: body });
|
|
585
|
+
});
|
|
586
|
+
}
|
|
545
587
|
/**
|
|
546
588
|
* Create a new credit grant
|
|
547
589
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -42,4 +42,4 @@ export type * from './models/operations/addons.js';
|
|
|
42
42
|
export type * from './models/operations/planAddons.js';
|
|
43
43
|
export type * from './models/operations/defaults.js';
|
|
44
44
|
export type * from './models/operations/entitlementAccess.js';
|
|
45
|
-
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, EntitlementAccessValue, EntitlementIssueAfterReset, EntitlementBurndownBalance, EntitlementBurndownGrantBalances, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, FeatureReference, EntitlementGrantUsage, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, CurrencyCustomReference, SubscriptionCostBasisPin, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, ChargeResolvedCostBasis, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
|
45
|
+
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, EntitlementAccessValue, EntitlementIssueAfterReset, EntitlementBurndownBalance, EntitlementBurndownGrantBalances, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, FeatureReference, EntitlementGrantUsage, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, CurrencyCustomReference, SubscriptionCostBasisPin, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, ChargeResolvedCostBasis, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.0-beta-
|
|
1
|
+
export declare const SDK_VERSION = "1.0.0-beta-e67013138e53";
|
package/dist/lib/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// The committed value is a dev placeholder. The publish flow
|
|
3
3
|
// (`make -C api/spec publish-aip-sdk`) stamps the real release version here
|
|
4
4
|
// before `pnpm publish`, after `pnpm version` updates package.json.
|
|
5
|
-
export const SDK_VERSION = '1.0.0-beta-
|
|
5
|
+
export const SDK_VERSION = '1.0.0-beta-e67013138e53';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequestInput, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreateEntitlementRequestInput, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, Entitlement, EntitlementHistory, EntitlementHistoryWindowSize, EntitlementPagePaginatedResponse, GetCreditBalanceParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomerChargesParamsFilter, ListCustomerEntitlementsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
|
|
2
|
+
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequestInput, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreateEntitlementRequestInput, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, Entitlement, EntitlementHistory, EntitlementHistoryWindowSize, EntitlementPagePaginatedResponse, GetCreditBalanceParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomerChargesParamsFilter, ListCustomerEntitlementsParamsFilter, ListCustomersParamsFilter, ResetCustomerEntitlementUsageRequestInput, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
|
|
3
3
|
export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
|
|
4
4
|
export type CreateCustomerResponse = Customer;
|
|
5
5
|
export type GetCustomerRequest = {
|
|
@@ -124,6 +124,12 @@ export type ListCustomerEntitlementsRequest = AcceptDateStrings<ListCustomerEnti
|
|
|
124
124
|
customerId: string;
|
|
125
125
|
}>;
|
|
126
126
|
export type ListCustomerEntitlementsResponse = EntitlementPagePaginatedResponse;
|
|
127
|
+
export type ResetCustomerEntitlementUsageRequest = AcceptDateStrings<{
|
|
128
|
+
customerId: string;
|
|
129
|
+
entitlementId: string;
|
|
130
|
+
body: ResetCustomerEntitlementUsageRequestInput;
|
|
131
|
+
}>;
|
|
132
|
+
export type ResetCustomerEntitlementUsageResponse = void;
|
|
127
133
|
export type CreateCreditGrantRequest = AcceptDateStrings<{
|
|
128
134
|
customerId: string;
|
|
129
135
|
body: CreateCreditGrantRequestInput;
|
package/dist/models/schemas.d.ts
CHANGED
|
@@ -974,6 +974,11 @@ export declare const closedPeriod: z.ZodObject<{
|
|
|
974
974
|
from: z.ZodDate;
|
|
975
975
|
to: z.ZodDate;
|
|
976
976
|
}, z.core.$strip>;
|
|
977
|
+
export declare const resetCustomerEntitlementUsageRequest: z.ZodObject<{
|
|
978
|
+
effectiveAt: z.ZodOptional<z.ZodDate>;
|
|
979
|
+
retainAnchor: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
980
|
+
preserveOverage: z.ZodOptional<z.ZodBoolean>;
|
|
981
|
+
}, z.core.$strip>;
|
|
977
982
|
export declare const chargeResolvedCostBasis: z.ZodObject<{
|
|
978
983
|
fiatCurrency: z.ZodString;
|
|
979
984
|
rate: z.ZodString;
|
|
@@ -18744,6 +18749,15 @@ export declare const listCustomerEntitlementsResponse: z.ZodObject<{
|
|
|
18744
18749
|
}, z.core.$strip>;
|
|
18745
18750
|
}, z.core.$strip>;
|
|
18746
18751
|
}, z.core.$strip>;
|
|
18752
|
+
export declare const resetCustomerEntitlementUsagePathParams: z.ZodObject<{
|
|
18753
|
+
customerId: z.ZodString;
|
|
18754
|
+
entitlementId: z.ZodString;
|
|
18755
|
+
}, z.core.$strip>;
|
|
18756
|
+
export declare const resetCustomerEntitlementUsageBody: z.ZodObject<{
|
|
18757
|
+
effectiveAt: z.ZodOptional<z.ZodDate>;
|
|
18758
|
+
retainAnchor: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18759
|
+
preserveOverage: z.ZodOptional<z.ZodBoolean>;
|
|
18760
|
+
}, z.core.$strip>;
|
|
18747
18761
|
export declare const createCreditGrantPathParams: z.ZodObject<{
|
|
18748
18762
|
customerId: z.ZodString;
|
|
18749
18763
|
}, z.core.$strip>;
|
|
@@ -34572,6 +34586,11 @@ export declare const closedPeriodWire: z.ZodObject<{
|
|
|
34572
34586
|
from: z.ZodString;
|
|
34573
34587
|
to: z.ZodString;
|
|
34574
34588
|
}, z.core.$strict>;
|
|
34589
|
+
export declare const resetCustomerEntitlementUsageRequestWire: z.ZodObject<{
|
|
34590
|
+
effective_at: z.ZodOptional<z.ZodString>;
|
|
34591
|
+
retain_anchor: z.ZodOptional<z.ZodBoolean>;
|
|
34592
|
+
preserve_overage: z.ZodOptional<z.ZodBoolean>;
|
|
34593
|
+
}, z.core.$strict>;
|
|
34575
34594
|
export declare const chargeResolvedCostBasisWire: z.ZodObject<{
|
|
34576
34595
|
fiat_currency: z.ZodString;
|
|
34577
34596
|
rate: z.ZodString;
|
|
@@ -52330,6 +52349,15 @@ export declare const listCustomerEntitlementsResponseWire: z.ZodObject<{
|
|
|
52330
52349
|
}, z.core.$strict>;
|
|
52331
52350
|
}, z.core.$strict>;
|
|
52332
52351
|
}, z.core.$strict>;
|
|
52352
|
+
export declare const resetCustomerEntitlementUsagePathParamsWire: z.ZodObject<{
|
|
52353
|
+
customerId: z.ZodString;
|
|
52354
|
+
entitlementId: z.ZodString;
|
|
52355
|
+
}, z.core.$strip>;
|
|
52356
|
+
export declare const resetCustomerEntitlementUsageBodyWire: z.ZodObject<{
|
|
52357
|
+
effective_at: z.ZodOptional<z.ZodString>;
|
|
52358
|
+
retain_anchor: z.ZodOptional<z.ZodBoolean>;
|
|
52359
|
+
preserve_overage: z.ZodOptional<z.ZodBoolean>;
|
|
52360
|
+
}, z.core.$strict>;
|
|
52333
52361
|
export declare const createCreditGrantPathParamsWire: z.ZodObject<{
|
|
52334
52362
|
customerId: z.ZodString;
|
|
52335
52363
|
}, z.core.$strip>;
|
package/dist/models/schemas.js
CHANGED
|
@@ -1669,6 +1669,20 @@ export const closedPeriod = z
|
|
|
1669
1669
|
to: dateTime,
|
|
1670
1670
|
})
|
|
1671
1671
|
.describe('A period with defined start and end dates. The period is always inclusive at the start and exclusive at the end.');
|
|
1672
|
+
export const resetCustomerEntitlementUsageRequest = z
|
|
1673
|
+
.object({
|
|
1674
|
+
effectiveAt: dateTime.optional(),
|
|
1675
|
+
retainAnchor: z
|
|
1676
|
+
.boolean()
|
|
1677
|
+
.optional()
|
|
1678
|
+
.default(false)
|
|
1679
|
+
.describe('Whether the usage period anchor is kept. When false, the anchor moves to `effective_at`.'),
|
|
1680
|
+
preserveOverage: z
|
|
1681
|
+
.boolean()
|
|
1682
|
+
.optional()
|
|
1683
|
+
.describe("Whether overage carries over into the new usage period. Defaults to the entitlement's own setting."),
|
|
1684
|
+
})
|
|
1685
|
+
.describe('Request body for resetting the usage of a metered entitlement.');
|
|
1672
1686
|
export const chargeResolvedCostBasis = z
|
|
1673
1687
|
.object({
|
|
1674
1688
|
fiatCurrency: currencyCode,
|
|
@@ -5597,6 +5611,11 @@ export const listCustomerEntitlementsResponse = z.object({
|
|
|
5597
5611
|
data: z.array(entitlement),
|
|
5598
5612
|
meta: paginatedMeta,
|
|
5599
5613
|
});
|
|
5614
|
+
export const resetCustomerEntitlementUsagePathParams = z.object({
|
|
5615
|
+
customerId: ulid,
|
|
5616
|
+
entitlementId: ulid,
|
|
5617
|
+
});
|
|
5618
|
+
export const resetCustomerEntitlementUsageBody = resetCustomerEntitlementUsageRequest;
|
|
5600
5619
|
export const createCreditGrantPathParams = z.object({
|
|
5601
5620
|
customerId: ulid,
|
|
5602
5621
|
});
|
|
@@ -7911,6 +7930,19 @@ export const closedPeriodWire = z
|
|
|
7911
7930
|
to: dateTimeWire,
|
|
7912
7931
|
})
|
|
7913
7932
|
.describe('A period with defined start and end dates. The period is always inclusive at the start and exclusive at the end.');
|
|
7933
|
+
export const resetCustomerEntitlementUsageRequestWire = z
|
|
7934
|
+
.strictObject({
|
|
7935
|
+
effective_at: dateTimeWire.optional(),
|
|
7936
|
+
retain_anchor: z
|
|
7937
|
+
.boolean()
|
|
7938
|
+
.optional()
|
|
7939
|
+
.describe('Whether the usage period anchor is kept. When false, the anchor moves to `effective_at`.'),
|
|
7940
|
+
preserve_overage: z
|
|
7941
|
+
.boolean()
|
|
7942
|
+
.optional()
|
|
7943
|
+
.describe("Whether overage carries over into the new usage period. Defaults to the entitlement's own setting."),
|
|
7944
|
+
})
|
|
7945
|
+
.describe('Request body for resetting the usage of a metered entitlement.');
|
|
7914
7946
|
export const chargeResolvedCostBasisWire = z
|
|
7915
7947
|
.strictObject({
|
|
7916
7948
|
fiat_currency: currencyCodeWire,
|
|
@@ -11823,6 +11855,11 @@ export const listCustomerEntitlementsResponseWire = z.strictObject({
|
|
|
11823
11855
|
data: z.array(entitlementWire),
|
|
11824
11856
|
meta: paginatedMetaWire,
|
|
11825
11857
|
});
|
|
11858
|
+
export const resetCustomerEntitlementUsagePathParamsWire = z.object({
|
|
11859
|
+
customerId: ulidWire,
|
|
11860
|
+
entitlementId: ulidWire,
|
|
11861
|
+
});
|
|
11862
|
+
export const resetCustomerEntitlementUsageBodyWire = resetCustomerEntitlementUsageRequestWire;
|
|
11826
11863
|
export const createCreditGrantPathParamsWire = z.object({
|
|
11827
11864
|
customerId: ulidWire,
|
|
11828
11865
|
});
|
package/dist/models/types.d.ts
CHANGED
|
@@ -1159,6 +1159,24 @@ export interface ClosedPeriod {
|
|
|
1159
1159
|
*/
|
|
1160
1160
|
to: Date;
|
|
1161
1161
|
}
|
|
1162
|
+
/** Request body for resetting the usage of a metered entitlement. */
|
|
1163
|
+
export interface ResetCustomerEntitlementUsageRequest {
|
|
1164
|
+
/**
|
|
1165
|
+
* The time the reset takes effect. Defaults to the current time and cannot be in
|
|
1166
|
+
* the future. Truncated to the minute.
|
|
1167
|
+
*/
|
|
1168
|
+
effectiveAt?: Date;
|
|
1169
|
+
/**
|
|
1170
|
+
* Whether the usage period anchor is kept. When false, the anchor moves to
|
|
1171
|
+
* `effective_at`.
|
|
1172
|
+
*/
|
|
1173
|
+
retainAnchor: boolean;
|
|
1174
|
+
/**
|
|
1175
|
+
* Whether overage carries over into the new usage period. Defaults to the
|
|
1176
|
+
* entitlement's own setting.
|
|
1177
|
+
*/
|
|
1178
|
+
preserveOverage?: boolean;
|
|
1179
|
+
}
|
|
1162
1180
|
/**
|
|
1163
1181
|
* Fiat conversion rate a custom-currency charge is invoiced at. Present once the
|
|
1164
1182
|
* cost basis is resolved; dynamic cost bases are exposed only after the service
|
|
@@ -6946,6 +6964,24 @@ export interface EventInput {
|
|
|
6946
6964
|
/** The event payload. Optional, if present it must be a JSON object. */
|
|
6947
6965
|
data?: Record<string, unknown> | null;
|
|
6948
6966
|
}
|
|
6967
|
+
/** Request body for resetting the usage of a metered entitlement. */
|
|
6968
|
+
export interface ResetCustomerEntitlementUsageRequestInput {
|
|
6969
|
+
/**
|
|
6970
|
+
* The time the reset takes effect. Defaults to the current time and cannot be in
|
|
6971
|
+
* the future. Truncated to the minute.
|
|
6972
|
+
*/
|
|
6973
|
+
effectiveAt?: Date;
|
|
6974
|
+
/**
|
|
6975
|
+
* Whether the usage period anchor is kept. When false, the anchor moves to
|
|
6976
|
+
* `effective_at`.
|
|
6977
|
+
*/
|
|
6978
|
+
retainAnchor?: boolean;
|
|
6979
|
+
/**
|
|
6980
|
+
* Whether overage carries over into the new usage period. Defaults to the
|
|
6981
|
+
* entitlement's own setting.
|
|
6982
|
+
*/
|
|
6983
|
+
preserveOverage?: boolean;
|
|
6984
|
+
}
|
|
6949
6985
|
/** Unauthorized. */
|
|
6950
6986
|
export interface UnauthorizedInput extends BaseErrorInput {
|
|
6951
6987
|
}
|
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
3
|
+
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse } from '../models/operations/entitlements.js';
|
|
5
5
|
import type { UnscheduleSubscriptionRequest, UnscheduleSubscriptionResponse, RestoreSubscriptionRequest, RestoreSubscriptionResponse, MigrateSubscriptionRequest, MigrateSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
6
6
|
import type { UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
@@ -107,6 +107,19 @@ export declare class InternalCustomersEntitlements {
|
|
|
107
107
|
* GET /openmeter/customers/{customerId}/entitlements
|
|
108
108
|
*/
|
|
109
109
|
listAll(request: ListCustomerEntitlementsRequest, options?: RequestOptions): AsyncIterable<Entitlement>;
|
|
110
|
+
/**
|
|
111
|
+
* Reset customer entitlement usage
|
|
112
|
+
*
|
|
113
|
+
* Reset the usage of a metered entitlement. The reset starts a new usage period:
|
|
114
|
+
* usage is zeroed and grants roll over according to their rollover settings.
|
|
115
|
+
*
|
|
116
|
+
* Usage is reset automatically at the end of each usage period. Use this operation
|
|
117
|
+
* to reset it earlier, for example to align the entitlement with the customer's
|
|
118
|
+
* billing period. The usage period anchor can be moved at the same time.
|
|
119
|
+
*
|
|
120
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset
|
|
121
|
+
*/
|
|
122
|
+
resetUsage(request: ResetCustomerEntitlementUsageRequest, options?: RequestOptions): Promise<ResetCustomerEntitlementUsageResponse>;
|
|
110
123
|
}
|
|
111
124
|
export declare class InternalCustomersCredits {
|
|
112
125
|
private readonly _client;
|
package/dist/sdk/internal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
2
|
import { unwrap } from '../lib/types.js';
|
|
3
3
|
import { paginatePages } from '../lib/paginate.js';
|
|
4
|
-
import { createCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
|
|
4
|
+
import { createCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
|
|
5
5
|
import { getCustomerEntitlementAccess } from '../funcs/entitlements.js';
|
|
6
6
|
import { unscheduleSubscription, restoreSubscription, migrateSubscription, createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
|
|
7
7
|
import { uninstallApp, updateApp, listAppCatalog, getAppCatalogItem, installApp, } from '../funcs/apps.js';
|
|
@@ -147,6 +147,21 @@ export class InternalCustomersEntitlements {
|
|
|
147
147
|
listAll(request, options) {
|
|
148
148
|
return paginatePages((req, opts) => listCustomerEntitlements(this._client, req, opts), request, options);
|
|
149
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Reset customer entitlement usage
|
|
152
|
+
*
|
|
153
|
+
* Reset the usage of a metered entitlement. The reset starts a new usage period:
|
|
154
|
+
* usage is zeroed and grants roll over according to their rollover settings.
|
|
155
|
+
*
|
|
156
|
+
* Usage is reset automatically at the end of each usage period. Use this operation
|
|
157
|
+
* to reset it earlier, for example to align the entitlement with the customer's
|
|
158
|
+
* billing period. The usage period anchor can be moved at the same time.
|
|
159
|
+
*
|
|
160
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset
|
|
161
|
+
*/
|
|
162
|
+
async resetUsage(request, options) {
|
|
163
|
+
return unwrap(await resetCustomerEntitlementUsage(this._client, request, options));
|
|
164
|
+
}
|
|
150
165
|
}
|
|
151
166
|
export class InternalCustomersCredits {
|
|
152
167
|
_client;
|