@stigg/js-client-sdk 3.45.0 → 3.47.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.
@@ -6,6 +6,6 @@ declare class EntitlementsApi {
6
6
  private readonly edgeApiClient;
7
7
  constructor(client: ApolloClient<NormalizedCacheObject>, edgeApiClient: EdgeApiClient | null);
8
8
  getEntitlements(customerId: string, skipEdge?: boolean, resourceId?: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetEntitlementsQuery>>;
9
- reportEntitlementRequested(featureId: string, customerId: string, entitlementCheckResult: EntitlementCheckResult, resourceId?: string, requestedUsage?: number): Promise<void>;
9
+ reportEntitlementRequested(featureId: string, customerId: string, entitlementCheckResult: EntitlementCheckResult, resourceId?: string, requestedUsage?: number, requestedValues?: string[]): Promise<void>;
10
10
  }
11
11
  export default EntitlementsApi;
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SlimSubscriptionFragmentV2Fragment, SubscriptionInvoicePreviewFragment, UsageHistoryV2Fragment, UsageHistoryV2Input } from '@stigg/api-client-js/src/generated/sdk';
2
2
  import { ClientConfiguration } from './configuration';
3
- import { ApplySubscription, ApplySubscriptionResults, BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, GetSubscription, MeteredEntitlement, NumericEntitlement, Paywall, PreviewSubscription, Subscription, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, WaitForCheckoutCompleted, PreviewNextInvoice, GetSubscriptionsParams, GetSubscriptionsResult } from './models';
3
+ import { ApplySubscription, ApplySubscriptionResults, BooleanEntitlement, Coupon, Customer, CustomerPortal, Entitlement, EstimateSubscription, EstimateSubscriptionUpdate, FetchUsageHistory, GetActiveSubscriptions, GetBooleanEntitlement, GetCheckoutStateResults, GetCheckoutState, GetCustomerPortal, GetMeteredEntitlement, GetNumericEntitlement, GetPaywall, GetSubscription, MeteredEntitlement, NumericEntitlement, Paywall, PreviewSubscription, Subscription, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, WaitForCheckoutCompleted, PreviewNextInvoice, GetSubscriptionsParams, GetSubscriptionsResult, EnumEntitlement, GetEnumEntitlement } from './models';
4
4
  import { EventNames, Events } from './services/eventEmitter';
5
5
  import { LoggerService } from './services/loggerService';
6
6
  export interface StiggClient {
@@ -10,6 +10,7 @@ export interface StiggClient {
10
10
  getBooleanEntitlement: (params: GetBooleanEntitlement) => BooleanEntitlement;
11
11
  getNumericEntitlement: (params: GetNumericEntitlement) => NumericEntitlement;
12
12
  getMeteredEntitlement: (params: GetMeteredEntitlement) => MeteredEntitlement;
13
+ getEnumEntitlement: (params: GetEnumEntitlement) => EnumEntitlement;
13
14
  fetchUsageHistory: (params: FetchUsageHistory) => Promise<UsageHistoryPoint[] | undefined>;
14
15
  setCustomerId: (customerId: string, customerToken?: string | null, resourceId?: string | null) => Promise<void>;
15
16
  clearCustomer: () => void;
@@ -130,6 +131,15 @@ export declare class Stigg implements StiggClient {
130
131
  * @return {MeteredEntitlement} metered entitlement
131
132
  */
132
133
  getMeteredEntitlement({ featureId, options, resourceId }: GetMeteredEntitlement): MeteredEntitlement;
134
+ /**
135
+ * Get enum entitlement of feature for a customer
136
+ *
137
+ * @param {string} featureId
138
+ * @param {string} resourceId
139
+ * @param {EnumEntitlementOptions} options
140
+ * @return {EnumEntitlement} enum entitlement
141
+ */
142
+ getEnumEntitlement({ featureId, options, resourceId }: GetEnumEntitlement): EnumEntitlement;
133
143
  /**
134
144
  * Get paywall data for rendering the paywall
135
145
  * @deprecated *Optional* `productId` is now deprecated and will be changed to a *required* field soon.