@prosopo/api 3.0.8 → 3.1.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/CHANGELOG.md +29 -0
- package/dist/api/HttpClientBase.js +53 -57
- package/dist/api/HttpError.js +11 -9
- package/dist/api/ProviderApi.js +222 -197
- package/dist/api/index.js +6 -3
- package/dist/cjs/api/ProviderApi.cjs +13 -0
- package/dist/index.js +7 -2
- package/package.json +13 -9
- package/vite.cjs.config.ts +4 -1
- package/vite.esm.config.ts +20 -0
- package/dist/api/HttpClientBase.d.ts +0 -10
- package/dist/api/HttpClientBase.d.ts.map +0 -1
- package/dist/api/HttpClientBase.js.map +0 -1
- package/dist/api/HttpError.d.ts +0 -7
- package/dist/api/HttpError.d.ts.map +0 -1
- package/dist/api/HttpError.js.map +0 -1
- package/dist/api/ProviderApi.d.ts +0 -23
- package/dist/api/ProviderApi.d.ts.map +0 -1
- package/dist/api/ProviderApi.js.map +0 -1
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @prosopo/api
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 3573f0b: fix npm scripts bundle command
|
|
7
|
+
- 3573f0b: build using vite, typecheck using tsc
|
|
8
|
+
- efd8102: Add tests for unwrap error helper
|
|
9
|
+
- 3573f0b: standardise all vite based npm scripts for bundling
|
|
10
|
+
- Updated dependencies [93d5e50]
|
|
11
|
+
- Updated dependencies [3573f0b]
|
|
12
|
+
- Updated dependencies [3573f0b]
|
|
13
|
+
- Updated dependencies [efd8102]
|
|
14
|
+
- Updated dependencies [93d5e50]
|
|
15
|
+
- Updated dependencies [63519d7]
|
|
16
|
+
- Updated dependencies [3573f0b]
|
|
17
|
+
- Updated dependencies [2d0dd8a]
|
|
18
|
+
- @prosopo/types@3.0.4
|
|
19
|
+
- @prosopo/user-access-policy@3.3.1
|
|
20
|
+
- @prosopo/config@3.1.1
|
|
21
|
+
|
|
22
|
+
## 3.1.0
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- b7c3258: Add tests for UAPs
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [b7c3258]
|
|
30
|
+
- @prosopo/user-access-policy@3.3.0
|
|
31
|
+
|
|
3
32
|
## 3.0.8
|
|
4
33
|
### Patch Changes
|
|
5
34
|
|
|
@@ -1,63 +1,59 @@
|
|
|
1
1
|
import { HttpError } from "./HttpError.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
class HttpClientBase {
|
|
3
|
+
constructor(baseURL, prefix = "") {
|
|
4
|
+
this.baseURL = baseURL + prefix;
|
|
5
|
+
}
|
|
6
|
+
async fetch(input, init) {
|
|
7
|
+
try {
|
|
8
|
+
const response = await fetch(this.baseURL + input, init);
|
|
9
|
+
if (!response.ok && // Only throw an error if the response is not JSON and not a 400 error
|
|
10
|
+
response.status !== 400 && !response.headers.get("content-type")?.includes("application/json")) {
|
|
11
|
+
throw new HttpError(response.status, response.statusText, response.url);
|
|
12
|
+
}
|
|
13
|
+
return this.responseHandler(response);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
return this.errorHandler(error);
|
|
5
16
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
async post(input, body, init) {
|
|
19
|
+
const headers = {
|
|
20
|
+
"Content-Type": "application/json",
|
|
21
|
+
...init?.headers || {}
|
|
22
|
+
};
|
|
23
|
+
try {
|
|
24
|
+
const response = await fetch(this.baseURL + input, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
body: JSON.stringify(body),
|
|
27
|
+
...init,
|
|
28
|
+
headers
|
|
29
|
+
});
|
|
30
|
+
if (!response.ok && // Only throw an error if the response is not JSON and not a 400 error
|
|
31
|
+
response.status !== 400 && !response.headers.get("content-type")?.includes("application/json")) {
|
|
32
|
+
throw new HttpError(response.status, response.statusText, response.url);
|
|
33
|
+
}
|
|
34
|
+
return this.responseHandler(response);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
return this.errorHandler(error);
|
|
19
37
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
method: "POST",
|
|
28
|
-
body: JSON.stringify(body),
|
|
29
|
-
...init,
|
|
30
|
-
headers,
|
|
31
|
-
});
|
|
32
|
-
if (!response.ok &&
|
|
33
|
-
response.status !== 400 &&
|
|
34
|
-
!response.headers.get("content-type")?.includes("application/json")) {
|
|
35
|
-
throw new HttpError(response.status, response.statusText, response.url);
|
|
36
|
-
}
|
|
37
|
-
return this.responseHandler(response);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
return this.errorHandler(error);
|
|
41
|
-
}
|
|
38
|
+
}
|
|
39
|
+
async responseHandler(response) {
|
|
40
|
+
try {
|
|
41
|
+
return await response.json();
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error("Error parsing JSON:", error);
|
|
44
|
+
throw error;
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
throw error;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
errorHandler(error) {
|
|
53
|
-
if (error instanceof HttpError) {
|
|
54
|
-
console.error("HTTP error:", error);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
console.error("API request error:", error);
|
|
58
|
-
}
|
|
59
|
-
return Promise.reject(error);
|
|
46
|
+
}
|
|
47
|
+
errorHandler(error) {
|
|
48
|
+
if (error instanceof HttpError) {
|
|
49
|
+
console.error("HTTP error:", error);
|
|
50
|
+
} else {
|
|
51
|
+
console.error("API request error:", error);
|
|
60
52
|
}
|
|
53
|
+
return Promise.reject(error);
|
|
54
|
+
}
|
|
61
55
|
}
|
|
62
|
-
export
|
|
63
|
-
|
|
56
|
+
export {
|
|
57
|
+
HttpClientBase,
|
|
58
|
+
HttpClientBase as default
|
|
59
|
+
};
|
package/dist/api/HttpError.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
class HttpError extends Error {
|
|
2
|
+
constructor(status, statusText, url) {
|
|
3
|
+
super(`HTTP error! status: ${status} (${statusText}) for URL: ${url}`);
|
|
4
|
+
this.status = status;
|
|
5
|
+
this.statusText = statusText;
|
|
6
|
+
this.url = url;
|
|
7
|
+
this.name = "HttpError";
|
|
8
|
+
}
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
export {
|
|
11
|
+
HttpError
|
|
12
|
+
};
|
package/dist/api/ProviderApi.js
CHANGED
|
@@ -1,200 +1,225 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { accessRuleApiPaths
|
|
3
|
-
import HttpClientBase from "./HttpClientBase.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { ApiParams, ClientApiPaths, SubmitPowCaptchaSolutionBody, PublicApiPaths, AdminApiPaths, UpdateDetectorKeyBody } from "@prosopo/types";
|
|
2
|
+
import { accessRuleApiPaths } from "@prosopo/user-access-policy";
|
|
3
|
+
import { HttpClientBase } from "./HttpClientBase.js";
|
|
4
|
+
class ProviderApi extends HttpClientBase {
|
|
5
|
+
constructor(providerUrl, account) {
|
|
6
|
+
const providerUrlWithProtocol = !providerUrl.startsWith("http") ? `https://${providerUrl}` : providerUrl;
|
|
7
|
+
super(providerUrlWithProtocol);
|
|
8
|
+
this.account = account;
|
|
9
|
+
}
|
|
10
|
+
getCaptchaChallenge(userAccount, randomProvider, sessionId) {
|
|
11
|
+
const { provider } = randomProvider;
|
|
12
|
+
const dappAccount = this.account;
|
|
13
|
+
const body = {
|
|
14
|
+
[ApiParams.dapp]: dappAccount,
|
|
15
|
+
[ApiParams.user]: userAccount,
|
|
16
|
+
[ApiParams.datasetId]: provider.datasetId
|
|
17
|
+
};
|
|
18
|
+
if (sessionId) {
|
|
19
|
+
body[ApiParams.sessionId] = sessionId;
|
|
20
|
+
}
|
|
21
|
+
return this.post(ClientApiPaths.GetImageCaptchaChallenge, body, {
|
|
22
|
+
headers: {
|
|
23
|
+
"Prosopo-Site-Key": this.account,
|
|
24
|
+
"Prosopo-User": userAccount
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
submitCaptchaSolution(captchas, requestHash, userAccount, timestamp, providerRequestHashSignature, userTimestampSignature) {
|
|
29
|
+
const body = {
|
|
30
|
+
[ApiParams.user]: userAccount,
|
|
31
|
+
[ApiParams.dapp]: this.account,
|
|
32
|
+
[ApiParams.captchas]: captchas,
|
|
33
|
+
[ApiParams.requestHash]: requestHash,
|
|
34
|
+
[ApiParams.timestamp]: timestamp,
|
|
35
|
+
[ApiParams.signature]: {
|
|
36
|
+
[ApiParams.user]: {
|
|
37
|
+
[ApiParams.timestamp]: userTimestampSignature
|
|
38
|
+
},
|
|
39
|
+
[ApiParams.provider]: {
|
|
40
|
+
[ApiParams.requestHash]: providerRequestHashSignature
|
|
22
41
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return this.post(ClientApiPaths.SubmitImageCaptchaSolution, body, {
|
|
45
|
+
headers: {
|
|
46
|
+
"Prosopo-Site-Key": this.account,
|
|
47
|
+
"Prosopo-User": userAccount
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
verifyDappUser(token, signature, userAccount, maxVerifiedTime, ip) {
|
|
52
|
+
const payload = {
|
|
53
|
+
[ApiParams.token]: token,
|
|
54
|
+
[ApiParams.dappSignature]: signature,
|
|
55
|
+
[ApiParams.ip]: ip
|
|
56
|
+
};
|
|
57
|
+
if (maxVerifiedTime) {
|
|
58
|
+
payload[ApiParams.maxVerifiedTime] = maxVerifiedTime;
|
|
59
|
+
}
|
|
60
|
+
return this.post(ClientApiPaths.VerifyImageCaptchaSolutionDapp, payload, {
|
|
61
|
+
headers: {
|
|
62
|
+
"Prosopo-Site-Key": this.account,
|
|
63
|
+
"Prosopo-User": userAccount
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getPowCaptchaChallenge(user, dapp, sessionId) {
|
|
68
|
+
const body = {
|
|
69
|
+
[ApiParams.user]: user.toString(),
|
|
70
|
+
[ApiParams.dapp]: dapp.toString(),
|
|
71
|
+
...sessionId && { [ApiParams.sessionId]: sessionId }
|
|
72
|
+
};
|
|
73
|
+
return this.post(ClientApiPaths.GetPowCaptchaChallenge, body, {
|
|
74
|
+
headers: {
|
|
75
|
+
"Prosopo-Site-Key": this.account,
|
|
76
|
+
"Prosopo-User": user
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
submitPowCaptchaSolution(challenge, userAccount, dappAccount, nonce, userTimestampSignature, timeout) {
|
|
81
|
+
const body = SubmitPowCaptchaSolutionBody.parse({
|
|
82
|
+
[ApiParams.challenge]: challenge.challenge,
|
|
83
|
+
[ApiParams.difficulty]: challenge.difficulty,
|
|
84
|
+
[ApiParams.timestamp]: challenge.timestamp,
|
|
85
|
+
[ApiParams.user]: userAccount.toString(),
|
|
86
|
+
[ApiParams.dapp]: dappAccount.toString(),
|
|
87
|
+
[ApiParams.nonce]: nonce,
|
|
88
|
+
[ApiParams.verifiedTimeout]: timeout,
|
|
89
|
+
[ApiParams.signature]: {
|
|
90
|
+
[ApiParams.provider]: challenge[ApiParams.signature][ApiParams.provider],
|
|
91
|
+
[ApiParams.user]: {
|
|
92
|
+
[ApiParams.timestamp]: userTimestampSignature
|
|
61
93
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
deleteUserAccessPolicies(rules, timestamp, signature) {
|
|
191
|
-
return this.post(accessRuleApiPaths.DELETE_MANY, rules, {
|
|
192
|
-
headers: {
|
|
193
|
-
"Prosopo-Site-Key": this.account,
|
|
194
|
-
timestamp,
|
|
195
|
-
signature,
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return this.post(ClientApiPaths.SubmitPowCaptchaSolution, body, {
|
|
97
|
+
headers: {
|
|
98
|
+
"Prosopo-Site-Key": this.account,
|
|
99
|
+
"Prosopo-User": userAccount
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
getFrictionlessCaptcha(token, dapp, user) {
|
|
104
|
+
const body = {
|
|
105
|
+
[ApiParams.token]: token,
|
|
106
|
+
[ApiParams.dapp]: dapp,
|
|
107
|
+
[ApiParams.user]: user
|
|
108
|
+
};
|
|
109
|
+
return this.post(ClientApiPaths.GetFrictionlessCaptchaChallenge, body, {
|
|
110
|
+
headers: {
|
|
111
|
+
"Prosopo-Site-Key": this.account,
|
|
112
|
+
"Prosopo-User": user
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
submitUserEvents(events, string) {
|
|
117
|
+
return this.post(
|
|
118
|
+
ClientApiPaths.SubmitUserEvents,
|
|
119
|
+
{ events, string },
|
|
120
|
+
{
|
|
121
|
+
headers: {
|
|
122
|
+
"Prosopo-Site-Key": this.account
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
getProviderStatus() {
|
|
128
|
+
return this.fetch(ClientApiPaths.GetProviderStatus, {
|
|
129
|
+
headers: {
|
|
130
|
+
"Prosopo-Site-Key": this.account
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
getProviderDetails() {
|
|
135
|
+
return this.fetch(PublicApiPaths.GetProviderDetails, {
|
|
136
|
+
headers: {
|
|
137
|
+
"Prosopo-Site-Key": this.account
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
submitPowCaptchaVerify(token, signatureHex, recencyLimit, user, ip) {
|
|
142
|
+
const body = {
|
|
143
|
+
[ApiParams.token]: token,
|
|
144
|
+
[ApiParams.dappSignature]: signatureHex,
|
|
145
|
+
[ApiParams.verifiedTimeout]: recencyLimit,
|
|
146
|
+
[ApiParams.ip]: ip
|
|
147
|
+
};
|
|
148
|
+
return this.post(ClientApiPaths.VerifyPowCaptchaSolution, body, {
|
|
149
|
+
headers: {
|
|
150
|
+
"Prosopo-Site-Key": this.account,
|
|
151
|
+
"Prosopo-User": user
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
registerSiteKey(siteKey, tier, settings, timestamp, signature) {
|
|
156
|
+
const body = { siteKey, tier, settings };
|
|
157
|
+
return this.post(AdminApiPaths.SiteKeyRegister, body, {
|
|
158
|
+
headers: {
|
|
159
|
+
"Prosopo-Site-Key": this.account,
|
|
160
|
+
timestamp,
|
|
161
|
+
signature
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
updateDetectorKey(detectorKey, timestamp, signature) {
|
|
166
|
+
return this.post(
|
|
167
|
+
AdminApiPaths.UpdateDetectorKey,
|
|
168
|
+
UpdateDetectorKeyBody.parse({ detectorKey }),
|
|
169
|
+
{
|
|
170
|
+
headers: {
|
|
171
|
+
"Prosopo-Site-Key": this.account,
|
|
172
|
+
timestamp,
|
|
173
|
+
signature
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
removeDetectorKey(detectorKey, timestamp, signature) {
|
|
179
|
+
return this.post(
|
|
180
|
+
AdminApiPaths.RemoveDetectorKey,
|
|
181
|
+
UpdateDetectorKeyBody.parse({ detectorKey }),
|
|
182
|
+
{
|
|
183
|
+
headers: {
|
|
184
|
+
"Prosopo-Site-Key": this.account,
|
|
185
|
+
timestamp,
|
|
186
|
+
signature
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
insertUserAccessPolicies(rules, timestamp, signature) {
|
|
192
|
+
return this.post(accessRuleApiPaths.INSERT_MANY, rules, {
|
|
193
|
+
headers: {
|
|
194
|
+
"Prosopo-Site-Key": this.account,
|
|
195
|
+
timestamp,
|
|
196
|
+
signature
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
deleteUserAccessPolicies(rules, timestamp, signature) {
|
|
201
|
+
return this.post(accessRuleApiPaths.DELETE_MANY, rules, {
|
|
202
|
+
headers: {
|
|
203
|
+
"Prosopo-Site-Key": this.account,
|
|
204
|
+
timestamp,
|
|
205
|
+
signature
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
deleteAllUserAccessPolicies(timestamp, signature) {
|
|
210
|
+
return this.post(
|
|
211
|
+
accessRuleApiPaths.DELETE_ALL,
|
|
212
|
+
{},
|
|
213
|
+
{
|
|
214
|
+
headers: {
|
|
215
|
+
"Prosopo-Site-Key": this.account,
|
|
216
|
+
timestamp,
|
|
217
|
+
signature
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
199
222
|
}
|
|
200
|
-
|
|
223
|
+
export {
|
|
224
|
+
ProviderApi as default
|
|
225
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { HttpClientBase } from "./HttpClientBase.js";
|
|
2
|
+
import { default as default2 } from "./ProviderApi.js";
|
|
3
|
+
export {
|
|
4
|
+
HttpClientBase,
|
|
5
|
+
default2 as ProviderApi
|
|
6
|
+
};
|
|
@@ -207,5 +207,18 @@ class ProviderApi extends HttpClientBase.HttpClientBase {
|
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
+
deleteAllUserAccessPolicies(timestamp, signature) {
|
|
211
|
+
return this.post(
|
|
212
|
+
userAccessPolicy.accessRuleApiPaths.DELETE_ALL,
|
|
213
|
+
{},
|
|
214
|
+
{
|
|
215
|
+
headers: {
|
|
216
|
+
"Prosopo-Site-Key": this.account,
|
|
217
|
+
timestamp,
|
|
218
|
+
signature
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
}
|
|
210
223
|
}
|
|
211
224
|
module.exports = ProviderApi;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import "./api/index.js";
|
|
2
|
+
import { default as default2 } from "./api/ProviderApi.js";
|
|
3
|
+
import { HttpClientBase } from "./api/HttpClientBase.js";
|
|
4
|
+
export {
|
|
5
|
+
HttpClientBase,
|
|
6
|
+
default2 as ProviderApi
|
|
7
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Wrapper for the provider API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"engines": {
|
|
8
9
|
"node": "20",
|
|
@@ -10,15 +11,18 @@
|
|
|
10
11
|
},
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
13
15
|
"import": "./dist/index.js",
|
|
14
16
|
"require": "./dist/cjs/index.cjs"
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"build": "tsc --build --verbose",
|
|
21
|
-
"build:cjs": "
|
|
20
|
+
"clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
|
|
21
|
+
"build": "NODE_ENV=${NODE_ENV:-production}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
|
|
22
|
+
"build:tsc": "tsc --build --verbose",
|
|
23
|
+
"build:cjs": "NODE_ENV=${NODE_ENV:-production}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
|
|
24
|
+
"typecheck": "tsc --build --declaration --emitDeclarationOnly",
|
|
25
|
+
"test": "echo no tests"
|
|
22
26
|
},
|
|
23
27
|
"repository": {
|
|
24
28
|
"type": "git",
|
|
@@ -31,17 +35,17 @@
|
|
|
31
35
|
},
|
|
32
36
|
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
33
37
|
"dependencies": {
|
|
34
|
-
"@prosopo/types": "3.0.
|
|
35
|
-
"@prosopo/user-access-policy": "3.
|
|
38
|
+
"@prosopo/types": "3.0.4",
|
|
39
|
+
"@prosopo/user-access-policy": "3.3.1",
|
|
36
40
|
"@typegoose/auto-increment": "4.13.0",
|
|
37
41
|
"axios": "1.10.0",
|
|
38
42
|
"esbuild": "0.25.6",
|
|
39
43
|
"express": "4.21.2",
|
|
40
44
|
"openpgp": "5.11.3",
|
|
41
|
-
"webpack-dev-server": "5.2.2"
|
|
45
|
+
"webpack-dev-server": "5.2.2",
|
|
46
|
+
"@prosopo/config": "3.1.1"
|
|
42
47
|
},
|
|
43
48
|
"devDependencies": {
|
|
44
|
-
"@prosopo/config": "3.1.0",
|
|
45
49
|
"@vitest/coverage-v8": "3.0.9",
|
|
46
50
|
"concurrently": "9.0.1",
|
|
47
51
|
"del-cli": "6.0.0",
|
package/vite.cjs.config.ts
CHANGED
|
@@ -15,5 +15,8 @@ import path from "node:path";
|
|
|
15
15
|
import { ViteCommonJSConfig } from "@prosopo/config";
|
|
16
16
|
|
|
17
17
|
export default function () {
|
|
18
|
-
return ViteCommonJSConfig(
|
|
18
|
+
return ViteCommonJSConfig(
|
|
19
|
+
path.basename("."),
|
|
20
|
+
path.resolve("./tsconfig.json"),
|
|
21
|
+
);
|
|
19
22
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright 2021-2025 Prosopo (UK) Ltd.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
import path from "node:path";
|
|
16
|
+
import { ViteEsmConfig } from "@prosopo/config";
|
|
17
|
+
|
|
18
|
+
export default function () {
|
|
19
|
+
return ViteEsmConfig(path.basename("."), path.resolve("./tsconfig.json"));
|
|
20
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class HttpClientBase {
|
|
2
|
-
protected readonly baseURL: string;
|
|
3
|
-
constructor(baseURL: string, prefix?: string);
|
|
4
|
-
protected fetch<T>(input: RequestInfo, init?: RequestInit): Promise<T>;
|
|
5
|
-
protected post<T, U>(input: RequestInfo, body: U, init?: RequestInit): Promise<T>;
|
|
6
|
-
protected responseHandler<T>(response: Response): Promise<T>;
|
|
7
|
-
protected errorHandler(error: Error): Promise<never>;
|
|
8
|
-
}
|
|
9
|
-
export default HttpClientBase;
|
|
10
|
-
//# sourceMappingURL=HttpClientBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,C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E,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"}
|
package/dist/api/HttpError.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HttpError.d.ts","sourceRoot":"","sources":["../../src/api/HttpError.ts"],"names":[],"mappings":"AAaA,qBAAa,SAAU,SAAQ,KAAK;IAE3B,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,MAAM;IAClB,GAAG,EAAE,MAAM;gBAFX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM;CAKnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../src/api/HttpError.ts"],"names":[],"mappings":"AAaA,MAAM,OAAO,SAAU,SAAQ,KAAK;IACnC,YACQ,MAAc,EACd,UAAkB,EAClB,GAAW;QAElB,KAAK,CAAC,uBAAuB,MAAM,KAAK,UAAU,cAAc,GAAG,EAAE,CAAC,CAAC;QAJhE,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAClB,QAAG,GAAH,GAAG,CAAQ;QAGlB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IACzB,CAAC;CACD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
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";
|
|
2
|
-
import { type DeleteRulesEndpointSchemaInput, type InsertManyRulesEndpointInputSchema } from "@prosopo/user-access-policy";
|
|
3
|
-
import HttpClientBase from "./HttpClientBase.js";
|
|
4
|
-
export default class ProviderApi extends HttpClientBase implements ProviderApiInterface {
|
|
5
|
-
private account;
|
|
6
|
-
constructor(providerUrl: string, account: string);
|
|
7
|
-
getCaptchaChallenge(userAccount: string, randomProvider: RandomProvider, sessionId?: string): Promise<CaptchaResponseBody>;
|
|
8
|
-
submitCaptchaSolution(captchas: CaptchaSolution[], requestHash: string, userAccount: string, timestamp: string, providerRequestHashSignature: string, userTimestampSignature: string): Promise<CaptchaSolutionResponse>;
|
|
9
|
-
verifyDappUser(token: ProcaptchaToken, signature: string, userAccount: string, maxVerifiedTime?: number, ip?: string): Promise<ImageVerificationResponse>;
|
|
10
|
-
getPowCaptchaChallenge(user: string, dapp: string, sessionId?: string): Promise<GetPowCaptchaResponse>;
|
|
11
|
-
submitPowCaptchaSolution(challenge: GetPowCaptchaResponse, userAccount: string, dappAccount: string, nonce: number, userTimestampSignature: string, timeout?: number): Promise<PowCaptchaSolutionResponse>;
|
|
12
|
-
getFrictionlessCaptcha(token: string, dapp: string, user: string): Promise<GetFrictionlessCaptchaResponse>;
|
|
13
|
-
submitUserEvents(events: StoredEvents, string: string): Promise<UpdateProviderClientsResponse>;
|
|
14
|
-
getProviderStatus(): Promise<ProviderRegistered>;
|
|
15
|
-
getProviderDetails(): Promise<Provider>;
|
|
16
|
-
submitPowCaptchaVerify(token: string, signatureHex: string, recencyLimit: number, user: string, ip?: string): Promise<VerificationResponse>;
|
|
17
|
-
registerSiteKey(siteKey: string, tier: Tier, settings: IUserSettings, timestamp: string, signature: string): Promise<ApiResponse>;
|
|
18
|
-
updateDetectorKey(detectorKey: string, timestamp: string, signature: string): Promise<UpdateDetectorKeyResponse>;
|
|
19
|
-
removeDetectorKey(detectorKey: string, timestamp: string, signature: string): Promise<ApiResponse>;
|
|
20
|
-
insertUserAccessPolicies(rules: InsertManyRulesEndpointInputSchema, timestamp: string, signature: string): Promise<ApiResponse>;
|
|
21
|
-
deleteUserAccessPolicies(rules: DeleteRulesEndpointSchemaInput, timestamp: string, signature: string): Promise<ApiResponse>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=ProviderApi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderApi.d.ts","sourceRoot":"","sources":["../../src/api/ProviderApi.ts"],"names":[],"mappings":"AAaA,OAAO,EAGN,KAAK,WAAW,EAEhB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAEpB,KAAK,uBAAuB,EAE5B,KAAK,8BAA8B,EAEnC,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EAEvB,KAAK,cAAc,EAGnB,KAAK,YAAY,EAEjB,KAAK,IAAI,EAET,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EAEzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAEvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,WACpB,SAAQ,cACR,YAAW,oBAAoB;IAE/B,OAAO,CAAC,OAAO,CAAS;gBAEZ,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAQzC,mBAAmB,CACzB,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,cAAc,EAC9B,SAAS,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,CAAC;IAmBxB,qBAAqB,CAC3B,QAAQ,EAAE,e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T;SACD,CAAC,CAAC;IACJ,CAAC;IAEM,wBAAwB,CAC9B,KAAqC,EACrC,SAAiB,EACjB,SAAiB;QAEjB,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,KAAK,EAAE;YACvD,OAAO,EAAE;gBACR,kBAAkB,EAAE,IAAI,CAAC,OAAO;gBAChC,SAAS;gBACT,SAAS;aACT;SACD,CAAC,CAAC;IACJ,CAAC;CACD"}
|
package/dist/api/index.d.ts
DELETED
package/dist/api/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAaA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/api/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAaA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAC"}
|