@openmeter/client 1.0.0-beta-081c456ce358 → 1.0.0-beta-0abbaf78837c
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 +14 -12
- package/dist/funcs/customers.d.ts +25 -1
- package/dist/funcs/customers.js +106 -0
- package/dist/index.d.ts +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/customers.d.ts +33 -1
- package/dist/models/schemas.d.ts +265 -0
- package/dist/models/schemas.js +131 -2
- package/dist/models/types.d.ts +72 -2
- package/dist/sdk/internal.d.ts +46 -2
- package/dist/sdk/internal.js +55 -1
- package/package.json +1 -1
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
|
|
426
|
-
|
|
|
427
|
-
| `client.internal.customers.entitlements.create`
|
|
428
|
-
| `client.internal.customers.entitlements.override`
|
|
429
|
-
| `client.internal.customers.entitlements.getHistory`
|
|
430
|
-
| `client.internal.customers.entitlements.get`
|
|
431
|
-
| `client.internal.customers.entitlements.list`
|
|
432
|
-
| `client.internal.customers.entitlements.resetUsage`
|
|
433
|
-
| `client.internal.customers.entitlements.delete`
|
|
434
|
-
| `client.internal.customers.
|
|
435
|
-
| `client.internal.customers.
|
|
436
|
-
| `client.internal.customers.
|
|
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
|
|
|
@@ -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
|
*
|
package/dist/funcs/customers.js
CHANGED
|
@@ -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
|
*
|
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, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ListNotificationChannelsParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, EntitlementGrant, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, NotificationChannelPagePaginatedResponse, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, EntitlementGrantPagePaginatedResponse, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BooleanFieldFilter, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, NotificationChannelInput, CreateNotificationChannelRequestInput, UpdateNotificationChannelRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, NotificationChannelPagePaginatedResponseInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.0-beta-
|
|
1
|
+
export declare const SDK_VERSION = "1.0.0-beta-0abbaf78837c";
|
package/dist/lib/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// The committed value is a dev placeholder. The publish flow
|
|
3
3
|
// (`make -C api/spec publish-aip-sdk`) stamps the real release version here
|
|
4
4
|
// before `pnpm publish`, after `pnpm version` updates package.json.
|
|
5
|
-
export const SDK_VERSION = '1.0.0-beta-
|
|
5
|
+
export const SDK_VERSION = '1.0.0-beta-0abbaf78837c';
|
|
@@ -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;
|
package/dist/models/schemas.d.ts
CHANGED
|
@@ -3402,6 +3402,27 @@ export declare const entitlementBoolean: z.ZodObject<{
|
|
|
3402
3402
|
updatedAt: z.ZodDate;
|
|
3403
3403
|
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
3404
3404
|
}, z.core.$strip>;
|
|
3405
|
+
export declare const entitlementGrant: z.ZodObject<{
|
|
3406
|
+
id: z.ZodString;
|
|
3407
|
+
entitlementId: z.ZodString;
|
|
3408
|
+
amount: z.ZodString;
|
|
3409
|
+
priority: z.ZodNumber;
|
|
3410
|
+
effectiveAt: z.ZodDate;
|
|
3411
|
+
expiresAfter: z.ZodOptional<z.ZodString>;
|
|
3412
|
+
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
3413
|
+
maxRolloverAmount: z.ZodString;
|
|
3414
|
+
minRolloverAmount: z.ZodString;
|
|
3415
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
3416
|
+
anchor: z.ZodDate;
|
|
3417
|
+
interval: z.ZodString;
|
|
3418
|
+
}, z.core.$strip>>;
|
|
3419
|
+
nextRecurrence: z.ZodOptional<z.ZodDate>;
|
|
3420
|
+
voidedAt: z.ZodOptional<z.ZodDate>;
|
|
3421
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3422
|
+
createdAt: z.ZodDate;
|
|
3423
|
+
updatedAt: z.ZodDate;
|
|
3424
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
3425
|
+
}, z.core.$strip>;
|
|
3405
3426
|
export declare const workflowCollectionAlignmentAnchored: z.ZodObject<{
|
|
3406
3427
|
type: z.ZodLiteral<"anchored">;
|
|
3407
3428
|
recurringPeriod: z.ZodObject<{
|
|
@@ -4722,6 +4743,36 @@ export declare const entitlement: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
4722
4743
|
updatedAt: z.ZodDate;
|
|
4723
4744
|
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
4724
4745
|
}, z.core.$strip>], "type">;
|
|
4746
|
+
export declare const entitlementGrantPagePaginatedResponse: z.ZodObject<{
|
|
4747
|
+
data: z.ZodArray<z.ZodObject<{
|
|
4748
|
+
id: z.ZodString;
|
|
4749
|
+
entitlementId: z.ZodString;
|
|
4750
|
+
amount: z.ZodString;
|
|
4751
|
+
priority: z.ZodNumber;
|
|
4752
|
+
effectiveAt: z.ZodDate;
|
|
4753
|
+
expiresAfter: z.ZodOptional<z.ZodString>;
|
|
4754
|
+
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
4755
|
+
maxRolloverAmount: z.ZodString;
|
|
4756
|
+
minRolloverAmount: z.ZodString;
|
|
4757
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
4758
|
+
anchor: z.ZodDate;
|
|
4759
|
+
interval: z.ZodString;
|
|
4760
|
+
}, z.core.$strip>>;
|
|
4761
|
+
nextRecurrence: z.ZodOptional<z.ZodDate>;
|
|
4762
|
+
voidedAt: z.ZodOptional<z.ZodDate>;
|
|
4763
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4764
|
+
createdAt: z.ZodDate;
|
|
4765
|
+
updatedAt: z.ZodDate;
|
|
4766
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
4767
|
+
}, z.core.$strip>>;
|
|
4768
|
+
meta: z.ZodObject<{
|
|
4769
|
+
page: z.ZodObject<{
|
|
4770
|
+
number: z.ZodNumber;
|
|
4771
|
+
size: z.ZodNumber;
|
|
4772
|
+
total: z.ZodNumber;
|
|
4773
|
+
}, z.core.$strip>;
|
|
4774
|
+
}, z.core.$strip>;
|
|
4775
|
+
}, z.core.$strip>;
|
|
4725
4776
|
export declare const workflowCollectionAlignment: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4726
4777
|
type: z.ZodLiteral<"subscription">;
|
|
4727
4778
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -19312,6 +19363,89 @@ export declare const getEntitlementResponse: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
19312
19363
|
updatedAt: z.ZodDate;
|
|
19313
19364
|
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19314
19365
|
}, z.core.$strip>], "type">;
|
|
19366
|
+
export declare const createCustomerEntitlementGrantPathParams: z.ZodObject<{
|
|
19367
|
+
customerId: z.ZodString;
|
|
19368
|
+
entitlementId: z.ZodString;
|
|
19369
|
+
}, z.core.$strip>;
|
|
19370
|
+
export declare const createCustomerEntitlementGrantBody: z.ZodObject<{
|
|
19371
|
+
amount: z.ZodString;
|
|
19372
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
19373
|
+
effectiveAt: z.ZodDate;
|
|
19374
|
+
expiresAfter: z.ZodOptional<z.ZodString>;
|
|
19375
|
+
maxRolloverAmount: z.ZodOptional<z.ZodString>;
|
|
19376
|
+
minRolloverAmount: z.ZodOptional<z.ZodString>;
|
|
19377
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19378
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
19379
|
+
interval: z.ZodString;
|
|
19380
|
+
anchor: z.ZodOptional<z.ZodDate>;
|
|
19381
|
+
}, z.core.$strip>>;
|
|
19382
|
+
}, z.core.$strip>;
|
|
19383
|
+
export declare const createCustomerEntitlementGrantResponse: z.ZodObject<{
|
|
19384
|
+
id: z.ZodString;
|
|
19385
|
+
entitlementId: z.ZodString;
|
|
19386
|
+
amount: z.ZodString;
|
|
19387
|
+
priority: z.ZodNumber;
|
|
19388
|
+
effectiveAt: z.ZodDate;
|
|
19389
|
+
expiresAfter: z.ZodOptional<z.ZodString>;
|
|
19390
|
+
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
19391
|
+
maxRolloverAmount: z.ZodString;
|
|
19392
|
+
minRolloverAmount: z.ZodString;
|
|
19393
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
19394
|
+
anchor: z.ZodDate;
|
|
19395
|
+
interval: z.ZodString;
|
|
19396
|
+
}, z.core.$strip>>;
|
|
19397
|
+
nextRecurrence: z.ZodOptional<z.ZodDate>;
|
|
19398
|
+
voidedAt: z.ZodOptional<z.ZodDate>;
|
|
19399
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19400
|
+
createdAt: z.ZodDate;
|
|
19401
|
+
updatedAt: z.ZodDate;
|
|
19402
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19403
|
+
}, z.core.$strip>;
|
|
19404
|
+
export declare const listCustomerEntitlementGrantsPathParams: z.ZodObject<{
|
|
19405
|
+
customerId: z.ZodString;
|
|
19406
|
+
entitlementId: z.ZodString;
|
|
19407
|
+
}, z.core.$strip>;
|
|
19408
|
+
export declare const listCustomerEntitlementGrantsQueryParams: z.ZodObject<{
|
|
19409
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
19410
|
+
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
19411
|
+
number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
19412
|
+
}, z.core.$strip>>;
|
|
19413
|
+
sort: z.ZodOptional<z.ZodObject<{
|
|
19414
|
+
by: z.ZodString;
|
|
19415
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"asc">, z.ZodLiteral<"desc">]>>>;
|
|
19416
|
+
}, z.core.$strip>>;
|
|
19417
|
+
includeDeleted: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
19418
|
+
}, z.core.$strip>;
|
|
19419
|
+
export declare const listCustomerEntitlementGrantsResponse: z.ZodObject<{
|
|
19420
|
+
data: z.ZodArray<z.ZodObject<{
|
|
19421
|
+
id: z.ZodString;
|
|
19422
|
+
entitlementId: z.ZodString;
|
|
19423
|
+
amount: z.ZodString;
|
|
19424
|
+
priority: z.ZodNumber;
|
|
19425
|
+
effectiveAt: z.ZodDate;
|
|
19426
|
+
expiresAfter: z.ZodOptional<z.ZodString>;
|
|
19427
|
+
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
19428
|
+
maxRolloverAmount: z.ZodString;
|
|
19429
|
+
minRolloverAmount: z.ZodString;
|
|
19430
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
19431
|
+
anchor: z.ZodDate;
|
|
19432
|
+
interval: z.ZodString;
|
|
19433
|
+
}, z.core.$strip>>;
|
|
19434
|
+
nextRecurrence: z.ZodOptional<z.ZodDate>;
|
|
19435
|
+
voidedAt: z.ZodOptional<z.ZodDate>;
|
|
19436
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19437
|
+
createdAt: z.ZodDate;
|
|
19438
|
+
updatedAt: z.ZodDate;
|
|
19439
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19440
|
+
}, z.core.$strip>>;
|
|
19441
|
+
meta: z.ZodObject<{
|
|
19442
|
+
page: z.ZodObject<{
|
|
19443
|
+
number: z.ZodNumber;
|
|
19444
|
+
size: z.ZodNumber;
|
|
19445
|
+
total: z.ZodNumber;
|
|
19446
|
+
}, z.core.$strip>;
|
|
19447
|
+
}, z.core.$strip>;
|
|
19448
|
+
}, z.core.$strip>;
|
|
19315
19449
|
export declare const createCreditGrantPathParams: z.ZodObject<{
|
|
19316
19450
|
customerId: z.ZodString;
|
|
19317
19451
|
}, z.core.$strip>;
|
|
@@ -37773,6 +37907,27 @@ export declare const entitlementBooleanWire: z.ZodObject<{
|
|
|
37773
37907
|
updated_at: z.ZodString;
|
|
37774
37908
|
deleted_at: z.ZodOptional<z.ZodString>;
|
|
37775
37909
|
}, z.core.$strict>;
|
|
37910
|
+
export declare const entitlementGrantWire: z.ZodObject<{
|
|
37911
|
+
id: z.ZodString;
|
|
37912
|
+
entitlement_id: z.ZodString;
|
|
37913
|
+
amount: z.ZodString;
|
|
37914
|
+
priority: z.ZodNumber;
|
|
37915
|
+
effective_at: z.ZodString;
|
|
37916
|
+
expires_after: z.ZodOptional<z.ZodString>;
|
|
37917
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
37918
|
+
max_rollover_amount: z.ZodString;
|
|
37919
|
+
min_rollover_amount: z.ZodString;
|
|
37920
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
37921
|
+
anchor: z.ZodString;
|
|
37922
|
+
interval: z.ZodString;
|
|
37923
|
+
}, z.core.$strict>>;
|
|
37924
|
+
next_recurrence: z.ZodOptional<z.ZodString>;
|
|
37925
|
+
voided_at: z.ZodOptional<z.ZodString>;
|
|
37926
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
37927
|
+
created_at: z.ZodString;
|
|
37928
|
+
updated_at: z.ZodString;
|
|
37929
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
37930
|
+
}, z.core.$strict>;
|
|
37776
37931
|
export declare const workflowCollectionAlignmentAnchoredWire: z.ZodObject<{
|
|
37777
37932
|
type: z.ZodLiteral<"anchored">;
|
|
37778
37933
|
recurring_period: z.ZodObject<{
|
|
@@ -39093,6 +39248,36 @@ export declare const entitlementWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
39093
39248
|
updated_at: z.ZodString;
|
|
39094
39249
|
deleted_at: z.ZodOptional<z.ZodString>;
|
|
39095
39250
|
}, z.core.$strict>], "type">;
|
|
39251
|
+
export declare const entitlementGrantPagePaginatedResponseWire: z.ZodObject<{
|
|
39252
|
+
data: z.ZodArray<z.ZodObject<{
|
|
39253
|
+
id: z.ZodString;
|
|
39254
|
+
entitlement_id: z.ZodString;
|
|
39255
|
+
amount: z.ZodString;
|
|
39256
|
+
priority: z.ZodNumber;
|
|
39257
|
+
effective_at: z.ZodString;
|
|
39258
|
+
expires_after: z.ZodOptional<z.ZodString>;
|
|
39259
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
39260
|
+
max_rollover_amount: z.ZodString;
|
|
39261
|
+
min_rollover_amount: z.ZodString;
|
|
39262
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
39263
|
+
anchor: z.ZodString;
|
|
39264
|
+
interval: z.ZodString;
|
|
39265
|
+
}, z.core.$strict>>;
|
|
39266
|
+
next_recurrence: z.ZodOptional<z.ZodString>;
|
|
39267
|
+
voided_at: z.ZodOptional<z.ZodString>;
|
|
39268
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
39269
|
+
created_at: z.ZodString;
|
|
39270
|
+
updated_at: z.ZodString;
|
|
39271
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
39272
|
+
}, z.core.$strict>>;
|
|
39273
|
+
meta: z.ZodObject<{
|
|
39274
|
+
page: z.ZodObject<{
|
|
39275
|
+
number: z.ZodNumber;
|
|
39276
|
+
size: z.ZodNumber;
|
|
39277
|
+
total: z.ZodNumber;
|
|
39278
|
+
}, z.core.$strict>;
|
|
39279
|
+
}, z.core.$strict>;
|
|
39280
|
+
}, z.core.$strict>;
|
|
39096
39281
|
export declare const workflowCollectionAlignmentWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39097
39282
|
type: z.ZodLiteral<"subscription">;
|
|
39098
39283
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -53668,6 +53853,86 @@ export declare const getEntitlementResponseWire: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
53668
53853
|
updated_at: z.ZodString;
|
|
53669
53854
|
deleted_at: z.ZodOptional<z.ZodString>;
|
|
53670
53855
|
}, z.core.$strict>], "type">;
|
|
53856
|
+
export declare const createCustomerEntitlementGrantPathParamsWire: z.ZodObject<{
|
|
53857
|
+
customerId: z.ZodString;
|
|
53858
|
+
entitlementId: z.ZodString;
|
|
53859
|
+
}, z.core.$strip>;
|
|
53860
|
+
export declare const createCustomerEntitlementGrantBodyWire: z.ZodObject<{
|
|
53861
|
+
amount: z.ZodString;
|
|
53862
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
53863
|
+
effective_at: z.ZodString;
|
|
53864
|
+
expires_after: z.ZodOptional<z.ZodString>;
|
|
53865
|
+
max_rollover_amount: z.ZodOptional<z.ZodString>;
|
|
53866
|
+
min_rollover_amount: z.ZodOptional<z.ZodString>;
|
|
53867
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53868
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
53869
|
+
interval: z.ZodString;
|
|
53870
|
+
anchor: z.ZodOptional<z.ZodString>;
|
|
53871
|
+
}, z.core.$strict>>;
|
|
53872
|
+
}, z.core.$strict>;
|
|
53873
|
+
export declare const createCustomerEntitlementGrantResponseWire: z.ZodObject<{
|
|
53874
|
+
id: z.ZodString;
|
|
53875
|
+
entitlement_id: z.ZodString;
|
|
53876
|
+
amount: z.ZodString;
|
|
53877
|
+
priority: z.ZodNumber;
|
|
53878
|
+
effective_at: z.ZodString;
|
|
53879
|
+
expires_after: z.ZodOptional<z.ZodString>;
|
|
53880
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
53881
|
+
max_rollover_amount: z.ZodString;
|
|
53882
|
+
min_rollover_amount: z.ZodString;
|
|
53883
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
53884
|
+
anchor: z.ZodString;
|
|
53885
|
+
interval: z.ZodString;
|
|
53886
|
+
}, z.core.$strict>>;
|
|
53887
|
+
next_recurrence: z.ZodOptional<z.ZodString>;
|
|
53888
|
+
voided_at: z.ZodOptional<z.ZodString>;
|
|
53889
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53890
|
+
created_at: z.ZodString;
|
|
53891
|
+
updated_at: z.ZodString;
|
|
53892
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
53893
|
+
}, z.core.$strict>;
|
|
53894
|
+
export declare const listCustomerEntitlementGrantsPathParamsWire: z.ZodObject<{
|
|
53895
|
+
customerId: z.ZodString;
|
|
53896
|
+
entitlementId: z.ZodString;
|
|
53897
|
+
}, z.core.$strip>;
|
|
53898
|
+
export declare const listCustomerEntitlementGrantsQueryParamsWire: z.ZodObject<{
|
|
53899
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
53900
|
+
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
53901
|
+
number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
53902
|
+
}, z.core.$strict>>;
|
|
53903
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
53904
|
+
include_deleted: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
53905
|
+
}, z.core.$strip>;
|
|
53906
|
+
export declare const listCustomerEntitlementGrantsResponseWire: z.ZodObject<{
|
|
53907
|
+
data: z.ZodArray<z.ZodObject<{
|
|
53908
|
+
id: z.ZodString;
|
|
53909
|
+
entitlement_id: z.ZodString;
|
|
53910
|
+
amount: z.ZodString;
|
|
53911
|
+
priority: z.ZodNumber;
|
|
53912
|
+
effective_at: z.ZodString;
|
|
53913
|
+
expires_after: z.ZodOptional<z.ZodString>;
|
|
53914
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
53915
|
+
max_rollover_amount: z.ZodString;
|
|
53916
|
+
min_rollover_amount: z.ZodString;
|
|
53917
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
53918
|
+
anchor: z.ZodString;
|
|
53919
|
+
interval: z.ZodString;
|
|
53920
|
+
}, z.core.$strict>>;
|
|
53921
|
+
next_recurrence: z.ZodOptional<z.ZodString>;
|
|
53922
|
+
voided_at: z.ZodOptional<z.ZodString>;
|
|
53923
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53924
|
+
created_at: z.ZodString;
|
|
53925
|
+
updated_at: z.ZodString;
|
|
53926
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
53927
|
+
}, z.core.$strict>>;
|
|
53928
|
+
meta: z.ZodObject<{
|
|
53929
|
+
page: z.ZodObject<{
|
|
53930
|
+
number: z.ZodNumber;
|
|
53931
|
+
size: z.ZodNumber;
|
|
53932
|
+
total: z.ZodNumber;
|
|
53933
|
+
}, z.core.$strict>;
|
|
53934
|
+
}, z.core.$strict>;
|
|
53935
|
+
}, z.core.$strict>;
|
|
53671
53936
|
export declare const createCreditGrantPathParamsWire: z.ZodObject<{
|
|
53672
53937
|
customerId: z.ZodString;
|
|
53673
53938
|
}, z.core.$strip>;
|
package/dist/models/schemas.js
CHANGED
|
@@ -3484,7 +3484,7 @@ export const entitlementGrantCreateRequest = z
|
|
|
3484
3484
|
labels: labels.optional(),
|
|
3485
3485
|
recurrence: recurringPeriodInput.optional(),
|
|
3486
3486
|
})
|
|
3487
|
-
.describe('A grant
|
|
3487
|
+
.describe('A grant to issue for a metered entitlement.');
|
|
3488
3488
|
export const createEntitlementStaticRequest = z
|
|
3489
3489
|
.object({
|
|
3490
3490
|
type: z.literal('static').describe('The type of the entitlement.'),
|
|
@@ -3577,6 +3577,31 @@ export const entitlementBoolean = z
|
|
|
3577
3577
|
deletedAt: dateTime.optional(),
|
|
3578
3578
|
})
|
|
3579
3579
|
.describe('A boolean entitlement grants access to a feature.');
|
|
3580
|
+
export const entitlementGrant = z
|
|
3581
|
+
.object({
|
|
3582
|
+
id: ulid,
|
|
3583
|
+
entitlementId: ulid,
|
|
3584
|
+
amount: numeric,
|
|
3585
|
+
priority: z
|
|
3586
|
+
.number()
|
|
3587
|
+
.int()
|
|
3588
|
+
.nonnegative()
|
|
3589
|
+
.lte(255)
|
|
3590
|
+
.describe('The priority of the grant. Lower values are consumed first: a grant with priority 1 is consumed before one with priority 2. Among equal priorities, the grant closest to expiration is consumed first, then the earliest created.'),
|
|
3591
|
+
effectiveAt: dateTime,
|
|
3592
|
+
expiresAfter: iso8601Duration.optional(),
|
|
3593
|
+
expiresAt: dateTime.optional(),
|
|
3594
|
+
maxRolloverAmount: numeric,
|
|
3595
|
+
minRolloverAmount: numeric,
|
|
3596
|
+
recurrence: recurringPeriod.optional(),
|
|
3597
|
+
nextRecurrence: dateTime.optional(),
|
|
3598
|
+
voidedAt: dateTime.optional(),
|
|
3599
|
+
labels: labels.optional(),
|
|
3600
|
+
createdAt: dateTime,
|
|
3601
|
+
updatedAt: dateTime,
|
|
3602
|
+
deletedAt: dateTime.optional(),
|
|
3603
|
+
})
|
|
3604
|
+
.describe("A grant issued for a metered entitlement. Each grant adds its amount to the entitlement's balance from its effective time until it expires, and usage is deducted from the grants in priority order. Grants are immutable, so the balance is deterministic regardless of when it is queried. Deleting a grant ends it at the time of the deletion.");
|
|
3580
3605
|
export const workflowCollectionAlignmentAnchored = z
|
|
3581
3606
|
.object({
|
|
3582
3607
|
type: z.literal('anchored').describe('The type of alignment.'),
|
|
@@ -4182,6 +4207,12 @@ export const entitlement = z
|
|
|
4182
4207
|
entitlementBoolean,
|
|
4183
4208
|
])
|
|
4184
4209
|
.describe('An entitlement grants a customer access to a feature.');
|
|
4210
|
+
export const entitlementGrantPagePaginatedResponse = z
|
|
4211
|
+
.object({
|
|
4212
|
+
data: z.array(entitlementGrant),
|
|
4213
|
+
meta: paginatedMeta,
|
|
4214
|
+
})
|
|
4215
|
+
.describe('Page paginated response.');
|
|
4185
4216
|
export const workflowCollectionAlignment = z
|
|
4186
4217
|
.discriminatedUnion('type', [
|
|
4187
4218
|
workflowCollectionAlignmentSubscription,
|
|
@@ -5843,6 +5874,38 @@ export const getEntitlementPathParams = z.object({
|
|
|
5843
5874
|
entitlementId: ulid,
|
|
5844
5875
|
});
|
|
5845
5876
|
export const getEntitlementResponse = entitlement;
|
|
5877
|
+
export const createCustomerEntitlementGrantPathParams = z.object({
|
|
5878
|
+
customerId: ulid,
|
|
5879
|
+
entitlementId: ulid,
|
|
5880
|
+
});
|
|
5881
|
+
export const createCustomerEntitlementGrantBody = entitlementGrantCreateRequest;
|
|
5882
|
+
export const createCustomerEntitlementGrantResponse = entitlementGrant;
|
|
5883
|
+
export const listCustomerEntitlementGrantsPathParams = z.object({
|
|
5884
|
+
customerId: ulid,
|
|
5885
|
+
entitlementId: ulid,
|
|
5886
|
+
});
|
|
5887
|
+
export const listCustomerEntitlementGrantsQueryParams = z.object({
|
|
5888
|
+
page: z
|
|
5889
|
+
.object({
|
|
5890
|
+
size: z.coerce
|
|
5891
|
+
.number()
|
|
5892
|
+
.int()
|
|
5893
|
+
.optional()
|
|
5894
|
+
.describe('The number of items to include per page.'),
|
|
5895
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
5896
|
+
})
|
|
5897
|
+
.optional()
|
|
5898
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
5899
|
+
sort: sortQuery.optional(),
|
|
5900
|
+
includeDeleted: z.coerce
|
|
5901
|
+
.boolean()
|
|
5902
|
+
.optional()
|
|
5903
|
+
.describe('Include deleted grants in the response.'),
|
|
5904
|
+
});
|
|
5905
|
+
export const listCustomerEntitlementGrantsResponse = z.object({
|
|
5906
|
+
data: z.array(entitlementGrant),
|
|
5907
|
+
meta: paginatedMeta,
|
|
5908
|
+
});
|
|
5846
5909
|
export const createCreditGrantPathParams = z.object({
|
|
5847
5910
|
customerId: ulid,
|
|
5848
5911
|
});
|
|
@@ -9982,7 +10045,7 @@ export const entitlementGrantCreateRequestWire = z
|
|
|
9982
10045
|
labels: labelsWire.optional(),
|
|
9983
10046
|
recurrence: recurringPeriodInputWire.optional(),
|
|
9984
10047
|
})
|
|
9985
|
-
.describe('A grant
|
|
10048
|
+
.describe('A grant to issue for a metered entitlement.');
|
|
9986
10049
|
export const createEntitlementStaticRequestWire = z
|
|
9987
10050
|
.strictObject({
|
|
9988
10051
|
type: z.literal('static').describe('The type of the entitlement.'),
|
|
@@ -10072,6 +10135,31 @@ export const entitlementBooleanWire = z
|
|
|
10072
10135
|
deleted_at: dateTimeWire.optional(),
|
|
10073
10136
|
})
|
|
10074
10137
|
.describe('A boolean entitlement grants access to a feature.');
|
|
10138
|
+
export const entitlementGrantWire = z
|
|
10139
|
+
.strictObject({
|
|
10140
|
+
id: ulidWire,
|
|
10141
|
+
entitlement_id: ulidWire,
|
|
10142
|
+
amount: numericWire,
|
|
10143
|
+
priority: z
|
|
10144
|
+
.number()
|
|
10145
|
+
.int()
|
|
10146
|
+
.nonnegative()
|
|
10147
|
+
.lte(255)
|
|
10148
|
+
.describe('The priority of the grant. Lower values are consumed first: a grant with priority 1 is consumed before one with priority 2. Among equal priorities, the grant closest to expiration is consumed first, then the earliest created.'),
|
|
10149
|
+
effective_at: dateTimeWire,
|
|
10150
|
+
expires_after: iso8601DurationWire.optional(),
|
|
10151
|
+
expires_at: dateTimeWire.optional(),
|
|
10152
|
+
max_rollover_amount: numericWire,
|
|
10153
|
+
min_rollover_amount: numericWire,
|
|
10154
|
+
recurrence: recurringPeriodWire.optional(),
|
|
10155
|
+
next_recurrence: dateTimeWire.optional(),
|
|
10156
|
+
voided_at: dateTimeWire.optional(),
|
|
10157
|
+
labels: labelsWire.optional(),
|
|
10158
|
+
created_at: dateTimeWire,
|
|
10159
|
+
updated_at: dateTimeWire,
|
|
10160
|
+
deleted_at: dateTimeWire.optional(),
|
|
10161
|
+
})
|
|
10162
|
+
.describe("A grant issued for a metered entitlement. Each grant adds its amount to the entitlement's balance from its effective time until it expires, and usage is deducted from the grants in priority order. Grants are immutable, so the balance is deterministic regardless of when it is queried. Deleting a grant ends it at the time of the deletion.");
|
|
10075
10163
|
export const workflowCollectionAlignmentAnchoredWire = z
|
|
10076
10164
|
.strictObject({
|
|
10077
10165
|
type: z.literal('anchored').describe('The type of alignment.'),
|
|
@@ -10672,6 +10760,12 @@ export const entitlementWire = z
|
|
|
10672
10760
|
entitlementBooleanWire,
|
|
10673
10761
|
])
|
|
10674
10762
|
.describe('An entitlement grants a customer access to a feature.');
|
|
10763
|
+
export const entitlementGrantPagePaginatedResponseWire = z
|
|
10764
|
+
.strictObject({
|
|
10765
|
+
data: z.array(entitlementGrantWire),
|
|
10766
|
+
meta: paginatedMetaWire,
|
|
10767
|
+
})
|
|
10768
|
+
.describe('Page paginated response.');
|
|
10675
10769
|
export const workflowCollectionAlignmentWire = z
|
|
10676
10770
|
.discriminatedUnion('type', [
|
|
10677
10771
|
workflowCollectionAlignmentSubscriptionWire,
|
|
@@ -12347,6 +12441,41 @@ export const getEntitlementPathParamsWire = z.object({
|
|
|
12347
12441
|
entitlementId: ulidWire,
|
|
12348
12442
|
});
|
|
12349
12443
|
export const getEntitlementResponseWire = entitlementWire;
|
|
12444
|
+
export const createCustomerEntitlementGrantPathParamsWire = z.object({
|
|
12445
|
+
customerId: ulidWire,
|
|
12446
|
+
entitlementId: ulidWire,
|
|
12447
|
+
});
|
|
12448
|
+
export const createCustomerEntitlementGrantBodyWire = entitlementGrantCreateRequestWire;
|
|
12449
|
+
export const createCustomerEntitlementGrantResponseWire = entitlementGrantWire;
|
|
12450
|
+
export const listCustomerEntitlementGrantsPathParamsWire = z.object({
|
|
12451
|
+
customerId: ulidWire,
|
|
12452
|
+
entitlementId: ulidWire,
|
|
12453
|
+
});
|
|
12454
|
+
export const listCustomerEntitlementGrantsQueryParamsWire = z.object({
|
|
12455
|
+
page: z
|
|
12456
|
+
.strictObject({
|
|
12457
|
+
size: z.coerce
|
|
12458
|
+
.number()
|
|
12459
|
+
.int()
|
|
12460
|
+
.optional()
|
|
12461
|
+
.describe('The number of items to include per page.'),
|
|
12462
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
12463
|
+
})
|
|
12464
|
+
.optional()
|
|
12465
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
12466
|
+
sort: z
|
|
12467
|
+
.string()
|
|
12468
|
+
.optional()
|
|
12469
|
+
.describe('Sort grants returned in the response. Supported sort attributes are: - `created_at` (default) - `updated_at` - `effective_at` - `expires_at` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order.'),
|
|
12470
|
+
include_deleted: z.coerce
|
|
12471
|
+
.boolean()
|
|
12472
|
+
.optional()
|
|
12473
|
+
.describe('Include deleted grants in the response.'),
|
|
12474
|
+
});
|
|
12475
|
+
export const listCustomerEntitlementGrantsResponseWire = z.strictObject({
|
|
12476
|
+
data: z.array(entitlementGrantWire),
|
|
12477
|
+
meta: paginatedMetaWire,
|
|
12478
|
+
});
|
|
12350
12479
|
export const createCreditGrantPathParamsWire = z.object({
|
|
12351
12480
|
customerId: ulidWire,
|
|
12352
12481
|
});
|
package/dist/models/types.d.ts
CHANGED
|
@@ -3444,7 +3444,7 @@ export interface AppStripeCreateCheckoutSessionConsentCollection {
|
|
|
3444
3444
|
*/
|
|
3445
3445
|
termsOfService?: 'none' | 'required';
|
|
3446
3446
|
}
|
|
3447
|
-
/** A grant
|
|
3447
|
+
/** A grant to issue for a metered entitlement. */
|
|
3448
3448
|
export interface EntitlementGrantCreateRequest {
|
|
3449
3449
|
/** The amount to grant, in the feature's unit. Must be positive. */
|
|
3450
3450
|
amount: string;
|
|
@@ -3456,7 +3456,7 @@ export interface EntitlementGrantCreateRequest {
|
|
|
3456
3456
|
priority?: number;
|
|
3457
3457
|
/**
|
|
3458
3458
|
* The time the grant becomes effective and the anchor for recurring grants. The
|
|
3459
|
-
* value is
|
|
3459
|
+
* value is truncated to the start of the minute.
|
|
3460
3460
|
*/
|
|
3461
3461
|
effectiveAt: Date;
|
|
3462
3462
|
/**
|
|
@@ -3628,6 +3628,71 @@ export interface EntitlementBoolean {
|
|
|
3628
3628
|
/** The time the entitlement was deleted. */
|
|
3629
3629
|
deletedAt?: Date;
|
|
3630
3630
|
}
|
|
3631
|
+
/**
|
|
3632
|
+
* A grant issued for a metered entitlement. Each grant adds its amount to the
|
|
3633
|
+
* entitlement's balance from its effective time until it expires, and usage is
|
|
3634
|
+
* deducted from the grants in priority order.
|
|
3635
|
+
*
|
|
3636
|
+
* Grants are immutable, so the balance is deterministic regardless of when it is
|
|
3637
|
+
* queried. Deleting a grant ends it at the time of the deletion.
|
|
3638
|
+
*/
|
|
3639
|
+
export interface EntitlementGrant {
|
|
3640
|
+
id: string;
|
|
3641
|
+
/** The ID of the entitlement the grant belongs to. */
|
|
3642
|
+
entitlementId: string;
|
|
3643
|
+
/** The granted amount, in the feature's unit. */
|
|
3644
|
+
amount: string;
|
|
3645
|
+
/**
|
|
3646
|
+
* The priority of the grant. Lower values are consumed first: a grant with
|
|
3647
|
+
* priority 1 is consumed before one with priority 2. Among equal priorities, the
|
|
3648
|
+
* grant closest to expiration is consumed first, then the earliest created.
|
|
3649
|
+
*/
|
|
3650
|
+
priority: number;
|
|
3651
|
+
/** The time the grant takes effect. */
|
|
3652
|
+
effectiveAt: Date;
|
|
3653
|
+
/**
|
|
3654
|
+
* The duration after which the grant expires, counted from `effective_at`. Always
|
|
3655
|
+
* a single-unit duration (for example `PT12H`, `P7D`, `P2W`, `P3M`, `P1Y`). Absent
|
|
3656
|
+
* when the grant never expires.
|
|
3657
|
+
*/
|
|
3658
|
+
expiresAfter?: string;
|
|
3659
|
+
/**
|
|
3660
|
+
* The time the grant expires, calculated from `effective_at` and `expires_after`.
|
|
3661
|
+
* The grant is no longer in effect from this time. Absent when the grant never
|
|
3662
|
+
* expires.
|
|
3663
|
+
*/
|
|
3664
|
+
expiresAt?: Date;
|
|
3665
|
+
/**
|
|
3666
|
+
* The maximum balance the grant carries over at reset. The balance after a reset
|
|
3667
|
+
* is `MIN(max_rollover_amount, MAX(balance_before_reset, min_rollover_amount))`.
|
|
3668
|
+
*/
|
|
3669
|
+
maxRolloverAmount: string;
|
|
3670
|
+
/**
|
|
3671
|
+
* The minimum balance the grant carries over at reset. The balance after a reset
|
|
3672
|
+
* is `MIN(max_rollover_amount, MAX(balance_before_reset, min_rollover_amount))`.
|
|
3673
|
+
*/
|
|
3674
|
+
minRolloverAmount: string;
|
|
3675
|
+
/**
|
|
3676
|
+
* The recurrence of the grant. When set, the grant amount is re-issued every
|
|
3677
|
+
* interval from the anchor, which defaults to `effective_at`. Absent for
|
|
3678
|
+
* non-recurring grants.
|
|
3679
|
+
*/
|
|
3680
|
+
recurrence?: RecurringPeriod;
|
|
3681
|
+
/** The next time the grant recurs. Absent for non-recurring grants. */
|
|
3682
|
+
nextRecurrence?: Date;
|
|
3683
|
+
/**
|
|
3684
|
+
* The time the grant was voided. A voided grant is no longer in effect from this
|
|
3685
|
+
* time.
|
|
3686
|
+
*/
|
|
3687
|
+
voidedAt?: Date;
|
|
3688
|
+
labels?: Labels;
|
|
3689
|
+
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3690
|
+
createdAt: Date;
|
|
3691
|
+
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3692
|
+
updatedAt: Date;
|
|
3693
|
+
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3694
|
+
deletedAt?: Date;
|
|
3695
|
+
}
|
|
3631
3696
|
/**
|
|
3632
3697
|
* BillingWorkflowCollectionAlignmentAnchored specifies the alignment for
|
|
3633
3698
|
* collecting the pending line items into an invoice.
|
|
@@ -4494,6 +4559,11 @@ export interface CreateEntitlementMeteredRequest {
|
|
|
4494
4559
|
/** Grants created together with the entitlement. Cannot be combined with `issue`. */
|
|
4495
4560
|
grants?: EntitlementGrantCreateRequest[];
|
|
4496
4561
|
}
|
|
4562
|
+
/** Page paginated response. */
|
|
4563
|
+
export interface EntitlementGrantPagePaginatedResponse {
|
|
4564
|
+
data: EntitlementGrant[];
|
|
4565
|
+
meta: PaginatedMeta;
|
|
4566
|
+
}
|
|
4497
4567
|
/** Snapshot of the billing workflow configuration captured at invoice creation. */
|
|
4498
4568
|
export interface InvoiceWorkflowSettings {
|
|
4499
4569
|
/** The apps that will be used to orchestrate the invoice's workflow. */
|
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
3
|
+
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse } from '../models/operations/entitlements.js';
|
|
5
5
|
import type { UnscheduleSubscriptionRequest, UnscheduleSubscriptionResponse, RestoreSubscriptionRequest, RestoreSubscriptionResponse, MigrateSubscriptionRequest, MigrateSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
6
6
|
import type { UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
@@ -10,7 +10,7 @@ import type { ListCurrenciesRequest, ListCurrenciesResponse, CreateCustomCurrenc
|
|
|
10
10
|
import type { ListPlanAddonsRequest, ListPlanAddonsResponse } from '../models/operations/planAddons.js';
|
|
11
11
|
import type { QueryEntitlementAccessRequest, QueryEntitlementAccessResponse } from '../models/operations/entitlementAccess.js';
|
|
12
12
|
import type { ListNotificationChannelsRequest, ListNotificationChannelsResponse, CreateNotificationChannelRequest, CreateNotificationChannelResponse, GetNotificationChannelRequest, GetNotificationChannelResponse, UpdateNotificationChannelRequest, UpdateNotificationChannelResponse, DeleteNotificationChannelRequest, DeleteNotificationChannelResponse } from '../models/operations/notifications.js';
|
|
13
|
-
import type { AppCatalogItem, Charge, CostBasis, Currency, Entitlement, Invoice, NotificationChannel, PlanAddon } from '../models/types.js';
|
|
13
|
+
import type { AppCatalogItem, Charge, CostBasis, Currency, Entitlement, EntitlementGrant, Invoice, NotificationChannel, PlanAddon } from '../models/types.js';
|
|
14
14
|
/**
|
|
15
15
|
* Operations marked internal in the API definition. They are not part of
|
|
16
16
|
* the customer surface: they may require additional permissions, and they
|
|
@@ -152,6 +152,50 @@ export declare class InternalCustomersEntitlements {
|
|
|
152
152
|
* DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}
|
|
153
153
|
*/
|
|
154
154
|
delete(request: DeleteCustomerEntitlementRequest, options?: RequestOptions): Promise<DeleteCustomerEntitlementResponse>;
|
|
155
|
+
private _grants?;
|
|
156
|
+
get grants(): InternalCustomersEntitlementsGrants;
|
|
157
|
+
}
|
|
158
|
+
export declare class InternalCustomersEntitlementsGrants {
|
|
159
|
+
private readonly _client;
|
|
160
|
+
constructor(_client: Client);
|
|
161
|
+
/**
|
|
162
|
+
* Create customer entitlement grant
|
|
163
|
+
*
|
|
164
|
+
* Issue a grant for a metered entitlement of the customer. Boolean and static
|
|
165
|
+
* entitlements cannot have grants, so the request is rejected for them.
|
|
166
|
+
*
|
|
167
|
+
* Grants are immutable. The amount is added to the balance from `effective_at`,
|
|
168
|
+
* which cannot be earlier than the start of the current usage period.
|
|
169
|
+
*
|
|
170
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
171
|
+
*/
|
|
172
|
+
create(request: CreateCustomerEntitlementGrantRequest, options?: RequestOptions): Promise<CreateCustomerEntitlementGrantResponse>;
|
|
173
|
+
/**
|
|
174
|
+
* List customer entitlement grants
|
|
175
|
+
*
|
|
176
|
+
* List the grants issued for an entitlement of the customer. Grants only exist for
|
|
177
|
+
* metered entitlements, so the list is empty for boolean and static entitlements.
|
|
178
|
+
*
|
|
179
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
180
|
+
* grants are always included, as they are part of the balance history.
|
|
181
|
+
*
|
|
182
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
183
|
+
*/
|
|
184
|
+
list(request: ListCustomerEntitlementGrantsRequest, options?: RequestOptions): Promise<ListCustomerEntitlementGrantsResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* List customer entitlement grants
|
|
187
|
+
*
|
|
188
|
+
* List the grants issued for an entitlement of the customer. Grants only exist for
|
|
189
|
+
* metered entitlements, so the list is empty for boolean and static entitlements.
|
|
190
|
+
*
|
|
191
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
192
|
+
* grants are always included, as they are part of the balance history.
|
|
193
|
+
*
|
|
194
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
195
|
+
*
|
|
196
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
197
|
+
*/
|
|
198
|
+
listAll(request: ListCustomerEntitlementGrantsRequest, options?: RequestOptions): AsyncIterable<EntitlementGrant>;
|
|
155
199
|
}
|
|
156
200
|
export declare class InternalCustomersCredits {
|
|
157
201
|
private readonly _client;
|
package/dist/sdk/internal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
2
|
import { unwrap } from '../lib/types.js';
|
|
3
3
|
import { paginatePages } from '../lib/paginate.js';
|
|
4
|
-
import { createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
|
|
4
|
+
import { createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, createCustomerEntitlementGrant, listCustomerEntitlementGrants, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
|
|
5
5
|
import { getCustomerEntitlementAccess, listEntitlements, getEntitlement, } from '../funcs/entitlements.js';
|
|
6
6
|
import { unscheduleSubscription, restoreSubscription, migrateSubscription, createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
|
|
7
7
|
import { uninstallApp, updateApp, listAppCatalog, getAppCatalogItem, installApp, } from '../funcs/apps.js';
|
|
@@ -200,6 +200,60 @@ export class InternalCustomersEntitlements {
|
|
|
200
200
|
async delete(request, options) {
|
|
201
201
|
return unwrap(await deleteCustomerEntitlement(this._client, request, options));
|
|
202
202
|
}
|
|
203
|
+
_grants;
|
|
204
|
+
get grants() {
|
|
205
|
+
return (this._grants ??= new InternalCustomersEntitlementsGrants(this._client));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
export class InternalCustomersEntitlementsGrants {
|
|
209
|
+
_client;
|
|
210
|
+
constructor(_client) {
|
|
211
|
+
this._client = _client;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Create customer entitlement grant
|
|
215
|
+
*
|
|
216
|
+
* Issue a grant for a metered entitlement of the customer. Boolean and static
|
|
217
|
+
* entitlements cannot have grants, so the request is rejected for them.
|
|
218
|
+
*
|
|
219
|
+
* Grants are immutable. The amount is added to the balance from `effective_at`,
|
|
220
|
+
* which cannot be earlier than the start of the current usage period.
|
|
221
|
+
*
|
|
222
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
223
|
+
*/
|
|
224
|
+
async create(request, options) {
|
|
225
|
+
return unwrap(await createCustomerEntitlementGrant(this._client, request, options));
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* List customer entitlement grants
|
|
229
|
+
*
|
|
230
|
+
* List the grants issued for an entitlement of the customer. Grants only exist for
|
|
231
|
+
* metered entitlements, so the list is empty for boolean and static entitlements.
|
|
232
|
+
*
|
|
233
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
234
|
+
* grants are always included, as they are part of the balance history.
|
|
235
|
+
*
|
|
236
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
237
|
+
*/
|
|
238
|
+
async list(request, options) {
|
|
239
|
+
return unwrap(await listCustomerEntitlementGrants(this._client, request, options));
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* List customer entitlement grants
|
|
243
|
+
*
|
|
244
|
+
* List the grants issued for an entitlement of the customer. Grants only exist for
|
|
245
|
+
* metered entitlements, so the list is empty for boolean and static entitlements.
|
|
246
|
+
*
|
|
247
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
248
|
+
* grants are always included, as they are part of the balance history.
|
|
249
|
+
*
|
|
250
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
251
|
+
*
|
|
252
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
253
|
+
*/
|
|
254
|
+
listAll(request, options) {
|
|
255
|
+
return paginatePages((req, opts) => listCustomerEntitlementGrants(this._client, req, opts), request, options);
|
|
256
|
+
}
|
|
203
257
|
}
|
|
204
258
|
export class InternalCustomersCredits {
|
|
205
259
|
_client;
|