@stigg/js-client-sdk 1.31.0 → 1.32.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.
@@ -1,9 +1,10 @@
1
1
  import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
2
- import { GetCustomerPortalByRefIdQuery, GetCustomerByIdQuery } from '@stigg/api-client-js/src/generated/sdk';
2
+ import { GetCustomerPortalByRefIdQuery, GetCustomerByIdQuery, GetActiveSubscriptionsQuery } from '@stigg/api-client-js/src/generated/sdk';
3
3
  declare class CustomersApi {
4
4
  private readonly client;
5
5
  constructor(client: ApolloClient<NormalizedCacheObject>);
6
6
  getCustomer(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerByIdQuery>>;
7
+ getActiveSubscriptions(customerId: string, resourceId?: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetActiveSubscriptionsQuery>>;
7
8
  getCustomerPortal(customerId: string, resourceId: string | undefined): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerPortalByRefIdQuery>>;
8
9
  }
9
10
  export default CustomersApi;
package/dist/client.d.ts CHANGED
@@ -13,6 +13,7 @@ export interface StiggClient {
13
13
  clearResource: () => Promise<void>;
14
14
  getPaywall: (params?: GetPaywall) => Promise<Paywall>;
15
15
  getCustomer: () => Promise<Customer>;
16
+ getActiveSubscriptions: () => Promise<Subscription[]>;
16
17
  getCoupons(): Promise<Coupon[]>;
17
18
  getEntitlements: (resourceId?: string) => Promise<Entitlement[]>;
18
19
  refresh: () => Promise<void>;
@@ -168,4 +169,5 @@ export declare class Stigg implements StiggClient {
168
169
  * @param refreshOnComplete should refresh entitlements if subscription was found
169
170
  */
170
171
  waitForCheckoutCompleted({ timeoutMs, refreshOnComplete, }?: WaitForCheckoutCompleted): Promise<Subscription | null>;
172
+ getActiveSubscriptions(): Promise<Subscription[]>;
171
173
  }