@stigg/js-client-sdk 3.98.4 → 3.98.5
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/client.d.ts +3 -1
- package/dist/index.esm.js +1 -2645
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -2645
- package/dist/index.js.map +1 -1
- package/dist/initializeStigg.d.ts +10 -0
- package/dist/offlineClient.d.ts +4 -1
- package/package.json +3 -1
- package/dist/clients.d.ts +0 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StiggClient } from './client';
|
|
2
|
+
import { ClientConfiguration } from './configuration';
|
|
3
|
+
/**
|
|
4
|
+
* Factory that creates the appropriate Stigg client instance.
|
|
5
|
+
* Handles the offline vs online branching.
|
|
6
|
+
*
|
|
7
|
+
* This is wired into Stigg.initialize from index.ts to avoid a circular dependency:
|
|
8
|
+
* client.ts must not import offlineClient.ts (which extends Stigg).
|
|
9
|
+
*/
|
|
10
|
+
export declare function initializeStigg(configuration: ClientConfiguration): StiggClient;
|
package/dist/offlineClient.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Stigg, StiggClient } from './
|
|
1
|
+
import { Stigg, StiggClient } from './client';
|
|
2
|
+
import { ClientConfiguration } from './configuration';
|
|
3
|
+
import { LoggerService } from './services/loggerService';
|
|
2
4
|
import { ApplySubscriptionResults, AutomaticRechargeConfiguration, BooleanEntitlement, Coupon, CreditEntitlement, CreditsBalanceSummaryFragment, CreditUsageFragment, Customer, CustomerPortal, Entitlement, EntitlementsState, EnumEntitlement, GetAutomaticRechargeConfigurationInput, GetBooleanEntitlement, GetCheckoutStateResults, GetCreditEntitlement, GetCreditGrantsResult, GetCreditLedgerResult, GetEnumEntitlement, GetMeteredEntitlement, GetNumericEntitlement, GetSubscriptionsResult, MeteredEntitlement, NumericEntitlement, PaymentSessionFragment, Paywall, SaveAutomaticRechargeConfigurationInput, SlimSubscriptionFragmentV2Fragment, Subscription, SubscriptionInvoicePreviewFragment, SubscriptionPreview, SubscriptionPreviewV2, UsageHistoryPoint, UsageHistoryV2Fragment } from './models';
|
|
3
5
|
export declare class OfflineStigg extends Stigg {
|
|
6
|
+
static createOffline(config: Required<ClientConfiguration>, loggerService: LoggerService): OfflineStigg;
|
|
4
7
|
getBooleanEntitlement({ featureId, options }: GetBooleanEntitlement): BooleanEntitlement;
|
|
5
8
|
getMeteredEntitlement({ featureId, options }: GetMeteredEntitlement): MeteredEntitlement;
|
|
6
9
|
getNumericEntitlement({ featureId, options }: GetNumericEntitlement): NumericEntitlement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigg/js-client-sdk",
|
|
3
|
-
"version": "3.98.
|
|
3
|
+
"version": "3.98.5",
|
|
4
4
|
"description": "Stigg client-side SDK for Browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@mswjs/interceptors": "^0.37",
|
|
48
|
+
"@types/circular-dependency-plugin": "5.0.8",
|
|
48
49
|
"@types/lodash": "^4.14.177",
|
|
50
|
+
"circular-dependency-plugin": "5.2.2",
|
|
49
51
|
"jest-environment-jsdom": "^30.2.0",
|
|
50
52
|
"jest-fetch-mock": "^3.0.3",
|
|
51
53
|
"msw": "^0.35.0",
|
package/dist/clients.d.ts
DELETED