@openmeter/client 1.0.0-beta-bfda176d831c → 1.0.0-beta-dc0789732537
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 +29 -27
- package/dist/funcs/customers.d.ts +2 -1
- package/dist/funcs/customers.js +6 -0
- package/dist/funcs/meters.d.ts +2 -1
- package/dist/funcs/meters.js +10 -0
- package/dist/index.d.ts +1 -1
- package/dist/models/operations/customers.d.ts +7 -1
- package/dist/models/operations/meters.d.ts +5 -0
- package/dist/models/operations/subscriptions.d.ts +3 -3
- package/dist/models/schemas.d.ts +109 -13
- package/dist/models/schemas.js +31 -23
- package/dist/models/types.d.ts +95 -17
- package/dist/sdk/customers.d.ts +2 -1
- package/dist/sdk/customers.js +4 -1
- package/dist/sdk/meters.d.ts +2 -1
- package/dist/sdk/meters.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -120,36 +120,38 @@ The full call path, HTTP route, and a short description are listed below.
|
|
|
120
120
|
|
|
121
121
|
### Meters
|
|
122
122
|
|
|
123
|
-
| Method
|
|
124
|
-
|
|
|
125
|
-
| `client.meters.create`
|
|
126
|
-
| `client.meters.get`
|
|
127
|
-
| `client.meters.list`
|
|
128
|
-
| `client.meters.update`
|
|
129
|
-
| `client.meters.delete`
|
|
130
|
-
| `client.meters.query`
|
|
123
|
+
| Method | HTTP | Description |
|
|
124
|
+
| ------------------------ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
125
|
+
| `client.meters.create` | `POST /openmeter/meters` | Create a meter. |
|
|
126
|
+
| `client.meters.get` | `GET /openmeter/meters/{meterId}` | Get a meter by ID. |
|
|
127
|
+
| `client.meters.list` | `GET /openmeter/meters` | List meters. |
|
|
128
|
+
| `client.meters.update` | `PUT /openmeter/meters/{meterId}` | Update a meter. |
|
|
129
|
+
| `client.meters.delete` | `DELETE /openmeter/meters/{meterId}` | Delete a meter. |
|
|
130
|
+
| `client.meters.query` | `POST /openmeter/meters/{meterId}/query` | Query a meter for usage. Set `Accept: application/json` (the default) to get a structured JSON response. Set `Accept: text/csv` to download the same data as a CSV file suitable for spreadsheets. The CSV columns, in order, are: `from, to, [subject,] [customer_id, customer_key, customer_name,] <dimensions...>, value` The `subject` column is emitted only when `subject` is in the query's `group_by_dimensions`. The three `customer_*` columns are emitted together only when `customer_id` is in the query's `group_by_dimensions`. |
|
|
131
|
+
| `client.meters.queryCsv` | `POST /openmeter/meters/{meterId}/query` | |
|
|
131
132
|
|
|
132
133
|
### Customers
|
|
133
134
|
|
|
134
|
-
| Method
|
|
135
|
-
|
|
|
136
|
-
| `client.customers.create`
|
|
137
|
-
| `client.customers.get`
|
|
138
|
-
| `client.customers.list`
|
|
139
|
-
| `client.customers.upsert`
|
|
140
|
-
| `client.customers.delete`
|
|
141
|
-
| `client.customers.billing.get`
|
|
142
|
-
| `client.customers.billing.update`
|
|
143
|
-
| `client.customers.billing.updateAppData`
|
|
144
|
-
| `client.customers.billing.createStripeCheckoutSession`
|
|
145
|
-
| `client.customers.billing.createStripePortalSession`
|
|
146
|
-
| `client.customers.credits.grants.create`
|
|
147
|
-
| `client.customers.credits.grants.get`
|
|
148
|
-
| `client.customers.credits.grants.list`
|
|
149
|
-
| `client.customers.credits.balance.get`
|
|
150
|
-
| `client.customers.credits.adjustments.create`
|
|
151
|
-
| `client.customers.credits.
|
|
152
|
-
| `client.customers.
|
|
135
|
+
| Method | HTTP | Description |
|
|
136
|
+
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
137
|
+
| `client.customers.create` | `POST /openmeter/customers` | |
|
|
138
|
+
| `client.customers.get` | `GET /openmeter/customers/{customerId}` | |
|
|
139
|
+
| `client.customers.list` | `GET /openmeter/customers` | |
|
|
140
|
+
| `client.customers.upsert` | `PUT /openmeter/customers/{customerId}` | |
|
|
141
|
+
| `client.customers.delete` | `DELETE /openmeter/customers/{customerId}` | |
|
|
142
|
+
| `client.customers.billing.get` | `GET /openmeter/customers/{customerId}/billing` | |
|
|
143
|
+
| `client.customers.billing.update` | `PUT /openmeter/customers/{customerId}/billing` | |
|
|
144
|
+
| `client.customers.billing.updateAppData` | `PUT /openmeter/customers/{customerId}/billing/app-data` | |
|
|
145
|
+
| `client.customers.billing.createStripeCheckoutSession` | `POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions` | Create a [Stripe Checkout Session](https://docs.stripe.com/payments/checkout) for the customer. Creates a Checkout Session for collecting payment method information from customers. The session operates in "setup" mode, which collects payment details without charging the customer immediately. The collected payment method can be used for future subscription billing. For hosted checkout sessions, redirect customers to the returned URL. For embedded sessions, use the client_secret to initialize Stripe.js in your application. |
|
|
146
|
+
| `client.customers.billing.createStripePortalSession` | `POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions` | Create Stripe Customer Portal Session. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer. |
|
|
147
|
+
| `client.customers.credits.grants.create` | `POST /openmeter/customers/{customerId}/credits/grants` | Create a new credit grant. A credit grant represents an allocation of prepaid credits to a customer. |
|
|
148
|
+
| `client.customers.credits.grants.get` | `GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId}` | Get a credit grant. |
|
|
149
|
+
| `client.customers.credits.grants.list` | `GET /openmeter/customers/{customerId}/credits/grants` | List credit grants. |
|
|
150
|
+
| `client.customers.credits.balance.get` | `GET /openmeter/customers/{customerId}/credits/balance` | Get a credit balance. |
|
|
151
|
+
| `client.customers.credits.adjustments.create` | `POST /openmeter/customers/{customerId}/credits/adjustments` | A credit adjustment can be used to make manual adjustments to a customer's credit balance. Supported use-cases: - Usage correction |
|
|
152
|
+
| `client.customers.credits.grants.updateExternalSettlement` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/settlement/external` | Update the payment settlement status of an externally funded credit grant. Use this endpoint to synchronize the payment state of an external payment with the system so that revenue recognition and credit availability work as expected. |
|
|
153
|
+
| `client.customers.credits.transactions.list` | `GET /openmeter/customers/{customerId}/credits/transactions` | List credit transactions for a customer. Returns an immutable, chronological record of credit movements: funded credits and consumed credits. Transactions are returned in reverse chronological order by default. |
|
|
154
|
+
| `client.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
|
|
153
155
|
|
|
154
156
|
### Entitlements
|
|
155
157
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse } from '../models/operations/customers.js';
|
|
3
|
+
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
export declare function createCustomer(client: Client, req: CreateCustomerRequest, options?: RequestOptions): Promise<Result<CreateCustomerResponse>>;
|
|
5
5
|
export declare function getCustomer(client: Client, req: GetCustomerRequest, options?: RequestOptions): Promise<Result<GetCustomerResponse>>;
|
|
6
6
|
export declare function listCustomers(client: Client, req?: ListCustomersRequest, options?: RequestOptions): Promise<Result<ListCustomersResponse>>;
|
|
@@ -16,6 +16,7 @@ export declare function getCreditGrant(client: Client, req: GetCreditGrantReques
|
|
|
16
16
|
export declare function listCreditGrants(client: Client, req: ListCreditGrantsRequest, options?: RequestOptions): Promise<Result<ListCreditGrantsResponse>>;
|
|
17
17
|
export declare function getCustomerCreditBalance(client: Client, req: GetCustomerCreditBalanceRequest, options?: RequestOptions): Promise<Result<GetCustomerCreditBalanceResponse>>;
|
|
18
18
|
export declare function createCreditAdjustment(client: Client, req: CreateCreditAdjustmentRequest, options?: RequestOptions): Promise<Result<CreateCreditAdjustmentResponse>>;
|
|
19
|
+
export declare function updateCreditGrantExternalSettlement(client: Client, req: UpdateCreditGrantExternalSettlementRequest, options?: RequestOptions): Promise<Result<UpdateCreditGrantExternalSettlementResponse>>;
|
|
19
20
|
export declare function listCreditTransactions(client: Client, req: ListCreditTransactionsRequest, options?: RequestOptions): Promise<Result<ListCreditTransactionsResponse>>;
|
|
20
21
|
export declare function listCustomerCharges(client: Client, req: ListCustomerChargesRequest, options?: RequestOptions): Promise<Result<ListCustomerChargesResponse>>;
|
|
21
22
|
//# sourceMappingURL=customers.d.ts.map
|
package/dist/funcs/customers.js
CHANGED
|
@@ -114,6 +114,12 @@ export function createCreditAdjustment(client, req, options) {
|
|
|
114
114
|
.post(path, { ...options, json: req.body })
|
|
115
115
|
.json());
|
|
116
116
|
}
|
|
117
|
+
export function updateCreditGrantExternalSettlement(client, req, options) {
|
|
118
|
+
const path = encodePath('openmeter/customers/{customerId}/credits/grants/{creditGrantId}/settlement/external', { customerId: req.customerId, creditGrantId: req.creditGrantId });
|
|
119
|
+
return request(() => http(client)
|
|
120
|
+
.post(path, { ...options, json: req.body })
|
|
121
|
+
.json());
|
|
122
|
+
}
|
|
117
123
|
export function listCreditTransactions(client, req, options) {
|
|
118
124
|
const searchParams = toURLSearchParams({
|
|
119
125
|
page: req.page,
|
package/dist/funcs/meters.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateMeterRequest, CreateMeterResponse, GetMeterRequest, GetMeterResponse, ListMetersRequest, ListMetersResponse, UpdateMeterRequest, UpdateMeterResponse, DeleteMeterRequest, DeleteMeterResponse, QueryMeterRequest, QueryMeterResponse } from '../models/operations/meters.js';
|
|
3
|
+
import type { CreateMeterRequest, CreateMeterResponse, GetMeterRequest, GetMeterResponse, ListMetersRequest, ListMetersResponse, UpdateMeterRequest, UpdateMeterResponse, DeleteMeterRequest, DeleteMeterResponse, QueryMeterRequest, QueryMeterResponse, QueryMeterCsvRequest, QueryMeterCsvResponse } from '../models/operations/meters.js';
|
|
4
4
|
export declare function createMeter(client: Client, req: CreateMeterRequest, options?: RequestOptions): Promise<Result<CreateMeterResponse>>;
|
|
5
5
|
export declare function getMeter(client: Client, req: GetMeterRequest, options?: RequestOptions): Promise<Result<GetMeterResponse>>;
|
|
6
6
|
export declare function listMeters(client: Client, req?: ListMetersRequest, options?: RequestOptions): Promise<Result<ListMetersResponse>>;
|
|
7
7
|
export declare function updateMeter(client: Client, req: UpdateMeterRequest, options?: RequestOptions): Promise<Result<UpdateMeterResponse>>;
|
|
8
8
|
export declare function deleteMeter(client: Client, req: DeleteMeterRequest, options?: RequestOptions): Promise<Result<DeleteMeterResponse>>;
|
|
9
9
|
export declare function queryMeter(client: Client, req: QueryMeterRequest, options?: RequestOptions): Promise<Result<QueryMeterResponse>>;
|
|
10
|
+
export declare function queryMeterCsv(client: Client, req: QueryMeterCsvRequest, options?: RequestOptions): Promise<Result<QueryMeterCsvResponse>>;
|
|
10
11
|
//# sourceMappingURL=meters.d.ts.map
|
package/dist/funcs/meters.js
CHANGED
|
@@ -46,4 +46,14 @@ export function queryMeter(client, req, options) {
|
|
|
46
46
|
.post(path, { ...options, json: req.body })
|
|
47
47
|
.json());
|
|
48
48
|
}
|
|
49
|
+
export function queryMeterCsv(client, req, options) {
|
|
50
|
+
const headers = new Headers(options?.headers);
|
|
51
|
+
headers.set('accept', 'text/csv');
|
|
52
|
+
const path = encodePath('openmeter/meters/{meterId}/query', {
|
|
53
|
+
meterId: req.meterId,
|
|
54
|
+
});
|
|
55
|
+
return request(() => http(client)
|
|
56
|
+
.post(path, { ...options, json: req.body, headers })
|
|
57
|
+
.text());
|
|
58
|
+
}
|
|
49
59
|
//# sourceMappingURL=meters.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -38,5 +38,5 @@ export type * from './models/operations/addons.js';
|
|
|
38
38
|
export type * from './models/operations/planAddons.js';
|
|
39
39
|
export type * from './models/operations/defaults.js';
|
|
40
40
|
export type * from './models/operations/governance.js';
|
|
41
|
-
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, TaxConfigStripe, TaxConfigExternalInvoicing, FlatFeeDiscounts, WorkflowCollectionAlignmentSubscription, WorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, UpdateMeterRequest, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, ListCostBasesParamsFilter, PriceFlat, PriceUnit, CurrencyAmount, RateCardDiscounts, Totals, FeatureManualUnitCost, FeatureLlmUnitCostPricing, LlmCostModelPricing, SpendCommitments, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateResourceReference, TaxCodeReference, CreditGrantInvoiceReference, BillingCustomerReference, SubscriptionReference, AddonReference, AppReference, CurrencyFiat, FeatureReference, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, CostBasis, CreateCostBasisRequest, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, UpsertPlanAddonRequest, ResourceWithKey, CreateMeterRequest, Meter, PaginatedMeta, QueryFilterStringMapItem,
|
|
41
|
+
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, TaxConfigStripe, TaxConfigExternalInvoicing, FlatFeeDiscounts, WorkflowCollectionAlignmentSubscription, WorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, UpdateMeterRequest, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, ListCostBasesParamsFilter, PriceFlat, PriceUnit, CurrencyAmount, RateCardDiscounts, Totals, FeatureManualUnitCost, FeatureLlmUnitCostPricing, LlmCostModelPricing, SpendCommitments, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateResourceReference, TaxCodeReference, CreditGrantInvoiceReference, BillingCustomerReference, SubscriptionReference, AddonReference, AppReference, CurrencyFiat, FeatureReference, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, CostBasis, CreateCostBasisRequest, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, UpsertPlanAddonRequest, ResourceWithKey, CreateMeterRequest, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, BillingAddress, Address, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, CreateCreditGrantPurchase, RecurringPeriod, CreditGrantPurchase, UpdateCreditGrantExternalSettlementRequest, ListCreditGrantsParamsFilter, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListPlansParamsFilter, SubscriptionCreate, RateCardProrationConfiguration, Subscription, AppCatalogItem, TaxCodeAppMapping, PartyTaxIdentity, ListCurrenciesParamsFilter, CurrencyCustom, CreateCurrencyCustomRequest, GovernanceQueryRequest, GovernanceFeatureAccessReason, GovernanceQueryError, UnitConfig, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, CreateCreditAdjustmentRequest, ListCreditTransactionsParamsFilter, CreditTransaction, PriceTier, ChargeTotals, FeatureLlmUnitCost, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, TaxConfig, RateCardTaxConfig, OrganizationDefaultTaxCodes, UpdateOrganizationDefaultTaxCodesRequest, SubscriptionAddon, PlanAddon, CreatePlanAddonRequest, ProfileAppReferences, ListEventsParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, CreateCustomerRequest, Customer, UpsertCustomerRequest, PartyAddresses, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, WorkflowCollectionAlignmentAnchored, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionCancel, SubscriptionChange, AppStripe, AppSandbox, AppExternalInvoicing, CreateTaxCodeRequest, TaxCode, UpsertTaxCodeRequest, GovernanceFeatureAccess, InvoiceUsageQuantityDetail, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, PriceGraduated, PriceVolume, PricePagePaginatedResponse, CreateCreditGrantRequest, CreditGrant, WorkflowTaxSettings, SubscriptionAddonPagePaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Party, AppStripeCreateCheckoutSessionRequestOptions, TaxCodePagePaginatedResponse, CurrencyPagePaginatedResponse, GovernanceQueryResult, Feature, CreateFeatureRequest, UpdateFeatureRequest, CreditGrantPagePaginatedResponse, BadRequest, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, AppPagePaginatedResponse, ProfileApps, GovernanceQueryResponse, FlatFeeCharge, UsageBasedCharge, RateCard, FeaturePagePaginatedResponse, Workflow, PlanPhase, Addon, CreateAddonRequest, UpsertAddonRequest, Profile, CreateBillingProfileRequest, UpsertBillingProfileRequest, ChargePagePaginatedResponse, Plan, CreatePlanRequest, UpsertPlanRequest, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, PlanPagePaginatedResponse, SortQueryInput, BaseErrorInput, WorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, SubscriptionCreateInput, SubscriptionInput, GovernanceQueryRequestInput, UnitConfigInput, IngestedEventInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionCancelInput, SubscriptionChangeInput, InvoiceUsageQuantityDetailInput, CreateCreditGrantRequestInput, CreditGrantInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreditGrantPagePaginatedResponseInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, RateCardInput, WorkflowInput, PlanPhaseInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, PlanPagePaginatedResponseInput, } from './models/types.js';
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, ChargePagePaginatedResponse, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody } from '../types.js';
|
|
1
|
+
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, ChargePagePaginatedResponse, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody } from '../types.js';
|
|
2
2
|
export type CreateCustomerRequest = CreateCustomerRequestBody;
|
|
3
3
|
export type CreateCustomerResponse = Customer;
|
|
4
4
|
export type GetCustomerRequest = {
|
|
@@ -88,6 +88,12 @@ export type CreateCreditAdjustmentRequest = {
|
|
|
88
88
|
body: CreateCreditAdjustmentRequestBody;
|
|
89
89
|
};
|
|
90
90
|
export type CreateCreditAdjustmentResponse = CreditAdjustment;
|
|
91
|
+
export type UpdateCreditGrantExternalSettlementRequest = {
|
|
92
|
+
customerId: string;
|
|
93
|
+
creditGrantId: string;
|
|
94
|
+
body: UpdateCreditGrantExternalSettlementRequestBody;
|
|
95
|
+
};
|
|
96
|
+
export type UpdateCreditGrantExternalSettlementResponse = CreditGrant;
|
|
91
97
|
export interface ListCreditTransactionsQuery {
|
|
92
98
|
page?: CursorPaginationQueryPage;
|
|
93
99
|
/** Filter credit transactions returned in the response. */
|
|
@@ -32,4 +32,9 @@ export type QueryMeterRequest = {
|
|
|
32
32
|
body: MeterQueryRequestInput;
|
|
33
33
|
};
|
|
34
34
|
export type QueryMeterResponse = MeterQueryResult;
|
|
35
|
+
export type QueryMeterCsvRequest = {
|
|
36
|
+
meterId: string;
|
|
37
|
+
body: MeterQueryRequestInput;
|
|
38
|
+
};
|
|
39
|
+
export type QueryMeterCsvResponse = string;
|
|
35
40
|
//# sourceMappingURL=meters.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput,
|
|
2
|
-
export type CreateSubscriptionRequest =
|
|
1
|
+
import type { ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput, SubscriptionChangeInput, SubscriptionChangeResponse, SubscriptionCreateInput, SubscriptionPagePaginatedResponse } from '../types.js';
|
|
2
|
+
export type CreateSubscriptionRequest = SubscriptionCreateInput;
|
|
3
3
|
export type CreateSubscriptionResponse = Subscription;
|
|
4
4
|
export interface ListSubscriptionsQuery {
|
|
5
5
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -29,7 +29,7 @@ export type UnscheduleCancelationRequest = {
|
|
|
29
29
|
export type UnscheduleCancelationResponse = Subscription;
|
|
30
30
|
export type ChangeSubscriptionRequest = {
|
|
31
31
|
subscriptionId: string;
|
|
32
|
-
body:
|
|
32
|
+
body: SubscriptionChangeInput;
|
|
33
33
|
};
|
|
34
34
|
export type ChangeSubscriptionResponse = SubscriptionChangeResponse;
|
|
35
35
|
export interface ListSubscriptionAddonsQuery {
|
package/dist/models/schemas.d.ts
CHANGED
|
@@ -995,19 +995,6 @@ export declare const queryFilterStringMapItem: z.ZodObject<{
|
|
|
995
995
|
or: z.ZodOptional<z.ZodArray<z.ZodObject<any, z.core.$strip>>>;
|
|
996
996
|
}, z.core.$strip>>>;
|
|
997
997
|
}, z.core.$strip>;
|
|
998
|
-
export declare const subscriptionCreate: z.ZodObject<{
|
|
999
|
-
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1000
|
-
customer: z.ZodObject<{
|
|
1001
|
-
id: z.ZodOptional<z.ZodString>;
|
|
1002
|
-
key: z.ZodOptional<z.ZodString>;
|
|
1003
|
-
}, z.core.$strip>;
|
|
1004
|
-
plan: z.ZodObject<{
|
|
1005
|
-
id: z.ZodOptional<z.ZodString>;
|
|
1006
|
-
key: z.ZodOptional<z.ZodString>;
|
|
1007
|
-
version: z.ZodOptional<z.ZodNumber>;
|
|
1008
|
-
}, z.core.$strip>;
|
|
1009
|
-
billing_anchor: z.ZodOptional<z.ZodString>;
|
|
1010
|
-
}, z.core.$strip>;
|
|
1011
998
|
export declare const ulidOrExternalResourceKey: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
1012
999
|
export declare const customerKeyReference: z.ZodObject<{
|
|
1013
1000
|
key: z.ZodString;
|
|
@@ -1188,6 +1175,23 @@ export declare const listPlansParamsFilter: z.ZodObject<{
|
|
|
1188
1175
|
neq: z.ZodOptional<z.ZodString>;
|
|
1189
1176
|
}, z.core.$strip>]>>;
|
|
1190
1177
|
}, z.core.$strip>;
|
|
1178
|
+
export declare const subscriptionCreate: z.ZodObject<{
|
|
1179
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1180
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1181
|
+
credit_then_invoice: "credit_then_invoice";
|
|
1182
|
+
credit_only: "credit_only";
|
|
1183
|
+
}>>>;
|
|
1184
|
+
customer: z.ZodObject<{
|
|
1185
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1186
|
+
key: z.ZodOptional<z.ZodString>;
|
|
1187
|
+
}, z.core.$strip>;
|
|
1188
|
+
plan: z.ZodObject<{
|
|
1189
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1190
|
+
key: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
1192
|
+
}, z.core.$strip>;
|
|
1193
|
+
billing_anchor: z.ZodOptional<z.ZodString>;
|
|
1194
|
+
}, z.core.$strip>;
|
|
1191
1195
|
export declare const rateCardProrationConfiguration: z.ZodObject<{
|
|
1192
1196
|
mode: z.ZodEnum<{
|
|
1193
1197
|
no_proration: "no_proration";
|
|
@@ -1209,6 +1213,10 @@ export declare const subscription: z.ZodObject<{
|
|
|
1209
1213
|
canceled: "canceled";
|
|
1210
1214
|
scheduled: "scheduled";
|
|
1211
1215
|
}>;
|
|
1216
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1217
|
+
credit_then_invoice: "credit_then_invoice";
|
|
1218
|
+
credit_only: "credit_only";
|
|
1219
|
+
}>>>;
|
|
1212
1220
|
}, z.core.$strip>;
|
|
1213
1221
|
export declare const subscriptionEditTiming: z.ZodUnion<readonly [z.ZodEnum<{
|
|
1214
1222
|
immediate: "immediate";
|
|
@@ -2299,6 +2307,10 @@ export declare const subscriptionPagePaginatedResponse: z.ZodObject<{
|
|
|
2299
2307
|
canceled: "canceled";
|
|
2300
2308
|
scheduled: "scheduled";
|
|
2301
2309
|
}>;
|
|
2310
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2311
|
+
credit_then_invoice: "credit_then_invoice";
|
|
2312
|
+
credit_only: "credit_only";
|
|
2313
|
+
}>>>;
|
|
2302
2314
|
}, z.core.$strip>>;
|
|
2303
2315
|
meta: z.ZodObject<{
|
|
2304
2316
|
page: z.ZodObject<{
|
|
@@ -2324,6 +2336,10 @@ export declare const subscriptionChangeResponse: z.ZodObject<{
|
|
|
2324
2336
|
canceled: "canceled";
|
|
2325
2337
|
scheduled: "scheduled";
|
|
2326
2338
|
}>;
|
|
2339
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2340
|
+
credit_then_invoice: "credit_then_invoice";
|
|
2341
|
+
credit_only: "credit_only";
|
|
2342
|
+
}>>>;
|
|
2327
2343
|
}, z.core.$strip>;
|
|
2328
2344
|
next: z.ZodObject<{
|
|
2329
2345
|
id: z.ZodString;
|
|
@@ -2340,6 +2356,10 @@ export declare const subscriptionChangeResponse: z.ZodObject<{
|
|
|
2340
2356
|
canceled: "canceled";
|
|
2341
2357
|
scheduled: "scheduled";
|
|
2342
2358
|
}>;
|
|
2359
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2360
|
+
credit_then_invoice: "credit_then_invoice";
|
|
2361
|
+
credit_only: "credit_only";
|
|
2362
|
+
}>>>;
|
|
2343
2363
|
}, z.core.$strip>;
|
|
2344
2364
|
}, z.core.$strip>;
|
|
2345
2365
|
export declare const subscriptionCancel: z.ZodObject<{
|
|
@@ -2350,6 +2370,10 @@ export declare const subscriptionCancel: z.ZodObject<{
|
|
|
2350
2370
|
}, z.core.$strip>;
|
|
2351
2371
|
export declare const subscriptionChange: z.ZodObject<{
|
|
2352
2372
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2373
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2374
|
+
credit_then_invoice: "credit_then_invoice";
|
|
2375
|
+
credit_only: "credit_only";
|
|
2376
|
+
}>>>;
|
|
2353
2377
|
customer: z.ZodObject<{
|
|
2354
2378
|
id: z.ZodOptional<z.ZodString>;
|
|
2355
2379
|
key: z.ZodOptional<z.ZodString>;
|
|
@@ -5706,6 +5730,10 @@ export declare const plan: z.ZodObject<{
|
|
|
5706
5730
|
}, z.core.$strip>>;
|
|
5707
5731
|
}, z.core.$strip>>;
|
|
5708
5732
|
}, z.core.$strip>>;
|
|
5733
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
5734
|
+
credit_then_invoice: "credit_then_invoice";
|
|
5735
|
+
credit_only: "credit_only";
|
|
5736
|
+
}>>>;
|
|
5709
5737
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5710
5738
|
code: z.ZodString;
|
|
5711
5739
|
message: z.ZodString;
|
|
@@ -6155,6 +6183,10 @@ export declare const planPagePaginatedResponse: z.ZodObject<{
|
|
|
6155
6183
|
}, z.core.$strip>>;
|
|
6156
6184
|
}, z.core.$strip>>;
|
|
6157
6185
|
}, z.core.$strip>>;
|
|
6186
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
6187
|
+
credit_then_invoice: "credit_then_invoice";
|
|
6188
|
+
credit_only: "credit_only";
|
|
6189
|
+
}>>>;
|
|
6158
6190
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6159
6191
|
code: z.ZodString;
|
|
6160
6192
|
message: z.ZodString;
|
|
@@ -6484,6 +6516,10 @@ export declare const queryMeterResponse: z.ZodObject<{
|
|
|
6484
6516
|
dimensions: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6485
6517
|
}, z.core.$strip>>;
|
|
6486
6518
|
}, z.core.$strip>;
|
|
6519
|
+
export declare const queryMeterCsvPathParams: z.ZodObject<{
|
|
6520
|
+
meterId: z.ZodString;
|
|
6521
|
+
}, z.core.$strip>;
|
|
6522
|
+
export declare const queryMeterCsvResponse: z.ZodString;
|
|
6487
6523
|
export declare const createCustomerBody: z.ZodObject<{
|
|
6488
6524
|
name: z.ZodString;
|
|
6489
6525
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -7599,6 +7635,10 @@ export declare const listCustomerChargesResponse: z.ZodObject<{
|
|
|
7599
7635
|
}, z.core.$strip>;
|
|
7600
7636
|
export declare const createSubscriptionBody: z.ZodObject<{
|
|
7601
7637
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7638
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7639
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7640
|
+
credit_only: "credit_only";
|
|
7641
|
+
}>>>;
|
|
7602
7642
|
customer: z.ZodObject<{
|
|
7603
7643
|
id: z.ZodOptional<z.ZodString>;
|
|
7604
7644
|
key: z.ZodOptional<z.ZodString>;
|
|
@@ -7625,6 +7665,10 @@ export declare const createSubscriptionResponse: z.ZodObject<{
|
|
|
7625
7665
|
canceled: "canceled";
|
|
7626
7666
|
scheduled: "scheduled";
|
|
7627
7667
|
}>;
|
|
7668
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7669
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7670
|
+
credit_only: "credit_only";
|
|
7671
|
+
}>>>;
|
|
7628
7672
|
}, z.core.$strip>;
|
|
7629
7673
|
export declare const listSubscriptionsQueryParams: z.ZodObject<{
|
|
7630
7674
|
page: z.ZodOptional<z.ZodObject<{
|
|
@@ -7679,6 +7723,10 @@ export declare const listSubscriptionsResponse: z.ZodObject<{
|
|
|
7679
7723
|
canceled: "canceled";
|
|
7680
7724
|
scheduled: "scheduled";
|
|
7681
7725
|
}>;
|
|
7726
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7727
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7728
|
+
credit_only: "credit_only";
|
|
7729
|
+
}>>>;
|
|
7682
7730
|
}, z.core.$strip>>;
|
|
7683
7731
|
meta: z.ZodObject<{
|
|
7684
7732
|
page: z.ZodObject<{
|
|
@@ -7706,6 +7754,10 @@ export declare const getSubscriptionResponse: z.ZodObject<{
|
|
|
7706
7754
|
canceled: "canceled";
|
|
7707
7755
|
scheduled: "scheduled";
|
|
7708
7756
|
}>;
|
|
7757
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7758
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7759
|
+
credit_only: "credit_only";
|
|
7760
|
+
}>>>;
|
|
7709
7761
|
}, z.core.$strip>;
|
|
7710
7762
|
export declare const cancelSubscriptionPathParams: z.ZodObject<{
|
|
7711
7763
|
subscriptionId: z.ZodString;
|
|
@@ -7731,6 +7783,10 @@ export declare const cancelSubscriptionResponse: z.ZodObject<{
|
|
|
7731
7783
|
canceled: "canceled";
|
|
7732
7784
|
scheduled: "scheduled";
|
|
7733
7785
|
}>;
|
|
7786
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7787
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7788
|
+
credit_only: "credit_only";
|
|
7789
|
+
}>>>;
|
|
7734
7790
|
}, z.core.$strip>;
|
|
7735
7791
|
export declare const unscheduleCancelationPathParams: z.ZodObject<{
|
|
7736
7792
|
subscriptionId: z.ZodString;
|
|
@@ -7750,12 +7806,20 @@ export declare const unscheduleCancelationResponse: z.ZodObject<{
|
|
|
7750
7806
|
canceled: "canceled";
|
|
7751
7807
|
scheduled: "scheduled";
|
|
7752
7808
|
}>;
|
|
7809
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7810
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7811
|
+
credit_only: "credit_only";
|
|
7812
|
+
}>>>;
|
|
7753
7813
|
}, z.core.$strip>;
|
|
7754
7814
|
export declare const changeSubscriptionPathParams: z.ZodObject<{
|
|
7755
7815
|
subscriptionId: z.ZodString;
|
|
7756
7816
|
}, z.core.$strip>;
|
|
7757
7817
|
export declare const changeSubscriptionBody: z.ZodObject<{
|
|
7758
7818
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7819
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7820
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7821
|
+
credit_only: "credit_only";
|
|
7822
|
+
}>>>;
|
|
7759
7823
|
customer: z.ZodObject<{
|
|
7760
7824
|
id: z.ZodOptional<z.ZodString>;
|
|
7761
7825
|
key: z.ZodOptional<z.ZodString>;
|
|
@@ -7787,6 +7851,10 @@ export declare const changeSubscriptionResponse: z.ZodObject<{
|
|
|
7787
7851
|
canceled: "canceled";
|
|
7788
7852
|
scheduled: "scheduled";
|
|
7789
7853
|
}>;
|
|
7854
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7855
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7856
|
+
credit_only: "credit_only";
|
|
7857
|
+
}>>>;
|
|
7790
7858
|
}, z.core.$strip>;
|
|
7791
7859
|
next: z.ZodObject<{
|
|
7792
7860
|
id: z.ZodString;
|
|
@@ -7803,6 +7871,10 @@ export declare const changeSubscriptionResponse: z.ZodObject<{
|
|
|
7803
7871
|
canceled: "canceled";
|
|
7804
7872
|
scheduled: "scheduled";
|
|
7805
7873
|
}>;
|
|
7874
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
7875
|
+
credit_then_invoice: "credit_then_invoice";
|
|
7876
|
+
credit_only: "credit_only";
|
|
7877
|
+
}>>>;
|
|
7806
7878
|
}, z.core.$strip>;
|
|
7807
7879
|
}, z.core.$strip>;
|
|
7808
7880
|
export declare const listSubscriptionAddonsPathParams: z.ZodObject<{
|
|
@@ -9685,6 +9757,10 @@ export declare const listPlansResponse: z.ZodObject<{
|
|
|
9685
9757
|
}, z.core.$strip>>;
|
|
9686
9758
|
}, z.core.$strip>>;
|
|
9687
9759
|
}, z.core.$strip>>;
|
|
9760
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
9761
|
+
credit_then_invoice: "credit_then_invoice";
|
|
9762
|
+
credit_only: "credit_only";
|
|
9763
|
+
}>>>;
|
|
9688
9764
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9689
9765
|
code: z.ZodString;
|
|
9690
9766
|
message: z.ZodString;
|
|
@@ -9870,6 +9946,10 @@ export declare const createPlanResponse: z.ZodObject<{
|
|
|
9870
9946
|
}, z.core.$strip>>;
|
|
9871
9947
|
}, z.core.$strip>>;
|
|
9872
9948
|
}, z.core.$strip>>;
|
|
9949
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
9950
|
+
credit_then_invoice: "credit_then_invoice";
|
|
9951
|
+
credit_only: "credit_only";
|
|
9952
|
+
}>>>;
|
|
9873
9953
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9874
9954
|
code: z.ZodString;
|
|
9875
9955
|
message: z.ZodString;
|
|
@@ -10047,6 +10127,10 @@ export declare const updatePlanResponse: z.ZodObject<{
|
|
|
10047
10127
|
}, z.core.$strip>>;
|
|
10048
10128
|
}, z.core.$strip>>;
|
|
10049
10129
|
}, z.core.$strip>>;
|
|
10130
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
10131
|
+
credit_then_invoice: "credit_then_invoice";
|
|
10132
|
+
credit_only: "credit_only";
|
|
10133
|
+
}>>>;
|
|
10050
10134
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10051
10135
|
code: z.ZodString;
|
|
10052
10136
|
message: z.ZodString;
|
|
@@ -10148,6 +10232,10 @@ export declare const getPlanResponse: z.ZodObject<{
|
|
|
10148
10232
|
}, z.core.$strip>>;
|
|
10149
10233
|
}, z.core.$strip>>;
|
|
10150
10234
|
}, z.core.$strip>>;
|
|
10235
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
10236
|
+
credit_then_invoice: "credit_then_invoice";
|
|
10237
|
+
credit_only: "credit_only";
|
|
10238
|
+
}>>>;
|
|
10151
10239
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10152
10240
|
code: z.ZodString;
|
|
10153
10241
|
message: z.ZodString;
|
|
@@ -10252,6 +10340,10 @@ export declare const archivePlanResponse: z.ZodObject<{
|
|
|
10252
10340
|
}, z.core.$strip>>;
|
|
10253
10341
|
}, z.core.$strip>>;
|
|
10254
10342
|
}, z.core.$strip>>;
|
|
10343
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
10344
|
+
credit_then_invoice: "credit_then_invoice";
|
|
10345
|
+
credit_only: "credit_only";
|
|
10346
|
+
}>>>;
|
|
10255
10347
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10256
10348
|
code: z.ZodString;
|
|
10257
10349
|
message: z.ZodString;
|
|
@@ -10353,6 +10445,10 @@ export declare const publishPlanResponse: z.ZodObject<{
|
|
|
10353
10445
|
}, z.core.$strip>>;
|
|
10354
10446
|
}, z.core.$strip>>;
|
|
10355
10447
|
}, z.core.$strip>>;
|
|
10448
|
+
settlement_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
10449
|
+
credit_then_invoice: "credit_then_invoice";
|
|
10450
|
+
credit_only: "credit_only";
|
|
10451
|
+
}>>>;
|
|
10356
10452
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10357
10453
|
code: z.ZodString;
|
|
10358
10454
|
message: z.ZodString;
|
package/dist/models/schemas.js
CHANGED
|
@@ -1548,29 +1548,6 @@ export const queryFilterStringMapItem = z
|
|
|
1548
1548
|
.describe('Combines the provided filters with a logical OR.'),
|
|
1549
1549
|
})
|
|
1550
1550
|
.describe('A query filter for an item in a string map attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
1551
|
-
export const subscriptionCreate = z
|
|
1552
|
-
.object({
|
|
1553
|
-
labels: labels.optional(),
|
|
1554
|
-
customer: z
|
|
1555
|
-
.object({
|
|
1556
|
-
id: ulid.optional(),
|
|
1557
|
-
key: externalResourceKey.optional(),
|
|
1558
|
-
})
|
|
1559
|
-
.describe('The customer to create the subscription for.'),
|
|
1560
|
-
plan: z
|
|
1561
|
-
.object({
|
|
1562
|
-
id: ulid.optional(),
|
|
1563
|
-
key: resourceKey.optional(),
|
|
1564
|
-
version: z
|
|
1565
|
-
.number()
|
|
1566
|
-
.int()
|
|
1567
|
-
.optional()
|
|
1568
|
-
.describe('The plan version of the subscription, if any. If not provided, the latest version of the plan will be used.'),
|
|
1569
|
-
})
|
|
1570
|
-
.describe('The plan reference of the subscription.'),
|
|
1571
|
-
billing_anchor: dateTime.optional(),
|
|
1572
|
-
})
|
|
1573
|
-
.describe('Subscription create request.');
|
|
1574
1551
|
export const ulidOrExternalResourceKey = z
|
|
1575
1552
|
.union([ulid, externalResourceKey])
|
|
1576
1553
|
.describe('ULID ID or External Resource Key.');
|
|
@@ -1761,6 +1738,30 @@ export const listPlansParamsFilter = z
|
|
|
1761
1738
|
currency: stringFieldFilterExact.optional(),
|
|
1762
1739
|
})
|
|
1763
1740
|
.describe('Filter options for listing plans.');
|
|
1741
|
+
export const subscriptionCreate = z
|
|
1742
|
+
.object({
|
|
1743
|
+
labels: labels.optional(),
|
|
1744
|
+
settlement_mode: settlementMode.optional().default('credit_then_invoice'),
|
|
1745
|
+
customer: z
|
|
1746
|
+
.object({
|
|
1747
|
+
id: ulid.optional(),
|
|
1748
|
+
key: externalResourceKey.optional(),
|
|
1749
|
+
})
|
|
1750
|
+
.describe('The customer to create the subscription for.'),
|
|
1751
|
+
plan: z
|
|
1752
|
+
.object({
|
|
1753
|
+
id: ulid.optional(),
|
|
1754
|
+
key: resourceKey.optional(),
|
|
1755
|
+
version: z
|
|
1756
|
+
.number()
|
|
1757
|
+
.int()
|
|
1758
|
+
.optional()
|
|
1759
|
+
.describe('The plan version of the subscription, if any. If not provided, the latest version of the plan will be used.'),
|
|
1760
|
+
})
|
|
1761
|
+
.describe('The plan reference of the subscription.'),
|
|
1762
|
+
billing_anchor: dateTime.optional(),
|
|
1763
|
+
})
|
|
1764
|
+
.describe('Subscription create request.');
|
|
1764
1765
|
export const rateCardProrationConfiguration = z
|
|
1765
1766
|
.object({
|
|
1766
1767
|
mode: rateCardProrationMode,
|
|
@@ -1777,6 +1778,7 @@ export const subscription = z
|
|
|
1777
1778
|
plan_id: ulid.optional(),
|
|
1778
1779
|
billing_anchor: dateTime,
|
|
1779
1780
|
status: subscriptionStatus,
|
|
1781
|
+
settlement_mode: settlementMode.optional().default('credit_then_invoice'),
|
|
1780
1782
|
})
|
|
1781
1783
|
.describe('Subscription.');
|
|
1782
1784
|
export const subscriptionEditTiming = z
|
|
@@ -2443,6 +2445,7 @@ export const subscriptionCancel = z
|
|
|
2443
2445
|
export const subscriptionChange = z
|
|
2444
2446
|
.object({
|
|
2445
2447
|
labels: labels.optional(),
|
|
2448
|
+
settlement_mode: settlementMode.optional().default('credit_then_invoice'),
|
|
2446
2449
|
customer: z
|
|
2447
2450
|
.object({
|
|
2448
2451
|
id: ulid.optional(),
|
|
@@ -3336,6 +3339,7 @@ export const plan = z
|
|
|
3336
3339
|
.array(planPhase)
|
|
3337
3340
|
.min(1)
|
|
3338
3341
|
.describe('The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required.'),
|
|
3342
|
+
settlement_mode: settlementMode.optional().default('credit_then_invoice'),
|
|
3339
3343
|
validation_errors: z
|
|
3340
3344
|
.array(productCatalogValidationError)
|
|
3341
3345
|
.optional()
|
|
@@ -3459,6 +3463,10 @@ export const queryMeterPathParams = z.object({
|
|
|
3459
3463
|
});
|
|
3460
3464
|
export const queryMeterBody = meterQueryRequest;
|
|
3461
3465
|
export const queryMeterResponse = meterQueryResult;
|
|
3466
|
+
export const queryMeterCsvPathParams = z.object({
|
|
3467
|
+
meterId: ulid,
|
|
3468
|
+
});
|
|
3469
|
+
export const queryMeterCsvResponse = z.string();
|
|
3462
3470
|
export const createCustomerBody = createCustomerRequest;
|
|
3463
3471
|
export const createCustomerResponse = customer;
|
|
3464
3472
|
export const getCustomerPathParams = z.object({
|
package/dist/models/types.d.ts
CHANGED
|
@@ -927,23 +927,6 @@ export interface QueryFilterStringMapItem {
|
|
|
927
927
|
/** Combines the provided filters with a logical OR. */
|
|
928
928
|
or?: QueryFilterString[];
|
|
929
929
|
}
|
|
930
|
-
/** Subscription create request. */
|
|
931
|
-
export interface SubscriptionCreate {
|
|
932
|
-
labels?: Labels;
|
|
933
|
-
/** The customer to create the subscription for. */
|
|
934
|
-
customer: {
|
|
935
|
-
id?: string;
|
|
936
|
-
key?: string;
|
|
937
|
-
};
|
|
938
|
-
/** The plan reference of the subscription. */
|
|
939
|
-
plan: {
|
|
940
|
-
id?: string;
|
|
941
|
-
key?: string;
|
|
942
|
-
version?: number;
|
|
943
|
-
};
|
|
944
|
-
/** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) If not provided, the subscription will be created with the subscription's creation time as the billing anchor. */
|
|
945
|
-
billing_anchor?: string;
|
|
946
|
-
}
|
|
947
930
|
/** Customer reference by external key. */
|
|
948
931
|
export interface CustomerKeyReference {
|
|
949
932
|
/** The external key of the customer. */
|
|
@@ -1158,6 +1141,25 @@ export interface ListPlansParamsFilter {
|
|
|
1158
1141
|
neq?: string;
|
|
1159
1142
|
};
|
|
1160
1143
|
}
|
|
1144
|
+
/** Subscription create request. */
|
|
1145
|
+
export interface SubscriptionCreate {
|
|
1146
|
+
labels?: Labels;
|
|
1147
|
+
/** Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
1148
|
+
settlement_mode: 'credit_then_invoice' | 'credit_only';
|
|
1149
|
+
/** The customer to create the subscription for. */
|
|
1150
|
+
customer: {
|
|
1151
|
+
id?: string;
|
|
1152
|
+
key?: string;
|
|
1153
|
+
};
|
|
1154
|
+
/** The plan reference of the subscription. */
|
|
1155
|
+
plan: {
|
|
1156
|
+
id?: string;
|
|
1157
|
+
key?: string;
|
|
1158
|
+
version?: number;
|
|
1159
|
+
};
|
|
1160
|
+
/** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) If not provided, the subscription will be created with the subscription's creation time as the billing anchor. */
|
|
1161
|
+
billing_anchor?: string;
|
|
1162
|
+
}
|
|
1161
1163
|
/** The proration configuration of the rate card. */
|
|
1162
1164
|
export interface RateCardProrationConfiguration {
|
|
1163
1165
|
/** The proration mode of the rate card. */
|
|
@@ -1181,6 +1183,8 @@ export interface Subscription {
|
|
|
1181
1183
|
billing_anchor: string;
|
|
1182
1184
|
/** The status of the subscription. */
|
|
1183
1185
|
status: 'active' | 'inactive' | 'canceled' | 'scheduled';
|
|
1186
|
+
/** Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
1187
|
+
settlement_mode: 'credit_then_invoice' | 'credit_only';
|
|
1184
1188
|
}
|
|
1185
1189
|
/** Available apps for billing integrations to connect with third-party services. Apps can have various capabilities like syncing data from or to external systems, integrating with third-party services for tax calculation, delivery of invoices, collection of payments, etc. */
|
|
1186
1190
|
export interface AppCatalogItem {
|
|
@@ -2051,6 +2055,8 @@ export interface SubscriptionCancel {
|
|
|
2051
2055
|
/** Request for changing a subscription. */
|
|
2052
2056
|
export interface SubscriptionChange {
|
|
2053
2057
|
labels?: Labels;
|
|
2058
|
+
/** Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
2059
|
+
settlement_mode: 'credit_then_invoice' | 'credit_only';
|
|
2054
2060
|
/** The customer to create the subscription for. */
|
|
2055
2061
|
customer: {
|
|
2056
2062
|
id?: string;
|
|
@@ -2814,6 +2820,8 @@ export interface Plan {
|
|
|
2814
2820
|
status: 'draft' | 'active' | 'archived' | 'scheduled';
|
|
2815
2821
|
/** The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required. */
|
|
2816
2822
|
phases: PlanPhase[];
|
|
2823
|
+
/** Settlement mode for plan. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
2824
|
+
settlement_mode: 'credit_then_invoice' | 'credit_only';
|
|
2817
2825
|
/** List of validation errors in `draft` state that prevent the plan from being published. */
|
|
2818
2826
|
validation_errors?: ProductCatalogValidationError[];
|
|
2819
2827
|
}
|
|
@@ -2973,6 +2981,44 @@ export interface CreditGrantPurchaseInput {
|
|
|
2973
2981
|
/** Current payment settlement status. */
|
|
2974
2982
|
settlement_status?: 'pending' | 'authorized' | 'settled';
|
|
2975
2983
|
}
|
|
2984
|
+
export interface SubscriptionCreateInput {
|
|
2985
|
+
labels?: Labels;
|
|
2986
|
+
/** Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
2987
|
+
settlement_mode?: 'credit_then_invoice' | 'credit_only';
|
|
2988
|
+
/** The customer to create the subscription for. */
|
|
2989
|
+
customer: {
|
|
2990
|
+
id?: string;
|
|
2991
|
+
key?: string;
|
|
2992
|
+
};
|
|
2993
|
+
/** The plan reference of the subscription. */
|
|
2994
|
+
plan: {
|
|
2995
|
+
id?: string;
|
|
2996
|
+
key?: string;
|
|
2997
|
+
version?: number;
|
|
2998
|
+
};
|
|
2999
|
+
/** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) If not provided, the subscription will be created with the subscription's creation time as the billing anchor. */
|
|
3000
|
+
billing_anchor?: string;
|
|
3001
|
+
}
|
|
3002
|
+
export interface SubscriptionInput {
|
|
3003
|
+
id: string;
|
|
3004
|
+
labels?: Labels;
|
|
3005
|
+
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3006
|
+
created_at: string;
|
|
3007
|
+
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3008
|
+
updated_at: string;
|
|
3009
|
+
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3010
|
+
deleted_at?: string;
|
|
3011
|
+
/** The customer ID of the subscription. */
|
|
3012
|
+
customer_id: string;
|
|
3013
|
+
/** The plan ID of the subscription. Set if subscription is created from a plan. */
|
|
3014
|
+
plan_id?: string;
|
|
3015
|
+
/** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) */
|
|
3016
|
+
billing_anchor: string;
|
|
3017
|
+
/** The status of the subscription. */
|
|
3018
|
+
status: 'active' | 'inactive' | 'canceled' | 'scheduled';
|
|
3019
|
+
/** Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
3020
|
+
settlement_mode?: 'credit_then_invoice' | 'credit_only';
|
|
3021
|
+
}
|
|
2976
3022
|
export interface GovernanceQueryRequestInput {
|
|
2977
3023
|
/** Whether to include credit balance availability for each resolved customer. When true, each feature evaluation includes credit balance checks. Defaults to `false`. */
|
|
2978
3024
|
include_credits?: boolean;
|
|
@@ -3003,10 +3049,40 @@ export interface IngestedEventInput {
|
|
|
3003
3049
|
/** The validation errors of the ingested event. */
|
|
3004
3050
|
validation_errors?: IngestedEventValidationError[];
|
|
3005
3051
|
}
|
|
3052
|
+
export interface SubscriptionPagePaginatedResponseInput {
|
|
3053
|
+
data: SubscriptionInput[];
|
|
3054
|
+
meta: PaginatedMeta;
|
|
3055
|
+
}
|
|
3056
|
+
export interface SubscriptionChangeResponseInput {
|
|
3057
|
+
/** The current subscription before the change. */
|
|
3058
|
+
current: SubscriptionInput;
|
|
3059
|
+
/** The new state of the subscription after the change. */
|
|
3060
|
+
next: SubscriptionInput;
|
|
3061
|
+
}
|
|
3006
3062
|
export interface SubscriptionCancelInput {
|
|
3007
3063
|
/** If not provided the subscription is canceled immediately. */
|
|
3008
3064
|
timing?: 'immediate' | 'next_billing_cycle' | string;
|
|
3009
3065
|
}
|
|
3066
|
+
export interface SubscriptionChangeInput {
|
|
3067
|
+
labels?: Labels;
|
|
3068
|
+
/** Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
3069
|
+
settlement_mode?: 'credit_then_invoice' | 'credit_only';
|
|
3070
|
+
/** The customer to create the subscription for. */
|
|
3071
|
+
customer: {
|
|
3072
|
+
id?: string;
|
|
3073
|
+
key?: string;
|
|
3074
|
+
};
|
|
3075
|
+
/** The plan reference of the subscription. */
|
|
3076
|
+
plan: {
|
|
3077
|
+
id?: string;
|
|
3078
|
+
key?: string;
|
|
3079
|
+
version?: number;
|
|
3080
|
+
};
|
|
3081
|
+
/** A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day) If not provided, the subscription will be created with the subscription's creation time as the billing anchor. */
|
|
3082
|
+
billing_anchor?: string;
|
|
3083
|
+
/** Timing configuration for the change, when the change should take effect. For changing a subscription, the accepted values depend on the subscription configuration. */
|
|
3084
|
+
timing: 'immediate' | 'next_billing_cycle' | string;
|
|
3085
|
+
}
|
|
3010
3086
|
export interface InvoiceUsageQuantityDetailInput {
|
|
3011
3087
|
/** The raw quantity as reported by the meter (native units). */
|
|
3012
3088
|
raw_quantity: string;
|
|
@@ -3339,6 +3415,8 @@ export interface PlanInput {
|
|
|
3339
3415
|
status: 'draft' | 'active' | 'archived' | 'scheduled';
|
|
3340
3416
|
/** The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required. */
|
|
3341
3417
|
phases: PlanPhaseInput[];
|
|
3418
|
+
/** Settlement mode for plan. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits. */
|
|
3419
|
+
settlement_mode?: 'credit_then_invoice' | 'credit_only';
|
|
3342
3420
|
/** List of validation errors in `draft` state that prevent the plan from being published. */
|
|
3343
3421
|
validation_errors?: ProductCatalogValidationError[];
|
|
3344
3422
|
}
|
package/dist/sdk/customers.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse } from '../models/operations/customers.js';
|
|
3
|
+
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
export declare class Customers {
|
|
5
5
|
private readonly _client;
|
|
6
6
|
constructor(_client: Client);
|
|
@@ -43,6 +43,7 @@ export declare class CustomersCreditsGrants {
|
|
|
43
43
|
create(request: CreateCreditGrantRequest, options?: RequestOptions): Promise<CreateCreditGrantResponse>;
|
|
44
44
|
get(request: GetCreditGrantRequest, options?: RequestOptions): Promise<GetCreditGrantResponse>;
|
|
45
45
|
list(request: ListCreditGrantsRequest, options?: RequestOptions): Promise<ListCreditGrantsResponse>;
|
|
46
|
+
updateExternalSettlement(request: UpdateCreditGrantExternalSettlementRequest, options?: RequestOptions): Promise<UpdateCreditGrantExternalSettlementResponse>;
|
|
46
47
|
}
|
|
47
48
|
export declare class CustomersCreditsBalance {
|
|
48
49
|
private readonly _client;
|
package/dist/sdk/customers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unwrap } from '../lib/types.js';
|
|
2
|
-
import { createCustomer, getCustomer, listCustomers, upsertCustomer, deleteCustomer, getCustomerBilling, updateCustomerBilling, updateCustomerBillingAppData, createCustomerStripeCheckoutSession, createCustomerStripePortalSession, createCreditGrant, getCreditGrant, listCreditGrants, getCustomerCreditBalance, createCreditAdjustment, listCreditTransactions, listCustomerCharges, } from '../funcs/customers.js';
|
|
2
|
+
import { createCustomer, getCustomer, listCustomers, upsertCustomer, deleteCustomer, getCustomerBilling, updateCustomerBilling, updateCustomerBillingAppData, createCustomerStripeCheckoutSession, createCustomerStripePortalSession, createCreditGrant, getCreditGrant, listCreditGrants, getCustomerCreditBalance, createCreditAdjustment, updateCreditGrantExternalSettlement, listCreditTransactions, listCustomerCharges, } from '../funcs/customers.js';
|
|
3
3
|
export class Customers {
|
|
4
4
|
_client;
|
|
5
5
|
constructor(_client) {
|
|
@@ -90,6 +90,9 @@ export class CustomersCreditsGrants {
|
|
|
90
90
|
async list(request, options) {
|
|
91
91
|
return unwrap(await listCreditGrants(this._client, request, options));
|
|
92
92
|
}
|
|
93
|
+
async updateExternalSettlement(request, options) {
|
|
94
|
+
return unwrap(await updateCreditGrantExternalSettlement(this._client, request, options));
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
97
|
export class CustomersCreditsBalance {
|
|
95
98
|
_client;
|
package/dist/sdk/meters.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateMeterRequest, CreateMeterResponse, GetMeterRequest, GetMeterResponse, ListMetersRequest, ListMetersResponse, UpdateMeterRequest, UpdateMeterResponse, DeleteMeterRequest, DeleteMeterResponse, QueryMeterRequest, QueryMeterResponse } from '../models/operations/meters.js';
|
|
3
|
+
import type { CreateMeterRequest, CreateMeterResponse, GetMeterRequest, GetMeterResponse, ListMetersRequest, ListMetersResponse, UpdateMeterRequest, UpdateMeterResponse, DeleteMeterRequest, DeleteMeterResponse, QueryMeterRequest, QueryMeterResponse, QueryMeterCsvRequest, QueryMeterCsvResponse } from '../models/operations/meters.js';
|
|
4
4
|
export declare class Meters {
|
|
5
5
|
private readonly _client;
|
|
6
6
|
constructor(_client: Client);
|
|
@@ -10,5 +10,6 @@ export declare class Meters {
|
|
|
10
10
|
update(request: UpdateMeterRequest, options?: RequestOptions): Promise<UpdateMeterResponse>;
|
|
11
11
|
delete(request: DeleteMeterRequest, options?: RequestOptions): Promise<DeleteMeterResponse>;
|
|
12
12
|
query(request: QueryMeterRequest, options?: RequestOptions): Promise<QueryMeterResponse>;
|
|
13
|
+
queryCsv(request: QueryMeterCsvRequest, options?: RequestOptions): Promise<QueryMeterCsvResponse>;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=meters.d.ts.map
|
package/dist/sdk/meters.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unwrap } from '../lib/types.js';
|
|
2
|
-
import { createMeter, getMeter, listMeters, updateMeter, deleteMeter, queryMeter, } from '../funcs/meters.js';
|
|
2
|
+
import { createMeter, getMeter, listMeters, updateMeter, deleteMeter, queryMeter, queryMeterCsv, } from '../funcs/meters.js';
|
|
3
3
|
export class Meters {
|
|
4
4
|
_client;
|
|
5
5
|
constructor(_client) {
|
|
@@ -23,5 +23,8 @@ export class Meters {
|
|
|
23
23
|
async query(request, options) {
|
|
24
24
|
return unwrap(await queryMeter(this._client, request, options));
|
|
25
25
|
}
|
|
26
|
+
async queryCsv(request, options) {
|
|
27
|
+
return unwrap(await queryMeterCsv(this._client, request, options));
|
|
28
|
+
}
|
|
26
29
|
}
|
|
27
30
|
//# sourceMappingURL=meters.js.map
|