@stigg/js-client-sdk 3.66.0 → 3.68.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/client.d.ts +6 -2
- package/dist/index.esm.js +65 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +65 -19
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +3 -1
- package/dist/offlineClient.d.ts +1 -1
- package/dist/src/client.d.ts +6 -2
- package/dist/src/models.d.ts +3 -1
- package/dist/src/offlineClient.d.ts +1 -1
- package/package.json +3 -2
package/dist/models.d.ts
CHANGED
|
@@ -311,6 +311,7 @@ export declare type Addon = {
|
|
|
311
311
|
dependencies?: DependencyAddon[];
|
|
312
312
|
metadata?: Metadata | null;
|
|
313
313
|
hiddenFromWidgets?: PackageEntitlementFragment['hiddenFromWidgets'];
|
|
314
|
+
maxQuantity?: number;
|
|
314
315
|
};
|
|
315
316
|
export declare type SubscriptionAddon = {
|
|
316
317
|
quantity: number;
|
|
@@ -366,11 +367,12 @@ export declare type CustomerPortal = {
|
|
|
366
367
|
entitlements: CustomerPortalEntitlement[];
|
|
367
368
|
promotionalEntitlements: CustomerPortalPromotionalEntitlement[];
|
|
368
369
|
billingInformation: CustomerPortalBillingInformation;
|
|
369
|
-
showWatermark: boolean;
|
|
370
370
|
canUpgradeSubscription: boolean;
|
|
371
371
|
billingPortalUrl?: string | null;
|
|
372
372
|
configuration?: CustomerPortalConfiguration | null;
|
|
373
373
|
resource: CustomerResource | null;
|
|
374
|
+
/** @deprecated This field has been moved to SDK configuration */
|
|
375
|
+
showWatermark?: boolean;
|
|
374
376
|
};
|
|
375
377
|
export declare type CheckoutStatePlan = Plan & Pick<PlanFragment, 'prices'>;
|
|
376
378
|
export declare type CheckoutBillingIntegration = {
|
package/dist/offlineClient.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare class OfflineStigg extends Stigg {
|
|
|
14
14
|
getSubscription(): Promise<Subscription>;
|
|
15
15
|
get isCustomerLoaded(): boolean;
|
|
16
16
|
get isResourceLoaded(): boolean;
|
|
17
|
-
get isWidgetWatermarkEnabled(): boolean;
|
|
18
17
|
removeListener(): void;
|
|
19
18
|
waitForInitialization(): Promise<StiggClient>;
|
|
20
19
|
setResource(): Promise<void>;
|
|
@@ -39,4 +38,5 @@ export declare class OfflineStigg extends Stigg {
|
|
|
39
38
|
getCreditLedger(): Promise<CreditLedgerFragment[]>;
|
|
40
39
|
getCreditUsage(): Promise<CreditUsageFragment>;
|
|
41
40
|
createPaymentSession(): Promise<PaymentSessionFragment>;
|
|
41
|
+
getShowWatermark(): boolean;
|
|
42
42
|
}
|
package/dist/src/client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { LoggerService } from './services/loggerService';
|
|
|
6
6
|
export interface StiggClient {
|
|
7
7
|
isCustomerLoaded: boolean;
|
|
8
8
|
isResourceLoaded: boolean;
|
|
9
|
+
/** @deprecated Use {@link getShowWatermark} instead */
|
|
9
10
|
isWidgetWatermarkEnabled: boolean;
|
|
10
11
|
getBooleanEntitlement: (params: GetBooleanEntitlement) => BooleanEntitlement;
|
|
11
12
|
getNumericEntitlement: (params: GetNumericEntitlement) => NumericEntitlement;
|
|
@@ -42,6 +43,7 @@ export interface StiggClient {
|
|
|
42
43
|
getCreditLedger(input?: GetCreditLedgerInput): Promise<CreditLedgerFragment[]>;
|
|
43
44
|
getCreditUsage(input: GetCreditUsageInput): Promise<CreditUsageFragment>;
|
|
44
45
|
createPaymentSession(input: CreatePaymentSessionInput): Promise<PaymentSessionFragment>;
|
|
46
|
+
getShowWatermark(): boolean;
|
|
45
47
|
}
|
|
46
48
|
export declare class Stigg implements StiggClient {
|
|
47
49
|
private readonly apiGateway;
|
|
@@ -54,7 +56,9 @@ export declare class Stigg implements StiggClient {
|
|
|
54
56
|
private readonly modelMapper;
|
|
55
57
|
private readonly eventEmitter;
|
|
56
58
|
private readonly initializationStateTracker;
|
|
57
|
-
private
|
|
59
|
+
private showWatermark;
|
|
60
|
+
/** @deprecated Use {@link getShowWatermark} instead */
|
|
61
|
+
isWidgetWatermarkEnabled: boolean;
|
|
58
62
|
protected constructor(configuration: Required<ClientConfiguration>, loggerService: LoggerService);
|
|
59
63
|
/**
|
|
60
64
|
* Creates an instance of Stigg client.
|
|
@@ -75,7 +79,7 @@ export declare class Stigg implements StiggClient {
|
|
|
75
79
|
private static initializeSdk;
|
|
76
80
|
get isCustomerLoaded(): boolean;
|
|
77
81
|
get isResourceLoaded(): boolean;
|
|
78
|
-
|
|
82
|
+
getShowWatermark(): boolean;
|
|
79
83
|
/**
|
|
80
84
|
* Add a listener to handle updates of entitlements changes
|
|
81
85
|
* @param eventName
|
package/dist/src/models.d.ts
CHANGED
|
@@ -311,6 +311,7 @@ export declare type Addon = {
|
|
|
311
311
|
dependencies?: DependencyAddon[];
|
|
312
312
|
metadata?: Metadata | null;
|
|
313
313
|
hiddenFromWidgets?: PackageEntitlementFragment['hiddenFromWidgets'];
|
|
314
|
+
maxQuantity?: number;
|
|
314
315
|
};
|
|
315
316
|
export declare type SubscriptionAddon = {
|
|
316
317
|
quantity: number;
|
|
@@ -366,11 +367,12 @@ export declare type CustomerPortal = {
|
|
|
366
367
|
entitlements: CustomerPortalEntitlement[];
|
|
367
368
|
promotionalEntitlements: CustomerPortalPromotionalEntitlement[];
|
|
368
369
|
billingInformation: CustomerPortalBillingInformation;
|
|
369
|
-
showWatermark: boolean;
|
|
370
370
|
canUpgradeSubscription: boolean;
|
|
371
371
|
billingPortalUrl?: string | null;
|
|
372
372
|
configuration?: CustomerPortalConfiguration | null;
|
|
373
373
|
resource: CustomerResource | null;
|
|
374
|
+
/** @deprecated This field has been moved to SDK configuration */
|
|
375
|
+
showWatermark?: boolean;
|
|
374
376
|
};
|
|
375
377
|
export declare type CheckoutStatePlan = Plan & Pick<PlanFragment, 'prices'>;
|
|
376
378
|
export declare type CheckoutBillingIntegration = {
|
|
@@ -14,7 +14,6 @@ export declare class OfflineStigg extends Stigg {
|
|
|
14
14
|
getSubscription(): Promise<Subscription>;
|
|
15
15
|
get isCustomerLoaded(): boolean;
|
|
16
16
|
get isResourceLoaded(): boolean;
|
|
17
|
-
get isWidgetWatermarkEnabled(): boolean;
|
|
18
17
|
removeListener(): void;
|
|
19
18
|
waitForInitialization(): Promise<StiggClient>;
|
|
20
19
|
setResource(): Promise<void>;
|
|
@@ -39,4 +38,5 @@ export declare class OfflineStigg extends Stigg {
|
|
|
39
38
|
getCreditLedger(): Promise<CreditLedgerFragment[]>;
|
|
40
39
|
getCreditUsage(): Promise<CreditUsageFragment>;
|
|
41
40
|
createPaymentSession(): Promise<PaymentSessionFragment>;
|
|
41
|
+
getShowWatermark(): boolean;
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigg/js-client-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.68.0",
|
|
4
4
|
"description": "Stigg client-side SDK for Browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"build": "yarn build:types && webpack",
|
|
21
21
|
"build:watch": "webpack --watch",
|
|
22
22
|
"build:prod": "yarn build:types && webpack --env production",
|
|
23
|
+
"link-sdk": "yarn build && yarn link",
|
|
23
24
|
"fix": "run-s fix:*",
|
|
24
25
|
"fix:prettier": "prettier \"src/**/*.ts\" --write",
|
|
25
26
|
"fix:lint": "eslint src --ext .ts --fix",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@apollo/client": "^3.4.17",
|
|
38
39
|
"@sentry/browser": "^7.11.1",
|
|
39
|
-
"@stigg/api-client-js": "3.
|
|
40
|
+
"@stigg/api-client-js": "3.123.0",
|
|
40
41
|
"cross-fetch": "^3.1.6",
|
|
41
42
|
"dayjs": "^1.11.13",
|
|
42
43
|
"fetch-retry": "^5.0.6",
|