@stigg/js-client-sdk 3.38.0 → 3.39.1
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/api/SubscriptionEstimationsApi.d.ts +3 -2
- package/dist/client.d.ts +9 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +3 -0
- package/dist/offlineClient.d.ts +2 -1
- package/dist/src/api/SubscriptionEstimationsApi.d.ts +3 -2
- package/dist/src/client.d.ts +9 -2
- package/dist/src/models.d.ts +3 -0
- package/dist/src/offlineClient.d.ts +2 -1
- package/dist/src/utils/ModelMapper.d.ts +2 -1
- package/dist/utils/ModelMapper.d.ts +2 -1
- package/package.json +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import { PreviewSubscription, EstimateSubscription, EstimateSubscriptionUpdate } from '../models';
|
|
3
|
-
import { EstimateSubscriptionMutation, EstimateSubscriptionUpdateMutation, PreviewSubscriptionMutation } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
|
+
import { PreviewSubscription, EstimateSubscription, EstimateSubscriptionUpdate, PreviewNextInvoice } from '../models';
|
|
3
|
+
import { EstimateSubscriptionMutation, EstimateSubscriptionUpdateMutation, PreviewSubscriptionMutation, PreviewNextInvoiceMutation } from '@stigg/api-client-js/src/generated/sdk';
|
|
4
4
|
declare class SubscriptionEstimationsApi {
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
7
7
|
estimateSubscription(input: EstimateSubscription): Promise<import("@apollo/client/core").FetchResult<EstimateSubscriptionMutation, Record<string, any>, Record<string, any>>>;
|
|
8
8
|
estimateSubscriptionUpdate(input: EstimateSubscriptionUpdate): Promise<import("@apollo/client/core").FetchResult<EstimateSubscriptionUpdateMutation, Record<string, any>, Record<string, any>>>;
|
|
9
|
+
previewNextInvoice(input: PreviewNextInvoice): Promise<import("@apollo/client/core").FetchResult<PreviewNextInvoiceMutation, Record<string, any>, Record<string, any>>>;
|
|
9
10
|
previewSubscription(input: PreviewSubscription): Promise<import("@apollo/client/core").FetchResult<PreviewSubscriptionMutation, Record<string, any>, Record<string, any>>>;
|
|
10
11
|
}
|
|
11
12
|
export default SubscriptionEstimationsApi;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SlimSubscriptionFragmentV2Fragment, UsageHistoryV2Fragment, UsageHistoryV2Input } from '@stigg/api-client-js/src/generated/sdk';
|
|
1
|
+
import { SlimSubscriptionFragmentV2Fragment, SubscriptionInvoicePreviewFragment, UsageHistoryV2Fragment, UsageHistoryV2Input } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
2
|
import { ClientConfiguration } from './configuration';
|
|
3
|
-
import { ApplySubscription, ApplySubscriptionResults, BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, GetSubscription, MeteredEntitlement, NumericEntitlement, Paywall, PreviewSubscription, Subscription, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, WaitForCheckoutCompleted } from './models';
|
|
3
|
+
import { ApplySubscription, ApplySubscriptionResults, BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, GetSubscription, MeteredEntitlement, NumericEntitlement, Paywall, PreviewSubscription, Subscription, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, WaitForCheckoutCompleted, PreviewNextInvoice } from './models';
|
|
4
4
|
import { EventNames, Events } from './services/eventEmitter';
|
|
5
5
|
import { LoggerService } from './services/loggerService';
|
|
6
6
|
export interface StiggClient {
|
|
@@ -32,6 +32,7 @@ export interface StiggClient {
|
|
|
32
32
|
getCustomerPortal(params?: GetCustomerPortal): Promise<CustomerPortal>;
|
|
33
33
|
estimateSubscription(estimateSubscription: EstimateSubscription): Promise<SubscriptionPreview>;
|
|
34
34
|
estimateSubscriptionUpdate(estimateSubscriptionUpdate: EstimateSubscriptionUpdate): Promise<SubscriptionPreview>;
|
|
35
|
+
previewNextInvoice(previewNextInvoice: PreviewNextInvoice): Promise<SubscriptionInvoicePreviewFragment>;
|
|
35
36
|
previewSubscription(previewSubscription: PreviewSubscription): Promise<SubscriptionPreviewV2>;
|
|
36
37
|
getUsageHistoryV2(input: UsageHistoryV2Input): Promise<UsageHistoryV2Fragment>;
|
|
37
38
|
}
|
|
@@ -190,6 +191,12 @@ export declare class Stigg implements StiggClient {
|
|
|
190
191
|
* @param {EstimateSubscriptionUpdate} estimateSubscriptionUpdate
|
|
191
192
|
*/
|
|
192
193
|
estimateSubscriptionUpdate(estimateSubscriptionUpdate: EstimateSubscriptionUpdate): Promise<SubscriptionPreview>;
|
|
194
|
+
/**
|
|
195
|
+
* Preview the subscription next invoice
|
|
196
|
+
* @return {Promise<SubscriptionInvoicePreviewFragment>} Preview of the next invoice.
|
|
197
|
+
* @param {PreviewNextInvoice} previewNextInvoice
|
|
198
|
+
*/
|
|
199
|
+
previewNextInvoice(previewNextInvoice: PreviewNextInvoice): Promise<SubscriptionInvoicePreviewFragment>;
|
|
193
200
|
/**
|
|
194
201
|
* Preview subscription provisioning\updates
|
|
195
202
|
* @return {Promise<SubscriptionPreviewV2>} Preview of the subscription.
|