@openmeter/client 1.0.0-beta-4ff598068815 → 1.0.0-beta-c131a666edc0
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/apps.d.ts +10 -1
- package/dist/funcs/apps.js +40 -0
- package/dist/index.d.ts +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/apps.d.ts +6 -1
- package/dist/models/schemas.d.ts +306 -0
- package/dist/models/schemas.js +32 -0
- package/dist/models/types.d.ts +10 -0
- package/dist/sdk/internal.d.ts +16 -0
- package/dist/sdk/internal.js +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ TypeSpec definitions and ships fully-typed request and response models.
|
|
|
42
42
|
- [Notifications](#notifications)
|
|
43
43
|
- [Internal Operations](#internal-operations)
|
|
44
44
|
- [Internal Subscriptions](#internal-subscriptions)
|
|
45
|
+
- [Internal Apps](#internal-apps)
|
|
45
46
|
- [Runtime Validation (validate option)](#runtime-validation-validate-option)
|
|
46
47
|
- [Zod Schemas (./zod export)](#zod-schemas-zod-export)
|
|
47
48
|
- [Error Handling](#error-handling)
|
|
@@ -502,6 +503,12 @@ they can change or be removed without notice or semver consideration.
|
|
|
502
503
|
| `client.internal.subscriptions.createAddon` | `POST /openmeter/subscriptions/{subscriptionId}/addons` | Add add-on to a subscription. |
|
|
503
504
|
| `client.internal.subscriptions.updateAddon` | `PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Update a subscription add-on. Only the quantity is mutable; the timing controls when the new quantity takes effect. A new entry is appended to the add-on's timeline. |
|
|
504
505
|
|
|
506
|
+
### Internal Apps
|
|
507
|
+
|
|
508
|
+
| Method | HTTP | Description |
|
|
509
|
+
| ------------------------------------ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
510
|
+
| `client.internal.apps.executeAction` | `POST /openmeter/apps/{appId}/action` | Execute an operator action on an installed app. The action must be listed in the app's `actions`; otherwise the request is rejected. |
|
|
511
|
+
|
|
505
512
|
## Runtime Validation (validate option)
|
|
506
513
|
|
|
507
514
|
`validate` is off by default. The SDK's normal request/response mapping
|
package/dist/funcs/apps.d.ts
CHANGED
|
@@ -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 { ListAppsRequest, ListAppsResponse, GetAppRequest, GetAppResponse, UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
3
|
+
import type { ListAppsRequest, ListAppsResponse, GetAppRequest, GetAppResponse, UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ExecuteAppActionRequest, ExecuteAppActionResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
4
4
|
/**
|
|
5
5
|
* List apps
|
|
6
6
|
*
|
|
@@ -33,6 +33,15 @@ export declare function uninstallApp(client: Client, req: UninstallAppRequest, o
|
|
|
33
33
|
* PUT /openmeter/apps/{appId}
|
|
34
34
|
*/
|
|
35
35
|
export declare function updateApp(client: Client, req: UpdateAppRequest, options?: RequestOptions): Promise<Result<UpdateAppResponse>>;
|
|
36
|
+
/**
|
|
37
|
+
* Execute app action
|
|
38
|
+
*
|
|
39
|
+
* Execute an operator action on an installed app. The action must be listed in the
|
|
40
|
+
* app's `actions`; otherwise the request is rejected.
|
|
41
|
+
*
|
|
42
|
+
* POST /openmeter/apps/{appId}/action
|
|
43
|
+
*/
|
|
44
|
+
export declare function executeAppAction(client: Client, req: ExecuteAppActionRequest, options?: RequestOptions): Promise<Result<ExecuteAppActionResponse>>;
|
|
36
45
|
/**
|
|
37
46
|
* List app catalog
|
|
38
47
|
*
|
package/dist/funcs/apps.js
CHANGED
|
@@ -137,6 +137,46 @@ export function updateApp(client, req, options) {
|
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Execute app action
|
|
142
|
+
*
|
|
143
|
+
* Execute an operator action on an installed app. The action must be listed in the
|
|
144
|
+
* app's `actions`; otherwise the request is rejected.
|
|
145
|
+
*
|
|
146
|
+
* POST /openmeter/apps/{appId}/action
|
|
147
|
+
*/
|
|
148
|
+
export function executeAppAction(client, req, options) {
|
|
149
|
+
return request(() => {
|
|
150
|
+
const pathParamsInput = {
|
|
151
|
+
appId: req.appId,
|
|
152
|
+
};
|
|
153
|
+
const pathParams = client._options.validate
|
|
154
|
+
? toPathWire(pathParamsInput, schemas.executeAppActionPathParams)
|
|
155
|
+
: pathParamsInput;
|
|
156
|
+
if (client._options.validate) {
|
|
157
|
+
assertValid(schemas.executeAppActionPathParamsWire, pathParams);
|
|
158
|
+
}
|
|
159
|
+
const path = `openmeter/apps/${(() => {
|
|
160
|
+
if (pathParams.appId === undefined) {
|
|
161
|
+
throw new Error('missing path parameter: appId');
|
|
162
|
+
}
|
|
163
|
+
return encodeURIComponent(String(pathParams.appId));
|
|
164
|
+
})()}/action`;
|
|
165
|
+
const body = toWire(req.body, schemas.executeAppActionBody);
|
|
166
|
+
if (client._options.validate) {
|
|
167
|
+
assertValid(schemas.executeAppActionBodyWire, body);
|
|
168
|
+
}
|
|
169
|
+
return http(client)
|
|
170
|
+
.post(path, { ...options, json: body })
|
|
171
|
+
.json()
|
|
172
|
+
.then((data) => {
|
|
173
|
+
if (client._options.validate) {
|
|
174
|
+
assertValid(schemas.executeAppActionResponseWire, data);
|
|
175
|
+
}
|
|
176
|
+
return fromWire(data, schemas.executeAppActionResponse);
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
}
|
|
140
180
|
/**
|
|
141
181
|
* List app catalog
|
|
142
182
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -50,4 +50,4 @@ export type * from './models/operations/planAddons.js';
|
|
|
50
50
|
export type * from './models/operations/defaults.js';
|
|
51
51
|
export type * from './models/operations/entitlementAccess.js';
|
|
52
52
|
export type * from './models/operations/notifications.js';
|
|
53
|
-
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, AppAction, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, UpdateBillingNotificationChannelRequest, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementValueResult, EntitlementFeatureValueResult, 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, UpdateBillingNotificationChannelRequestInput, 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';
|
|
53
|
+
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, AppReconcileWebhookEventsActionRequest, 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, AppAction, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, UpdateBillingNotificationChannelRequest, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementValueResult, EntitlementFeatureValueResult, 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, AppActionRequest, 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, UpdateBillingNotificationChannelRequestInput, 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-c131a666edc0";
|
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-c131a666edc0';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { App, AppCatalogItem, AppCatalogItemPagePaginatedResponse, AppPagePaginatedResponse, BillingInstallAppResponse, InstallAppRequest as InstallAppRequestBody, ListAppsParamsFilter, SortQueryInput, UpdateAppRequest as UpdateAppRequestBody } from '../types.js';
|
|
2
|
+
import type { App, AppActionRequest, AppCatalogItem, AppCatalogItemPagePaginatedResponse, AppPagePaginatedResponse, BillingInstallAppResponse, InstallAppRequest as InstallAppRequestBody, ListAppsParamsFilter, SortQueryInput, UpdateAppRequest as UpdateAppRequestBody } from '../types.js';
|
|
3
3
|
export interface ListAppsQuery {
|
|
4
4
|
/** Determines which page of the collection to retrieve. */
|
|
5
5
|
page?: {
|
|
@@ -38,6 +38,11 @@ export type UpdateAppRequest = AcceptDateStrings<{
|
|
|
38
38
|
body: UpdateAppRequestBody;
|
|
39
39
|
}>;
|
|
40
40
|
export type UpdateAppResponse = App;
|
|
41
|
+
export type ExecuteAppActionRequest = AcceptDateStrings<{
|
|
42
|
+
appId: string;
|
|
43
|
+
body: AppActionRequest;
|
|
44
|
+
}>;
|
|
45
|
+
export type ExecuteAppActionResponse = App;
|
|
41
46
|
export interface ListAppCatalogQuery {
|
|
42
47
|
/** Determines which page of the collection to retrieve. */
|
|
43
48
|
page?: {
|
package/dist/models/schemas.d.ts
CHANGED
|
@@ -398,6 +398,9 @@ export declare const appActionType: z.ZodEnum<{
|
|
|
398
398
|
reconcile_webhook_events: "reconcile_webhook_events";
|
|
399
399
|
}>;
|
|
400
400
|
export declare const updateLabels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
401
|
+
export declare const appReconcileWebhookEventsActionRequest: z.ZodObject<{
|
|
402
|
+
actionType: z.ZodLiteral<"reconcile_webhook_events">;
|
|
403
|
+
}, z.core.$strip>;
|
|
401
404
|
export declare const installAppStripeWithApiKey: z.ZodObject<{
|
|
402
405
|
type: z.ZodLiteral<"stripe">;
|
|
403
406
|
name: z.ZodString;
|
|
@@ -1674,6 +1677,9 @@ export declare const updateAppExternalInvoicingRequest: z.ZodObject<{
|
|
|
1674
1677
|
enableDraftSyncHook: z.ZodBoolean;
|
|
1675
1678
|
enableIssuingSyncHook: z.ZodBoolean;
|
|
1676
1679
|
}, z.core.$strip>;
|
|
1680
|
+
export declare const appActionRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1681
|
+
actionType: z.ZodLiteral<"reconcile_webhook_events">;
|
|
1682
|
+
}, z.core.$strip>], "actionType">;
|
|
1677
1683
|
export declare const installAppRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1678
1684
|
type: z.ZodLiteral<"stripe">;
|
|
1679
1685
|
name: z.ZodString;
|
|
@@ -26437,6 +26443,153 @@ export declare const updateAppResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
26437
26443
|
enableDraftSyncHook: z.ZodBoolean;
|
|
26438
26444
|
enableIssuingSyncHook: z.ZodBoolean;
|
|
26439
26445
|
}, z.core.$strip>], "type">;
|
|
26446
|
+
export declare const executeAppActionPathParams: z.ZodObject<{
|
|
26447
|
+
appId: z.ZodString;
|
|
26448
|
+
}, z.core.$strip>;
|
|
26449
|
+
export declare const executeAppActionBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26450
|
+
actionType: z.ZodLiteral<"reconcile_webhook_events">;
|
|
26451
|
+
}, z.core.$strip>], "actionType">;
|
|
26452
|
+
export declare const executeAppActionResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26453
|
+
id: z.ZodString;
|
|
26454
|
+
name: z.ZodString;
|
|
26455
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26456
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
26457
|
+
createdAt: z.ZodDate;
|
|
26458
|
+
updatedAt: z.ZodDate;
|
|
26459
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
26460
|
+
type: z.ZodLiteral<"stripe">;
|
|
26461
|
+
definition: z.ZodObject<{
|
|
26462
|
+
type: z.ZodEnum<{
|
|
26463
|
+
external_invoicing: "external_invoicing";
|
|
26464
|
+
sandbox: "sandbox";
|
|
26465
|
+
stripe: "stripe";
|
|
26466
|
+
}>;
|
|
26467
|
+
name: z.ZodString;
|
|
26468
|
+
description: z.ZodString;
|
|
26469
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
26470
|
+
type: z.ZodEnum<{
|
|
26471
|
+
calculate_tax: "calculate_tax";
|
|
26472
|
+
collect_payments: "collect_payments";
|
|
26473
|
+
invoice_customers: "invoice_customers";
|
|
26474
|
+
report_events: "report_events";
|
|
26475
|
+
report_usage: "report_usage";
|
|
26476
|
+
}>;
|
|
26477
|
+
key: z.ZodString;
|
|
26478
|
+
name: z.ZodString;
|
|
26479
|
+
description: z.ZodString;
|
|
26480
|
+
}, z.core.$strip>>;
|
|
26481
|
+
installMethods: z.ZodArray<z.ZodEnum<{
|
|
26482
|
+
no_credentials_required: "no_credentials_required";
|
|
26483
|
+
with_api_key: "with_api_key";
|
|
26484
|
+
with_oauth2: "with_oauth2";
|
|
26485
|
+
}>>;
|
|
26486
|
+
}, z.core.$strip>;
|
|
26487
|
+
status: z.ZodEnum<{
|
|
26488
|
+
ready: "ready";
|
|
26489
|
+
unauthorized: "unauthorized";
|
|
26490
|
+
}>;
|
|
26491
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26492
|
+
type: z.ZodEnum<{
|
|
26493
|
+
reconcile_webhook_events: "reconcile_webhook_events";
|
|
26494
|
+
}>;
|
|
26495
|
+
description: z.ZodString;
|
|
26496
|
+
}, z.core.$strip>>>;
|
|
26497
|
+
accountId: z.ZodString;
|
|
26498
|
+
livemode: z.ZodBoolean;
|
|
26499
|
+
maskedApiKey: z.ZodString;
|
|
26500
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26501
|
+
id: z.ZodString;
|
|
26502
|
+
name: z.ZodString;
|
|
26503
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26504
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
26505
|
+
createdAt: z.ZodDate;
|
|
26506
|
+
updatedAt: z.ZodDate;
|
|
26507
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
26508
|
+
type: z.ZodLiteral<"sandbox">;
|
|
26509
|
+
definition: z.ZodObject<{
|
|
26510
|
+
type: z.ZodEnum<{
|
|
26511
|
+
external_invoicing: "external_invoicing";
|
|
26512
|
+
sandbox: "sandbox";
|
|
26513
|
+
stripe: "stripe";
|
|
26514
|
+
}>;
|
|
26515
|
+
name: z.ZodString;
|
|
26516
|
+
description: z.ZodString;
|
|
26517
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
26518
|
+
type: z.ZodEnum<{
|
|
26519
|
+
calculate_tax: "calculate_tax";
|
|
26520
|
+
collect_payments: "collect_payments";
|
|
26521
|
+
invoice_customers: "invoice_customers";
|
|
26522
|
+
report_events: "report_events";
|
|
26523
|
+
report_usage: "report_usage";
|
|
26524
|
+
}>;
|
|
26525
|
+
key: z.ZodString;
|
|
26526
|
+
name: z.ZodString;
|
|
26527
|
+
description: z.ZodString;
|
|
26528
|
+
}, z.core.$strip>>;
|
|
26529
|
+
installMethods: z.ZodArray<z.ZodEnum<{
|
|
26530
|
+
no_credentials_required: "no_credentials_required";
|
|
26531
|
+
with_api_key: "with_api_key";
|
|
26532
|
+
with_oauth2: "with_oauth2";
|
|
26533
|
+
}>>;
|
|
26534
|
+
}, z.core.$strip>;
|
|
26535
|
+
status: z.ZodEnum<{
|
|
26536
|
+
ready: "ready";
|
|
26537
|
+
unauthorized: "unauthorized";
|
|
26538
|
+
}>;
|
|
26539
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26540
|
+
type: z.ZodEnum<{
|
|
26541
|
+
reconcile_webhook_events: "reconcile_webhook_events";
|
|
26542
|
+
}>;
|
|
26543
|
+
description: z.ZodString;
|
|
26544
|
+
}, z.core.$strip>>>;
|
|
26545
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26546
|
+
id: z.ZodString;
|
|
26547
|
+
name: z.ZodString;
|
|
26548
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26549
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
26550
|
+
createdAt: z.ZodDate;
|
|
26551
|
+
updatedAt: z.ZodDate;
|
|
26552
|
+
deletedAt: z.ZodOptional<z.ZodDate>;
|
|
26553
|
+
type: z.ZodLiteral<"external_invoicing">;
|
|
26554
|
+
definition: z.ZodObject<{
|
|
26555
|
+
type: z.ZodEnum<{
|
|
26556
|
+
external_invoicing: "external_invoicing";
|
|
26557
|
+
sandbox: "sandbox";
|
|
26558
|
+
stripe: "stripe";
|
|
26559
|
+
}>;
|
|
26560
|
+
name: z.ZodString;
|
|
26561
|
+
description: z.ZodString;
|
|
26562
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
26563
|
+
type: z.ZodEnum<{
|
|
26564
|
+
calculate_tax: "calculate_tax";
|
|
26565
|
+
collect_payments: "collect_payments";
|
|
26566
|
+
invoice_customers: "invoice_customers";
|
|
26567
|
+
report_events: "report_events";
|
|
26568
|
+
report_usage: "report_usage";
|
|
26569
|
+
}>;
|
|
26570
|
+
key: z.ZodString;
|
|
26571
|
+
name: z.ZodString;
|
|
26572
|
+
description: z.ZodString;
|
|
26573
|
+
}, z.core.$strip>>;
|
|
26574
|
+
installMethods: z.ZodArray<z.ZodEnum<{
|
|
26575
|
+
no_credentials_required: "no_credentials_required";
|
|
26576
|
+
with_api_key: "with_api_key";
|
|
26577
|
+
with_oauth2: "with_oauth2";
|
|
26578
|
+
}>>;
|
|
26579
|
+
}, z.core.$strip>;
|
|
26580
|
+
status: z.ZodEnum<{
|
|
26581
|
+
ready: "ready";
|
|
26582
|
+
unauthorized: "unauthorized";
|
|
26583
|
+
}>;
|
|
26584
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26585
|
+
type: z.ZodEnum<{
|
|
26586
|
+
reconcile_webhook_events: "reconcile_webhook_events";
|
|
26587
|
+
}>;
|
|
26588
|
+
description: z.ZodString;
|
|
26589
|
+
}, z.core.$strip>>>;
|
|
26590
|
+
enableDraftSyncHook: z.ZodBoolean;
|
|
26591
|
+
enableIssuingSyncHook: z.ZodBoolean;
|
|
26592
|
+
}, z.core.$strip>], "type">;
|
|
26440
26593
|
export declare const listAppCatalogQueryParams: z.ZodObject<{
|
|
26441
26594
|
page: z.ZodOptional<z.ZodObject<{
|
|
26442
26595
|
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -35271,6 +35424,9 @@ export declare const appActionTypeWire: z.ZodEnum<{
|
|
|
35271
35424
|
reconcile_webhook_events: "reconcile_webhook_events";
|
|
35272
35425
|
}>;
|
|
35273
35426
|
export declare const updateLabelsWire: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
35427
|
+
export declare const appReconcileWebhookEventsActionRequestWire: z.ZodObject<{
|
|
35428
|
+
action_type: z.ZodLiteral<"reconcile_webhook_events">;
|
|
35429
|
+
}, z.core.$strict>;
|
|
35274
35430
|
export declare const installAppStripeWithApiKeyWire: z.ZodObject<{
|
|
35275
35431
|
type: z.ZodLiteral<"stripe">;
|
|
35276
35432
|
name: z.ZodString;
|
|
@@ -36547,6 +36703,9 @@ export declare const updateAppExternalInvoicingRequestWire: z.ZodObject<{
|
|
|
36547
36703
|
enable_draft_sync_hook: z.ZodBoolean;
|
|
36548
36704
|
enable_issuing_sync_hook: z.ZodBoolean;
|
|
36549
36705
|
}, z.core.$strict>;
|
|
36706
|
+
export declare const appActionRequestWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36707
|
+
action_type: z.ZodLiteral<"reconcile_webhook_events">;
|
|
36708
|
+
}, z.core.$strict>], "action_type">;
|
|
36550
36709
|
export declare const installAppRequestWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36551
36710
|
type: z.ZodLiteral<"stripe">;
|
|
36552
36711
|
name: z.ZodString;
|
|
@@ -61277,6 +61436,153 @@ export declare const updateAppResponseWire: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
61277
61436
|
enable_draft_sync_hook: z.ZodBoolean;
|
|
61278
61437
|
enable_issuing_sync_hook: z.ZodBoolean;
|
|
61279
61438
|
}, z.core.$strict>], "type">;
|
|
61439
|
+
export declare const executeAppActionPathParamsWire: z.ZodObject<{
|
|
61440
|
+
appId: z.ZodString;
|
|
61441
|
+
}, z.core.$strip>;
|
|
61442
|
+
export declare const executeAppActionBodyWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61443
|
+
action_type: z.ZodLiteral<"reconcile_webhook_events">;
|
|
61444
|
+
}, z.core.$strict>], "action_type">;
|
|
61445
|
+
export declare const executeAppActionResponseWire: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61446
|
+
id: z.ZodString;
|
|
61447
|
+
name: z.ZodString;
|
|
61448
|
+
description: z.ZodOptional<z.ZodString>;
|
|
61449
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61450
|
+
created_at: z.ZodString;
|
|
61451
|
+
updated_at: z.ZodString;
|
|
61452
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
61453
|
+
type: z.ZodLiteral<"stripe">;
|
|
61454
|
+
definition: z.ZodObject<{
|
|
61455
|
+
type: z.ZodEnum<{
|
|
61456
|
+
external_invoicing: "external_invoicing";
|
|
61457
|
+
sandbox: "sandbox";
|
|
61458
|
+
stripe: "stripe";
|
|
61459
|
+
}>;
|
|
61460
|
+
name: z.ZodString;
|
|
61461
|
+
description: z.ZodString;
|
|
61462
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
61463
|
+
type: z.ZodEnum<{
|
|
61464
|
+
calculate_tax: "calculate_tax";
|
|
61465
|
+
collect_payments: "collect_payments";
|
|
61466
|
+
invoice_customers: "invoice_customers";
|
|
61467
|
+
report_events: "report_events";
|
|
61468
|
+
report_usage: "report_usage";
|
|
61469
|
+
}>;
|
|
61470
|
+
key: z.ZodString;
|
|
61471
|
+
name: z.ZodString;
|
|
61472
|
+
description: z.ZodString;
|
|
61473
|
+
}, z.core.$strict>>;
|
|
61474
|
+
install_methods: z.ZodArray<z.ZodEnum<{
|
|
61475
|
+
no_credentials_required: "no_credentials_required";
|
|
61476
|
+
with_api_key: "with_api_key";
|
|
61477
|
+
with_oauth2: "with_oauth2";
|
|
61478
|
+
}>>;
|
|
61479
|
+
}, z.core.$strict>;
|
|
61480
|
+
status: z.ZodEnum<{
|
|
61481
|
+
ready: "ready";
|
|
61482
|
+
unauthorized: "unauthorized";
|
|
61483
|
+
}>;
|
|
61484
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61485
|
+
type: z.ZodEnum<{
|
|
61486
|
+
reconcile_webhook_events: "reconcile_webhook_events";
|
|
61487
|
+
}>;
|
|
61488
|
+
description: z.ZodString;
|
|
61489
|
+
}, z.core.$strict>>>;
|
|
61490
|
+
account_id: z.ZodString;
|
|
61491
|
+
livemode: z.ZodBoolean;
|
|
61492
|
+
masked_api_key: z.ZodString;
|
|
61493
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61494
|
+
id: z.ZodString;
|
|
61495
|
+
name: z.ZodString;
|
|
61496
|
+
description: z.ZodOptional<z.ZodString>;
|
|
61497
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61498
|
+
created_at: z.ZodString;
|
|
61499
|
+
updated_at: z.ZodString;
|
|
61500
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
61501
|
+
type: z.ZodLiteral<"sandbox">;
|
|
61502
|
+
definition: z.ZodObject<{
|
|
61503
|
+
type: z.ZodEnum<{
|
|
61504
|
+
external_invoicing: "external_invoicing";
|
|
61505
|
+
sandbox: "sandbox";
|
|
61506
|
+
stripe: "stripe";
|
|
61507
|
+
}>;
|
|
61508
|
+
name: z.ZodString;
|
|
61509
|
+
description: z.ZodString;
|
|
61510
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
61511
|
+
type: z.ZodEnum<{
|
|
61512
|
+
calculate_tax: "calculate_tax";
|
|
61513
|
+
collect_payments: "collect_payments";
|
|
61514
|
+
invoice_customers: "invoice_customers";
|
|
61515
|
+
report_events: "report_events";
|
|
61516
|
+
report_usage: "report_usage";
|
|
61517
|
+
}>;
|
|
61518
|
+
key: z.ZodString;
|
|
61519
|
+
name: z.ZodString;
|
|
61520
|
+
description: z.ZodString;
|
|
61521
|
+
}, z.core.$strict>>;
|
|
61522
|
+
install_methods: z.ZodArray<z.ZodEnum<{
|
|
61523
|
+
no_credentials_required: "no_credentials_required";
|
|
61524
|
+
with_api_key: "with_api_key";
|
|
61525
|
+
with_oauth2: "with_oauth2";
|
|
61526
|
+
}>>;
|
|
61527
|
+
}, z.core.$strict>;
|
|
61528
|
+
status: z.ZodEnum<{
|
|
61529
|
+
ready: "ready";
|
|
61530
|
+
unauthorized: "unauthorized";
|
|
61531
|
+
}>;
|
|
61532
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61533
|
+
type: z.ZodEnum<{
|
|
61534
|
+
reconcile_webhook_events: "reconcile_webhook_events";
|
|
61535
|
+
}>;
|
|
61536
|
+
description: z.ZodString;
|
|
61537
|
+
}, z.core.$strict>>>;
|
|
61538
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61539
|
+
id: z.ZodString;
|
|
61540
|
+
name: z.ZodString;
|
|
61541
|
+
description: z.ZodOptional<z.ZodString>;
|
|
61542
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61543
|
+
created_at: z.ZodString;
|
|
61544
|
+
updated_at: z.ZodString;
|
|
61545
|
+
deleted_at: z.ZodOptional<z.ZodString>;
|
|
61546
|
+
type: z.ZodLiteral<"external_invoicing">;
|
|
61547
|
+
definition: z.ZodObject<{
|
|
61548
|
+
type: z.ZodEnum<{
|
|
61549
|
+
external_invoicing: "external_invoicing";
|
|
61550
|
+
sandbox: "sandbox";
|
|
61551
|
+
stripe: "stripe";
|
|
61552
|
+
}>;
|
|
61553
|
+
name: z.ZodString;
|
|
61554
|
+
description: z.ZodString;
|
|
61555
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
61556
|
+
type: z.ZodEnum<{
|
|
61557
|
+
calculate_tax: "calculate_tax";
|
|
61558
|
+
collect_payments: "collect_payments";
|
|
61559
|
+
invoice_customers: "invoice_customers";
|
|
61560
|
+
report_events: "report_events";
|
|
61561
|
+
report_usage: "report_usage";
|
|
61562
|
+
}>;
|
|
61563
|
+
key: z.ZodString;
|
|
61564
|
+
name: z.ZodString;
|
|
61565
|
+
description: z.ZodString;
|
|
61566
|
+
}, z.core.$strict>>;
|
|
61567
|
+
install_methods: z.ZodArray<z.ZodEnum<{
|
|
61568
|
+
no_credentials_required: "no_credentials_required";
|
|
61569
|
+
with_api_key: "with_api_key";
|
|
61570
|
+
with_oauth2: "with_oauth2";
|
|
61571
|
+
}>>;
|
|
61572
|
+
}, z.core.$strict>;
|
|
61573
|
+
status: z.ZodEnum<{
|
|
61574
|
+
ready: "ready";
|
|
61575
|
+
unauthorized: "unauthorized";
|
|
61576
|
+
}>;
|
|
61577
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61578
|
+
type: z.ZodEnum<{
|
|
61579
|
+
reconcile_webhook_events: "reconcile_webhook_events";
|
|
61580
|
+
}>;
|
|
61581
|
+
description: z.ZodString;
|
|
61582
|
+
}, z.core.$strict>>>;
|
|
61583
|
+
enable_draft_sync_hook: z.ZodBoolean;
|
|
61584
|
+
enable_issuing_sync_hook: z.ZodBoolean;
|
|
61585
|
+
}, z.core.$strict>], "type">;
|
|
61280
61586
|
export declare const listAppCatalogQueryParamsWire: z.ZodObject<{
|
|
61281
61587
|
page: z.ZodOptional<z.ZodObject<{
|
|
61282
61588
|
size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
package/dist/models/schemas.js
CHANGED
|
@@ -729,6 +729,13 @@ export const appActionType = z
|
|
|
729
729
|
export const updateLabels = z
|
|
730
730
|
.record(z.string(), z.string())
|
|
731
731
|
.describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
|
|
732
|
+
export const appReconcileWebhookEventsActionRequest = z
|
|
733
|
+
.object({
|
|
734
|
+
actionType: z
|
|
735
|
+
.literal('reconcile_webhook_events')
|
|
736
|
+
.describe('The action to execute.'),
|
|
737
|
+
})
|
|
738
|
+
.describe("Request to reconcile the app's webhook events with the latest supported event set.");
|
|
732
739
|
export const installAppStripeWithApiKey = z
|
|
733
740
|
.object({
|
|
734
741
|
type: z.literal('stripe').describe('Type of the app.'),
|
|
@@ -2545,6 +2552,9 @@ export const updateAppExternalInvoicingRequest = z
|
|
|
2545
2552
|
.describe('Enable issuing synchronization hook. When enabled, invoices will pause at the issuing state and wait for the integration to call the issuing synchronized endpoint before progressing to the issued state. This ensures the external invoicing system has successfully created and finalized the invoice before it is marked as issued. When disabled, invoices automatically progress through the issuing state and are immediately marked as issued.'),
|
|
2546
2553
|
})
|
|
2547
2554
|
.describe('AppExternalInvoicing update request.');
|
|
2555
|
+
export const appActionRequest = z
|
|
2556
|
+
.discriminatedUnion('actionType', [appReconcileWebhookEventsActionRequest])
|
|
2557
|
+
.describe('Request to execute an operator action on an installed app.');
|
|
2548
2558
|
export const installAppRequest = z
|
|
2549
2559
|
.discriminatedUnion('type', [
|
|
2550
2560
|
installAppStripeWithApiKey,
|
|
@@ -6243,6 +6253,11 @@ export const updateAppPathParams = z.object({
|
|
|
6243
6253
|
});
|
|
6244
6254
|
export const updateAppBody = updateAppRequest;
|
|
6245
6255
|
export const updateAppResponse = app;
|
|
6256
|
+
export const executeAppActionPathParams = z.object({
|
|
6257
|
+
appId: ulid,
|
|
6258
|
+
});
|
|
6259
|
+
export const executeAppActionBody = appActionRequest;
|
|
6260
|
+
export const executeAppActionResponse = app;
|
|
6246
6261
|
export const listAppCatalogQueryParams = z.object({
|
|
6247
6262
|
page: z
|
|
6248
6263
|
.object({
|
|
@@ -7433,6 +7448,13 @@ export const appActionTypeWire = z
|
|
|
7433
7448
|
export const updateLabelsWire = z
|
|
7434
7449
|
.record(z.string(), z.string())
|
|
7435
7450
|
.describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
|
|
7451
|
+
export const appReconcileWebhookEventsActionRequestWire = z
|
|
7452
|
+
.strictObject({
|
|
7453
|
+
action_type: z
|
|
7454
|
+
.literal('reconcile_webhook_events')
|
|
7455
|
+
.describe('The action to execute.'),
|
|
7456
|
+
})
|
|
7457
|
+
.describe("Request to reconcile the app's webhook events with the latest supported event set.");
|
|
7436
7458
|
export const installAppStripeWithApiKeyWire = z
|
|
7437
7459
|
.strictObject({
|
|
7438
7460
|
type: z.literal('stripe').describe('Type of the app.'),
|
|
@@ -9230,6 +9252,11 @@ export const updateAppExternalInvoicingRequestWire = z
|
|
|
9230
9252
|
.describe('Enable issuing synchronization hook. When enabled, invoices will pause at the issuing state and wait for the integration to call the issuing synchronized endpoint before progressing to the issued state. This ensures the external invoicing system has successfully created and finalized the invoice before it is marked as issued. When disabled, invoices automatically progress through the issuing state and are immediately marked as issued.'),
|
|
9231
9253
|
})
|
|
9232
9254
|
.describe('AppExternalInvoicing update request.');
|
|
9255
|
+
export const appActionRequestWire = z
|
|
9256
|
+
.discriminatedUnion('action_type', [
|
|
9257
|
+
appReconcileWebhookEventsActionRequestWire,
|
|
9258
|
+
])
|
|
9259
|
+
.describe('Request to execute an operator action on an installed app.');
|
|
9233
9260
|
export const installAppRequestWire = z
|
|
9234
9261
|
.discriminatedUnion('type', [
|
|
9235
9262
|
installAppStripeWithApiKeyWire,
|
|
@@ -12943,6 +12970,11 @@ export const updateAppPathParamsWire = z.object({
|
|
|
12943
12970
|
});
|
|
12944
12971
|
export const updateAppBodyWire = updateAppRequestWire;
|
|
12945
12972
|
export const updateAppResponseWire = appWire;
|
|
12973
|
+
export const executeAppActionPathParamsWire = z.object({
|
|
12974
|
+
appId: ulidWire,
|
|
12975
|
+
});
|
|
12976
|
+
export const executeAppActionBodyWire = appActionRequestWire;
|
|
12977
|
+
export const executeAppActionResponseWire = appWire;
|
|
12946
12978
|
export const listAppCatalogQueryParamsWire = z.object({
|
|
12947
12979
|
page: z
|
|
12948
12980
|
.strictObject({
|
package/dist/models/types.d.ts
CHANGED
|
@@ -283,6 +283,14 @@ export interface SubscriptionEditUnscheduleEdit {
|
|
|
283
283
|
* "mesh", "kic", or "\_".
|
|
284
284
|
*/
|
|
285
285
|
export type UpdateLabels = Record<string, string>;
|
|
286
|
+
/**
|
|
287
|
+
* Request to reconcile the app's webhook events with the latest supported event
|
|
288
|
+
* set.
|
|
289
|
+
*/
|
|
290
|
+
export interface AppReconcileWebhookEventsActionRequest {
|
|
291
|
+
/** The action to execute. */
|
|
292
|
+
actionType: 'reconcile_webhook_events';
|
|
293
|
+
}
|
|
286
294
|
/** Model for installing an app from the catalog with an API key. */
|
|
287
295
|
export interface InstallAppStripeWithApiKey {
|
|
288
296
|
/** Type of the app. */
|
|
@@ -7095,6 +7103,8 @@ export type SubscriptionCreateTiming = 'immediate' | Date;
|
|
|
7095
7103
|
* returned.
|
|
7096
7104
|
*/
|
|
7097
7105
|
export type SubscriptionEditTiming = 'immediate' | 'next_billing_cycle' | Date;
|
|
7106
|
+
/** Request to execute an operator action on an installed app. */
|
|
7107
|
+
export type AppActionRequest = AppReconcileWebhookEventsActionRequest;
|
|
7098
7108
|
/** Request to install an app from the catalog. */
|
|
7099
7109
|
export type InstallAppRequest = InstallAppStripeWithApiKey | InstallAppSandbox | InstallAppExternalInvoicing;
|
|
7100
7110
|
/** Payment settings for a billing workflow. */
|
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
3
|
import type { CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
4
|
+
import type { ExecuteAppActionRequest, ExecuteAppActionResponse } from '../models/operations/apps.js';
|
|
4
5
|
/**
|
|
5
6
|
* Operations marked internal in the API definition. They are not part of
|
|
6
7
|
* the customer surface: they may require additional permissions, and they
|
|
@@ -11,6 +12,8 @@ export declare class Internal {
|
|
|
11
12
|
constructor(_client: Client);
|
|
12
13
|
private _subscriptions?;
|
|
13
14
|
get subscriptions(): InternalSubscriptions;
|
|
15
|
+
private _apps?;
|
|
16
|
+
get apps(): InternalApps;
|
|
14
17
|
}
|
|
15
18
|
export declare class InternalSubscriptions {
|
|
16
19
|
private readonly _client;
|
|
@@ -34,3 +37,16 @@ export declare class InternalSubscriptions {
|
|
|
34
37
|
*/
|
|
35
38
|
updateAddon(request: UpdateSubscriptionAddonRequest, options?: RequestOptions): Promise<UpdateSubscriptionAddonResponse>;
|
|
36
39
|
}
|
|
40
|
+
export declare class InternalApps {
|
|
41
|
+
private readonly _client;
|
|
42
|
+
constructor(_client: Client);
|
|
43
|
+
/**
|
|
44
|
+
* Execute app action
|
|
45
|
+
*
|
|
46
|
+
* Execute an operator action on an installed app. The action must be listed in the
|
|
47
|
+
* app's `actions`; otherwise the request is rejected.
|
|
48
|
+
*
|
|
49
|
+
* POST /openmeter/apps/{appId}/action
|
|
50
|
+
*/
|
|
51
|
+
executeAction(request: ExecuteAppActionRequest, options?: RequestOptions): Promise<ExecuteAppActionResponse>;
|
|
52
|
+
}
|
package/dist/sdk/internal.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
2
|
import { unwrap } from '../lib/types.js';
|
|
3
3
|
import { createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
|
|
4
|
+
import { executeAppAction } from '../funcs/apps.js';
|
|
4
5
|
/**
|
|
5
6
|
* Operations marked internal in the API definition. They are not part of
|
|
6
7
|
* the customer surface: they may require additional permissions, and they
|
|
@@ -15,6 +16,10 @@ export class Internal {
|
|
|
15
16
|
get subscriptions() {
|
|
16
17
|
return (this._subscriptions ??= new InternalSubscriptions(this._client));
|
|
17
18
|
}
|
|
19
|
+
_apps;
|
|
20
|
+
get apps() {
|
|
21
|
+
return (this._apps ??= new InternalApps(this._client));
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
export class InternalSubscriptions {
|
|
20
25
|
_client;
|
|
@@ -44,3 +49,20 @@ export class InternalSubscriptions {
|
|
|
44
49
|
return unwrap(await updateSubscriptionAddon(this._client, request, options));
|
|
45
50
|
}
|
|
46
51
|
}
|
|
52
|
+
export class InternalApps {
|
|
53
|
+
_client;
|
|
54
|
+
constructor(_client) {
|
|
55
|
+
this._client = _client;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Execute app action
|
|
59
|
+
*
|
|
60
|
+
* Execute an operator action on an installed app. The action must be listed in the
|
|
61
|
+
* app's `actions`; otherwise the request is rejected.
|
|
62
|
+
*
|
|
63
|
+
* POST /openmeter/apps/{appId}/action
|
|
64
|
+
*/
|
|
65
|
+
async executeAction(request, options) {
|
|
66
|
+
return unwrap(await executeAppAction(this._client, request, options));
|
|
67
|
+
}
|
|
68
|
+
}
|