@openmeter/client 1.0.0-beta-0abbaf78837c → 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 +9 -0
- package/dist/funcs/entitlements.d.ts +10 -1
- package/dist/funcs/entitlements.js +51 -8
- 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/entitlements.d.ts +22 -15
- package/dist/models/operations/grants.d.ts +43 -0
- package/dist/models/operations/grants.js +2 -0
- package/dist/models/schemas.d.ts +227 -42
- package/dist/models/schemas.js +137 -28
- package/dist/models/types.d.ts +49 -10
- package/dist/sdk/internal.d.ts +52 -1
- package/dist/sdk/internal.js +64 -1
- 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)
|
|
@@ -444,6 +445,14 @@ they can change or be removed without notice or semver consideration.
|
|
|
444
445
|
| `client.internal.entitlements.getCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}` | Get the customer's access to a single feature. |
|
|
445
446
|
| `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. |
|
|
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. |
|
|
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. |
|
|
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. |
|
|
447
456
|
|
|
448
457
|
### Internal Subscriptions
|
|
449
458
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse } from '../models/operations/entitlements.js';
|
|
3
|
+
import type { ListCustomerEntitlementAccessRequest, ListCustomerEntitlementAccessResponse, GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse, GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueResponse } from '../models/operations/entitlements.js';
|
|
4
4
|
/**
|
|
5
5
|
* List customer entitlement access
|
|
6
6
|
*
|
|
@@ -34,3 +34,12 @@ export declare function listEntitlements(client: Client, req?: ListEntitlementsR
|
|
|
34
34
|
* GET /openmeter/entitlements/{entitlementId}
|
|
35
35
|
*/
|
|
36
36
|
export declare function getEntitlement(client: Client, req: GetEntitlementRequest, options?: RequestOptions): Promise<Result<GetEntitlementResponse>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get customer entitlement value
|
|
39
|
+
*
|
|
40
|
+
* Get the customer's access through a single entitlement, optionally evaluated at
|
|
41
|
+
* a point in time.
|
|
42
|
+
*
|
|
43
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
|
|
44
|
+
*/
|
|
45
|
+
export declare function getCustomerEntitlementValue(client: Client, req: GetCustomerEntitlementValueRequest, options?: RequestOptions): Promise<Result<GetCustomerEntitlementValueResponse>>;
|
|
@@ -67,15 +67,8 @@ export function getCustomerEntitlementAccess(client, req, options) {
|
|
|
67
67
|
}
|
|
68
68
|
return encodeURIComponent(String(pathParams.featureKey));
|
|
69
69
|
})()}`;
|
|
70
|
-
const query = toWire({
|
|
71
|
-
expand: req.expand,
|
|
72
|
-
}, schemas.getCustomerEntitlementAccessQueryParams);
|
|
73
|
-
if (client._options.validate) {
|
|
74
|
-
assertValid(schemas.getCustomerEntitlementAccessQueryParamsWire, query);
|
|
75
|
-
}
|
|
76
|
-
const searchParams = toURLSearchParams(query);
|
|
77
70
|
return http(client)
|
|
78
|
-
.get(path,
|
|
71
|
+
.get(path, options)
|
|
79
72
|
.json()
|
|
80
73
|
.then((data) => {
|
|
81
74
|
if (client._options.validate) {
|
|
@@ -155,3 +148,53 @@ export function getEntitlement(client, req, options) {
|
|
|
155
148
|
});
|
|
156
149
|
});
|
|
157
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Get customer entitlement value
|
|
153
|
+
*
|
|
154
|
+
* Get the customer's access through a single entitlement, optionally evaluated at
|
|
155
|
+
* a point in time.
|
|
156
|
+
*
|
|
157
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
|
|
158
|
+
*/
|
|
159
|
+
export function getCustomerEntitlementValue(client, req, options) {
|
|
160
|
+
return request(() => {
|
|
161
|
+
const pathParamsInput = {
|
|
162
|
+
customerId: req.customerId,
|
|
163
|
+
entitlementId: req.entitlementId,
|
|
164
|
+
};
|
|
165
|
+
const pathParams = client._options.validate
|
|
166
|
+
? toPathWire(pathParamsInput, schemas.getCustomerEntitlementValuePathParams)
|
|
167
|
+
: pathParamsInput;
|
|
168
|
+
if (client._options.validate) {
|
|
169
|
+
assertValid(schemas.getCustomerEntitlementValuePathParamsWire, pathParams);
|
|
170
|
+
}
|
|
171
|
+
const path = `openmeter/customers/${(() => {
|
|
172
|
+
if (pathParams.customerId === undefined) {
|
|
173
|
+
throw new Error('missing path parameter: customerId');
|
|
174
|
+
}
|
|
175
|
+
return encodeURIComponent(String(pathParams.customerId));
|
|
176
|
+
})()}/entitlements/${(() => {
|
|
177
|
+
if (pathParams.entitlementId === undefined) {
|
|
178
|
+
throw new Error('missing path parameter: entitlementId');
|
|
179
|
+
}
|
|
180
|
+
return encodeURIComponent(String(pathParams.entitlementId));
|
|
181
|
+
})()}/value`;
|
|
182
|
+
const query = toWire({
|
|
183
|
+
expand: req.expand,
|
|
184
|
+
at: req.at,
|
|
185
|
+
}, schemas.getCustomerEntitlementValueQueryParams);
|
|
186
|
+
if (client._options.validate) {
|
|
187
|
+
assertValid(schemas.getCustomerEntitlementValueQueryParamsWire, query);
|
|
188
|
+
}
|
|
189
|
+
const searchParams = toURLSearchParams(query);
|
|
190
|
+
return http(client)
|
|
191
|
+
.get(path, { ...options, searchParams })
|
|
192
|
+
.json()
|
|
193
|
+
.then((data) => {
|
|
194
|
+
if (client._options.validate) {
|
|
195
|
+
assertValid(schemas.getCustomerEntitlementValueResponseWire, data);
|
|
196
|
+
}
|
|
197
|
+
return fromWire(data, schemas.getCustomerEntitlementValueResponse);
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
}
|
|
@@ -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, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ListNotificationChannelsParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, EntitlementGrant, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, NotificationChannelPagePaginatedResponse, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, EntitlementGrantPagePaginatedResponse, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BooleanFieldFilter, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, NotificationChannelInput, CreateNotificationChannelRequestInput, UpdateNotificationChannelRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, NotificationChannelPagePaginatedResponseInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
|
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';
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { Entitlement,
|
|
2
|
+
import type { Entitlement, EntitlementAccessCheckResult, EntitlementPagePaginatedResponse, EntitlementValueResult, ListCustomerEntitlementAccessResponseData, ListEntitlementsParamsFilter, SortQueryInput } from '../types.js';
|
|
3
3
|
export type ListCustomerEntitlementAccessRequest = {
|
|
4
4
|
customerId: string;
|
|
5
5
|
};
|
|
6
6
|
export type ListCustomerEntitlementAccessResponse = ListCustomerEntitlementAccessResponseData;
|
|
7
|
-
export
|
|
8
|
-
/**
|
|
9
|
-
* Expand computed fields.
|
|
10
|
-
*
|
|
11
|
-
* Supported values are:
|
|
12
|
-
*
|
|
13
|
-
* - `value`: Expand the balance details of a metered entitlement; it sets the
|
|
14
|
-
* `value` field.
|
|
15
|
-
*/
|
|
16
|
-
expand?: 'value'[];
|
|
17
|
-
}
|
|
18
|
-
export type GetCustomerEntitlementAccessRequest = AcceptDateStrings<GetCustomerEntitlementAccessQuery & {
|
|
7
|
+
export type GetCustomerEntitlementAccessRequest = {
|
|
19
8
|
customerId: string;
|
|
20
9
|
featureKey: string;
|
|
21
|
-
}
|
|
22
|
-
export type GetCustomerEntitlementAccessResponse =
|
|
10
|
+
};
|
|
11
|
+
export type GetCustomerEntitlementAccessResponse = EntitlementAccessCheckResult;
|
|
23
12
|
export interface ListEntitlementsQuery {
|
|
24
13
|
/** Determines which page of the collection to retrieve. */
|
|
25
14
|
page?: {
|
|
@@ -50,3 +39,21 @@ export type GetEntitlementRequest = {
|
|
|
50
39
|
entitlementId: string;
|
|
51
40
|
};
|
|
52
41
|
export type GetEntitlementResponse = Entitlement;
|
|
42
|
+
export interface GetCustomerEntitlementValueQuery {
|
|
43
|
+
/**
|
|
44
|
+
* Expand computed fields.
|
|
45
|
+
*
|
|
46
|
+
* Supported values are:
|
|
47
|
+
*
|
|
48
|
+
* - `value`: Expand the balance details of a metered entitlement; it sets the
|
|
49
|
+
* `value` field.
|
|
50
|
+
*/
|
|
51
|
+
expand?: 'value'[];
|
|
52
|
+
/** The point in time to evaluate the entitlement at. Defaults to the current time. */
|
|
53
|
+
at?: Date;
|
|
54
|
+
}
|
|
55
|
+
export type GetCustomerEntitlementValueRequest = AcceptDateStrings<GetCustomerEntitlementValueQuery & {
|
|
56
|
+
customerId: string;
|
|
57
|
+
entitlementId: string;
|
|
58
|
+
}>;
|
|
59
|
+
export type GetCustomerEntitlementValueResponse = EntitlementValueResult;
|
|
@@ -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;
|