@prosopo/api 3.1.41 → 3.4.9
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/.turbo/turbo-build$colon$cjs.log +8 -8
- package/.turbo/turbo-build$colon$tsc.log +9 -9
- package/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +315 -0
- package/dist/api/HttpClientBase.d.ts +4 -0
- package/dist/api/HttpClientBase.d.ts.map +1 -1
- package/dist/api/HttpClientBase.js +24 -0
- package/dist/api/HttpClientBase.js.map +1 -1
- package/dist/api/ProviderApi.d.ts +24 -8
- package/dist/api/ProviderApi.d.ts.map +1 -1
- package/dist/api/ProviderApi.js +204 -13
- package/dist/api/ProviderApi.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/cjs/api/HttpClientBase.cjs +24 -0
- package/dist/cjs/api/ProviderApi.cjs +203 -12
- package/dist/cjs/api/index.cjs +2 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/index.js +2 -0
- package/package.json +5 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/api@3.
|
|
2
|
+
> @prosopo/api@3.4.9 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -26,10 +26,10 @@ Build end
|
|
|
26
26
|
[32m✓[39m 6 modules transformed.
|
|
27
27
|
[33mEntry module "src/api/HttpClientBase.ts" is using named and default exports together. Consumers of your bundle will have to use `..default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.[39m
|
|
28
28
|
rendering chunks...
|
|
29
|
-
[2mdist/cjs/[22m[36mapi/
|
|
30
|
-
[2mdist/cjs/[22m[36mapi/
|
|
31
|
-
[2mdist/cjs/[22m[
|
|
32
|
-
[2mdist/cjs/[22m[
|
|
33
|
-
[2mdist/cjs/[22m[36mapi/HttpClientBase.cjs [39m[1m[
|
|
34
|
-
[2mdist/cjs/[22m[36mapi/ProviderApi.cjs [39m[1m[
|
|
35
|
-
[32m✓ built in
|
|
29
|
+
[2mdist/cjs/[22m[36mapi/HttpError.cjs [39m[1m[2m 0.38 kB[22m[1m[22m
|
|
30
|
+
[2mdist/cjs/[22m[36mapi/apiClient.cjs [39m[1m[2m 0.42 kB[22m[1m[22m
|
|
31
|
+
[2mdist/cjs/[22m[36mapi/index.cjs [39m[1m[2m 0.46 kB[22m[1m[22m
|
|
32
|
+
[2mdist/cjs/[22m[36mindex.cjs [39m[1m[2m 0.50 kB[22m[1m[22m
|
|
33
|
+
[2mdist/cjs/[22m[36mapi/HttpClientBase.cjs [39m[1m[2m 2.90 kB[22m[1m[22m
|
|
34
|
+
[2mdist/cjs/[22m[36mapi/ProviderApi.cjs [39m[1m[2m13.10 kB[22m[1m[22m
|
|
35
|
+
[32m✓ built in 223ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/api@3.
|
|
2
|
+
> @prosopo/api@3.4.9 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
10:13:09 AM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
* ../types/tsconfig.json
|
|
11
11
|
* tsconfig.json
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
10:13:09 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
10:13:09 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/util.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
10:13:09 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
10:13:09 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
10:13:09 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
10:13:09 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
10:13:09 AM - Building project '/home/runner/work/captcha/captcha/packages/api/tsconfig.json'...
|
|
26
26
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/api@3.
|
|
2
|
+
> @prosopo/api@3.4.9 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/api@3.
|
|
6
|
+
> @prosopo/api@3.4.9 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -29,10 +29,10 @@ transforming...
|
|
|
29
29
|
Build end
|
|
30
30
|
[32m✓[39m 6 modules transformed.
|
|
31
31
|
rendering chunks...
|
|
32
|
-
[2mdist/[22m[36mapi/index.js [39m[1m[
|
|
33
|
-
[2mdist/[22m[
|
|
34
|
-
[2mdist/[22m[36mapi/
|
|
35
|
-
[2mdist/[22m[
|
|
36
|
-
[2mdist/[22m[36mapi/HttpClientBase.js [39m[1m[
|
|
37
|
-
[2mdist/[22m[36mapi/ProviderApi.js [39m[1m[
|
|
38
|
-
[32m✓ built in
|
|
32
|
+
[2mdist/[22m[36mapi/index.js [39m[1m[2m 0.28 kB[22m[1m[22m
|
|
33
|
+
[2mdist/[22m[36mapi/HttpError.js [39m[1m[2m 0.29 kB[22m[1m[22m
|
|
34
|
+
[2mdist/[22m[36mapi/apiClient.js [39m[1m[2m 0.31 kB[22m[1m[22m
|
|
35
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 0.32 kB[22m[1m[22m
|
|
36
|
+
[2mdist/[22m[36mapi/HttpClientBase.js [39m[1m[2m 2.71 kB[22m[1m[22m
|
|
37
|
+
[2mdist/[22m[36mapi/ProviderApi.js [39m[1m[2m12.68 kB[22m[1m[22m
|
|
38
|
+
[32m✓ built in 189ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,320 @@
|
|
|
1
1
|
# @prosopo/api
|
|
2
2
|
|
|
3
|
+
## 3.4.9
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [b03dad1]
|
|
7
|
+
- @prosopo/types@4.3.1
|
|
8
|
+
|
|
9
|
+
## 3.4.8
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [a1d60db]
|
|
13
|
+
- Updated dependencies [2392aaf]
|
|
14
|
+
- @prosopo/types@4.3.0
|
|
15
|
+
|
|
16
|
+
## 3.4.7
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 6c26669: Add per-site honeypot trap. When enabled, the provider attaches an encoded question (morse or semaphore, base64-wrapped) in the `x-prosopo-meta` response header on frictionless responses. The widget renders the value into an off-screen hidden input with `name="email_confirm"`; bots that auto-fill text inputs populate it and the value rides back on the solution submit as `clientMetaData.hp`, which is persisted on the `StoredCaptcha` record. Falls back to a random phrase from `PROSOPO_HONEYPOT_PHRASE_BANK_PATH` when no custom question is configured.
|
|
20
|
+
- Updated dependencies [6c26669]
|
|
21
|
+
- Updated dependencies [f7f9ec5]
|
|
22
|
+
- @prosopo/types@4.2.1
|
|
23
|
+
|
|
24
|
+
## 3.4.6
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [20cae63]
|
|
28
|
+
- Updated dependencies [4d9923e]
|
|
29
|
+
- @prosopo/types@4.2.0
|
|
30
|
+
|
|
31
|
+
## 3.4.5
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [d351362]
|
|
35
|
+
- @prosopo/types@4.1.4
|
|
36
|
+
|
|
37
|
+
## 3.4.4
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [e2711ae]
|
|
41
|
+
- Updated dependencies [5786629]
|
|
42
|
+
- @prosopo/types@4.1.3
|
|
43
|
+
|
|
44
|
+
## 3.4.3
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- @prosopo/types@4.1.2
|
|
48
|
+
|
|
49
|
+
## 3.4.2
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 91958da: Puzzle captcha + maintenance mode hardening, plus a refactor of the
|
|
53
|
+
frictionless handler into focused modules.
|
|
54
|
+
|
|
55
|
+
- **Puzzle captcha now records checkbox-click coordinates like POW.** Adds an
|
|
56
|
+
optional `salt` field to `SubmitPuzzleCaptchaSolutionBody`; the puzzle
|
|
57
|
+
widget hashes the click coords into the salt and the server decodes them
|
|
58
|
+
into the puzzle record's `coords` field on submit. New `start(x, y)`
|
|
59
|
+
parameters on `procaptcha-puzzle` Manager + widget.
|
|
60
|
+
- **Fix puzzle "No session found" caused by stale Redis dedup.** The
|
|
61
|
+
`/frictionless` dedup path is now Mongo-authoritative — Redis is no
|
|
62
|
+
longer consulted as a session source. A concurrent `/captcha/{type}`
|
|
63
|
+
invalidation could previously race a fire-and-forget Redis repopulation
|
|
64
|
+
in the `/frictionless` dedup branch, leaving Redis pointing at a
|
|
65
|
+
Mongo-deleted session for the full 1-hour TTL. Stale pointers are now
|
|
66
|
+
evicted lazily.
|
|
67
|
+
- **Maintenance mode operates without MongoDB.** `/frictionless` and
|
|
68
|
+
`/captcha/{pow,puzzle}` short-circuit to dummy responses before any DB
|
|
69
|
+
call, and `Environment.isReady()` tolerates a Mongo connect failure when
|
|
70
|
+
`MAINTENANCE_MODE=true` so the provider can start with Mongo down.
|
|
71
|
+
- **Refactor `getFrictionlessCaptchaChallenge.ts` into focused modules** under
|
|
72
|
+
`getFrictionlessCaptchaChallenge/` (handler, sessionDedup, shortCircuit,
|
|
73
|
+
accessPolicy, decisionMachine, decryptSimdReadings, constants). Original
|
|
74
|
+
import path preserved via a re-export shim.
|
|
75
|
+
- **Move `RedisWriteQueue` from `@prosopo/provider` to `@prosopo/database`**
|
|
76
|
+
(where the Redis connection itself lives), and clear residual Redis
|
|
77
|
+
session keys at provider startup via `Environment.cleanup()` so a
|
|
78
|
+
previously-crashed run can't leak stale dedup pointers.
|
|
79
|
+
- Adds puzzle-type branch to access-policy handling in `/frictionless`.
|
|
80
|
+
- Updated dependencies [91958da]
|
|
81
|
+
- @prosopo/types@4.1.1
|
|
82
|
+
|
|
83
|
+
## 3.4.1
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [6a741ce]
|
|
87
|
+
- @prosopo/types@4.1.0
|
|
88
|
+
|
|
89
|
+
## 3.4.0
|
|
90
|
+
### Minor Changes
|
|
91
|
+
|
|
92
|
+
- d865319: Add puzzle captcha (drag-to-target challenge) as a new captcha type:
|
|
93
|
+
provider endpoints, manager + widget package, types, demo pages, and
|
|
94
|
+
a `puzzleTolerance` site setting.
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- 3c0be68: Add a new admin-only endpoint `POST /v1/prosopo/provider/admin/counters/clear-all`
|
|
99
|
+
for deleting per-sitekey usage counters from Redis. Intended for manual
|
|
100
|
+
testing of routing decision machines and staging-environment resets — not
|
|
101
|
+
part of the hot path.
|
|
102
|
+
|
|
103
|
+
- `ClearAllCountersBody` (optional `dapp`) and `ClearAllCountersResponse`
|
|
104
|
+
(`success`, `deletedCount`, `scope`) zod schemas in `@prosopo/types`,
|
|
105
|
+
plus `AdminApiPaths.ClearAllCounters` and a 10/60s rate limit.
|
|
106
|
+
- `UsageCounters.clearAll(dappAccount?)` in the provider, using Redis
|
|
107
|
+
`SCAN` + `DEL` in 500-key batches. Returns null on Redis failure so
|
|
108
|
+
callers can surface the underlying error.
|
|
109
|
+
- `ApiClearAllCountersEndpoint` wired through `ApiAdminRoutesProvider`.
|
|
110
|
+
- `ProviderApi.clearAllCounters(jwt, dappAccount?)` client method.
|
|
111
|
+
- 4aae4e6: Plumb the WASM SIMD CPU fingerprint readings (collected by the catcher
|
|
112
|
+
client per https://blog.azerpas.com/writing/wasm-simd-fingerprinting/)
|
|
113
|
+
through the captcha flow and onto the linked `Session` record.
|
|
114
|
+
Collection-only — no scoring or classification yet.
|
|
115
|
+
|
|
116
|
+
The readings are sent at the earliest moment they're available so the
|
|
117
|
+
signal lands on the session as soon as possible:
|
|
118
|
+
|
|
119
|
+
1. **Captcha-challenge GET** (PoW / Puzzle / Image) — the procaptcha
|
|
120
|
+
Manager calls `frictionlessState.getSimdReadings(0)` (non-blocking
|
|
121
|
+
cache check) and attaches it to the challenge-request body. The
|
|
122
|
+
provider handler decodes and patches the linked session via
|
|
123
|
+
`updateSessionRecord`.
|
|
124
|
+
2. **Solution submission** (PoW / Puzzle / Image) — same non-blocking
|
|
125
|
+
check on the submit body. Acts as a backup if the benchmark wasn't
|
|
126
|
+
ready in time for the challenge GET.
|
|
127
|
+
|
|
128
|
+
Frictionless init itself stays SIMD-free (benchmark is too slow to gate
|
|
129
|
+
the first hop).
|
|
130
|
+
|
|
131
|
+
Surface area:
|
|
132
|
+
|
|
133
|
+
- `SimdReadings` discriminated union + `SimdOpReadingRecord` /
|
|
134
|
+
`SimdOpCategory` in `@prosopo/types`, plus `simdReadingsCodec` shared
|
|
135
|
+
encode/decode helpers so the browser SDK and the provider use the same
|
|
136
|
+
pipe-safe wire format.
|
|
137
|
+
- Optional `simdReadings: string()` on `CaptchaRequestBody`,
|
|
138
|
+
`GetPowCaptchaChallengeRequestBody`, `GetPuzzleCaptchaChallengeRequestBody`,
|
|
139
|
+
`CaptchaSolutionBody`, `SubmitPowCaptchaSolutionBody`, and
|
|
140
|
+
`SubmitPuzzleCaptchaSolutionBody`.
|
|
141
|
+
- `FrictionlessState.getSimdReadings` + `BotDetectionFunctionResult.getSimdReadings`
|
|
142
|
+
so the catcher's prefetched benchmark is consumed at the request sites.
|
|
143
|
+
- `ProcaptchaApiInterface.{getCaptchaChallenge, submitCaptchaSolution}` and
|
|
144
|
+
the `ProviderApi.{getCaptchaChallenge, getPowCaptchaChallenge, getPuzzleCaptchaChallenge,
|
|
145
|
+
submitCaptchaSolution, submitPowCaptchaSolution, submitPuzzleCaptchaSolution}`
|
|
146
|
+
client methods accept the field.
|
|
147
|
+
- Provider challenge + solution handlers decode via `decodeSimdReadings`
|
|
148
|
+
and `updateSessionRecord` (Mongoose `Mixed`, Zod discriminated-union
|
|
149
|
+
validation at the edge). The challenge-GET patch is fire-and-forget.
|
|
150
|
+
|
|
151
|
+
Backward-compatible: older catcher clients omit the field at every layer;
|
|
152
|
+
the session record omits it in turn.
|
|
153
|
+
- Updated dependencies [3c0be68]
|
|
154
|
+
- Updated dependencies [f9ea09d]
|
|
155
|
+
- Updated dependencies [d865319]
|
|
156
|
+
- Updated dependencies [753304b]
|
|
157
|
+
- Updated dependencies [8bb7286]
|
|
158
|
+
- Updated dependencies [f9ea09d]
|
|
159
|
+
- Updated dependencies [4aae4e6]
|
|
160
|
+
- @prosopo/types@4.0.0
|
|
161
|
+
|
|
162
|
+
## 3.3.2
|
|
163
|
+
### Patch Changes
|
|
164
|
+
|
|
165
|
+
- 819ed95: Adding invisible mode to session data
|
|
166
|
+
- Updated dependencies [819ed95]
|
|
167
|
+
- @prosopo/types@3.16.1
|
|
168
|
+
|
|
169
|
+
## 3.3.1
|
|
170
|
+
### Patch Changes
|
|
171
|
+
|
|
172
|
+
- f6a4402: API endpoint for removing site keys
|
|
173
|
+
- Updated dependencies [f6a4402]
|
|
174
|
+
- Updated dependencies [99dfb44]
|
|
175
|
+
- @prosopo/types@3.16.0
|
|
176
|
+
|
|
177
|
+
## 3.3.0
|
|
178
|
+
### Minor Changes
|
|
179
|
+
|
|
180
|
+
- 3e54c0a: Rate limits by client
|
|
181
|
+
|
|
182
|
+
### Patch Changes
|
|
183
|
+
|
|
184
|
+
- Updated dependencies [3e54c0a]
|
|
185
|
+
- @prosopo/types@3.15.0
|
|
186
|
+
|
|
187
|
+
## 3.2.11
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- Updated dependencies [946a8ba]
|
|
191
|
+
- Updated dependencies [5614814]
|
|
192
|
+
- @prosopo/types@3.14.1
|
|
193
|
+
|
|
194
|
+
## 3.2.10
|
|
195
|
+
### Patch Changes
|
|
196
|
+
|
|
197
|
+
- 7be39c4: Add register site keys endpoint def
|
|
198
|
+
- Updated dependencies [fc514dd]
|
|
199
|
+
- Updated dependencies [42650db]
|
|
200
|
+
- @prosopo/types@3.14.0
|
|
201
|
+
|
|
202
|
+
## 3.2.9
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- @prosopo/types@3.13.3
|
|
206
|
+
|
|
207
|
+
## 3.2.8
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- @prosopo/types@3.13.2
|
|
211
|
+
|
|
212
|
+
## 3.2.7
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- @prosopo/types@3.13.1
|
|
216
|
+
|
|
217
|
+
## 3.2.6
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- Updated dependencies [e6d9553]
|
|
221
|
+
- @prosopo/types@3.13.0
|
|
222
|
+
|
|
223
|
+
## 3.2.5
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- Updated dependencies [d5082a9]
|
|
227
|
+
- Updated dependencies [e1ea65f]
|
|
228
|
+
- Updated dependencies [c316257]
|
|
229
|
+
- @prosopo/types@3.12.3
|
|
230
|
+
|
|
231
|
+
## 3.2.4
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- adb89a6: Disposable email checking
|
|
235
|
+
- Updated dependencies [adb89a6]
|
|
236
|
+
- @prosopo/types@3.12.2
|
|
237
|
+
|
|
238
|
+
## 3.2.3
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- Updated dependencies [a90eb54]
|
|
242
|
+
- @prosopo/types@3.12.1
|
|
243
|
+
|
|
244
|
+
## 3.2.2
|
|
245
|
+
### Patch Changes
|
|
246
|
+
|
|
247
|
+
- Updated dependencies [676c5f2]
|
|
248
|
+
- Updated dependencies [feaca02]
|
|
249
|
+
- @prosopo/types@3.12.0
|
|
250
|
+
|
|
251
|
+
## 3.2.1
|
|
252
|
+
### Patch Changes
|
|
253
|
+
|
|
254
|
+
- Updated dependencies [8148587]
|
|
255
|
+
- @prosopo/types@3.11.1
|
|
256
|
+
|
|
257
|
+
## 3.2.0
|
|
258
|
+
### Minor Changes
|
|
259
|
+
|
|
260
|
+
- 7f6ffc5: Store behavioural for image challenges
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- Updated dependencies [7f6ffc5]
|
|
265
|
+
- @prosopo/types@3.11.0
|
|
266
|
+
|
|
267
|
+
## 3.1.49
|
|
268
|
+
### Patch Changes
|
|
269
|
+
|
|
270
|
+
- 93fa086: Add decision engine endpoints
|
|
271
|
+
- Updated dependencies [93fa086]
|
|
272
|
+
- @prosopo/types@3.10.2
|
|
273
|
+
|
|
274
|
+
## 3.1.48
|
|
275
|
+
### Patch Changes
|
|
276
|
+
|
|
277
|
+
- Updated dependencies [cde7550]
|
|
278
|
+
- @prosopo/types@3.10.1
|
|
279
|
+
|
|
280
|
+
## 3.1.47
|
|
281
|
+
### Patch Changes
|
|
282
|
+
|
|
283
|
+
- Updated dependencies [ad6d622]
|
|
284
|
+
- @prosopo/types@3.10.0
|
|
285
|
+
|
|
286
|
+
## 3.1.46
|
|
287
|
+
### Patch Changes
|
|
288
|
+
|
|
289
|
+
- Updated dependencies [ff58a70]
|
|
290
|
+
- @prosopo/types@3.9.0
|
|
291
|
+
|
|
292
|
+
## 3.1.45
|
|
293
|
+
### Patch Changes
|
|
294
|
+
|
|
295
|
+
- Updated dependencies [d2431cd]
|
|
296
|
+
- @prosopo/types@3.8.4
|
|
297
|
+
|
|
298
|
+
## 3.1.44
|
|
299
|
+
### Patch Changes
|
|
300
|
+
|
|
301
|
+
- Updated dependencies [bd6995b]
|
|
302
|
+
- @prosopo/types@3.8.3
|
|
303
|
+
|
|
304
|
+
## 3.1.43
|
|
305
|
+
### Patch Changes
|
|
306
|
+
|
|
307
|
+
- 9633e58: Add captcha type to decision machine and run on image verification"
|
|
308
|
+
- Updated dependencies [9633e58]
|
|
309
|
+
- @prosopo/types@3.8.2
|
|
310
|
+
|
|
311
|
+
## 3.1.42
|
|
312
|
+
### Patch Changes
|
|
313
|
+
|
|
314
|
+
- f52a5c1: Adding decision machine to provider for behavior detection
|
|
315
|
+
- Updated dependencies [f52a5c1]
|
|
316
|
+
- @prosopo/types@3.8.1
|
|
317
|
+
|
|
3
318
|
## 3.1.41
|
|
4
319
|
### Patch Changes
|
|
5
320
|
|
|
@@ -3,6 +3,10 @@ export declare class HttpClientBase {
|
|
|
3
3
|
constructor(baseURL: string, prefix?: string);
|
|
4
4
|
protected fetch<T>(input: RequestInfo, init?: RequestInit): Promise<T>;
|
|
5
5
|
protected post<T, U>(input: RequestInfo, body: U, init?: RequestInit): Promise<T>;
|
|
6
|
+
protected postWithHeaders<T, U>(input: RequestInfo, body: U, init?: RequestInit): Promise<{
|
|
7
|
+
data: T;
|
|
8
|
+
headers: Headers;
|
|
9
|
+
}>;
|
|
6
10
|
protected responseHandler<T>(response: Response): Promise<T>;
|
|
7
11
|
protected errorHandler(error: Error): Promise<never>;
|
|
8
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientBase.d.ts","sourceRoot":"","sources":["../../src/api/HttpClientBase.ts"],"names":[],"mappings":"AAeA,qBAAa,cAAc;IAC1B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK;cAIxB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;cAiB5D,IAAI,CAAC,CAAC,EAAE,CAAC,EACxB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,CAAC,EACP,IAAI,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"HttpClientBase.d.ts","sourceRoot":"","sources":["../../src/api/HttpClientBase.ts"],"names":[],"mappings":"AAeA,qBAAa,cAAc;IAC1B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK;cAIxB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;cAiB5D,IAAI,CAAC,CAAC,EAAE,CAAC,EACxB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,CAAC,EACP,IAAI,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC,CAAC,CAAC;cA6BG,eAAe,CAAC,CAAC,EAAE,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,CAAC,EACP,IAAI,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;cA0BzB,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC;IASlE,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;CAQpD;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -36,6 +36,30 @@ class HttpClientBase {
|
|
|
36
36
|
return this.errorHandler(error);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
// Like `post`, but also surfaces the response Headers so callers can read
|
|
40
|
+
// values delivered out-of-band (e.g. the honeypot meta header). The body
|
|
41
|
+
// is still parsed as JSON.
|
|
42
|
+
async postWithHeaders(input, body, init) {
|
|
43
|
+
const headers = {
|
|
44
|
+
"Content-Type": "application/json",
|
|
45
|
+
...init?.headers || {}
|
|
46
|
+
};
|
|
47
|
+
try {
|
|
48
|
+
const response = await fetch(this.baseURL + input, {
|
|
49
|
+
method: "POST",
|
|
50
|
+
body: JSON.stringify(body),
|
|
51
|
+
...init,
|
|
52
|
+
headers
|
|
53
|
+
});
|
|
54
|
+
if (!response.ok && response.status !== 400 && !response.headers.get("content-type")?.includes("application/json")) {
|
|
55
|
+
throw new HttpError(response.status, response.statusText, response.url);
|
|
56
|
+
}
|
|
57
|
+
const data = await this.responseHandler(response);
|
|
58
|
+
return { data, headers: response.headers };
|
|
59
|
+
} catch (error) {
|
|
60
|
+
return this.errorHandler(error);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
39
63
|
async responseHandler(response) {
|
|
40
64
|
try {
|
|
41
65
|
return await response.json();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientBase.js","sourceRoot":"","sources":["../../src/api/HttpClientBase.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,cAAc;IAG1B,YAAY,OAAe,EAAE,MAAM,GAAG,EAAE;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,GAAG,MA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eAAe,CAAI,QAAkB;QACpD,IAAI,CAAC;YACJ,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;YAC5C,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAES,YAAY,CAAC,KAAY;QAClC,IAAI,KAAK,YAAY,SAAS,EAAE,CAAC;YAChC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACP,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACD;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,18 +1,34 @@
|
|
|
1
|
-
import { type ApiResponse, type CaptchaResponseBody, type CaptchaSolution, type CaptchaSolutionResponse, type GetFrictionlessCaptchaResponse, type GetPowCaptchaResponse, type IUserSettings, type ImageVerificationResponse, type PowCaptchaSolutionResponse, type ProcaptchaToken, type Provider, type ProviderApiInterface, type ProviderRegistered, type RandomProvider, type StoredEvents, type Tier, type UpdateDetectorKeyResponse, type UpdateProviderClientsResponse, type VerificationResponse } from "@prosopo/types";
|
|
1
|
+
import { type ApiResponse, type CaptchaResponseBody, type CaptchaSolution, type CaptchaSolutionResponse, type CaptchaType, type ClientMetaData, type DecisionMachineLanguage, type DecisionMachineRuntime, type DecisionMachineScope, type GetFrictionlessCaptchaResponse, type GetPowCaptchaResponse, type GetPuzzleCaptchaResponse, type IUserSettings, type ImageVerificationResponse, type ModeEnum, type PowCaptchaSolutionResponse, type ProcaptchaToken, type Provider, type ProviderApiInterface, type ProviderRegistered, type PuzzleCaptchaSolutionResponse, type RandomProvider, type RegisterSitekeysBodyTypeOutput, type RemoveSitekeysBodyTypeOutput, type StoredEvents, type Tier, type UpdateDetectorKeyResponse, type UpdateProviderClientsResponse, type VerificationResponse } from "@prosopo/types";
|
|
2
2
|
import { ApiClient } from "./apiClient.js";
|
|
3
3
|
export default class ProviderApi extends ApiClient implements ProviderApiInterface {
|
|
4
|
-
getCaptchaChallenge(userAccount: string, randomProvider: RandomProvider, sessionId?: string): Promise<CaptchaResponseBody>;
|
|
5
|
-
submitCaptchaSolution(captchas: CaptchaSolution[], requestHash: string, userAccount: string, timestamp: string, providerRequestHashSignature: string, userTimestampSignature: string): Promise<CaptchaSolutionResponse>;
|
|
6
|
-
verifyDappUser(token: ProcaptchaToken, signature: string, userAccount: string, maxVerifiedTime?: number, ip?: string): Promise<ImageVerificationResponse>;
|
|
7
|
-
getPowCaptchaChallenge(user: string, dapp: string, sessionId?: string): Promise<GetPowCaptchaResponse>;
|
|
8
|
-
submitPowCaptchaSolution(challenge: GetPowCaptchaResponse, userAccount: string, dappAccount: string, nonce: number, userTimestampSignature: string, timeout?: number, behavioralData?: string, salt?: string): Promise<PowCaptchaSolutionResponse>;
|
|
9
|
-
|
|
4
|
+
getCaptchaChallenge(userAccount: string, randomProvider: RandomProvider, sessionId?: string, simdReadings?: string): Promise<CaptchaResponseBody>;
|
|
5
|
+
submitCaptchaSolution(captchas: CaptchaSolution[], requestHash: string, userAccount: string, timestamp: string, providerRequestHashSignature: string, userTimestampSignature: string, behavioralData?: string, simdReadings?: string, clientMetaData?: ClientMetaData): Promise<CaptchaSolutionResponse>;
|
|
6
|
+
verifyDappUser(token: ProcaptchaToken, signature: string, userAccount: string, maxVerifiedTime?: number, ip?: string, email?: string): Promise<ImageVerificationResponse>;
|
|
7
|
+
getPowCaptchaChallenge(user: string, dapp: string, sessionId?: string, simdReadings?: string): Promise<GetPowCaptchaResponse>;
|
|
8
|
+
submitPowCaptchaSolution(challenge: GetPowCaptchaResponse, userAccount: string, dappAccount: string, nonce: number, userTimestampSignature: string, timeout?: number, behavioralData?: string, salt?: string, simdReadings?: string, clientMetaData?: ClientMetaData): Promise<PowCaptchaSolutionResponse>;
|
|
9
|
+
getPuzzleCaptchaChallenge(user: string, dapp: string, sessionId?: string, simdReadings?: string): Promise<GetPuzzleCaptchaResponse>;
|
|
10
|
+
submitPuzzleCaptchaSolution(challenge: GetPuzzleCaptchaResponse, userAccount: string, dappAccount: string, finalX: number, finalY: number, puzzleEvents: Array<{
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
t: number;
|
|
14
|
+
}>, userTimestampSignature: string, timeout?: number, behavioralData?: string, salt?: string, simdReadings?: string, clientMetaData?: ClientMetaData): Promise<PuzzleCaptchaSolutionResponse>;
|
|
15
|
+
submitPuzzleCaptchaVerify(token: string, signatureHex: string, recencyLimit: number, user: string, ip?: string, email?: string): Promise<VerificationResponse>;
|
|
16
|
+
getFrictionlessCaptcha(token: string, headHash: string, dapp: string, user: string, mode?: ModeEnum, simdReadings?: string): Promise<GetFrictionlessCaptchaResponse>;
|
|
10
17
|
submitUserEvents(events: StoredEvents, string: string): Promise<UpdateProviderClientsResponse>;
|
|
11
18
|
getProviderStatus(): Promise<ProviderRegistered>;
|
|
12
19
|
getProviderDetails(): Promise<Provider>;
|
|
13
|
-
submitPowCaptchaVerify(token: string, signatureHex: string, recencyLimit: number, user: string, ip?: string): Promise<VerificationResponse>;
|
|
20
|
+
submitPowCaptchaVerify(token: string, signatureHex: string, recencyLimit: number, user: string, ip?: string, email?: string): Promise<VerificationResponse>;
|
|
14
21
|
registerSiteKey(siteKey: string, tier: Tier, settings: IUserSettings, jwt: string): Promise<ApiResponse>;
|
|
22
|
+
registerSiteKeys(siteKeys: RegisterSitekeysBodyTypeOutput, jwt: string): Promise<ApiResponse>;
|
|
23
|
+
removeSiteKey(siteKey: string, jwt: string): Promise<ApiResponse>;
|
|
24
|
+
removeSiteKeys(siteKeys: RemoveSitekeysBodyTypeOutput, jwt: string): Promise<ApiResponse>;
|
|
15
25
|
updateDetectorKey(detectorKey: string, jwt: string): Promise<UpdateDetectorKeyResponse>;
|
|
26
|
+
updateDecisionMachine(scope: DecisionMachineScope, runtime: DecisionMachineRuntime, source: string, jwt: string, dappAccount?: string, language?: DecisionMachineLanguage, name?: string, version?: string, captchaType?: CaptchaType): Promise<ApiResponse>;
|
|
27
|
+
getAllDecisionMachines(jwt: string): Promise<ApiResponse>;
|
|
28
|
+
getDecisionMachine(id: string, jwt: string): Promise<ApiResponse>;
|
|
29
|
+
removeDecisionMachine(id: string, jwt: string): Promise<ApiResponse>;
|
|
30
|
+
removeAllDecisionMachines(jwt: string): Promise<ApiResponse>;
|
|
31
|
+
clearAllCounters(jwt: string, dappAccount?: string): Promise<ApiResponse>;
|
|
16
32
|
removeDetectorKey(detectorKey: string, jwt: string, expirationInSeconds?: number): Promise<ApiResponse>;
|
|
17
33
|
toggleMaintenanceMode(enabled: boolean, timestamp: string, signature: string): Promise<ApiResponse>;
|
|
18
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderApi.d.ts","sourceRoot":"","sources":["../../src/api/ProviderApi.ts"],"names":[],"mappings":"AAcA,OAAO,EAGN,KAAK,WAAW,EAEhB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAEpB,KAAK,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ProviderApi.d.ts","sourceRoot":"","sources":["../../src/api/ProviderApi.ts"],"names":[],"mappings":"AAcA,OAAO,EAGN,KAAK,WAAW,EAEhB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAEpB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAEzB,KAAK,8BAA8B,EAEnC,KAAK,qBAAqB,EAE1B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,QA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