@stigg/js-client-sdk 1.26.0 → 1.28.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.
@@ -4,6 +4,6 @@ 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
- getCustomerPortal(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerPortalByRefIdQuery>>;
7
+ getCustomerPortal(customerId: string, resourceId: string | undefined): Promise<import("@apollo/client/core").ApolloQueryResult<GetCustomerPortalByRefIdQuery>>;
8
8
  }
9
9
  export default CustomersApi;
@@ -4,6 +4,7 @@ import { EdgeApiClient } from './EdgeApiClient';
4
4
  export declare type GetPaywallProps = {
5
5
  productId?: string;
6
6
  customerId?: string | null;
7
+ resourceId?: string | null;
7
8
  context?: WidgetType;
8
9
  billingCountryCode?: string;
9
10
  };
@@ -11,6 +12,6 @@ declare class PaywallApi {
11
12
  private readonly client;
12
13
  private readonly edgeApiClient;
13
14
  constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
14
- getPaywall({ productId, customerId, context, billingCountryCode }: GetPaywallProps): Promise<import("@apollo/client/core").ApolloQueryResult<GetPaywallQuery>>;
15
+ getPaywall({ productId, customerId, resourceId, context, billingCountryCode }: GetPaywallProps): Promise<import("@apollo/client/core").ApolloQueryResult<GetPaywallQuery>>;
15
16
  }
16
17
  export default PaywallApi;
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BooleanEntitlement, Coupon, Customer, Entitlement, GetBooleanEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, MeteredEntitlement, NumericEntitlement, Subscription, WaitForCheckoutCompleted, CustomerPortal, Paywall, EstimateSubscription, SubscriptionPreview, EstimateSubscriptionUpdate } from './models';
1
+ import { BooleanEntitlement, Coupon, Customer, Entitlement, GetBooleanEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, MeteredEntitlement, NumericEntitlement, Subscription, WaitForCheckoutCompleted, CustomerPortal, Paywall, EstimateSubscription, SubscriptionPreview, EstimateSubscriptionUpdate, GetCustomerPortal } from './models';
2
2
  import { ClientConfiguration } from './configuration';
3
3
  import { EventNames, Events } from './services/eventEmitter';
4
4
  export interface StiggClient {
@@ -18,7 +18,7 @@ export interface StiggClient {
18
18
  waitForInitialization(): Promise<StiggClient>;
19
19
  addListener: <K extends EventNames>(eventName: K, callback: Events[K]) => void;
20
20
  removeListener: <K extends EventNames>(eventName: K, callback: Events[K]) => void;
21
- getCustomerPortal(): Promise<CustomerPortal>;
21
+ getCustomerPortal(params?: GetCustomerPortal): Promise<CustomerPortal>;
22
22
  estimateSubscription(estimateSubscription: EstimateSubscription): Promise<SubscriptionPreview>;
23
23
  estimateSubscriptionUpdate(estimateSubscriptionUpdate: EstimateSubscriptionUpdate): Promise<SubscriptionPreview>;
24
24
  }
@@ -111,7 +111,7 @@ export declare class Stigg implements StiggClient {
111
111
  *
112
112
  * @returns {Promise<Paywall>}
113
113
  */
114
- getPaywall({ productId, context, billingCountryCode }?: GetPaywall): Promise<Paywall>;
114
+ getPaywall({ productId, resourceId, context, billingCountryCode }?: GetPaywall): Promise<Paywall>;
115
115
  /**
116
116
  * Get a list of coupons
117
117
  *
@@ -129,7 +129,7 @@ export declare class Stigg implements StiggClient {
129
129
  *
130
130
  * @returns {Promise<CustomerPortal>}
131
131
  */
132
- getCustomerPortal(): Promise<CustomerPortal>;
132
+ getCustomerPortal({ resourceId }?: GetCustomerPortal): Promise<CustomerPortal>;
133
133
  /**
134
134
  * Get a list of entitlements
135
135
  *