@stigg/js-client-sdk 0.22.0 → 0.22.1
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/PaywallApi.d.ts +1 -1
- package/dist/api/generated/types.d.ts +27 -0
- package/dist/client.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +5 -0
- package/package.json +1 -1
package/dist/api/PaywallApi.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { GetPlansQuery } from './generated/types';
|
|
|
3
3
|
declare class PaywallApi {
|
|
4
4
|
private readonly client;
|
|
5
5
|
constructor(client: ApolloClient<NormalizedCacheObject>);
|
|
6
|
-
getPlans(): Promise<import("@apollo/client/core").ApolloQueryResult<GetPlansQuery>>;
|
|
6
|
+
getPlans(productId?: string): Promise<import("@apollo/client/core").ApolloQueryResult<GetPlansQuery>>;
|
|
7
7
|
}
|
|
8
8
|
export default PaywallApi;
|
|
@@ -699,6 +699,10 @@ 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",
|
|
702
706
|
SubscriptionUpdated = "SUBSCRIPTION_UPDATED"
|
|
703
707
|
}
|
|
704
708
|
export declare type FeatureFilter = {
|
|
@@ -1129,12 +1133,25 @@ export declare type PlanFilter = {
|
|
|
1129
1133
|
id?: InputMaybe<StringFieldComparison>;
|
|
1130
1134
|
isLatest?: InputMaybe<BooleanFieldComparison>;
|
|
1131
1135
|
or?: InputMaybe<Array<PlanFilter>>;
|
|
1136
|
+
product?: InputMaybe<PlanFilterProductFilter>;
|
|
1132
1137
|
productId?: InputMaybe<StringFieldComparison>;
|
|
1133
1138
|
refId?: InputMaybe<StringFieldComparison>;
|
|
1134
1139
|
status?: InputMaybe<PackageStatusFilterComparison>;
|
|
1135
1140
|
updatedAt?: InputMaybe<DateFieldComparison>;
|
|
1136
1141
|
versionNumber?: InputMaybe<IntFieldComparison>;
|
|
1137
1142
|
};
|
|
1143
|
+
export declare type PlanFilterProductFilter = {
|
|
1144
|
+
and?: InputMaybe<Array<PlanFilterProductFilter>>;
|
|
1145
|
+
createdAt?: InputMaybe<DateFieldComparison>;
|
|
1146
|
+
description?: InputMaybe<StringFieldComparison>;
|
|
1147
|
+
displayName?: InputMaybe<StringFieldComparison>;
|
|
1148
|
+
environmentId?: InputMaybe<StringFieldComparison>;
|
|
1149
|
+
id?: InputMaybe<StringFieldComparison>;
|
|
1150
|
+
isDefaultProduct?: InputMaybe<BooleanFieldComparison>;
|
|
1151
|
+
or?: InputMaybe<Array<PlanFilterProductFilter>>;
|
|
1152
|
+
refId?: InputMaybe<StringFieldComparison>;
|
|
1153
|
+
updatedAt?: InputMaybe<DateFieldComparison>;
|
|
1154
|
+
};
|
|
1138
1155
|
export declare type PlanSort = {
|
|
1139
1156
|
direction: SortDirection;
|
|
1140
1157
|
field: PlanSortFields;
|
|
@@ -2294,6 +2311,11 @@ export declare type SubscriptionFragment = {
|
|
|
2294
2311
|
refId: string;
|
|
2295
2312
|
displayName: string;
|
|
2296
2313
|
description?: string | null | undefined;
|
|
2314
|
+
product: {
|
|
2315
|
+
__typename?: 'Product';
|
|
2316
|
+
refId: string;
|
|
2317
|
+
displayName?: string | null | undefined;
|
|
2318
|
+
};
|
|
2297
2319
|
entitlements?: Array<{
|
|
2298
2320
|
__typename?: 'PackageEntitlement';
|
|
2299
2321
|
usageLimit?: number | null | undefined;
|
|
@@ -2534,6 +2556,11 @@ export declare type PlanFragment = {
|
|
|
2534
2556
|
refId: string;
|
|
2535
2557
|
description?: string | null | undefined;
|
|
2536
2558
|
displayName: string;
|
|
2559
|
+
product: {
|
|
2560
|
+
__typename?: 'Product';
|
|
2561
|
+
refId: string;
|
|
2562
|
+
displayName?: string | null | undefined;
|
|
2563
|
+
};
|
|
2537
2564
|
basePlan?: {
|
|
2538
2565
|
__typename?: 'Plan';
|
|
2539
2566
|
id: string;
|
package/dist/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ClientConfiguration } from './configuration';
|
|
|
3
3
|
export interface StiggClient {
|
|
4
4
|
getEntitlement: <T extends Entitlement>(featureId: string, options?: EntitlementOptions) => T | InvalidEntitlement | FallbackEntitlement;
|
|
5
5
|
setCustomerId: (customerId: string) => void;
|
|
6
|
-
|
|
6
|
+
getPaywall: (productId?: string) => Promise<Plan[]>;
|
|
7
7
|
getCustomer: () => Promise<Customer>;
|
|
8
8
|
getEntitlements: () => Promise<Entitlement[]>;
|
|
9
9
|
refresh: () => Promise<void>;
|
|
@@ -20,7 +20,7 @@ export declare class Stigg implements StiggClient {
|
|
|
20
20
|
refresh(): Promise<void>;
|
|
21
21
|
getEntitlement<T extends Entitlement>(featureId: string, options?: EntitlementOptions): T | InvalidEntitlement | FallbackEntitlement;
|
|
22
22
|
private handleNoEntitlementFound;
|
|
23
|
-
|
|
23
|
+
getPaywall(productId?: string): Promise<Plan[]>;
|
|
24
24
|
getCustomer(): Promise<Customer>;
|
|
25
25
|
getEntitlements(): Promise<Entitlement[] | never[]>;
|
|
26
26
|
}
|