@stigg/js-client-sdk 0.20.0 → 0.22.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/api/EntitlementsApi.d.ts +3 -0
- package/dist/api/generated/types.d.ts +0 -4
- package/dist/client.d.ts +2 -0
- package/dist/configuration.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/entitlementsService.d.ts +6 -0
- package/package.json +1 -1
- package/CHANGELOG.md +0 -45
|
@@ -6,5 +6,8 @@ declare class EntitlementsApi {
|
|
|
6
6
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
7
7
|
getEntitlement(query: FetchEntitlement): Promise<import("@apollo/client/core").ApolloQueryResult<EntitlementQuery>>;
|
|
8
8
|
getEntitlements(customerId: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetEntitlementsQuery>>;
|
|
9
|
+
pollEntitlements(customerId: string, interval: number): import("@apollo/client/core").ObservableQuery<GetEntitlementsQuery, import("./generated/types").Exact<{
|
|
10
|
+
query: import("./generated/types").FetchEntitlementsQuery;
|
|
11
|
+
}>>;
|
|
9
12
|
}
|
|
10
13
|
export default EntitlementsApi;
|
|
@@ -699,10 +699,6 @@ export declare enum EventLogType {
|
|
|
699
699
|
SubscriptionCanceled = "SUBSCRIPTION_CANCELED",
|
|
700
700
|
SubscriptionCreated = "SUBSCRIPTION_CREATED",
|
|
701
701
|
SubscriptionExpired = "SUBSCRIPTION_EXPIRED",
|
|
702
|
-
SubscriptionTrialConverted = "SUBSCRIPTION_TRIAL_CONVERTED",
|
|
703
|
-
SubscriptionTrialEndsSoon = "SUBSCRIPTION_TRIAL_ENDS_SOON",
|
|
704
|
-
SubscriptionTrialExpired = "SUBSCRIPTION_TRIAL_EXPIRED",
|
|
705
|
-
SubscriptionTrialStarted = "SUBSCRIPTION_TRIAL_STARTED",
|
|
706
702
|
SubscriptionUpdated = "SUBSCRIPTION_UPDATED"
|
|
707
703
|
}
|
|
708
704
|
export declare type FeatureFilter = {
|
package/dist/client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface StiggClient {
|
|
|
6
6
|
getPlans: () => Promise<Plan[]>;
|
|
7
7
|
getCustomer: () => Promise<Customer>;
|
|
8
8
|
getEntitlements: () => Promise<Entitlement[]>;
|
|
9
|
+
refresh: () => Promise<void>;
|
|
9
10
|
}
|
|
10
11
|
export declare class Stigg implements StiggClient {
|
|
11
12
|
private readonly apiGateway;
|
|
@@ -16,6 +17,7 @@ export declare class Stigg implements StiggClient {
|
|
|
16
17
|
private constructor();
|
|
17
18
|
static initialize(configuration: ClientConfiguration): Promise<StiggClient>;
|
|
18
19
|
setCustomerId(customerId: string): Promise<void>;
|
|
20
|
+
refresh(): Promise<void>;
|
|
19
21
|
getEntitlement<T extends Entitlement>(featureId: string, options?: EntitlementOptions): T | InvalidEntitlement | FallbackEntitlement;
|
|
20
22
|
private handleNoEntitlementFound;
|
|
21
23
|
getPlans(): Promise<Plan[]>;
|
package/dist/configuration.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ export declare type ClientConfiguration = {
|
|
|
2
2
|
sdkKey: string;
|
|
3
3
|
baseUri?: string;
|
|
4
4
|
customerId?: string;
|
|
5
|
+
entitlementPollingInterval?: number;
|
|
5
6
|
};
|
|
6
7
|
export declare function validateConfiguration(configuration: ClientConfiguration): void;
|
|
7
|
-
export declare function withDefaults(configuration: ClientConfiguration):
|
|
8
|
+
export declare function withDefaults(configuration: ClientConfiguration): Required<ClientConfiguration>;
|
|
8
9
|
export declare function ensureCustomerRefIdExists({ customerId }: ClientConfiguration): string;
|