@mywebapi.com/sdk 0.1.1 → 0.2.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/README.md +64 -32
- package/dist/auth.d.ts +13 -3
- package/dist/browser/index.js +3675 -0
- package/dist/client.d.ts +2 -0
- package/dist/deadline.d.ts +1 -0
- package/dist/environments.d.ts +3 -0
- package/dist/errors.d.ts +1 -0
- package/dist/mutator.context.d.ts +14 -4
- package/dist/mutator.d.ts +6 -0
- package/dist/node/index.js +3670 -0
- package/dist/signalr.d.ts +4 -0
- package/package.json +28 -25
- package/dist/index.js +0 -6357
package/dist/signalr.d.ts
CHANGED
|
@@ -91,6 +91,10 @@ export interface SignalRClientExtras {
|
|
|
91
91
|
/** Reconnect intervals in milliseconds. Pass `false` to disable auto-reconnect.
|
|
92
92
|
* Default: `[0, 2000, 10_000, 30_000]` then give up. */
|
|
93
93
|
reconnect?: number[] | false;
|
|
94
|
+
/** OAuth and transport deadline in milliseconds. Defaults to 30 seconds. */
|
|
95
|
+
timeoutMs?: number;
|
|
96
|
+
/** Only tests may use plain HTTP for loopback endpoints. */
|
|
97
|
+
allowInsecureLoopback?: boolean;
|
|
94
98
|
}
|
|
95
99
|
export type MT4V2SignalRClientOptions = ({
|
|
96
100
|
tokenProvider: TokenProvider;
|
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mywebapi.com/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "Typed TypeScript SDK for the CPlugin WebAPI v2 — manage
|
|
5
|
+
"description": "Typed TypeScript SDK for the CPlugin WebAPI v2 — manage trading-platform servers from Node.js and browsers. OAuth2, retries, pagination and SignalR real-time included; types regenerated from the OpenAPI spec so they never drift.",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "./dist/index.js",
|
|
7
|
+
"main": "./dist/node/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"browser": "./dist/browser/index.js",
|
|
13
|
+
"node": "./dist/node/index.js",
|
|
14
|
+
"import": "./dist/node/index.js",
|
|
15
|
+
"default": "./dist/node/index.js"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
|
-
"files": [
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
16
23
|
"publishConfig": {
|
|
17
24
|
"access": "public"
|
|
18
25
|
},
|
|
@@ -22,46 +29,42 @@
|
|
|
22
29
|
},
|
|
23
30
|
"homepage": "https://cplugin.github.io/mywebapi.com-sdk-js/",
|
|
24
31
|
"keywords": [
|
|
25
|
-
"mt4",
|
|
26
|
-
"mt5",
|
|
27
|
-
"metatrader",
|
|
28
|
-
"forex",
|
|
29
|
-
"trading",
|
|
30
|
-
"broker",
|
|
31
32
|
"cplugin",
|
|
32
33
|
"webapi",
|
|
33
|
-
"
|
|
34
|
+
"trading",
|
|
35
|
+
"trading-platform",
|
|
36
|
+
"broker",
|
|
37
|
+
"forex",
|
|
34
38
|
"sdk",
|
|
39
|
+
"typescript",
|
|
40
|
+
"api-client",
|
|
41
|
+
"rest-api",
|
|
42
|
+
"openapi",
|
|
35
43
|
"signalr",
|
|
36
44
|
"real-time",
|
|
37
|
-
"
|
|
38
|
-
"openapi"
|
|
45
|
+
"oauth2"
|
|
39
46
|
],
|
|
40
47
|
"bugs": {
|
|
41
48
|
"url": "https://github.com/CPlugin/mywebapi.com-sdk-js/issues"
|
|
42
49
|
},
|
|
43
50
|
"scripts": {
|
|
44
51
|
"generate": "orval --config orval.config.ts",
|
|
45
|
-
"build": "rm -rf dist && bun build src/index.ts --outdir dist --target browser --format esm && tsc -p tsconfig.build.json --emitDeclarationOnly --declaration",
|
|
52
|
+
"build": "rm -rf dist && mkdir -p dist/node dist/browser && bun build src/index.ts --outdir dist/node --target node --format esm --external @microsoft/signalr && bun build src/index.ts --outdir dist/browser --target browser --format esm --external @microsoft/signalr && tsc -p tsconfig.build.json --emitDeclarationOnly --declaration",
|
|
46
53
|
"test": "bun test",
|
|
47
54
|
"test:e2e": "WEBAPI_E2E=1 bun test e2e",
|
|
55
|
+
"docs": "typedoc",
|
|
48
56
|
"typecheck": "tsc --noEmit"
|
|
49
57
|
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"@microsoft/signalr": "^9.0.0 || ^10.0.0"
|
|
52
|
-
},
|
|
53
|
-
"peerDependenciesMeta": {
|
|
54
|
-
"@microsoft/signalr": {
|
|
55
|
-
"optional": true
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@microsoft/signalr": "^10.0.0",
|
|
60
59
|
"@types/bun": "latest",
|
|
61
60
|
"orval": "8.19.0",
|
|
61
|
+
"typedoc": "^0.28.19",
|
|
62
62
|
"typescript": "^5.4.0"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"bun": ">=1.0.0"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@microsoft/signalr": "10.0.0"
|
|
66
69
|
}
|
|
67
70
|
}
|