@invonetwork/web-sdk 3.33.0 → 3.34.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 +1500 -1490
- package/README.md +3006 -2990
- package/dist/chunk-73ZVDQZV.js +6 -0
- package/dist/{chunk-DHVHKFQH.js → chunk-D2AUZRYS.js} +152 -73
- package/dist/{chunk-MJAJXYFX.js → chunk-DMTNU5PM.js} +3 -3
- package/dist/{chunk-HQLPT2DY.js → chunk-R65CANFG.js} +13 -2
- package/dist/game-server.cjs +103 -4
- package/dist/game-server.d.cts +12 -8
- package/dist/game-server.d.ts +12 -8
- package/dist/game-server.js +11 -7
- package/dist/game.cjs +12 -1
- package/dist/game.d.cts +3 -3
- package/dist/game.d.ts +3 -3
- package/dist/game.js +3 -3
- package/dist/{hosted-approval-CYqqberu.d.cts → hosted-approval-C1hQvbu6.d.cts} +1 -1
- package/dist/{hosted-approval-CL3DfrGS.d.ts → hosted-approval-CFlj4UQE.d.ts} +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/{server-Dhao5prR.d.ts → server-CtXpytKt.d.ts} +38 -5
- package/dist/{server-5_g5C-no.d.cts → server-ZnCyLWA2.d.cts} +38 -5
- package/dist/server.cjs +152 -69
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +3 -3
- package/dist/{types-DUfQR48n.d.ts → types-Ctn8N2_l.d.cts} +15 -1
- package/dist/{types-DUfQR48n.d.cts → types-Ctn8N2_l.d.ts} +15 -1
- package/dist/{version-DKfrEYU1.d.cts → version-Ce_pLpJf.d.cts} +1 -1
- package/dist/{version-DKfrEYU1.d.ts → version-Ce_pLpJf.d.ts} +1 -1
- package/package.json +91 -91
- package/dist/chunk-VWUFSA6U.js +0 -6
|
@@ -297,6 +297,13 @@ declare class InvoError extends Error {
|
|
|
297
297
|
* Not retryable until INVO resumes payments; show a neutral "purchases are
|
|
298
298
|
* unavailable right now" message. */
|
|
299
299
|
get isPaymentsPaused(): boolean;
|
|
300
|
+
/** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
|
|
301
|
+
* additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
|
|
302
|
+
* (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
|
|
303
|
+
* you are calling, or point the SDK at the environment the key is for. The code is
|
|
304
|
+
* matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
|
|
305
|
+
* `error_code` / `code`), since the 401 may carry a different `code`. */
|
|
306
|
+
get isKeyForOtherEnvironment(): boolean;
|
|
300
307
|
/** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
|
|
301
308
|
* the buyer is unknown here or their balance is short. One answer on purpose; the
|
|
302
309
|
* balance is never disclosed. Offer another way to pay. */
|
|
@@ -985,7 +992,14 @@ interface InvoConfig {
|
|
|
985
992
|
hooks?: InvoHooks;
|
|
986
993
|
}
|
|
987
994
|
interface ServerConfig extends InvoConfig {
|
|
988
|
-
/**
|
|
995
|
+
/**
|
|
996
|
+
* The game secret. Server-side ONLY: never ship this to a browser.
|
|
997
|
+
*
|
|
998
|
+
* Keys made from 3.34.0 on name their environment: `ivsdk_live_...` is production and
|
|
999
|
+
* `ivsdk_test_...` is the sandbox. Pairing one with a `baseUrl` on the other INVO host
|
|
1000
|
+
* throws `KeyEnvironmentMismatchError` here, before any request. A `baseUrl` that is not
|
|
1001
|
+
* an INVO host (your own proxy) is not checked, nor is an older unprefixed `ivsdk_...` key.
|
|
1002
|
+
*/
|
|
989
1003
|
gameSecret: string;
|
|
990
1004
|
/**
|
|
991
1005
|
* The per-game **sandbox clock key** (`ivclk_...`) from the sandbox console (Game
|
|
@@ -297,6 +297,13 @@ declare class InvoError extends Error {
|
|
|
297
297
|
* Not retryable until INVO resumes payments; show a neutral "purchases are
|
|
298
298
|
* unavailable right now" message. */
|
|
299
299
|
get isPaymentsPaused(): boolean;
|
|
300
|
+
/** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
|
|
301
|
+
* additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
|
|
302
|
+
* (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
|
|
303
|
+
* you are calling, or point the SDK at the environment the key is for. The code is
|
|
304
|
+
* matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
|
|
305
|
+
* `error_code` / `code`), since the 401 may carry a different `code`. */
|
|
306
|
+
get isKeyForOtherEnvironment(): boolean;
|
|
300
307
|
/** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
|
|
301
308
|
* the buyer is unknown here or their balance is short. One answer on purpose; the
|
|
302
309
|
* balance is never disclosed. Offer another way to pay. */
|
|
@@ -985,7 +992,14 @@ interface InvoConfig {
|
|
|
985
992
|
hooks?: InvoHooks;
|
|
986
993
|
}
|
|
987
994
|
interface ServerConfig extends InvoConfig {
|
|
988
|
-
/**
|
|
995
|
+
/**
|
|
996
|
+
* The game secret. Server-side ONLY: never ship this to a browser.
|
|
997
|
+
*
|
|
998
|
+
* Keys made from 3.34.0 on name their environment: `ivsdk_live_...` is production and
|
|
999
|
+
* `ivsdk_test_...` is the sandbox. Pairing one with a `baseUrl` on the other INVO host
|
|
1000
|
+
* throws `KeyEnvironmentMismatchError` here, before any request. A `baseUrl` that is not
|
|
1001
|
+
* an INVO host (your own proxy) is not checked, nor is an older unprefixed `ivsdk_...` key.
|
|
1002
|
+
*/
|
|
989
1003
|
gameSecret: string;
|
|
990
1004
|
/**
|
|
991
1005
|
* The per-game **sandbox clock key** (`ivclk_...`) from the sandbox console (Game
|
package/package.json
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@invonetwork/web-sdk",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
|
|
5
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
-
"private": false,
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/Invo-Technologies/invo-web-sdk.git"
|
|
10
|
-
},
|
|
11
|
-
"homepage": "https://docs.invo.network",
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/Invo-Technologies/invo-web-sdk/issues"
|
|
14
|
-
},
|
|
15
|
-
"type": "module",
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=18"
|
|
18
|
-
},
|
|
19
|
-
"sideEffects": false,
|
|
20
|
-
"files": [
|
|
21
|
-
"dist",
|
|
22
|
-
"!dist/**/*.map",
|
|
23
|
-
"README.md",
|
|
24
|
-
"LICENSE",
|
|
25
|
-
"CHANGELOG.md"
|
|
26
|
-
],
|
|
27
|
-
"exports": {
|
|
28
|
-
".": {
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
|
-
"import": "./dist/index.js",
|
|
31
|
-
"require": "./dist/index.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./server": {
|
|
34
|
-
"types": "./dist/server.d.ts",
|
|
35
|
-
"import": "./dist/server.js",
|
|
36
|
-
"require": "./dist/server.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./game": {
|
|
39
|
-
"types": "./dist/game.d.ts",
|
|
40
|
-
"import": "./dist/game.js",
|
|
41
|
-
"require": "./dist/game.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./game-server": {
|
|
44
|
-
"types": "./dist/game-server.d.ts",
|
|
45
|
-
"import": "./dist/game-server.js",
|
|
46
|
-
"require": "./dist/game-server.cjs"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"main": "./dist/index.cjs",
|
|
50
|
-
"module": "./dist/index.js",
|
|
51
|
-
"types": "./dist/index.d.ts",
|
|
52
|
-
"scripts": {
|
|
53
|
-
"build": "tsup",
|
|
54
|
-
"dev": "tsup --watch",
|
|
55
|
-
"typecheck": "tsc --noEmit",
|
|
56
|
-
"lint": "eslint .",
|
|
57
|
-
"test": "vitest run",
|
|
58
|
-
"test:watch": "vitest",
|
|
59
|
-
"clean": "rimraf dist",
|
|
60
|
-
"changeset": "changeset",
|
|
61
|
-
"version-packages": "changeset version",
|
|
62
|
-
"release": "npm run build && changeset publish",
|
|
63
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
64
|
-
},
|
|
65
|
-
"keywords": [
|
|
66
|
-
"invo",
|
|
67
|
-
"webauthn",
|
|
68
|
-
"passkey",
|
|
69
|
-
"payments",
|
|
70
|
-
"game-currency",
|
|
71
|
-
"sdk",
|
|
72
|
-
"game",
|
|
73
|
-
"game-economy",
|
|
74
|
-
"browser-game",
|
|
75
|
-
"loyalty"
|
|
76
|
-
],
|
|
77
|
-
"publishConfig": {
|
|
78
|
-
"access": "public"
|
|
79
|
-
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"@changesets/cli": "^2.31.0",
|
|
82
|
-
"@eslint/js": "^10.0.1",
|
|
83
|
-
"eslint": "^10.6.0",
|
|
84
|
-
"happy-dom": "^15.11.7",
|
|
85
|
-
"rimraf": "^5.0.5",
|
|
86
|
-
"tsup": "^8.0.1",
|
|
87
|
-
"typescript": "^5.4.5",
|
|
88
|
-
"typescript-eslint": "^8.62.1",
|
|
89
|
-
"vitest": "^1.5.0"
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@invonetwork/web-sdk",
|
|
3
|
+
"version": "3.34.0",
|
|
4
|
+
"description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"private": false,
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Invo-Technologies/invo-web-sdk.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://docs.invo.network",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Invo-Technologies/invo-web-sdk/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"!dist/**/*.map",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"CHANGELOG.md"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"require": "./dist/index.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./server": {
|
|
34
|
+
"types": "./dist/server.d.ts",
|
|
35
|
+
"import": "./dist/server.js",
|
|
36
|
+
"require": "./dist/server.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./game": {
|
|
39
|
+
"types": "./dist/game.d.ts",
|
|
40
|
+
"import": "./dist/game.js",
|
|
41
|
+
"require": "./dist/game.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./game-server": {
|
|
44
|
+
"types": "./dist/game-server.d.ts",
|
|
45
|
+
"import": "./dist/game-server.js",
|
|
46
|
+
"require": "./dist/game-server.cjs"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"main": "./dist/index.cjs",
|
|
50
|
+
"module": "./dist/index.js",
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsup",
|
|
54
|
+
"dev": "tsup --watch",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"lint": "eslint .",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"test:watch": "vitest",
|
|
59
|
+
"clean": "rimraf dist",
|
|
60
|
+
"changeset": "changeset",
|
|
61
|
+
"version-packages": "changeset version",
|
|
62
|
+
"release": "npm run build && changeset publish",
|
|
63
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"invo",
|
|
67
|
+
"webauthn",
|
|
68
|
+
"passkey",
|
|
69
|
+
"payments",
|
|
70
|
+
"game-currency",
|
|
71
|
+
"sdk",
|
|
72
|
+
"game",
|
|
73
|
+
"game-economy",
|
|
74
|
+
"browser-game",
|
|
75
|
+
"loyalty"
|
|
76
|
+
],
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"access": "public"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@changesets/cli": "^2.31.0",
|
|
82
|
+
"@eslint/js": "^10.0.1",
|
|
83
|
+
"eslint": "^10.6.0",
|
|
84
|
+
"happy-dom": "^15.11.7",
|
|
85
|
+
"rimraf": "^5.0.5",
|
|
86
|
+
"tsup": "^8.0.1",
|
|
87
|
+
"typescript": "^5.4.5",
|
|
88
|
+
"typescript-eslint": "^8.62.1",
|
|
89
|
+
"vitest": "^1.5.0"
|
|
90
|
+
}
|
|
91
|
+
}
|