@stigg/js-client-sdk 3.89.0 → 3.92.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/CHANGELOG.md +62 -0
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.LICENSE.txt +0 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.LICENSE.txt +0 -15
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +9 -3
- package/dist/services/cachedEntitlement.d.ts +3 -3
- package/package.json +12 -38
package/dist/models.d.ts
CHANGED
|
@@ -65,13 +65,19 @@ export declare const NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT: NumericEntitlement;
|
|
|
65
65
|
export declare const METERED_DEFAULT_FALLBACK_ENTITLEMENT: MeteredEntitlement;
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ENUM_DEFAULT_FALLBACK_ENTITLEMENT: EnumEntitlement;
|
|
68
|
+
export type CreditEntitlementCurrency = {
|
|
69
|
+
currencyId: string;
|
|
70
|
+
displayName?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
unitSingular?: string;
|
|
73
|
+
unitPlural?: string;
|
|
74
|
+
additionalMetaData?: Record<string, unknown>;
|
|
75
|
+
};
|
|
68
76
|
export interface CreditEntitlement {
|
|
69
77
|
hasAccess: boolean;
|
|
70
78
|
isFallback: boolean;
|
|
71
79
|
accessDeniedReason?: AccessDeniedReason;
|
|
72
|
-
currency:
|
|
73
|
-
currencyId: string;
|
|
74
|
-
};
|
|
80
|
+
currency: CreditEntitlementCurrency;
|
|
75
81
|
usageLimit: number;
|
|
76
82
|
currentUsage: number;
|
|
77
83
|
remaining: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntitlementFeature, EntitlementResetPeriod } from '../models';
|
|
1
|
+
import { CreditEntitlementCurrency, EntitlementFeature, EntitlementResetPeriod } from '../models';
|
|
2
2
|
import { AccessDeniedReason, EntitlementsStateAccessDeniedReason, ResetPeriodConfigurationFragment } from '@stigg/api-client-js/src/generated/sdk';
|
|
3
3
|
export interface CalculatedEntitlement {
|
|
4
4
|
usageLimit?: number | null;
|
|
@@ -27,7 +27,7 @@ export default class CachedEntitlement {
|
|
|
27
27
|
constructor(calculatedEntitlement: CalculatedEntitlement, featureUsage: EntitlementUsage);
|
|
28
28
|
}
|
|
29
29
|
export interface CachedCreditEntitlementData {
|
|
30
|
-
|
|
30
|
+
currency: CreditEntitlementCurrency;
|
|
31
31
|
isGranted: boolean;
|
|
32
32
|
accessDeniedReason?: AccessDeniedReason;
|
|
33
33
|
usageLimit: number;
|
|
@@ -35,7 +35,7 @@ export interface CachedCreditEntitlementData {
|
|
|
35
35
|
usagePeriodEnd?: Date;
|
|
36
36
|
}
|
|
37
37
|
export declare class CachedCreditEntitlement {
|
|
38
|
-
readonly
|
|
38
|
+
readonly currency: CreditEntitlementCurrency;
|
|
39
39
|
readonly isGranted: boolean;
|
|
40
40
|
readonly accessDeniedReason?: AccessDeniedReason;
|
|
41
41
|
readonly usageLimit: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigg/js-client-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.92.0",
|
|
4
4
|
"description": "Stigg client-side SDK for Browser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -12,22 +12,17 @@
|
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"repository":
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/stiggio/stigg-sdk.git",
|
|
18
|
+
"directory": "packages/js-client-sdk"
|
|
19
|
+
},
|
|
16
20
|
"license": "MIT",
|
|
17
21
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
"build
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"build:prod": "yarn build:types && webpack --env production",
|
|
23
|
-
"link-sdk": "yarn build && yarn link",
|
|
24
|
-
"fix": "run-s fix:*",
|
|
25
|
-
"fix:prettier": "prettier \"src/**/*.ts\" --write",
|
|
26
|
-
"fix:lint": "eslint src --fix",
|
|
27
|
-
"test": "jest --silent",
|
|
28
|
-
"test:watch": "jest --watch",
|
|
29
|
-
"test:cov": "jest --coverage",
|
|
30
|
-
"prepare": "husky install",
|
|
22
|
+
"build:types": "yarn run -T tsc --emitDeclarationOnly",
|
|
23
|
+
"build": "yarn build:types && webpack --env production",
|
|
24
|
+
"test": "yarn run -T jest --silent",
|
|
25
|
+
"lint": "yarn run -T eslint 'src/**/*.ts'",
|
|
31
26
|
"docs": "typedoc"
|
|
32
27
|
},
|
|
33
28
|
"files": [
|
|
@@ -36,48 +31,27 @@
|
|
|
36
31
|
"dependencies": {
|
|
37
32
|
"@apollo/client": "^3.4.17",
|
|
38
33
|
"@sentry/browser": "^7.11.1",
|
|
39
|
-
"@stigg/api-client-js": "5.248.
|
|
34
|
+
"@stigg/api-client-js": "5.248.4",
|
|
40
35
|
"cross-fetch": "^3.1.6",
|
|
41
36
|
"dayjs": "^1.11.13",
|
|
42
37
|
"fetch-retry": "^5.0.6",
|
|
43
|
-
"husky": "^7.0.4",
|
|
44
38
|
"lodash": "^4.17.21",
|
|
45
39
|
"tiny-typed-emitter": "^2.1.0"
|
|
46
40
|
},
|
|
47
41
|
"devDependencies": {
|
|
48
|
-
"@commitlint/cli": "^14.1.0",
|
|
49
|
-
"@commitlint/config-conventional": "^14.1.0",
|
|
50
|
-
"@eslint/js": "^10.0.1",
|
|
51
42
|
"@mswjs/interceptors": "^0.37",
|
|
52
|
-
"@types/jest": "^30.0.0",
|
|
53
43
|
"@types/lodash": "^4.14.177",
|
|
54
|
-
"eslint": "^10.0.0",
|
|
55
|
-
"eslint-config-prettier": "^10.1.8",
|
|
56
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
57
|
-
"jest": "^30.2.0",
|
|
58
44
|
"jest-environment-jsdom": "^30.2.0",
|
|
59
45
|
"jest-fetch-mock": "^3.0.3",
|
|
60
|
-
"lint-staged": "^12.0.2",
|
|
61
46
|
"msw": "^0.35.0",
|
|
62
|
-
"npm-run-all": "^4.1.5",
|
|
63
|
-
"prettier": "^3.8.1",
|
|
64
|
-
"ts-jest": "^29.4.6",
|
|
65
47
|
"ts-loader": "^9.2.6",
|
|
66
48
|
"typedoc": "^0.22.13",
|
|
67
49
|
"typedoc-plugin-rename-defaults": "^0.4.0",
|
|
68
|
-
"typescript": "^5.9.3",
|
|
69
|
-
"typescript-eslint": "^8.56.0",
|
|
70
50
|
"webpack": "^5.64.1",
|
|
71
51
|
"webpack-cli": "^4.9.1",
|
|
72
52
|
"webpack-dev-server": "^4.5.0"
|
|
73
53
|
},
|
|
74
54
|
"publishConfig": {
|
|
75
55
|
"access": "public"
|
|
76
|
-
},
|
|
77
|
-
"lint-staged": {
|
|
78
|
-
"*.{js,jsx,ts,tsx}": [
|
|
79
|
-
"prettier --write",
|
|
80
|
-
"eslint --cache"
|
|
81
|
-
]
|
|
82
56
|
}
|
|
83
|
-
}
|
|
57
|
+
}
|