@commet/node 5.0.0 → 5.1.0
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 +3 -3
- package/dist/index.d.mts +20 -4
- package/dist/index.d.ts +20 -4
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ await commet.subscriptions.create({
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// Track usage events
|
|
62
|
-
await commet.usage.
|
|
62
|
+
await commet.usage.track({
|
|
63
63
|
feature: 'api_call',
|
|
64
64
|
value: 1,
|
|
65
65
|
customerId: 'cus_123'
|
|
@@ -68,12 +68,12 @@ await commet.usage.create({
|
|
|
68
68
|
// Manage seats
|
|
69
69
|
await commet.seats.add({
|
|
70
70
|
customerId: 'cus_123',
|
|
71
|
-
|
|
71
|
+
featureCode: 'admin',
|
|
72
72
|
count: 5
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
// Check feature access
|
|
76
|
-
const feature = await commet.features.
|
|
76
|
+
const feature = await commet.features.get({
|
|
77
77
|
externalId: 'user_123',
|
|
78
78
|
code: 'api_calls'
|
|
79
79
|
});
|
package/dist/index.d.mts
CHANGED
|
@@ -1519,6 +1519,8 @@ interface WebhookPayload {
|
|
|
1519
1519
|
event: WebhookEvent;
|
|
1520
1520
|
timestamp: string;
|
|
1521
1521
|
organizationId: string;
|
|
1522
|
+
mode: "live" | "sandbox";
|
|
1523
|
+
apiVersion: string;
|
|
1522
1524
|
data: WebhookData;
|
|
1523
1525
|
}
|
|
1524
1526
|
/**
|
|
@@ -1530,7 +1532,6 @@ interface WebhookPayload {
|
|
|
1530
1532
|
* granting access.
|
|
1531
1533
|
*/
|
|
1532
1534
|
interface WebhookData {
|
|
1533
|
-
id?: string;
|
|
1534
1535
|
publicId?: string;
|
|
1535
1536
|
subscriptionId?: string;
|
|
1536
1537
|
customerId?: string;
|
|
@@ -1559,12 +1560,13 @@ interface VerifyAndParseParams {
|
|
|
1559
1560
|
}
|
|
1560
1561
|
interface WebhookEndpoint {
|
|
1561
1562
|
id: string;
|
|
1562
|
-
object: "
|
|
1563
|
+
object: "webhook";
|
|
1563
1564
|
livemode: boolean;
|
|
1564
1565
|
url: string;
|
|
1565
1566
|
events: string[];
|
|
1566
1567
|
description: string | null;
|
|
1567
1568
|
isActive: boolean;
|
|
1569
|
+
apiVersion: string | null;
|
|
1568
1570
|
createdAt: string;
|
|
1569
1571
|
}
|
|
1570
1572
|
interface WebhookEndpointCreated extends WebhookEndpoint {
|
|
@@ -1572,6 +1574,7 @@ interface WebhookEndpointCreated extends WebhookEndpoint {
|
|
|
1572
1574
|
}
|
|
1573
1575
|
interface WebhookTestResult {
|
|
1574
1576
|
success: boolean;
|
|
1577
|
+
deliveryId: string;
|
|
1575
1578
|
deliveredAt: string;
|
|
1576
1579
|
}
|
|
1577
1580
|
interface ListWebhooksParams {
|
|
@@ -1582,6 +1585,18 @@ interface CreateWebhookParams {
|
|
|
1582
1585
|
url: string;
|
|
1583
1586
|
events: string[];
|
|
1584
1587
|
description?: string;
|
|
1588
|
+
apiVersion?: string;
|
|
1589
|
+
}
|
|
1590
|
+
interface GetWebhookParams {
|
|
1591
|
+
id: string;
|
|
1592
|
+
}
|
|
1593
|
+
interface UpdateWebhookParams {
|
|
1594
|
+
id: string;
|
|
1595
|
+
url?: string;
|
|
1596
|
+
events?: string[];
|
|
1597
|
+
description?: string | null;
|
|
1598
|
+
isActive?: boolean;
|
|
1599
|
+
apiVersion?: string;
|
|
1585
1600
|
}
|
|
1586
1601
|
interface DeleteWebhookParams {
|
|
1587
1602
|
id: string;
|
|
@@ -1598,8 +1613,9 @@ declare class Webhooks {
|
|
|
1598
1613
|
/** Verifies signature and parses JSON in one step. Returns null if invalid. */
|
|
1599
1614
|
verifyAndParse(params: VerifyAndParseParams): WebhookPayload | null;
|
|
1600
1615
|
list(params?: ListWebhooksParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpoint[]>>;
|
|
1601
|
-
/** Response includes `secretKey` which is only returned once. */
|
|
1602
1616
|
create(params: CreateWebhookParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpointCreated>>;
|
|
1617
|
+
get(params: GetWebhookParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpoint>>;
|
|
1618
|
+
update(params: UpdateWebhookParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpoint>>;
|
|
1603
1619
|
delete(params: DeleteWebhookParams, options?: RequestOptions): Promise<ApiResponse<{
|
|
1604
1620
|
id: string;
|
|
1605
1621
|
deleted: true;
|
|
@@ -1633,4 +1649,4 @@ declare function registerIntegration(name: string, version: string): void;
|
|
|
1633
1649
|
declare const API_VERSION = "2026-05-25";
|
|
1634
1650
|
declare const SDK_VERSION: string;
|
|
1635
1651
|
|
|
1636
|
-
export { API_VERSION, type ActivateAddonParams, type ActivateAddonResult, type ActiveAddon, type ActiveSubscription, type AddAiModelPricingFeatureParams, type AddFixedPricingFeatureParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddSeatsParams, type Addon, type AdjustBalanceParams, type AdjustBalanceResult, type AiModelPricingFeatureManage, type ApiErrorDetail, type ApiKey, type ApiKeyCreated, type ApiResponse, type BalanceAddon, type BillingConfig, type BillingInterval, type BooleanAddon, type CanUseFeatureParams, type CanUseResult, type CancelParams, type CancellationSummary, type ChangePlanParams, type ChangePlanResult, type CheckUsageParams, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CreateAddonParams, type CreateAdjustmentParams, type CreateAdjustmentResult, type CreateApiKeyParams, type CreateBalanceAddonParams, type CreateBooleanAddonParams, type CreateCreditPackParams, type CreateCreditsAddonParams, type CreateParams as CreateCustomerParams, type CreateFeatureParams, type CreateMeteredAddonParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateWebhookParams, type CreatedSubscription, type CreditPack, type CreditPackDetail, type CreditsAddon, type Currency, type Customer, type CustomerAddress, type CustomerID, type BatchResult as CustomersBatchResult, type DeactivateAddonParams, type DeactivateAddonResult, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteResult, type DeleteWebhookParams, type DiscountSummary, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureSummary, type FeatureType, type FixedPricingFeatureManage, type GetActiveParams, type GetAddonParams, type GetAllBalancesParams, type GetBalanceParams, type GetCustomerParams, type GetDownloadUrlParams, type GetFeatureParams, type GetInvoiceParams, type GetPlanGroupParams, type GetPromoCodeParams, type GetTransactionParams, type GetUrlParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type InvoiceDetail, type InvoiceDownloadResult, type InvoiceLineItem, type InvoiceListItem, type InvoiceSendResult, type InvoiceStatusResult, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeaturesParams, type ListInvoicesParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type MeteredAddon, type PaginatedList, type PaginatedResponse, type Plan, type PlanDef, type PlanDetail, type PlanFeature, type PlanFeatureManage, type PlanFeatureValue, type PlanGroup, type PlanGroupDetail, type PlanID, type PlanManage, type PlanPrice, type PlanPriceManage, type PortalAccess, type PreviewChangeParams, type PreviewChangeResult, type PriceDef, type PromoCode, type PromoCodeDetail, type PurchaseCreditsParams, type PurchaseCreditsResult, type RefundTransactionParams, type RegionalPriceResult, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveResult, type RemoveSeatsParams, type ReorderPlansParams, type RequestOptions, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatEvent, type SendInvoiceParams, type SetAllSeatsParams, type SetDefaultPriceParams, type SetRegionalPricesParams, type SetSeatsParams, type SetVisibilityParams, type Subscription, type SubscriptionListItem, type SubscriptionStatus, type TestWebhookParams, type TopupBalanceParams, type TopupBalanceResult, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type TransactionDetail, type TransactionListItem, type TransactionRefundResult, type TransactionRetryResult, type UncancelParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateParams as UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookPayload, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
|
1652
|
+
export { API_VERSION, type ActivateAddonParams, type ActivateAddonResult, type ActiveAddon, type ActiveSubscription, type AddAiModelPricingFeatureParams, type AddFixedPricingFeatureParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddSeatsParams, type Addon, type AdjustBalanceParams, type AdjustBalanceResult, type AiModelPricingFeatureManage, type ApiErrorDetail, type ApiKey, type ApiKeyCreated, type ApiResponse, type BalanceAddon, type BillingConfig, type BillingInterval, type BooleanAddon, type CanUseFeatureParams, type CanUseResult, type CancelParams, type CancellationSummary, type ChangePlanParams, type ChangePlanResult, type CheckUsageParams, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CreateAddonParams, type CreateAdjustmentParams, type CreateAdjustmentResult, type CreateApiKeyParams, type CreateBalanceAddonParams, type CreateBooleanAddonParams, type CreateCreditPackParams, type CreateCreditsAddonParams, type CreateParams as CreateCustomerParams, type CreateFeatureParams, type CreateMeteredAddonParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateWebhookParams, type CreatedSubscription, type CreditPack, type CreditPackDetail, type CreditsAddon, type Currency, type Customer, type CustomerAddress, type CustomerID, type BatchResult as CustomersBatchResult, type DeactivateAddonParams, type DeactivateAddonResult, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteResult, type DeleteWebhookParams, type DiscountSummary, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureSummary, type FeatureType, type FixedPricingFeatureManage, type GetActiveParams, type GetAddonParams, type GetAllBalancesParams, type GetBalanceParams, type GetCustomerParams, type GetDownloadUrlParams, type GetFeatureParams, type GetInvoiceParams, type GetPlanGroupParams, type GetPromoCodeParams, type GetTransactionParams, type GetUrlParams, type GetWebhookParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type InvoiceDetail, type InvoiceDownloadResult, type InvoiceLineItem, type InvoiceListItem, type InvoiceSendResult, type InvoiceStatusResult, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeaturesParams, type ListInvoicesParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type MeteredAddon, type PaginatedList, type PaginatedResponse, type Plan, type PlanDef, type PlanDetail, type PlanFeature, type PlanFeatureManage, type PlanFeatureValue, type PlanGroup, type PlanGroupDetail, type PlanID, type PlanManage, type PlanPrice, type PlanPriceManage, type PortalAccess, type PreviewChangeParams, type PreviewChangeResult, type PriceDef, type PromoCode, type PromoCodeDetail, type PurchaseCreditsParams, type PurchaseCreditsResult, type RefundTransactionParams, type RegionalPriceResult, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveResult, type RemoveSeatsParams, type ReorderPlansParams, type RequestOptions, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatEvent, type SendInvoiceParams, type SetAllSeatsParams, type SetDefaultPriceParams, type SetRegionalPricesParams, type SetSeatsParams, type SetVisibilityParams, type Subscription, type SubscriptionListItem, type SubscriptionStatus, type TestWebhookParams, type TopupBalanceParams, type TopupBalanceResult, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type TransactionDetail, type TransactionListItem, type TransactionRefundResult, type TransactionRetryResult, type UncancelParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateParams as UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateWebhookParams, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookPayload, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
package/dist/index.d.ts
CHANGED
|
@@ -1519,6 +1519,8 @@ interface WebhookPayload {
|
|
|
1519
1519
|
event: WebhookEvent;
|
|
1520
1520
|
timestamp: string;
|
|
1521
1521
|
organizationId: string;
|
|
1522
|
+
mode: "live" | "sandbox";
|
|
1523
|
+
apiVersion: string;
|
|
1522
1524
|
data: WebhookData;
|
|
1523
1525
|
}
|
|
1524
1526
|
/**
|
|
@@ -1530,7 +1532,6 @@ interface WebhookPayload {
|
|
|
1530
1532
|
* granting access.
|
|
1531
1533
|
*/
|
|
1532
1534
|
interface WebhookData {
|
|
1533
|
-
id?: string;
|
|
1534
1535
|
publicId?: string;
|
|
1535
1536
|
subscriptionId?: string;
|
|
1536
1537
|
customerId?: string;
|
|
@@ -1559,12 +1560,13 @@ interface VerifyAndParseParams {
|
|
|
1559
1560
|
}
|
|
1560
1561
|
interface WebhookEndpoint {
|
|
1561
1562
|
id: string;
|
|
1562
|
-
object: "
|
|
1563
|
+
object: "webhook";
|
|
1563
1564
|
livemode: boolean;
|
|
1564
1565
|
url: string;
|
|
1565
1566
|
events: string[];
|
|
1566
1567
|
description: string | null;
|
|
1567
1568
|
isActive: boolean;
|
|
1569
|
+
apiVersion: string | null;
|
|
1568
1570
|
createdAt: string;
|
|
1569
1571
|
}
|
|
1570
1572
|
interface WebhookEndpointCreated extends WebhookEndpoint {
|
|
@@ -1572,6 +1574,7 @@ interface WebhookEndpointCreated extends WebhookEndpoint {
|
|
|
1572
1574
|
}
|
|
1573
1575
|
interface WebhookTestResult {
|
|
1574
1576
|
success: boolean;
|
|
1577
|
+
deliveryId: string;
|
|
1575
1578
|
deliveredAt: string;
|
|
1576
1579
|
}
|
|
1577
1580
|
interface ListWebhooksParams {
|
|
@@ -1582,6 +1585,18 @@ interface CreateWebhookParams {
|
|
|
1582
1585
|
url: string;
|
|
1583
1586
|
events: string[];
|
|
1584
1587
|
description?: string;
|
|
1588
|
+
apiVersion?: string;
|
|
1589
|
+
}
|
|
1590
|
+
interface GetWebhookParams {
|
|
1591
|
+
id: string;
|
|
1592
|
+
}
|
|
1593
|
+
interface UpdateWebhookParams {
|
|
1594
|
+
id: string;
|
|
1595
|
+
url?: string;
|
|
1596
|
+
events?: string[];
|
|
1597
|
+
description?: string | null;
|
|
1598
|
+
isActive?: boolean;
|
|
1599
|
+
apiVersion?: string;
|
|
1585
1600
|
}
|
|
1586
1601
|
interface DeleteWebhookParams {
|
|
1587
1602
|
id: string;
|
|
@@ -1598,8 +1613,9 @@ declare class Webhooks {
|
|
|
1598
1613
|
/** Verifies signature and parses JSON in one step. Returns null if invalid. */
|
|
1599
1614
|
verifyAndParse(params: VerifyAndParseParams): WebhookPayload | null;
|
|
1600
1615
|
list(params?: ListWebhooksParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpoint[]>>;
|
|
1601
|
-
/** Response includes `secretKey` which is only returned once. */
|
|
1602
1616
|
create(params: CreateWebhookParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpointCreated>>;
|
|
1617
|
+
get(params: GetWebhookParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpoint>>;
|
|
1618
|
+
update(params: UpdateWebhookParams, options?: RequestOptions): Promise<ApiResponse<WebhookEndpoint>>;
|
|
1603
1619
|
delete(params: DeleteWebhookParams, options?: RequestOptions): Promise<ApiResponse<{
|
|
1604
1620
|
id: string;
|
|
1605
1621
|
deleted: true;
|
|
@@ -1633,4 +1649,4 @@ declare function registerIntegration(name: string, version: string): void;
|
|
|
1633
1649
|
declare const API_VERSION = "2026-05-25";
|
|
1634
1650
|
declare const SDK_VERSION: string;
|
|
1635
1651
|
|
|
1636
|
-
export { API_VERSION, type ActivateAddonParams, type ActivateAddonResult, type ActiveAddon, type ActiveSubscription, type AddAiModelPricingFeatureParams, type AddFixedPricingFeatureParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddSeatsParams, type Addon, type AdjustBalanceParams, type AdjustBalanceResult, type AiModelPricingFeatureManage, type ApiErrorDetail, type ApiKey, type ApiKeyCreated, type ApiResponse, type BalanceAddon, type BillingConfig, type BillingInterval, type BooleanAddon, type CanUseFeatureParams, type CanUseResult, type CancelParams, type CancellationSummary, type ChangePlanParams, type ChangePlanResult, type CheckUsageParams, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CreateAddonParams, type CreateAdjustmentParams, type CreateAdjustmentResult, type CreateApiKeyParams, type CreateBalanceAddonParams, type CreateBooleanAddonParams, type CreateCreditPackParams, type CreateCreditsAddonParams, type CreateParams as CreateCustomerParams, type CreateFeatureParams, type CreateMeteredAddonParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateWebhookParams, type CreatedSubscription, type CreditPack, type CreditPackDetail, type CreditsAddon, type Currency, type Customer, type CustomerAddress, type CustomerID, type BatchResult as CustomersBatchResult, type DeactivateAddonParams, type DeactivateAddonResult, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteResult, type DeleteWebhookParams, type DiscountSummary, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureSummary, type FeatureType, type FixedPricingFeatureManage, type GetActiveParams, type GetAddonParams, type GetAllBalancesParams, type GetBalanceParams, type GetCustomerParams, type GetDownloadUrlParams, type GetFeatureParams, type GetInvoiceParams, type GetPlanGroupParams, type GetPromoCodeParams, type GetTransactionParams, type GetUrlParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type InvoiceDetail, type InvoiceDownloadResult, type InvoiceLineItem, type InvoiceListItem, type InvoiceSendResult, type InvoiceStatusResult, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeaturesParams, type ListInvoicesParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type MeteredAddon, type PaginatedList, type PaginatedResponse, type Plan, type PlanDef, type PlanDetail, type PlanFeature, type PlanFeatureManage, type PlanFeatureValue, type PlanGroup, type PlanGroupDetail, type PlanID, type PlanManage, type PlanPrice, type PlanPriceManage, type PortalAccess, type PreviewChangeParams, type PreviewChangeResult, type PriceDef, type PromoCode, type PromoCodeDetail, type PurchaseCreditsParams, type PurchaseCreditsResult, type RefundTransactionParams, type RegionalPriceResult, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveResult, type RemoveSeatsParams, type ReorderPlansParams, type RequestOptions, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatEvent, type SendInvoiceParams, type SetAllSeatsParams, type SetDefaultPriceParams, type SetRegionalPricesParams, type SetSeatsParams, type SetVisibilityParams, type Subscription, type SubscriptionListItem, type SubscriptionStatus, type TestWebhookParams, type TopupBalanceParams, type TopupBalanceResult, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type TransactionDetail, type TransactionListItem, type TransactionRefundResult, type TransactionRetryResult, type UncancelParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateParams as UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookPayload, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
|
1652
|
+
export { API_VERSION, type ActivateAddonParams, type ActivateAddonResult, type ActiveAddon, type ActiveSubscription, type AddAiModelPricingFeatureParams, type AddFixedPricingFeatureParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddSeatsParams, type Addon, type AdjustBalanceParams, type AdjustBalanceResult, type AiModelPricingFeatureManage, type ApiErrorDetail, type ApiKey, type ApiKeyCreated, type ApiResponse, type BalanceAddon, type BillingConfig, type BillingInterval, type BooleanAddon, type CanUseFeatureParams, type CanUseResult, type CancelParams, type CancellationSummary, type ChangePlanParams, type ChangePlanResult, type CheckUsageParams, Commet, CommetAPIError, type CommetClientOptions, CommetError, CommetValidationError, type CreateAddonParams, type CreateAdjustmentParams, type CreateAdjustmentResult, type CreateApiKeyParams, type CreateBalanceAddonParams, type CreateBooleanAddonParams, type CreateCreditPackParams, type CreateCreditsAddonParams, type CreateParams as CreateCustomerParams, type CreateFeatureParams, type CreateMeteredAddonParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateWebhookParams, type CreatedSubscription, type CreditPack, type CreditPackDetail, type CreditsAddon, type Currency, type Customer, type CustomerAddress, type CustomerID, type BatchResult as CustomersBatchResult, type DeactivateAddonParams, type DeactivateAddonResult, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteResult, type DeleteWebhookParams, type DiscountSummary, type EventID, type Feature, type FeatureAccess, type FeatureDef, type FeatureSummary, type FeatureType, type FixedPricingFeatureManage, type GetActiveParams, type GetAddonParams, type GetAllBalancesParams, type GetBalanceParams, type GetCustomerParams, type GetDownloadUrlParams, type GetFeatureParams, type GetInvoiceParams, type GetPlanGroupParams, type GetPromoCodeParams, type GetTransactionParams, type GetUrlParams, type GetWebhookParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type InvoiceDetail, type InvoiceDownloadResult, type InvoiceLineItem, type InvoiceListItem, type InvoiceSendResult, type InvoiceStatusResult, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomersParams, type ListFeaturesParams, type ListInvoicesParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhooksParams, type MeteredAddon, type PaginatedList, type PaginatedResponse, type Plan, type PlanDef, type PlanDetail, type PlanFeature, type PlanFeatureManage, type PlanFeatureValue, type PlanGroup, type PlanGroupDetail, type PlanID, type PlanManage, type PlanPrice, type PlanPriceManage, type PortalAccess, type PreviewChangeParams, type PreviewChangeResult, type PriceDef, type PromoCode, type PromoCodeDetail, type PurchaseCreditsParams, type PurchaseCreditsResult, type RefundTransactionParams, type RegionalPriceResult, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveResult, type RemoveSeatsParams, type ReorderPlansParams, type RequestOptions, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type RetryTransactionParams, SDK_VERSION, type SeatBalance, type SeatEvent, type SendInvoiceParams, type SetAllSeatsParams, type SetDefaultPriceParams, type SetRegionalPricesParams, type SetSeatsParams, type SetVisibilityParams, type Subscription, type SubscriptionListItem, type SubscriptionStatus, type TestWebhookParams, type TopupBalanceParams, type TopupBalanceResult, type TrackModelTokensParams, type TrackParams, type TrackUsageParams, type TransactionDetail, type TransactionListItem, type TransactionRefundResult, type TransactionRetryResult, type UncancelParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateParams as UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdatePlanFeatureParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateWebhookParams, type UsageCheckResult, type UsageEvent, type UsageEventProperty, type WebhookData, type WebhookEndpoint, type WebhookEndpointCreated, type WebhookEvent, type WebhookPayload, type WebhookTestResult, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
package/dist/index.js
CHANGED
|
@@ -675,10 +675,17 @@ var Webhooks = class {
|
|
|
675
675
|
async list(params, options) {
|
|
676
676
|
return this.httpClient.get("/webhooks", params, options);
|
|
677
677
|
}
|
|
678
|
-
/** Response includes `secretKey` which is only returned once. */
|
|
679
678
|
async create(params, options) {
|
|
680
679
|
return this.httpClient.post("/webhooks", params, options);
|
|
681
680
|
}
|
|
681
|
+
async get(params, options) {
|
|
682
|
+
const { id } = params;
|
|
683
|
+
return this.httpClient.get(`/webhooks/${id}`, void 0, options);
|
|
684
|
+
}
|
|
685
|
+
async update(params, options) {
|
|
686
|
+
const { id, ...body } = params;
|
|
687
|
+
return this.httpClient.put(`/webhooks/${id}`, body, options);
|
|
688
|
+
}
|
|
682
689
|
async delete(params, options) {
|
|
683
690
|
const { id } = params;
|
|
684
691
|
return this.httpClient.delete(`/webhooks/${id}`, void 0, options);
|
|
@@ -721,7 +728,7 @@ var CommetValidationError = class extends CommetError {
|
|
|
721
728
|
|
|
722
729
|
// src/version.ts
|
|
723
730
|
var API_VERSION = "2026-05-25";
|
|
724
|
-
var SDK_VERSION = "5.
|
|
731
|
+
var SDK_VERSION = "5.1.0";
|
|
725
732
|
|
|
726
733
|
// src/utils/telemetry.ts
|
|
727
734
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|