@stigg/js-client-sdk 1.12.0 → 1.13.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/CustomersApi.d.ts +3 -2
- package/dist/api/EdgeApiClient.d.ts +2 -1
- package/dist/api/EntitlementsApi.d.ts +4 -3
- package/dist/api/PaywallApi.d.ts +2 -1
- package/dist/api/generated/types.d.ts +151 -377
- package/dist/index.js +625 -1
- package/dist/index.js.LICENSE.txt +15 -0
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +4 -3
- package/dist/services/entitlementsService.d.ts +1 -1
- package/dist/utils/ModelMapper.d.ts +2 -1
- package/package.json +2 -1
- package/dist/api/fragments/customerFragment.d.ts +0 -1
- package/dist/api/fragments/priceFragment.d.ts +0 -1
- package/dist/api/fragments/scheduledUpdateFragment.d.ts +0 -1
package/dist/models.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BillingModel, BillingPeriod, Currency, PricingType, PromotionalEntitlementStatus, SubscriptionStatus, TrialPeriodUnits, ExperimentGroupType, CustomerPortalEntitlementFragment, CustomerPortalPromotionalEntitlementFragment, CustomerPortalSubscriptionFragment, CustomerPortalSubscriptionAddonFragment, CustomerPortalBillingInformationFragment,
|
|
2
|
-
|
|
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';
|
|
3
4
|
interface Metadata {
|
|
4
5
|
[key: string]: string;
|
|
5
6
|
}
|
|
@@ -235,7 +236,7 @@ export declare type Subscription = {
|
|
|
235
236
|
cancellationDate?: Date;
|
|
236
237
|
metadata?: Metadata | null;
|
|
237
238
|
experimentInfo?: ExperimentInfo | null;
|
|
238
|
-
scheduledUpdates?:
|
|
239
|
+
scheduledUpdates?: CustomerPortalSubscriptionScheduledUpdateDataFragment[];
|
|
239
240
|
};
|
|
240
241
|
export declare type CustomerPortalBillingInformation = Omit<CustomerPortalBillingInformationFragment, '__typename'>;
|
|
241
242
|
export declare type CustomerPortalSubscriptionAddon = Omit<CustomerPortalSubscriptionAddonFragment, '__typename'>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
2
|
-
import { EntitlementFragment } from '../api/generated/types';
|
|
3
2
|
import { BooleanEntitlement, MeteredEntitlement, MeteredEntitlementOptions, NumericEntitlement, BooleanEntitlementOptions, NumericEntitlementOptions } from '../models';
|
|
4
3
|
import CachedEntitlement from './cachedEntitlement';
|
|
5
4
|
import { CacheService } from './cacheService';
|
|
6
5
|
import { Decision } from './entitlementDecisionService';
|
|
7
6
|
import { LoggerService } from './loggerService';
|
|
8
7
|
import { EdgeApiClient } from '../api/EdgeApiClient';
|
|
8
|
+
import { EntitlementFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
9
9
|
export declare class EntitlementsService {
|
|
10
10
|
private readonly customerId;
|
|
11
11
|
private readonly cacheService;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CustomerFragment,
|
|
1
|
+
import { CustomerFragment, EntitlementFragment, GetPaywallQuery } from '@stigg/api-client-js/src/generated/sdk';
|
|
2
|
+
import { EntitlementCheckResult, EntitlementResetPeriod as ApiEntitlementResetPeriod, FeatureType as ApiFeatureType, FetchCouponsQuery, GetMockPaywallQuery } from '../api/generated/types';
|
|
2
3
|
import { BooleanEntitlement, BooleanEntitlementFallback, Coupon, Customer, EntitlementResetPeriod, FeatureType, MeteredEntitlement, MeteredEntitlementFallback, NumericEntitlement, NumericEntitlementFallback, Paywall, Plan } from '../models';
|
|
3
4
|
import CachedEntitlement from '../services/cachedEntitlement';
|
|
4
5
|
import { Decision } from '../services/entitlementDecisionService';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigg/js-client-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Stigg client-side SDK for Browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@apollo/client": "^3.4.17",
|
|
31
31
|
"@sentry/browser": "^7.11.1",
|
|
32
|
+
"@stigg/api-client-js": "^0.3.0",
|
|
32
33
|
"axios": "^1.2.2",
|
|
33
34
|
"cross-fetch": "^3.1.4",
|
|
34
35
|
"graphql": "^16.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CUSTOMER_FRAGMENT: import("graphql/language/ast").DocumentNode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const PRICE_FRAGMENT: import("graphql/language/ast").DocumentNode;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SCHEDULED_UPDATES_FRAGMENT: import("graphql/language/ast").DocumentNode;
|