@stigg/js-client-sdk 1.13.0 → 1.13.2
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/models.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType } from './api/generated/types';
|
|
2
|
-
import { PackageEntitlementFragment
|
|
3
|
-
export { PricingType, SubscriptionStatus, PromotionalEntitlementStatus, Currency, BillingPeriod, BillingModel, TrialPeriodUnits, ExperimentGroupType, WidgetType, FontWeight, Alignment, SubscriptionScheduleType, } from './api/generated/types';
|
|
4
|
-
export { SubscriptionScheduledUpdateDataFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
1
|
+
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment, PaywallConfigurationFragment, CustomerPortalConfigurationFragment, WidgetType, CustomerPortalSubscriptionScheduledUpdateDataFragment } from './api/generated/types';
|
|
2
|
+
import { PackageEntitlementFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
|
+
export { PricingType, SubscriptionStatus, PromotionalEntitlementStatus, Currency, BillingPeriod, BillingModel, TrialPeriodUnits, ExperimentGroupType, WidgetType, FontWeight, Alignment, SubscriptionScheduleType, CustomerPortalSubscriptionScheduledUpdateDataFragment, } from './api/generated/types';
|
|
5
4
|
interface Metadata {
|
|
6
5
|
[key: string]: string;
|
|
7
6
|
}
|
|
@@ -171,6 +170,9 @@ export declare type GetPaywall = {
|
|
|
171
170
|
customerId?: string;
|
|
172
171
|
context?: WidgetType;
|
|
173
172
|
};
|
|
173
|
+
export declare type EntitlementsFallback = {
|
|
174
|
+
[featureId: string]: BooleanEntitlementFallback | NumericEntitlementFallback | MeteredEntitlementFallback;
|
|
175
|
+
};
|
|
174
176
|
export declare type BooleanEntitlementFallback = {
|
|
175
177
|
hasAccess: boolean;
|
|
176
178
|
};
|
|
@@ -237,7 +239,7 @@ export declare type Subscription = {
|
|
|
237
239
|
cancellationDate?: Date;
|
|
238
240
|
metadata?: Metadata | null;
|
|
239
241
|
experimentInfo?: ExperimentInfo | null;
|
|
240
|
-
scheduledUpdates?:
|
|
242
|
+
scheduledUpdates?: CustomerPortalSubscriptionScheduledUpdateDataFragment[];
|
|
241
243
|
};
|
|
242
244
|
export declare type CustomerPortalBillingInformation = Omit<CustomerPortalBillingInformationFragment, '__typename'>;
|
|
243
245
|
export declare type CustomerPortalSubscriptionAddon = Omit<CustomerPortalSubscriptionAddonFragment, '__typename'>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AccessDeniedReason, EntitlementsFallback } from '../models';
|
|
2
|
+
export declare function mapGetEntitlementsFallback(entitlementsFallback?: EntitlementsFallback): ({
|
|
3
|
+
hasAccess: boolean;
|
|
4
|
+
isFallback: boolean;
|
|
5
|
+
accessDeniedReason: AccessDeniedReason;
|
|
6
|
+
feature: {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
} | {
|
|
10
|
+
hasAccess: boolean;
|
|
11
|
+
value?: number | undefined;
|
|
12
|
+
isUnlimited?: boolean | undefined;
|
|
13
|
+
isFallback: boolean;
|
|
14
|
+
accessDeniedReason: AccessDeniedReason;
|
|
15
|
+
feature: {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
hasAccess: boolean;
|
|
20
|
+
usageLimit?: number | undefined;
|
|
21
|
+
isUnlimited?: boolean | undefined;
|
|
22
|
+
isFallback: boolean;
|
|
23
|
+
accessDeniedReason: AccessDeniedReason;
|
|
24
|
+
feature: {
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
})[] | undefined;
|