@openmeter/client 1.0.0-beta-c16cbe1e4650 → 1.0.0-beta-ac21fbf12768
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 +7 -0
- package/dist/funcs/index.d.ts +1 -0
- package/dist/funcs/index.js +1 -0
- package/dist/funcs/invoices.d.ts +5 -0
- package/dist/funcs/invoices.js +10 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/models/operations/customers.d.ts +2 -2
- package/dist/models/operations/invoices.d.ts +7 -0
- package/dist/models/operations/invoices.js +2 -0
- package/dist/models/schemas.d.ts +2000 -208
- package/dist/models/schemas.js +386 -37
- package/dist/models/types.d.ts +475 -32
- package/dist/sdk/invoices.d.ts +9 -0
- package/dist/sdk/invoices.js +12 -0
- package/dist/sdk/sdk.d.ts +3 -0
- package/dist/sdk/sdk.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ TypeSpec definitions and ships fully-typed request and response models.
|
|
|
24
24
|
- [Subscriptions](#subscriptions)
|
|
25
25
|
- [Apps](#apps)
|
|
26
26
|
- [Billing](#billing)
|
|
27
|
+
- [Invoices](#invoices)
|
|
27
28
|
- [Tax](#tax)
|
|
28
29
|
- [Currencies](#currencies)
|
|
29
30
|
- [Features](#features)
|
|
@@ -190,6 +191,12 @@ The full call path, HTTP route, and a short description are listed below.
|
|
|
190
191
|
| `client.billing.updateProfile` | `PUT /openmeter/profiles/{id}` | Update a billing profile. |
|
|
191
192
|
| `client.billing.deleteProfile` | `DELETE /openmeter/profiles/{id}` | Delete a billing profile. Only such billing profiles can be deleted that are: - not the default profile - not pinned to any customer using customer overrides - only have finalized invoices |
|
|
192
193
|
|
|
194
|
+
### Invoices
|
|
195
|
+
|
|
196
|
+
| Method | HTTP | Description |
|
|
197
|
+
| --------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
198
|
+
| `client.invoices.get` | `GET /openmeter/billing/invoices/{invoiceId}` | Get a billing invoice by ID. Returns the full invoice resource including line items, status details, totals, and workflow configuration snapshot. |
|
|
199
|
+
|
|
193
200
|
### Tax
|
|
194
201
|
|
|
195
202
|
| Method | HTTP | Description |
|
package/dist/funcs/index.d.ts
CHANGED
package/dist/funcs/index.js
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Client } from '../core.js';
|
|
2
|
+
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
+
import type { GetInvoiceRequest, GetInvoiceResponse } from '../models/operations/invoices.js';
|
|
4
|
+
export declare function getInvoice(client: Client, req: GetInvoiceRequest, options?: RequestOptions): Promise<Result<GetInvoiceResponse>>;
|
|
5
|
+
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { http } from '../core.js';
|
|
2
|
+
import { request } from '../lib/request.js';
|
|
3
|
+
import { encodePath } from '../lib/encodings.js';
|
|
4
|
+
export function getInvoice(client, req, options) {
|
|
5
|
+
const path = encodePath('openmeter/billing/invoices/{invoiceId}', {
|
|
6
|
+
invoiceId: req.invoiceId,
|
|
7
|
+
});
|
|
8
|
+
return request(() => http(client).get(path, options).json());
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=invoices.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Entitlements } from './sdk/entitlements.js';
|
|
|
6
6
|
export { Subscriptions } from './sdk/subscriptions.js';
|
|
7
7
|
export { Apps } from './sdk/apps.js';
|
|
8
8
|
export { Billing } from './sdk/billing.js';
|
|
9
|
+
export { Invoices } from './sdk/invoices.js';
|
|
9
10
|
export { Tax } from './sdk/tax.js';
|
|
10
11
|
export { Currencies } from './sdk/currencies.js';
|
|
11
12
|
export { Features } from './sdk/features.js';
|
|
@@ -29,6 +30,7 @@ export type * from './models/operations/entitlements.js';
|
|
|
29
30
|
export type * from './models/operations/subscriptions.js';
|
|
30
31
|
export type * from './models/operations/apps.js';
|
|
31
32
|
export type * from './models/operations/billing.js';
|
|
33
|
+
export type * from './models/operations/invoices.js';
|
|
32
34
|
export type * from './models/operations/tax.js';
|
|
33
35
|
export type * from './models/operations/currencies.js';
|
|
34
36
|
export type * from './models/operations/features.js';
|
|
@@ -38,5 +40,5 @@ export type * from './models/operations/addons.js';
|
|
|
38
40
|
export type * from './models/operations/planAddons.js';
|
|
39
41
|
export type * from './models/operations/defaults.js';
|
|
40
42
|
export type * from './models/operations/governance.js';
|
|
41
|
-
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, TaxConfigStripe, TaxConfigExternalInvoicing,
|
|
43
|
+
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, TaxConfigStripe, TaxConfigExternalInvoicing, ChargeFlatFeeDiscounts, PriceFree, WorkflowCollectionAlignmentSubscription, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, InvoiceLineExternalReferences, LlmCostProvider, LlmCostModel, RateCardStaticEntitlement, RateCardBooleanEntitlement, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, UpdateMeterRequest, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, ListCostBasesParamsFilter, CurrencyAmount, PriceFlat, PriceUnit, RateCardDiscounts, Totals, InvoiceLineCreditsApplied, FeatureManualUnitCost, FeatureLlmUnitCostPricing, LlmCostModelPricing, SpendCommitments, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateResourceReference, TaxCodeReference, CreditGrantInvoiceReference, BillingCustomerReference, SubscriptionReference, AddonReference, AppReference, ChargeReference, 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, Address, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, CreateCreditGrantPurchase, RecurringPeriod, RateCardMeteredEntitlement, CreditGrantPurchase, UpdateCreditGrantExternalSettlementRequest, ListCreditGrantsParamsFilter, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListPlansParamsFilter, SubscriptionCreate, RateCardProrationConfiguration, Subscription, AppCatalogItem, TaxCodeAppMapping, PartyTaxIdentity, WorkflowInvoicingSettings, InvoiceValidationIssue, InvoiceAvailableActions, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, CurrencyCustom, CreateCurrencyCustomRequest, UnitConfig, GovernanceQueryRequest, GovernanceFeatureAccessReason, GovernanceQueryError, 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, InvoiceWorkflowAppsReferences, ListEventsParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, CreateCustomerRequest, Customer, UpsertCustomerRequest, PartyAddresses, InvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, WorkflowCollectionAlignmentAnchored, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionCancel, SubscriptionChange, AppStripe, AppSandbox, AppExternalInvoicing, CreateTaxCodeRequest, TaxCode, UpsertTaxCodeRequest, InvoiceWorkflow, InvoiceStatusDetails, InvoiceLineDiscounts, InvoiceUsageQuantityDetail, GovernanceFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, PriceGraduated, PriceVolume, PricePagePaginatedResponse, CreateCreditGrantRequest, CreditGrant, CreateChargeFlatFeeRequest, WorkflowTaxSettings, SubscriptionAddonPagePaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Party, Supplier, AppStripeCreateCheckoutSessionRequestOptions, TaxCodePagePaginatedResponse, InvoiceWorkflowSettings, InvoiceDetailedLine, CurrencyPagePaginatedResponse, GovernanceQueryResult, Feature, CreateFeatureRequest, UpdateFeatureRequest, CreditGrantPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, AppPagePaginatedResponse, ProfileApps, GovernanceQueryResponse, ChargeFlatFee, ChargeUsageBased, CreateChargeUsageBasedRequest, InvoiceLineRateCard, RateCard, FeaturePagePaginatedResponse, Workflow, InvoiceStandardLine, PlanPhase, Addon, CreateAddonRequest, UpsertAddonRequest, Profile, CreateBillingProfileRequest, UpsertBillingProfileRequest, ChargePagePaginatedResponse, Plan, CreatePlanRequest, UpsertPlanRequest, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, InvoiceStandard, PlanPagePaginatedResponse, SortQueryInput, BaseErrorInput, WorkflowPaymentSendInvoiceSettingsInput, InvoiceWorkflowInvoicingSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, CreateCreditGrantPurchaseInput, RateCardMeteredEntitlementInput, CreditGrantPurchaseInput, WorkflowInvoicingSettingsInput, UnitConfigInput, GovernanceQueryRequestInput, IngestedEventInput, SubscriptionCancelInput, InvoiceWorkflowInput, InvoiceUsageQuantityDetailInput, CreateCreditGrantRequestInput, CreditGrantInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, CreditGrantPagePaginatedResponseInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, RateCardInput, WorkflowInput, InvoiceStandardLineInput, PlanPhaseInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, InvoiceStandardInput, PlanPagePaginatedResponseInput, } from './models/types.js';
|
|
42
44
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { Entitlements } from './sdk/entitlements.js';
|
|
|
6
6
|
export { Subscriptions } from './sdk/subscriptions.js';
|
|
7
7
|
export { Apps } from './sdk/apps.js';
|
|
8
8
|
export { Billing } from './sdk/billing.js';
|
|
9
|
+
export { Invoices } from './sdk/invoices.js';
|
|
9
10
|
export { Tax } from './sdk/tax.js';
|
|
10
11
|
export { Currencies } from './sdk/currencies.js';
|
|
11
12
|
export { Features } from './sdk/features.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as schemas from '../schemas.js';
|
|
3
|
-
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, ChargePagePaginatedResponse, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody,
|
|
3
|
+
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, ChargePagePaginatedResponse, CreateChargeFlatFeeRequest, CreateChargeUsageBasedRequest, 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';
|
|
4
4
|
export type CreateCustomerRequest = CreateCustomerRequestBody;
|
|
5
5
|
export type CreateCustomerResponse = Customer;
|
|
6
6
|
export type GetCustomerRequest = {
|
|
@@ -124,7 +124,7 @@ export type ListCustomerChargesRequest = ListCustomerChargesQuery & {
|
|
|
124
124
|
export type ListCustomerChargesResponse = ChargePagePaginatedResponse;
|
|
125
125
|
export type CreateCustomerChargesRequest = {
|
|
126
126
|
customerId: string;
|
|
127
|
-
body:
|
|
127
|
+
body: CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest;
|
|
128
128
|
};
|
|
129
129
|
export type CreateCustomerChargesResponse = z.output<typeof schemas.createCustomerChargesResponse>;
|
|
130
130
|
//# sourceMappingURL=customers.d.ts.map
|