@budgetbuddyde/types 1.0.12 → 1.0.14
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/lib/Base.type.d.ts +1 -0
- package/lib/Transaction.type.d.ts +10 -2
- package/lib/Transaction.type.js +3 -2
- package/package.json +1 -1
package/lib/Base.type.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare const ZDate: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, D
|
|
|
7
7
|
export type TDate = z.infer<typeof ZDate>;
|
|
8
8
|
export declare const ZEmail: z.ZodString;
|
|
9
9
|
export type TEmail = z.infer<typeof ZEmail>;
|
|
10
|
+
export type TServiceResponse<T> = [T, null] | [null, Error];
|
|
@@ -26,6 +26,7 @@ export declare const ZTransactionFile: z.ZodObject<{
|
|
|
26
26
|
}>;
|
|
27
27
|
export type TTransactionFile = z.infer<typeof ZTransactionFile>;
|
|
28
28
|
export declare const ZCreateTransactionFilePayload: z.ZodObject<{
|
|
29
|
+
transactionId: z.ZodNumber;
|
|
29
30
|
fileName: z.ZodString;
|
|
30
31
|
fileSize: z.ZodNumber;
|
|
31
32
|
mimeType: z.ZodString;
|
|
@@ -34,11 +35,13 @@ export declare const ZCreateTransactionFilePayload: z.ZodObject<{
|
|
|
34
35
|
fileName: string;
|
|
35
36
|
fileSize: number;
|
|
36
37
|
mimeType: string;
|
|
38
|
+
transactionId: number;
|
|
37
39
|
fileUrl: string;
|
|
38
40
|
}, {
|
|
39
41
|
fileName: string;
|
|
40
42
|
fileSize: number;
|
|
41
43
|
mimeType: string;
|
|
44
|
+
transactionId: number;
|
|
42
45
|
fileUrl: string;
|
|
43
46
|
}>;
|
|
44
47
|
export type TCreateTransactionFilePayload = z.infer<typeof ZCreateTransactionFilePayload>;
|
|
@@ -538,6 +541,7 @@ export declare const ZUpdateTransactionPayload: z.ZodObject<{
|
|
|
538
541
|
description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
|
|
539
542
|
transferAmount: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number, string | number>;
|
|
540
543
|
attachedFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
544
|
+
transactionId: z.ZodNumber;
|
|
541
545
|
fileName: z.ZodString;
|
|
542
546
|
fileSize: z.ZodNumber;
|
|
543
547
|
mimeType: z.ZodString;
|
|
@@ -546,11 +550,13 @@ export declare const ZUpdateTransactionPayload: z.ZodObject<{
|
|
|
546
550
|
fileName: string;
|
|
547
551
|
fileSize: number;
|
|
548
552
|
mimeType: string;
|
|
553
|
+
transactionId: number;
|
|
549
554
|
fileUrl: string;
|
|
550
555
|
}, {
|
|
551
556
|
fileName: string;
|
|
552
557
|
fileSize: number;
|
|
553
558
|
mimeType: string;
|
|
559
|
+
transactionId: number;
|
|
554
560
|
fileUrl: string;
|
|
555
561
|
}>, "many">>;
|
|
556
562
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -558,27 +564,29 @@ export declare const ZUpdateTransactionPayload: z.ZodObject<{
|
|
|
558
564
|
description: string | null;
|
|
559
565
|
categoryId: number;
|
|
560
566
|
paymentMethodId: number;
|
|
567
|
+
transactionId: number;
|
|
561
568
|
processedAt: Date;
|
|
562
569
|
transferAmount: number;
|
|
563
570
|
attachedFiles: {
|
|
564
571
|
fileName: string;
|
|
565
572
|
fileSize: number;
|
|
566
573
|
mimeType: string;
|
|
574
|
+
transactionId: number;
|
|
567
575
|
fileUrl: string;
|
|
568
576
|
}[];
|
|
569
|
-
transactionId: number;
|
|
570
577
|
}, {
|
|
571
578
|
receiver: string;
|
|
572
579
|
categoryId: number;
|
|
573
580
|
paymentMethodId: number;
|
|
581
|
+
transactionId: number;
|
|
574
582
|
processedAt: (number | Date) & (number | Date | undefined);
|
|
575
583
|
transferAmount: string | number;
|
|
576
|
-
transactionId: number;
|
|
577
584
|
description?: string | null | undefined;
|
|
578
585
|
attachedFiles?: {
|
|
579
586
|
fileName: string;
|
|
580
587
|
fileSize: number;
|
|
581
588
|
mimeType: string;
|
|
589
|
+
transactionId: number;
|
|
582
590
|
fileUrl: string;
|
|
583
591
|
}[] | undefined;
|
|
584
592
|
}>;
|
package/lib/Transaction.type.js
CHANGED
|
@@ -16,14 +16,15 @@ exports.ZTransactionFile = zod_1.z.object({
|
|
|
16
16
|
fileName: zod_1.z.string(),
|
|
17
17
|
fileSize: zod_1.z.number(),
|
|
18
18
|
mimeType: zod_1.z.string().max(20, { message: 'Mimetype is too long' }),
|
|
19
|
-
location: zod_1.z.string().max(
|
|
19
|
+
location: zod_1.z.string().max(255, { message: 'Location is too long' }),
|
|
20
20
|
createdAt: Base_type_1.ZCreatedAt,
|
|
21
21
|
});
|
|
22
22
|
exports.ZCreateTransactionFilePayload = zod_1.z.object({
|
|
23
|
+
transactionId: zod_1.z.number(),
|
|
23
24
|
fileName: zod_1.z.string(),
|
|
24
25
|
fileSize: zod_1.z.number(),
|
|
25
26
|
mimeType: zod_1.z.string().max(20, { message: 'Mimetype is too long' }),
|
|
26
|
-
fileUrl: zod_1.z.string().max(
|
|
27
|
+
fileUrl: zod_1.z.string().max(255, { message: 'FileURL is too long' }),
|
|
27
28
|
});
|
|
28
29
|
/**
|
|
29
30
|
* Transaction
|