@stigg/js-client-sdk 1.12.0 → 1.13.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/models.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PackageEntitlementFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, SubscriptionScheduledUpdateDataFragment } from './api/generated/types';
2
- export { PricingType, SubscriptionStatus, PromotionalEntitlementStatus, Currency, BillingPeriod, BillingModel, TrialPeriodUnits, ExperimentGroupType, WidgetType, FontWeight, Alignment, SubscriptionScheduledUpdateDataFragment, SubscriptionScheduleType, } from './api/generated/types';
1
+ import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment } from './api/generated/types';
2
+ import { PackageEntitlementFragment } from '@stigg/api-client-js/src/generated/sdk';
3
+ export { PricingType, SubscriptionStatus, PromotionalEntitlementStatus, Currency, BillingPeriod, BillingModel, TrialPeriodUnits, ExperimentGroupType, WidgetType, FontWeight, Alignment, SubscriptionScheduleType, CustomerPortalSubscriptionScheduledUpdateDataFragment, } from './api/generated/types';
3
4
  interface Metadata {
4
5
  [key: string]: string;
5
6
  }
@@ -235,7 +236,7 @@ export declare type Subscription = {
235
236
  cancellationDate?: Date;
236
237
  metadata?: Metadata | null;
237
238
  experimentInfo?: ExperimentInfo | null;
238
- scheduledUpdates?: SubscriptionScheduledUpdateDataFragment[];
239
+ scheduledUpdates?: CustomerPortalSubscriptionScheduledUpdateDataFragment[];
239
240
  };
240
241
  export declare type CustomerPortalBillingInformation = Omit<CustomerPortalBillingInformationFragment, '__typename'>;
241
242
  export declare type CustomerPortalSubscriptionAddon = Omit<CustomerPortalSubscriptionAddonFragment, '__typename'>;
@@ -1,11 +1,11 @@
1
1
  import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
2
- import { EntitlementFragment } from '../api/generated/types';
3
2
  import { BooleanEntitlement, MeteredEntitlement, MeteredEntitlementOptions, NumericEntitlement, BooleanEntitlementOptions, NumericEntitlementOptions } from '../models';
4
3
  import CachedEntitlement from './cachedEntitlement';
5
4
  import { CacheService } from './cacheService';
6
5
  import { Decision } from './entitlementDecisionService';
7
6
  import { LoggerService } from './loggerService';
8
7
  import { EdgeApiClient } from '../api/EdgeApiClient';
8
+ import { EntitlementFragment } from '@stigg/api-client-js/src/generated/sdk';
9
9
  export declare class EntitlementsService {
10
10
  private readonly customerId;
11
11
  private readonly cacheService;
@@ -1,4 +1,5 @@
1
- import { CustomerFragment, EntitlementCheckResult, EntitlementFragment, EntitlementResetPeriod as ApiEntitlementResetPeriod, FeatureType as ApiFeatureType, FetchCouponsQuery, GetMockPaywallQuery, GetPaywallQuery } from '../api/generated/types';
1
+ import { CustomerFragment, EntitlementFragment, GetPaywallQuery } from '@stigg/api-client-js/src/generated/sdk';
2
+ import { EntitlementCheckResult, EntitlementResetPeriod as ApiEntitlementResetPeriod, FeatureType as ApiFeatureType, FetchCouponsQuery, GetMockPaywallQuery } from '../api/generated/types';
2
3
  import { BooleanEntitlement, BooleanEntitlementFallback, Coupon, Customer, EntitlementResetPeriod, FeatureType, MeteredEntitlement, MeteredEntitlementFallback, NumericEntitlement, NumericEntitlementFallback, Paywall, Plan } from '../models';
3
4
  import CachedEntitlement from '../services/cachedEntitlement';
4
5
  import { Decision } from '../services/entitlementDecisionService';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigg/js-client-sdk",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "description": "Stigg client-side SDK for Browser",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -29,6 +29,7 @@
29
29
  "dependencies": {
30
30
  "@apollo/client": "^3.4.17",
31
31
  "@sentry/browser": "^7.11.1",
32
+ "@stigg/api-client-js": "^0.3.0",
32
33
  "axios": "^1.2.2",
33
34
  "cross-fetch": "^3.1.4",
34
35
  "graphql": "^16.0.1",
@@ -1 +0,0 @@
1
- export declare const CUSTOMER_FRAGMENT: import("graphql/language/ast").DocumentNode;
@@ -1 +0,0 @@
1
- export declare const PRICE_FRAGMENT: import("graphql/language/ast").DocumentNode;
@@ -1 +0,0 @@
1
- export declare const SCHEDULED_UPDATES_FRAGMENT: import("graphql/language/ast").DocumentNode;