@prosopo/types 3.5.3 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/dist/api/params.d.ts +3 -1
- package/dist/api/params.d.ts.map +1 -1
- package/dist/api/params.js +2 -0
- package/dist/cjs/api/params.cjs +2 -0
- package/dist/cjs/client/index.cjs +1 -0
- package/dist/cjs/client/settings.cjs +10 -2
- package/dist/cjs/config/config.cjs +8 -4
- package/dist/cjs/config/frictionless.cjs +4 -1
- package/dist/cjs/config/index.cjs +1 -0
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/provider/api.cjs +11 -1
- package/dist/cjs/provider/index.cjs +1 -0
- package/dist/cjs/provider/scheduler.cjs +1 -0
- package/dist/client/index.js +2 -1
- package/dist/client/settings.d.ts +30 -0
- package/dist/client/settings.d.ts.map +1 -1
- package/dist/client/settings.js +10 -2
- package/dist/client/user.d.ts +2 -3
- package/dist/client/user.d.ts.map +1 -1
- package/dist/config/config.d.ts +43 -15
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +10 -6
- package/dist/config/frictionless.d.ts +4 -0
- package/dist/config/frictionless.d.ts.map +1 -1
- package/dist/config/frictionless.js +5 -2
- package/dist/config/index.js +2 -1
- package/dist/datasets/captcha.d.ts +42 -42
- package/dist/datasets/dataset.d.ts +28 -28
- package/dist/index.js +6 -3
- package/dist/provider/api.d.ts +63 -1
- package/dist/provider/api.d.ts.map +1 -1
- package/dist/provider/api.js +11 -1
- package/dist/provider/detection.d.ts +3 -0
- package/dist/provider/detection.d.ts.map +1 -1
- package/dist/provider/index.js +2 -1
- 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/package.json +14 -14
package/dist/config/config.d.ts
CHANGED
|
@@ -146,7 +146,6 @@ export declare const ProsopoBasicConfigSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
146
146
|
dbname?: string | undefined;
|
|
147
147
|
authSource?: string | undefined;
|
|
148
148
|
}>>>;
|
|
149
|
-
devOnlyWatchEvents: z.ZodOptional<z.ZodBoolean>;
|
|
150
149
|
}>, "strip", z.ZodTypeAny, {
|
|
151
150
|
logLevel: "error" | "trace" | "debug" | "info" | "warn" | "fatal" | "log";
|
|
152
151
|
defaultEnvironment: "development" | "staging" | "production";
|
|
@@ -161,7 +160,6 @@ export declare const ProsopoBasicConfigSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
161
160
|
dbname: string;
|
|
162
161
|
authSource: string;
|
|
163
162
|
}>> | undefined;
|
|
164
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
165
163
|
}, {
|
|
166
164
|
account: {
|
|
167
165
|
secret?: string | undefined;
|
|
@@ -176,7 +174,6 @@ export declare const ProsopoBasicConfigSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
176
174
|
dbname?: string | undefined;
|
|
177
175
|
authSource?: string | undefined;
|
|
178
176
|
}>> | undefined;
|
|
179
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
180
177
|
}>;
|
|
181
178
|
export type ProsopoBasicConfigInput = input<typeof ProsopoBasicConfigSchema>;
|
|
182
179
|
export type ProsopoBasicConfigOutput = output<typeof ProsopoBasicConfigSchema>;
|
|
@@ -236,7 +233,6 @@ export declare const ProsopoClientConfigSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
236
233
|
dbname?: string | undefined;
|
|
237
234
|
authSource?: string | undefined;
|
|
238
235
|
}>>>;
|
|
239
|
-
devOnlyWatchEvents: z.ZodOptional<z.ZodBoolean>;
|
|
240
236
|
}>, {
|
|
241
237
|
userAccountAddress: z.ZodOptional<z.ZodString>;
|
|
242
238
|
web2: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -260,7 +256,6 @@ export declare const ProsopoClientConfigSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
260
256
|
dbname: string;
|
|
261
257
|
authSource: string;
|
|
262
258
|
}>> | undefined;
|
|
263
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
264
259
|
userAccountAddress?: string | undefined;
|
|
265
260
|
serverUrl?: string | undefined;
|
|
266
261
|
}, {
|
|
@@ -277,7 +272,6 @@ export declare const ProsopoClientConfigSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
277
272
|
dbname?: string | undefined;
|
|
278
273
|
authSource?: string | undefined;
|
|
279
274
|
}>> | undefined;
|
|
280
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
281
275
|
userAccountAddress?: string | undefined;
|
|
282
276
|
web2?: boolean | undefined;
|
|
283
277
|
solutionThreshold?: number | undefined;
|
|
@@ -387,7 +381,6 @@ export declare const ProsopoServerConfigSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
387
381
|
dbname?: string | undefined;
|
|
388
382
|
authSource?: string | undefined;
|
|
389
383
|
}>>>;
|
|
390
|
-
devOnlyWatchEvents: z.ZodOptional<z.ZodBoolean>;
|
|
391
384
|
}>, {
|
|
392
385
|
userAccountAddress: z.ZodOptional<z.ZodString>;
|
|
393
386
|
web2: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -497,7 +490,6 @@ export declare const ProsopoServerConfigSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
497
490
|
dbname: string;
|
|
498
491
|
authSource: string;
|
|
499
492
|
}>> | undefined;
|
|
500
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
501
493
|
userAccountAddress?: string | undefined;
|
|
502
494
|
serverUrl?: string | undefined;
|
|
503
495
|
}, {
|
|
@@ -530,7 +522,6 @@ export declare const ProsopoServerConfigSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
530
522
|
dbname?: string | undefined;
|
|
531
523
|
authSource?: string | undefined;
|
|
532
524
|
}>> | undefined;
|
|
533
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
534
525
|
userAccountAddress?: string | undefined;
|
|
535
526
|
web2?: boolean | undefined;
|
|
536
527
|
solutionThreshold?: number | undefined;
|
|
@@ -620,7 +611,6 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
|
|
|
620
611
|
dbname?: string | undefined;
|
|
621
612
|
authSource?: string | undefined;
|
|
622
613
|
}>>>;
|
|
623
|
-
devOnlyWatchEvents: z.ZodOptional<z.ZodBoolean>;
|
|
624
614
|
}>, {
|
|
625
615
|
userAccountAddress: z.ZodOptional<z.ZodString>;
|
|
626
616
|
web2: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -644,7 +634,6 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
|
|
|
644
634
|
dbname: string;
|
|
645
635
|
authSource: string;
|
|
646
636
|
}>> | undefined;
|
|
647
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
648
637
|
userAccountAddress?: string | undefined;
|
|
649
638
|
serverUrl?: string | undefined;
|
|
650
639
|
}, {
|
|
@@ -661,7 +650,6 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
|
|
|
661
650
|
dbname?: string | undefined;
|
|
662
651
|
authSource?: string | undefined;
|
|
663
652
|
}>> | undefined;
|
|
664
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
665
653
|
userAccountAddress?: string | undefined;
|
|
666
654
|
web2?: boolean | undefined;
|
|
667
655
|
solutionThreshold?: number | undefined;
|
|
@@ -739,7 +727,9 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
|
|
|
739
727
|
}>>>>;
|
|
740
728
|
language: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
|
|
741
729
|
mode: z.ZodDefault<z.ZodOptional<z.ZodOptional<z.ZodEnum<[ModeEnum.visible, ModeEnum.invisible]>>>>;
|
|
730
|
+
contextAware: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
742
731
|
}, "strip", z.ZodTypeAny, {
|
|
732
|
+
contextAware: boolean;
|
|
743
733
|
captchas: {
|
|
744
734
|
image: {
|
|
745
735
|
verifiedTimeout: number;
|
|
@@ -760,6 +750,7 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
|
|
|
760
750
|
mode: ModeEnum;
|
|
761
751
|
language?: string | undefined;
|
|
762
752
|
}, {
|
|
753
|
+
contextAware?: boolean | undefined;
|
|
763
754
|
captchas?: {
|
|
764
755
|
image?: {
|
|
765
756
|
verifiedTimeout?: number | undefined;
|
|
@@ -826,7 +817,6 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
826
817
|
dbname?: string | undefined;
|
|
827
818
|
authSource?: string | undefined;
|
|
828
819
|
}>>>;
|
|
829
|
-
devOnlyWatchEvents: z.ZodOptional<z.ZodBoolean>;
|
|
830
820
|
}>, {
|
|
831
821
|
host: z.ZodString;
|
|
832
822
|
captchas: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
@@ -863,14 +853,17 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
863
853
|
PENALTY_OLD_TIMESTAMP: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
864
854
|
PENALTY_ACCESS_RULE: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
865
855
|
PENALTY_UNVERIFIED_HOST: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
856
|
+
PENALTY_WEBVIEW: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
866
857
|
}, "strip", z.ZodTypeAny, {
|
|
867
858
|
PENALTY_OLD_TIMESTAMP: number;
|
|
868
859
|
PENALTY_ACCESS_RULE: number;
|
|
869
860
|
PENALTY_UNVERIFIED_HOST: number;
|
|
861
|
+
PENALTY_WEBVIEW: number;
|
|
870
862
|
}, {
|
|
871
863
|
PENALTY_OLD_TIMESTAMP?: number | undefined;
|
|
872
864
|
PENALTY_ACCESS_RULE?: number | undefined;
|
|
873
865
|
PENALTY_UNVERIFIED_HOST?: number | undefined;
|
|
866
|
+
PENALTY_WEBVIEW?: number | undefined;
|
|
874
867
|
}>>>;
|
|
875
868
|
scheduledTasks: z.ZodOptional<z.ZodObject<{
|
|
876
869
|
captchaScheduler: z.ZodOptional<z.ZodObject<{
|
|
@@ -887,6 +880,13 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
887
880
|
}, {
|
|
888
881
|
schedule?: string | undefined;
|
|
889
882
|
}>>;
|
|
883
|
+
clientEntropyScheduler: z.ZodOptional<z.ZodObject<{
|
|
884
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
885
|
+
}, "strip", z.ZodTypeAny, {
|
|
886
|
+
schedule?: string | undefined;
|
|
887
|
+
}, {
|
|
888
|
+
schedule?: string | undefined;
|
|
889
|
+
}>>;
|
|
890
890
|
}, "strip", z.ZodTypeAny, {
|
|
891
891
|
captchaScheduler?: {
|
|
892
892
|
schedule?: string | undefined;
|
|
@@ -894,6 +894,9 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
894
894
|
clientListScheduler?: {
|
|
895
895
|
schedule?: string | undefined;
|
|
896
896
|
} | undefined;
|
|
897
|
+
clientEntropyScheduler?: {
|
|
898
|
+
schedule?: string | undefined;
|
|
899
|
+
} | undefined;
|
|
897
900
|
}, {
|
|
898
901
|
captchaScheduler?: {
|
|
899
902
|
schedule?: string | undefined;
|
|
@@ -901,6 +904,9 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
901
904
|
clientListScheduler?: {
|
|
902
905
|
schedule?: string | undefined;
|
|
903
906
|
} | undefined;
|
|
907
|
+
clientEntropyScheduler?: {
|
|
908
|
+
schedule?: string | undefined;
|
|
909
|
+
} | undefined;
|
|
904
910
|
}>>;
|
|
905
911
|
server: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
906
912
|
baseURL: z.ZodString;
|
|
@@ -996,6 +1002,10 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
996
1002
|
windowMs: number;
|
|
997
1003
|
limit: number;
|
|
998
1004
|
};
|
|
1005
|
+
"/v1/prosopo/provider/admin/maintenance/toggle": {
|
|
1006
|
+
windowMs: number;
|
|
1007
|
+
limit: number;
|
|
1008
|
+
};
|
|
999
1009
|
}, {
|
|
1000
1010
|
"/v1/prosopo/provider/client/captcha/image": {
|
|
1001
1011
|
windowMs?: number | undefined;
|
|
@@ -1045,6 +1055,10 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1045
1055
|
windowMs?: number | undefined;
|
|
1046
1056
|
limit?: number | undefined;
|
|
1047
1057
|
};
|
|
1058
|
+
"/v1/prosopo/provider/admin/maintenance/toggle": {
|
|
1059
|
+
windowMs?: number | undefined;
|
|
1060
|
+
limit?: number | undefined;
|
|
1061
|
+
};
|
|
1048
1062
|
}>>;
|
|
1049
1063
|
proxyCount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1050
1064
|
lRules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
@@ -1082,6 +1096,7 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1082
1096
|
PENALTY_OLD_TIMESTAMP: number;
|
|
1083
1097
|
PENALTY_ACCESS_RULE: number;
|
|
1084
1098
|
PENALTY_UNVERIFIED_HOST: number;
|
|
1099
|
+
PENALTY_WEBVIEW: number;
|
|
1085
1100
|
};
|
|
1086
1101
|
ipApi: {
|
|
1087
1102
|
apiKey: string;
|
|
@@ -1141,6 +1156,10 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1141
1156
|
windowMs: number;
|
|
1142
1157
|
limit: number;
|
|
1143
1158
|
};
|
|
1159
|
+
"/v1/prosopo/provider/admin/maintenance/toggle": {
|
|
1160
|
+
windowMs: number;
|
|
1161
|
+
limit: number;
|
|
1162
|
+
};
|
|
1144
1163
|
};
|
|
1145
1164
|
proxyCount: number;
|
|
1146
1165
|
authAccount: {
|
|
@@ -1154,7 +1173,6 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1154
1173
|
dbname: string;
|
|
1155
1174
|
authSource: string;
|
|
1156
1175
|
}>> | undefined;
|
|
1157
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
1158
1176
|
scheduledTasks?: {
|
|
1159
1177
|
captchaScheduler?: {
|
|
1160
1178
|
schedule?: string | undefined;
|
|
@@ -1162,6 +1180,9 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1162
1180
|
clientListScheduler?: {
|
|
1163
1181
|
schedule?: string | undefined;
|
|
1164
1182
|
} | undefined;
|
|
1183
|
+
clientEntropyScheduler?: {
|
|
1184
|
+
schedule?: string | undefined;
|
|
1185
|
+
} | undefined;
|
|
1165
1186
|
} | undefined;
|
|
1166
1187
|
server?: {
|
|
1167
1188
|
baseURL: string;
|
|
@@ -1203,11 +1224,11 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1203
1224
|
dbname?: string | undefined;
|
|
1204
1225
|
authSource?: string | undefined;
|
|
1205
1226
|
}>> | undefined;
|
|
1206
|
-
devOnlyWatchEvents?: boolean | undefined;
|
|
1207
1227
|
penalties?: {
|
|
1208
1228
|
PENALTY_OLD_TIMESTAMP?: number | undefined;
|
|
1209
1229
|
PENALTY_ACCESS_RULE?: number | undefined;
|
|
1210
1230
|
PENALTY_UNVERIFIED_HOST?: number | undefined;
|
|
1231
|
+
PENALTY_WEBVIEW?: number | undefined;
|
|
1211
1232
|
} | undefined;
|
|
1212
1233
|
scheduledTasks?: {
|
|
1213
1234
|
captchaScheduler?: {
|
|
@@ -1216,6 +1237,9 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1216
1237
|
clientListScheduler?: {
|
|
1217
1238
|
schedule?: string | undefined;
|
|
1218
1239
|
} | undefined;
|
|
1240
|
+
clientEntropyScheduler?: {
|
|
1241
|
+
schedule?: string | undefined;
|
|
1242
|
+
} | undefined;
|
|
1219
1243
|
} | undefined;
|
|
1220
1244
|
server?: {
|
|
1221
1245
|
baseURL: string;
|
|
@@ -1278,6 +1302,10 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1278
1302
|
windowMs?: number | undefined;
|
|
1279
1303
|
limit?: number | undefined;
|
|
1280
1304
|
};
|
|
1305
|
+
"/v1/prosopo/provider/admin/maintenance/toggle": {
|
|
1306
|
+
windowMs?: number | undefined;
|
|
1307
|
+
limit?: number | undefined;
|
|
1308
|
+
};
|
|
1281
1309
|
} | undefined;
|
|
1282
1310
|
proxyCount?: number | undefined;
|
|
1283
1311
|
lRules?: Record<string, number> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,CAAc,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAIjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlC,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,CAAc,MAAM,KAAK,CAAC;AAoCjC,eAAO,MAAM,aAAa,sEAMxB,CAAC;AAEH,eAAO,MAAM,s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GAAG,MAAM,CAChD,OAAO,sBAAsB,CAC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/config/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LanguageSchema } from "@prosopo/locale";
|
|
2
|
-
import z, { enum as _enum, record, object, string,
|
|
2
|
+
import z, { enum as _enum, record, object, string, number, boolean, union, literal } from "zod";
|
|
3
3
|
import "../provider/index.js";
|
|
4
|
-
import { FrictionlessPenalties, PENALTY_UNVERIFIED_HOST_DEFAULT, PENALTY_ACCESS_RULE_DEFAULT, PENALTY_OLD_TIMESTAMP_DEFAULT } from "./frictionless.js";
|
|
4
|
+
import { FrictionlessPenalties, PENALTY_WEBVIEW_DEFAULT, PENALTY_UNVERIFIED_HOST_DEFAULT, PENALTY_ACCESS_RULE_DEFAULT, PENALTY_OLD_TIMESTAMP_DEFAULT } from "./frictionless.js";
|
|
5
5
|
import { DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED, DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT, DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_IMAGE_CAPTCHA_TIMEOUT, DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT, DEFAULT_MAX_VERIFIED_TIME_CONTRACT } from "./timeouts.js";
|
|
6
6
|
import { ApiPathRateLimits, ProviderDefaultRateLimits, ProsopoCaptchaCountConfigSchema, DEFAULT_UNSOLVED_COUNT, DEFAULT_SOLVED_COUNT } from "../provider/api.js";
|
|
7
7
|
const LogLevel = _enum([
|
|
@@ -62,8 +62,7 @@ const PolkadotSecretJSONSpec = z.object({
|
|
|
62
62
|
});
|
|
63
63
|
const ProsopoBasicConfigSchema = ProsopoBaseConfigSchema.merge(
|
|
64
64
|
object({
|
|
65
|
-
database: DatabaseConfigSchema.optional()
|
|
66
|
-
devOnlyWatchEvents: boolean().optional()
|
|
65
|
+
database: DatabaseConfigSchema.optional()
|
|
67
66
|
})
|
|
68
67
|
);
|
|
69
68
|
const ProsopoApiConfigSchema = object({
|
|
@@ -161,7 +160,8 @@ const ProcaptchaConfigSchema = ProsopoClientConfigSchema.and(
|
|
|
161
160
|
mode: Mode.optional().default(
|
|
162
161
|
"visible"
|
|
163
162
|
/* visible */
|
|
164
|
-
)
|
|
163
|
+
),
|
|
164
|
+
contextAware: boolean().optional().default(false)
|
|
165
165
|
})
|
|
166
166
|
);
|
|
167
167
|
const IpApiServiceSpec = z.object({
|
|
@@ -178,7 +178,8 @@ const ProsopoConfigSchema = ProsopoBasicConfigSchema.merge(
|
|
|
178
178
|
penalties: FrictionlessPenalties.optional().default({
|
|
179
179
|
PENALTY_OLD_TIMESTAMP: PENALTY_OLD_TIMESTAMP_DEFAULT,
|
|
180
180
|
PENALTY_ACCESS_RULE: PENALTY_ACCESS_RULE_DEFAULT,
|
|
181
|
-
PENALTY_UNVERIFIED_HOST: PENALTY_UNVERIFIED_HOST_DEFAULT
|
|
181
|
+
PENALTY_UNVERIFIED_HOST: PENALTY_UNVERIFIED_HOST_DEFAULT,
|
|
182
|
+
PENALTY_WEBVIEW: PENALTY_WEBVIEW_DEFAULT
|
|
182
183
|
}),
|
|
183
184
|
scheduledTasks: object({
|
|
184
185
|
captchaScheduler: object({
|
|
@@ -186,6 +187,9 @@ const ProsopoConfigSchema = ProsopoBasicConfigSchema.merge(
|
|
|
186
187
|
}).optional(),
|
|
187
188
|
clientListScheduler: object({
|
|
188
189
|
schedule: string().optional()
|
|
190
|
+
}).optional(),
|
|
191
|
+
clientEntropyScheduler: object({
|
|
192
|
+
schedule: string().optional()
|
|
189
193
|
}).optional()
|
|
190
194
|
}).optional(),
|
|
191
195
|
server: ProsopoApiConfigSchema.optional(),
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
export declare const PENALTY_OLD_TIMESTAMP_DEFAULT = 0.2;
|
|
2
2
|
export declare const PENALTY_ACCESS_RULE_DEFAULT = 0.5;
|
|
3
3
|
export declare const PENALTY_UNVERIFIED_HOST_DEFAULT = 0.2;
|
|
4
|
+
export declare const PENALTY_WEBVIEW_DEFAULT = 0.1;
|
|
4
5
|
export declare const FrictionlessPenalties: import("zod").ZodObject<{
|
|
5
6
|
PENALTY_OLD_TIMESTAMP: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
6
7
|
PENALTY_ACCESS_RULE: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
7
8
|
PENALTY_UNVERIFIED_HOST: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
9
|
+
PENALTY_WEBVIEW: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
8
10
|
}, "strip", import("zod").ZodTypeAny, {
|
|
9
11
|
PENALTY_OLD_TIMESTAMP: number;
|
|
10
12
|
PENALTY_ACCESS_RULE: number;
|
|
11
13
|
PENALTY_UNVERIFIED_HOST: number;
|
|
14
|
+
PENALTY_WEBVIEW: number;
|
|
12
15
|
}, {
|
|
13
16
|
PENALTY_OLD_TIMESTAMP?: number | undefined;
|
|
14
17
|
PENALTY_ACCESS_RULE?: number | undefined;
|
|
15
18
|
PENALTY_UNVERIFIED_HOST?: number | undefined;
|
|
19
|
+
PENALTY_WEBVIEW?: number | undefined;
|
|
16
20
|
}>;
|
|
17
21
|
//# sourceMappingURL=frictionless.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frictionless.d.ts","sourceRoot":"","sources":["../../src/config/frictionless.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"frictionless.d.ts","sourceRoot":"","sources":["../../src/config/frictionless.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAiBhC,CAAC"}
|
|
@@ -2,14 +2,17 @@ import { object, number } from "zod";
|
|
|
2
2
|
const PENALTY_OLD_TIMESTAMP_DEFAULT = 0.2;
|
|
3
3
|
const PENALTY_ACCESS_RULE_DEFAULT = 0.5;
|
|
4
4
|
const PENALTY_UNVERIFIED_HOST_DEFAULT = 0.2;
|
|
5
|
+
const PENALTY_WEBVIEW_DEFAULT = 0.1;
|
|
5
6
|
const FrictionlessPenalties = object({
|
|
6
7
|
PENALTY_OLD_TIMESTAMP: number().positive().optional().default(PENALTY_OLD_TIMESTAMP_DEFAULT),
|
|
7
8
|
PENALTY_ACCESS_RULE: number().positive().optional().default(PENALTY_ACCESS_RULE_DEFAULT),
|
|
8
|
-
PENALTY_UNVERIFIED_HOST: number().positive().optional().default(PENALTY_UNVERIFIED_HOST_DEFAULT)
|
|
9
|
+
PENALTY_UNVERIFIED_HOST: number().positive().optional().default(PENALTY_UNVERIFIED_HOST_DEFAULT),
|
|
10
|
+
PENALTY_WEBVIEW: number().positive().optional().default(PENALTY_WEBVIEW_DEFAULT)
|
|
9
11
|
});
|
|
10
12
|
export {
|
|
11
13
|
FrictionlessPenalties,
|
|
12
14
|
PENALTY_ACCESS_RULE_DEFAULT,
|
|
13
15
|
PENALTY_OLD_TIMESTAMP_DEFAULT,
|
|
14
|
-
PENALTY_UNVERIFIED_HOST_DEFAULT
|
|
16
|
+
PENALTY_UNVERIFIED_HOST_DEFAULT,
|
|
17
|
+
PENALTY_WEBVIEW_DEFAULT
|
|
15
18
|
};
|
package/dist/config/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountCreatorConfigSchema, CaptchaTimeoutSchema, DatabaseConfigSchema, DatabaseTypes, EnvironmentTypesSchema, IpApiServiceSpec, Mode, ModeEnum, PolkadotSecretJSONSpec, ProcaptchaConfigSchema, ProsopoApiConfigSchema, ProsopoBaseConfigSchema, ProsopoBasicConfigSchema, ProsopoCaptchaSolutionConfigSchema, ProsopoClientConfigSchema, ProsopoConfigSchema, ProsopoServerConfigSchema } from "./config.js";
|
|
2
2
|
import { NetworkPairTypeSchema } from "./network.js";
|
|
3
3
|
import { DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_IMAGE_CAPTCHA_TIMEOUT, DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT, DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED, DEFAULT_MAX_VERIFIED_TIME_CONTRACT, DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT } from "./timeouts.js";
|
|
4
|
-
import { FrictionlessPenalties, PENALTY_ACCESS_RULE_DEFAULT, PENALTY_OLD_TIMESTAMP_DEFAULT, PENALTY_UNVERIFIED_HOST_DEFAULT } from "./frictionless.js";
|
|
4
|
+
import { FrictionlessPenalties, PENALTY_ACCESS_RULE_DEFAULT, PENALTY_OLD_TIMESTAMP_DEFAULT, PENALTY_UNVERIFIED_HOST_DEFAULT, PENALTY_WEBVIEW_DEFAULT } from "./frictionless.js";
|
|
5
5
|
export {
|
|
6
6
|
AccountCreatorConfigSchema,
|
|
7
7
|
CaptchaTimeoutSchema,
|
|
@@ -24,6 +24,7 @@ export {
|
|
|
24
24
|
PENALTY_ACCESS_RULE_DEFAULT,
|
|
25
25
|
PENALTY_OLD_TIMESTAMP_DEFAULT,
|
|
26
26
|
PENALTY_UNVERIFIED_HOST_DEFAULT,
|
|
27
|
+
PENALTY_WEBVIEW_DEFAULT,
|
|
27
28
|
PolkadotSecretJSONSpec,
|
|
28
29
|
ProcaptchaConfigSchema,
|
|
29
30
|
ProsopoApiConfigSchema,
|