@prosopo/types 2.6.1 → 2.6.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @prosopo/types
2
2
 
3
+ ## 2.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 6ff193a: Change settings type
8
+
3
9
  ## 2.6.1
4
10
 
5
11
  ### Patch Changes
@@ -9,10 +9,10 @@ const frictionlessThresholdDefault = 0.5;
9
9
  const powDifficultyDefault = 4;
10
10
  const imageThresholdDefault = 0.8;
11
11
  const ClientSettingsSchema = z.object({
12
- captchaType: captchaTypeSpec.CaptchaTypeSpec.default(captchaTypeDefault),
13
- domains: z.array(z.string()).default([...domainsDefault]),
14
- frictionlessThreshold: z.number().default(frictionlessThresholdDefault),
15
- powDifficulty: z.number().default(powDifficultyDefault),
12
+ captchaType: captchaTypeSpec.CaptchaTypeSpec.optional().default(captchaTypeDefault),
13
+ domains: z.array(z.string()).optional().default([...domainsDefault]),
14
+ frictionlessThreshold: z.number().optional().default(frictionlessThresholdDefault),
15
+ powDifficulty: z.number().optional().default(powDifficultyDefault),
16
16
  imageThreshold: z.number().default(imageThresholdDefault)
17
17
  });
18
18
  exports.ClientSettingsSchema = ClientSettingsSchema;
@@ -6,10 +6,10 @@ export declare const frictionlessThresholdDefault = 0.5;
6
6
  export declare const powDifficultyDefault = 4;
7
7
  export declare const imageThresholdDefault = 0.8;
8
8
  export declare const ClientSettingsSchema: import("zod").ZodObject<{
9
- captchaType: import("zod").ZodDefault<import("zod").ZodNativeEnum<typeof CaptchaType>>;
10
- domains: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString, "many">>;
11
- frictionlessThreshold: import("zod").ZodDefault<import("zod").ZodNumber>;
12
- powDifficulty: import("zod").ZodDefault<import("zod").ZodNumber>;
9
+ captchaType: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaType>>>;
10
+ domains: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>>;
11
+ frictionlessThreshold: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
12
+ powDifficulty: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
13
13
  imageThreshold: import("zod").ZodDefault<import("zod").ZodNumber>;
14
14
  }, "strip", import("zod").ZodTypeAny, {
15
15
  captchaType: CaptchaType;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAyB,KAAK,MAAM,EAAU,MAAM,KAAK,CAAC;AACjE,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;AAEzC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAyB,KAAK,MAAM,EAAU,MAAM,KAAK,CAAC;AACjE,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;AAEzC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAU/B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -7,10 +7,14 @@ export const frictionlessThresholdDefault = 0.5;
7
7
  export const powDifficultyDefault = 4;
8
8
  export const imageThresholdDefault = 0.8;
9
9
  export const ClientSettingsSchema = object({
10
- captchaType: CaptchaTypeSpec.default(captchaTypeDefault),
11
- domains: array(string()).default([...domainsDefault]),
12
- frictionlessThreshold: number().default(frictionlessThresholdDefault),
13
- powDifficulty: number().default(powDifficultyDefault),
10
+ captchaType: CaptchaTypeSpec.optional().default(captchaTypeDefault),
11
+ domains: array(string())
12
+ .optional()
13
+ .default([...domainsDefault]),
14
+ frictionlessThreshold: number()
15
+ .optional()
16
+ .default(frictionlessThresholdDefault),
17
+ powDifficulty: number().optional().default(powDifficultyDefault),
14
18
  imageThreshold: number().default(imageThresholdDefault),
15
19
  });
16
20
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC,YAAY,CAAC;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAa,EAAE,CAAC;AAC3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IAC1C,WAAW,EAAE,eAAe,CA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E,CAAC,OAAO,CAAC,oBAAoB,CAAC;IAChE,cAAc,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC;CACvD,CAAC,CAAC"}
@@ -505,10 +505,10 @@ export declare const RegisterSitekeyBody: ZodObject<{
505
505
  siteKey: import("zod").ZodString;
506
506
  tier: import("zod").ZodNativeEnum<typeof Tier>;
507
507
  settings: ZodOptional<ZodObject<{
508
- captchaType: ZodDefault<import("zod").ZodNativeEnum<typeof CaptchaType>>;
509
- domains: ZodDefault<import("zod").ZodArray<import("zod").ZodString, "many">>;
510
- frictionlessThreshold: ZodDefault<ZodNumber>;
511
- powDifficulty: ZodDefault<ZodNumber>;
508
+ captchaType: ZodDefault<ZodOptional<import("zod").ZodNativeEnum<typeof CaptchaType>>>;
509
+ domains: ZodDefault<ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>>;
510
+ frictionlessThreshold: ZodDefault<ZodOptional<ZodNumber>>;
511
+ powDifficulty: ZodDefault<ZodOptional<ZodNumber>>;
512
512
  imageThreshold: ZodDefault<ZodNumber>;
513
513
  }, "strip", import("zod").ZodTypeAny, {
514
514
  captchaType: CaptchaType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/types",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Types for prosopo TypeScript packages",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",