@voiceflow/common 8.7.0 → 8.8.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.
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const zDateString: () => z.ZodEffects<z.ZodString, Date, string>;
3
+ //# sourceMappingURL=date.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/date.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW,+CAIkB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zDateString = void 0;
4
+ const zod_1 = require("zod");
5
+ const zDateString = () => zod_1.z
6
+ .string()
7
+ .datetime()
8
+ .transform((value) => new Date(value));
9
+ exports.zDateString = zDateString;
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const zOptionalBooleanString: (defaultValue?: boolean) => z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<string>, z.ZodLiteral<string>]>>>, boolean, string | undefined>;
3
+ //# sourceMappingURL=env.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/env.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB,8JAKc,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zOptionalBooleanString = void 0;
4
+ const zod_1 = require("zod");
5
+ const zOptionalBooleanString = (defaultValue = false) => zod_1.z
6
+ .union([zod_1.z.literal(String(true)), zod_1.z.literal(String(false))])
7
+ .optional()
8
+ .default(String(defaultValue))
9
+ .transform((value) => value === String(true));
10
+ exports.zOptionalBooleanString = zOptionalBooleanString;
@@ -1,2 +1,4 @@
1
+ export * from './date.dto';
2
+ export * from './env.dto';
1
3
  export * from './json.dto';
2
4
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/dtos/main.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/dtos/main.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./date.dto"), exports);
18
+ __exportStar(require("./env.dto"), exports);
17
19
  __exportStar(require("./json.dto"), exports);
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const zDateString: () => z.ZodEffects<z.ZodString, Date, string>;
3
+ //# sourceMappingURL=date.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/date.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW,+CAIkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export const zDateString = () => z
3
+ .string()
4
+ .datetime()
5
+ .transform((value) => new Date(value));
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const zOptionalBooleanString: (defaultValue?: boolean) => z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<string>, z.ZodLiteral<string>]>>>, boolean, string | undefined>;
3
+ //# sourceMappingURL=env.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/env.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB,8JAKc,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export const zOptionalBooleanString = (defaultValue = false) => z
3
+ .union([z.literal(String(true)), z.literal(String(false))])
4
+ .optional()
5
+ .default(String(defaultValue))
6
+ .transform((value) => value === String(true));
@@ -1,2 +1,4 @@
1
+ export * from './date.dto.js';
2
+ export * from './env.dto.js';
1
3
  export * from './json.dto.js';
2
4
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/dtos/main.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/dtos/main.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -1 +1,3 @@
1
+ export * from './date.dto.js';
2
+ export * from './env.dto.js';
1
3
  export * from './json.dto.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceflow/common",
3
- "version": "8.7.0",
3
+ "version": "8.8.0",
4
4
  "description": "Junk drawer of utility functions",
5
5
  "keywords": [
6
6
  "voiceflow"
@@ -18,12 +18,12 @@
18
18
  "exports": {
19
19
  ".": {
20
20
  "types": "./build/cjs/index.d.ts",
21
- "main": "./build/cjs/index.js",
21
+ "default": "./build/cjs/index.js",
22
22
  "module": "./build/esm/index.js"
23
23
  },
24
24
  "./dtos": {
25
25
  "types": "./build/cjs/dtos/main.d.ts",
26
- "main": "./build/cjs/dtos/main.js",
26
+ "default": "./build/cjs/dtos/main.js",
27
27
  "module": "./build/esm/dtos/main.js"
28
28
  }
29
29
  },
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "78aee0cb0651458fc243fcbade1bf6fce87a3c7d"
91
+ "gitHead": "b1c6b980e17ce9e720e0023b5b69e6da62ebcda2"
92
92
  }