@openmeter/client 1.0.0-beta-29c583cb710e → 1.0.0-beta-45123e0d07d7

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
@@ -305,9 +305,10 @@ The full call path, HTTP route, and a short description are listed below.
305
305
 
306
306
  ### Entitlements
307
307
 
308
- | Method | HTTP | Description |
309
- | ---------------------------------------- | ---------------------------------------------------------- | -------------------------------- |
310
- | `client.entitlements.listCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access` | List customer entitlement access |
308
+ | Method | HTTP | Description |
309
+ | ---------------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------- |
310
+ | `client.entitlements.listCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access` | List customer entitlement access |
311
+ | `client.entitlements.getCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}` | Get the customer's access to a single feature. |
311
312
 
312
313
  ### Subscriptions
313
314
 
@@ -1,9 +1,17 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type Result, type RequestOptions } from '../lib/types.js';
3
- import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse } from '../models/operations/entitlements.js';
3
+ import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse } from '../models/operations/entitlements.js';
4
4
  /**
5
5
  * List customer entitlement access
6
6
  *
7
7
  * GET /openmeter/customers/{customerId}/entitlement-access
8
8
  */
9
9
  export declare function listCustomerEntitlementAccess(client: Client, req: ListCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<Result<ListCustomerEntitlementAccessResponse>>;
10
+ /**
11
+ * Get customer entitlement access
12
+ *
13
+ * Get the customer's access to a single feature.
14
+ *
15
+ * GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
16
+ */
17
+ export declare function getCustomerEntitlementAccess(client: Client, req: GetCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<Result<GetCustomerEntitlementAccessResponse>>;
@@ -1,7 +1,8 @@
1
1
  // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
2
  import { http } from '../core.js';
3
3
  import { request } from '../lib/request.js';
4
- import { toPathWire, fromWire, assertValid } from '../lib/wire.js';
4
+ import { toURLSearchParams } from '../lib/encodings.js';
5
+ import { toWire, toPathWire, fromWire, assertValid } from '../lib/wire.js';
5
6
  import * as schemas from '../models/schemas.js';
6
7
  /**
7
8
  * List customer entitlement access
@@ -36,3 +37,51 @@ export function listCustomerEntitlementAccess(client, req, options) {
36
37
  });
37
38
  });
38
39
  }
40
+ /**
41
+ * Get customer entitlement access
42
+ *
43
+ * Get the customer's access to a single feature.
44
+ *
45
+ * GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
46
+ */
47
+ export function getCustomerEntitlementAccess(client, req, options) {
48
+ return request(() => {
49
+ const pathParamsInput = {
50
+ customerId: req.customerId,
51
+ featureKey: req.featureKey,
52
+ };
53
+ const pathParams = client._options.validate
54
+ ? toPathWire(pathParamsInput, schemas.getCustomerEntitlementAccessPathParams)
55
+ : pathParamsInput;
56
+ if (client._options.validate) {
57
+ assertValid(schemas.getCustomerEntitlementAccessPathParamsWire, pathParams);
58
+ }
59
+ const path = `openmeter/customers/${(() => {
60
+ if (pathParams.customerId === undefined) {
61
+ throw new Error('missing path parameter: customerId');
62
+ }
63
+ return encodeURIComponent(String(pathParams.customerId));
64
+ })()}/entitlement-access/features/${(() => {
65
+ if (pathParams.featureKey === undefined) {
66
+ throw new Error('missing path parameter: featureKey');
67
+ }
68
+ return encodeURIComponent(String(pathParams.featureKey));
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
+ return http(client)
78
+ .get(path, { ...options, searchParams })
79
+ .json()
80
+ .then((data) => {
81
+ if (client._options.validate) {
82
+ assertValid(schemas.getCustomerEntitlementAccessResponseWire, data);
83
+ }
84
+ return fromWire(data, schemas.getCustomerEntitlementAccessResponse);
85
+ });
86
+ });
87
+ }
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, 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, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, SubscriptionCostBasisPin, FeatureReference, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ChargeResolvedCostBasis, ClosedPeriod, 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, EntitlementAccessResult, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, RecurringPeriod, ListCreditGrantsParamsFilter, ValidationIssue, GetCreditBalanceParamsFilter, ListPlansParamsFilter, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, CurrencyAmount, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, RateCardTaxConfig, TaxConfig, OrganizationDefaultTaxCodes, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, SubscriptionEditAddPhase, WorkflowCollectionAlignmentAnchored, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, ChargeFlatFeeSystemIntent, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, 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, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, 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, 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, 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, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, SubscriptionCostBasisPin, FeatureReference, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ChargeResolvedCostBasis, ClosedPeriod, 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, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, RecurringPeriod, ListCreditGrantsParamsFilter, ValidationIssue, GetCreditBalanceParamsFilter, ListPlansParamsFilter, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, RateCardTaxConfig, TaxConfig, OrganizationDefaultTaxCodes, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, SubscriptionEditAddPhase, WorkflowCollectionAlignmentAnchored, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, 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, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, 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, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0-beta-29c583cb710e";
1
+ export declare const SDK_VERSION = "1.0.0-beta-45123e0d07d7";
@@ -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-29c583cb710e';
5
+ export const SDK_VERSION = '1.0.0-beta-45123e0d07d7';
@@ -1,5 +1,22 @@
1
- import type { ListCustomerEntitlementAccessResponseData } from '../types.js';
1
+ import type { AcceptDateStrings } from '../../lib/wire.js';
2
+ import type { EntitlementAccessResult, ListCustomerEntitlementAccessResponseData } from '../types.js';
2
3
  export type ListCustomerEntitlementAccessRequest = {
3
4
  customerId: string;
4
5
  };
5
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 & {
19
+ customerId: string;
20
+ featureKey: string;
21
+ }>;
22
+ export type GetCustomerEntitlementAccessResponse = EntitlementAccessResult;
@@ -170,6 +170,9 @@ 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
+ }>;
173
176
  export declare const createLabels: z.ZodRecord<z.ZodString, z.ZodString>;
174
177
  export declare const creditFundingMethod: z.ZodEnum<{
175
178
  external: "external";
@@ -621,6 +624,13 @@ export declare const createCurrencyCustomRequest: z.ZodObject<{
621
624
  thousandSeparator: z.ZodString;
622
625
  code: z.ZodString;
623
626
  }, z.core.$strip>;
627
+ export declare const entitlementAccessValue: z.ZodObject<{
628
+ balance: z.ZodString;
629
+ usage: z.ZodString;
630
+ overage: z.ZodString;
631
+ totalAvailableGrantAmount: z.ZodString;
632
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
633
+ }, z.core.$strip>;
624
634
  export declare const createChargeCostBasisManual: z.ZodObject<{
625
635
  type: z.ZodLiteral<"manual">;
626
636
  fiatCurrency: z.ZodOptional<z.ZodString>;
@@ -1342,16 +1352,6 @@ export declare const customerStripeCreateCustomerPortalSessionRequest: z.ZodObje
1342
1352
  returnUrl: z.ZodOptional<z.ZodString>;
1343
1353
  }, z.core.$strip>;
1344
1354
  }, z.core.$strip>;
1345
- export declare const entitlementAccessResult: z.ZodObject<{
1346
- type: z.ZodEnum<{
1347
- boolean: "boolean";
1348
- metered: "metered";
1349
- static: "static";
1350
- }>;
1351
- featureKey: z.ZodString;
1352
- hasAccess: z.ZodBoolean;
1353
- config: z.ZodOptional<z.ZodString>;
1354
- }, z.core.$strip>;
1355
1355
  export declare const rateCardMeteredEntitlement: z.ZodObject<{
1356
1356
  type: z.ZodLiteral<"metered">;
1357
1357
  isSoftLimit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -1791,6 +1791,23 @@ export declare const currencyAmount: z.ZodObject<{
1791
1791
  amount: z.ZodString;
1792
1792
  currency: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1793
1793
  }, z.core.$strip>;
1794
+ export declare const entitlementAccessResult: z.ZodObject<{
1795
+ type: z.ZodEnum<{
1796
+ boolean: "boolean";
1797
+ metered: "metered";
1798
+ static: "static";
1799
+ }>;
1800
+ featureKey: z.ZodString;
1801
+ hasAccess: z.ZodBoolean;
1802
+ config: z.ZodOptional<z.ZodString>;
1803
+ value: z.ZodOptional<z.ZodObject<{
1804
+ balance: z.ZodString;
1805
+ usage: z.ZodString;
1806
+ overage: z.ZodString;
1807
+ totalAvailableGrantAmount: z.ZodString;
1808
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
1809
+ }, z.core.$strip>>;
1810
+ }, z.core.$strip>;
1794
1811
  export declare const priceTier: z.ZodObject<{
1795
1812
  upToAmount: z.ZodOptional<z.ZodString>;
1796
1813
  flatPrice: z.ZodOptional<z.ZodObject<{
@@ -3062,18 +3079,6 @@ export declare const appStripeCreateCheckoutSessionConsentCollection: z.ZodObjec
3062
3079
  required: "required";
3063
3080
  }>>;
3064
3081
  }, z.core.$strip>;
3065
- export declare const listCustomerEntitlementAccessResponseData: z.ZodObject<{
3066
- data: z.ZodArray<z.ZodObject<{
3067
- type: z.ZodEnum<{
3068
- boolean: "boolean";
3069
- metered: "metered";
3070
- static: "static";
3071
- }>;
3072
- featureKey: z.ZodString;
3073
- hasAccess: z.ZodBoolean;
3074
- config: z.ZodOptional<z.ZodString>;
3075
- }, z.core.$strip>>;
3076
- }, z.core.$strip>;
3077
3082
  export declare const rateCardEntitlement: z.ZodDiscriminatedUnion<[z.ZodObject<{
3078
3083
  type: z.ZodLiteral<"metered">;
3079
3084
  isSoftLimit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -3466,6 +3471,25 @@ export declare const chargeFlatFeeSystemIntent: z.ZodObject<{
3466
3471
  }, z.core.$strip>;
3467
3472
  deletedAt: z.ZodOptional<z.ZodDate>;
3468
3473
  }, z.core.$strip>;
3474
+ export declare const listCustomerEntitlementAccessResponseData: z.ZodObject<{
3475
+ data: z.ZodArray<z.ZodObject<{
3476
+ type: z.ZodEnum<{
3477
+ boolean: "boolean";
3478
+ metered: "metered";
3479
+ static: "static";
3480
+ }>;
3481
+ featureKey: z.ZodString;
3482
+ hasAccess: z.ZodBoolean;
3483
+ config: z.ZodOptional<z.ZodString>;
3484
+ value: z.ZodOptional<z.ZodObject<{
3485
+ balance: z.ZodString;
3486
+ usage: z.ZodString;
3487
+ overage: z.ZodString;
3488
+ totalAvailableGrantAmount: z.ZodString;
3489
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
3490
+ }, z.core.$strip>>;
3491
+ }, z.core.$strip>>;
3492
+ }, z.core.$strip>;
3469
3493
  export declare const priceGraduated: z.ZodObject<{
3470
3494
  type: z.ZodLiteral<"graduated">;
3471
3495
  tiers: z.ZodArray<z.ZodObject<{
@@ -17802,6 +17826,39 @@ export declare const listCustomerEntitlementAccessResponse: z.ZodObject<{
17802
17826
  featureKey: z.ZodString;
17803
17827
  hasAccess: z.ZodBoolean;
17804
17828
  config: z.ZodOptional<z.ZodString>;
17829
+ value: z.ZodOptional<z.ZodObject<{
17830
+ balance: z.ZodString;
17831
+ usage: z.ZodString;
17832
+ overage: z.ZodString;
17833
+ totalAvailableGrantAmount: z.ZodString;
17834
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
17835
+ }, z.core.$strip>>;
17836
+ }, z.core.$strip>>;
17837
+ }, z.core.$strip>;
17838
+ export declare const getCustomerEntitlementAccessPathParams: z.ZodObject<{
17839
+ customerId: z.ZodString;
17840
+ featureKey: z.ZodString;
17841
+ }, z.core.$strip>;
17842
+ export declare const getCustomerEntitlementAccessQueryParams: z.ZodObject<{
17843
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
17844
+ value: "value";
17845
+ }>>>;
17846
+ }, z.core.$strip>;
17847
+ export declare const getCustomerEntitlementAccessResponse: z.ZodObject<{
17848
+ type: z.ZodEnum<{
17849
+ boolean: "boolean";
17850
+ metered: "metered";
17851
+ static: "static";
17852
+ }>;
17853
+ featureKey: z.ZodString;
17854
+ hasAccess: z.ZodBoolean;
17855
+ config: z.ZodOptional<z.ZodString>;
17856
+ value: z.ZodOptional<z.ZodObject<{
17857
+ balance: z.ZodString;
17858
+ usage: z.ZodString;
17859
+ overage: z.ZodString;
17860
+ totalAvailableGrantAmount: z.ZodString;
17861
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
17805
17862
  }, z.core.$strip>>;
17806
17863
  }, z.core.$strip>;
17807
17864
  export declare const createCreditGrantPathParams: z.ZodObject<{
@@ -32816,6 +32873,9 @@ export declare const entitlementTypeWire: z.ZodEnum<{
32816
32873
  metered: "metered";
32817
32874
  static: "static";
32818
32875
  }>;
32876
+ export declare const entitlementAccessExpandWire: z.ZodEnum<{
32877
+ value: "value";
32878
+ }>;
32819
32879
  export declare const createLabelsWire: z.ZodRecord<z.ZodString, z.ZodString>;
32820
32880
  export declare const creditFundingMethodWire: z.ZodEnum<{
32821
32881
  external: "external";
@@ -33267,6 +33327,13 @@ export declare const createCurrencyCustomRequestWire: z.ZodObject<{
33267
33327
  thousand_separator: z.ZodString;
33268
33328
  code: z.ZodString;
33269
33329
  }, z.core.$strict>;
33330
+ export declare const entitlementAccessValueWire: z.ZodObject<{
33331
+ balance: z.ZodString;
33332
+ usage: z.ZodString;
33333
+ overage: z.ZodString;
33334
+ total_available_grant_amount: z.ZodString;
33335
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
33336
+ }, z.core.$strict>;
33270
33337
  export declare const createChargeCostBasisManualWire: z.ZodObject<{
33271
33338
  type: z.ZodLiteral<"manual">;
33272
33339
  fiat_currency: z.ZodOptional<z.ZodString>;
@@ -33988,16 +34055,6 @@ export declare const customerStripeCreateCustomerPortalSessionRequestWire: z.Zod
33988
34055
  return_url: z.ZodOptional<z.ZodString>;
33989
34056
  }, z.core.$strict>;
33990
34057
  }, z.core.$strict>;
33991
- export declare const entitlementAccessResultWire: z.ZodObject<{
33992
- type: z.ZodEnum<{
33993
- boolean: "boolean";
33994
- metered: "metered";
33995
- static: "static";
33996
- }>;
33997
- feature_key: z.ZodString;
33998
- has_access: z.ZodBoolean;
33999
- config: z.ZodOptional<z.ZodString>;
34000
- }, z.core.$strict>;
34001
34058
  export declare const rateCardMeteredEntitlementWire: z.ZodObject<{
34002
34059
  type: z.ZodLiteral<"metered">;
34003
34060
  is_soft_limit: z.ZodOptional<z.ZodBoolean>;
@@ -34437,6 +34494,23 @@ export declare const currencyAmountWire: z.ZodObject<{
34437
34494
  amount: z.ZodString;
34438
34495
  currency: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
34439
34496
  }, z.core.$strict>;
34497
+ export declare const entitlementAccessResultWire: z.ZodObject<{
34498
+ type: z.ZodEnum<{
34499
+ boolean: "boolean";
34500
+ metered: "metered";
34501
+ static: "static";
34502
+ }>;
34503
+ feature_key: z.ZodString;
34504
+ has_access: z.ZodBoolean;
34505
+ config: z.ZodOptional<z.ZodString>;
34506
+ value: z.ZodOptional<z.ZodObject<{
34507
+ balance: z.ZodString;
34508
+ usage: z.ZodString;
34509
+ overage: z.ZodString;
34510
+ total_available_grant_amount: z.ZodString;
34511
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
34512
+ }, z.core.$strict>>;
34513
+ }, z.core.$strict>;
34440
34514
  export declare const priceTierWire: z.ZodObject<{
34441
34515
  up_to_amount: z.ZodOptional<z.ZodString>;
34442
34516
  flat_price: z.ZodOptional<z.ZodObject<{
@@ -35708,18 +35782,6 @@ export declare const appStripeCreateCheckoutSessionConsentCollectionWire: z.ZodO
35708
35782
  required: "required";
35709
35783
  }>>;
35710
35784
  }, z.core.$strict>;
35711
- export declare const listCustomerEntitlementAccessResponseDataWire: z.ZodObject<{
35712
- data: z.ZodArray<z.ZodObject<{
35713
- type: z.ZodEnum<{
35714
- boolean: "boolean";
35715
- metered: "metered";
35716
- static: "static";
35717
- }>;
35718
- feature_key: z.ZodString;
35719
- has_access: z.ZodBoolean;
35720
- config: z.ZodOptional<z.ZodString>;
35721
- }, z.core.$strict>>;
35722
- }, z.core.$strict>;
35723
35785
  export declare const rateCardEntitlementWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
35724
35786
  type: z.ZodLiteral<"metered">;
35725
35787
  is_soft_limit: z.ZodOptional<z.ZodBoolean>;
@@ -36112,6 +36174,25 @@ export declare const chargeFlatFeeSystemIntentWire: z.ZodObject<{
36112
36174
  }, z.core.$strict>;
36113
36175
  deleted_at: z.ZodOptional<z.ZodString>;
36114
36176
  }, z.core.$strict>;
36177
+ export declare const listCustomerEntitlementAccessResponseDataWire: z.ZodObject<{
36178
+ data: z.ZodArray<z.ZodObject<{
36179
+ type: z.ZodEnum<{
36180
+ boolean: "boolean";
36181
+ metered: "metered";
36182
+ static: "static";
36183
+ }>;
36184
+ feature_key: z.ZodString;
36185
+ has_access: z.ZodBoolean;
36186
+ config: z.ZodOptional<z.ZodString>;
36187
+ value: z.ZodOptional<z.ZodObject<{
36188
+ balance: z.ZodString;
36189
+ usage: z.ZodString;
36190
+ overage: z.ZodString;
36191
+ total_available_grant_amount: z.ZodString;
36192
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
36193
+ }, z.core.$strict>>;
36194
+ }, z.core.$strict>>;
36195
+ }, z.core.$strict>;
36115
36196
  export declare const priceGraduatedWire: z.ZodObject<{
36116
36197
  type: z.ZodLiteral<"graduated">;
36117
36198
  tiers: z.ZodArray<z.ZodObject<{
@@ -50439,6 +50520,39 @@ export declare const listCustomerEntitlementAccessResponseWire: z.ZodObject<{
50439
50520
  feature_key: z.ZodString;
50440
50521
  has_access: z.ZodBoolean;
50441
50522
  config: z.ZodOptional<z.ZodString>;
50523
+ value: z.ZodOptional<z.ZodObject<{
50524
+ balance: z.ZodString;
50525
+ usage: z.ZodString;
50526
+ overage: z.ZodString;
50527
+ total_available_grant_amount: z.ZodString;
50528
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
50529
+ }, z.core.$strict>>;
50530
+ }, z.core.$strict>>;
50531
+ }, z.core.$strict>;
50532
+ export declare const getCustomerEntitlementAccessPathParamsWire: z.ZodObject<{
50533
+ customerId: z.ZodString;
50534
+ featureKey: z.ZodString;
50535
+ }, z.core.$strip>;
50536
+ export declare const getCustomerEntitlementAccessQueryParamsWire: z.ZodObject<{
50537
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
50538
+ value: "value";
50539
+ }>>>;
50540
+ }, z.core.$strip>;
50541
+ export declare const getCustomerEntitlementAccessResponseWire: z.ZodObject<{
50542
+ type: z.ZodEnum<{
50543
+ boolean: "boolean";
50544
+ metered: "metered";
50545
+ static: "static";
50546
+ }>;
50547
+ feature_key: z.ZodString;
50548
+ has_access: z.ZodBoolean;
50549
+ config: z.ZodOptional<z.ZodString>;
50550
+ value: z.ZodOptional<z.ZodObject<{
50551
+ balance: z.ZodString;
50552
+ usage: z.ZodString;
50553
+ overage: z.ZodString;
50554
+ total_available_grant_amount: z.ZodString;
50555
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
50442
50556
  }, z.core.$strict>>;
50443
50557
  }, z.core.$strict>;
50444
50558
  export declare const createCreditGrantPathParamsWire: z.ZodObject<{
@@ -375,6 +375,9 @@ 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.');
378
381
  export const createLabels = z
379
382
  .record(z.string(), z.string())
380
383
  .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 "\\_".');
@@ -1168,6 +1171,17 @@ export const createCurrencyCustomRequest = z
1168
1171
  code: currencyCodeCustom,
1169
1172
  })
1170
1173
  .describe('CurrencyCustom create request.');
1174
+ export const entitlementAccessValue = z
1175
+ .object({
1176
+ balance: numeric,
1177
+ usage: numeric,
1178
+ overage: numeric,
1179
+ totalAvailableGrantAmount: numeric,
1180
+ grantBalances: z
1181
+ .record(z.string(), numeric)
1182
+ .describe('The remaining balance of each grant, keyed by grant ID.'),
1183
+ })
1184
+ .describe('Balance details of a metered entitlement.');
1171
1185
  export const createChargeCostBasisManual = z
1172
1186
  .object({
1173
1187
  type: z
@@ -2134,19 +2148,6 @@ export const customerStripeCreateCustomerPortalSessionRequest = z
2134
2148
  stripeOptions: appStripeCreateCustomerPortalSessionOptions,
2135
2149
  })
2136
2150
  .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.');
2137
- export const entitlementAccessResult = z
2138
- .object({
2139
- type: entitlementType,
2140
- featureKey: resourceKey,
2141
- hasAccess: z
2142
- .boolean()
2143
- .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
2144
- config: z
2145
- .string()
2146
- .optional()
2147
- .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
2148
- })
2149
- .describe('Entitlement access result.');
2150
2151
  export const rateCardMeteredEntitlement = z
2151
2152
  .object({
2152
2153
  type: z
@@ -2608,6 +2609,20 @@ export const currencyAmount = z
2608
2609
  currency: billingCurrencyCode,
2609
2610
  })
2610
2611
  .describe('Monetary amount in a fiat or custom currency.');
2612
+ export const entitlementAccessResult = z
2613
+ .object({
2614
+ type: entitlementType,
2615
+ featureKey: resourceKey,
2616
+ hasAccess: z
2617
+ .boolean()
2618
+ .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
2619
+ config: z
2620
+ .string()
2621
+ .optional()
2622
+ .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
2623
+ value: entitlementAccessValue.optional(),
2624
+ })
2625
+ .describe('Entitlement access result.');
2611
2626
  export const priceTier = z
2612
2627
  .object({
2613
2628
  upToAmount: numeric.optional(),
@@ -3199,13 +3214,6 @@ export const appStripeCreateCheckoutSessionConsentCollection = z
3199
3214
  termsOfService: appStripeCreateCheckoutSessionConsentCollectionTermsOfService.optional(),
3200
3215
  })
3201
3216
  .describe('Checkout Session consent collection configuration.');
3202
- export const listCustomerEntitlementAccessResponseData = z
3203
- .object({
3204
- data: z
3205
- .array(entitlementAccessResult)
3206
- .describe('The list of entitlement access results.'),
3207
- })
3208
- .describe('List customer entitlement access response data.');
3209
3217
  export const rateCardEntitlement = z
3210
3218
  .discriminatedUnion('type', [
3211
3219
  rateCardMeteredEntitlement,
@@ -3475,6 +3483,13 @@ export const chargeFlatFeeSystemIntent = z
3475
3483
  deletedAt: dateTime.optional(),
3476
3484
  })
3477
3485
  .describe('Flat fee intent fields from the system lifecycle controller shadowed by a manual override.');
3486
+ export const listCustomerEntitlementAccessResponseData = z
3487
+ .object({
3488
+ data: z
3489
+ .array(entitlementAccessResult)
3490
+ .describe('The list of entitlement access results.'),
3491
+ })
3492
+ .describe('List customer entitlement access response data.');
3478
3493
  export const priceGraduated = z
3479
3494
  .object({
3480
3495
  type: z.literal('graduated').describe('The type of the price.'),
@@ -5274,6 +5289,17 @@ export const listCustomerEntitlementAccessPathParams = z.object({
5274
5289
  customerId: ulid,
5275
5290
  });
5276
5291
  export const listCustomerEntitlementAccessResponse = listCustomerEntitlementAccessResponseData;
5292
+ export const getCustomerEntitlementAccessPathParams = z.object({
5293
+ customerId: ulid,
5294
+ featureKey: resourceKey,
5295
+ });
5296
+ export const getCustomerEntitlementAccessQueryParams = z.object({
5297
+ expand: z
5298
+ .array(entitlementAccessExpand)
5299
+ .optional()
5300
+ .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
5301
+ });
5302
+ export const getCustomerEntitlementAccessResponse = entitlementAccessResult;
5277
5303
  export const createCreditGrantPathParams = z.object({
5278
5304
  customerId: ulid,
5279
5305
  });
@@ -6302,6 +6328,9 @@ export const appStripeCreateCustomerPortalSessionOptionsWire = z
6302
6328
  export const entitlementTypeWire = z
6303
6329
  .enum(['metered', 'static', 'boolean'])
6304
6330
  .describe('The type of the entitlement.');
6331
+ export const entitlementAccessExpandWire = z
6332
+ .enum(['value'])
6333
+ .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
6305
6334
  export const createLabelsWire = z
6306
6335
  .record(z.string(), z.string())
6307
6336
  .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 "\\_".');
@@ -7089,6 +7118,17 @@ export const createCurrencyCustomRequestWire = z
7089
7118
  code: currencyCodeCustomWire,
7090
7119
  })
7091
7120
  .describe('CurrencyCustom create request.');
7121
+ export const entitlementAccessValueWire = z
7122
+ .strictObject({
7123
+ balance: numericWire,
7124
+ usage: numericWire,
7125
+ overage: numericWire,
7126
+ total_available_grant_amount: numericWire,
7127
+ grant_balances: z
7128
+ .record(z.string(), numericWire)
7129
+ .describe('The remaining balance of each grant, keyed by grant ID.'),
7130
+ })
7131
+ .describe('Balance details of a metered entitlement.');
7092
7132
  export const createChargeCostBasisManualWire = z
7093
7133
  .strictObject({
7094
7134
  type: z
@@ -8045,19 +8085,6 @@ export const customerStripeCreateCustomerPortalSessionRequestWire = z
8045
8085
  stripe_options: appStripeCreateCustomerPortalSessionOptionsWire,
8046
8086
  })
8047
8087
  .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.');
8048
- export const entitlementAccessResultWire = z
8049
- .strictObject({
8050
- type: entitlementTypeWire,
8051
- feature_key: resourceKeyWire,
8052
- has_access: z
8053
- .boolean()
8054
- .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
8055
- config: z
8056
- .string()
8057
- .optional()
8058
- .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
8059
- })
8060
- .describe('Entitlement access result.');
8061
8088
  export const rateCardMeteredEntitlementWire = z
8062
8089
  .strictObject({
8063
8090
  type: z
@@ -8509,6 +8536,20 @@ export const currencyAmountWire = z
8509
8536
  currency: billingCurrencyCodeWire,
8510
8537
  })
8511
8538
  .describe('Monetary amount in a fiat or custom currency.');
8539
+ export const entitlementAccessResultWire = z
8540
+ .strictObject({
8541
+ type: entitlementTypeWire,
8542
+ feature_key: resourceKeyWire,
8543
+ has_access: z
8544
+ .boolean()
8545
+ .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
8546
+ config: z
8547
+ .string()
8548
+ .optional()
8549
+ .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
8550
+ value: entitlementAccessValueWire.optional(),
8551
+ })
8552
+ .describe('Entitlement access result.');
8512
8553
  export const priceTierWire = z
8513
8554
  .strictObject({
8514
8555
  up_to_amount: numericWire.optional(),
@@ -9100,13 +9141,6 @@ export const appStripeCreateCheckoutSessionConsentCollectionWire = z
9100
9141
  terms_of_service: appStripeCreateCheckoutSessionConsentCollectionTermsOfServiceWire.optional(),
9101
9142
  })
9102
9143
  .describe('Checkout Session consent collection configuration.');
9103
- export const listCustomerEntitlementAccessResponseDataWire = z
9104
- .strictObject({
9105
- data: z
9106
- .array(entitlementAccessResultWire)
9107
- .describe('The list of entitlement access results.'),
9108
- })
9109
- .describe('List customer entitlement access response data.');
9110
9144
  export const rateCardEntitlementWire = z
9111
9145
  .discriminatedUnion('type', [
9112
9146
  rateCardMeteredEntitlementWire,
@@ -9380,6 +9414,13 @@ export const chargeFlatFeeSystemIntentWire = z
9380
9414
  deleted_at: dateTimeWire.optional(),
9381
9415
  })
9382
9416
  .describe('Flat fee intent fields from the system lifecycle controller shadowed by a manual override.');
9417
+ export const listCustomerEntitlementAccessResponseDataWire = z
9418
+ .strictObject({
9419
+ data: z
9420
+ .array(entitlementAccessResultWire)
9421
+ .describe('The list of entitlement access results.'),
9422
+ })
9423
+ .describe('List customer entitlement access response data.');
9383
9424
  export const priceGraduatedWire = z
9384
9425
  .strictObject({
9385
9426
  type: z.literal('graduated').describe('The type of the price.'),
@@ -11182,6 +11223,17 @@ export const listCustomerEntitlementAccessPathParamsWire = z.object({
11182
11223
  customerId: ulidWire,
11183
11224
  });
11184
11225
  export const listCustomerEntitlementAccessResponseWire = listCustomerEntitlementAccessResponseDataWire;
11226
+ export const getCustomerEntitlementAccessPathParamsWire = z.object({
11227
+ customerId: ulidWire,
11228
+ featureKey: resourceKeyWire,
11229
+ });
11230
+ export const getCustomerEntitlementAccessQueryParamsWire = z.object({
11231
+ expand: z
11232
+ .array(entitlementAccessExpandWire)
11233
+ .optional()
11234
+ .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
11235
+ });
11236
+ export const getCustomerEntitlementAccessResponseWire = entitlementAccessResultWire;
11185
11237
  export const createCreditGrantPathParamsWire = z.object({
11186
11238
  customerId: ulidWire,
11187
11239
  });
@@ -606,6 +606,19 @@ export interface CreateCurrencyCustomRequest {
606
606
  thousandSeparator: string;
607
607
  code: string;
608
608
  }
609
+ /** Balance details of a metered entitlement. */
610
+ export interface EntitlementAccessValue {
611
+ /** The remaining balance of the entitlement in the current usage period. */
612
+ balance: string;
613
+ /** The usage recorded in the current usage period. */
614
+ usage: string;
615
+ /** The usage exceeding the available balance in the current usage period. */
616
+ overage: string;
617
+ /** The total amount granted and currently available to the entitlement. */
618
+ totalAvailableGrantAmount: string;
619
+ /** The remaining balance of each grant, keyed by grant ID. */
620
+ grantBalances: Record<string, string>;
621
+ }
609
622
  /** Cost basis with an explicit conversion rate supplied with the charge. */
610
623
  export interface CreateChargeCostBasisManual {
611
624
  /** Discriminator selecting the cost basis mode. */
@@ -1763,23 +1776,6 @@ export interface CustomerStripeCreateCustomerPortalSessionRequest {
1763
1776
  /** Options for configuring the Stripe Customer Portal Session. */
1764
1777
  stripeOptions: AppStripeCreateCustomerPortalSessionOptions;
1765
1778
  }
1766
- /** Entitlement access result. */
1767
- export interface EntitlementAccessResult {
1768
- /** The type of the entitlement. */
1769
- type: 'metered' | 'static' | 'boolean';
1770
- /** The feature key of the entitlement. */
1771
- featureKey: string;
1772
- /**
1773
- * Whether the customer has access to the feature. Always true for `boolean` and
1774
- * `static` entitlements. Depends on balance for `metered` entitlements.
1775
- */
1776
- hasAccess: boolean;
1777
- /**
1778
- * Only available for static entitlements. Config is the JSON parsable
1779
- * configuration of the entitlement. Useful to describe per customer configuration.
1780
- */
1781
- config?: string;
1782
- }
1783
1779
  /** The entitlement template of a metered entitlement. */
1784
1780
  export interface RateCardMeteredEntitlement {
1785
1781
  /** The type of the entitlement template. */
@@ -2363,6 +2359,28 @@ export interface CurrencyAmount {
2363
2359
  /** The fiat or custom currency code of the amount. */
2364
2360
  currency: BillingCurrencyCode;
2365
2361
  }
2362
+ /** Entitlement access result. */
2363
+ export interface EntitlementAccessResult {
2364
+ /** The type of the entitlement. */
2365
+ type: 'metered' | 'static' | 'boolean';
2366
+ /** The feature key of the entitlement. */
2367
+ featureKey: string;
2368
+ /**
2369
+ * Whether the customer has access to the feature. Always true for `boolean` and
2370
+ * `static` entitlements. Depends on balance for `metered` entitlements.
2371
+ */
2372
+ hasAccess: boolean;
2373
+ /**
2374
+ * Only available for static entitlements. Config is the JSON parsable
2375
+ * configuration of the entitlement. Useful to describe per customer configuration.
2376
+ */
2377
+ config?: string;
2378
+ /**
2379
+ * Only available for metered entitlements. The current balance details of the
2380
+ * entitlement. Requires the `value` expand.
2381
+ */
2382
+ value?: EntitlementAccessValue;
2383
+ }
2366
2384
  /**
2367
2385
  * A price tier used in graduated and volume pricing.
2368
2386
  *
@@ -3146,11 +3164,6 @@ export interface AppStripeCreateCheckoutSessionConsentCollection {
3146
3164
  */
3147
3165
  termsOfService?: 'none' | 'required';
3148
3166
  }
3149
- /** List customer entitlement access response data. */
3150
- export interface ListCustomerEntitlementAccessResponseData {
3151
- /** The list of entitlement access results. */
3152
- data: EntitlementAccessResult[];
3153
- }
3154
3167
  /**
3155
3168
  * Add a new phase to the subscription. The phase is created without items; use
3156
3169
  * add-item operations to populate it.
@@ -3524,6 +3537,11 @@ export interface ChargeFlatFeeSystemIntent {
3524
3537
  */
3525
3538
  deletedAt?: Date;
3526
3539
  }
3540
+ /** List customer entitlement access response data. */
3541
+ export interface ListCustomerEntitlementAccessResponseData {
3542
+ /** The list of entitlement access results. */
3543
+ data: EntitlementAccessResult[];
3544
+ }
3527
3545
  /**
3528
3546
  * Graduated tiered price.
3529
3547
  *
@@ -1,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
- import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse } from '../models/operations/entitlements.js';
3
+ import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse } from '../models/operations/entitlements.js';
4
4
  export declare class Entitlements {
5
5
  private readonly _client;
6
6
  constructor(_client: Client);
@@ -10,4 +10,12 @@ export declare class Entitlements {
10
10
  * GET /openmeter/customers/{customerId}/entitlement-access
11
11
  */
12
12
  listCustomerAccess(request: ListCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<ListCustomerEntitlementAccessResponse>;
13
+ /**
14
+ * Get customer entitlement access
15
+ *
16
+ * Get the customer's access to a single feature.
17
+ *
18
+ * GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
19
+ */
20
+ getCustomerAccess(request: GetCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<GetCustomerEntitlementAccessResponse>;
13
21
  }
@@ -1,6 +1,6 @@
1
1
  // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
2
  import { unwrap } from '../lib/types.js';
3
- import { listCustomerEntitlementAccess } from '../funcs/entitlements.js';
3
+ import { listCustomerEntitlementAccess, getCustomerEntitlementAccess, } from '../funcs/entitlements.js';
4
4
  export class Entitlements {
5
5
  _client;
6
6
  constructor(_client) {
@@ -14,4 +14,14 @@ export class Entitlements {
14
14
  async listCustomerAccess(request, options) {
15
15
  return unwrap(await listCustomerEntitlementAccess(this._client, request, options));
16
16
  }
17
+ /**
18
+ * Get customer entitlement access
19
+ *
20
+ * Get the customer's access to a single feature.
21
+ *
22
+ * GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
23
+ */
24
+ async getCustomerAccess(request, options) {
25
+ return unwrap(await getCustomerEntitlementAccess(this._client, request, options));
26
+ }
17
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-29c583cb710e",
3
+ "version": "1.0.0-beta-45123e0d07d7",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",