@budgetbuddyde/types 1.0.15 → 1.0.16
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/File.type.d.ts +4 -4
- package/lib/File.type.js +3 -8
- package/lib/Transaction.type.d.ts +17 -0
- package/lib/Transaction.type.js +8 -4
- package/package.json +1 -1
package/lib/File.type.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export declare const ZFile: z.ZodObject<{
|
|
|
4
4
|
size: z.ZodNumber;
|
|
5
5
|
location: z.ZodString;
|
|
6
6
|
type: z.ZodString;
|
|
7
|
-
last_edited_at: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodString]>, Date, string | Date>;
|
|
8
|
-
created_at: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodString]>, Date, string | Date>;
|
|
7
|
+
last_edited_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
8
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
type: string;
|
|
11
11
|
location: string;
|
|
@@ -18,7 +18,7 @@ export declare const ZFile: z.ZodObject<{
|
|
|
18
18
|
location: string;
|
|
19
19
|
name: string;
|
|
20
20
|
size: number;
|
|
21
|
-
last_edited_at: (string | Date) & (string | Date | undefined);
|
|
22
|
-
created_at: (string | Date) & (string | Date | undefined);
|
|
21
|
+
last_edited_at: (string | number | Date) & (string | number | Date | undefined);
|
|
22
|
+
created_at: (string | number | Date) & (string | number | Date | undefined);
|
|
23
23
|
}>;
|
|
24
24
|
export type TFile = z.infer<typeof ZFile>;
|
package/lib/File.type.js
CHANGED
|
@@ -2,17 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZFile = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const Base_type_1 = require("./Base.type");
|
|
5
6
|
exports.ZFile = zod_1.z.object({
|
|
6
7
|
name: zod_1.z.string(),
|
|
7
8
|
size: zod_1.z.number(),
|
|
8
9
|
location: zod_1.z.string(),
|
|
9
10
|
type: zod_1.z.string(),
|
|
10
|
-
last_edited_at:
|
|
11
|
-
|
|
12
|
-
.or(zod_1.z.string())
|
|
13
|
-
.transform(val => new Date(val)),
|
|
14
|
-
created_at: zod_1.z
|
|
15
|
-
.date()
|
|
16
|
-
.or(zod_1.z.string())
|
|
17
|
-
.transform(val => new Date(val)),
|
|
11
|
+
last_edited_at: Base_type_1.ZDate,
|
|
12
|
+
created_at: Base_type_1.ZCreatedAt,
|
|
18
13
|
});
|
|
@@ -106,6 +106,9 @@ export declare const ZTransaction: z.ZodObject<{
|
|
|
106
106
|
isVerified?: boolean | undefined;
|
|
107
107
|
}>;
|
|
108
108
|
category: z.ZodObject<{
|
|
109
|
+
/**
|
|
110
|
+
* TransactionFile
|
|
111
|
+
*/
|
|
109
112
|
id: z.ZodNumber;
|
|
110
113
|
owner: z.ZodObject<{
|
|
111
114
|
uuid: z.ZodString;
|
|
@@ -628,6 +631,9 @@ export declare const ZDeleteTransactionResponsePayload: z.ZodObject<{
|
|
|
628
631
|
isVerified?: boolean | undefined;
|
|
629
632
|
}>;
|
|
630
633
|
category: z.ZodObject<{
|
|
634
|
+
/**
|
|
635
|
+
* TransactionFile
|
|
636
|
+
*/
|
|
631
637
|
id: z.ZodNumber;
|
|
632
638
|
owner: z.ZodObject<{
|
|
633
639
|
uuid: z.ZodString;
|
|
@@ -1200,3 +1206,14 @@ export declare const ZDeleteTransactionResponsePayload: z.ZodObject<{
|
|
|
1200
1206
|
}[];
|
|
1201
1207
|
}>;
|
|
1202
1208
|
export type TDeleteTransactionResponsePayload = z.infer<typeof ZDeleteTransactionResponsePayload>;
|
|
1209
|
+
export declare const ZMonthlyBalance: z.ZodObject<{
|
|
1210
|
+
month: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
1211
|
+
balance: z.ZodNumber;
|
|
1212
|
+
}, "strip", z.ZodTypeAny, {
|
|
1213
|
+
month: Date;
|
|
1214
|
+
balance: number;
|
|
1215
|
+
}, {
|
|
1216
|
+
month: (string | number | Date) & (string | number | Date | undefined);
|
|
1217
|
+
balance: number;
|
|
1218
|
+
}>;
|
|
1219
|
+
export type TMonthlyBalance = z.infer<typeof ZMonthlyBalance>;
|
package/lib/Transaction.type.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZDeleteTransactionResponsePayload = exports.ZDeleteTransactionPayload = exports.ZUpdateTransactionPayload = exports.ZCreateTransactionPayload = exports.ZTransaction = exports.ZCreateTransactionFilePayload = exports.ZTransactionFile = void 0;
|
|
3
|
+
exports.ZMonthlyBalance = exports.ZDeleteTransactionResponsePayload = exports.ZDeleteTransactionPayload = exports.ZUpdateTransactionPayload = exports.ZCreateTransactionPayload = exports.ZTransaction = exports.ZCreateTransactionFilePayload = exports.ZTransactionFile = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const User_type_1 = require("./User.type");
|
|
6
6
|
const Category_type_1 = require("./Category.type");
|
|
@@ -38,7 +38,7 @@ exports.ZTransaction = zod_1.z.object({
|
|
|
38
38
|
owner: User_type_1.ZUser,
|
|
39
39
|
category: Category_type_1.ZCategory,
|
|
40
40
|
paymentMethod: PaymentMethod_type_1.ZPaymentMethod,
|
|
41
|
-
processedAt: Base_type_1.
|
|
41
|
+
processedAt: Base_type_1.ZDate,
|
|
42
42
|
receiver: zod_1.z.string(),
|
|
43
43
|
description: Base_type_1.ZDescription,
|
|
44
44
|
transferAmount: ZTransferAmount,
|
|
@@ -49,7 +49,7 @@ exports.ZCreateTransactionPayload = zod_1.z.object({
|
|
|
49
49
|
owner: zod_1.z.string().uuid(),
|
|
50
50
|
categoryId: zod_1.z.number(),
|
|
51
51
|
paymentMethodId: zod_1.z.number(),
|
|
52
|
-
processedAt: Base_type_1.
|
|
52
|
+
processedAt: Base_type_1.ZDate,
|
|
53
53
|
receiver: zod_1.z.string(),
|
|
54
54
|
description: Base_type_1.ZDescription,
|
|
55
55
|
transferAmount: ZTransferAmount,
|
|
@@ -58,7 +58,7 @@ exports.ZUpdateTransactionPayload = zod_1.z.object({
|
|
|
58
58
|
transactionId: zod_1.z.number(),
|
|
59
59
|
categoryId: zod_1.z.number(),
|
|
60
60
|
paymentMethodId: zod_1.z.number(),
|
|
61
|
-
processedAt: Base_type_1.
|
|
61
|
+
processedAt: Base_type_1.ZDate,
|
|
62
62
|
receiver: zod_1.z.string(),
|
|
63
63
|
description: Base_type_1.ZDescription,
|
|
64
64
|
transferAmount: ZTransferAmount,
|
|
@@ -70,3 +70,7 @@ exports.ZDeleteTransactionResponsePayload = zod_1.z.object({
|
|
|
70
70
|
success: zod_1.z.array(exports.ZTransaction),
|
|
71
71
|
failed: exports.ZDeleteTransactionPayload,
|
|
72
72
|
});
|
|
73
|
+
exports.ZMonthlyBalance = zod_1.z.object({
|
|
74
|
+
month: Base_type_1.ZDate,
|
|
75
|
+
balance: zod_1.z.number(),
|
|
76
|
+
});
|