@stigg/js-client-sdk 2.19.0 → 2.20.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/api/CustomersApi.d.ts +2 -2
- package/dist/api/SubscriptionsApi.d.ts +2 -2
- package/dist/index.js +75 -94
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +4 -1
- package/dist/src/api/CustomersApi.d.ts +2 -2
- package/dist/src/api/SubscriptionsApi.d.ts +2 -2
- package/dist/src/models.d.ts +4 -1
- package/package.json +2 -2
package/dist/models.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
1
|
+
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment, CheckoutConfigurationFragment, TypographyConfigurationFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
2
|
export { PricingType, SubscriptionStatus, PromotionalEntitlementStatus, Currency, BillingPeriod, BillingModel, TrialPeriodUnits, ExperimentGroupType, WidgetType, FontWeight, Alignment, SubscriptionScheduleType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, SubscriptionInvoiceFragment, PaymentCollection, BillingVendorIdentifier, PriceTierFragment, TiersMode, } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
3
|
interface Metadata {
|
|
4
4
|
[key: string]: string;
|
|
@@ -287,7 +287,10 @@ export declare type CheckoutBillingIntegration = {
|
|
|
287
287
|
publicKey: string;
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
|
+
export declare type TypographyConfiguration = Omit<TypographyConfigurationFragment, '__typename'>;
|
|
291
|
+
export declare type CheckoutConfiguration = Omit<CheckoutConfigurationFragment, '__typename'>;
|
|
290
292
|
export declare type GetCheckoutStateResults = {
|
|
293
|
+
configuration?: CheckoutConfiguration | null;
|
|
291
294
|
setupSecret: string;
|
|
292
295
|
plan: CheckoutStatePlan;
|
|
293
296
|
customer: Customer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import { GetCustomerPortalByRefIdQuery, GetCustomerByIdQuery, GetActiveSubscriptionsQuery,
|
|
2
|
+
import { GetCustomerPortalByRefIdQuery, GetCustomerByIdQuery, GetActiveSubscriptionsQuery, GetUsageHistoryQuery } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
3
|
import { FetchUsageHistory } from '../models';
|
|
4
4
|
declare class CustomersApi {
|
|
5
5
|
private readonly client;
|
|
@@ -7,6 +7,6 @@ declare class CustomersApi {
|
|
|
7
7
|
getCustomer(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerByIdQuery>>;
|
|
8
8
|
getActiveSubscriptions(customerId: string, resourceId?: string | string[]): Promise<import("@apollo/client/core").ApolloQueryResult<GetActiveSubscriptionsQuery>>;
|
|
9
9
|
getCustomerPortal(customerId: string, resourceId: string | undefined, productId: string | undefined): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerPortalByRefIdQuery>>;
|
|
10
|
-
fetchUsageHistory({ customerId, resourceId, endDate, startDate, featureId }: FetchUsageHistory): Promise<import("@apollo/client/core").ApolloQueryResult<
|
|
10
|
+
fetchUsageHistory({ customerId, resourceId, endDate, startDate, featureId }: FetchUsageHistory): Promise<import("@apollo/client/core").ApolloQueryResult<GetUsageHistoryQuery>>;
|
|
11
11
|
}
|
|
12
12
|
export default CustomersApi;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetCheckoutStateQuery, ApplySubscriptionMutation } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
2
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
3
3
|
import { ApplySubscription, GetCheckoutState } from '../models';
|
|
4
4
|
export declare type ApplySubscriptionParams = ApplySubscription & {
|
|
@@ -11,7 +11,7 @@ declare class SubscriptionsApi {
|
|
|
11
11
|
private readonly client;
|
|
12
12
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
13
13
|
applySubscription({ customerId, planId, paymentMethodId, addons, billableFeatures, billingCountryCode, billingId, billingInformation, billingPeriod, metadata, promotionCode, resourceId, skipTrial, startDate, unitQuantity, }: ApplySubscriptionParams): Promise<import("@apollo/client/core").FetchResult<ApplySubscriptionMutation, Record<string, any>, Record<string, any>>>;
|
|
14
|
-
checkoutState({ customerId, resourceId, planId, billingCountryCode }: GetCheckoutStateParams): Promise<import("@apollo/client/core").ApolloQueryResult<
|
|
14
|
+
checkoutState({ customerId, resourceId, planId, billingCountryCode }: GetCheckoutStateParams): Promise<import("@apollo/client/core").ApolloQueryResult<GetCheckoutStateQuery>>;
|
|
15
15
|
private mapBillingInformation;
|
|
16
16
|
}
|
|
17
17
|
export default SubscriptionsApi;
|
package/dist/src/models.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
1
|
+
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, PackageEntitlementFragment, PaywallCurrencyFragment, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, PaywallCalculatedPricePointsFragment, SubscriptionInvoiceFragment, PaymentCollection, PlanFragment, BillingVendorIdentifier, TiersMode, SubscriptionFutureUpdateDataFragment, PriceTierFragment, TotalPriceFragment, CheckoutConfigurationFragment, TypographyConfigurationFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
2
|
export { PricingType, SubscriptionStatus, PromotionalEntitlementStatus, Currency, BillingPeriod, BillingModel, TrialPeriodUnits, ExperimentGroupType, WidgetType, FontWeight, Alignment, SubscriptionScheduleType, CustomerPortalSubscriptionScheduledUpdateDataFragment, DiscountType, DiscountDurationType, FeatureType, MeterType, EntitlementResetPeriod, AccessDeniedReason, SubscriptionInvoiceFragment, PaymentCollection, BillingVendorIdentifier, PriceTierFragment, TiersMode, } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
3
|
interface Metadata {
|
|
4
4
|
[key: string]: string;
|
|
@@ -287,7 +287,10 @@ export declare type CheckoutBillingIntegration = {
|
|
|
287
287
|
publicKey: string;
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
|
+
export declare type TypographyConfiguration = Omit<TypographyConfigurationFragment, '__typename'>;
|
|
291
|
+
export declare type CheckoutConfiguration = Omit<CheckoutConfigurationFragment, '__typename'>;
|
|
290
292
|
export declare type GetCheckoutStateResults = {
|
|
293
|
+
configuration?: CheckoutConfiguration | null;
|
|
291
294
|
setupSecret: string;
|
|
292
295
|
plan: CheckoutStatePlan;
|
|
293
296
|
customer: Customer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigg/js-client-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0",
|
|
4
4
|
"description": "Stigg client-side SDK for Browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@apollo/client": "^3.4.17",
|
|
30
30
|
"@sentry/browser": "^7.11.1",
|
|
31
|
-
"@stigg/api-client-js": "0.
|
|
31
|
+
"@stigg/api-client-js": "^0.554.0",
|
|
32
32
|
"cross-fetch": "^3.1.6",
|
|
33
33
|
"fetch-retry": "^5.0.6",
|
|
34
34
|
"husky": "^7.0.4",
|