@stigg/js-client-sdk 2.23.0 → 2.24.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/dist/client.d.ts +3 -3
- package/dist/index.js +137 -4
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +33 -1
- package/dist/src/client.d.ts +3 -3
- package/dist/src/models.d.ts +33 -1
- package/dist/src/utils/ModelMapper.d.ts +5 -3
- package/dist/utils/ModelMapper.d.ts +5 -3
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientConfiguration } from './configuration';
|
|
2
|
-
import { BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, MeteredEntitlement, NumericEntitlement, Paywall, Subscription, SubscriptionPreview, UsageHistoryPoint, WaitForCheckoutCompleted, ApplySubscription, ApplySubscriptionResults, PreviewSubscription } from './models';
|
|
2
|
+
import { BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, MeteredEntitlement, NumericEntitlement, Paywall, Subscription, SubscriptionPreview, UsageHistoryPoint, WaitForCheckoutCompleted, ApplySubscription, ApplySubscriptionResults, PreviewSubscription, SubscriptionPreviewV2 } from './models';
|
|
3
3
|
import { EventNames, Events } from './services/eventEmitter';
|
|
4
4
|
export interface StiggClient {
|
|
5
5
|
isCustomerLoaded: boolean;
|
|
@@ -28,7 +28,7 @@ export interface StiggClient {
|
|
|
28
28
|
getCustomerPortal(params?: GetCustomerPortal): Promise<CustomerPortal>;
|
|
29
29
|
estimateSubscription(estimateSubscription: EstimateSubscription): Promise<SubscriptionPreview>;
|
|
30
30
|
estimateSubscriptionUpdate(estimateSubscriptionUpdate: EstimateSubscriptionUpdate): Promise<SubscriptionPreview>;
|
|
31
|
-
previewSubscription(previewSubscription: PreviewSubscription): Promise<
|
|
31
|
+
previewSubscription(previewSubscription: PreviewSubscription): Promise<SubscriptionPreviewV2>;
|
|
32
32
|
}
|
|
33
33
|
export declare class Stigg implements StiggClient {
|
|
34
34
|
private readonly apiGateway;
|
|
@@ -189,7 +189,7 @@ export declare class Stigg implements StiggClient {
|
|
|
189
189
|
* @return {Promise<SubscriptionPreview>} Preview of the subscription.
|
|
190
190
|
* @param {PreviewSubscription} previewSubscription
|
|
191
191
|
*/
|
|
192
|
-
previewSubscription(previewSubscription: PreviewSubscription): Promise<
|
|
192
|
+
previewSubscription(previewSubscription: PreviewSubscription): Promise<SubscriptionPreviewV2>;
|
|
193
193
|
/**
|
|
194
194
|
* Waits for a subscription to be activated after a completed checkout.
|
|
195
195
|
* This method should be called on page load after the customer is redirected to the success URL.
|