@prosopo/types 3.6.4 → 4.3.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/.turbo/turbo-build$colon$cjs.log +48 -42
- package/.turbo/turbo-build$colon$tsc.log +23 -0
- package/.turbo/turbo-build.log +53 -43
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +566 -0
- package/dist/api/api.d.ts +26 -8
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/api.js.map +1 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/ipapi.d.ts +2 -1
- package/dist/api/ipapi.d.ts.map +1 -1
- package/dist/api/ipapi.js.map +1 -0
- package/dist/api/params.d.ts +26 -1
- package/dist/api/params.d.ts.map +1 -1
- package/dist/api/params.js +25 -0
- package/dist/api/params.js.map +1 -0
- package/dist/cjs/api/params.cjs +25 -0
- package/dist/cjs/client/captchaType/captchaType.cjs +16 -1
- package/dist/cjs/client/index.cjs +17 -0
- package/dist/cjs/client/settings.cjs +88 -6
- package/dist/cjs/client/testSiteKeys.cjs +22 -0
- package/dist/cjs/config/config.cjs +25 -19
- package/dist/cjs/config/index.cjs +6 -2
- package/dist/cjs/config/mode.cjs +15 -0
- package/dist/cjs/config/timeouts.cjs +6 -0
- package/dist/cjs/decisionMachine/index.cjs +85 -0
- package/dist/cjs/index.cjs +81 -2
- package/dist/cjs/procaptcha/behavioral.cjs +1 -0
- package/dist/cjs/procaptcha/index.cjs +1 -0
- package/dist/cjs/provider/api.cjs +263 -9
- package/dist/cjs/provider/database.cjs +253 -0
- package/dist/cjs/provider/index.cjs +43 -0
- package/dist/cjs/provider/reasons.cjs +45 -0
- package/dist/cjs/provider/scheduler.cjs +1 -0
- package/dist/client/captchaType/captchaType.d.ts +3 -2
- package/dist/client/captchaType/captchaType.d.ts.map +1 -1
- package/dist/client/captchaType/captchaType.js +17 -2
- package/dist/client/captchaType/captchaType.js.map +1 -0
- package/dist/client/captchaType/captchaTypeSpec.js.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +20 -3
- package/dist/client/index.js.map +1 -0
- package/dist/client/settings.d.ts +278 -2
- package/dist/client/settings.d.ts.map +1 -1
- package/dist/client/settings.js +89 -7
- package/dist/client/settings.js.map +1 -0
- package/dist/client/testSiteKeys.d.ts +8 -0
- package/dist/client/testSiteKeys.d.ts.map +1 -0
- package/dist/client/testSiteKeys.js +22 -0
- package/dist/client/testSiteKeys.js.map +1 -0
- package/dist/client/user.js.map +1 -0
- package/dist/config/config.d.ts +371 -30
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +25 -19
- package/dist/config/config.js.map +1 -0
- package/dist/config/enumMap.js +6 -0
- package/dist/config/enumMap.js.map +1 -0
- package/dist/config/frictionless.js.map +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +6 -2
- package/dist/config/index.js.map +1 -0
- package/dist/config/mode.d.ts +8 -0
- package/dist/config/mode.d.ts.map +1 -0
- package/dist/config/mode.js +15 -0
- package/dist/config/mode.js.map +1 -0
- package/dist/config/network.js.map +1 -0
- package/dist/config/timeouts.d.ts +3 -0
- package/dist/config/timeouts.d.ts.map +1 -1
- package/dist/config/timeouts.js +7 -1
- package/dist/config/timeouts.js.map +1 -0
- package/dist/datasets/assets.js.map +1 -0
- package/dist/datasets/captcha.d.ts +2 -2
- package/dist/datasets/captcha.d.ts.map +1 -1
- package/dist/datasets/captcha.js.map +1 -0
- package/dist/datasets/dataset.js.map +1 -0
- package/dist/datasets/index.js.map +1 -0
- package/dist/datasets/merkle.js.map +1 -0
- package/dist/decisionMachine/index.d.ts +174 -0
- package/dist/decisionMachine/index.d.ts.map +1 -0
- package/dist/decisionMachine/index.js +85 -0
- package/dist/decisionMachine/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -6
- package/dist/index.js.map +1 -0
- package/dist/keyring/index.js.map +1 -0
- package/dist/keyring/keyring/types.d.ts +8 -1
- package/dist/keyring/keyring/types.d.ts.map +1 -1
- package/dist/keyring/keyring/types.js.map +1 -0
- package/dist/keyring/pair/types.js.map +1 -0
- package/dist/procaptcha/api.d.ts +3 -2
- package/dist/procaptcha/api.d.ts.map +1 -1
- package/dist/procaptcha/api.js.map +1 -0
- package/dist/procaptcha/behavioral.d.ts +49 -0
- package/dist/procaptcha/behavioral.d.ts.map +1 -0
- package/dist/procaptcha/behavioral.js +1 -0
- package/dist/procaptcha/behavioral.js.map +1 -0
- package/dist/procaptcha/client.js.map +1 -0
- package/dist/procaptcha/collector.js.map +1 -0
- package/dist/procaptcha/index.d.ts +1 -0
- package/dist/procaptcha/index.d.ts.map +1 -1
- package/dist/procaptcha/index.js +1 -0
- package/dist/procaptcha/index.js.map +1 -0
- package/dist/procaptcha/manager.js.map +1 -0
- package/dist/procaptcha/props.d.ts +27 -0
- package/dist/procaptcha/props.d.ts.map +1 -1
- package/dist/procaptcha/props.js.map +1 -0
- package/dist/procaptcha/token.js.map +1 -0
- package/dist/procaptcha/utils.js.map +1 -0
- package/dist/procaptcha-bundle/index.d.ts +0 -3
- package/dist/procaptcha-bundle/index.d.ts.map +1 -1
- package/dist/procaptcha-bundle/index.js.map +1 -0
- package/dist/procaptcha-frictionless/index.js.map +1 -0
- package/dist/procaptcha-frictionless/props.d.ts +23 -0
- package/dist/procaptcha-frictionless/props.d.ts.map +1 -1
- package/dist/procaptcha-frictionless/props.js.map +1 -0
- package/dist/provider/accounts.js.map +1 -0
- package/dist/provider/api.d.ts +1663 -116
- package/dist/provider/api.d.ts.map +1 -1
- package/dist/provider/api.js +263 -9
- package/dist/provider/api.js.map +1 -0
- package/dist/provider/database.d.ts +1376 -0
- package/dist/provider/database.d.ts.map +1 -0
- package/dist/provider/database.js +253 -0
- package/dist/provider/database.js.map +1 -0
- package/dist/provider/detection.d.ts +21 -0
- package/dist/provider/detection.d.ts.map +1 -1
- package/dist/provider/detection.js.map +1 -0
- package/dist/provider/index.d.ts +2 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +44 -1
- package/dist/provider/index.js.map +1 -0
- package/dist/provider/reasons.d.ts +40 -0
- package/dist/provider/reasons.d.ts.map +1 -0
- package/dist/provider/reasons.js +45 -0
- package/dist/provider/reasons.js.map +1 -0
- package/dist/provider/scheduler.d.ts +2 -1
- package/dist/provider/scheduler.d.ts.map +1 -1
- package/dist/provider/scheduler.js +1 -0
- package/dist/provider/scheduler.js.map +1 -0
- package/package.json +9 -7
- package/vite.cjs.config.ts +1 -1
- package/vite.esm.config.ts +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -4,6 +4,7 @@ require("./api/index.cjs");
|
|
|
4
4
|
require("./client/index.cjs");
|
|
5
5
|
require("./config/index.cjs");
|
|
6
6
|
require("./datasets/index.cjs");
|
|
7
|
+
const index = require("./decisionMachine/index.cjs");
|
|
7
8
|
require("./provider/index.cjs");
|
|
8
9
|
require("./procaptcha/index.cjs");
|
|
9
10
|
require("./procaptcha-bundle/index.cjs");
|
|
@@ -12,8 +13,10 @@ require("./keyring/index.cjs");
|
|
|
12
13
|
const params = require("./api/params.cjs");
|
|
13
14
|
const user = require("./client/user.cjs");
|
|
14
15
|
const settings = require("./client/settings.cjs");
|
|
16
|
+
const testSiteKeys = require("./client/testSiteKeys.cjs");
|
|
15
17
|
const captchaType = require("./client/captchaType/captchaType.cjs");
|
|
16
18
|
const captchaTypeSpec = require("./client/captchaType/captchaTypeSpec.cjs");
|
|
19
|
+
const mode = require("./config/mode.cjs");
|
|
17
20
|
const config = require("./config/config.cjs");
|
|
18
21
|
const network = require("./config/network.cjs");
|
|
19
22
|
const timeouts = require("./config/timeouts.cjs");
|
|
@@ -22,8 +25,24 @@ const captcha = require("./datasets/captcha.cjs");
|
|
|
22
25
|
const dataset = require("./datasets/dataset.cjs");
|
|
23
26
|
const api = require("./provider/api.cjs");
|
|
24
27
|
const scheduler = require("./provider/scheduler.cjs");
|
|
28
|
+
const database = require("./provider/database.cjs");
|
|
29
|
+
const reasons = require("./provider/reasons.cjs");
|
|
25
30
|
const manager = require("./procaptcha/manager.cjs");
|
|
26
31
|
const token = require("./procaptcha/token.cjs");
|
|
32
|
+
exports.COUNTER_CAPTCHA_ANY = index.COUNTER_CAPTCHA_ANY;
|
|
33
|
+
exports.COUNTER_DIMENSIONS = index.COUNTER_DIMENSIONS;
|
|
34
|
+
exports.COUNTER_KINDS = index.COUNTER_KINDS;
|
|
35
|
+
exports.COUNTER_WINDOWS = index.COUNTER_WINDOWS;
|
|
36
|
+
exports.COUNTER_WINDOW_SECONDS = index.COUNTER_WINDOW_SECONDS;
|
|
37
|
+
exports.CounterSpecSchema = index.CounterSpecSchema;
|
|
38
|
+
exports.DecisionMachineConfigSchema = index.DecisionMachineConfigSchema;
|
|
39
|
+
exports.DecisionMachineDecision = index.DecisionMachineDecision;
|
|
40
|
+
exports.DecisionMachineLanguage = index.DecisionMachineLanguage;
|
|
41
|
+
exports.DecisionMachineOutputSchema = index.DecisionMachineOutputSchema;
|
|
42
|
+
exports.DecisionMachineRuntime = index.DecisionMachineRuntime;
|
|
43
|
+
exports.DecisionMachineScope = index.DecisionMachineScope;
|
|
44
|
+
exports.RoutingMachineOutputSchema = index.RoutingMachineOutputSchema;
|
|
45
|
+
exports.encodeCounterKey = index.encodeCounterKey;
|
|
27
46
|
exports.ApiParams = params.ApiParams;
|
|
28
47
|
exports.Tier = user.Tier;
|
|
29
48
|
exports.TierMonthlyLimits = user.TierMonthlyLimits;
|
|
@@ -32,9 +51,15 @@ exports.ClientSettingsSchema = settings.ClientSettingsSchema;
|
|
|
32
51
|
exports.ContextConfigSchema = settings.ContextConfigSchema;
|
|
33
52
|
exports.ContextType = settings.ContextType;
|
|
34
53
|
exports.ContextTypeSchema = settings.ContextTypeSchema;
|
|
54
|
+
exports.EmailSpamRulesSchema = settings.EmailSpamRulesSchema;
|
|
55
|
+
exports.EncodingType = settings.EncodingType;
|
|
56
|
+
exports.EncodingTypeSchema = settings.EncodingTypeSchema;
|
|
57
|
+
exports.HoneypotSettingsSchema = settings.HoneypotSettingsSchema;
|
|
35
58
|
exports.IPValidationAction = settings.IPValidationAction;
|
|
36
59
|
exports.IPValidationActionSchema = settings.IPValidationActionSchema;
|
|
37
60
|
exports.IPValidationRulesSchema = settings.IPValidationRulesSchema;
|
|
61
|
+
exports.SpamFilterRulesSchema = settings.SpamFilterRulesSchema;
|
|
62
|
+
exports.TrafficFilterSchema = settings.TrafficFilterSchema;
|
|
38
63
|
exports.abuseScoreThresholdDefault = settings.abuseScoreThresholdDefault;
|
|
39
64
|
exports.abuseScoreThresholdExceedActionDefault = settings.abuseScoreThresholdExceedActionDefault;
|
|
40
65
|
exports.captchaTypeDefault = settings.captchaTypeDefault;
|
|
@@ -45,21 +70,31 @@ exports.distanceExceedActionDefault = settings.distanceExceedActionDefault;
|
|
|
45
70
|
exports.distanceThresholdKmDefault = settings.distanceThresholdKmDefault;
|
|
46
71
|
exports.domainsDefault = settings.domainsDefault;
|
|
47
72
|
exports.frictionlessThresholdDefault = settings.frictionlessThresholdDefault;
|
|
73
|
+
exports.honeypotEncodingTypeDefault = settings.honeypotEncodingTypeDefault;
|
|
74
|
+
exports.imageMaxRoundsDefault = settings.imageMaxRoundsDefault;
|
|
48
75
|
exports.imageThresholdDefault = settings.imageThresholdDefault;
|
|
49
76
|
exports.ispChangeActionDefault = settings.ispChangeActionDefault;
|
|
77
|
+
exports.maxLocalPartDotsDefault = settings.maxLocalPartDotsDefault;
|
|
50
78
|
exports.powDifficultyDefault = settings.powDifficultyDefault;
|
|
79
|
+
exports.puzzleToleranceDefault = settings.puzzleToleranceDefault;
|
|
51
80
|
exports.requireAllConditionsDefault = settings.requireAllConditionsDefault;
|
|
81
|
+
exports.trafficFilterAbuserScoreThresholdDefault = settings.trafficFilterAbuserScoreThresholdDefault;
|
|
82
|
+
exports.ALWAYS_FAIL_SITE_KEY = testSiteKeys.ALWAYS_FAIL_SITE_KEY;
|
|
83
|
+
exports.ALWAYS_PASS_SITE_KEY = testSiteKeys.ALWAYS_PASS_SITE_KEY;
|
|
84
|
+
exports.TestSiteKeyMode = testSiteKeys.TestSiteKeyMode;
|
|
85
|
+
exports.getTestSiteKeyMode = testSiteKeys.getTestSiteKeyMode;
|
|
52
86
|
exports.CaptchaType = captchaType.CaptchaType;
|
|
53
87
|
exports.CaptchaTypeSchema = captchaType.CaptchaTypeSchema;
|
|
88
|
+
exports.DecisionMachineCaptchaTypeSchema = captchaType.DecisionMachineCaptchaTypeSchema;
|
|
54
89
|
exports.CaptchaTypeSpec = captchaTypeSpec.CaptchaTypeSpec;
|
|
90
|
+
exports.Mode = mode.Mode;
|
|
91
|
+
exports.ModeEnum = mode.ModeEnum;
|
|
55
92
|
exports.AccountCreatorConfigSchema = config.AccountCreatorConfigSchema;
|
|
56
93
|
exports.CaptchaTimeoutSchema = config.CaptchaTimeoutSchema;
|
|
57
94
|
exports.DatabaseConfigSchema = config.DatabaseConfigSchema;
|
|
58
95
|
exports.DatabaseTypes = config.DatabaseTypes;
|
|
59
96
|
exports.EnvironmentTypesSchema = config.EnvironmentTypesSchema;
|
|
60
97
|
exports.IpApiServiceSpec = config.IpApiServiceSpec;
|
|
61
|
-
exports.Mode = config.Mode;
|
|
62
|
-
exports.ModeEnum = config.ModeEnum;
|
|
63
98
|
exports.PolkadotSecretJSONSpec = config.PolkadotSecretJSONSpec;
|
|
64
99
|
exports.ProcaptchaConfigSchema = config.ProcaptchaConfigSchema;
|
|
65
100
|
exports.ProsopoApiConfigSchema = config.ProsopoApiConfigSchema;
|
|
@@ -78,6 +113,9 @@ exports.DEFAULT_MAX_VERIFIED_TIME_CONTRACT = timeouts.DEFAULT_MAX_VERIFIED_TIME_
|
|
|
78
113
|
exports.DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT = timeouts.DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT;
|
|
79
114
|
exports.DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT = timeouts.DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT;
|
|
80
115
|
exports.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT = timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT;
|
|
116
|
+
exports.DEFAULT_PUZZLE_CAPTCHA_CACHED_TIMEOUT = timeouts.DEFAULT_PUZZLE_CAPTCHA_CACHED_TIMEOUT;
|
|
117
|
+
exports.DEFAULT_PUZZLE_CAPTCHA_SOLUTION_TIMEOUT = timeouts.DEFAULT_PUZZLE_CAPTCHA_SOLUTION_TIMEOUT;
|
|
118
|
+
exports.DEFAULT_PUZZLE_CAPTCHA_VERIFIED_TIMEOUT = timeouts.DEFAULT_PUZZLE_CAPTCHA_VERIFIED_TIMEOUT;
|
|
81
119
|
exports.FrictionlessPenalties = frictionless.FrictionlessPenalties;
|
|
82
120
|
exports.PENALTY_ACCESS_RULE_DEFAULT = frictionless.PENALTY_ACCESS_RULE_DEFAULT;
|
|
83
121
|
exports.PENALTY_OLD_TIMESTAMP_DEFAULT = frictionless.PENALTY_OLD_TIMESTAMP_DEFAULT;
|
|
@@ -120,26 +158,67 @@ exports.BlockRuleSpec = api.BlockRuleSpec;
|
|
|
120
158
|
exports.BlockRuleType = api.BlockRuleType;
|
|
121
159
|
exports.CaptchaRequestBody = api.CaptchaRequestBody;
|
|
122
160
|
exports.CaptchaSolutionBody = api.CaptchaSolutionBody;
|
|
161
|
+
exports.ClearAllCountersBody = api.ClearAllCountersBody;
|
|
162
|
+
exports.ClearAllCountersResponse = api.ClearAllCountersResponse;
|
|
123
163
|
exports.ClientApiPaths = api.ClientApiPaths;
|
|
164
|
+
exports.ClientMetaDataSchema = api.ClientMetaDataSchema;
|
|
124
165
|
exports.DEFAULT_SOLVED_COUNT = api.DEFAULT_SOLVED_COUNT;
|
|
125
166
|
exports.DEFAULT_UNSOLVED_COUNT = api.DEFAULT_UNSOLVED_COUNT;
|
|
126
167
|
exports.DappDomainRequestBody = api.DappDomainRequestBody;
|
|
168
|
+
exports.DecisionMachineSummarySchema = api.DecisionMachineSummarySchema;
|
|
169
|
+
exports.DnsEventBatchSchema = api.DnsEventBatchSchema;
|
|
170
|
+
exports.DnsEventKindSchema = api.DnsEventKindSchema;
|
|
171
|
+
exports.DnsEventSchema = api.DnsEventSchema;
|
|
172
|
+
exports.GetAllDecisionMachinesBody = api.GetAllDecisionMachinesBody;
|
|
173
|
+
exports.GetAllDecisionMachinesResponse = api.GetAllDecisionMachinesResponse;
|
|
174
|
+
exports.GetDecisionMachineBody = api.GetDecisionMachineBody;
|
|
175
|
+
exports.GetDecisionMachineResponse = api.GetDecisionMachineResponse;
|
|
127
176
|
exports.GetFrictionlessCaptchaChallengeRequestBody = api.GetFrictionlessCaptchaChallengeRequestBody;
|
|
128
177
|
exports.GetPowCaptchaChallengeRequestBody = api.GetPowCaptchaChallengeRequestBody;
|
|
178
|
+
exports.GetPuzzleCaptchaChallengeRequestBody = api.GetPuzzleCaptchaChallengeRequestBody;
|
|
129
179
|
exports.ProsopoCaptchaCountConfigSchema = api.ProsopoCaptchaCountConfigSchema;
|
|
130
180
|
exports.ProviderDefaultRateLimits = api.ProviderDefaultRateLimits;
|
|
131
181
|
exports.PublicApiPaths = api.PublicApiPaths;
|
|
182
|
+
exports.PuzzleEventSchema = api.PuzzleEventSchema;
|
|
132
183
|
exports.RegisterSitekeyBody = api.RegisterSitekeyBody;
|
|
184
|
+
exports.RegisterSitekeysBody = api.RegisterSitekeysBody;
|
|
185
|
+
exports.RemoveAllDecisionMachinesBody = api.RemoveAllDecisionMachinesBody;
|
|
186
|
+
exports.RemoveAllDecisionMachinesResponse = api.RemoveAllDecisionMachinesResponse;
|
|
187
|
+
exports.RemoveDecisionMachineBody = api.RemoveDecisionMachineBody;
|
|
188
|
+
exports.RemoveDecisionMachineResponse = api.RemoveDecisionMachineResponse;
|
|
133
189
|
exports.RemoveDetectorKeyBodySpec = api.RemoveDetectorKeyBodySpec;
|
|
190
|
+
exports.RemoveSitekeyBody = api.RemoveSitekeyBody;
|
|
191
|
+
exports.RemoveSitekeysBody = api.RemoveSitekeysBody;
|
|
134
192
|
exports.ServerPowCaptchaVerifyRequestBody = api.ServerPowCaptchaVerifyRequestBody;
|
|
193
|
+
exports.ServerPuzzleCaptchaVerifyRequestBody = api.ServerPuzzleCaptchaVerifyRequestBody;
|
|
135
194
|
exports.SubmitPowCaptchaSolutionBody = api.SubmitPowCaptchaSolutionBody;
|
|
195
|
+
exports.SubmitPuzzleCaptchaSolutionBody = api.SubmitPuzzleCaptchaSolutionBody;
|
|
136
196
|
exports.ToggleMaintenanceModeBody = api.ToggleMaintenanceModeBody;
|
|
197
|
+
exports.UpdateDecisionMachineBody = api.UpdateDecisionMachineBody;
|
|
137
198
|
exports.UpdateDetectorKeyBody = api.UpdateDetectorKeyBody;
|
|
138
199
|
exports.VerifyPowCaptchaSolutionBody = api.VerifyPowCaptchaSolutionBody;
|
|
139
200
|
exports.VerifySolutionBody = api.VerifySolutionBody;
|
|
140
201
|
exports.providerDetailsSchema = api.providerDetailsSchema;
|
|
141
202
|
exports.ScheduledTaskNames = scheduler.ScheduledTaskNames;
|
|
142
203
|
exports.ScheduledTaskStatus = scheduler.ScheduledTaskStatus;
|
|
204
|
+
exports.CaptchaLabel = database.CaptchaLabel;
|
|
205
|
+
exports.CaptchaLabelSchema = database.CaptchaLabelSchema;
|
|
206
|
+
exports.ClientMetaDataDbSchema = database.ClientMetaDataDbSchema;
|
|
207
|
+
exports.CompositeIpAddressSchema = database.CompositeIpAddressSchema;
|
|
208
|
+
exports.IpAddressType = database.IpAddressType;
|
|
209
|
+
exports.PoWCaptchaStoredSchema = database.PoWCaptchaStoredSchema;
|
|
210
|
+
exports.ScoreComponentsSchema = database.ScoreComponentsSchema;
|
|
211
|
+
exports.SessionSchema = database.SessionSchema;
|
|
212
|
+
exports.SimdReadingsSchema = database.SimdReadingsSchema;
|
|
213
|
+
exports.SimdReadingsStage = database.SimdReadingsStage;
|
|
214
|
+
exports.SimdReadingsStageSchema = database.SimdReadingsStageSchema;
|
|
215
|
+
exports.StoredCaptchaMetadataSchema = database.StoredCaptchaMetadataSchema;
|
|
216
|
+
exports.UserCommitmentSchema = database.UserCommitmentSchema;
|
|
217
|
+
exports.UserCommitmentWithSolutionsSchema = database.UserCommitmentWithSolutionsSchema;
|
|
218
|
+
exports.UserSolutionSchema = database.UserSolutionSchema;
|
|
219
|
+
exports.parseMongooseCompositeIpAddress = database.parseMongooseCompositeIpAddress;
|
|
220
|
+
exports.FrictionlessReason = reasons.FrictionlessReason;
|
|
221
|
+
exports.ResultReason = reasons.ResultReason;
|
|
143
222
|
exports.ProcaptchaResponse = manager.ProcaptchaResponse;
|
|
144
223
|
exports.ChallengeSignatureSchema = token.ChallengeSignatureSchema;
|
|
145
224
|
exports.ProcaptchaOutputSchema = token.ProcaptchaOutputSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const z = require("zod");
|
|
4
4
|
const params = require("../api/params.cjs");
|
|
5
|
+
const captchaType = require("../client/captchaType/captchaType.cjs");
|
|
5
6
|
require("../client/index.cjs");
|
|
7
|
+
const mode = require("../config/mode.cjs");
|
|
6
8
|
const timeouts = require("../config/timeouts.cjs");
|
|
7
9
|
require("../datasets/index.cjs");
|
|
10
|
+
const index = require("../decisionMachine/index.cjs");
|
|
8
11
|
require("../procaptcha/index.cjs");
|
|
9
12
|
const token = require("../procaptcha/token.cjs");
|
|
10
13
|
const captcha = require("../datasets/captcha.cjs");
|
|
@@ -21,8 +24,12 @@ var ClientApiPaths = /* @__PURE__ */ ((ClientApiPaths2) => {
|
|
|
21
24
|
ClientApiPaths2["SubmitPowCaptchaSolution"] = "/v1/prosopo/provider/client/pow/solution";
|
|
22
25
|
ClientApiPaths2["VerifyPowCaptchaSolution"] = "/v1/prosopo/provider/client/pow/verify";
|
|
23
26
|
ClientApiPaths2["VerifyImageCaptchaSolutionDapp"] = "/v1/prosopo/provider/client/image/dapp/verify";
|
|
27
|
+
ClientApiPaths2["GetPuzzleCaptchaChallenge"] = "/v1/prosopo/provider/client/captcha/puzzle";
|
|
28
|
+
ClientApiPaths2["SubmitPuzzleCaptchaSolution"] = "/v1/prosopo/provider/client/puzzle/solution";
|
|
29
|
+
ClientApiPaths2["VerifyPuzzleCaptchaSolution"] = "/v1/prosopo/provider/client/puzzle/verify";
|
|
24
30
|
ClientApiPaths2["GetProviderStatus"] = "/v1/prosopo/provider/client/status";
|
|
25
31
|
ClientApiPaths2["SubmitUserEvents"] = "/v1/prosopo/provider/client/events";
|
|
32
|
+
ClientApiPaths2["CheckSpamEmail"] = "/v1/prosopo/provider/client/spam/email";
|
|
26
33
|
return ClientApiPaths2;
|
|
27
34
|
})(ClientApiPaths || {});
|
|
28
35
|
var PublicApiPaths = /* @__PURE__ */ ((PublicApiPaths2) => {
|
|
@@ -41,9 +48,19 @@ const providerDetailsSchema = z.object({
|
|
|
41
48
|
});
|
|
42
49
|
var AdminApiPaths = /* @__PURE__ */ ((AdminApiPaths2) => {
|
|
43
50
|
AdminApiPaths2["SiteKeyRegister"] = "/v1/prosopo/provider/admin/sitekey/register";
|
|
51
|
+
AdminApiPaths2["SiteKeysRegister"] = "/v1/prosopo/provider/admin/sitekeys/register";
|
|
44
52
|
AdminApiPaths2["UpdateDetectorKey"] = "/v1/prosopo/provider/admin/detector/update";
|
|
45
53
|
AdminApiPaths2["RemoveDetectorKey"] = "/v1/prosopo/provider/admin/detector/remove";
|
|
46
54
|
AdminApiPaths2["ToggleMaintenanceMode"] = "/v1/prosopo/provider/admin/maintenance/toggle";
|
|
55
|
+
AdminApiPaths2["UpdateDecisionMachine"] = "/v1/prosopo/provider/admin/decision-machine/update";
|
|
56
|
+
AdminApiPaths2["GetAllDecisionMachines"] = "/v1/prosopo/provider/admin/decision-machine/get-all";
|
|
57
|
+
AdminApiPaths2["GetDecisionMachine"] = "/v1/prosopo/provider/admin/decision-machine/get";
|
|
58
|
+
AdminApiPaths2["RemoveDecisionMachine"] = "/v1/prosopo/provider/admin/decision-machine/remove";
|
|
59
|
+
AdminApiPaths2["RemoveAllDecisionMachines"] = "/v1/prosopo/provider/admin/decision-machine/remove-all";
|
|
60
|
+
AdminApiPaths2["ClearAllCounters"] = "/v1/prosopo/provider/admin/counters/clear-all";
|
|
61
|
+
AdminApiPaths2["SiteKeyRemove"] = "/v1/prosopo/provider/admin/sitekey/remove";
|
|
62
|
+
AdminApiPaths2["SiteKeysRemove"] = "/v1/prosopo/provider/admin/sitekeys/remove";
|
|
63
|
+
AdminApiPaths2["DnsEvent"] = "/v1/prosopo/provider/admin/dns/event";
|
|
47
64
|
return AdminApiPaths2;
|
|
48
65
|
})(AdminApiPaths || {});
|
|
49
66
|
const ProviderDefaultRateLimits = {
|
|
@@ -73,18 +90,37 @@ const ProviderDefaultRateLimits = {
|
|
|
73
90
|
[
|
|
74
91
|
"/v1/prosopo/provider/client/pow/verify"
|
|
75
92
|
/* VerifyPowCaptchaSolution */
|
|
93
|
+
]: { windowMs: 6e4, limit: 3e3 },
|
|
94
|
+
[
|
|
95
|
+
"/v1/prosopo/provider/client/captcha/puzzle"
|
|
96
|
+
/* GetPuzzleCaptchaChallenge */
|
|
97
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
98
|
+
[
|
|
99
|
+
"/v1/prosopo/provider/client/puzzle/solution"
|
|
100
|
+
/* SubmitPuzzleCaptchaSolution */
|
|
76
101
|
]: { windowMs: 6e4, limit: 60 },
|
|
102
|
+
[
|
|
103
|
+
"/v1/prosopo/provider/client/puzzle/verify"
|
|
104
|
+
/* VerifyPuzzleCaptchaSolution */
|
|
105
|
+
]: {
|
|
106
|
+
windowMs: 6e4,
|
|
107
|
+
limit: 3e3
|
|
108
|
+
},
|
|
77
109
|
[
|
|
78
110
|
"/v1/prosopo/provider/client/image/dapp/verify"
|
|
79
111
|
/* VerifyImageCaptchaSolutionDapp */
|
|
80
112
|
]: {
|
|
81
113
|
windowMs: 6e4,
|
|
82
|
-
limit:
|
|
114
|
+
limit: 3e3
|
|
83
115
|
},
|
|
84
116
|
[
|
|
85
117
|
"/v1/prosopo/provider/client/status"
|
|
86
118
|
/* GetProviderStatus */
|
|
87
119
|
]: { windowMs: 6e4, limit: 60 },
|
|
120
|
+
[
|
|
121
|
+
"/v1/prosopo/provider/client/spam/email"
|
|
122
|
+
/* CheckSpamEmail */
|
|
123
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
88
124
|
[
|
|
89
125
|
"/v1/prosopo/provider/public/details"
|
|
90
126
|
/* GetProviderDetails */
|
|
@@ -97,6 +133,10 @@ const ProviderDefaultRateLimits = {
|
|
|
97
133
|
"/v1/prosopo/provider/admin/sitekey/register"
|
|
98
134
|
/* SiteKeyRegister */
|
|
99
135
|
]: { windowMs: 6e4, limit: 5 },
|
|
136
|
+
[
|
|
137
|
+
"/v1/prosopo/provider/admin/sitekeys/register"
|
|
138
|
+
/* SiteKeysRegister */
|
|
139
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
100
140
|
[
|
|
101
141
|
"/v1/prosopo/provider/admin/detector/update"
|
|
102
142
|
/* UpdateDetectorKey */
|
|
@@ -108,7 +148,46 @@ const ProviderDefaultRateLimits = {
|
|
|
108
148
|
[
|
|
109
149
|
"/v1/prosopo/provider/admin/maintenance/toggle"
|
|
110
150
|
/* ToggleMaintenanceMode */
|
|
111
|
-
]: { windowMs: 6e4, limit: 5 }
|
|
151
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
152
|
+
[
|
|
153
|
+
"/v1/prosopo/provider/admin/decision-machine/update"
|
|
154
|
+
/* UpdateDecisionMachine */
|
|
155
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
156
|
+
[
|
|
157
|
+
"/v1/prosopo/provider/admin/decision-machine/get-all"
|
|
158
|
+
/* GetAllDecisionMachines */
|
|
159
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
160
|
+
[
|
|
161
|
+
"/v1/prosopo/provider/admin/decision-machine/get"
|
|
162
|
+
/* GetDecisionMachine */
|
|
163
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
164
|
+
[
|
|
165
|
+
"/v1/prosopo/provider/admin/decision-machine/remove"
|
|
166
|
+
/* RemoveDecisionMachine */
|
|
167
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
168
|
+
[
|
|
169
|
+
"/v1/prosopo/provider/admin/decision-machine/remove-all"
|
|
170
|
+
/* RemoveAllDecisionMachines */
|
|
171
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
172
|
+
[
|
|
173
|
+
"/v1/prosopo/provider/admin/counters/clear-all"
|
|
174
|
+
/* ClearAllCounters */
|
|
175
|
+
]: { windowMs: 6e4, limit: 10 },
|
|
176
|
+
[
|
|
177
|
+
"/v1/prosopo/provider/admin/sitekey/remove"
|
|
178
|
+
/* SiteKeyRemove */
|
|
179
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
180
|
+
[
|
|
181
|
+
"/v1/prosopo/provider/admin/sitekeys/remove"
|
|
182
|
+
/* SiteKeysRemove */
|
|
183
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
184
|
+
// Sidecar batches events and POSTs at shipper_flush_ms cadence
|
|
185
|
+
// (1s default), so a high per-minute ceiling is fine. Single ingest
|
|
186
|
+
// path per pronode → no cross-tenant fairness concerns.
|
|
187
|
+
[
|
|
188
|
+
"/v1/prosopo/provider/admin/dns/event"
|
|
189
|
+
/* DnsEvent */
|
|
190
|
+
]: { windowMs: 6e4, limit: 600 }
|
|
112
191
|
};
|
|
113
192
|
const createRateLimitSchemaWithDefaults = (paths) => z.object(
|
|
114
193
|
Object.entries(paths).reduce(
|
|
@@ -130,7 +209,11 @@ const CaptchaRequestBody = z.object({
|
|
|
130
209
|
[params.ApiParams.user]: z.string(),
|
|
131
210
|
[params.ApiParams.dapp]: z.string(),
|
|
132
211
|
[params.ApiParams.datasetId]: z.union([z.string(), z.array(z.number())]),
|
|
133
|
-
[params.ApiParams.sessionId]: z.string().optional()
|
|
212
|
+
[params.ApiParams.sessionId]: z.string().optional(),
|
|
213
|
+
[params.ApiParams.simdReadings]: z.string().optional()
|
|
214
|
+
});
|
|
215
|
+
const ClientMetaDataSchema = z.object({
|
|
216
|
+
[params.ApiParams.hp]: z.string().optional()
|
|
134
217
|
});
|
|
135
218
|
const CaptchaSolutionBody = z.object({
|
|
136
219
|
[params.ApiParams.user]: z.string(),
|
|
@@ -141,24 +224,58 @@ const CaptchaSolutionBody = z.object({
|
|
|
141
224
|
[params.ApiParams.signature]: z.object({
|
|
142
225
|
[params.ApiParams.user]: token.TimestampSignatureSchema,
|
|
143
226
|
[params.ApiParams.provider]: token.RequestHashSignatureSchema
|
|
144
|
-
})
|
|
227
|
+
}),
|
|
228
|
+
[params.ApiParams.behavioralData]: z.string().optional(),
|
|
229
|
+
// Compact encoded SimdReadings produced by @prosopo/catcher's
|
|
230
|
+
// simdReadingsCodec — opaque at this layer; the provider decodes and
|
|
231
|
+
// persists on the captcha record. Collection-only, no scoring.
|
|
232
|
+
[params.ApiParams.simdReadings]: z.string().optional(),
|
|
233
|
+
[params.ApiParams.clientMetaData]: ClientMetaDataSchema.optional()
|
|
145
234
|
});
|
|
146
235
|
const VerifySolutionBody = z.object({
|
|
147
236
|
[params.ApiParams.token]: token.ProcaptchaTokenSpec,
|
|
148
237
|
[params.ApiParams.dappSignature]: z.string(),
|
|
149
238
|
[params.ApiParams.maxVerifiedTime]: z.number().optional().default(timeouts.DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED),
|
|
150
|
-
[params.ApiParams.ip]: z.string().optional()
|
|
239
|
+
[params.ApiParams.ip]: z.string().optional(),
|
|
240
|
+
[params.ApiParams.email]: z.string().optional()
|
|
151
241
|
});
|
|
152
242
|
const ServerPowCaptchaVerifyRequestBody = z.object({
|
|
153
243
|
[params.ApiParams.token]: token.ProcaptchaTokenSpec,
|
|
154
244
|
[params.ApiParams.dappSignature]: z.string(),
|
|
155
245
|
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT),
|
|
156
|
-
[params.ApiParams.ip]: z.string().optional()
|
|
246
|
+
[params.ApiParams.ip]: z.string().optional(),
|
|
247
|
+
[params.ApiParams.email]: z.string().email().optional()
|
|
248
|
+
});
|
|
249
|
+
const DnsEventKindSchema = z.union([
|
|
250
|
+
z.string().regex(/^dns$/),
|
|
251
|
+
z.string().regex(/^http$/)
|
|
252
|
+
]);
|
|
253
|
+
const DnsEventSchema = z.object({
|
|
254
|
+
kind: DnsEventKindSchema,
|
|
255
|
+
ts: z.string(),
|
|
256
|
+
// ISO-8601 UTC (serde default for chrono DateTime<Utc>)
|
|
257
|
+
src_ip: z.string(),
|
|
258
|
+
// Per-session ID carried in the URL subdomain — captures the procaptcha
|
|
259
|
+
// sessionId. Named `jti` on the wire for cross-product compatibility
|
|
260
|
+
// with Protect's session identifier.
|
|
261
|
+
jti: z.string().optional(),
|
|
262
|
+
site_key: z.string().optional(),
|
|
263
|
+
subzone: z.string().optional(),
|
|
264
|
+
qname: z.string().optional(),
|
|
265
|
+
qtype: z.string().optional(),
|
|
266
|
+
sni: z.string().optional(),
|
|
267
|
+
path: z.string().optional(),
|
|
268
|
+
user_agent: z.string().optional(),
|
|
269
|
+
path_valid: z.boolean().optional()
|
|
270
|
+
});
|
|
271
|
+
const DnsEventBatchSchema = z.object({
|
|
272
|
+
events: z.array(DnsEventSchema)
|
|
157
273
|
});
|
|
158
274
|
const GetPowCaptchaChallengeRequestBody = z.object({
|
|
159
275
|
[params.ApiParams.user]: z.string(),
|
|
160
276
|
[params.ApiParams.dapp]: z.string(),
|
|
161
|
-
[params.ApiParams.sessionId]: z.string().optional()
|
|
277
|
+
[params.ApiParams.sessionId]: z.string().optional(),
|
|
278
|
+
[params.ApiParams.simdReadings]: z.string().optional()
|
|
162
279
|
});
|
|
163
280
|
const SubmitPowCaptchaSolutionBody = z.object({
|
|
164
281
|
[params.ApiParams.challenge]: captcha.PowChallengeIdSchema,
|
|
@@ -174,13 +291,58 @@ const SubmitPowCaptchaSolutionBody = z.object({
|
|
|
174
291
|
[params.ApiParams.user]: z.string(),
|
|
175
292
|
[params.ApiParams.dapp]: z.string(),
|
|
176
293
|
[params.ApiParams.nonce]: z.number(),
|
|
177
|
-
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT)
|
|
294
|
+
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT),
|
|
295
|
+
[params.ApiParams.behavioralData]: z.string().optional(),
|
|
296
|
+
[params.ApiParams.salt]: z.string().optional(),
|
|
297
|
+
[params.ApiParams.simdReadings]: z.string().optional(),
|
|
298
|
+
[params.ApiParams.clientMetaData]: ClientMetaDataSchema.optional()
|
|
178
299
|
});
|
|
179
300
|
const GetFrictionlessCaptchaChallengeRequestBody = z.object({
|
|
180
301
|
[params.ApiParams.dapp]: z.string(),
|
|
181
302
|
[params.ApiParams.token]: z.string(),
|
|
182
303
|
[params.ApiParams.user]: z.string(),
|
|
183
|
-
[params.ApiParams.headHash]: z.string()
|
|
304
|
+
[params.ApiParams.headHash]: z.string(),
|
|
305
|
+
[params.ApiParams.mode]: z.nativeEnum(mode.ModeEnum).optional(),
|
|
306
|
+
[params.ApiParams.simdReadings]: z.string().optional()
|
|
307
|
+
});
|
|
308
|
+
const GetPuzzleCaptchaChallengeRequestBody = z.object({
|
|
309
|
+
[params.ApiParams.user]: z.string(),
|
|
310
|
+
[params.ApiParams.dapp]: z.string(),
|
|
311
|
+
[params.ApiParams.sessionId]: z.string().optional(),
|
|
312
|
+
[params.ApiParams.simdReadings]: z.string().optional()
|
|
313
|
+
});
|
|
314
|
+
const PuzzleEventSchema = z.object({
|
|
315
|
+
x: z.number(),
|
|
316
|
+
y: z.number(),
|
|
317
|
+
t: z.number()
|
|
318
|
+
});
|
|
319
|
+
const SubmitPuzzleCaptchaSolutionBody = z.object({
|
|
320
|
+
[params.ApiParams.challenge]: captcha.PowChallengeIdSchema,
|
|
321
|
+
[params.ApiParams.finalX]: z.number(),
|
|
322
|
+
[params.ApiParams.finalY]: z.number(),
|
|
323
|
+
[params.ApiParams.puzzleEvents]: z.array(PuzzleEventSchema),
|
|
324
|
+
[params.ApiParams.signature]: z.object({
|
|
325
|
+
[params.ApiParams.user]: z.object({
|
|
326
|
+
[params.ApiParams.timestamp]: z.string()
|
|
327
|
+
}),
|
|
328
|
+
[params.ApiParams.provider]: z.object({
|
|
329
|
+
[params.ApiParams.challenge]: z.string()
|
|
330
|
+
})
|
|
331
|
+
}),
|
|
332
|
+
[params.ApiParams.user]: z.string(),
|
|
333
|
+
[params.ApiParams.dapp]: z.string(),
|
|
334
|
+
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT),
|
|
335
|
+
[params.ApiParams.behavioralData]: z.string().optional(),
|
|
336
|
+
[params.ApiParams.salt]: z.string().optional(),
|
|
337
|
+
[params.ApiParams.simdReadings]: z.string().optional(),
|
|
338
|
+
[params.ApiParams.clientMetaData]: ClientMetaDataSchema.optional()
|
|
339
|
+
});
|
|
340
|
+
const ServerPuzzleCaptchaVerifyRequestBody = z.object({
|
|
341
|
+
[params.ApiParams.token]: token.ProcaptchaTokenSpec,
|
|
342
|
+
[params.ApiParams.dappSignature]: z.string(),
|
|
343
|
+
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT),
|
|
344
|
+
[params.ApiParams.ip]: z.string().optional(),
|
|
345
|
+
[params.ApiParams.email]: z.string().email().optional()
|
|
184
346
|
});
|
|
185
347
|
const VerifyPowCaptchaSolutionBody = z.object({
|
|
186
348
|
[params.ApiParams.siteKey]: z.string()
|
|
@@ -190,9 +352,78 @@ const RegisterSitekeyBody = z.object({
|
|
|
190
352
|
[params.ApiParams.tier]: z.nativeEnum(user.Tier),
|
|
191
353
|
[params.ApiParams.settings]: settings.ClientSettingsSchema.optional()
|
|
192
354
|
});
|
|
355
|
+
const RegisterSitekeysBody = z.array(
|
|
356
|
+
z.object({
|
|
357
|
+
[params.ApiParams.siteKey]: z.string(),
|
|
358
|
+
[params.ApiParams.tier]: z.nativeEnum(user.Tier),
|
|
359
|
+
[params.ApiParams.settings]: settings.ClientSettingsSchema.optional()
|
|
360
|
+
})
|
|
361
|
+
);
|
|
362
|
+
const RemoveSitekeyBody = z.object({
|
|
363
|
+
[params.ApiParams.siteKey]: z.string()
|
|
364
|
+
});
|
|
365
|
+
const RemoveSitekeysBody = z.array(
|
|
366
|
+
z.object({
|
|
367
|
+
[params.ApiParams.siteKey]: z.string()
|
|
368
|
+
})
|
|
369
|
+
);
|
|
193
370
|
const UpdateDetectorKeyBody = z.object({
|
|
194
371
|
[params.ApiParams.detectorKey]: z.string()
|
|
195
372
|
});
|
|
373
|
+
const UpdateDecisionMachineBody = z.object({
|
|
374
|
+
[params.ApiParams.decisionMachineScope]: z.nativeEnum(index.DecisionMachineScope),
|
|
375
|
+
[params.ApiParams.decisionMachineRuntime]: z.nativeEnum(index.DecisionMachineRuntime),
|
|
376
|
+
[params.ApiParams.decisionMachineSource]: z.string(),
|
|
377
|
+
[params.ApiParams.decisionMachineLanguage]: z.nativeEnum(
|
|
378
|
+
index.DecisionMachineLanguage
|
|
379
|
+
).optional(),
|
|
380
|
+
[params.ApiParams.decisionMachineName]: z.string().optional(),
|
|
381
|
+
[params.ApiParams.decisionMachineVersion]: z.string().optional(),
|
|
382
|
+
[params.ApiParams.decisionMachineCaptchaType]: captchaType.DecisionMachineCaptchaTypeSchema.optional(),
|
|
383
|
+
[params.ApiParams.dapp]: z.string().optional()
|
|
384
|
+
});
|
|
385
|
+
const GetDecisionMachineBody = z.object({
|
|
386
|
+
id: z.string()
|
|
387
|
+
});
|
|
388
|
+
const GetAllDecisionMachinesBody = z.object({});
|
|
389
|
+
const RemoveDecisionMachineBody = z.object({
|
|
390
|
+
id: z.string()
|
|
391
|
+
});
|
|
392
|
+
const RemoveAllDecisionMachinesBody = z.object({});
|
|
393
|
+
const ClearAllCountersBody = z.object({
|
|
394
|
+
[params.ApiParams.dapp]: z.string().optional()
|
|
395
|
+
});
|
|
396
|
+
const ClearAllCountersResponse = z.object({
|
|
397
|
+
success: z.boolean(),
|
|
398
|
+
deletedCount: z.number(),
|
|
399
|
+
scope: z.string()
|
|
400
|
+
});
|
|
401
|
+
const DecisionMachineSummarySchema = z.object({
|
|
402
|
+
_id: z.string(),
|
|
403
|
+
scope: z.nativeEnum(index.DecisionMachineScope),
|
|
404
|
+
dappAccount: z.string().nullish(),
|
|
405
|
+
runtime: z.nativeEnum(index.DecisionMachineRuntime),
|
|
406
|
+
language: z.nativeEnum(index.DecisionMachineLanguage).nullish(),
|
|
407
|
+
name: z.string().nullish(),
|
|
408
|
+
version: z.string().nullish(),
|
|
409
|
+
captchaType: captchaType.DecisionMachineCaptchaTypeSchema.nullish(),
|
|
410
|
+
createdAt: z.string(),
|
|
411
|
+
updatedAt: z.string()
|
|
412
|
+
});
|
|
413
|
+
const GetAllDecisionMachinesResponse = z.array(
|
|
414
|
+
DecisionMachineSummarySchema
|
|
415
|
+
);
|
|
416
|
+
const GetDecisionMachineResponse = DecisionMachineSummarySchema.extend({
|
|
417
|
+
source: z.string()
|
|
418
|
+
});
|
|
419
|
+
const RemoveDecisionMachineResponse = z.object({
|
|
420
|
+
success: z.boolean(),
|
|
421
|
+
deletedId: z.string()
|
|
422
|
+
});
|
|
423
|
+
const RemoveAllDecisionMachinesResponse = z.object({
|
|
424
|
+
success: z.boolean(),
|
|
425
|
+
deletedCount: z.number()
|
|
426
|
+
});
|
|
196
427
|
const RemoveDetectorKeyBodySpec = z.object({
|
|
197
428
|
[params.ApiParams.detectorKey]: z.string(),
|
|
198
429
|
[params.ApiParams.expirationInSeconds]: z.number().positive().optional()
|
|
@@ -231,20 +462,43 @@ exports.BlockRuleSpec = BlockRuleSpec;
|
|
|
231
462
|
exports.BlockRuleType = BlockRuleType;
|
|
232
463
|
exports.CaptchaRequestBody = CaptchaRequestBody;
|
|
233
464
|
exports.CaptchaSolutionBody = CaptchaSolutionBody;
|
|
465
|
+
exports.ClearAllCountersBody = ClearAllCountersBody;
|
|
466
|
+
exports.ClearAllCountersResponse = ClearAllCountersResponse;
|
|
234
467
|
exports.ClientApiPaths = ClientApiPaths;
|
|
468
|
+
exports.ClientMetaDataSchema = ClientMetaDataSchema;
|
|
235
469
|
exports.DEFAULT_SOLVED_COUNT = DEFAULT_SOLVED_COUNT;
|
|
236
470
|
exports.DEFAULT_UNSOLVED_COUNT = DEFAULT_UNSOLVED_COUNT;
|
|
237
471
|
exports.DappDomainRequestBody = DappDomainRequestBody;
|
|
472
|
+
exports.DecisionMachineSummarySchema = DecisionMachineSummarySchema;
|
|
473
|
+
exports.DnsEventBatchSchema = DnsEventBatchSchema;
|
|
474
|
+
exports.DnsEventKindSchema = DnsEventKindSchema;
|
|
475
|
+
exports.DnsEventSchema = DnsEventSchema;
|
|
476
|
+
exports.GetAllDecisionMachinesBody = GetAllDecisionMachinesBody;
|
|
477
|
+
exports.GetAllDecisionMachinesResponse = GetAllDecisionMachinesResponse;
|
|
478
|
+
exports.GetDecisionMachineBody = GetDecisionMachineBody;
|
|
479
|
+
exports.GetDecisionMachineResponse = GetDecisionMachineResponse;
|
|
238
480
|
exports.GetFrictionlessCaptchaChallengeRequestBody = GetFrictionlessCaptchaChallengeRequestBody;
|
|
239
481
|
exports.GetPowCaptchaChallengeRequestBody = GetPowCaptchaChallengeRequestBody;
|
|
482
|
+
exports.GetPuzzleCaptchaChallengeRequestBody = GetPuzzleCaptchaChallengeRequestBody;
|
|
240
483
|
exports.ProsopoCaptchaCountConfigSchema = ProsopoCaptchaCountConfigSchema;
|
|
241
484
|
exports.ProviderDefaultRateLimits = ProviderDefaultRateLimits;
|
|
242
485
|
exports.PublicApiPaths = PublicApiPaths;
|
|
486
|
+
exports.PuzzleEventSchema = PuzzleEventSchema;
|
|
243
487
|
exports.RegisterSitekeyBody = RegisterSitekeyBody;
|
|
488
|
+
exports.RegisterSitekeysBody = RegisterSitekeysBody;
|
|
489
|
+
exports.RemoveAllDecisionMachinesBody = RemoveAllDecisionMachinesBody;
|
|
490
|
+
exports.RemoveAllDecisionMachinesResponse = RemoveAllDecisionMachinesResponse;
|
|
491
|
+
exports.RemoveDecisionMachineBody = RemoveDecisionMachineBody;
|
|
492
|
+
exports.RemoveDecisionMachineResponse = RemoveDecisionMachineResponse;
|
|
244
493
|
exports.RemoveDetectorKeyBodySpec = RemoveDetectorKeyBodySpec;
|
|
494
|
+
exports.RemoveSitekeyBody = RemoveSitekeyBody;
|
|
495
|
+
exports.RemoveSitekeysBody = RemoveSitekeysBody;
|
|
245
496
|
exports.ServerPowCaptchaVerifyRequestBody = ServerPowCaptchaVerifyRequestBody;
|
|
497
|
+
exports.ServerPuzzleCaptchaVerifyRequestBody = ServerPuzzleCaptchaVerifyRequestBody;
|
|
246
498
|
exports.SubmitPowCaptchaSolutionBody = SubmitPowCaptchaSolutionBody;
|
|
499
|
+
exports.SubmitPuzzleCaptchaSolutionBody = SubmitPuzzleCaptchaSolutionBody;
|
|
247
500
|
exports.ToggleMaintenanceModeBody = ToggleMaintenanceModeBody;
|
|
501
|
+
exports.UpdateDecisionMachineBody = UpdateDecisionMachineBody;
|
|
248
502
|
exports.UpdateDetectorKeyBody = UpdateDetectorKeyBody;
|
|
249
503
|
exports.VerifyPowCaptchaSolutionBody = VerifyPowCaptchaSolutionBody;
|
|
250
504
|
exports.VerifySolutionBody = VerifySolutionBody;
|