@prismicio/types-internal 3.17.0-alpha.2 → 3.17.0-alpha.3

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.
@@ -25,7 +25,7 @@ const uuidWithFallback = new t.Type("UUID", isUuid, (u, c) => {
25
25
  return t.success((0, uuid_1.v4)());
26
26
  if (isUuid(u))
27
27
  return t.success(u);
28
- return t.failure(u, c);
28
+ return t.failure(u, c, "Expected a valid UUID v4 string");
29
29
  }, t.identity);
30
30
  function withKey(codec) {
31
31
  return t.intersection([t.strict({ key: uuidWithFallback }), codec]);
@@ -2239,7 +2239,6 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2239
2239
  page: string;
2240
2240
  custom: string;
2241
2241
  }>;
2242
- route: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
2243
2242
  }>]>>;
2244
2243
  export declare type StaticCustomType = t.TypeOf<typeof StaticCustomType>;
2245
2244
  export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -3661,7 +3660,6 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
3661
3660
  page: string;
3662
3661
  custom: string;
3663
3662
  }>;
3664
- route: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
3665
3663
  }>]>>;
3666
3664
  export declare type CustomType = t.TypeOf<typeof CustomType>;
3667
3665
  export declare function flattenWidgets(customType: CustomType): Array<[string, DynamicWidget]>;
@@ -47,7 +47,6 @@ function customTypeReader(codec) {
47
47
  }),
48
48
  t.partial({
49
49
  format: (0, withFallback_1.withFallback)(t.keyof(exports.CustomTypeFormat), "custom"),
50
- route: validators_1.StringOrNull,
51
50
  }),
52
51
  ]));
53
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "3.17.0-alpha.2",
3
+ "version": "3.17.0-alpha.3",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",
@@ -43,7 +43,7 @@ const uuidWithFallback = new t.Type<string, string, unknown>(
43
43
  (u, c) => {
44
44
  if (typeof u === "undefined") return t.success(uuid())
45
45
  if (isUuid(u)) return t.success(u)
46
- return t.failure(u, c)
46
+ return t.failure(u, c, "Expected a valid UUID v4 string")
47
47
  },
48
48
  t.identity,
49
49
  )
@@ -54,7 +54,6 @@ function customTypeReader<T extends StaticSection | DynamicSection>(
54
54
  }),
55
55
  t.partial({
56
56
  format: withFallback(t.keyof(CustomTypeFormat), "custom"),
57
- route: StringOrNull,
58
57
  }),
59
58
  ]),
60
59
  )