@openmeter/client 1.0.0-beta-a90239740fe2 → 1.0.0-beta-ba497d78b3b6
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 +5 -3
- package/dist/funcs/entitlements.d.ts +20 -1
- package/dist/funcs/entitlements.js +72 -2
- 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/entitlements.d.ts +31 -1
- package/dist/models/schemas.d.ts +453 -0
- package/dist/models/schemas.js +65 -0
- package/dist/models/types.d.ts +11 -0
- package/dist/sdk/internal.d.ts +32 -1
- package/dist/sdk/internal.js +38 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -435,9 +435,11 @@ they can change or be removed without notice or semver consideration.
|
|
|
435
435
|
|
|
436
436
|
### Internal Entitlements
|
|
437
437
|
|
|
438
|
-
| Method | HTTP | Description
|
|
439
|
-
| ------------------------------------------------ | -------------------------------------------------------------------------------- |
|
|
440
|
-
| `client.internal.entitlements.getCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}` | Get the customer's access to a single feature.
|
|
438
|
+
| Method | HTTP | Description |
|
|
439
|
+
| ------------------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
440
|
+
| `client.internal.entitlements.getCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}` | Get the customer's access to a single feature. |
|
|
441
|
+
| `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. |
|
|
442
|
+
| `client.internal.entitlements.get` | `GET /openmeter/entitlements/{entitlementId}` | Get an entitlement by ID. To check entitlement access, use the entitlement access endpoints instead. |
|
|
441
443
|
|
|
442
444
|
### Internal Subscriptions
|
|
443
445
|
|
|
@@ -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 } from '../models/operations/entitlements.js';
|
|
3
|
+
import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse } from '../models/operations/entitlements.js';
|
|
4
4
|
/**
|
|
5
5
|
* List customer entitlement access
|
|
6
6
|
*
|
|
@@ -15,3 +15,22 @@ export declare function listCustomerEntitlementAccess(client: Client, req: ListC
|
|
|
15
15
|
* GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
|
|
16
16
|
*/
|
|
17
17
|
export declare function getCustomerEntitlementAccess(client: Client, req: GetCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<Result<GetCustomerEntitlementAccessResponse>>;
|
|
18
|
+
/**
|
|
19
|
+
* List entitlements
|
|
20
|
+
*
|
|
21
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
22
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
23
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
24
|
+
*
|
|
25
|
+
* GET /openmeter/entitlements
|
|
26
|
+
*/
|
|
27
|
+
export declare function listEntitlements(client: Client, req?: ListEntitlementsRequest, options?: RequestOptions): Promise<Result<ListEntitlementsResponse>>;
|
|
28
|
+
/**
|
|
29
|
+
* Get entitlement
|
|
30
|
+
*
|
|
31
|
+
* Get an entitlement by ID. To check entitlement access, use the entitlement
|
|
32
|
+
* access endpoints instead.
|
|
33
|
+
*
|
|
34
|
+
* GET /openmeter/entitlements/{entitlementId}
|
|
35
|
+
*/
|
|
36
|
+
export declare function getEntitlement(client: Client, req: GetEntitlementRequest, options?: RequestOptions): Promise<Result<GetEntitlementResponse>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
2
|
import { http } from '../core.js';
|
|
3
3
|
import { request } from '../lib/request.js';
|
|
4
|
-
import { toURLSearchParams } from '../lib/encodings.js';
|
|
5
|
-
import { toWire, toPathWire, fromWire, assertValid } from '../lib/wire.js';
|
|
4
|
+
import { toURLSearchParams, encodeSort } from '../lib/encodings.js';
|
|
5
|
+
import { toWire, toPathWire, fromWire, assertValid, toSnakeCase, } from '../lib/wire.js';
|
|
6
6
|
import * as schemas from '../models/schemas.js';
|
|
7
7
|
/**
|
|
8
8
|
* List customer entitlement access
|
|
@@ -85,3 +85,73 @@ export function getCustomerEntitlementAccess(client, req, options) {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* List entitlements
|
|
90
|
+
*
|
|
91
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
92
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
93
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
94
|
+
*
|
|
95
|
+
* GET /openmeter/entitlements
|
|
96
|
+
*/
|
|
97
|
+
export function listEntitlements(client, req = {}, options) {
|
|
98
|
+
return request(() => {
|
|
99
|
+
if (client._options.validate && req.sort !== undefined) {
|
|
100
|
+
assertValid(schemas.listEntitlementsQueryParams.shape.sort, req.sort);
|
|
101
|
+
}
|
|
102
|
+
const query = toWire({
|
|
103
|
+
page: req.page,
|
|
104
|
+
sort: encodeSort(req.sort, toSnakeCase),
|
|
105
|
+
filter: req.filter,
|
|
106
|
+
}, schemas.listEntitlementsQueryParams);
|
|
107
|
+
if (client._options.validate) {
|
|
108
|
+
assertValid(schemas.listEntitlementsQueryParamsWire, query);
|
|
109
|
+
}
|
|
110
|
+
const searchParams = toURLSearchParams(query);
|
|
111
|
+
return http(client)
|
|
112
|
+
.get('openmeter/entitlements', { ...options, searchParams })
|
|
113
|
+
.json()
|
|
114
|
+
.then((data) => {
|
|
115
|
+
if (client._options.validate) {
|
|
116
|
+
assertValid(schemas.listEntitlementsResponseWire, data);
|
|
117
|
+
}
|
|
118
|
+
return fromWire(data, schemas.listEntitlementsResponse);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get entitlement
|
|
124
|
+
*
|
|
125
|
+
* Get an entitlement by ID. To check entitlement access, use the entitlement
|
|
126
|
+
* access endpoints instead.
|
|
127
|
+
*
|
|
128
|
+
* GET /openmeter/entitlements/{entitlementId}
|
|
129
|
+
*/
|
|
130
|
+
export function getEntitlement(client, req, options) {
|
|
131
|
+
return request(() => {
|
|
132
|
+
const pathParamsInput = {
|
|
133
|
+
entitlementId: req.entitlementId,
|
|
134
|
+
};
|
|
135
|
+
const pathParams = client._options.validate
|
|
136
|
+
? toPathWire(pathParamsInput, schemas.getEntitlementPathParams)
|
|
137
|
+
: pathParamsInput;
|
|
138
|
+
if (client._options.validate) {
|
|
139
|
+
assertValid(schemas.getEntitlementPathParamsWire, pathParams);
|
|
140
|
+
}
|
|
141
|
+
const path = `openmeter/entitlements/${(() => {
|
|
142
|
+
if (pathParams.entitlementId === undefined) {
|
|
143
|
+
throw new Error('missing path parameter: entitlementId');
|
|
144
|
+
}
|
|
145
|
+
return encodeURIComponent(String(pathParams.entitlementId));
|
|
146
|
+
})()}`;
|
|
147
|
+
return http(client)
|
|
148
|
+
.get(path, options)
|
|
149
|
+
.json()
|
|
150
|
+
.then((data) => {
|
|
151
|
+
if (client._options.validate) {
|
|
152
|
+
assertValid(schemas.getEntitlementResponseWire, data);
|
|
153
|
+
}
|
|
154
|
+
return fromWire(data, schemas.getEntitlementResponse);
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -42,4 +42,4 @@ export type * from './models/operations/addons.js';
|
|
|
42
42
|
export type * from './models/operations/planAddons.js';
|
|
43
43
|
export type * from './models/operations/defaults.js';
|
|
44
44
|
export type * from './models/operations/entitlementAccess.js';
|
|
45
|
-
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, 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, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
|
45
|
+
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, 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, 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, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.0-beta-
|
|
1
|
+
export declare const SDK_VERSION = "1.0.0-beta-ba497d78b3b6";
|
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-ba497d78b3b6';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { EntitlementAccessResult, ListCustomerEntitlementAccessResponseData } from '../types.js';
|
|
2
|
+
import type { Entitlement, EntitlementAccessResult, EntitlementPagePaginatedResponse, ListCustomerEntitlementAccessResponseData, ListEntitlementsParamsFilter, SortQueryInput } from '../types.js';
|
|
3
3
|
export type ListCustomerEntitlementAccessRequest = {
|
|
4
4
|
customerId: string;
|
|
5
5
|
};
|
|
@@ -20,3 +20,33 @@ export type GetCustomerEntitlementAccessRequest = AcceptDateStrings<GetCustomerE
|
|
|
20
20
|
featureKey: string;
|
|
21
21
|
}>;
|
|
22
22
|
export type GetCustomerEntitlementAccessResponse = EntitlementAccessResult;
|
|
23
|
+
export interface ListEntitlementsQuery {
|
|
24
|
+
/** Determines which page of the collection to retrieve. */
|
|
25
|
+
page?: {
|
|
26
|
+
size?: number;
|
|
27
|
+
number?: number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Sort entitlements returned in the response. Supported sort attributes are:
|
|
31
|
+
*
|
|
32
|
+
* - `created_at` (default)
|
|
33
|
+
* - `updated_at`
|
|
34
|
+
*
|
|
35
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
36
|
+
* suffix is used to specify a descending order.
|
|
37
|
+
*/
|
|
38
|
+
sort?: SortQueryInput;
|
|
39
|
+
/**
|
|
40
|
+
* Filter entitlements returned in the response.
|
|
41
|
+
*
|
|
42
|
+
* To filter entitlements by customer, add the following query param:
|
|
43
|
+
* `filter[customer_id]=01K4WAQ0J99ZZ0MD75HXR112H8`
|
|
44
|
+
*/
|
|
45
|
+
filter?: ListEntitlementsParamsFilter;
|
|
46
|
+
}
|
|
47
|
+
export type ListEntitlementsRequest = AcceptDateStrings<ListEntitlementsQuery>;
|
|
48
|
+
export type ListEntitlementsResponse = EntitlementPagePaginatedResponse;
|
|
49
|
+
export type GetEntitlementRequest = {
|
|
50
|
+
entitlementId: string;
|
|
51
|
+
};
|
|
52
|
+
export type GetEntitlementResponse = Entitlement;
|
package/dist/models/schemas.d.ts
CHANGED
|
@@ -2035,6 +2035,28 @@ export declare const listCustomerEntitlementsParamsFilter: z.ZodObject<{
|
|
|
2035
2035
|
neq: z.ZodOptional<z.ZodString>;
|
|
2036
2036
|
}, z.core.$strip>]>>;
|
|
2037
2037
|
}, z.core.$strip>;
|
|
2038
|
+
export declare const listEntitlementsParamsFilter: z.ZodObject<{
|
|
2039
|
+
featureId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2040
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
2041
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2042
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
}, z.core.$strip>]>>;
|
|
2044
|
+
featureKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2045
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
2046
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2047
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
2048
|
+
}, z.core.$strip>]>>;
|
|
2049
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2050
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
2051
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2052
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
2053
|
+
}, z.core.$strip>]>>;
|
|
2054
|
+
customerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2055
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
2056
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2057
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
2058
|
+
}, z.core.$strip>]>>;
|
|
2059
|
+
}, z.core.$strip>;
|
|
2038
2060
|
export declare const listSubscriptionsParamsFilter: z.ZodObject<{
|
|
2039
2061
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2040
2062
|
eq: z.ZodOptional<z.ZodString>;
|
|
@@ -18837,6 +18859,212 @@ export declare const deleteCustomerEntitlementPathParams: z.ZodObject<{
|
|
|
18837
18859
|
customerId: z.ZodString;
|
|
18838
18860
|
entitlementId: z.ZodString;
|
|
18839
18861
|
}, z.core.$strip>;
|
|
18862
|
+
export declare const listEntitlementsQueryParams: z.ZodObject<{
|
|
18863
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
18864
|
+
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
18865
|
+
number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
18866
|
+
}, z.core.$strip>>;
|
|
18867
|
+
sort: z.ZodOptional<z.ZodObject<{
|
|
18868
|
+
by: z.ZodString;
|
|
18869
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"asc">, z.ZodLiteral<"desc">]>>>;
|
|
18870
|
+
}, z.core.$strip>>;
|
|
18871
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
18872
|
+
featureId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18873
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
18874
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18875
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
18876
|
+
}, z.core.$strip>]>>;
|
|
18877
|
+
featureKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18878
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
18879
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18880
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
18881
|
+
}, z.core.$strip>]>>;
|
|
18882
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18883
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
18884
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18885
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
18886
|
+
}, z.core.$strip>]>>;
|
|
18887
|
+
customerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
18888
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
18889
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18890
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
18891
|
+
}, z.core.$strip>]>>;
|
|
18892
|
+
}, z.core.$strip>>;
|
|
18893
|
+
}, z.core.$strip>;
|
|
18894
|
+
export declare const listEntitlementsResponse: z.ZodObject<{
|
|
18895
|
+
data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18896
|
+
id: z.ZodString;
|
|
18897
|
+
type: z.ZodLiteral<"metered">;
|
|
18898
|
+
feature: z.ZodObject<{
|
|
18899
|
+
id: z.ZodString;
|
|
18900
|
+
}, z.core.$strip>;
|
|
18901
|
+
customer: z.ZodObject<{
|
|
18902
|
+
id: z.ZodString;
|
|
18903
|
+
}, z.core.$strip>;
|
|
18904
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18905
|
+
activeFrom: z.ZodDate;
|
|
18906
|
+
activeTo: z.ZodOptional<z.ZodDate>;
|
|
18907
|
+
createdAt: z.ZodDate;
|
|
18908
|
+
updatedAt: z.ZodDate;
|
|
18909
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
18910
|
+
usagePeriod: z.ZodObject<{
|
|
18911
|
+
anchor: z.ZodDate;
|
|
18912
|
+
interval: z.ZodString;
|
|
18913
|
+
}, z.core.$strip>;
|
|
18914
|
+
currentUsagePeriod: z.ZodObject<{
|
|
18915
|
+
from: z.ZodDate;
|
|
18916
|
+
to: z.ZodDate;
|
|
18917
|
+
}, z.core.$strip>;
|
|
18918
|
+
isSoftLimit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18919
|
+
issue: z.ZodOptional<z.ZodObject<{
|
|
18920
|
+
amount: z.ZodString;
|
|
18921
|
+
priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
18922
|
+
}, z.core.$strip>>;
|
|
18923
|
+
issueAfterReset: z.ZodOptional<z.ZodString>;
|
|
18924
|
+
issueAfterResetPriority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
18925
|
+
preserveOverageAtReset: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18926
|
+
measureUsageFrom: z.ZodDate;
|
|
18927
|
+
lastReset: z.ZodDate;
|
|
18928
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18929
|
+
id: z.ZodString;
|
|
18930
|
+
type: z.ZodLiteral<"static">;
|
|
18931
|
+
feature: z.ZodObject<{
|
|
18932
|
+
id: z.ZodString;
|
|
18933
|
+
}, z.core.$strip>;
|
|
18934
|
+
customer: z.ZodObject<{
|
|
18935
|
+
id: z.ZodString;
|
|
18936
|
+
}, z.core.$strip>;
|
|
18937
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18938
|
+
usagePeriod: z.ZodOptional<z.ZodObject<{
|
|
18939
|
+
anchor: z.ZodDate;
|
|
18940
|
+
interval: z.ZodString;
|
|
18941
|
+
}, z.core.$strip>>;
|
|
18942
|
+
currentUsagePeriod: z.ZodOptional<z.ZodObject<{
|
|
18943
|
+
from: z.ZodDate;
|
|
18944
|
+
to: z.ZodDate;
|
|
18945
|
+
}, z.core.$strip>>;
|
|
18946
|
+
activeFrom: z.ZodDate;
|
|
18947
|
+
activeTo: z.ZodOptional<z.ZodDate>;
|
|
18948
|
+
createdAt: z.ZodDate;
|
|
18949
|
+
updatedAt: z.ZodDate;
|
|
18950
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
18951
|
+
config: z.ZodUnknown;
|
|
18952
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18953
|
+
id: z.ZodString;
|
|
18954
|
+
type: z.ZodLiteral<"boolean">;
|
|
18955
|
+
feature: z.ZodObject<{
|
|
18956
|
+
id: z.ZodString;
|
|
18957
|
+
}, z.core.$strip>;
|
|
18958
|
+
customer: z.ZodObject<{
|
|
18959
|
+
id: z.ZodString;
|
|
18960
|
+
}, z.core.$strip>;
|
|
18961
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18962
|
+
usagePeriod: z.ZodOptional<z.ZodObject<{
|
|
18963
|
+
anchor: z.ZodDate;
|
|
18964
|
+
interval: z.ZodString;
|
|
18965
|
+
}, z.core.$strip>>;
|
|
18966
|
+
currentUsagePeriod: z.ZodOptional<z.ZodObject<{
|
|
18967
|
+
from: z.ZodDate;
|
|
18968
|
+
to: z.ZodDate;
|
|
18969
|
+
}, z.core.$strip>>;
|
|
18970
|
+
activeFrom: z.ZodDate;
|
|
18971
|
+
activeTo: z.ZodOptional<z.ZodDate>;
|
|
18972
|
+
createdAt: z.ZodDate;
|
|
18973
|
+
updatedAt: z.ZodDate;
|
|
18974
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
18975
|
+
}, z.core.$strip>], "type">>;
|
|
18976
|
+
meta: z.ZodObject<{
|
|
18977
|
+
page: z.ZodObject<{
|
|
18978
|
+
number: z.ZodNumber;
|
|
18979
|
+
size: z.ZodNumber;
|
|
18980
|
+
total: z.ZodNumber;
|
|
18981
|
+
}, z.core.$strip>;
|
|
18982
|
+
}, z.core.$strip>;
|
|
18983
|
+
}, z.core.$strip>;
|
|
18984
|
+
export declare const getEntitlementPathParams: z.ZodObject<{
|
|
18985
|
+
entitlementId: z.ZodString;
|
|
18986
|
+
}, z.core.$strip>;
|
|
18987
|
+
export declare const getEntitlementResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18988
|
+
id: z.ZodString;
|
|
18989
|
+
type: z.ZodLiteral<"metered">;
|
|
18990
|
+
feature: z.ZodObject<{
|
|
18991
|
+
id: z.ZodString;
|
|
18992
|
+
}, z.core.$strip>;
|
|
18993
|
+
customer: z.ZodObject<{
|
|
18994
|
+
id: z.ZodString;
|
|
18995
|
+
}, z.core.$strip>;
|
|
18996
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18997
|
+
activeFrom: z.ZodDate;
|
|
18998
|
+
activeTo: z.ZodOptional<z.ZodDate>;
|
|
18999
|
+
createdAt: z.ZodDate;
|
|
19000
|
+
updatedAt: z.ZodDate;
|
|
19001
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19002
|
+
usagePeriod: z.ZodObject<{
|
|
19003
|
+
anchor: z.ZodDate;
|
|
19004
|
+
interval: z.ZodString;
|
|
19005
|
+
}, z.core.$strip>;
|
|
19006
|
+
currentUsagePeriod: z.ZodObject<{
|
|
19007
|
+
from: z.ZodDate;
|
|
19008
|
+
to: z.ZodDate;
|
|
19009
|
+
}, z.core.$strip>;
|
|
19010
|
+
isSoftLimit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19011
|
+
issue: z.ZodOptional<z.ZodObject<{
|
|
19012
|
+
amount: z.ZodString;
|
|
19013
|
+
priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
19014
|
+
}, z.core.$strip>>;
|
|
19015
|
+
issueAfterReset: z.ZodOptional<z.ZodString>;
|
|
19016
|
+
issueAfterResetPriority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
19017
|
+
preserveOverageAtReset: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19018
|
+
measureUsageFrom: z.ZodDate;
|
|
19019
|
+
lastReset: z.ZodDate;
|
|
19020
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19021
|
+
id: z.ZodString;
|
|
19022
|
+
type: z.ZodLiteral<"static">;
|
|
19023
|
+
feature: z.ZodObject<{
|
|
19024
|
+
id: z.ZodString;
|
|
19025
|
+
}, z.core.$strip>;
|
|
19026
|
+
customer: z.ZodObject<{
|
|
19027
|
+
id: z.ZodString;
|
|
19028
|
+
}, z.core.$strip>;
|
|
19029
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19030
|
+
usagePeriod: z.ZodOptional<z.ZodObject<{
|
|
19031
|
+
anchor: z.ZodDate;
|
|
19032
|
+
interval: z.ZodString;
|
|
19033
|
+
}, z.core.$strip>>;
|
|
19034
|
+
currentUsagePeriod: z.ZodOptional<z.ZodObject<{
|
|
19035
|
+
from: z.ZodDate;
|
|
19036
|
+
to: z.ZodDate;
|
|
19037
|
+
}, z.core.$strip>>;
|
|
19038
|
+
activeFrom: z.ZodDate;
|
|
19039
|
+
activeTo: z.ZodOptional<z.ZodDate>;
|
|
19040
|
+
createdAt: z.ZodDate;
|
|
19041
|
+
updatedAt: z.ZodDate;
|
|
19042
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19043
|
+
config: z.ZodUnknown;
|
|
19044
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19045
|
+
id: z.ZodString;
|
|
19046
|
+
type: z.ZodLiteral<"boolean">;
|
|
19047
|
+
feature: z.ZodObject<{
|
|
19048
|
+
id: z.ZodString;
|
|
19049
|
+
}, z.core.$strip>;
|
|
19050
|
+
customer: z.ZodObject<{
|
|
19051
|
+
id: z.ZodString;
|
|
19052
|
+
}, z.core.$strip>;
|
|
19053
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19054
|
+
usagePeriod: z.ZodOptional<z.ZodObject<{
|
|
19055
|
+
anchor: z.ZodDate;
|
|
19056
|
+
interval: z.ZodString;
|
|
19057
|
+
}, z.core.$strip>>;
|
|
19058
|
+
currentUsagePeriod: z.ZodOptional<z.ZodObject<{
|
|
19059
|
+
from: z.ZodDate;
|
|
19060
|
+
to: z.ZodDate;
|
|
19061
|
+
}, z.core.$strip>>;
|
|
19062
|
+
activeFrom: z.ZodDate;
|
|
19063
|
+
activeTo: z.ZodOptional<z.ZodDate>;
|
|
19064
|
+
createdAt: z.ZodDate;
|
|
19065
|
+
updatedAt: z.ZodDate;
|
|
19066
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19067
|
+
}, z.core.$strip>], "type">;
|
|
18840
19068
|
export declare const createCreditGrantPathParams: z.ZodObject<{
|
|
18841
19069
|
customerId: z.ZodString;
|
|
18842
19070
|
}, z.core.$strip>;
|
|
@@ -35780,6 +36008,28 @@ export declare const listCustomerEntitlementsParamsFilterWire: z.ZodObject<{
|
|
|
35780
36008
|
neq: z.ZodOptional<z.ZodString>;
|
|
35781
36009
|
}, z.core.$strict>]>>;
|
|
35782
36010
|
}, z.core.$strict>;
|
|
36011
|
+
export declare const listEntitlementsParamsFilterWire: z.ZodObject<{
|
|
36012
|
+
feature_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36013
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
36014
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36015
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
36016
|
+
}, z.core.$strict>]>>;
|
|
36017
|
+
feature_key: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36018
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
36019
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36020
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
36021
|
+
}, z.core.$strict>]>>;
|
|
36022
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36023
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
36024
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36025
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
36026
|
+
}, z.core.$strict>]>>;
|
|
36027
|
+
customer_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36028
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
36029
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36030
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
36031
|
+
}, z.core.$strict>]>>;
|
|
36032
|
+
}, z.core.$strict>;
|
|
35783
36033
|
export declare const listSubscriptionsParamsFilterWire: z.ZodObject<{
|
|
35784
36034
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
35785
36035
|
eq: z.ZodOptional<z.ZodString>;
|
|
@@ -52570,6 +52820,209 @@ export declare const deleteCustomerEntitlementPathParamsWire: z.ZodObject<{
|
|
|
52570
52820
|
customerId: z.ZodString;
|
|
52571
52821
|
entitlementId: z.ZodString;
|
|
52572
52822
|
}, z.core.$strip>;
|
|
52823
|
+
export declare const listEntitlementsQueryParamsWire: z.ZodObject<{
|
|
52824
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
52825
|
+
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
52826
|
+
number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
52827
|
+
}, z.core.$strict>>;
|
|
52828
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
52829
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
52830
|
+
feature_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
52831
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
52832
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52833
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
52834
|
+
}, z.core.$strict>]>>;
|
|
52835
|
+
feature_key: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
52836
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
52837
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52838
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
52839
|
+
}, z.core.$strict>]>>;
|
|
52840
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
52841
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
52842
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52843
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
52844
|
+
}, z.core.$strict>]>>;
|
|
52845
|
+
customer_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
52846
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
52847
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52848
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
52849
|
+
}, z.core.$strict>]>>;
|
|
52850
|
+
}, z.core.$strict>>;
|
|
52851
|
+
}, z.core.$strip>;
|
|
52852
|
+
export declare const listEntitlementsResponseWire: z.ZodObject<{
|
|
52853
|
+
data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52854
|
+
id: z.ZodString;
|
|
52855
|
+
type: z.ZodLiteral<"metered">;
|
|
52856
|
+
feature: z.ZodObject<{
|
|
52857
|
+
id: z.ZodString;
|
|
52858
|
+
}, z.core.$strict>;
|
|
52859
|
+
customer: z.ZodObject<{
|
|
52860
|
+
id: z.ZodString;
|
|
52861
|
+
}, z.core.$strict>;
|
|
52862
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52863
|
+
active_from: z.ZodString;
|
|
52864
|
+
active_to: z.ZodOptional<z.ZodString>;
|
|
52865
|
+
created_at: z.ZodString;
|
|
52866
|
+
updated_at: z.ZodString;
|
|
52867
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
52868
|
+
usage_period: z.ZodObject<{
|
|
52869
|
+
anchor: z.ZodString;
|
|
52870
|
+
interval: z.ZodString;
|
|
52871
|
+
}, z.core.$strict>;
|
|
52872
|
+
current_usage_period: z.ZodObject<{
|
|
52873
|
+
from: z.ZodString;
|
|
52874
|
+
to: z.ZodString;
|
|
52875
|
+
}, z.core.$strict>;
|
|
52876
|
+
is_soft_limit: z.ZodOptional<z.ZodBoolean>;
|
|
52877
|
+
issue: z.ZodOptional<z.ZodObject<{
|
|
52878
|
+
amount: z.ZodString;
|
|
52879
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
52880
|
+
}, z.core.$strict>>;
|
|
52881
|
+
issue_after_reset: z.ZodOptional<z.ZodString>;
|
|
52882
|
+
issue_after_reset_priority: z.ZodOptional<z.ZodNumber>;
|
|
52883
|
+
preserve_overage_at_reset: z.ZodOptional<z.ZodBoolean>;
|
|
52884
|
+
measure_usage_from: z.ZodString;
|
|
52885
|
+
last_reset: z.ZodString;
|
|
52886
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52887
|
+
id: z.ZodString;
|
|
52888
|
+
type: z.ZodLiteral<"static">;
|
|
52889
|
+
feature: z.ZodObject<{
|
|
52890
|
+
id: z.ZodString;
|
|
52891
|
+
}, z.core.$strict>;
|
|
52892
|
+
customer: z.ZodObject<{
|
|
52893
|
+
id: z.ZodString;
|
|
52894
|
+
}, z.core.$strict>;
|
|
52895
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52896
|
+
usage_period: z.ZodOptional<z.ZodObject<{
|
|
52897
|
+
anchor: z.ZodString;
|
|
52898
|
+
interval: z.ZodString;
|
|
52899
|
+
}, z.core.$strict>>;
|
|
52900
|
+
current_usage_period: z.ZodOptional<z.ZodObject<{
|
|
52901
|
+
from: z.ZodString;
|
|
52902
|
+
to: z.ZodString;
|
|
52903
|
+
}, z.core.$strict>>;
|
|
52904
|
+
active_from: z.ZodString;
|
|
52905
|
+
active_to: z.ZodOptional<z.ZodString>;
|
|
52906
|
+
created_at: z.ZodString;
|
|
52907
|
+
updated_at: z.ZodString;
|
|
52908
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
52909
|
+
config: z.ZodUnknown;
|
|
52910
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52911
|
+
id: z.ZodString;
|
|
52912
|
+
type: z.ZodLiteral<"boolean">;
|
|
52913
|
+
feature: z.ZodObject<{
|
|
52914
|
+
id: z.ZodString;
|
|
52915
|
+
}, z.core.$strict>;
|
|
52916
|
+
customer: z.ZodObject<{
|
|
52917
|
+
id: z.ZodString;
|
|
52918
|
+
}, z.core.$strict>;
|
|
52919
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52920
|
+
usage_period: z.ZodOptional<z.ZodObject<{
|
|
52921
|
+
anchor: z.ZodString;
|
|
52922
|
+
interval: z.ZodString;
|
|
52923
|
+
}, z.core.$strict>>;
|
|
52924
|
+
current_usage_period: z.ZodOptional<z.ZodObject<{
|
|
52925
|
+
from: z.ZodString;
|
|
52926
|
+
to: z.ZodString;
|
|
52927
|
+
}, z.core.$strict>>;
|
|
52928
|
+
active_from: z.ZodString;
|
|
52929
|
+
active_to: z.ZodOptional<z.ZodString>;
|
|
52930
|
+
created_at: z.ZodString;
|
|
52931
|
+
updated_at: z.ZodString;
|
|
52932
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
52933
|
+
}, z.core.$strict>], "type">>;
|
|
52934
|
+
meta: z.ZodObject<{
|
|
52935
|
+
page: z.ZodObject<{
|
|
52936
|
+
number: z.ZodNumber;
|
|
52937
|
+
size: z.ZodNumber;
|
|
52938
|
+
total: z.ZodNumber;
|
|
52939
|
+
}, z.core.$strict>;
|
|
52940
|
+
}, z.core.$strict>;
|
|
52941
|
+
}, z.core.$strict>;
|
|
52942
|
+
export declare const getEntitlementPathParamsWire: z.ZodObject<{
|
|
52943
|
+
entitlementId: z.ZodString;
|
|
52944
|
+
}, z.core.$strip>;
|
|
52945
|
+
export declare const getEntitlementResponseWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52946
|
+
id: z.ZodString;
|
|
52947
|
+
type: z.ZodLiteral<"metered">;
|
|
52948
|
+
feature: z.ZodObject<{
|
|
52949
|
+
id: z.ZodString;
|
|
52950
|
+
}, z.core.$strict>;
|
|
52951
|
+
customer: z.ZodObject<{
|
|
52952
|
+
id: z.ZodString;
|
|
52953
|
+
}, z.core.$strict>;
|
|
52954
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52955
|
+
active_from: z.ZodString;
|
|
52956
|
+
active_to: z.ZodOptional<z.ZodString>;
|
|
52957
|
+
created_at: z.ZodString;
|
|
52958
|
+
updated_at: z.ZodString;
|
|
52959
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
52960
|
+
usage_period: z.ZodObject<{
|
|
52961
|
+
anchor: z.ZodString;
|
|
52962
|
+
interval: z.ZodString;
|
|
52963
|
+
}, z.core.$strict>;
|
|
52964
|
+
current_usage_period: z.ZodObject<{
|
|
52965
|
+
from: z.ZodString;
|
|
52966
|
+
to: z.ZodString;
|
|
52967
|
+
}, z.core.$strict>;
|
|
52968
|
+
is_soft_limit: z.ZodOptional<z.ZodBoolean>;
|
|
52969
|
+
issue: z.ZodOptional<z.ZodObject<{
|
|
52970
|
+
amount: z.ZodString;
|
|
52971
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
52972
|
+
}, z.core.$strict>>;
|
|
52973
|
+
issue_after_reset: z.ZodOptional<z.ZodString>;
|
|
52974
|
+
issue_after_reset_priority: z.ZodOptional<z.ZodNumber>;
|
|
52975
|
+
preserve_overage_at_reset: z.ZodOptional<z.ZodBoolean>;
|
|
52976
|
+
measure_usage_from: z.ZodString;
|
|
52977
|
+
last_reset: z.ZodString;
|
|
52978
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52979
|
+
id: z.ZodString;
|
|
52980
|
+
type: z.ZodLiteral<"static">;
|
|
52981
|
+
feature: z.ZodObject<{
|
|
52982
|
+
id: z.ZodString;
|
|
52983
|
+
}, z.core.$strict>;
|
|
52984
|
+
customer: z.ZodObject<{
|
|
52985
|
+
id: z.ZodString;
|
|
52986
|
+
}, z.core.$strict>;
|
|
52987
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
52988
|
+
usage_period: z.ZodOptional<z.ZodObject<{
|
|
52989
|
+
anchor: z.ZodString;
|
|
52990
|
+
interval: z.ZodString;
|
|
52991
|
+
}, z.core.$strict>>;
|
|
52992
|
+
current_usage_period: z.ZodOptional<z.ZodObject<{
|
|
52993
|
+
from: z.ZodString;
|
|
52994
|
+
to: z.ZodString;
|
|
52995
|
+
}, z.core.$strict>>;
|
|
52996
|
+
active_from: z.ZodString;
|
|
52997
|
+
active_to: z.ZodOptional<z.ZodString>;
|
|
52998
|
+
created_at: z.ZodString;
|
|
52999
|
+
updated_at: z.ZodString;
|
|
53000
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
53001
|
+
config: z.ZodUnknown;
|
|
53002
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53003
|
+
id: z.ZodString;
|
|
53004
|
+
type: z.ZodLiteral<"boolean">;
|
|
53005
|
+
feature: z.ZodObject<{
|
|
53006
|
+
id: z.ZodString;
|
|
53007
|
+
}, z.core.$strict>;
|
|
53008
|
+
customer: z.ZodObject<{
|
|
53009
|
+
id: z.ZodString;
|
|
53010
|
+
}, z.core.$strict>;
|
|
53011
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53012
|
+
usage_period: z.ZodOptional<z.ZodObject<{
|
|
53013
|
+
anchor: z.ZodString;
|
|
53014
|
+
interval: z.ZodString;
|
|
53015
|
+
}, z.core.$strict>>;
|
|
53016
|
+
current_usage_period: z.ZodOptional<z.ZodObject<{
|
|
53017
|
+
from: z.ZodString;
|
|
53018
|
+
to: z.ZodString;
|
|
53019
|
+
}, z.core.$strict>>;
|
|
53020
|
+
active_from: z.ZodString;
|
|
53021
|
+
active_to: z.ZodOptional<z.ZodString>;
|
|
53022
|
+
created_at: z.ZodString;
|
|
53023
|
+
updated_at: z.ZodString;
|
|
53024
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
53025
|
+
}, z.core.$strict>], "type">;
|
|
52573
53026
|
export declare const createCreditGrantPathParamsWire: z.ZodObject<{
|
|
52574
53027
|
customerId: z.ZodString;
|
|
52575
53028
|
}, z.core.$strip>;
|
package/dist/models/schemas.js
CHANGED
|
@@ -2804,6 +2804,14 @@ export const listCustomerEntitlementsParamsFilter = z
|
|
|
2804
2804
|
type: stringFieldFilterExact.optional(),
|
|
2805
2805
|
})
|
|
2806
2806
|
.describe('Filter options for listing customer entitlements.');
|
|
2807
|
+
export const listEntitlementsParamsFilter = z
|
|
2808
|
+
.object({
|
|
2809
|
+
featureId: ulidFieldFilter.optional(),
|
|
2810
|
+
featureKey: stringFieldFilterExact.optional(),
|
|
2811
|
+
type: stringFieldFilterExact.optional(),
|
|
2812
|
+
customerId: ulidFieldFilter.optional(),
|
|
2813
|
+
})
|
|
2814
|
+
.describe('Filter options for listing entitlements.');
|
|
2807
2815
|
export const listSubscriptionsParamsFilter = z
|
|
2808
2816
|
.object({
|
|
2809
2817
|
id: ulidFieldFilter.optional(),
|
|
@@ -5702,6 +5710,29 @@ export const deleteCustomerEntitlementPathParams = z.object({
|
|
|
5702
5710
|
customerId: ulid,
|
|
5703
5711
|
entitlementId: ulid,
|
|
5704
5712
|
});
|
|
5713
|
+
export const listEntitlementsQueryParams = z.object({
|
|
5714
|
+
page: z
|
|
5715
|
+
.object({
|
|
5716
|
+
size: z.coerce
|
|
5717
|
+
.number()
|
|
5718
|
+
.int()
|
|
5719
|
+
.optional()
|
|
5720
|
+
.describe('The number of items to include per page.'),
|
|
5721
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
5722
|
+
})
|
|
5723
|
+
.optional()
|
|
5724
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
5725
|
+
sort: sortQuery.optional(),
|
|
5726
|
+
filter: listEntitlementsParamsFilter.optional(),
|
|
5727
|
+
});
|
|
5728
|
+
export const listEntitlementsResponse = z.object({
|
|
5729
|
+
data: z.array(entitlement),
|
|
5730
|
+
meta: paginatedMeta,
|
|
5731
|
+
});
|
|
5732
|
+
export const getEntitlementPathParams = z.object({
|
|
5733
|
+
entitlementId: ulid,
|
|
5734
|
+
});
|
|
5735
|
+
export const getEntitlementResponse = entitlement;
|
|
5705
5736
|
export const createCreditGrantPathParams = z.object({
|
|
5706
5737
|
customerId: ulid,
|
|
5707
5738
|
});
|
|
@@ -9131,6 +9162,14 @@ export const listCustomerEntitlementsParamsFilterWire = z
|
|
|
9131
9162
|
type: stringFieldFilterExactWire.optional(),
|
|
9132
9163
|
})
|
|
9133
9164
|
.describe('Filter options for listing customer entitlements.');
|
|
9165
|
+
export const listEntitlementsParamsFilterWire = z
|
|
9166
|
+
.strictObject({
|
|
9167
|
+
feature_id: ulidFieldFilterWire.optional(),
|
|
9168
|
+
feature_key: stringFieldFilterExactWire.optional(),
|
|
9169
|
+
type: stringFieldFilterExactWire.optional(),
|
|
9170
|
+
customer_id: ulidFieldFilterWire.optional(),
|
|
9171
|
+
})
|
|
9172
|
+
.describe('Filter options for listing entitlements.');
|
|
9134
9173
|
export const listSubscriptionsParamsFilterWire = z
|
|
9135
9174
|
.strictObject({
|
|
9136
9175
|
id: ulidFieldFilterWire.optional(),
|
|
@@ -12032,6 +12071,32 @@ export const deleteCustomerEntitlementPathParamsWire = z.object({
|
|
|
12032
12071
|
customerId: ulidWire,
|
|
12033
12072
|
entitlementId: ulidWire,
|
|
12034
12073
|
});
|
|
12074
|
+
export const listEntitlementsQueryParamsWire = z.object({
|
|
12075
|
+
page: z
|
|
12076
|
+
.strictObject({
|
|
12077
|
+
size: z.coerce
|
|
12078
|
+
.number()
|
|
12079
|
+
.int()
|
|
12080
|
+
.optional()
|
|
12081
|
+
.describe('The number of items to include per page.'),
|
|
12082
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
12083
|
+
})
|
|
12084
|
+
.optional()
|
|
12085
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
12086
|
+
sort: z
|
|
12087
|
+
.string()
|
|
12088
|
+
.optional()
|
|
12089
|
+
.describe('Sort entitlements returned in the response. Supported sort attributes are: - `created_at` (default) - `updated_at` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order.'),
|
|
12090
|
+
filter: listEntitlementsParamsFilterWire.optional(),
|
|
12091
|
+
});
|
|
12092
|
+
export const listEntitlementsResponseWire = z.strictObject({
|
|
12093
|
+
data: z.array(entitlementWire),
|
|
12094
|
+
meta: paginatedMetaWire,
|
|
12095
|
+
});
|
|
12096
|
+
export const getEntitlementPathParamsWire = z.object({
|
|
12097
|
+
entitlementId: ulidWire,
|
|
12098
|
+
});
|
|
12099
|
+
export const getEntitlementResponseWire = entitlementWire;
|
|
12035
12100
|
export const createCreditGrantPathParamsWire = z.object({
|
|
12036
12101
|
customerId: ulidWire,
|
|
12037
12102
|
});
|
package/dist/models/types.d.ts
CHANGED
|
@@ -2570,6 +2570,17 @@ export interface ListCustomerEntitlementsParamsFilter {
|
|
|
2570
2570
|
/** Filter entitlements by type (`metered`, `static` or `boolean`). */
|
|
2571
2571
|
type?: StringFieldFilterExact;
|
|
2572
2572
|
}
|
|
2573
|
+
/** Filter options for listing entitlements. */
|
|
2574
|
+
export interface ListEntitlementsParamsFilter {
|
|
2575
|
+
/** Filter entitlements by feature ID. */
|
|
2576
|
+
featureId?: UlidFieldFilter;
|
|
2577
|
+
/** Filter entitlements by feature key. */
|
|
2578
|
+
featureKey?: StringFieldFilterExact;
|
|
2579
|
+
/** Filter entitlements by type (`metered`, `static` or `boolean`). */
|
|
2580
|
+
type?: StringFieldFilterExact;
|
|
2581
|
+
/** Filter entitlements by customer ID. */
|
|
2582
|
+
customerId?: UlidFieldFilter;
|
|
2583
|
+
}
|
|
2573
2584
|
/** Filter options for listing subscriptions. */
|
|
2574
2585
|
export interface ListSubscriptionsParamsFilter {
|
|
2575
2586
|
id?: UlidFieldFilter;
|
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
3
|
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
|
-
import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse } from '../models/operations/entitlements.js';
|
|
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';
|
|
7
7
|
import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js';
|
|
@@ -208,6 +208,37 @@ export declare class InternalEntitlements {
|
|
|
208
208
|
* GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
|
|
209
209
|
*/
|
|
210
210
|
getCustomerAccess(request: GetCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<GetCustomerEntitlementAccessResponse>;
|
|
211
|
+
/**
|
|
212
|
+
* List entitlements
|
|
213
|
+
*
|
|
214
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
215
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
216
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
217
|
+
*
|
|
218
|
+
* GET /openmeter/entitlements
|
|
219
|
+
*/
|
|
220
|
+
list(request?: ListEntitlementsRequest, options?: RequestOptions): Promise<ListEntitlementsResponse>;
|
|
221
|
+
/**
|
|
222
|
+
* List entitlements
|
|
223
|
+
*
|
|
224
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
225
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
226
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
227
|
+
*
|
|
228
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
229
|
+
*
|
|
230
|
+
* GET /openmeter/entitlements
|
|
231
|
+
*/
|
|
232
|
+
listAll(request?: ListEntitlementsRequest, options?: RequestOptions): AsyncIterable<Entitlement>;
|
|
233
|
+
/**
|
|
234
|
+
* Get entitlement
|
|
235
|
+
*
|
|
236
|
+
* Get an entitlement by ID. To check entitlement access, use the entitlement
|
|
237
|
+
* access endpoints instead.
|
|
238
|
+
*
|
|
239
|
+
* GET /openmeter/entitlements/{entitlementId}
|
|
240
|
+
*/
|
|
241
|
+
get(request: GetEntitlementRequest, options?: RequestOptions): Promise<GetEntitlementResponse>;
|
|
211
242
|
}
|
|
212
243
|
export declare class InternalSubscriptions {
|
|
213
244
|
private readonly _client;
|
package/dist/sdk/internal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { unwrap } from '../lib/types.js';
|
|
3
3
|
import { paginatePages } from '../lib/paginate.js';
|
|
4
4
|
import { createCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
|
|
5
|
-
import { getCustomerEntitlementAccess } from '../funcs/entitlements.js';
|
|
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';
|
|
8
8
|
import { listInvoices, getInvoice, updateInvoice, deleteInvoice, advanceInvoice, approveInvoice, retryInvoice, snapshotQuantitiesInvoice, } from '../funcs/invoices.js';
|
|
@@ -272,6 +272,43 @@ export class InternalEntitlements {
|
|
|
272
272
|
async getCustomerAccess(request, options) {
|
|
273
273
|
return unwrap(await getCustomerEntitlementAccess(this._client, request, options));
|
|
274
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* List entitlements
|
|
277
|
+
*
|
|
278
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
279
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
280
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
281
|
+
*
|
|
282
|
+
* GET /openmeter/entitlements
|
|
283
|
+
*/
|
|
284
|
+
async list(request, options) {
|
|
285
|
+
return unwrap(await listEntitlements(this._client, request, options));
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* List entitlements
|
|
289
|
+
*
|
|
290
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
291
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
292
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
293
|
+
*
|
|
294
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
295
|
+
*
|
|
296
|
+
* GET /openmeter/entitlements
|
|
297
|
+
*/
|
|
298
|
+
listAll(request, options) {
|
|
299
|
+
return paginatePages((req, opts) => listEntitlements(this._client, req, opts), request ?? {}, options);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Get entitlement
|
|
303
|
+
*
|
|
304
|
+
* Get an entitlement by ID. To check entitlement access, use the entitlement
|
|
305
|
+
* access endpoints instead.
|
|
306
|
+
*
|
|
307
|
+
* GET /openmeter/entitlements/{entitlementId}
|
|
308
|
+
*/
|
|
309
|
+
async get(request, options) {
|
|
310
|
+
return unwrap(await getEntitlement(this._client, request, options));
|
|
311
|
+
}
|
|
275
312
|
}
|
|
276
313
|
export class InternalSubscriptions {
|
|
277
314
|
_client;
|