@wavy/util 0.0.7 → 0.0.8

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/dist/main.d.ts CHANGED
@@ -54,18 +54,12 @@ declare const Name: z.ZodRecord<z.ZodEnum<{
54
54
  last: "last";
55
55
  }>, z.ZodString>;
56
56
  type Name = z.infer<typeof Name>;
57
- declare const addressKeys: z.ZodEnum<{
58
- streetAddress: "streetAddress";
59
- city: "city";
60
- parish: "parish";
61
- country: "country";
62
- }>;
63
- declare const Address: z.ZodRecord<z.ZodEnum<{
64
- streetAddress: "streetAddress";
65
- city: "city";
66
- parish: "parish";
67
- country: "country";
68
- }>, z.ZodString>;
57
+ declare const Address: z.ZodObject<{
58
+ streetAddress: z.ZodString;
59
+ city: z.ZodOptional<z.ZodString>;
60
+ parish: z.ZodString;
61
+ country: z.ZodString;
62
+ }, z.core.$strip>;
69
63
  type Address = z.infer<typeof Address>;
70
64
  declare const PersonIdentity: z.ZodObject<{
71
65
  name: z.ZodRecord<z.ZodEnum<{
@@ -263,4 +257,4 @@ type AddPrefix<T, P extends string> = {
263
257
  [Key in keyof T extends string ? `${P}${Capitalize<keyof T>}` : keyof T]: Key extends keyof T ? T[Key] : Key extends `${P}${infer Prop}` ? Uncapitalize<Prop> extends keyof T ? T[Uncapitalize<Prop>] : never : never;
264
258
  };
265
259
 
266
- export { type AddPrefix, Address, type AuthProvider, type CastArray, type CastFn, type Currency, Email, type ErrorCode, ErrorMessage, FILE_MIME_TYPES, type FileAlias, FileDetails, type FlatDictionary, type FlattenDictionary, type KeysWithType, type KeysWithoutType, type KnownFileAlias, type MDSADelim, type MultiDimStringArrayId, Name, type NoUndefinedField, type NonFunction, type OmitType, type Partialize, PersonIdentity, PhoneNumber, type Prettify, type PropertyToString, type RemovePrefix, type RemoveSuffix, type ReplaceProperty, type ReplaceReturnType, type RevertMultiDimStringArrayId, type RevertStringArrayId, type SafeExclude, type SafeExtract, type SafeOmit, type SmartFn, type Split, type SplitMDSA, type StringArrayId, SuccessMessage, TaskLog, type TaskResult, type TaskStatus, type TypeOrGetType, type UnionToIntersection, type UnsubscribeFunction, UserModel, type WithExpiryDate, type WithMultiDimArray, type WithStringArray, addressKeys, authProviders, currencies, errorCodes, fileAliases, knownFileAliases, nameKeys, taskStatuses };
260
+ export { type AddPrefix, Address, type AuthProvider, type CastArray, type CastFn, type Currency, Email, type ErrorCode, ErrorMessage, FILE_MIME_TYPES, type FileAlias, FileDetails, type FlatDictionary, type FlattenDictionary, type KeysWithType, type KeysWithoutType, type KnownFileAlias, type MDSADelim, type MultiDimStringArrayId, Name, type NoUndefinedField, type NonFunction, type OmitType, type Partialize, PersonIdentity, PhoneNumber, type Prettify, type PropertyToString, type RemovePrefix, type RemoveSuffix, type ReplaceProperty, type ReplaceReturnType, type RevertMultiDimStringArrayId, type RevertStringArrayId, type SafeExclude, type SafeExtract, type SafeOmit, type SmartFn, type Split, type SplitMDSA, type StringArrayId, SuccessMessage, TaskLog, type TaskResult, type TaskStatus, type TypeOrGetType, type UnionToIntersection, type UnsubscribeFunction, UserModel, type WithExpiryDate, type WithMultiDimArray, type WithStringArray, authProviders, currencies, errorCodes, fileAliases, knownFileAliases, nameKeys, taskStatuses };
package/dist/main.js CHANGED
@@ -47,13 +47,13 @@ import * as z3 from "zod";
47
47
  var PhoneNumber = z3.string().regex(/^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$/);
48
48
  var nameKeys = z3.enum(["first", "last"]);
49
49
  var Name = z3.record(nameKeys, z3.string().trim());
50
- var addressKeys = z3.enum([
51
- "streetAddress",
52
- "city",
53
- "parish",
54
- "country"
55
- ]);
56
- var Address = z3.record(addressKeys, z3.string().trim());
50
+ var addressValue = z3.string().trim();
51
+ var Address = z3.object({
52
+ streetAddress: addressValue,
53
+ city: addressValue.optional(),
54
+ parish: addressValue,
55
+ country: addressValue
56
+ });
57
57
  var PersonIdentity = z3.object({
58
58
  name: Name,
59
59
  photoUrl: z3.string().optional(),
@@ -124,7 +124,6 @@ export {
124
124
  SuccessMessage,
125
125
  TaskLog,
126
126
  UserModel,
127
- addressKeys,
128
127
  authProviders,
129
128
  currencies,
130
129
  errorCodes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavy/util",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Yay, utils!",
5
5
  "main": "./dist/main.js",
6
6
  "types": "./dist/main.d.ts",