@openframe-org/criteria-set-protocol 1.4.9 → 1.5.1

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.
@@ -1,13 +1,11 @@
1
- import * as yup from 'yup';
1
+ import { z } from 'zod';
2
2
  /**
3
3
  * Validates the criteriaSetId parameter for endpoints which use it
4
4
  */
5
- export declare const criteriaSetIdParamSchema: yup.ObjectSchema<{
6
- params: {
7
- criteriaSetId: string;
8
- };
9
- }, yup.AnyObject, {
10
- params: {
11
- criteriaSetId: undefined;
12
- };
13
- }, "">;
5
+ export declare const criteriaSetIdParamSchema: z.ZodObject<{
6
+ criteriaSetId: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ criteriaSetId: string;
9
+ }, {
10
+ criteriaSetId: string;
11
+ }>;
@@ -1,37 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.criteriaSetIdParamSchema = void 0;
27
- const yup = __importStar(require("yup"));
4
+ const zod_1 = require("zod");
28
5
  /**
29
6
  * Validates the criteriaSetId parameter for endpoints which use it
30
7
  */
31
- exports.criteriaSetIdParamSchema = yup.object({
32
- params: yup.object({
33
- criteriaSetId: yup.string()
34
- .matches(/^[a-zA-Z0-9.\-_]+$/, 'Criteria set ID must contain only full stops, alphanumeric characters, dashes and underscores')
35
- .required()
36
- })
8
+ exports.criteriaSetIdParamSchema = zod_1.z.object({
9
+ criteriaSetId: zod_1.z.string()
10
+ .regex(/^[a-zA-Z0-9.\-_]+$/, 'Criteria set ID must contain only full stops, alphanumeric characters, dashes and underscores')
37
11
  });