@openmeter/client 1.0.0-beta-7f901f655a1a → 1.0.0-beta-3a2cce989354
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 +8 -0
- package/dist/funcs/grants.d.ts +24 -0
- package/dist/funcs/grants.js +78 -0
- package/dist/funcs/index.d.ts +1 -0
- package/dist/funcs/index.js +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/grants.d.ts +43 -0
- package/dist/models/operations/grants.js +2 -0
- package/dist/models/schemas.d.ts +139 -0
- package/dist/models/schemas.js +73 -0
- package/dist/models/types.d.ts +7 -0
- package/dist/sdk/internal.d.ts +42 -0
- package/dist/sdk/internal.js +52 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ TypeSpec definitions and ships fully-typed request and response models.
|
|
|
37
37
|
- [Internal Operations](#internal-operations)
|
|
38
38
|
- [Internal Customers](#internal-customers)
|
|
39
39
|
- [Internal Entitlements](#internal-entitlements)
|
|
40
|
+
- [Internal Grants](#internal-grants)
|
|
40
41
|
- [Internal Subscriptions](#internal-subscriptions)
|
|
41
42
|
- [Internal Apps](#internal-apps)
|
|
42
43
|
- [Internal Invoices](#internal-invoices)
|
|
@@ -446,6 +447,13 @@ they can change or be removed without notice or semver consideration.
|
|
|
446
447
|
| `client.internal.entitlements.get` | `GET /openmeter/entitlements/{entitlementId}` | Get an entitlement by ID. To check entitlement access, use the entitlement access endpoints instead. |
|
|
447
448
|
| `client.internal.entitlements.getCustomerValue` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value` | Get the customer's access through a single entitlement, optionally evaluated at a point in time. |
|
|
448
449
|
|
|
450
|
+
### Internal Grants
|
|
451
|
+
|
|
452
|
+
| Method | HTTP | Description |
|
|
453
|
+
| ----------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
454
|
+
| `client.internal.grants.list` | `GET /openmeter/grants` | List the grants of all customers and entitlements. To list the grants of a single entitlement, use the customer entitlement grants endpoint. Deleted grants are excluded unless `include_deleted` is set. Voided and expired grants are always included, as they are part of the balance history. |
|
|
455
|
+
| `client.internal.grants.void` | `DELETE /openmeter/grants/{grantId}` | Void a grant so it no longer adds to the balance. Usage already deducted from the grant is kept. |
|
|
456
|
+
|
|
449
457
|
### Internal Subscriptions
|
|
450
458
|
|
|
451
459
|
| Method | HTTP | Description |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Client } from '../core.js';
|
|
2
|
+
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
+
import type { ListGrantsRequest, ListGrantsResponse, VoidGrantRequest, VoidGrantResponse } from '../models/operations/grants.js';
|
|
4
|
+
/**
|
|
5
|
+
* List grants
|
|
6
|
+
*
|
|
7
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
8
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
9
|
+
*
|
|
10
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
11
|
+
* grants are always included, as they are part of the balance history.
|
|
12
|
+
*
|
|
13
|
+
* GET /openmeter/grants
|
|
14
|
+
*/
|
|
15
|
+
export declare function listGrants(client: Client, req?: ListGrantsRequest, options?: RequestOptions): Promise<Result<ListGrantsResponse>>;
|
|
16
|
+
/**
|
|
17
|
+
* Void grant
|
|
18
|
+
*
|
|
19
|
+
* Void a grant so it no longer adds to the balance. Usage already deducted from
|
|
20
|
+
* the grant is kept.
|
|
21
|
+
*
|
|
22
|
+
* DELETE /openmeter/grants/{grantId}
|
|
23
|
+
*/
|
|
24
|
+
export declare function voidGrant(client: Client, req: VoidGrantRequest, options?: RequestOptions): Promise<Result<VoidGrantResponse>>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
|
+
import { http } from '../core.js';
|
|
3
|
+
import { request } from '../lib/request.js';
|
|
4
|
+
import { toURLSearchParams, encodeSort } from '../lib/encodings.js';
|
|
5
|
+
import { toWire, toPathWire, fromWire, assertValid, toSnakeCase, } from '../lib/wire.js';
|
|
6
|
+
import * as schemas from '../models/schemas.js';
|
|
7
|
+
/**
|
|
8
|
+
* List grants
|
|
9
|
+
*
|
|
10
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
11
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
12
|
+
*
|
|
13
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
14
|
+
* grants are always included, as they are part of the balance history.
|
|
15
|
+
*
|
|
16
|
+
* GET /openmeter/grants
|
|
17
|
+
*/
|
|
18
|
+
export function listGrants(client, req = {}, options) {
|
|
19
|
+
return request(() => {
|
|
20
|
+
if (client._options.validate && req.sort !== undefined) {
|
|
21
|
+
assertValid(schemas.listGrantsQueryParams.shape.sort, req.sort);
|
|
22
|
+
}
|
|
23
|
+
const query = toWire({
|
|
24
|
+
page: req.page,
|
|
25
|
+
sort: encodeSort(req.sort, toSnakeCase),
|
|
26
|
+
filter: req.filter,
|
|
27
|
+
includeDeleted: req.includeDeleted,
|
|
28
|
+
}, schemas.listGrantsQueryParams);
|
|
29
|
+
if (client._options.validate) {
|
|
30
|
+
assertValid(schemas.listGrantsQueryParamsWire, query);
|
|
31
|
+
}
|
|
32
|
+
const searchParams = toURLSearchParams(query);
|
|
33
|
+
return http(client)
|
|
34
|
+
.get('openmeter/grants', { ...options, searchParams })
|
|
35
|
+
.json()
|
|
36
|
+
.then((data) => {
|
|
37
|
+
if (client._options.validate) {
|
|
38
|
+
assertValid(schemas.listGrantsResponseWire, data);
|
|
39
|
+
}
|
|
40
|
+
return fromWire(data, schemas.listGrantsResponse);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Void grant
|
|
46
|
+
*
|
|
47
|
+
* Void a grant so it no longer adds to the balance. Usage already deducted from
|
|
48
|
+
* the grant is kept.
|
|
49
|
+
*
|
|
50
|
+
* DELETE /openmeter/grants/{grantId}
|
|
51
|
+
*/
|
|
52
|
+
export function voidGrant(client, req, options) {
|
|
53
|
+
return request(async () => {
|
|
54
|
+
const pathParamsInput = {
|
|
55
|
+
grantId: req.grantId,
|
|
56
|
+
};
|
|
57
|
+
const pathParams = client._options.validate
|
|
58
|
+
? toPathWire(pathParamsInput, schemas.voidGrantPathParams)
|
|
59
|
+
: pathParamsInput;
|
|
60
|
+
if (client._options.validate) {
|
|
61
|
+
assertValid(schemas.voidGrantPathParamsWire, pathParams);
|
|
62
|
+
}
|
|
63
|
+
const path = `openmeter/grants/${(() => {
|
|
64
|
+
if (pathParams.grantId === undefined) {
|
|
65
|
+
throw new Error('missing path parameter: grantId');
|
|
66
|
+
}
|
|
67
|
+
return encodeURIComponent(String(pathParams.grantId));
|
|
68
|
+
})()}`;
|
|
69
|
+
const query = toWire({
|
|
70
|
+
voidedAt: req.voidedAt,
|
|
71
|
+
}, schemas.voidGrantQueryParams);
|
|
72
|
+
if (client._options.validate) {
|
|
73
|
+
assertValid(schemas.voidGrantQueryParamsWire, query);
|
|
74
|
+
}
|
|
75
|
+
const searchParams = toURLSearchParams(query);
|
|
76
|
+
await http(client).delete(path, { ...options, searchParams });
|
|
77
|
+
});
|
|
78
|
+
}
|
package/dist/funcs/index.d.ts
CHANGED
package/dist/funcs/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type * from './models/operations/events.js';
|
|
|
28
28
|
export type * from './models/operations/meters.js';
|
|
29
29
|
export type * from './models/operations/customers.js';
|
|
30
30
|
export type * from './models/operations/entitlements.js';
|
|
31
|
+
export type * from './models/operations/grants.js';
|
|
31
32
|
export type * from './models/operations/subscriptions.js';
|
|
32
33
|
export type * from './models/operations/apps.js';
|
|
33
34
|
export type * from './models/operations/billing.js';
|
|
@@ -43,4 +44,4 @@ export type * from './models/operations/planAddons.js';
|
|
|
43
44
|
export type * from './models/operations/defaults.js';
|
|
44
45
|
export type * from './models/operations/entitlementAccess.js';
|
|
45
46
|
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, EntitlementAccessCheckResult, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementValueResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ListNotificationChannelsParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, EntitlementGrant, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, NotificationChannelPagePaginatedResponse, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, EntitlementGrantPagePaginatedResponse, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BooleanFieldFilter, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, NotificationChannelInput, CreateNotificationChannelRequestInput, UpdateNotificationChannelRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, NotificationChannelPagePaginatedResponseInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
|
47
|
+
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, CreateVersionFilter, VersionFilter, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, EntitlementAccessValue, EntitlementIssueAfterReset, EntitlementBurndownBalance, EntitlementBurndownGrantBalances, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, FeatureReference, EntitlementGrantUsage, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, CurrencyCustomReference, SubscriptionCostBasisPin, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, ChargeResolvedCostBasis, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessCheckResult, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementValueResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListGrantsParamsFilter, 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-3a2cce989354";
|
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-3a2cce989354';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { EntitlementGrantPagePaginatedResponse, ListGrantsParamsFilter, SortQueryInput } from '../types.js';
|
|
3
|
+
export interface ListGrantsQuery {
|
|
4
|
+
/** Determines which page of the collection to retrieve. */
|
|
5
|
+
page?: {
|
|
6
|
+
size?: number;
|
|
7
|
+
number?: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Sort grants returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `created_at` (default)
|
|
13
|
+
* - `updated_at`
|
|
14
|
+
* - `effective_at`
|
|
15
|
+
* - `expires_at`
|
|
16
|
+
*
|
|
17
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
18
|
+
* suffix is used to specify a descending order.
|
|
19
|
+
*/
|
|
20
|
+
sort?: SortQueryInput;
|
|
21
|
+
/**
|
|
22
|
+
* Filter grants returned in the response.
|
|
23
|
+
*
|
|
24
|
+
* To filter grants by customer, add the following query param:
|
|
25
|
+
* `filter[customer_id]=01K4WAQ0J99ZZ0MD75HXR112H8`
|
|
26
|
+
*/
|
|
27
|
+
filter?: ListGrantsParamsFilter;
|
|
28
|
+
/** Include deleted grants in the response. */
|
|
29
|
+
includeDeleted?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type ListGrantsRequest = AcceptDateStrings<ListGrantsQuery>;
|
|
32
|
+
export type ListGrantsResponse = EntitlementGrantPagePaginatedResponse;
|
|
33
|
+
export interface VoidGrantQuery {
|
|
34
|
+
/**
|
|
35
|
+
* The time the grant is voided from. Defaults to now; it cannot be in the future
|
|
36
|
+
* or before the start of the current usage period.
|
|
37
|
+
*/
|
|
38
|
+
voidedAt?: Date;
|
|
39
|
+
}
|
|
40
|
+
export type VoidGrantRequest = AcceptDateStrings<VoidGrantQuery & {
|
|
41
|
+
grantId: string;
|
|
42
|
+
}>;
|
|
43
|
+
export type VoidGrantResponse = void;
|
package/dist/models/schemas.d.ts
CHANGED
|
@@ -2106,6 +2106,18 @@ export declare const listEntitlementsParamsFilter: z.ZodObject<{
|
|
|
2106
2106
|
neq: z.ZodOptional<z.ZodString>;
|
|
2107
2107
|
}, z.core.$strip>]>>;
|
|
2108
2108
|
}, z.core.$strip>;
|
|
2109
|
+
export declare const listGrantsParamsFilter: z.ZodObject<{
|
|
2110
|
+
customerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2111
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
2112
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2113
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
2114
|
+
}, z.core.$strip>]>>;
|
|
2115
|
+
featureId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2116
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
2117
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2118
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
2119
|
+
}, z.core.$strip>]>>;
|
|
2120
|
+
}, z.core.$strip>;
|
|
2109
2121
|
export declare const listSubscriptionsParamsFilter: z.ZodObject<{
|
|
2110
2122
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2111
2123
|
eq: z.ZodOptional<z.ZodString>;
|
|
@@ -19469,6 +19481,65 @@ export declare const getCustomerEntitlementValueResponse: z.ZodObject<{
|
|
|
19469
19481
|
grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
19470
19482
|
}, z.core.$strip>>;
|
|
19471
19483
|
}, z.core.$strip>;
|
|
19484
|
+
export declare const listGrantsQueryParams: z.ZodObject<{
|
|
19485
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
19486
|
+
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
19487
|
+
number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
19488
|
+
}, z.core.$strip>>;
|
|
19489
|
+
sort: z.ZodOptional<z.ZodObject<{
|
|
19490
|
+
by: z.ZodString;
|
|
19491
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"asc">, z.ZodLiteral<"desc">]>>>;
|
|
19492
|
+
}, z.core.$strip>>;
|
|
19493
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
19494
|
+
customerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
19495
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
19496
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19497
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
19498
|
+
}, z.core.$strip>]>>;
|
|
19499
|
+
featureId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
19500
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
19501
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19502
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
19503
|
+
}, z.core.$strip>]>>;
|
|
19504
|
+
}, z.core.$strip>>;
|
|
19505
|
+
includeDeleted: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
19506
|
+
}, z.core.$strip>;
|
|
19507
|
+
export declare const listGrantsResponse: z.ZodObject<{
|
|
19508
|
+
data: z.ZodArray<z.ZodObject<{
|
|
19509
|
+
id: z.ZodString;
|
|
19510
|
+
entitlementId: z.ZodString;
|
|
19511
|
+
amount: z.ZodString;
|
|
19512
|
+
priority: z.ZodNumber;
|
|
19513
|
+
effectiveAt: z.ZodDate;
|
|
19514
|
+
expiresAfter: z.ZodOptional<z.ZodString>;
|
|
19515
|
+
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
19516
|
+
maxRolloverAmount: z.ZodString;
|
|
19517
|
+
minRolloverAmount: z.ZodString;
|
|
19518
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
19519
|
+
anchor: z.ZodDate;
|
|
19520
|
+
interval: z.ZodString;
|
|
19521
|
+
}, z.core.$strip>>;
|
|
19522
|
+
nextRecurrence: z.ZodOptional<z.ZodDate>;
|
|
19523
|
+
voidedAt: z.ZodOptional<z.ZodDate>;
|
|
19524
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19525
|
+
createdAt: z.ZodDate;
|
|
19526
|
+
updatedAt: z.ZodDate;
|
|
19527
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
19528
|
+
}, z.core.$strip>>;
|
|
19529
|
+
meta: z.ZodObject<{
|
|
19530
|
+
page: z.ZodObject<{
|
|
19531
|
+
number: z.ZodNumber;
|
|
19532
|
+
size: z.ZodNumber;
|
|
19533
|
+
total: z.ZodNumber;
|
|
19534
|
+
}, z.core.$strip>;
|
|
19535
|
+
}, z.core.$strip>;
|
|
19536
|
+
}, z.core.$strip>;
|
|
19537
|
+
export declare const voidGrantPathParams: z.ZodObject<{
|
|
19538
|
+
grantId: z.ZodString;
|
|
19539
|
+
}, z.core.$strip>;
|
|
19540
|
+
export declare const voidGrantQueryParams: z.ZodObject<{
|
|
19541
|
+
voidedAt: z.ZodOptional<z.ZodDate>;
|
|
19542
|
+
}, z.core.$strip>;
|
|
19472
19543
|
export declare const createCreditGrantPathParams: z.ZodObject<{
|
|
19473
19544
|
customerId: z.ZodString;
|
|
19474
19545
|
}, z.core.$strip>;
|
|
@@ -36634,6 +36705,18 @@ export declare const listEntitlementsParamsFilterWire: z.ZodObject<{
|
|
|
36634
36705
|
neq: z.ZodOptional<z.ZodString>;
|
|
36635
36706
|
}, z.core.$strict>]>>;
|
|
36636
36707
|
}, z.core.$strict>;
|
|
36708
|
+
export declare const listGrantsParamsFilterWire: z.ZodObject<{
|
|
36709
|
+
customer_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36710
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
36711
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36712
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
36713
|
+
}, z.core.$strict>]>>;
|
|
36714
|
+
feature_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36715
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
36716
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36717
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
36718
|
+
}, z.core.$strict>]>>;
|
|
36719
|
+
}, z.core.$strict>;
|
|
36637
36720
|
export declare const listSubscriptionsParamsFilterWire: z.ZodObject<{
|
|
36638
36721
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
36639
36722
|
eq: z.ZodOptional<z.ZodString>;
|
|
@@ -53979,6 +54062,62 @@ export declare const getCustomerEntitlementValueResponseWire: z.ZodObject<{
|
|
|
53979
54062
|
grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
53980
54063
|
}, z.core.$strict>>;
|
|
53981
54064
|
}, z.core.$strict>;
|
|
54065
|
+
export declare const listGrantsQueryParamsWire: z.ZodObject<{
|
|
54066
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
54067
|
+
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
54068
|
+
number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
54069
|
+
}, z.core.$strict>>;
|
|
54070
|
+
sort: z.ZodOptional<z.ZodString>;
|
|
54071
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
54072
|
+
customer_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
54073
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
54074
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54075
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
54076
|
+
}, z.core.$strict>]>>;
|
|
54077
|
+
feature_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
54078
|
+
eq: z.ZodOptional<z.ZodString>;
|
|
54079
|
+
oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54080
|
+
neq: z.ZodOptional<z.ZodString>;
|
|
54081
|
+
}, z.core.$strict>]>>;
|
|
54082
|
+
}, z.core.$strict>>;
|
|
54083
|
+
include_deleted: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
54084
|
+
}, z.core.$strip>;
|
|
54085
|
+
export declare const listGrantsResponseWire: z.ZodObject<{
|
|
54086
|
+
data: z.ZodArray<z.ZodObject<{
|
|
54087
|
+
id: z.ZodString;
|
|
54088
|
+
entitlement_id: z.ZodString;
|
|
54089
|
+
amount: z.ZodString;
|
|
54090
|
+
priority: z.ZodNumber;
|
|
54091
|
+
effective_at: z.ZodString;
|
|
54092
|
+
expires_after: z.ZodOptional<z.ZodString>;
|
|
54093
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
54094
|
+
max_rollover_amount: z.ZodString;
|
|
54095
|
+
min_rollover_amount: z.ZodString;
|
|
54096
|
+
recurrence: z.ZodOptional<z.ZodObject<{
|
|
54097
|
+
anchor: z.ZodString;
|
|
54098
|
+
interval: z.ZodString;
|
|
54099
|
+
}, z.core.$strict>>;
|
|
54100
|
+
next_recurrence: z.ZodOptional<z.ZodString>;
|
|
54101
|
+
voided_at: z.ZodOptional<z.ZodString>;
|
|
54102
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
54103
|
+
created_at: z.ZodString;
|
|
54104
|
+
updated_at: z.ZodString;
|
|
54105
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
54106
|
+
}, z.core.$strict>>;
|
|
54107
|
+
meta: z.ZodObject<{
|
|
54108
|
+
page: z.ZodObject<{
|
|
54109
|
+
number: z.ZodNumber;
|
|
54110
|
+
size: z.ZodNumber;
|
|
54111
|
+
total: z.ZodNumber;
|
|
54112
|
+
}, z.core.$strict>;
|
|
54113
|
+
}, z.core.$strict>;
|
|
54114
|
+
}, z.core.$strict>;
|
|
54115
|
+
export declare const voidGrantPathParamsWire: z.ZodObject<{
|
|
54116
|
+
grantId: z.ZodString;
|
|
54117
|
+
}, z.core.$strip>;
|
|
54118
|
+
export declare const voidGrantQueryParamsWire: z.ZodObject<{
|
|
54119
|
+
voided_at: z.ZodOptional<z.ZodString>;
|
|
54120
|
+
}, z.core.$strip>;
|
|
53982
54121
|
export declare const createCreditGrantPathParamsWire: z.ZodObject<{
|
|
53983
54122
|
customerId: z.ZodString;
|
|
53984
54123
|
}, z.core.$strip>;
|
package/dist/models/schemas.js
CHANGED
|
@@ -2912,6 +2912,12 @@ export const listEntitlementsParamsFilter = z
|
|
|
2912
2912
|
customerId: ulidFieldFilter.optional(),
|
|
2913
2913
|
})
|
|
2914
2914
|
.describe('Filter options for listing entitlements.');
|
|
2915
|
+
export const listGrantsParamsFilter = z
|
|
2916
|
+
.object({
|
|
2917
|
+
customerId: ulidFieldFilter.optional(),
|
|
2918
|
+
featureId: ulidFieldFilter.optional(),
|
|
2919
|
+
})
|
|
2920
|
+
.describe('Filter options for listing grants.');
|
|
2915
2921
|
export const listSubscriptionsParamsFilter = z
|
|
2916
2922
|
.object({
|
|
2917
2923
|
id: ulidFieldFilter.optional(),
|
|
@@ -5924,6 +5930,35 @@ export const getCustomerEntitlementValueQueryParams = z.object({
|
|
|
5924
5930
|
at: dateTime.optional(),
|
|
5925
5931
|
});
|
|
5926
5932
|
export const getCustomerEntitlementValueResponse = entitlementValueResult;
|
|
5933
|
+
export const listGrantsQueryParams = z.object({
|
|
5934
|
+
page: z
|
|
5935
|
+
.object({
|
|
5936
|
+
size: z.coerce
|
|
5937
|
+
.number()
|
|
5938
|
+
.int()
|
|
5939
|
+
.optional()
|
|
5940
|
+
.describe('The number of items to include per page.'),
|
|
5941
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
5942
|
+
})
|
|
5943
|
+
.optional()
|
|
5944
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
5945
|
+
sort: sortQuery.optional(),
|
|
5946
|
+
filter: listGrantsParamsFilter.optional(),
|
|
5947
|
+
includeDeleted: z.coerce
|
|
5948
|
+
.boolean()
|
|
5949
|
+
.optional()
|
|
5950
|
+
.describe('Include deleted grants in the response.'),
|
|
5951
|
+
});
|
|
5952
|
+
export const listGrantsResponse = z.object({
|
|
5953
|
+
data: z.array(entitlementGrant),
|
|
5954
|
+
meta: paginatedMeta,
|
|
5955
|
+
});
|
|
5956
|
+
export const voidGrantPathParams = z.object({
|
|
5957
|
+
grantId: ulid,
|
|
5958
|
+
});
|
|
5959
|
+
export const voidGrantQueryParams = z.object({
|
|
5960
|
+
voidedAt: dateTime.optional(),
|
|
5961
|
+
});
|
|
5927
5962
|
export const createCreditGrantPathParams = z.object({
|
|
5928
5963
|
customerId: ulid,
|
|
5929
5964
|
});
|
|
@@ -9491,6 +9526,12 @@ export const listEntitlementsParamsFilterWire = z
|
|
|
9491
9526
|
customer_id: ulidFieldFilterWire.optional(),
|
|
9492
9527
|
})
|
|
9493
9528
|
.describe('Filter options for listing entitlements.');
|
|
9529
|
+
export const listGrantsParamsFilterWire = z
|
|
9530
|
+
.strictObject({
|
|
9531
|
+
customer_id: ulidFieldFilterWire.optional(),
|
|
9532
|
+
feature_id: ulidFieldFilterWire.optional(),
|
|
9533
|
+
})
|
|
9534
|
+
.describe('Filter options for listing grants.');
|
|
9494
9535
|
export const listSubscriptionsParamsFilterWire = z
|
|
9495
9536
|
.strictObject({
|
|
9496
9537
|
id: ulidFieldFilterWire.optional(),
|
|
@@ -12512,6 +12553,38 @@ export const getCustomerEntitlementValueQueryParamsWire = z.object({
|
|
|
12512
12553
|
at: dateTimeWire.optional(),
|
|
12513
12554
|
});
|
|
12514
12555
|
export const getCustomerEntitlementValueResponseWire = entitlementValueResultWire;
|
|
12556
|
+
export const listGrantsQueryParamsWire = z.object({
|
|
12557
|
+
page: z
|
|
12558
|
+
.strictObject({
|
|
12559
|
+
size: z.coerce
|
|
12560
|
+
.number()
|
|
12561
|
+
.int()
|
|
12562
|
+
.optional()
|
|
12563
|
+
.describe('The number of items to include per page.'),
|
|
12564
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
12565
|
+
})
|
|
12566
|
+
.optional()
|
|
12567
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
12568
|
+
sort: z
|
|
12569
|
+
.string()
|
|
12570
|
+
.optional()
|
|
12571
|
+
.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.'),
|
|
12572
|
+
filter: listGrantsParamsFilterWire.optional(),
|
|
12573
|
+
include_deleted: z.coerce
|
|
12574
|
+
.boolean()
|
|
12575
|
+
.optional()
|
|
12576
|
+
.describe('Include deleted grants in the response.'),
|
|
12577
|
+
});
|
|
12578
|
+
export const listGrantsResponseWire = z.strictObject({
|
|
12579
|
+
data: z.array(entitlementGrantWire),
|
|
12580
|
+
meta: paginatedMetaWire,
|
|
12581
|
+
});
|
|
12582
|
+
export const voidGrantPathParamsWire = z.object({
|
|
12583
|
+
grantId: ulidWire,
|
|
12584
|
+
});
|
|
12585
|
+
export const voidGrantQueryParamsWire = z.object({
|
|
12586
|
+
voided_at: dateTimeWire.optional(),
|
|
12587
|
+
});
|
|
12515
12588
|
export const createCreditGrantPathParamsWire = z.object({
|
|
12516
12589
|
customerId: ulidWire,
|
|
12517
12590
|
});
|
package/dist/models/types.d.ts
CHANGED
|
@@ -2727,6 +2727,13 @@ export interface ListEntitlementsParamsFilter {
|
|
|
2727
2727
|
/** Filter entitlements by customer ID. */
|
|
2728
2728
|
customerId?: UlidFieldFilter;
|
|
2729
2729
|
}
|
|
2730
|
+
/** Filter options for listing grants. */
|
|
2731
|
+
export interface ListGrantsParamsFilter {
|
|
2732
|
+
/** Filter grants by the ID of the customer that owns the entitlement. */
|
|
2733
|
+
customerId?: UlidFieldFilter;
|
|
2734
|
+
/** Filter grants by the ID of the entitlement's feature. */
|
|
2735
|
+
featureId?: UlidFieldFilter;
|
|
2736
|
+
}
|
|
2730
2737
|
/** Filter options for listing subscriptions. */
|
|
2731
2738
|
export interface ListSubscriptionsParamsFilter {
|
|
2732
2739
|
id?: UlidFieldFilter;
|
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type Client } from '../core.js';
|
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
3
|
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse, GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueResponse } from '../models/operations/entitlements.js';
|
|
5
|
+
import type { ListGrantsRequest, ListGrantsResponse, VoidGrantRequest, VoidGrantResponse } from '../models/operations/grants.js';
|
|
5
6
|
import type { UnscheduleSubscriptionRequest, UnscheduleSubscriptionResponse, RestoreSubscriptionRequest, RestoreSubscriptionResponse, MigrateSubscriptionRequest, MigrateSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
6
7
|
import type { UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
7
8
|
import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js';
|
|
@@ -23,6 +24,8 @@ export declare class Internal {
|
|
|
23
24
|
get customers(): InternalCustomers;
|
|
24
25
|
private _entitlements?;
|
|
25
26
|
get entitlements(): InternalEntitlements;
|
|
27
|
+
private _grants?;
|
|
28
|
+
get grants(): InternalGrants;
|
|
26
29
|
private _subscriptions?;
|
|
27
30
|
get subscriptions(): InternalSubscriptions;
|
|
28
31
|
private _apps?;
|
|
@@ -311,6 +314,45 @@ export declare class InternalEntitlements {
|
|
|
311
314
|
*/
|
|
312
315
|
getCustomerValue(request: GetCustomerEntitlementValueRequest, options?: RequestOptions): Promise<GetCustomerEntitlementValueResponse>;
|
|
313
316
|
}
|
|
317
|
+
export declare class InternalGrants {
|
|
318
|
+
private readonly _client;
|
|
319
|
+
constructor(_client: Client);
|
|
320
|
+
/**
|
|
321
|
+
* List grants
|
|
322
|
+
*
|
|
323
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
324
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
325
|
+
*
|
|
326
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
327
|
+
* grants are always included, as they are part of the balance history.
|
|
328
|
+
*
|
|
329
|
+
* GET /openmeter/grants
|
|
330
|
+
*/
|
|
331
|
+
list(request?: ListGrantsRequest, options?: RequestOptions): Promise<ListGrantsResponse>;
|
|
332
|
+
/**
|
|
333
|
+
* List grants
|
|
334
|
+
*
|
|
335
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
336
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
337
|
+
*
|
|
338
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
339
|
+
* grants are always included, as they are part of the balance history.
|
|
340
|
+
*
|
|
341
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
342
|
+
*
|
|
343
|
+
* GET /openmeter/grants
|
|
344
|
+
*/
|
|
345
|
+
listAll(request?: ListGrantsRequest, options?: RequestOptions): AsyncIterable<EntitlementGrant>;
|
|
346
|
+
/**
|
|
347
|
+
* Void grant
|
|
348
|
+
*
|
|
349
|
+
* Void a grant so it no longer adds to the balance. Usage already deducted from
|
|
350
|
+
* the grant is kept.
|
|
351
|
+
*
|
|
352
|
+
* DELETE /openmeter/grants/{grantId}
|
|
353
|
+
*/
|
|
354
|
+
void(request: VoidGrantRequest, options?: RequestOptions): Promise<VoidGrantResponse>;
|
|
355
|
+
}
|
|
314
356
|
export declare class InternalSubscriptions {
|
|
315
357
|
private readonly _client;
|
|
316
358
|
constructor(_client: Client);
|
package/dist/sdk/internal.js
CHANGED
|
@@ -3,6 +3,7 @@ import { unwrap } from '../lib/types.js';
|
|
|
3
3
|
import { paginatePages } from '../lib/paginate.js';
|
|
4
4
|
import { createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, createCustomerEntitlementGrant, listCustomerEntitlementGrants, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
|
|
5
5
|
import { getCustomerEntitlementAccess, listEntitlements, getEntitlement, getCustomerEntitlementValue, } from '../funcs/entitlements.js';
|
|
6
|
+
import { listGrants, voidGrant } from '../funcs/grants.js';
|
|
6
7
|
import { unscheduleSubscription, restoreSubscription, migrateSubscription, createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
|
|
7
8
|
import { uninstallApp, updateApp, listAppCatalog, getAppCatalogItem, installApp, } from '../funcs/apps.js';
|
|
8
9
|
import { listInvoices, getInvoice, updateInvoice, deleteInvoice, advanceInvoice, approveInvoice, retryInvoice, snapshotQuantitiesInvoice, } from '../funcs/invoices.js';
|
|
@@ -29,6 +30,10 @@ export class Internal {
|
|
|
29
30
|
get entitlements() {
|
|
30
31
|
return (this._entitlements ??= new InternalEntitlements(this._client));
|
|
31
32
|
}
|
|
33
|
+
_grants;
|
|
34
|
+
get grants() {
|
|
35
|
+
return (this._grants ??= new InternalGrants(this._client));
|
|
36
|
+
}
|
|
32
37
|
_subscriptions;
|
|
33
38
|
get subscriptions() {
|
|
34
39
|
return (this._subscriptions ??= new InternalSubscriptions(this._client));
|
|
@@ -397,6 +402,53 @@ export class InternalEntitlements {
|
|
|
397
402
|
return unwrap(await getCustomerEntitlementValue(this._client, request, options));
|
|
398
403
|
}
|
|
399
404
|
}
|
|
405
|
+
export class InternalGrants {
|
|
406
|
+
_client;
|
|
407
|
+
constructor(_client) {
|
|
408
|
+
this._client = _client;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* List grants
|
|
412
|
+
*
|
|
413
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
414
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
415
|
+
*
|
|
416
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
417
|
+
* grants are always included, as they are part of the balance history.
|
|
418
|
+
*
|
|
419
|
+
* GET /openmeter/grants
|
|
420
|
+
*/
|
|
421
|
+
async list(request, options) {
|
|
422
|
+
return unwrap(await listGrants(this._client, request, options));
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* List grants
|
|
426
|
+
*
|
|
427
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
428
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
429
|
+
*
|
|
430
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
431
|
+
* grants are always included, as they are part of the balance history.
|
|
432
|
+
*
|
|
433
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
434
|
+
*
|
|
435
|
+
* GET /openmeter/grants
|
|
436
|
+
*/
|
|
437
|
+
listAll(request, options) {
|
|
438
|
+
return paginatePages((req, opts) => listGrants(this._client, req, opts), request ?? {}, options);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Void grant
|
|
442
|
+
*
|
|
443
|
+
* Void a grant so it no longer adds to the balance. Usage already deducted from
|
|
444
|
+
* the grant is kept.
|
|
445
|
+
*
|
|
446
|
+
* DELETE /openmeter/grants/{grantId}
|
|
447
|
+
*/
|
|
448
|
+
async void(request, options) {
|
|
449
|
+
return unwrap(await voidGrant(this._client, request, options));
|
|
450
|
+
}
|
|
451
|
+
}
|
|
400
452
|
export class InternalSubscriptions {
|
|
401
453
|
_client;
|
|
402
454
|
constructor(_client) {
|