@openmeter/client 1.0.0-beta-0abbaf78837c → 1.0.0-beta-7f901f655a1a

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 CHANGED
@@ -444,6 +444,7 @@ they can change or be removed without notice or semver consideration.
444
444
  | `client.internal.entitlements.getCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}` | Get the customer's access to a single feature. |
445
445
  | `client.internal.entitlements.list` | `GET /openmeter/entitlements` | List the active entitlements of all customers. Intended for administrative use. To list the entitlements of a single customer, use the customer entitlements endpoints; to check entitlement access, use the entitlement access endpoints. |
446
446
  | `client.internal.entitlements.get` | `GET /openmeter/entitlements/{entitlementId}` | Get an entitlement by ID. To check entitlement access, use the entitlement access endpoints instead. |
447
+ | `client.internal.entitlements.getCustomerValue` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value` | Get the customer's access through a single entitlement, optionally evaluated at a point in time. |
447
448
 
448
449
  ### Internal Subscriptions
449
450
 
@@ -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 { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse } from '../models/operations/entitlements.js';
3
+ import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse, GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueResponse } from '../models/operations/entitlements.js';
4
4
  /**
5
5
  * List customer entitlement access
6
6
  *
@@ -34,3 +34,12 @@ export declare function listEntitlements(client: Client, req?: ListEntitlementsR
34
34
  * GET /openmeter/entitlements/{entitlementId}
35
35
  */
36
36
  export declare function getEntitlement(client: Client, req: GetEntitlementRequest, options?: RequestOptions): Promise<Result<GetEntitlementResponse>>;
37
+ /**
38
+ * Get customer entitlement value
39
+ *
40
+ * Get the customer's access through a single entitlement, optionally evaluated at
41
+ * a point in time.
42
+ *
43
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
44
+ */
45
+ export declare function getCustomerEntitlementValue(client: Client, req: GetCustomerEntitlementValueRequest, options?: RequestOptions): Promise<Result<GetCustomerEntitlementValueResponse>>;
@@ -67,15 +67,8 @@ export function getCustomerEntitlementAccess(client, req, options) {
67
67
  }
68
68
  return encodeURIComponent(String(pathParams.featureKey));
69
69
  })()}`;
70
- const query = toWire({
71
- expand: req.expand,
72
- }, schemas.getCustomerEntitlementAccessQueryParams);
73
- if (client._options.validate) {
74
- assertValid(schemas.getCustomerEntitlementAccessQueryParamsWire, query);
75
- }
76
- const searchParams = toURLSearchParams(query);
77
70
  return http(client)
78
- .get(path, { ...options, searchParams })
71
+ .get(path, options)
79
72
  .json()
80
73
  .then((data) => {
81
74
  if (client._options.validate) {
@@ -155,3 +148,53 @@ export function getEntitlement(client, req, options) {
155
148
  });
156
149
  });
157
150
  }
151
+ /**
152
+ * Get customer entitlement value
153
+ *
154
+ * Get the customer's access through a single entitlement, optionally evaluated at
155
+ * a point in time.
156
+ *
157
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
158
+ */
159
+ export function getCustomerEntitlementValue(client, req, options) {
160
+ return request(() => {
161
+ const pathParamsInput = {
162
+ customerId: req.customerId,
163
+ entitlementId: req.entitlementId,
164
+ };
165
+ const pathParams = client._options.validate
166
+ ? toPathWire(pathParamsInput, schemas.getCustomerEntitlementValuePathParams)
167
+ : pathParamsInput;
168
+ if (client._options.validate) {
169
+ assertValid(schemas.getCustomerEntitlementValuePathParamsWire, pathParams);
170
+ }
171
+ const path = `openmeter/customers/${(() => {
172
+ if (pathParams.customerId === undefined) {
173
+ throw new Error('missing path parameter: customerId');
174
+ }
175
+ return encodeURIComponent(String(pathParams.customerId));
176
+ })()}/entitlements/${(() => {
177
+ if (pathParams.entitlementId === undefined) {
178
+ throw new Error('missing path parameter: entitlementId');
179
+ }
180
+ return encodeURIComponent(String(pathParams.entitlementId));
181
+ })()}/value`;
182
+ const query = toWire({
183
+ expand: req.expand,
184
+ at: req.at,
185
+ }, schemas.getCustomerEntitlementValueQueryParams);
186
+ if (client._options.validate) {
187
+ assertValid(schemas.getCustomerEntitlementValueQueryParamsWire, query);
188
+ }
189
+ const searchParams = toURLSearchParams(query);
190
+ return http(client)
191
+ .get(path, { ...options, searchParams })
192
+ .json()
193
+ .then((data) => {
194
+ if (client._options.validate) {
195
+ assertValid(schemas.getCustomerEntitlementValueResponseWire, data);
196
+ }
197
+ return fromWire(data, schemas.getCustomerEntitlementValueResponse);
198
+ });
199
+ });
200
+ }
package/dist/index.d.ts CHANGED
@@ -43,4 +43,4 @@ 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
45
  export type * from './models/operations/notifications.js';
46
- export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, CreateVersionFilter, VersionFilter, 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, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ListNotificationChannelsParamsFilter, 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, EntitlementGrant, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, NotificationChannelPagePaginatedResponse, 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, EntitlementGrantPagePaginatedResponse, 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, BooleanFieldFilter, 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, NotificationChannelInput, CreateNotificationChannelRequestInput, UpdateNotificationChannelRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, NotificationChannelPagePaginatedResponseInput, 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';
46
+ export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, CreateVersionFilter, VersionFilter, 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, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessCheckResult, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementValueResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ListNotificationChannelsParamsFilter, 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, EntitlementGrant, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, NotificationChannelPagePaginatedResponse, 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, EntitlementGrantPagePaginatedResponse, 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, BooleanFieldFilter, 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, NotificationChannelInput, CreateNotificationChannelRequestInput, UpdateNotificationChannelRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, NotificationChannelPagePaginatedResponseInput, 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';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0-beta-0abbaf78837c";
1
+ export declare const SDK_VERSION = "1.0.0-beta-7f901f655a1a";
@@ -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-0abbaf78837c';
5
+ export const SDK_VERSION = '1.0.0-beta-7f901f655a1a';
@@ -1,25 +1,14 @@
1
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
2
- import type { Entitlement, EntitlementAccessResult, EntitlementPagePaginatedResponse, ListCustomerEntitlementAccessResponseData, ListEntitlementsParamsFilter, SortQueryInput } from '../types.js';
2
+ import type { Entitlement, EntitlementAccessCheckResult, EntitlementPagePaginatedResponse, EntitlementValueResult, ListCustomerEntitlementAccessResponseData, ListEntitlementsParamsFilter, SortQueryInput } from '../types.js';
3
3
  export type ListCustomerEntitlementAccessRequest = {
4
4
  customerId: string;
5
5
  };
6
6
  export type ListCustomerEntitlementAccessResponse = ListCustomerEntitlementAccessResponseData;
7
- export interface GetCustomerEntitlementAccessQuery {
8
- /**
9
- * Expand computed fields.
10
- *
11
- * Supported values are:
12
- *
13
- * - `value`: Expand the balance details of a metered entitlement; it sets the
14
- * `value` field.
15
- */
16
- expand?: 'value'[];
17
- }
18
- export type GetCustomerEntitlementAccessRequest = AcceptDateStrings<GetCustomerEntitlementAccessQuery & {
7
+ export type GetCustomerEntitlementAccessRequest = {
19
8
  customerId: string;
20
9
  featureKey: string;
21
- }>;
22
- export type GetCustomerEntitlementAccessResponse = EntitlementAccessResult;
10
+ };
11
+ export type GetCustomerEntitlementAccessResponse = EntitlementAccessCheckResult;
23
12
  export interface ListEntitlementsQuery {
24
13
  /** Determines which page of the collection to retrieve. */
25
14
  page?: {
@@ -50,3 +39,21 @@ export type GetEntitlementRequest = {
50
39
  entitlementId: string;
51
40
  };
52
41
  export type GetEntitlementResponse = Entitlement;
42
+ export interface GetCustomerEntitlementValueQuery {
43
+ /**
44
+ * Expand computed fields.
45
+ *
46
+ * Supported values are:
47
+ *
48
+ * - `value`: Expand the balance details of a metered entitlement; it sets the
49
+ * `value` field.
50
+ */
51
+ expand?: 'value'[];
52
+ /** The point in time to evaluate the entitlement at. Defaults to the current time. */
53
+ at?: Date;
54
+ }
55
+ export type GetCustomerEntitlementValueRequest = AcceptDateStrings<GetCustomerEntitlementValueQuery & {
56
+ customerId: string;
57
+ entitlementId: string;
58
+ }>;
59
+ export type GetCustomerEntitlementValueResponse = EntitlementValueResult;
@@ -170,9 +170,6 @@ export declare const entitlementType: z.ZodEnum<{
170
170
  metered: "metered";
171
171
  static: "static";
172
172
  }>;
173
- export declare const entitlementAccessExpand: z.ZodEnum<{
174
- value: "value";
175
- }>;
176
173
  export declare const iso8601Duration: z.ZodString;
177
174
  export declare const entitlementMeasureUsageFromPreset: z.ZodEnum<{
178
175
  current_period_start: "current_period_start";
@@ -184,6 +181,9 @@ export declare const stringFieldFilterExact: z.ZodUnion<readonly [z.ZodString, z
184
181
  oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
185
182
  neq: z.ZodOptional<z.ZodString>;
186
183
  }, z.core.$strip>]>;
184
+ export declare const entitlementAccessExpand: z.ZodEnum<{
185
+ value: "value";
186
+ }>;
187
187
  export declare const createLabels: z.ZodRecord<z.ZodString, z.ZodString>;
188
188
  export declare const creditFundingMethod: z.ZodEnum<{
189
189
  external: "external";
@@ -1390,6 +1390,15 @@ export declare const customerStripeCreateCustomerPortalSessionRequest: z.ZodObje
1390
1390
  returnUrl: z.ZodOptional<z.ZodString>;
1391
1391
  }, z.core.$strip>;
1392
1392
  }, z.core.$strip>;
1393
+ export declare const entitlementAccessCheckResult: z.ZodObject<{
1394
+ hasAccess: z.ZodBoolean;
1395
+ config: z.ZodOptional<z.ZodString>;
1396
+ type: z.ZodOptional<z.ZodEnum<{
1397
+ boolean: "boolean";
1398
+ metered: "metered";
1399
+ static: "static";
1400
+ }>>;
1401
+ }, z.core.$strip>;
1393
1402
  export declare const recurringPeriodInput: z.ZodObject<{
1394
1403
  interval: z.ZodString;
1395
1404
  anchor: z.ZodOptional<z.ZodDate>;
@@ -1864,7 +1873,7 @@ export declare const currencyAmount: z.ZodObject<{
1864
1873
  amount: z.ZodString;
1865
1874
  currency: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1866
1875
  }, z.core.$strip>;
1867
- export declare const entitlementAccessResult: z.ZodObject<{
1876
+ export declare const entitlementValueResult: z.ZodObject<{
1868
1877
  type: z.ZodEnum<{
1869
1878
  boolean: "boolean";
1870
1879
  metered: "metered";
@@ -18594,27 +18603,14 @@ export declare const getCustomerEntitlementAccessPathParams: z.ZodObject<{
18594
18603
  customerId: z.ZodString;
18595
18604
  featureKey: z.ZodString;
18596
18605
  }, z.core.$strip>;
18597
- export declare const getCustomerEntitlementAccessQueryParams: z.ZodObject<{
18598
- expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
18599
- value: "value";
18600
- }>>>;
18601
- }, z.core.$strip>;
18602
18606
  export declare const getCustomerEntitlementAccessResponse: z.ZodObject<{
18603
- type: z.ZodEnum<{
18607
+ hasAccess: z.ZodBoolean;
18608
+ config: z.ZodOptional<z.ZodString>;
18609
+ type: z.ZodOptional<z.ZodEnum<{
18604
18610
  boolean: "boolean";
18605
18611
  metered: "metered";
18606
18612
  static: "static";
18607
- }>;
18608
- featureKey: z.ZodString;
18609
- hasAccess: z.ZodBoolean;
18610
- config: z.ZodOptional<z.ZodString>;
18611
- value: z.ZodOptional<z.ZodObject<{
18612
- balance: z.ZodString;
18613
- usage: z.ZodString;
18614
- overage: z.ZodString;
18615
- totalAvailableGrantAmount: z.ZodString;
18616
- grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
18617
- }, z.core.$strip>>;
18613
+ }>>;
18618
18614
  }, z.core.$strip>;
18619
18615
  export declare const createCustomerEntitlementPathParams: z.ZodObject<{
18620
18616
  customerId: z.ZodString;
@@ -19446,6 +19442,33 @@ export declare const listCustomerEntitlementGrantsResponse: z.ZodObject<{
19446
19442
  }, z.core.$strip>;
19447
19443
  }, z.core.$strip>;
19448
19444
  }, z.core.$strip>;
19445
+ export declare const getCustomerEntitlementValuePathParams: z.ZodObject<{
19446
+ customerId: z.ZodString;
19447
+ entitlementId: z.ZodString;
19448
+ }, z.core.$strip>;
19449
+ export declare const getCustomerEntitlementValueQueryParams: z.ZodObject<{
19450
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
19451
+ value: "value";
19452
+ }>>>;
19453
+ at: z.ZodOptional<z.ZodDate>;
19454
+ }, z.core.$strip>;
19455
+ export declare const getCustomerEntitlementValueResponse: z.ZodObject<{
19456
+ type: z.ZodEnum<{
19457
+ boolean: "boolean";
19458
+ metered: "metered";
19459
+ static: "static";
19460
+ }>;
19461
+ featureKey: z.ZodString;
19462
+ hasAccess: z.ZodBoolean;
19463
+ config: z.ZodOptional<z.ZodString>;
19464
+ value: z.ZodOptional<z.ZodObject<{
19465
+ balance: z.ZodString;
19466
+ usage: z.ZodString;
19467
+ overage: z.ZodString;
19468
+ totalAvailableGrantAmount: z.ZodString;
19469
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
19470
+ }, z.core.$strip>>;
19471
+ }, z.core.$strip>;
19449
19472
  export declare const createCreditGrantPathParams: z.ZodObject<{
19450
19473
  customerId: z.ZodString;
19451
19474
  }, z.core.$strip>;
@@ -34675,9 +34698,6 @@ export declare const entitlementTypeWire: z.ZodEnum<{
34675
34698
  metered: "metered";
34676
34699
  static: "static";
34677
34700
  }>;
34678
- export declare const entitlementAccessExpandWire: z.ZodEnum<{
34679
- value: "value";
34680
- }>;
34681
34701
  export declare const iso8601DurationWire: z.ZodString;
34682
34702
  export declare const entitlementMeasureUsageFromPresetWire: z.ZodEnum<{
34683
34703
  current_period_start: "current_period_start";
@@ -34689,6 +34709,9 @@ export declare const stringFieldFilterExactWire: z.ZodUnion<readonly [z.ZodStrin
34689
34709
  oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
34690
34710
  neq: z.ZodOptional<z.ZodString>;
34691
34711
  }, z.core.$strict>]>;
34712
+ export declare const entitlementAccessExpandWire: z.ZodEnum<{
34713
+ value: "value";
34714
+ }>;
34692
34715
  export declare const createLabelsWire: z.ZodRecord<z.ZodString, z.ZodString>;
34693
34716
  export declare const creditFundingMethodWire: z.ZodEnum<{
34694
34717
  external: "external";
@@ -35895,6 +35918,15 @@ export declare const customerStripeCreateCustomerPortalSessionRequestWire: z.Zod
35895
35918
  return_url: z.ZodOptional<z.ZodString>;
35896
35919
  }, z.core.$strict>;
35897
35920
  }, z.core.$strict>;
35921
+ export declare const entitlementAccessCheckResultWire: z.ZodObject<{
35922
+ has_access: z.ZodBoolean;
35923
+ config: z.ZodOptional<z.ZodString>;
35924
+ type: z.ZodOptional<z.ZodEnum<{
35925
+ boolean: "boolean";
35926
+ metered: "metered";
35927
+ static: "static";
35928
+ }>>;
35929
+ }, z.core.$strict>;
35898
35930
  export declare const recurringPeriodInputWire: z.ZodObject<{
35899
35931
  interval: z.ZodString;
35900
35932
  anchor: z.ZodOptional<z.ZodString>;
@@ -36369,7 +36401,7 @@ export declare const currencyAmountWire: z.ZodObject<{
36369
36401
  amount: z.ZodString;
36370
36402
  currency: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
36371
36403
  }, z.core.$strict>;
36372
- export declare const entitlementAccessResultWire: z.ZodObject<{
36404
+ export declare const entitlementValueResultWire: z.ZodObject<{
36373
36405
  type: z.ZodEnum<{
36374
36406
  boolean: "boolean";
36375
36407
  metered: "metered";
@@ -53090,27 +53122,14 @@ export declare const getCustomerEntitlementAccessPathParamsWire: z.ZodObject<{
53090
53122
  customerId: z.ZodString;
53091
53123
  featureKey: z.ZodString;
53092
53124
  }, z.core.$strip>;
53093
- export declare const getCustomerEntitlementAccessQueryParamsWire: z.ZodObject<{
53094
- expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
53095
- value: "value";
53096
- }>>>;
53097
- }, z.core.$strip>;
53098
53125
  export declare const getCustomerEntitlementAccessResponseWire: z.ZodObject<{
53099
- type: z.ZodEnum<{
53126
+ has_access: z.ZodBoolean;
53127
+ config: z.ZodOptional<z.ZodString>;
53128
+ type: z.ZodOptional<z.ZodEnum<{
53100
53129
  boolean: "boolean";
53101
53130
  metered: "metered";
53102
53131
  static: "static";
53103
- }>;
53104
- feature_key: z.ZodString;
53105
- has_access: z.ZodBoolean;
53106
- config: z.ZodOptional<z.ZodString>;
53107
- value: z.ZodOptional<z.ZodObject<{
53108
- balance: z.ZodString;
53109
- usage: z.ZodString;
53110
- overage: z.ZodString;
53111
- total_available_grant_amount: z.ZodString;
53112
- grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
53113
- }, z.core.$strict>>;
53132
+ }>>;
53114
53133
  }, z.core.$strict>;
53115
53134
  export declare const createCustomerEntitlementPathParamsWire: z.ZodObject<{
53116
53135
  customerId: z.ZodString;
@@ -53933,6 +53952,33 @@ export declare const listCustomerEntitlementGrantsResponseWire: z.ZodObject<{
53933
53952
  }, z.core.$strict>;
53934
53953
  }, z.core.$strict>;
53935
53954
  }, z.core.$strict>;
53955
+ export declare const getCustomerEntitlementValuePathParamsWire: z.ZodObject<{
53956
+ customerId: z.ZodString;
53957
+ entitlementId: z.ZodString;
53958
+ }, z.core.$strip>;
53959
+ export declare const getCustomerEntitlementValueQueryParamsWire: z.ZodObject<{
53960
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
53961
+ value: "value";
53962
+ }>>>;
53963
+ at: z.ZodOptional<z.ZodString>;
53964
+ }, z.core.$strip>;
53965
+ export declare const getCustomerEntitlementValueResponseWire: z.ZodObject<{
53966
+ type: z.ZodEnum<{
53967
+ boolean: "boolean";
53968
+ metered: "metered";
53969
+ static: "static";
53970
+ }>;
53971
+ feature_key: z.ZodString;
53972
+ has_access: z.ZodBoolean;
53973
+ config: z.ZodOptional<z.ZodString>;
53974
+ value: z.ZodOptional<z.ZodObject<{
53975
+ balance: z.ZodString;
53976
+ usage: z.ZodString;
53977
+ overage: z.ZodString;
53978
+ total_available_grant_amount: z.ZodString;
53979
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
53980
+ }, z.core.$strict>>;
53981
+ }, z.core.$strict>;
53936
53982
  export declare const createCreditGrantPathParamsWire: z.ZodObject<{
53937
53983
  customerId: z.ZodString;
53938
53984
  }, z.core.$strip>;
@@ -375,9 +375,6 @@ export const appStripeCreateCustomerPortalSessionOptions = z
375
375
  export const entitlementType = z
376
376
  .enum(['metered', 'static', 'boolean'])
377
377
  .describe('The type of the entitlement.');
378
- export const entitlementAccessExpand = z
379
- .enum(['value'])
380
- .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
381
378
  export const iso8601Duration = z
382
379
  .string()
383
380
  .regex(new RegExp('^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$'))
@@ -407,6 +404,9 @@ export const stringFieldFilterExact = z
407
404
  }),
408
405
  ])
409
406
  .describe('Filters on the given string field value by exact match. All properties are optional; provide exactly one to specify the comparison.');
407
+ export const entitlementAccessExpand = z
408
+ .enum(['value'])
409
+ .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
410
410
  export const createLabels = z
411
411
  .record(z.string(), z.string())
412
412
  .describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
@@ -1252,7 +1252,7 @@ export const entitlementAccessValue = z
1252
1252
  .record(z.string(), numeric)
1253
1253
  .describe('The remaining balance of each grant, keyed by grant ID.'),
1254
1254
  })
1255
- .describe('Balance details of a metered entitlement.');
1255
+ .describe('Balance details of a metered entitlement at the evaluation time, which is the `at` query parameter when given and the current time otherwise.');
1256
1256
  export const entitlementIssueAfterReset = z
1257
1257
  .object({
1258
1258
  amount: numeric,
@@ -2257,6 +2257,18 @@ export const customerStripeCreateCustomerPortalSessionRequest = z
2257
2257
  stripeOptions: appStripeCreateCustomerPortalSessionOptions,
2258
2258
  })
2259
2259
  .describe('Request to create a Stripe Customer Portal Session for the customer. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.');
2260
+ export const entitlementAccessCheckResult = z
2261
+ .object({
2262
+ hasAccess: z
2263
+ .boolean()
2264
+ .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
2265
+ config: z
2266
+ .string()
2267
+ .optional()
2268
+ .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
2269
+ type: entitlementType.optional(),
2270
+ })
2271
+ .describe('Entitlement access check result.');
2260
2272
  export const recurringPeriodInput = z
2261
2273
  .object({
2262
2274
  interval: iso8601Duration,
@@ -2787,7 +2799,7 @@ export const currencyAmount = z
2787
2799
  currency: billingCurrencyCode,
2788
2800
  })
2789
2801
  .describe('Monetary amount in a fiat or custom currency.');
2790
- export const entitlementAccessResult = z
2802
+ export const entitlementValueResult = z
2791
2803
  .object({
2792
2804
  type: entitlementType,
2793
2805
  featureKey: resourceKey,
@@ -2800,7 +2812,7 @@ export const entitlementAccessResult = z
2800
2812
  .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
2801
2813
  value: entitlementAccessValue.optional(),
2802
2814
  })
2803
- .describe('Entitlement access result.');
2815
+ .describe('Entitlement value result.');
2804
2816
  export const priceTier = z
2805
2817
  .object({
2806
2818
  upToAmount: numeric.optional(),
@@ -3892,7 +3904,7 @@ export const chargeFlatFeeSystemIntent = z
3892
3904
  export const listCustomerEntitlementAccessResponseData = z
3893
3905
  .object({
3894
3906
  data: z
3895
- .array(entitlementAccessResult)
3907
+ .array(entitlementValueResult)
3896
3908
  .describe('The list of entitlement access results.'),
3897
3909
  })
3898
3910
  .describe('List customer entitlement access response data.');
@@ -5782,13 +5794,7 @@ export const getCustomerEntitlementAccessPathParams = z.object({
5782
5794
  customerId: ulid,
5783
5795
  featureKey: resourceKey,
5784
5796
  });
5785
- export const getCustomerEntitlementAccessQueryParams = z.object({
5786
- expand: z
5787
- .array(entitlementAccessExpand)
5788
- .optional()
5789
- .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
5790
- });
5791
- export const getCustomerEntitlementAccessResponse = entitlementAccessResult;
5797
+ export const getCustomerEntitlementAccessResponse = entitlementAccessCheckResult;
5792
5798
  export const createCustomerEntitlementPathParams = z.object({
5793
5799
  customerId: ulid,
5794
5800
  });
@@ -5906,6 +5912,18 @@ export const listCustomerEntitlementGrantsResponse = z.object({
5906
5912
  data: z.array(entitlementGrant),
5907
5913
  meta: paginatedMeta,
5908
5914
  });
5915
+ export const getCustomerEntitlementValuePathParams = z.object({
5916
+ customerId: ulid,
5917
+ entitlementId: ulid,
5918
+ });
5919
+ export const getCustomerEntitlementValueQueryParams = z.object({
5920
+ expand: z
5921
+ .array(entitlementAccessExpand)
5922
+ .optional()
5923
+ .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
5924
+ at: dateTime.optional(),
5925
+ });
5926
+ export const getCustomerEntitlementValueResponse = entitlementValueResult;
5909
5927
  export const createCreditGrantPathParams = z.object({
5910
5928
  customerId: ulid,
5911
5929
  });
@@ -6967,9 +6985,6 @@ export const appStripeCreateCustomerPortalSessionOptionsWire = z
6967
6985
  export const entitlementTypeWire = z
6968
6986
  .enum(['metered', 'static', 'boolean'])
6969
6987
  .describe('The type of the entitlement.');
6970
- export const entitlementAccessExpandWire = z
6971
- .enum(['value'])
6972
- .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
6973
6988
  export const iso8601DurationWire = z
6974
6989
  .string()
6975
6990
  .regex(new RegExp('^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$'))
@@ -6999,6 +7014,9 @@ export const stringFieldFilterExactWire = z
6999
7014
  }),
7000
7015
  ])
7001
7016
  .describe('Filters on the given string field value by exact match. All properties are optional; provide exactly one to specify the comparison.');
7017
+ export const entitlementAccessExpandWire = z
7018
+ .enum(['value'])
7019
+ .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
7002
7020
  export const createLabelsWire = z
7003
7021
  .record(z.string(), z.string())
7004
7022
  .describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
@@ -7838,7 +7856,7 @@ export const entitlementAccessValueWire = z
7838
7856
  .record(z.string(), numericWire)
7839
7857
  .describe('The remaining balance of each grant, keyed by grant ID.'),
7840
7858
  })
7841
- .describe('Balance details of a metered entitlement.');
7859
+ .describe('Balance details of a metered entitlement at the evaluation time, which is the `at` query parameter when given and the current time otherwise.');
7842
7860
  export const entitlementIssueAfterResetWire = z
7843
7861
  .strictObject({
7844
7862
  amount: numericWire,
@@ -8831,6 +8849,18 @@ export const customerStripeCreateCustomerPortalSessionRequestWire = z
8831
8849
  stripe_options: appStripeCreateCustomerPortalSessionOptionsWire,
8832
8850
  })
8833
8851
  .describe('Request to create a Stripe Customer Portal Session for the customer. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.');
8852
+ export const entitlementAccessCheckResultWire = z
8853
+ .strictObject({
8854
+ has_access: z
8855
+ .boolean()
8856
+ .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
8857
+ config: z
8858
+ .string()
8859
+ .optional()
8860
+ .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
8861
+ type: entitlementTypeWire.optional(),
8862
+ })
8863
+ .describe('Entitlement access check result.');
8834
8864
  export const recurringPeriodInputWire = z
8835
8865
  .strictObject({
8836
8866
  interval: iso8601DurationWire,
@@ -9348,7 +9378,7 @@ export const currencyAmountWire = z
9348
9378
  currency: billingCurrencyCodeWire,
9349
9379
  })
9350
9380
  .describe('Monetary amount in a fiat or custom currency.');
9351
- export const entitlementAccessResultWire = z
9381
+ export const entitlementValueResultWire = z
9352
9382
  .strictObject({
9353
9383
  type: entitlementTypeWire,
9354
9384
  feature_key: resourceKeyWire,
@@ -9361,7 +9391,7 @@ export const entitlementAccessResultWire = z
9361
9391
  .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
9362
9392
  value: entitlementAccessValueWire.optional(),
9363
9393
  })
9364
- .describe('Entitlement access result.');
9394
+ .describe('Entitlement value result.');
9365
9395
  export const priceTierWire = z
9366
9396
  .strictObject({
9367
9397
  up_to_amount: numericWire.optional(),
@@ -10452,7 +10482,7 @@ export const chargeFlatFeeSystemIntentWire = z
10452
10482
  export const listCustomerEntitlementAccessResponseDataWire = z
10453
10483
  .strictObject({
10454
10484
  data: z
10455
- .array(entitlementAccessResultWire)
10485
+ .array(entitlementValueResultWire)
10456
10486
  .describe('The list of entitlement access results.'),
10457
10487
  })
10458
10488
  .describe('List customer entitlement access response data.');
@@ -12344,13 +12374,7 @@ export const getCustomerEntitlementAccessPathParamsWire = z.object({
12344
12374
  customerId: ulidWire,
12345
12375
  featureKey: resourceKeyWire,
12346
12376
  });
12347
- export const getCustomerEntitlementAccessQueryParamsWire = z.object({
12348
- expand: z
12349
- .array(entitlementAccessExpandWire)
12350
- .optional()
12351
- .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
12352
- });
12353
- export const getCustomerEntitlementAccessResponseWire = entitlementAccessResultWire;
12377
+ export const getCustomerEntitlementAccessResponseWire = entitlementAccessCheckResultWire;
12354
12378
  export const createCustomerEntitlementPathParamsWire = z.object({
12355
12379
  customerId: ulidWire,
12356
12380
  });
@@ -12476,6 +12500,18 @@ export const listCustomerEntitlementGrantsResponseWire = z.strictObject({
12476
12500
  data: z.array(entitlementGrantWire),
12477
12501
  meta: paginatedMetaWire,
12478
12502
  });
12503
+ export const getCustomerEntitlementValuePathParamsWire = z.object({
12504
+ customerId: ulidWire,
12505
+ entitlementId: ulidWire,
12506
+ });
12507
+ export const getCustomerEntitlementValueQueryParamsWire = z.object({
12508
+ expand: z
12509
+ .array(entitlementAccessExpandWire)
12510
+ .optional()
12511
+ .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
12512
+ at: dateTimeWire.optional(),
12513
+ });
12514
+ export const getCustomerEntitlementValueResponseWire = entitlementValueResultWire;
12479
12515
  export const createCreditGrantPathParamsWire = z.object({
12480
12516
  customerId: ulidWire,
12481
12517
  });
@@ -628,15 +628,27 @@ export interface CreateCurrencyCustomRequest {
628
628
  thousandSeparator: string;
629
629
  code: string;
630
630
  }
631
- /** Balance details of a metered entitlement. */
631
+ /**
632
+ * Balance details of a metered entitlement at the evaluation time, which is the
633
+ * `at` query parameter when given and the current time otherwise.
634
+ */
632
635
  export interface EntitlementAccessValue {
633
- /** The remaining balance of the entitlement in the current usage period. */
636
+ /**
637
+ * The remaining balance of the entitlement in the usage period at the evaluation
638
+ * time.
639
+ */
634
640
  balance: string;
635
- /** The usage recorded in the current usage period. */
641
+ /** The usage recorded in the usage period at the evaluation time. */
636
642
  usage: string;
637
- /** The usage exceeding the available balance in the current usage period. */
643
+ /**
644
+ * The usage exceeding the available balance in the usage period at the evaluation
645
+ * time.
646
+ */
638
647
  overage: string;
639
- /** The total amount granted and currently available to the entitlement. */
648
+ /**
649
+ * The total amount granted and available to the entitlement at the evaluation
650
+ * time.
651
+ */
640
652
  totalAvailableGrantAmount: string;
641
653
  /** The remaining balance of each grant, keyed by grant ID. */
642
654
  grantBalances: Record<string, string>;
@@ -1838,6 +1850,26 @@ export interface CustomerStripeCreateCustomerPortalSessionRequest {
1838
1850
  /** Options for configuring the Stripe Customer Portal Session. */
1839
1851
  stripeOptions: AppStripeCreateCustomerPortalSessionOptions;
1840
1852
  }
1853
+ /** Entitlement access check result. */
1854
+ export interface EntitlementAccessCheckResult {
1855
+ /**
1856
+ * Whether the customer has access to the feature. Always true for `boolean` and
1857
+ * `static` entitlements. Depends on balance for `metered` entitlements.
1858
+ */
1859
+ hasAccess: boolean;
1860
+ /**
1861
+ * Only available for static entitlements. Config is the JSON parsable
1862
+ * configuration of the entitlement. Useful to describe per customer configuration.
1863
+ */
1864
+ config?: string;
1865
+ /**
1866
+ * The type of the entitlement.
1867
+ *
1868
+ * If not provided, the feature has no entitlement defined (has access is always
1869
+ * false in this case)
1870
+ */
1871
+ type?: 'metered' | 'static' | 'boolean';
1872
+ }
1841
1873
  /**
1842
1874
  * Recurring period input. The anchor is optional; the owning resource defines the
1843
1875
  * default, typically its creation time.
@@ -2497,8 +2529,8 @@ export interface CurrencyAmount {
2497
2529
  /** The fiat or custom currency code of the amount. */
2498
2530
  currency: BillingCurrencyCode;
2499
2531
  }
2500
- /** Entitlement access result. */
2501
- export interface EntitlementAccessResult {
2532
+ /** Entitlement value result. */
2533
+ export interface EntitlementValueResult {
2502
2534
  /** The type of the entitlement. */
2503
2535
  type: 'metered' | 'static' | 'boolean';
2504
2536
  /** The feature key of the entitlement. */
@@ -2514,8 +2546,8 @@ export interface EntitlementAccessResult {
2514
2546
  */
2515
2547
  config?: string;
2516
2548
  /**
2517
- * Only available for metered entitlements. The current balance details of the
2518
- * entitlement. Requires the `value` expand.
2549
+ * Only available for metered entitlements. The balance details of the entitlement
2550
+ * at the evaluation time. Requires the `value` expand.
2519
2551
  */
2520
2552
  value?: EntitlementAccessValue;
2521
2553
  }
@@ -4090,7 +4122,7 @@ export interface ChargeFlatFeeSystemIntent {
4090
4122
  /** List customer entitlement access response data. */
4091
4123
  export interface ListCustomerEntitlementAccessResponseData {
4092
4124
  /** The list of entitlement access results. */
4093
- data: EntitlementAccessResult[];
4125
+ data: EntitlementValueResult[];
4094
4126
  }
4095
4127
  /**
4096
4128
  * Graduated tiered price.
@@ -1,7 +1,7 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
3
  import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
4
- import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse } from '../models/operations/entitlements.js';
4
+ import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse, GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueResponse } 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';
7
7
  import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js';
@@ -301,6 +301,15 @@ export declare class InternalEntitlements {
301
301
  * GET /openmeter/entitlements/{entitlementId}
302
302
  */
303
303
  get(request: GetEntitlementRequest, options?: RequestOptions): Promise<GetEntitlementResponse>;
304
+ /**
305
+ * Get customer entitlement value
306
+ *
307
+ * Get the customer's access through a single entitlement, optionally evaluated at
308
+ * a point in time.
309
+ *
310
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
311
+ */
312
+ getCustomerValue(request: GetCustomerEntitlementValueRequest, options?: RequestOptions): Promise<GetCustomerEntitlementValueResponse>;
304
313
  }
305
314
  export declare class InternalSubscriptions {
306
315
  private readonly _client;
@@ -2,7 +2,7 @@
2
2
  import { unwrap } from '../lib/types.js';
3
3
  import { paginatePages } from '../lib/paginate.js';
4
4
  import { createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, createCustomerEntitlementGrant, listCustomerEntitlementGrants, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
5
- import { getCustomerEntitlementAccess, listEntitlements, getEntitlement, } from '../funcs/entitlements.js';
5
+ import { getCustomerEntitlementAccess, listEntitlements, getEntitlement, getCustomerEntitlementValue, } 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';
8
8
  import { listInvoices, getInvoice, updateInvoice, deleteInvoice, advanceInvoice, approveInvoice, retryInvoice, snapshotQuantitiesInvoice, } from '../funcs/invoices.js';
@@ -385,6 +385,17 @@ export class InternalEntitlements {
385
385
  async get(request, options) {
386
386
  return unwrap(await getEntitlement(this._client, request, options));
387
387
  }
388
+ /**
389
+ * Get customer entitlement value
390
+ *
391
+ * Get the customer's access through a single entitlement, optionally evaluated at
392
+ * a point in time.
393
+ *
394
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
395
+ */
396
+ async getCustomerValue(request, options) {
397
+ return unwrap(await getCustomerEntitlementValue(this._client, request, options));
398
+ }
388
399
  }
389
400
  export class InternalSubscriptions {
390
401
  _client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-0abbaf78837c",
3
+ "version": "1.0.0-beta-7f901f655a1a",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",