@openmeter/client 1.0.0-beta-081c456ce358 → 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
@@ -422,18 +422,20 @@ they can change or be removed without notice or semver consideration.
422
422
 
423
423
  ### Internal Customers
424
424
 
425
- | Method | HTTP | Description |
426
- | --------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
427
- | `client.internal.customers.entitlements.create` | `POST /openmeter/customers/{customerId}/entitlements` | Create an entitlement for the customer. A customer can have only one active entitlement per feature. The feature must be compatible with the entitlement type. Entitlements cannot be modified after creation, only deleted. |
428
- | `client.internal.customers.entitlements.override` | `PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override` | Override an entitlement of the customer with a new one. The referenced entitlement ends and the new one starts at the same instant, so access continues without a gap. Both must belong to the same feature. Use this for upgrades and downgrades. Fails if the referenced entitlement does not exist, is deleted, or is no longer active. |
429
- | `client.internal.customers.entitlements.getHistory` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history` | Get the balance and usage history of a metered entitlement. The queried range may span multiple usage periods. `windowed_history` groups usage into windows of the requested size and reports the balance at the start of each window. `burndown_history` lists the periods in which grants were consumed in a fixed order, together with the usage taken from each grant. |
430
- | `client.internal.customers.entitlements.get` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Get an entitlement of the customer by ID. For checking entitlement access, use the entitlement access endpoints instead. |
431
- | `client.internal.customers.entitlements.list` | `GET /openmeter/customers/{customerId}/entitlements` | List the entitlements of the customer that are active at the time of the request. For checking entitlement access, use the entitlement access endpoints instead. |
432
- | `client.internal.customers.entitlements.resetUsage` | `POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset` | Reset the usage of a metered entitlement. The reset starts a new usage period: usage is zeroed and grants roll over according to their rollover settings. Usage is reset automatically at the end of each usage period. Use this operation to reset it earlier, for example to align the entitlement with the customer's billing period. The usage period anchor can be moved at the same time. |
433
- | `client.internal.customers.entitlements.delete` | `DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Deletes the entitlement and revokes access to its feature. A customer can hold only one active entitlement per feature, so migrating a feature requires deleting the previous entitlement first. Deletion sets the `deleted_at` timestamp instead of removing history. Access and status queries for earlier points in time still treat the entitlement as active, so access changes are never retroactive. |
434
- | `client.internal.customers.credits.grants.void` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void` | Void a credit grant, forfeiting the remaining unused balance. Voiding is a forward-looking, irreversible operation. Credits already consumed by usage remain unaffected — only the remaining balance is forfeited. The grant reads as `voided` status afterwards. Payment state is not adjusted when `payment_adjustment` is `none`, so invoice-backed or externally collected payments may still collect the original amount. Only `active` grants can be voided; voiding a pending, expired, or fully consumed grant returns a conflict. Retrying a successful void is an idempotent success. |
435
- | `client.internal.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
436
- | `client.internal.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
425
+ | Method | HTTP | Description |
426
+ | ------------------------------------------------------ | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
427
+ | `client.internal.customers.entitlements.create` | `POST /openmeter/customers/{customerId}/entitlements` | Create an entitlement for the customer. A customer can have only one active entitlement per feature. The feature must be compatible with the entitlement type. Entitlements cannot be modified after creation, only deleted. |
428
+ | `client.internal.customers.entitlements.override` | `PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override` | Override an entitlement of the customer with a new one. The referenced entitlement ends and the new one starts at the same instant, so access continues without a gap. Both must belong to the same feature. Use this for upgrades and downgrades. Fails if the referenced entitlement does not exist, is deleted, or is no longer active. |
429
+ | `client.internal.customers.entitlements.getHistory` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history` | Get the balance and usage history of a metered entitlement. The queried range may span multiple usage periods. `windowed_history` groups usage into windows of the requested size and reports the balance at the start of each window. `burndown_history` lists the periods in which grants were consumed in a fixed order, together with the usage taken from each grant. |
430
+ | `client.internal.customers.entitlements.get` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Get an entitlement of the customer by ID. For checking entitlement access, use the entitlement access endpoints instead. |
431
+ | `client.internal.customers.entitlements.list` | `GET /openmeter/customers/{customerId}/entitlements` | List the entitlements of the customer that are active at the time of the request. For checking entitlement access, use the entitlement access endpoints instead. |
432
+ | `client.internal.customers.entitlements.resetUsage` | `POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset` | Reset the usage of a metered entitlement. The reset starts a new usage period: usage is zeroed and grants roll over according to their rollover settings. Usage is reset automatically at the end of each usage period. Use this operation to reset it earlier, for example to align the entitlement with the customer's billing period. The usage period anchor can be moved at the same time. |
433
+ | `client.internal.customers.entitlements.delete` | `DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Deletes the entitlement and revokes access to its feature. A customer can hold only one active entitlement per feature, so migrating a feature requires deleting the previous entitlement first. Deletion sets the `deleted_at` timestamp instead of removing history. Access and status queries for earlier points in time still treat the entitlement as active, so access changes are never retroactive. |
434
+ | `client.internal.customers.entitlements.grants.create` | `POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants` | Issue a grant for a metered entitlement of the customer. Boolean and static entitlements cannot have grants, so the request is rejected for them. Grants are immutable. The amount is added to the balance from `effective_at`, which cannot be earlier than the start of the current usage period. |
435
+ | `client.internal.customers.entitlements.grants.list` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants` | List the grants issued for an entitlement of the customer. Grants only exist for metered entitlements, so the list is empty for boolean and static entitlements. Deleted grants are excluded unless `include_deleted` is set. Voided and expired grants are always included, as they are part of the balance history. |
436
+ | `client.internal.customers.credits.grants.void` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void` | Void a credit grant, forfeiting the remaining unused balance. Voiding is a forward-looking, irreversible operation. Credits already consumed by usage remain unaffected — only the remaining balance is forfeited. The grant reads as `voided` status afterwards. Payment state is not adjusted when `payment_adjustment` is `none`, so invoice-backed or externally collected payments may still collect the original amount. Only `active` grants can be voided; voiding a pending, expired, or fully consumed grant returns a conflict. Retrying a successful void is an idempotent success. |
437
+ | `client.internal.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
438
+ | `client.internal.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
437
439
 
438
440
  ### Internal Entitlements
439
441
 
@@ -442,6 +444,7 @@ they can change or be removed without notice or semver consideration.
442
444
  | `client.internal.entitlements.getCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}` | Get the customer's access to a single feature. |
443
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. |
444
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. |
445
448
 
446
449
  ### Internal Subscriptions
447
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 { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
3
+ import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
4
4
  /**
5
5
  * Create customer
6
6
  *
@@ -167,6 +167,30 @@ export declare function resetCustomerEntitlementUsage(client: Client, req: Reset
167
167
  * DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}
168
168
  */
169
169
  export declare function deleteCustomerEntitlement(client: Client, req: DeleteCustomerEntitlementRequest, options?: RequestOptions): Promise<Result<DeleteCustomerEntitlementResponse>>;
170
+ /**
171
+ * Create customer entitlement grant
172
+ *
173
+ * Issue a grant for a metered entitlement of the customer. Boolean and static
174
+ * entitlements cannot have grants, so the request is rejected for them.
175
+ *
176
+ * Grants are immutable. The amount is added to the balance from `effective_at`,
177
+ * which cannot be earlier than the start of the current usage period.
178
+ *
179
+ * POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
180
+ */
181
+ export declare function createCustomerEntitlementGrant(client: Client, req: CreateCustomerEntitlementGrantRequest, options?: RequestOptions): Promise<Result<CreateCustomerEntitlementGrantResponse>>;
182
+ /**
183
+ * List customer entitlement grants
184
+ *
185
+ * List the grants issued for an entitlement of the customer. Grants only exist for
186
+ * metered entitlements, so the list is empty for boolean and static entitlements.
187
+ *
188
+ * Deleted grants are excluded unless `include_deleted` is set. Voided and expired
189
+ * grants are always included, as they are part of the balance history.
190
+ *
191
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
192
+ */
193
+ export declare function listCustomerEntitlementGrants(client: Client, req: ListCustomerEntitlementGrantsRequest, options?: RequestOptions): Promise<Result<ListCustomerEntitlementGrantsResponse>>;
170
194
  /**
171
195
  * Create a new credit grant
172
196
  *
@@ -675,6 +675,112 @@ export function deleteCustomerEntitlement(client, req, options) {
675
675
  await http(client).delete(path, options);
676
676
  });
677
677
  }
678
+ /**
679
+ * Create customer entitlement grant
680
+ *
681
+ * Issue a grant for a metered entitlement of the customer. Boolean and static
682
+ * entitlements cannot have grants, so the request is rejected for them.
683
+ *
684
+ * Grants are immutable. The amount is added to the balance from `effective_at`,
685
+ * which cannot be earlier than the start of the current usage period.
686
+ *
687
+ * POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
688
+ */
689
+ export function createCustomerEntitlementGrant(client, req, options) {
690
+ return request(() => {
691
+ const pathParamsInput = {
692
+ customerId: req.customerId,
693
+ entitlementId: req.entitlementId,
694
+ };
695
+ const pathParams = client._options.validate
696
+ ? toPathWire(pathParamsInput, schemas.createCustomerEntitlementGrantPathParams)
697
+ : pathParamsInput;
698
+ if (client._options.validate) {
699
+ assertValid(schemas.createCustomerEntitlementGrantPathParamsWire, pathParams);
700
+ }
701
+ const path = `openmeter/customers/${(() => {
702
+ if (pathParams.customerId === undefined) {
703
+ throw new Error('missing path parameter: customerId');
704
+ }
705
+ return encodeURIComponent(String(pathParams.customerId));
706
+ })()}/entitlements/${(() => {
707
+ if (pathParams.entitlementId === undefined) {
708
+ throw new Error('missing path parameter: entitlementId');
709
+ }
710
+ return encodeURIComponent(String(pathParams.entitlementId));
711
+ })()}/grants`;
712
+ const body = toWire(req.body, schemas.createCustomerEntitlementGrantBody);
713
+ if (client._options.validate) {
714
+ assertValid(schemas.createCustomerEntitlementGrantBodyWire, body);
715
+ }
716
+ return http(client)
717
+ .post(path, { ...options, json: body })
718
+ .json()
719
+ .then((data) => {
720
+ if (client._options.validate) {
721
+ assertValid(schemas.createCustomerEntitlementGrantResponseWire, data);
722
+ }
723
+ return fromWire(data, schemas.createCustomerEntitlementGrantResponse);
724
+ });
725
+ });
726
+ }
727
+ /**
728
+ * List customer entitlement grants
729
+ *
730
+ * List the grants issued for an entitlement of the customer. Grants only exist for
731
+ * metered entitlements, so the list is empty for boolean and static entitlements.
732
+ *
733
+ * Deleted grants are excluded unless `include_deleted` is set. Voided and expired
734
+ * grants are always included, as they are part of the balance history.
735
+ *
736
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
737
+ */
738
+ export function listCustomerEntitlementGrants(client, req, options) {
739
+ return request(() => {
740
+ const pathParamsInput = {
741
+ customerId: req.customerId,
742
+ entitlementId: req.entitlementId,
743
+ };
744
+ const pathParams = client._options.validate
745
+ ? toPathWire(pathParamsInput, schemas.listCustomerEntitlementGrantsPathParams)
746
+ : pathParamsInput;
747
+ if (client._options.validate) {
748
+ assertValid(schemas.listCustomerEntitlementGrantsPathParamsWire, pathParams);
749
+ }
750
+ const path = `openmeter/customers/${(() => {
751
+ if (pathParams.customerId === undefined) {
752
+ throw new Error('missing path parameter: customerId');
753
+ }
754
+ return encodeURIComponent(String(pathParams.customerId));
755
+ })()}/entitlements/${(() => {
756
+ if (pathParams.entitlementId === undefined) {
757
+ throw new Error('missing path parameter: entitlementId');
758
+ }
759
+ return encodeURIComponent(String(pathParams.entitlementId));
760
+ })()}/grants`;
761
+ if (client._options.validate && req.sort !== undefined) {
762
+ assertValid(schemas.listCustomerEntitlementGrantsQueryParams.shape.sort, req.sort);
763
+ }
764
+ const query = toWire({
765
+ page: req.page,
766
+ sort: encodeSort(req.sort, toSnakeCase),
767
+ includeDeleted: req.includeDeleted,
768
+ }, schemas.listCustomerEntitlementGrantsQueryParams);
769
+ if (client._options.validate) {
770
+ assertValid(schemas.listCustomerEntitlementGrantsQueryParamsWire, query);
771
+ }
772
+ const searchParams = toURLSearchParams(query);
773
+ return http(client)
774
+ .get(path, { ...options, searchParams })
775
+ .json()
776
+ .then((data) => {
777
+ if (client._options.validate) {
778
+ assertValid(schemas.listCustomerEntitlementGrantsResponseWire, data);
779
+ }
780
+ return fromWire(data, schemas.listCustomerEntitlementGrantsResponse);
781
+ });
782
+ });
783
+ }
678
784
  /**
679
785
  * Create a new credit grant
680
786
  *
@@ -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, 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, 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-081c456ce358";
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-081c456ce358';
5
+ export const SDK_VERSION = '1.0.0-beta-7f901f655a1a';
@@ -1,5 +1,5 @@
1
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
2
- import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequestInput, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreateEntitlementRequestInput, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, Entitlement, EntitlementHistory, EntitlementHistoryWindowSize, EntitlementPagePaginatedResponse, GetCreditBalanceParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomerChargesParamsFilter, ListCustomerEntitlementsParamsFilter, ListCustomersParamsFilter, ResetCustomerEntitlementUsageRequestInput, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
2
+ import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequestInput, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreateEntitlementRequestInput, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, Entitlement, EntitlementGrant, EntitlementGrantCreateRequest, EntitlementGrantPagePaginatedResponse, EntitlementHistory, EntitlementHistoryWindowSize, EntitlementPagePaginatedResponse, GetCreditBalanceParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomerChargesParamsFilter, ListCustomerEntitlementsParamsFilter, ListCustomersParamsFilter, ResetCustomerEntitlementUsageRequestInput, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
3
3
  export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
4
4
  export type CreateCustomerResponse = Customer;
5
5
  export type GetCustomerRequest = {
@@ -141,6 +141,38 @@ export type DeleteCustomerEntitlementRequest = {
141
141
  entitlementId: string;
142
142
  };
143
143
  export type DeleteCustomerEntitlementResponse = void;
144
+ export type CreateCustomerEntitlementGrantRequest = AcceptDateStrings<{
145
+ customerId: string;
146
+ entitlementId: string;
147
+ body: EntitlementGrantCreateRequest;
148
+ }>;
149
+ export type CreateCustomerEntitlementGrantResponse = EntitlementGrant;
150
+ export interface ListCustomerEntitlementGrantsQuery {
151
+ /** Determines which page of the collection to retrieve. */
152
+ page?: {
153
+ size?: number;
154
+ number?: number;
155
+ };
156
+ /**
157
+ * Sort grants returned in the response. Supported sort attributes are:
158
+ *
159
+ * - `created_at` (default)
160
+ * - `updated_at`
161
+ * - `effective_at`
162
+ * - `expires_at`
163
+ *
164
+ * The `asc` suffix is optional as the default sort order is ascending. The `desc`
165
+ * suffix is used to specify a descending order.
166
+ */
167
+ sort?: SortQueryInput;
168
+ /** Include deleted grants in the response. */
169
+ includeDeleted?: boolean;
170
+ }
171
+ export type ListCustomerEntitlementGrantsRequest = AcceptDateStrings<ListCustomerEntitlementGrantsQuery & {
172
+ customerId: string;
173
+ entitlementId: string;
174
+ }>;
175
+ export type ListCustomerEntitlementGrantsResponse = EntitlementGrantPagePaginatedResponse;
144
176
  export type CreateCreditGrantRequest = AcceptDateStrings<{
145
177
  customerId: string;
146
178
  body: CreateCreditGrantRequestInput;
@@ -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;