@stigg/js-client-sdk 1.33.0 → 1.34.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
@@ -276,6 +276,7 @@ export declare type Paywall = {
276
276
  configuration?: PaywallConfiguration | null;
277
277
  customer: Customer | null;
278
278
  resource: CustomerResource | null;
279
+ activeSubscriptions: Subscription[] | null;
279
280
  currency: PaywallCurrency;
280
281
  };
281
282
  export declare type CustomerResource = {
@@ -295,11 +296,10 @@ export declare type Customer = {
295
296
  trialedPlans?: TrialedPlan[] | null;
296
297
  eligibleForTrial?: EligibleForTrial[] | null;
297
298
  experimentInfo?: ExperimentInfo | null;
298
- /**
299
- * @deprecated *Optional* `customer level getActiveSubscriptions` is now deprecated. Use native getActiveSubscriptions instead.
300
- */
301
- getActiveSubscriptions(): Subscription[];
302
299
  getActivePromotionalEntitlements(): PromotionalEntitlement[];
300
+ /** @deprecated use {@link StiggClient.getActiveSubscriptions} instead with filter for {@link SubscriptionStatus.Active} */
301
+ getActiveSubscriptions(): Subscription[];
302
+ /** @deprecated use {@link StiggClient.getActiveSubscriptions} instead with filter for {@link SubscriptionStatus.InTrial} */
303
303
  getActiveTrials(): Subscription[];
304
304
  };
305
305
  export declare type CustomerState = Omit<Customer, 'getActiveSubscriptions' | 'getActivePromotionalEntitlements' | 'getActiveTrials'>;
@@ -276,6 +276,7 @@ export declare type Paywall = {
276
276
  configuration?: PaywallConfiguration | null;
277
277
  customer: Customer | null;
278
278
  resource: CustomerResource | null;
279
+ activeSubscriptions: Subscription[] | null;
279
280
  currency: PaywallCurrency;
280
281
  };
281
282
  export declare type CustomerResource = {
@@ -295,11 +296,10 @@ export declare type Customer = {
295
296
  trialedPlans?: TrialedPlan[] | null;
296
297
  eligibleForTrial?: EligibleForTrial[] | null;
297
298
  experimentInfo?: ExperimentInfo | null;
298
- /**
299
- * @deprecated *Optional* `customer level getActiveSubscriptions` is now deprecated. Use native getActiveSubscriptions instead.
300
- */
301
- getActiveSubscriptions(): Subscription[];
302
299
  getActivePromotionalEntitlements(): PromotionalEntitlement[];
300
+ /** @deprecated use {@link StiggClient.getActiveSubscriptions} instead with filter for {@link SubscriptionStatus.Active} */
301
+ getActiveSubscriptions(): Subscription[];
302
+ /** @deprecated use {@link StiggClient.getActiveSubscriptions} instead with filter for {@link SubscriptionStatus.InTrial} */
303
303
  getActiveTrials(): Subscription[];
304
304
  };
305
305
  export declare type CustomerState = Omit<Customer, 'getActiveSubscriptions' | 'getActivePromotionalEntitlements' | 'getActiveTrials'>;
@@ -18,7 +18,7 @@ export declare class ModelMapper {
18
18
  mapCoupons(resultData: GetCouponsQuery): Coupon[];
19
19
  mapResource(resource: CustomerResourceFragment): CustomerResource;
20
20
  mapCustomerPortal(customerPortal: CustomerPortalFragment): CustomerPortal;
21
- mapCustomer(customer: CustomerFragment): Customer;
21
+ mapCustomer(customer: CustomerFragment, subscriptions: SubscriptionFragment[]): Customer;
22
22
  private mapPaymentDetails;
23
23
  private mapTotalPrice;
24
24
  private mapPrice;
@@ -18,7 +18,7 @@ export declare class ModelMapper {
18
18
  mapCoupons(resultData: GetCouponsQuery): Coupon[];
19
19
  mapResource(resource: CustomerResourceFragment): CustomerResource;
20
20
  mapCustomerPortal(customerPortal: CustomerPortalFragment): CustomerPortal;
21
- mapCustomer(customer: CustomerFragment): Customer;
21
+ mapCustomer(customer: CustomerFragment, subscriptions: SubscriptionFragment[]): Customer;
22
22
  private mapPaymentDetails;
23
23
  private mapTotalPrice;
24
24
  private mapPrice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigg/js-client-sdk",
3
- "version": "1.33.0",
3
+ "version": "1.34.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.395.0",
31
+ "@stigg/api-client-js": "0.421.0",
32
32
  "axios": "^1.2.2",
33
33
  "cross-fetch": "^3.1.4",
34
34
  "husky": "^7.0.4",