@wavy/util 0.0.3 → 0.0.5
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 +17 -577
- package/dist/main.js +19 -19
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const authProviders: z.ZodEnum<{
|
|
4
4
|
Google: "Google";
|
|
5
5
|
}>;
|
|
6
|
-
type
|
|
6
|
+
type AuthProvider = z.infer<typeof authProviders>;
|
|
7
7
|
|
|
8
|
-
declare const
|
|
8
|
+
declare const fileAliases: z.ZodEnum<{
|
|
9
9
|
pdf: "pdf";
|
|
10
10
|
word: "word";
|
|
11
11
|
excel: "excel";
|
|
@@ -13,15 +13,15 @@ declare const FileAliases: z.ZodEnum<{
|
|
|
13
13
|
txt: "txt";
|
|
14
14
|
unknown: "unknown";
|
|
15
15
|
}>;
|
|
16
|
-
type FileAlias = z.infer<typeof
|
|
17
|
-
declare const
|
|
16
|
+
type FileAlias = z.infer<typeof fileAliases>;
|
|
17
|
+
declare const knownFileAliases: z.ZodEnum<{
|
|
18
18
|
pdf: "pdf";
|
|
19
19
|
word: "word";
|
|
20
20
|
excel: "excel";
|
|
21
21
|
img: "img";
|
|
22
22
|
txt: "txt";
|
|
23
23
|
}>;
|
|
24
|
-
type KnownFileAlias = z.infer<typeof
|
|
24
|
+
type KnownFileAlias = z.infer<typeof knownFileAliases>;
|
|
25
25
|
declare const FileDetails: z.ZodObject<{
|
|
26
26
|
lastModified: z.ZodNullable<z.ZodNumber>;
|
|
27
27
|
uid: z.ZodOptional<z.ZodString>;
|
|
@@ -41,7 +41,7 @@ declare const FileDetails: z.ZodObject<{
|
|
|
41
41
|
}>;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
43
|
type FileDetails = z.infer<typeof FileDetails>;
|
|
44
|
-
declare const FILE_MIME_TYPES:
|
|
44
|
+
declare const FILE_MIME_TYPES: Record<FileAlias, string[]>;
|
|
45
45
|
|
|
46
46
|
declare const PhoneNumber: z.ZodString;
|
|
47
47
|
declare const nameKeys: z.ZodEnum<{
|
|
@@ -73,7 +73,7 @@ declare const PersonIdentity: z.ZodObject<{
|
|
|
73
73
|
}>, z.ZodString>;
|
|
74
74
|
photoUrl: z.ZodOptional<z.ZodString>;
|
|
75
75
|
email: z.ZodEmail;
|
|
76
|
-
phoneNumber: z.ZodString
|
|
76
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
77
77
|
}, z.core.$strip>;
|
|
78
78
|
type PersonIdentity = z.infer<typeof PersonIdentity>;
|
|
79
79
|
declare const UserModel: z.ZodObject<{
|
|
@@ -83,568 +83,8 @@ declare const UserModel: z.ZodObject<{
|
|
|
83
83
|
}>, z.ZodString>;
|
|
84
84
|
photoUrl: z.ZodOptional<z.ZodString>;
|
|
85
85
|
email: z.ZodEmail;
|
|
86
|
-
phoneNumber: z.ZodString
|
|
87
|
-
|
|
88
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
89
|
-
first: "first";
|
|
90
|
-
last: "last";
|
|
91
|
-
}>, z.ZodString>;
|
|
92
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
93
|
-
email: z.ZodEmail;
|
|
94
|
-
phoneNumber: z.ZodString;
|
|
95
|
-
} & z.ZodObject<{
|
|
96
|
-
uid: z.ZodString;
|
|
97
|
-
}, z.core.$strip>>;
|
|
98
|
-
shape: {
|
|
99
|
-
uid: z.ZodString;
|
|
100
|
-
};
|
|
101
|
-
keyof: () => z.ZodEnum<{
|
|
102
|
-
uid: "uid";
|
|
103
|
-
}>;
|
|
104
|
-
catchall: <T extends z.core.SomeType>(schema: T) => z.ZodObject<{
|
|
105
|
-
uid: z.ZodString;
|
|
106
|
-
}, z.core.$catchall<T>>;
|
|
107
|
-
passthrough: () => z.ZodObject<{
|
|
108
|
-
uid: z.ZodString;
|
|
109
|
-
}, z.core.$loose>;
|
|
110
|
-
loose: () => z.ZodObject<{
|
|
111
|
-
uid: z.ZodString;
|
|
112
|
-
}, z.core.$loose>;
|
|
113
|
-
strict: () => z.ZodObject<{
|
|
114
|
-
uid: z.ZodString;
|
|
115
|
-
}, z.core.$strict>;
|
|
116
|
-
strip: () => z.ZodObject<{
|
|
117
|
-
uid: z.ZodString;
|
|
118
|
-
}, z.core.$strip>;
|
|
119
|
-
extend: <U extends z.core.$ZodLooseShape>(shape: U) => z.ZodObject<("uid" & keyof U extends never ? {
|
|
120
|
-
uid: z.ZodString;
|
|
121
|
-
} & U : ({
|
|
122
|
-
uid: z.ZodString;
|
|
123
|
-
} extends infer T_1 extends z.core.util.SomeObject ? { [K in keyof T_1 as K extends keyof U ? never : K]: T_1[K]; } : never) & { [K_1 in keyof U]: U[K_1]; }) extends infer T ? { [k in keyof T]: T[k]; } : never, z.core.$strip>;
|
|
124
|
-
safeExtend: <U extends z.core.$ZodLooseShape>(shape: z.SafeExtendShape<{
|
|
125
|
-
uid: z.ZodString;
|
|
126
|
-
}, U> & Partial<Record<"uid", z.core.SomeType>>) => z.ZodObject<("uid" & keyof U extends never ? {
|
|
127
|
-
uid: z.ZodString;
|
|
128
|
-
} & U : ({
|
|
129
|
-
uid: z.ZodString;
|
|
130
|
-
} extends infer T_1 extends z.core.util.SomeObject ? { [K in keyof T_1 as K extends keyof U ? never : K]: T_1[K]; } : never) & { [K_1 in keyof U]: U[K_1]; }) extends infer T ? { [k in keyof T]: T[k]; } : never, z.core.$strip>;
|
|
131
|
-
merge: <U extends z.ZodObject>(other: U) => z.ZodObject<("uid" & keyof U["shape"] extends never ? {
|
|
132
|
-
uid: z.ZodString;
|
|
133
|
-
} & U["shape"] : ({
|
|
134
|
-
uid: z.ZodString;
|
|
135
|
-
} extends infer T_1 extends z.core.util.SomeObject ? { [K in keyof T_1 as K extends keyof U["shape"] ? never : K]: T_1[K]; } : never) & (U["shape"] extends infer T_2 extends z.core.util.SomeObject ? { [K_1 in keyof T_2]: T_2[K_1]; } : never)) extends infer T ? { [k in keyof T]: T[k]; } : never, U["_zod"]["config"]>;
|
|
136
|
-
pick: <M extends z.core.util.Mask<"uid">>(mask: M) => z.ZodObject<Pick<{
|
|
137
|
-
uid: z.ZodString;
|
|
138
|
-
}, Extract<"uid", keyof M>> extends infer T ? { [k in keyof T]: T[k]; } : never, z.core.$strip>;
|
|
139
|
-
omit: <M extends z.core.util.Mask<"uid">>(mask: M) => z.ZodObject<Omit<{
|
|
140
|
-
uid: z.ZodString;
|
|
141
|
-
}, Extract<"uid", keyof M>> extends infer T ? { [k in keyof T]: T[k]; } : never, z.core.$strip>;
|
|
142
|
-
partial: {
|
|
143
|
-
(): z.ZodObject<{
|
|
144
|
-
uid: z.ZodOptional<z.ZodString>;
|
|
145
|
-
}, z.core.$strip>;
|
|
146
|
-
<M extends z.core.util.Mask<"uid">>(mask: M): z.ZodObject<{
|
|
147
|
-
uid: "uid" extends infer T ? T extends "uid" ? T extends keyof M ? z.ZodOptional<{
|
|
148
|
-
uid: z.ZodString;
|
|
149
|
-
}[T]> : {
|
|
150
|
-
uid: z.ZodString;
|
|
151
|
-
}[T] : never : never;
|
|
152
|
-
}, z.core.$strip>;
|
|
153
|
-
};
|
|
154
|
-
required: {
|
|
155
|
-
(): z.ZodObject<{
|
|
156
|
-
uid: z.ZodNonOptional<z.ZodString>;
|
|
157
|
-
}, z.core.$strip>;
|
|
158
|
-
<M extends z.core.util.Mask<"uid">>(mask: M): z.ZodObject<{
|
|
159
|
-
uid: "uid" extends infer T ? T extends "uid" ? T extends keyof M ? z.ZodNonOptional<{
|
|
160
|
-
uid: z.ZodString;
|
|
161
|
-
}[T]> : {
|
|
162
|
-
uid: z.ZodString;
|
|
163
|
-
}[T] : never : never;
|
|
164
|
-
}, z.core.$strip>;
|
|
165
|
-
};
|
|
166
|
-
def: z.core.$ZodObjectDef<{
|
|
167
|
-
uid: z.ZodString;
|
|
168
|
-
}>;
|
|
169
|
-
type: "object";
|
|
170
|
-
_def: z.core.$ZodObjectDef<{
|
|
171
|
-
uid: z.ZodString;
|
|
172
|
-
}>;
|
|
173
|
-
_output: {
|
|
174
|
-
uid: string;
|
|
175
|
-
};
|
|
176
|
-
_input: {
|
|
177
|
-
uid: string;
|
|
178
|
-
};
|
|
179
|
-
toJSONSchema: (params?: z.core.ToJSONSchemaParams) => z.core.ZodStandardJSONSchemaPayload<{
|
|
180
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
181
|
-
first: "first";
|
|
182
|
-
last: "last";
|
|
183
|
-
}>, z.ZodString>;
|
|
184
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
185
|
-
email: z.ZodEmail;
|
|
186
|
-
phoneNumber: z.ZodString;
|
|
187
|
-
} & z.ZodObject<{
|
|
188
|
-
uid: z.ZodString;
|
|
189
|
-
}, z.core.$strip>>;
|
|
190
|
-
check: (...checks: (z.core.CheckFn<{
|
|
191
|
-
uid: string;
|
|
192
|
-
}> | z.core.$ZodCheck<{
|
|
193
|
-
uid: string;
|
|
194
|
-
}>)[]) => {
|
|
195
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
196
|
-
first: "first";
|
|
197
|
-
last: "last";
|
|
198
|
-
}>, z.ZodString>;
|
|
199
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
200
|
-
email: z.ZodEmail;
|
|
201
|
-
phoneNumber: z.ZodString;
|
|
202
|
-
} & z.ZodObject<{
|
|
203
|
-
uid: z.ZodString;
|
|
204
|
-
}, z.core.$strip>;
|
|
205
|
-
clone: (def?: z.core.$ZodObjectDef<{
|
|
206
|
-
uid: z.ZodString;
|
|
207
|
-
}> | undefined, params?: {
|
|
208
|
-
parent: boolean;
|
|
209
|
-
} | undefined) => {
|
|
210
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
211
|
-
first: "first";
|
|
212
|
-
last: "last";
|
|
213
|
-
}>, z.ZodString>;
|
|
214
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
215
|
-
email: z.ZodEmail;
|
|
216
|
-
phoneNumber: z.ZodString;
|
|
217
|
-
} & z.ZodObject<{
|
|
218
|
-
uid: z.ZodString;
|
|
219
|
-
}, z.core.$strip>;
|
|
220
|
-
register: <R extends z.core.$ZodRegistry>(registry: R, ...meta: {
|
|
221
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
222
|
-
first: "first";
|
|
223
|
-
last: "last";
|
|
224
|
-
}>, z.ZodString>;
|
|
225
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
226
|
-
email: z.ZodEmail;
|
|
227
|
-
phoneNumber: z.ZodString;
|
|
228
|
-
} & z.ZodObject<{
|
|
229
|
-
uid: z.ZodString;
|
|
230
|
-
}, z.core.$strip> extends infer T ? T extends {
|
|
231
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
232
|
-
first: "first";
|
|
233
|
-
last: "last";
|
|
234
|
-
}>, z.ZodString>;
|
|
235
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
236
|
-
email: z.ZodEmail;
|
|
237
|
-
phoneNumber: z.ZodString;
|
|
238
|
-
} & z.ZodObject<{
|
|
239
|
-
uid: z.ZodString;
|
|
240
|
-
}, z.core.$strip> ? T extends R["_schema"] ? undefined extends R["_meta"] ? [(z.core.$replace<R["_meta"], R["_schema"] & {
|
|
241
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
242
|
-
first: "first";
|
|
243
|
-
last: "last";
|
|
244
|
-
}>, z.ZodString>;
|
|
245
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
246
|
-
email: z.ZodEmail;
|
|
247
|
-
phoneNumber: z.ZodString;
|
|
248
|
-
} & z.ZodObject<{
|
|
249
|
-
uid: z.ZodString;
|
|
250
|
-
}, z.core.$strip>> | undefined)?] : [z.core.$replace<R["_meta"], R["_schema"] & {
|
|
251
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
252
|
-
first: "first";
|
|
253
|
-
last: "last";
|
|
254
|
-
}>, z.ZodString>;
|
|
255
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
256
|
-
email: z.ZodEmail;
|
|
257
|
-
phoneNumber: z.ZodString;
|
|
258
|
-
} & z.ZodObject<{
|
|
259
|
-
uid: z.ZodString;
|
|
260
|
-
}, z.core.$strip>>] : ["Incompatible schema"] : never : never) => {
|
|
261
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
262
|
-
first: "first";
|
|
263
|
-
last: "last";
|
|
264
|
-
}>, z.ZodString>;
|
|
265
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
266
|
-
email: z.ZodEmail;
|
|
267
|
-
phoneNumber: z.ZodString;
|
|
268
|
-
} & z.ZodObject<{
|
|
269
|
-
uid: z.ZodString;
|
|
270
|
-
}, z.core.$strip>;
|
|
271
|
-
brand: <T extends PropertyKey = PropertyKey>(value?: T | undefined) => PropertyKey extends T ? {
|
|
272
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
273
|
-
first: "first";
|
|
274
|
-
last: "last";
|
|
275
|
-
}>, z.ZodString>;
|
|
276
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
277
|
-
email: z.ZodEmail;
|
|
278
|
-
phoneNumber: z.ZodString;
|
|
279
|
-
} & z.ZodObject<{
|
|
280
|
-
uid: z.ZodString;
|
|
281
|
-
}, z.core.$strip> : z.core.$ZodBranded<{
|
|
282
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
283
|
-
first: "first";
|
|
284
|
-
last: "last";
|
|
285
|
-
}>, z.ZodString>;
|
|
286
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
287
|
-
email: z.ZodEmail;
|
|
288
|
-
phoneNumber: z.ZodString;
|
|
289
|
-
} & z.ZodObject<{
|
|
290
|
-
uid: z.ZodString;
|
|
291
|
-
}, z.core.$strip>, T>;
|
|
292
|
-
parse: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => {
|
|
293
|
-
uid: string;
|
|
294
|
-
};
|
|
295
|
-
safeParse: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<{
|
|
296
|
-
uid: string;
|
|
297
|
-
}>;
|
|
298
|
-
parseAsync: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<{
|
|
299
|
-
uid: string;
|
|
300
|
-
}>;
|
|
301
|
-
safeParseAsync: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<{
|
|
302
|
-
uid: string;
|
|
303
|
-
}>>;
|
|
304
|
-
spa: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<{
|
|
305
|
-
uid: string;
|
|
306
|
-
}>>;
|
|
307
|
-
encode: (data: {
|
|
308
|
-
uid: string;
|
|
309
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => {
|
|
310
|
-
uid: string;
|
|
311
|
-
};
|
|
312
|
-
decode: (data: {
|
|
313
|
-
uid: string;
|
|
314
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => {
|
|
315
|
-
uid: string;
|
|
316
|
-
};
|
|
317
|
-
encodeAsync: (data: {
|
|
318
|
-
uid: string;
|
|
319
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<{
|
|
320
|
-
uid: string;
|
|
321
|
-
}>;
|
|
322
|
-
decodeAsync: (data: {
|
|
323
|
-
uid: string;
|
|
324
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<{
|
|
325
|
-
uid: string;
|
|
326
|
-
}>;
|
|
327
|
-
safeEncode: (data: {
|
|
328
|
-
uid: string;
|
|
329
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<{
|
|
330
|
-
uid: string;
|
|
331
|
-
}>;
|
|
332
|
-
safeDecode: (data: {
|
|
333
|
-
uid: string;
|
|
334
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<{
|
|
335
|
-
uid: string;
|
|
336
|
-
}>;
|
|
337
|
-
safeEncodeAsync: (data: {
|
|
338
|
-
uid: string;
|
|
339
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<{
|
|
340
|
-
uid: string;
|
|
341
|
-
}>>;
|
|
342
|
-
safeDecodeAsync: (data: {
|
|
343
|
-
uid: string;
|
|
344
|
-
}, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<{
|
|
345
|
-
uid: string;
|
|
346
|
-
}>>;
|
|
347
|
-
refine: (check: (arg: {
|
|
348
|
-
uid: string;
|
|
349
|
-
}) => unknown | Promise<unknown>, params?: string | {
|
|
350
|
-
path?: PropertyKey[] | undefined | undefined;
|
|
351
|
-
abort?: boolean | undefined | undefined;
|
|
352
|
-
when?: ((payload: z.core.ParsePayload) => boolean) | undefined | undefined;
|
|
353
|
-
params?: Record<string, any> | undefined;
|
|
354
|
-
error?: string | z.core.$ZodErrorMap<NonNullable<z.core.$ZodIssue>> | undefined;
|
|
355
|
-
message?: string | undefined | undefined;
|
|
356
|
-
} | undefined) => {
|
|
357
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
358
|
-
first: "first";
|
|
359
|
-
last: "last";
|
|
360
|
-
}>, z.ZodString>;
|
|
361
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
362
|
-
email: z.ZodEmail;
|
|
363
|
-
phoneNumber: z.ZodString;
|
|
364
|
-
} & z.ZodObject<{
|
|
365
|
-
uid: z.ZodString;
|
|
366
|
-
}, z.core.$strip>;
|
|
367
|
-
superRefine: (refinement: (arg: {
|
|
368
|
-
uid: string;
|
|
369
|
-
}, ctx: z.core.$RefinementCtx<{
|
|
370
|
-
uid: string;
|
|
371
|
-
}>) => void | Promise<void>) => {
|
|
372
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
373
|
-
first: "first";
|
|
374
|
-
last: "last";
|
|
375
|
-
}>, z.ZodString>;
|
|
376
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
377
|
-
email: z.ZodEmail;
|
|
378
|
-
phoneNumber: z.ZodString;
|
|
379
|
-
} & z.ZodObject<{
|
|
380
|
-
uid: z.ZodString;
|
|
381
|
-
}, z.core.$strip>;
|
|
382
|
-
overwrite: (fn: (x: {
|
|
383
|
-
uid: string;
|
|
384
|
-
}) => {
|
|
385
|
-
uid: string;
|
|
386
|
-
}) => {
|
|
387
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
388
|
-
first: "first";
|
|
389
|
-
last: "last";
|
|
390
|
-
}>, z.ZodString>;
|
|
391
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
392
|
-
email: z.ZodEmail;
|
|
393
|
-
phoneNumber: z.ZodString;
|
|
394
|
-
} & z.ZodObject<{
|
|
395
|
-
uid: z.ZodString;
|
|
396
|
-
}, z.core.$strip>;
|
|
397
|
-
optional: () => z.ZodOptional<{
|
|
398
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
399
|
-
first: "first";
|
|
400
|
-
last: "last";
|
|
401
|
-
}>, z.ZodString>;
|
|
402
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
403
|
-
email: z.ZodEmail;
|
|
404
|
-
phoneNumber: z.ZodString;
|
|
405
|
-
} & z.ZodObject<{
|
|
406
|
-
uid: z.ZodString;
|
|
407
|
-
}, z.core.$strip>>;
|
|
408
|
-
nonoptional: (params?: string | z.core.$ZodNonOptionalParams) => z.ZodNonOptional<{
|
|
409
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
410
|
-
first: "first";
|
|
411
|
-
last: "last";
|
|
412
|
-
}>, z.ZodString>;
|
|
413
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
414
|
-
email: z.ZodEmail;
|
|
415
|
-
phoneNumber: z.ZodString;
|
|
416
|
-
} & z.ZodObject<{
|
|
417
|
-
uid: z.ZodString;
|
|
418
|
-
}, z.core.$strip>>;
|
|
419
|
-
nullable: () => z.ZodNullable<{
|
|
420
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
421
|
-
first: "first";
|
|
422
|
-
last: "last";
|
|
423
|
-
}>, z.ZodString>;
|
|
424
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
425
|
-
email: z.ZodEmail;
|
|
426
|
-
phoneNumber: z.ZodString;
|
|
427
|
-
} & z.ZodObject<{
|
|
428
|
-
uid: z.ZodString;
|
|
429
|
-
}, z.core.$strip>>;
|
|
430
|
-
nullish: () => z.ZodOptional<z.ZodNullable<{
|
|
431
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
432
|
-
first: "first";
|
|
433
|
-
last: "last";
|
|
434
|
-
}>, z.ZodString>;
|
|
435
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
436
|
-
email: z.ZodEmail;
|
|
437
|
-
phoneNumber: z.ZodString;
|
|
438
|
-
} & z.ZodObject<{
|
|
439
|
-
uid: z.ZodString;
|
|
440
|
-
}, z.core.$strip>>>;
|
|
441
|
-
default: {
|
|
442
|
-
(def: {
|
|
443
|
-
uid: string;
|
|
444
|
-
}): z.ZodDefault<{
|
|
445
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
446
|
-
first: "first";
|
|
447
|
-
last: "last";
|
|
448
|
-
}>, z.ZodString>;
|
|
449
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
450
|
-
email: z.ZodEmail;
|
|
451
|
-
phoneNumber: z.ZodString;
|
|
452
|
-
} & z.ZodObject<{
|
|
453
|
-
uid: z.ZodString;
|
|
454
|
-
}, z.core.$strip>>;
|
|
455
|
-
(def: () => {
|
|
456
|
-
uid: string;
|
|
457
|
-
}): z.ZodDefault<{
|
|
458
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
459
|
-
first: "first";
|
|
460
|
-
last: "last";
|
|
461
|
-
}>, z.ZodString>;
|
|
462
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
463
|
-
email: z.ZodEmail;
|
|
464
|
-
phoneNumber: z.ZodString;
|
|
465
|
-
} & z.ZodObject<{
|
|
466
|
-
uid: z.ZodString;
|
|
467
|
-
}, z.core.$strip>>;
|
|
468
|
-
};
|
|
469
|
-
prefault: {
|
|
470
|
-
(def: () => {
|
|
471
|
-
uid: string;
|
|
472
|
-
}): z.ZodPrefault<{
|
|
473
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
474
|
-
first: "first";
|
|
475
|
-
last: "last";
|
|
476
|
-
}>, z.ZodString>;
|
|
477
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
478
|
-
email: z.ZodEmail;
|
|
479
|
-
phoneNumber: z.ZodString;
|
|
480
|
-
} & z.ZodObject<{
|
|
481
|
-
uid: z.ZodString;
|
|
482
|
-
}, z.core.$strip>>;
|
|
483
|
-
(def: {
|
|
484
|
-
uid: string;
|
|
485
|
-
}): z.ZodPrefault<{
|
|
486
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
487
|
-
first: "first";
|
|
488
|
-
last: "last";
|
|
489
|
-
}>, z.ZodString>;
|
|
490
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
491
|
-
email: z.ZodEmail;
|
|
492
|
-
phoneNumber: z.ZodString;
|
|
493
|
-
} & z.ZodObject<{
|
|
494
|
-
uid: z.ZodString;
|
|
495
|
-
}, z.core.$strip>>;
|
|
496
|
-
};
|
|
497
|
-
array: () => z.ZodArray<{
|
|
498
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
499
|
-
first: "first";
|
|
500
|
-
last: "last";
|
|
501
|
-
}>, z.ZodString>;
|
|
502
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
503
|
-
email: z.ZodEmail;
|
|
504
|
-
phoneNumber: z.ZodString;
|
|
505
|
-
} & z.ZodObject<{
|
|
506
|
-
uid: z.ZodString;
|
|
507
|
-
}, z.core.$strip>>;
|
|
508
|
-
or: <T extends z.core.SomeType>(option: T) => z.ZodUnion<[{
|
|
509
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
510
|
-
first: "first";
|
|
511
|
-
last: "last";
|
|
512
|
-
}>, z.ZodString>;
|
|
513
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
514
|
-
email: z.ZodEmail;
|
|
515
|
-
phoneNumber: z.ZodString;
|
|
516
|
-
} & z.ZodObject<{
|
|
517
|
-
uid: z.ZodString;
|
|
518
|
-
}, z.core.$strip>, T]>;
|
|
519
|
-
and: <T extends z.core.SomeType>(incoming: T) => z.ZodIntersection<{
|
|
520
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
521
|
-
first: "first";
|
|
522
|
-
last: "last";
|
|
523
|
-
}>, z.ZodString>;
|
|
524
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
525
|
-
email: z.ZodEmail;
|
|
526
|
-
phoneNumber: z.ZodString;
|
|
527
|
-
} & z.ZodObject<{
|
|
528
|
-
uid: z.ZodString;
|
|
529
|
-
}, z.core.$strip>, T>;
|
|
530
|
-
transform: <NewOut>(transform: (arg: {
|
|
531
|
-
uid: string;
|
|
532
|
-
}, ctx: z.core.$RefinementCtx<{
|
|
533
|
-
uid: string;
|
|
534
|
-
}>) => NewOut | Promise<NewOut>) => z.ZodPipe<{
|
|
535
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
536
|
-
first: "first";
|
|
537
|
-
last: "last";
|
|
538
|
-
}>, z.ZodString>;
|
|
539
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
540
|
-
email: z.ZodEmail;
|
|
541
|
-
phoneNumber: z.ZodString;
|
|
542
|
-
} & z.ZodObject<{
|
|
543
|
-
uid: z.ZodString;
|
|
544
|
-
}, z.core.$strip>, z.ZodTransform<Awaited<NewOut>, {
|
|
545
|
-
uid: string;
|
|
546
|
-
}>>;
|
|
547
|
-
catch: {
|
|
548
|
-
(def: {
|
|
549
|
-
uid: string;
|
|
550
|
-
}): z.ZodCatch<{
|
|
551
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
552
|
-
first: "first";
|
|
553
|
-
last: "last";
|
|
554
|
-
}>, z.ZodString>;
|
|
555
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
556
|
-
email: z.ZodEmail;
|
|
557
|
-
phoneNumber: z.ZodString;
|
|
558
|
-
} & z.ZodObject<{
|
|
559
|
-
uid: z.ZodString;
|
|
560
|
-
}, z.core.$strip>>;
|
|
561
|
-
(def: (ctx: z.core.$ZodCatchCtx) => {
|
|
562
|
-
uid: string;
|
|
563
|
-
}): z.ZodCatch<{
|
|
564
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
565
|
-
first: "first";
|
|
566
|
-
last: "last";
|
|
567
|
-
}>, z.ZodString>;
|
|
568
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
569
|
-
email: z.ZodEmail;
|
|
570
|
-
phoneNumber: z.ZodString;
|
|
571
|
-
} & z.ZodObject<{
|
|
572
|
-
uid: z.ZodString;
|
|
573
|
-
}, z.core.$strip>>;
|
|
574
|
-
};
|
|
575
|
-
pipe: <T extends z.core.$ZodType<any, {
|
|
576
|
-
uid: string;
|
|
577
|
-
}, z.core.$ZodTypeInternals<any, {
|
|
578
|
-
uid: string;
|
|
579
|
-
}>>>(target: T | z.core.$ZodType<any, {
|
|
580
|
-
uid: string;
|
|
581
|
-
}, z.core.$ZodTypeInternals<any, {
|
|
582
|
-
uid: string;
|
|
583
|
-
}>>) => z.ZodPipe<{
|
|
584
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
585
|
-
first: "first";
|
|
586
|
-
last: "last";
|
|
587
|
-
}>, z.ZodString>;
|
|
588
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
589
|
-
email: z.ZodEmail;
|
|
590
|
-
phoneNumber: z.ZodString;
|
|
591
|
-
} & z.ZodObject<{
|
|
592
|
-
uid: z.ZodString;
|
|
593
|
-
}, z.core.$strip>, T>;
|
|
594
|
-
readonly: () => z.ZodReadonly<{
|
|
595
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
596
|
-
first: "first";
|
|
597
|
-
last: "last";
|
|
598
|
-
}>, z.ZodString>;
|
|
599
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
600
|
-
email: z.ZodEmail;
|
|
601
|
-
phoneNumber: z.ZodString;
|
|
602
|
-
} & z.ZodObject<{
|
|
603
|
-
uid: z.ZodString;
|
|
604
|
-
}, z.core.$strip>>;
|
|
605
|
-
describe: (description: string) => {
|
|
606
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
607
|
-
first: "first";
|
|
608
|
-
last: "last";
|
|
609
|
-
}>, z.ZodString>;
|
|
610
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
611
|
-
email: z.ZodEmail;
|
|
612
|
-
phoneNumber: z.ZodString;
|
|
613
|
-
} & z.ZodObject<{
|
|
614
|
-
uid: z.ZodString;
|
|
615
|
-
}, z.core.$strip>;
|
|
616
|
-
description?: string | undefined;
|
|
617
|
-
meta: {
|
|
618
|
-
(): {
|
|
619
|
-
[x: string]: unknown;
|
|
620
|
-
id?: string | undefined | undefined;
|
|
621
|
-
title?: string | undefined | undefined;
|
|
622
|
-
description?: string | undefined | undefined;
|
|
623
|
-
deprecated?: boolean | undefined | undefined;
|
|
624
|
-
} | undefined;
|
|
625
|
-
(data: {
|
|
626
|
-
[x: string]: unknown;
|
|
627
|
-
id?: string | undefined | undefined;
|
|
628
|
-
title?: string | undefined | undefined;
|
|
629
|
-
description?: string | undefined | undefined;
|
|
630
|
-
deprecated?: boolean | undefined | undefined;
|
|
631
|
-
}): {
|
|
632
|
-
name: z.ZodRecord<z.ZodEnum<{
|
|
633
|
-
first: "first";
|
|
634
|
-
last: "last";
|
|
635
|
-
}>, z.ZodString>;
|
|
636
|
-
photoUrl: z.ZodOptional<z.ZodString>;
|
|
637
|
-
email: z.ZodEmail;
|
|
638
|
-
phoneNumber: z.ZodString;
|
|
639
|
-
} & z.ZodObject<{
|
|
640
|
-
uid: z.ZodString;
|
|
641
|
-
}, z.core.$strip>;
|
|
642
|
-
};
|
|
643
|
-
isOptional: () => boolean;
|
|
644
|
-
isNullable: () => boolean;
|
|
645
|
-
_zod: z.core.$ZodObjectInternals<{
|
|
646
|
-
uid: z.ZodString;
|
|
647
|
-
}, z.core.$strip>;
|
|
86
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
87
|
+
uid: z.ZodString;
|
|
648
88
|
}, z.core.$strip>;
|
|
649
89
|
type UserModel = z.infer<typeof UserModel>;
|
|
650
90
|
|
|
@@ -689,7 +129,7 @@ declare const TaskLog: z.ZodObject<{
|
|
|
689
129
|
}>, z.ZodString>]>;
|
|
690
130
|
}, z.core.$strip>;
|
|
691
131
|
type TaskLog = z.infer<typeof TaskLog>;
|
|
692
|
-
declare const
|
|
132
|
+
declare const errorCodes: z.ZodEnum<{
|
|
693
133
|
BAD_REQUEST: "BAD_REQUEST";
|
|
694
134
|
NOT_FOUND: "NOT_FOUND";
|
|
695
135
|
OUT_OF_BOUNDS: "OUT_OF_BOUNDS";
|
|
@@ -705,7 +145,7 @@ declare const ErrorCode: z.ZodEnum<{
|
|
|
705
145
|
INVALID_TOKEN: "INVALID_TOKEN";
|
|
706
146
|
CANCELLED: "CANCELLED";
|
|
707
147
|
}>;
|
|
708
|
-
type ErrorCode = z.infer<typeof
|
|
148
|
+
type ErrorCode = z.infer<typeof errorCodes>;
|
|
709
149
|
declare const ErrorMessage: z.ZodObject<{
|
|
710
150
|
code: z.ZodEnum<{
|
|
711
151
|
BAD_REQUEST: "BAD_REQUEST";
|
|
@@ -740,17 +180,17 @@ type TaskResult<ResponseType extends object | "success" = "success"> = {
|
|
|
740
180
|
error?: never | undefined | null;
|
|
741
181
|
response: ResponseType;
|
|
742
182
|
};
|
|
743
|
-
declare const
|
|
183
|
+
declare const taskStatuses: z.ZodEnum<{
|
|
744
184
|
error: "error";
|
|
745
185
|
success: "success";
|
|
746
186
|
pending: "pending";
|
|
747
187
|
}>;
|
|
748
|
-
type TaskStatus = z.infer<typeof
|
|
188
|
+
type TaskStatus = z.infer<typeof taskStatuses>;
|
|
749
189
|
|
|
750
|
-
declare const
|
|
190
|
+
declare const currencies: z.ZodEnum<{
|
|
751
191
|
JMD: "JMD";
|
|
752
192
|
}>;
|
|
753
|
-
type Currency = z.infer<typeof
|
|
193
|
+
type Currency = z.infer<typeof currencies>;
|
|
754
194
|
|
|
755
195
|
type UnsubscribeFunction = () => void;
|
|
756
196
|
type KeysWithType<O extends object, T> = {
|
|
@@ -821,4 +261,4 @@ type AddPrefix<T, P extends string> = {
|
|
|
821
261
|
[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;
|
|
822
262
|
};
|
|
823
263
|
|
|
824
|
-
export { type AddPrefix, Address, type
|
|
264
|
+
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 };
|
package/dist/main.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/schemas/Auth.ts
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
var
|
|
3
|
+
var authProviders = z.enum(["Google"]);
|
|
4
4
|
|
|
5
5
|
// src/schemas/File.ts
|
|
6
6
|
import * as z2 from "zod";
|
|
7
|
-
var
|
|
7
|
+
var fileAliases = z2.enum([
|
|
8
8
|
"pdf",
|
|
9
9
|
"word",
|
|
10
10
|
"excel",
|
|
@@ -12,7 +12,7 @@ var FileAliases = z2.enum([
|
|
|
12
12
|
"txt",
|
|
13
13
|
"unknown"
|
|
14
14
|
]);
|
|
15
|
-
var
|
|
15
|
+
var knownFileAliases = fileAliases.exclude(["unknown"]);
|
|
16
16
|
var FileDetails = z2.object({
|
|
17
17
|
lastModified: z2.number().nullable(),
|
|
18
18
|
uid: z2.string().trim().optional(),
|
|
@@ -22,9 +22,9 @@ var FileDetails = z2.object({
|
|
|
22
22
|
path: z2.string().trim(),
|
|
23
23
|
extension: z2.string().trim().startsWith(".").lowercase(),
|
|
24
24
|
description: z2.string().trim().optional(),
|
|
25
|
-
alias:
|
|
25
|
+
alias: fileAliases
|
|
26
26
|
});
|
|
27
|
-
var FILE_MIME_TYPES =
|
|
27
|
+
var FILE_MIME_TYPES = {
|
|
28
28
|
txt: ["text/plain"],
|
|
29
29
|
img: ["image/jpeg", "image/png", "image/jpg"],
|
|
30
30
|
excel: [
|
|
@@ -39,7 +39,7 @@ var FILE_MIME_TYPES = Object.freeze({
|
|
|
39
39
|
],
|
|
40
40
|
pdf: ["application/pdf"],
|
|
41
41
|
unknown: []
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
|
|
44
44
|
// src/schemas/Identity.ts
|
|
45
45
|
import * as z3 from "zod";
|
|
@@ -57,9 +57,9 @@ var PersonIdentity = z3.object({
|
|
|
57
57
|
name: Name,
|
|
58
58
|
photoUrl: z3.string().optional(),
|
|
59
59
|
email: z3.email(),
|
|
60
|
-
phoneNumber: PhoneNumber
|
|
60
|
+
phoneNumber: PhoneNumber.optional()
|
|
61
61
|
});
|
|
62
|
-
var UserModel =
|
|
62
|
+
var UserModel = z3.object({ uid: z3.string(), ...PersonIdentity.shape });
|
|
63
63
|
|
|
64
64
|
// src/schemas/Payload.ts
|
|
65
65
|
import * as z4 from "zod";
|
|
@@ -80,7 +80,7 @@ var TaskLog = z5.object({
|
|
|
80
80
|
status: z5.enum(["success", "error", "info"]),
|
|
81
81
|
response: z5.string().trim().or(z5.record(z5.enum(["tag", "message"]), z5.string().trim()))
|
|
82
82
|
});
|
|
83
|
-
var
|
|
83
|
+
var errorCodes = z5.enum([
|
|
84
84
|
"BAD_REQUEST",
|
|
85
85
|
"NOT_FOUND",
|
|
86
86
|
"OUT_OF_BOUNDS",
|
|
@@ -97,7 +97,7 @@ var ErrorCode = z5.enum([
|
|
|
97
97
|
"CANCELLED"
|
|
98
98
|
]);
|
|
99
99
|
var ErrorMessage = z5.object({
|
|
100
|
-
code:
|
|
100
|
+
code: errorCodes,
|
|
101
101
|
title: z5.string().optional(),
|
|
102
102
|
message: z5.string().trim(),
|
|
103
103
|
cause: z5.string().optional()
|
|
@@ -106,29 +106,29 @@ var SuccessMessage = z5.object({
|
|
|
106
106
|
title: z5.string().trim(),
|
|
107
107
|
message: z5.string().trim()
|
|
108
108
|
});
|
|
109
|
-
var
|
|
109
|
+
var taskStatuses = z5.enum(["success", "pending", "error"]);
|
|
110
110
|
|
|
111
111
|
// src/schemas/Billing.ts
|
|
112
112
|
import * as z6 from "zod";
|
|
113
|
-
var
|
|
113
|
+
var currencies = z6.enum(["JMD"]);
|
|
114
114
|
export {
|
|
115
115
|
Address,
|
|
116
|
-
AuthProviders,
|
|
117
|
-
Currencies,
|
|
118
116
|
Email,
|
|
119
|
-
ErrorCode,
|
|
120
117
|
ErrorMessage,
|
|
121
118
|
FILE_MIME_TYPES,
|
|
122
|
-
FileAliases,
|
|
123
119
|
FileDetails,
|
|
124
|
-
KnownFileAliases,
|
|
125
120
|
Name,
|
|
126
121
|
PersonIdentity,
|
|
127
122
|
PhoneNumber,
|
|
128
123
|
SuccessMessage,
|
|
129
124
|
TaskLog,
|
|
130
|
-
TaskStatus,
|
|
131
125
|
UserModel,
|
|
132
126
|
addressKeys,
|
|
133
|
-
|
|
127
|
+
authProviders,
|
|
128
|
+
currencies,
|
|
129
|
+
errorCodes,
|
|
130
|
+
fileAliases,
|
|
131
|
+
knownFileAliases,
|
|
132
|
+
nameKeys,
|
|
133
|
+
taskStatuses
|
|
134
134
|
};
|