@stigg/js-client-sdk 3.59.1 → 3.60.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/ApiGateway.d.ts +2 -0
- package/dist/api/CheckoutApi.d.ts +8 -0
- package/dist/client.d.ts +9 -2
- package/dist/index.js +34 -4
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +5 -3
- package/dist/offlineClient.d.ts +2 -1
- package/dist/src/api/ApiGateway.d.ts +2 -0
- package/dist/src/api/CheckoutApi.d.ts +8 -0
- package/dist/src/client.d.ts +9 -2
- package/dist/src/models.d.ts +5 -3
- package/dist/src/offlineClient.d.ts +2 -1
- package/package.json +2 -2
package/dist/api/ApiGateway.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import MockPaywallApi from './MockPaywallApi';
|
|
|
9
9
|
import { EdgeApiClient } from './EdgeApiClient';
|
|
10
10
|
import { UsageHistoryApi } from './UsageHistoryApi';
|
|
11
11
|
import CreditsApi from './CreditsApi';
|
|
12
|
+
import CheckoutApi from './CheckoutApi';
|
|
12
13
|
declare class ApiGateway {
|
|
13
14
|
sdkConfiguration: SdkConfigurationApi;
|
|
14
15
|
paywall: PaywallApi;
|
|
@@ -19,6 +20,7 @@ declare class ApiGateway {
|
|
|
19
20
|
subscriptionEstimations: SubscriptionEstimationsApi;
|
|
20
21
|
usageHistoryApi: UsageHistoryApi;
|
|
21
22
|
credits: CreditsApi;
|
|
23
|
+
checkout: CheckoutApi;
|
|
22
24
|
constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
|
|
23
25
|
}
|
|
24
26
|
export default ApiGateway;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
+
import { CreatePaymentSessionMutation, PaymentSessionInput } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
|
+
declare class CheckoutApi {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
6
|
+
createPaymentSession(input: PaymentSessionInput): Promise<import("@apollo/client/core").FetchResult<CreatePaymentSessionMutation, Record<string, any>, Record<string, any>>>;
|
|
7
|
+
}
|
|
8
|
+
export default CheckoutApi;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CreditGrantFragment, CreditsBalanceSummaryFragment, GetCreditGrantsInput, SlimSubscriptionFragmentV2Fragment, SubscriptionInvoicePreviewFragment, UsageHistoryV2Fragment, UsageHistoryV2Input } from '@stigg/api-client-js/src/generated/sdk';
|
|
1
|
+
import { CreditGrantFragment, CreditsBalanceSummaryFragment, GetCreditGrantsInput, PaymentSessionFragment, 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, PreviewNextInvoice, GetSubscriptionsParams, GetSubscriptionsResult, EnumEntitlement, GetEnumEntitlement, GetCreditBalanceInput } 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, GetSubscriptionsParams, GetSubscriptionsResult, EnumEntitlement, GetEnumEntitlement, CreatePaymentSessionInput, GetCreditBalanceInput } from './models';
|
|
4
4
|
import { EventNames, Events } from './services/eventEmitter';
|
|
5
5
|
import { LoggerService } from './services/loggerService';
|
|
6
6
|
export interface StiggClient {
|
|
@@ -39,6 +39,7 @@ export interface StiggClient {
|
|
|
39
39
|
getUsageHistoryV2(input: UsageHistoryV2Input): Promise<UsageHistoryV2Fragment>;
|
|
40
40
|
getCreditBalance(input?: GetCreditBalanceInput): Promise<CreditsBalanceSummaryFragment>;
|
|
41
41
|
getCreditGrants(input: GetCreditGrantsInput): Promise<CreditGrantFragment[]>;
|
|
42
|
+
createPaymentSession(input: CreatePaymentSessionInput): Promise<PaymentSessionFragment>;
|
|
42
43
|
}
|
|
43
44
|
export declare class Stigg implements StiggClient {
|
|
44
45
|
private readonly apiGateway;
|
|
@@ -255,4 +256,10 @@ export declare class Stigg implements StiggClient {
|
|
|
255
256
|
* @param input - the input for the credit grants
|
|
256
257
|
*/
|
|
257
258
|
getCreditGrants(input: GetCreditGrantsInput): Promise<CreditGrantFragment[]>;
|
|
259
|
+
/**
|
|
260
|
+
* Create payment session
|
|
261
|
+
* @return {Promise<PaymentSessionFragment>} the payment session data
|
|
262
|
+
* @param input - the input for the payment session
|
|
263
|
+
*/
|
|
264
|
+
createPaymentSession(input: CreatePaymentSessionInput): Promise<PaymentSessionFragment>;
|
|
258
265
|
}
|