@plyaz/types 1.21.1 → 1.21.3
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.
|
@@ -114,6 +114,22 @@ export interface UpdateProductStatusParams {
|
|
|
114
114
|
/** Optional reason for status change */
|
|
115
115
|
reason?: string;
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Parameters for updating the status of a product.
|
|
119
|
+
*
|
|
120
|
+
* This can be used to activate or deactivate a product and optionally
|
|
121
|
+
* provide metadata describing the reason or context for the status change.
|
|
122
|
+
*
|
|
123
|
+
* @template T - Optional metadata object type
|
|
124
|
+
*/
|
|
125
|
+
export interface UpdateProductStatusResult<T extends object = object> {
|
|
126
|
+
/** The provider-specific product ID (e.g., Stripe product ID) */
|
|
127
|
+
providerProductId: string;
|
|
128
|
+
/** Desired product status (Active or Inactive) */
|
|
129
|
+
status: PROVIDER_PRODUCT_STATUS;
|
|
130
|
+
/** Optional metadata to provide additional context for the status update */
|
|
131
|
+
metadata: T;
|
|
132
|
+
}
|
|
117
133
|
/**
|
|
118
134
|
* Parameters to create pricing for a product in the provider
|
|
119
135
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CurrencyCode } from '../../../locale/types';
|
|
2
2
|
import type { ProviderHealthStatus } from '../../../features';
|
|
3
|
-
import type { BaseProviderConfig, CreatePricingParams, CreatePricingResult, CreateProductParams, CreateProductResult, UpdateProductStatusParams, FetchProductParams, FetchProductResult, UpdatePricingParams, UpdatePricingResult, UpdateProductParams, UpdateProductResult } from '../../gateways';
|
|
3
|
+
import type { BaseProviderConfig, CreatePricingParams, CreatePricingResult, CreateProductParams, CreateProductResult, UpdateProductStatusParams, UpdateProductStatusResult, FetchProductParams, FetchProductResult, UpdatePricingParams, UpdatePricingResult, UpdateProductParams, UpdateProductResult } from '../../gateways';
|
|
4
4
|
import type { PaymentResult, ProcessPaymentRequest } from '../../request';
|
|
5
5
|
import type { FeeBreakdown, Money } from '../../transaction';
|
|
6
6
|
import type { AdapterConfiguration, CreateCustomerParams, CreateSubscriptionParams, CustomerResult, FeeCalculationOptions, FeeStructure, PaymentStatusResult, PayoutParams, PayoutResult, RefundParams, RefundResult, SavedPaymentMethod, SavedPaymentMethodResult, SavePaymentMethodParams, SubscriptionResult, TransactionDetails, TransactionHistory, TransactionHistoryParams, WebhookPayload, WebhookResult, WithdrawalParams, WithdrawalResult } from '../core';
|
|
@@ -221,7 +221,7 @@ export interface PaymentAdapter {
|
|
|
221
221
|
/** Fetch provider product details */
|
|
222
222
|
fetchProduct?(params: FetchProductParams): Promise<FetchProductResult>;
|
|
223
223
|
/** Deactivate or archive provider product */
|
|
224
|
-
updateProductStatus?(params: UpdateProductStatusParams): Promise<
|
|
224
|
+
updateProductStatus?(params: UpdateProductStatusParams): Promise<UpdateProductStatusResult>;
|
|
225
225
|
createPricing?(params: CreatePricingParams): Promise<CreatePricingResult>;
|
|
226
226
|
updatePricing?(params: UpdatePricingParams): Promise<UpdatePricingResult>;
|
|
227
227
|
}
|
package/package.json
CHANGED