@stigg/js-client-sdk 3.3.0 → 3.5.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/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, CheckoutConfigurationFragment, TypographyConfigurationFragment, BillingAddress } 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, BillingAddress, ScheduleStrategy } 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, BillingAddress, } from '@stigg/api-client-js/src/generated/sdk';
3
3
  interface Metadata {
4
4
  [key: string]: string;
@@ -175,6 +175,7 @@ export declare type ApplySubscription = {
175
175
  promotionCode?: string;
176
176
  billingInformation?: Omit<SubscriptionBillingInfo, 'taxPercentage'>;
177
177
  billingCountryCode?: string;
178
+ scheduleStrategy?: ScheduleStrategy;
178
179
  };
179
180
  export declare type SubscriptionBillingInfo = {
180
181
  taxRateIds?: string[];
@@ -473,6 +474,7 @@ export declare type PreviewSubscription = {
473
474
  billableFeatures?: BillableFeature[];
474
475
  billingInformation?: SubscriptionBillingInfo;
475
476
  promotionCode?: string;
477
+ scheduleStrategy?: ScheduleStrategy;
476
478
  };
477
479
  export declare type FetchUsageHistory = {
478
480
  customerId: string;
@@ -3,6 +3,7 @@ import { ResetPeriodConfigurationFragment } from '@stigg/api-client-js/src/gener
3
3
  export interface CalculatedEntitlement {
4
4
  usageLimit?: number | null;
5
5
  hasUnlimitedUsage: boolean;
6
+ hasSoftLimit: boolean;
6
7
  feature?: EntitlementFeature;
7
8
  }
8
9
  export interface EntitlementUsage {
@@ -10,7 +10,7 @@ export declare type GetCheckoutStateParams = GetCheckoutState & {
10
10
  declare class SubscriptionsApi {
11
11
  private readonly client;
12
12
  constructor(client: ApolloClient<NormalizedCacheObject>);
13
- applySubscription({ customerId, planId, paymentMethodId, addons, billableFeatures, billingInformation, billingCountryCode, billingId, billingPeriod, metadata, promotionCode, resourceId, skipTrial, startDate, unitQuantity, }: ApplySubscriptionParams): Promise<import("@apollo/client/core").FetchResult<ApplySubscriptionMutation, Record<string, any>, Record<string, any>>>;
13
+ applySubscription({ customerId, planId, paymentMethodId, addons, billableFeatures, billingInformation, billingCountryCode, billingId, billingPeriod, metadata, promotionCode, resourceId, skipTrial, startDate, unitQuantity, scheduleStrategy, }: ApplySubscriptionParams): Promise<import("@apollo/client/core").FetchResult<ApplySubscriptionMutation, Record<string, any>, Record<string, any>>>;
14
14
  checkoutState({ customerId, resourceId, planId, billingCountryCode }: GetCheckoutStateParams): Promise<import("@apollo/client/core").ApolloQueryResult<GetCheckoutStateQuery>>;
15
15
  private mapBillingInformation;
16
16
  }
@@ -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, CheckoutConfigurationFragment, TypographyConfigurationFragment, BillingAddress } 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, BillingAddress, ScheduleStrategy } 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, BillingAddress, } from '@stigg/api-client-js/src/generated/sdk';
3
3
  interface Metadata {
4
4
  [key: string]: string;
@@ -175,6 +175,7 @@ export declare type ApplySubscription = {
175
175
  promotionCode?: string;
176
176
  billingInformation?: Omit<SubscriptionBillingInfo, 'taxPercentage'>;
177
177
  billingCountryCode?: string;
178
+ scheduleStrategy?: ScheduleStrategy;
178
179
  };
179
180
  export declare type SubscriptionBillingInfo = {
180
181
  taxRateIds?: string[];
@@ -473,6 +474,7 @@ export declare type PreviewSubscription = {
473
474
  billableFeatures?: BillableFeature[];
474
475
  billingInformation?: SubscriptionBillingInfo;
475
476
  promotionCode?: string;
477
+ scheduleStrategy?: ScheduleStrategy;
476
478
  };
477
479
  export declare type FetchUsageHistory = {
478
480
  customerId: string;
@@ -3,6 +3,7 @@ import { ResetPeriodConfigurationFragment } from '@stigg/api-client-js/src/gener
3
3
  export interface CalculatedEntitlement {
4
4
  usageLimit?: number | null;
5
5
  hasUnlimitedUsage: boolean;
6
+ hasSoftLimit: boolean;
6
7
  feature?: EntitlementFeature;
7
8
  }
8
9
  export interface EntitlementUsage {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigg/js-client-sdk",
3
- "version": "3.3.0",
3
+ "version": "3.5.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": "1.11.1",
31
+ "@stigg/api-client-js": "1.50.0",
32
32
  "cross-fetch": "^3.1.6",
33
33
  "fetch-retry": "^5.0.6",
34
34
  "husky": "^7.0.4",