@prosopo/types 3.0.6 → 3.5.11
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 +261 -0
- package/dist/api/api.js +2 -1
- package/dist/api/api.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +4 -5
- package/dist/api/index.js.map +1 -0
- package/dist/api/ipapi.d.ts +171 -0
- package/dist/api/ipapi.d.ts.map +1 -0
- package/dist/api/ipapi.js +2 -0
- package/dist/api/ipapi.js.map +1 -0
- package/dist/api/params.d.ts +4 -1
- package/dist/api/params.d.ts.map +1 -1
- package/dist/api/params.js +44 -43
- package/dist/api/params.js.map +1 -0
- package/dist/cjs/api/index.cjs +1 -0
- package/dist/cjs/api/ipapi.cjs +1 -0
- package/dist/cjs/api/params.cjs +3 -0
- package/dist/cjs/client/index.cjs +11 -0
- package/dist/cjs/client/settings.cjs +67 -1
- package/dist/cjs/config/config.cjs +11 -3
- package/dist/cjs/config/frictionless.cjs +7 -1
- package/dist/cjs/config/index.cjs +3 -0
- package/dist/cjs/datasets/captcha.cjs +1 -1
- package/dist/cjs/index.cjs +17 -0
- package/dist/cjs/provider/api.cjs +26 -1
- package/dist/cjs/provider/detection.cjs +1 -0
- package/dist/cjs/provider/index.cjs +4 -0
- package/dist/client/captchaType/captchaType.js +9 -11
- package/dist/client/captchaType/captchaType.js.map +1 -0
- package/dist/client/captchaType/captchaTypeSpec.js +2 -3
- package/dist/client/captchaType/captchaTypeSpec.js.map +1 -0
- package/dist/client/index.js +5 -18
- package/dist/client/index.js.map +1 -0
- package/dist/client/settings.d.ts +367 -8
- package/dist/client/settings.d.ts.map +1 -1
- package/dist/client/settings.js +69 -20
- package/dist/client/settings.js.map +1 -0
- package/dist/client/user.d.ts +2 -3
- package/dist/client/user.d.ts.map +1 -1
- package/dist/client/user.js +18 -31
- package/dist/client/user.js.map +1 -0
- package/dist/config/config.d.ts +58 -15
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +168 -175
- 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.d.ts +8 -0
- package/dist/config/frictionless.d.ts.map +1 -1
- package/dist/config/frictionless.js +23 -11
- package/dist/config/frictionless.js.map +1 -0
- package/dist/config/index.js +5 -34
- package/dist/config/index.js.map +1 -0
- package/dist/config/network.js +7 -9
- package/dist/config/network.js.map +1 -0
- package/dist/config/timeouts.js +10 -19
- package/dist/config/timeouts.js.map +1 -0
- package/dist/datasets/assets.js +2 -1
- package/dist/datasets/assets.js.map +1 -0
- package/dist/datasets/captcha.d.ts +56 -56
- package/dist/datasets/captcha.js +94 -122
- package/dist/datasets/captcha.js.map +1 -0
- package/dist/datasets/dataset.d.ts +46 -46
- package/dist/datasets/dataset.js +23 -28
- package/dist/datasets/dataset.js.map +1 -0
- package/dist/datasets/index.js +5 -36
- package/dist/datasets/index.js.map +1 -0
- package/dist/datasets/merkle.js +2 -1
- package/dist/datasets/merkle.js.map +1 -0
- package/dist/index.js +10 -131
- package/dist/index.js.map +1 -0
- package/dist/keyring/index.js +3 -2
- package/dist/keyring/index.js.map +1 -0
- package/dist/keyring/keyring/types.js +2 -1
- package/dist/keyring/keyring/types.js.map +1 -0
- package/dist/keyring/pair/types.js +2 -1
- package/dist/keyring/pair/types.js.map +1 -0
- package/dist/procaptcha/api.js +2 -1
- package/dist/procaptcha/api.js.map +1 -0
- package/dist/procaptcha/client.js +2 -1
- package/dist/procaptcha/client.js.map +1 -0
- package/dist/procaptcha/collector.js +2 -1
- package/dist/procaptcha/collector.js.map +1 -0
- package/dist/procaptcha/index.js +8 -19
- package/dist/procaptcha/index.js.map +1 -0
- package/dist/procaptcha/manager.d.ts +1 -1
- package/dist/procaptcha/manager.d.ts.map +1 -1
- package/dist/procaptcha/manager.js +4 -7
- package/dist/procaptcha/manager.js.map +1 -0
- package/dist/procaptcha/props.d.ts +1 -0
- package/dist/procaptcha/props.d.ts.map +1 -1
- package/dist/procaptcha/props.js +2 -1
- package/dist/procaptcha/props.js.map +1 -0
- package/dist/procaptcha/token.js +62 -77
- package/dist/procaptcha/token.js.map +1 -0
- package/dist/procaptcha/utils.js +2 -1
- package/dist/procaptcha/utils.js.map +1 -0
- package/dist/procaptcha-bundle/index.js +2 -1
- package/dist/procaptcha-bundle/index.js.map +1 -0
- package/dist/procaptcha-frictionless/index.js +2 -1
- package/dist/procaptcha-frictionless/index.js.map +1 -0
- package/dist/procaptcha-frictionless/props.d.ts +1 -1
- package/dist/procaptcha-frictionless/props.d.ts.map +1 -1
- package/dist/procaptcha-frictionless/props.js +2 -1
- package/dist/procaptcha-frictionless/props.js.map +1 -0
- package/dist/provider/accounts.js +2 -1
- package/dist/provider/accounts.js.map +1 -0
- package/dist/provider/api.d.ts +300 -2
- package/dist/provider/api.d.ts.map +1 -1
- package/dist/provider/api.js +176 -220
- package/dist/provider/api.js.map +1 -0
- package/dist/provider/detection.d.ts +11 -0
- package/dist/provider/detection.d.ts.map +1 -0
- package/dist/provider/detection.js +2 -0
- package/dist/provider/detection.js.map +1 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +5 -29
- package/dist/provider/index.js.map +1 -0
- package/dist/provider/scheduler.js +15 -18
- package/dist/provider/scheduler.js.map +1 -0
- package/package.json +16 -19
|
@@ -1,28 +1,387 @@
|
|
|
1
|
-
import { type output } from "zod";
|
|
1
|
+
import { type output, z } from "zod";
|
|
2
2
|
import { CaptchaType } from "./captchaType/captchaType.js";
|
|
3
3
|
export declare const captchaTypeDefault = CaptchaType.frictionless;
|
|
4
4
|
export declare const domainsDefault: string[];
|
|
5
5
|
export declare const frictionlessThresholdDefault = 0.5;
|
|
6
6
|
export declare const powDifficultyDefault = 4;
|
|
7
7
|
export declare const imageThresholdDefault = 0.8;
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
export declare enum IPValidationAction {
|
|
9
|
+
Allow = "allow",
|
|
10
|
+
Reject = "reject",
|
|
11
|
+
Flag = "flag"
|
|
12
|
+
}
|
|
13
|
+
export type IPValidateCondition = {
|
|
14
|
+
met: boolean;
|
|
15
|
+
action: IPValidationAction;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const IPValidationActionSchema: z.ZodNativeEnum<typeof IPValidationAction>;
|
|
19
|
+
export declare const countryChangeActionDefault = IPValidationAction.Allow;
|
|
20
|
+
export declare const cityChangeActionDefault = IPValidationAction.Allow;
|
|
21
|
+
export declare const ispChangeActionDefault = IPValidationAction.Allow;
|
|
22
|
+
export declare const distanceThresholdKmDefault = 1000;
|
|
23
|
+
export declare const abuseScoreThresholdDefault = 0.005;
|
|
24
|
+
export declare const distanceExceedActionDefault = IPValidationAction.Reject;
|
|
25
|
+
export declare const abuseScoreThresholdExceedActionDefault = IPValidationAction.Reject;
|
|
26
|
+
export declare const requireAllConditionsDefault = false;
|
|
27
|
+
declare const IPValidationSchema: z.ZodObject<{
|
|
28
|
+
actions: z.ZodObject<{
|
|
29
|
+
countryChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
30
|
+
cityChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
31
|
+
ispChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
32
|
+
distanceExceedAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
33
|
+
abuseScoreExceedAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
36
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
37
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
38
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
39
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
42
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
43
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
44
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
45
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
distanceThresholdKm: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
abuseScoreThreshold: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
requireAllConditions: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
actions: {
|
|
52
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
53
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
54
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
55
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
56
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
57
|
+
};
|
|
58
|
+
distanceThresholdKm?: number | undefined;
|
|
59
|
+
abuseScoreThreshold?: number | undefined;
|
|
60
|
+
requireAllConditions?: boolean | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
actions: {
|
|
63
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
64
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
65
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
66
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
67
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
68
|
+
};
|
|
69
|
+
distanceThresholdKm?: number | undefined;
|
|
70
|
+
abuseScoreThreshold?: number | undefined;
|
|
71
|
+
requireAllConditions?: boolean | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const IPValidationRulesSchema: z.ZodObject<{
|
|
74
|
+
actions: z.ZodObject<{
|
|
75
|
+
countryChangeAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
76
|
+
cityChangeAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
77
|
+
ispChangeAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
78
|
+
distanceExceedAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
79
|
+
abuseScoreExceedAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
countryChangeAction: IPValidationAction;
|
|
82
|
+
cityChangeAction: IPValidationAction;
|
|
83
|
+
ispChangeAction: IPValidationAction;
|
|
84
|
+
distanceExceedAction: IPValidationAction;
|
|
85
|
+
abuseScoreExceedAction: IPValidationAction;
|
|
86
|
+
}, {
|
|
87
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
88
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
89
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
90
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
91
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
distanceThresholdKm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
94
|
+
abuseScoreThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
95
|
+
requireAllConditions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
96
|
+
countryOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
97
|
+
actions: z.ZodObject<{
|
|
98
|
+
countryChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
99
|
+
cityChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
100
|
+
ispChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
101
|
+
distanceExceedAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
102
|
+
abuseScoreExceedAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
105
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
106
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
107
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
108
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
111
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
112
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
113
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
114
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
distanceThresholdKm: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
abuseScoreThreshold: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
requireAllConditions: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
actions: {
|
|
121
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
122
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
123
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
124
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
125
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
126
|
+
};
|
|
127
|
+
distanceThresholdKm?: number | undefined;
|
|
128
|
+
abuseScoreThreshold?: number | undefined;
|
|
129
|
+
requireAllConditions?: boolean | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
actions: {
|
|
132
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
133
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
134
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
135
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
136
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
137
|
+
};
|
|
138
|
+
distanceThresholdKm?: number | undefined;
|
|
139
|
+
abuseScoreThreshold?: number | undefined;
|
|
140
|
+
requireAllConditions?: boolean | undefined;
|
|
141
|
+
}>>>;
|
|
142
|
+
forceConsistentIp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
actions: {
|
|
145
|
+
countryChangeAction: IPValidationAction;
|
|
146
|
+
cityChangeAction: IPValidationAction;
|
|
147
|
+
ispChangeAction: IPValidationAction;
|
|
148
|
+
distanceExceedAction: IPValidationAction;
|
|
149
|
+
abuseScoreExceedAction: IPValidationAction;
|
|
150
|
+
};
|
|
151
|
+
distanceThresholdKm: number;
|
|
152
|
+
abuseScoreThreshold: number;
|
|
153
|
+
requireAllConditions: boolean;
|
|
154
|
+
forceConsistentIp: boolean;
|
|
155
|
+
countryOverrides?: Record<string, {
|
|
156
|
+
actions: {
|
|
157
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
158
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
159
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
160
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
161
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
162
|
+
};
|
|
163
|
+
distanceThresholdKm?: number | undefined;
|
|
164
|
+
abuseScoreThreshold?: number | undefined;
|
|
165
|
+
requireAllConditions?: boolean | undefined;
|
|
166
|
+
}> | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
actions: {
|
|
169
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
170
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
171
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
172
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
173
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
174
|
+
};
|
|
175
|
+
distanceThresholdKm?: number | undefined;
|
|
176
|
+
abuseScoreThreshold?: number | undefined;
|
|
177
|
+
requireAllConditions?: boolean | undefined;
|
|
178
|
+
countryOverrides?: Record<string, {
|
|
179
|
+
actions: {
|
|
180
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
181
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
182
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
183
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
184
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
185
|
+
};
|
|
186
|
+
distanceThresholdKm?: number | undefined;
|
|
187
|
+
abuseScoreThreshold?: number | undefined;
|
|
188
|
+
requireAllConditions?: boolean | undefined;
|
|
189
|
+
}> | undefined;
|
|
190
|
+
forceConsistentIp?: boolean | undefined;
|
|
191
|
+
}>;
|
|
192
|
+
export declare const ClientSettingsSchema: z.ZodObject<{
|
|
193
|
+
captchaType: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof CaptchaType>>>;
|
|
194
|
+
domains: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
195
|
+
frictionlessThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
196
|
+
powDifficulty: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
197
|
+
imageThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
198
|
+
ipValidationRules: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
actions: z.ZodObject<{
|
|
200
|
+
countryChangeAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
201
|
+
cityChangeAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
202
|
+
ispChangeAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
203
|
+
distanceExceedAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
204
|
+
abuseScoreExceedAction: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
countryChangeAction: IPValidationAction;
|
|
207
|
+
cityChangeAction: IPValidationAction;
|
|
208
|
+
ispChangeAction: IPValidationAction;
|
|
209
|
+
distanceExceedAction: IPValidationAction;
|
|
210
|
+
abuseScoreExceedAction: IPValidationAction;
|
|
211
|
+
}, {
|
|
212
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
213
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
214
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
215
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
216
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
217
|
+
}>;
|
|
218
|
+
distanceThresholdKm: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
219
|
+
abuseScoreThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
220
|
+
requireAllConditions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
221
|
+
countryOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
222
|
+
actions: z.ZodObject<{
|
|
223
|
+
countryChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
224
|
+
cityChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
225
|
+
ispChangeAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
226
|
+
distanceExceedAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
227
|
+
abuseScoreExceedAction: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof IPValidationAction>>>;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
230
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
231
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
232
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
233
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
234
|
+
}, {
|
|
235
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
236
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
237
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
238
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
239
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
240
|
+
}>;
|
|
241
|
+
distanceThresholdKm: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
abuseScoreThreshold: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
requireAllConditions: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
actions: {
|
|
246
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
247
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
248
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
249
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
250
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
251
|
+
};
|
|
252
|
+
distanceThresholdKm?: number | undefined;
|
|
253
|
+
abuseScoreThreshold?: number | undefined;
|
|
254
|
+
requireAllConditions?: boolean | undefined;
|
|
255
|
+
}, {
|
|
256
|
+
actions: {
|
|
257
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
258
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
259
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
260
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
261
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
262
|
+
};
|
|
263
|
+
distanceThresholdKm?: number | undefined;
|
|
264
|
+
abuseScoreThreshold?: number | undefined;
|
|
265
|
+
requireAllConditions?: boolean | undefined;
|
|
266
|
+
}>>>;
|
|
267
|
+
forceConsistentIp: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
actions: {
|
|
270
|
+
countryChangeAction: IPValidationAction;
|
|
271
|
+
cityChangeAction: IPValidationAction;
|
|
272
|
+
ispChangeAction: IPValidationAction;
|
|
273
|
+
distanceExceedAction: IPValidationAction;
|
|
274
|
+
abuseScoreExceedAction: IPValidationAction;
|
|
275
|
+
};
|
|
276
|
+
distanceThresholdKm: number;
|
|
277
|
+
abuseScoreThreshold: number;
|
|
278
|
+
requireAllConditions: boolean;
|
|
279
|
+
forceConsistentIp: boolean;
|
|
280
|
+
countryOverrides?: Record<string, {
|
|
281
|
+
actions: {
|
|
282
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
283
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
284
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
285
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
286
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
287
|
+
};
|
|
288
|
+
distanceThresholdKm?: number | undefined;
|
|
289
|
+
abuseScoreThreshold?: number | undefined;
|
|
290
|
+
requireAllConditions?: boolean | undefined;
|
|
291
|
+
}> | undefined;
|
|
292
|
+
}, {
|
|
293
|
+
actions: {
|
|
294
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
295
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
296
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
297
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
298
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
299
|
+
};
|
|
300
|
+
distanceThresholdKm?: number | undefined;
|
|
301
|
+
abuseScoreThreshold?: number | undefined;
|
|
302
|
+
requireAllConditions?: boolean | undefined;
|
|
303
|
+
countryOverrides?: Record<string, {
|
|
304
|
+
actions: {
|
|
305
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
306
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
307
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
308
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
309
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
310
|
+
};
|
|
311
|
+
distanceThresholdKm?: number | undefined;
|
|
312
|
+
abuseScoreThreshold?: number | undefined;
|
|
313
|
+
requireAllConditions?: boolean | undefined;
|
|
314
|
+
}> | undefined;
|
|
315
|
+
forceConsistentIp?: boolean | undefined;
|
|
316
|
+
}>>;
|
|
317
|
+
disallowWebView: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
318
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
319
|
captchaType: CaptchaType;
|
|
16
320
|
domains: string[];
|
|
17
321
|
frictionlessThreshold: number;
|
|
18
322
|
powDifficulty: number;
|
|
19
323
|
imageThreshold: number;
|
|
324
|
+
disallowWebView: boolean;
|
|
325
|
+
ipValidationRules?: {
|
|
326
|
+
actions: {
|
|
327
|
+
countryChangeAction: IPValidationAction;
|
|
328
|
+
cityChangeAction: IPValidationAction;
|
|
329
|
+
ispChangeAction: IPValidationAction;
|
|
330
|
+
distanceExceedAction: IPValidationAction;
|
|
331
|
+
abuseScoreExceedAction: IPValidationAction;
|
|
332
|
+
};
|
|
333
|
+
distanceThresholdKm: number;
|
|
334
|
+
abuseScoreThreshold: number;
|
|
335
|
+
requireAllConditions: boolean;
|
|
336
|
+
forceConsistentIp: boolean;
|
|
337
|
+
countryOverrides?: Record<string, {
|
|
338
|
+
actions: {
|
|
339
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
340
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
341
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
342
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
343
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
344
|
+
};
|
|
345
|
+
distanceThresholdKm?: number | undefined;
|
|
346
|
+
abuseScoreThreshold?: number | undefined;
|
|
347
|
+
requireAllConditions?: boolean | undefined;
|
|
348
|
+
}> | undefined;
|
|
349
|
+
} | undefined;
|
|
20
350
|
}, {
|
|
21
351
|
captchaType?: CaptchaType | undefined;
|
|
22
352
|
domains?: string[] | undefined;
|
|
23
353
|
frictionlessThreshold?: number | undefined;
|
|
24
354
|
powDifficulty?: number | undefined;
|
|
25
355
|
imageThreshold?: number | undefined;
|
|
356
|
+
ipValidationRules?: {
|
|
357
|
+
actions: {
|
|
358
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
359
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
360
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
361
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
362
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
363
|
+
};
|
|
364
|
+
distanceThresholdKm?: number | undefined;
|
|
365
|
+
abuseScoreThreshold?: number | undefined;
|
|
366
|
+
requireAllConditions?: boolean | undefined;
|
|
367
|
+
countryOverrides?: Record<string, {
|
|
368
|
+
actions: {
|
|
369
|
+
countryChangeAction?: IPValidationAction | undefined;
|
|
370
|
+
cityChangeAction?: IPValidationAction | undefined;
|
|
371
|
+
ispChangeAction?: IPValidationAction | undefined;
|
|
372
|
+
distanceExceedAction?: IPValidationAction | undefined;
|
|
373
|
+
abuseScoreExceedAction?: IPValidationAction | undefined;
|
|
374
|
+
};
|
|
375
|
+
distanceThresholdKm?: number | undefined;
|
|
376
|
+
abuseScoreThreshold?: number | undefined;
|
|
377
|
+
requireAllConditions?: boolean | undefined;
|
|
378
|
+
}> | undefined;
|
|
379
|
+
forceConsistentIp?: boolean | undefined;
|
|
380
|
+
} | undefined;
|
|
381
|
+
disallowWebView?: boolean | undefined;
|
|
26
382
|
}>;
|
|
27
383
|
export type IUserSettings = output<typeof ClientSettingsSchema>;
|
|
384
|
+
export type IIPValidationRules = output<typeof IPValidationRulesSchema>;
|
|
385
|
+
export type IIPValidation = output<typeof IPValidationSchema>;
|
|
386
|
+
export {};
|
|
28
387
|
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAkC,KAAK,MAAM,EAAU,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,eAAO,MAAM,cAAc,EAAE,MAAM,EAAO,CAAC;AAC3C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAGzC,oBAAY,kBAAkB;IAC7B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACb;AAED,MAAM,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,4CAAmC,CAAC;AAGzE,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AACnE,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAC/C,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AAChD,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AACrE,eAAO,MAAM,sCAAsC,4BAA4B,CAAC;AAChF,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AAEjD,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYtB,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiClC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/client/settings.js
CHANGED
|
@@ -1,23 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { array, boolean, number, object, string, z } from "zod";
|
|
2
2
|
import { CaptchaType } from "./captchaType/captchaType.js";
|
|
3
3
|
import { CaptchaTypeSpec } from "./captchaType/captchaTypeSpec.js";
|
|
4
|
-
const captchaTypeDefault = CaptchaType.frictionless;
|
|
5
|
-
const domainsDefault = [];
|
|
6
|
-
const frictionlessThresholdDefault = 0.5;
|
|
7
|
-
const powDifficultyDefault = 4;
|
|
8
|
-
const imageThresholdDefault = 0.8;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
export const captchaTypeDefault = CaptchaType.frictionless;
|
|
5
|
+
export const domainsDefault = [];
|
|
6
|
+
export const frictionlessThresholdDefault = 0.5;
|
|
7
|
+
export const powDifficultyDefault = 4;
|
|
8
|
+
export const imageThresholdDefault = 0.8;
|
|
9
|
+
export var IPValidationAction;
|
|
10
|
+
(function (IPValidationAction) {
|
|
11
|
+
IPValidationAction["Allow"] = "allow";
|
|
12
|
+
IPValidationAction["Reject"] = "reject";
|
|
13
|
+
IPValidationAction["Flag"] = "flag";
|
|
14
|
+
})(IPValidationAction || (IPValidationAction = {}));
|
|
15
|
+
export const IPValidationActionSchema = z.nativeEnum(IPValidationAction);
|
|
16
|
+
export const countryChangeActionDefault = IPValidationAction.Allow;
|
|
17
|
+
export const cityChangeActionDefault = IPValidationAction.Allow;
|
|
18
|
+
export const ispChangeActionDefault = IPValidationAction.Allow;
|
|
19
|
+
export const distanceThresholdKmDefault = 1000;
|
|
20
|
+
export const abuseScoreThresholdDefault = 0.005;
|
|
21
|
+
export const distanceExceedActionDefault = IPValidationAction.Reject;
|
|
22
|
+
export const abuseScoreThresholdExceedActionDefault = IPValidationAction.Reject;
|
|
23
|
+
export const requireAllConditionsDefault = false;
|
|
24
|
+
const IPValidationSchema = object({
|
|
25
|
+
actions: object({
|
|
26
|
+
countryChangeAction: IPValidationActionSchema.optional(),
|
|
27
|
+
cityChangeAction: IPValidationActionSchema.optional(),
|
|
28
|
+
ispChangeAction: IPValidationActionSchema.optional(),
|
|
29
|
+
distanceExceedAction: IPValidationActionSchema.optional(),
|
|
30
|
+
abuseScoreExceedAction: IPValidationActionSchema.optional(),
|
|
31
|
+
}).partial(),
|
|
32
|
+
distanceThresholdKm: number().positive().optional(),
|
|
33
|
+
abuseScoreThreshold: number().positive().optional(),
|
|
34
|
+
requireAllConditions: boolean().optional(),
|
|
15
35
|
});
|
|
16
|
-
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
36
|
+
export const IPValidationRulesSchema = object({
|
|
37
|
+
actions: object({
|
|
38
|
+
countryChangeAction: IPValidationActionSchema.optional().default(countryChangeActionDefault),
|
|
39
|
+
cityChangeAction: IPValidationActionSchema.optional().default(cityChangeActionDefault),
|
|
40
|
+
ispChangeAction: IPValidationActionSchema.optional().default(ispChangeActionDefault),
|
|
41
|
+
distanceExceedAction: IPValidationActionSchema.optional().default(distanceExceedActionDefault),
|
|
42
|
+
abuseScoreExceedAction: IPValidationActionSchema.optional().default(abuseScoreThresholdExceedActionDefault),
|
|
43
|
+
}),
|
|
44
|
+
distanceThresholdKm: number()
|
|
45
|
+
.positive()
|
|
46
|
+
.optional()
|
|
47
|
+
.default(distanceThresholdKmDefault),
|
|
48
|
+
abuseScoreThreshold: number()
|
|
49
|
+
.positive()
|
|
50
|
+
.optional()
|
|
51
|
+
.default(abuseScoreThresholdDefault),
|
|
52
|
+
requireAllConditions: z
|
|
53
|
+
.boolean()
|
|
54
|
+
.optional()
|
|
55
|
+
.default(requireAllConditionsDefault),
|
|
56
|
+
countryOverrides: z.record(string(), IPValidationSchema).optional(),
|
|
57
|
+
forceConsistentIp: boolean().optional().default(false),
|
|
58
|
+
});
|
|
59
|
+
export const ClientSettingsSchema = object({
|
|
60
|
+
captchaType: CaptchaTypeSpec.optional().default(captchaTypeDefault),
|
|
61
|
+
domains: array(string())
|
|
62
|
+
.optional()
|
|
63
|
+
.default([...domainsDefault]),
|
|
64
|
+
frictionlessThreshold: number()
|
|
65
|
+
.optional()
|
|
66
|
+
.default(frictionlessThresholdDefault),
|
|
67
|
+
powDifficulty: number().optional().default(powDifficultyDefault),
|
|
68
|
+
imageThreshold: number().optional().default(imageThresholdDefault),
|
|
69
|
+
ipValidationRules: IPValidationRulesSchema.optional(),
|
|
70
|
+
disallowWebView: boolean().optional().default(false),
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"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"}
|
package/dist/client/user.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { Timestamp } from "../datasets/index.js";
|
|
3
2
|
import type { IUserSettings } from "./settings.js";
|
|
4
3
|
export declare enum Tier {
|
|
5
4
|
Free = "free",
|
|
@@ -24,13 +23,13 @@ export interface IUserData {
|
|
|
24
23
|
account: string;
|
|
25
24
|
url: string;
|
|
26
25
|
mnemonic: string;
|
|
27
|
-
createdAt:
|
|
26
|
+
createdAt: Date;
|
|
28
27
|
activated: boolean;
|
|
29
28
|
tier: Tier;
|
|
30
29
|
tierRequestQuota: number;
|
|
31
30
|
marketingPreferences: boolean;
|
|
32
31
|
originUrl: string;
|
|
33
32
|
settings: IUserSettings;
|
|
34
|
-
updatedAtTimestamp?:
|
|
33
|
+
updatedAtTimestamp?: Date;
|
|
35
34
|
}
|
|
36
35
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/client/user.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/client/user.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,oBAAY,IAAI;IACf,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,UAAU,eAAe;CACzB;AAED,eAAO,MAAM,UAAU,8BAAqB,CAAC;AAE7C,eAAO,MAAM,iBAAiB;;;;;;;;;;CAU7B,CAAC;AAEF,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;IACxB,kBAAkB,CAAC,EAAE,IAAI,CAAC;CAC1B"}
|
package/dist/client/user.js
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
var Tier
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
})(Tier || {});
|
|
8
|
-
const TierSchema = z.nativeEnum(Tier);
|
|
9
|
-
const TierMonthlyLimits = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]: {
|
|
20
|
-
verificationRequests: 1e6
|
|
21
|
-
},
|
|
22
|
-
[
|
|
23
|
-
"enterprise"
|
|
24
|
-
/* Enterprise */
|
|
25
|
-
]: {
|
|
26
|
-
verificationRequests: "Unlimited"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
Tier,
|
|
31
|
-
TierMonthlyLimits,
|
|
32
|
-
TierSchema
|
|
2
|
+
export var Tier;
|
|
3
|
+
(function (Tier) {
|
|
4
|
+
Tier["Free"] = "free";
|
|
5
|
+
Tier["Professional"] = "professional";
|
|
6
|
+
Tier["Enterprise"] = "enterprise";
|
|
7
|
+
})(Tier || (Tier = {}));
|
|
8
|
+
export const TierSchema = z.nativeEnum(Tier);
|
|
9
|
+
export const TierMonthlyLimits = {
|
|
10
|
+
[Tier.Free]: {
|
|
11
|
+
verificationRequests: 100000,
|
|
12
|
+
},
|
|
13
|
+
[Tier.Professional]: {
|
|
14
|
+
verificationRequests: 1000000,
|
|
15
|
+
},
|
|
16
|
+
[Tier.Enterprise]: {
|
|
17
|
+
verificationRequests: "Unlimited",
|
|
18
|
+
},
|
|
33
19
|
};
|
|
20
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/client/user.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAN,IAAY,IAIX;AAJD,WAAY,IAAI;IACf,qBAAa,CAAA;IACb,qCAA6B,CAAA;IAC7B,iCAAyB,CAAA;AAC1B,CAAC,EAJW,IAAI,KAAJ,IAAI,QAIf;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACZ,oBAAoB,EAAE,MAAM;KAC5B;IACD,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;QACpB,oBAAoB,EAAE,OAAO;KAC7B;IACD,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;QAClB,oBAAoB,EAAE,WAAW;KACjC;CACD,CAAC"}
|