@budgetbuddyde/types 1.0.1

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,144 @@
1
+ import { z } from 'zod';
2
+ export declare const ZCategory: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ owner: z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ isVerified: z.ZodDefault<z.ZodBoolean>;
7
+ role: z.ZodObject<{
8
+ id: z.ZodNumber;
9
+ name: z.ZodString;
10
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
11
+ permissions: z.ZodNumber;
12
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ id: number;
15
+ name: string;
16
+ description: string | null;
17
+ permissions: number;
18
+ createdAt: Date;
19
+ }, {
20
+ id: number;
21
+ name: string;
22
+ permissions: number;
23
+ createdAt: (number | Date) & (number | Date | undefined);
24
+ description?: string | null | undefined;
25
+ }>;
26
+ email: z.ZodString;
27
+ name: z.ZodString;
28
+ surname: z.ZodString;
29
+ password: z.ZodString;
30
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ name: string;
33
+ role: {
34
+ id: number;
35
+ name: string;
36
+ description: string | null;
37
+ permissions: number;
38
+ createdAt: Date;
39
+ };
40
+ email: string;
41
+ uuid: string;
42
+ createdAt: Date;
43
+ isVerified: boolean;
44
+ surname: string;
45
+ password: string;
46
+ }, {
47
+ name: string;
48
+ role: {
49
+ id: number;
50
+ name: string;
51
+ permissions: number;
52
+ createdAt: (number | Date) & (number | Date | undefined);
53
+ description?: string | null | undefined;
54
+ };
55
+ email: string;
56
+ uuid: string;
57
+ createdAt: (number | Date) & (number | Date | undefined);
58
+ surname: string;
59
+ password: string;
60
+ isVerified?: boolean | undefined;
61
+ }>;
62
+ name: z.ZodString;
63
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
64
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ id: number;
67
+ name: string;
68
+ description: string | null;
69
+ createdAt: Date;
70
+ owner: {
71
+ name: string;
72
+ role: {
73
+ id: number;
74
+ name: string;
75
+ description: string | null;
76
+ permissions: number;
77
+ createdAt: Date;
78
+ };
79
+ email: string;
80
+ uuid: string;
81
+ createdAt: Date;
82
+ isVerified: boolean;
83
+ surname: string;
84
+ password: string;
85
+ };
86
+ }, {
87
+ id: number;
88
+ name: string;
89
+ createdAt: (number | Date) & (number | Date | undefined);
90
+ owner: {
91
+ name: string;
92
+ role: {
93
+ id: number;
94
+ name: string;
95
+ permissions: number;
96
+ createdAt: (number | Date) & (number | Date | undefined);
97
+ description?: string | null | undefined;
98
+ };
99
+ email: string;
100
+ uuid: string;
101
+ createdAt: (number | Date) & (number | Date | undefined);
102
+ surname: string;
103
+ password: string;
104
+ isVerified?: boolean | undefined;
105
+ };
106
+ description?: string | null | undefined;
107
+ }>;
108
+ export type TCategory = z.infer<typeof ZCategory>;
109
+ export declare const ZCreateCategoryPayload: z.ZodObject<{
110
+ owner: z.ZodString;
111
+ name: z.ZodString;
112
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ name: string;
115
+ description: string | null;
116
+ owner: string;
117
+ }, {
118
+ name: string;
119
+ owner: string;
120
+ description?: string | null | undefined;
121
+ }>;
122
+ export type TCreateCategoryPayload = z.infer<typeof ZCreateCategoryPayload>;
123
+ export declare const ZUpdateCategoryPayload: z.ZodObject<{
124
+ categoryId: z.ZodNumber;
125
+ name: z.ZodString;
126
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ name: string;
129
+ description: string | null;
130
+ categoryId: number;
131
+ }, {
132
+ name: string;
133
+ categoryId: number;
134
+ description?: string | null | undefined;
135
+ }>;
136
+ export type TUpdateCategoryPayload = z.infer<typeof ZUpdateCategoryPayload>;
137
+ export declare const ZDeleteCategoryPayload: z.ZodObject<{
138
+ categoryId: z.ZodNumber;
139
+ }, "strip", z.ZodTypeAny, {
140
+ categoryId: number;
141
+ }, {
142
+ categoryId: number;
143
+ }>;
144
+ export type TDeleteCategoryPayload = z.infer<typeof ZDeleteCategoryPayload>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZDeleteCategoryPayload = exports.ZUpdateCategoryPayload = exports.ZCreateCategoryPayload = exports.ZCategory = void 0;
4
+ const zod_1 = require("zod");
5
+ const User_type_1 = require("./User.type");
6
+ const Base_type_1 = require("./Base.type");
7
+ const ZName = zod_1.z.string().max(100, { message: 'Name is too long' });
8
+ exports.ZCategory = zod_1.z.object({
9
+ id: zod_1.z.number(),
10
+ owner: User_type_1.ZUser,
11
+ name: ZName,
12
+ description: Base_type_1.ZDescription,
13
+ createdAt: Base_type_1.ZCreatedAt,
14
+ });
15
+ exports.ZCreateCategoryPayload = zod_1.z.object({
16
+ owner: zod_1.z.string().uuid(),
17
+ name: ZName,
18
+ description: Base_type_1.ZDescription,
19
+ });
20
+ exports.ZUpdateCategoryPayload = zod_1.z.object({
21
+ categoryId: zod_1.z.number(),
22
+ name: ZName,
23
+ description: Base_type_1.ZDescription,
24
+ });
25
+ exports.ZDeleteCategoryPayload = zod_1.z.object({
26
+ categoryId: zod_1.z.number(),
27
+ });
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare enum EDailyTransactionType {
3
+ INCOME = "INCOME",
4
+ SPENDINGS = "SPENDINGS",
5
+ BALANCE = "BALANCE"
6
+ }
7
+ export declare const ZDailyTransaction: z.ZodObject<{
8
+ date: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
9
+ amount: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ date: Date;
12
+ amount: number;
13
+ }, {
14
+ date: (number | Date) & (number | Date | undefined);
15
+ amount: number;
16
+ }>;
17
+ export type TDailyTransaction = z.infer<typeof ZDailyTransaction>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZDailyTransaction = exports.EDailyTransactionType = void 0;
4
+ const zod_1 = require("zod");
5
+ const Base_type_1 = require("./Base.type");
6
+ var EDailyTransactionType;
7
+ (function (EDailyTransactionType) {
8
+ EDailyTransactionType["INCOME"] = "INCOME";
9
+ EDailyTransactionType["SPENDINGS"] = "SPENDINGS";
10
+ EDailyTransactionType["BALANCE"] = "BALANCE";
11
+ })(EDailyTransactionType = exports.EDailyTransactionType || (exports.EDailyTransactionType = {}));
12
+ exports.ZDailyTransaction = zod_1.z.object({
13
+ date: Base_type_1.ZDate,
14
+ amount: zod_1.z.number(),
15
+ });
@@ -0,0 +1,162 @@
1
+ import { z } from 'zod';
2
+ export declare const ZPaymentMethod: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ owner: z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ isVerified: z.ZodDefault<z.ZodBoolean>;
7
+ role: z.ZodObject<{
8
+ id: z.ZodNumber;
9
+ name: z.ZodString;
10
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
11
+ permissions: z.ZodNumber;
12
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ id: number;
15
+ name: string;
16
+ description: string | null;
17
+ permissions: number;
18
+ createdAt: Date;
19
+ }, {
20
+ id: number;
21
+ name: string;
22
+ permissions: number;
23
+ createdAt: (number | Date) & (number | Date | undefined);
24
+ description?: string | null | undefined;
25
+ }>;
26
+ email: z.ZodString;
27
+ name: z.ZodString;
28
+ surname: z.ZodString;
29
+ password: z.ZodString;
30
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ name: string;
33
+ role: {
34
+ id: number;
35
+ name: string;
36
+ description: string | null;
37
+ permissions: number;
38
+ createdAt: Date;
39
+ };
40
+ email: string;
41
+ uuid: string;
42
+ createdAt: Date;
43
+ isVerified: boolean;
44
+ surname: string;
45
+ password: string;
46
+ }, {
47
+ name: string;
48
+ role: {
49
+ id: number;
50
+ name: string;
51
+ permissions: number;
52
+ createdAt: (number | Date) & (number | Date | undefined);
53
+ description?: string | null | undefined;
54
+ };
55
+ email: string;
56
+ uuid: string;
57
+ createdAt: (number | Date) & (number | Date | undefined);
58
+ surname: string;
59
+ password: string;
60
+ isVerified?: boolean | undefined;
61
+ }>;
62
+ name: z.ZodString;
63
+ address: z.ZodString;
64
+ provider: z.ZodString;
65
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
66
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ id: number;
69
+ address: string;
70
+ name: string;
71
+ description: string | null;
72
+ createdAt: Date;
73
+ owner: {
74
+ name: string;
75
+ role: {
76
+ id: number;
77
+ name: string;
78
+ description: string | null;
79
+ permissions: number;
80
+ createdAt: Date;
81
+ };
82
+ email: string;
83
+ uuid: string;
84
+ createdAt: Date;
85
+ isVerified: boolean;
86
+ surname: string;
87
+ password: string;
88
+ };
89
+ provider: string;
90
+ }, {
91
+ id: number;
92
+ address: string;
93
+ name: string;
94
+ createdAt: (number | Date) & (number | Date | undefined);
95
+ owner: {
96
+ name: string;
97
+ role: {
98
+ id: number;
99
+ name: string;
100
+ permissions: number;
101
+ createdAt: (number | Date) & (number | Date | undefined);
102
+ description?: string | null | undefined;
103
+ };
104
+ email: string;
105
+ uuid: string;
106
+ createdAt: (number | Date) & (number | Date | undefined);
107
+ surname: string;
108
+ password: string;
109
+ isVerified?: boolean | undefined;
110
+ };
111
+ provider: string;
112
+ description?: string | null | undefined;
113
+ }>;
114
+ export type TPaymentMethod = z.infer<typeof ZPaymentMethod>;
115
+ export declare const ZCreatePaymentMethodPayload: z.ZodObject<{
116
+ owner: z.ZodString;
117
+ name: z.ZodString;
118
+ address: z.ZodString;
119
+ provider: z.ZodString;
120
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ address: string;
123
+ name: string;
124
+ description: string | null;
125
+ owner: string;
126
+ provider: string;
127
+ }, {
128
+ address: string;
129
+ name: string;
130
+ owner: string;
131
+ provider: string;
132
+ description?: string | null | undefined;
133
+ }>;
134
+ export type TCreatePaymentMethodPayload = z.infer<typeof ZCreatePaymentMethodPayload>;
135
+ export declare const ZUpdatePaymentMethodPayload: z.ZodObject<{
136
+ id: z.ZodNumber;
137
+ name: z.ZodString;
138
+ address: z.ZodString;
139
+ provider: z.ZodString;
140
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ id: number;
143
+ address: string;
144
+ name: string;
145
+ description: string | null;
146
+ provider: string;
147
+ }, {
148
+ id: number;
149
+ address: string;
150
+ name: string;
151
+ provider: string;
152
+ description?: string | null | undefined;
153
+ }>;
154
+ export type TUpdatePaymentMethodPayload = z.infer<typeof ZUpdatePaymentMethodPayload>;
155
+ export declare const ZDeletePaymentMethodPayload: z.ZodObject<{
156
+ paymentMethodId: z.ZodNumber;
157
+ }, "strip", z.ZodTypeAny, {
158
+ paymentMethodId: number;
159
+ }, {
160
+ paymentMethodId: number;
161
+ }>;
162
+ export type TDeletePaymentMethodPayload = z.infer<typeof ZDeletePaymentMethodPayload>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZDeletePaymentMethodPayload = exports.ZUpdatePaymentMethodPayload = exports.ZCreatePaymentMethodPayload = exports.ZPaymentMethod = void 0;
4
+ const zod_1 = require("zod");
5
+ const User_type_1 = require("./User.type");
6
+ const Base_type_1 = require("./Base.type");
7
+ const ZName = zod_1.z.string().max(100, { message: 'Name is too long' });
8
+ const ZAddress = zod_1.z.string().max(100, { message: 'Address is too long' });
9
+ const ZProvider = zod_1.z.string().max(100, { message: 'Provider is too long' });
10
+ exports.ZPaymentMethod = zod_1.z.object({
11
+ id: zod_1.z.number(),
12
+ owner: User_type_1.ZUser,
13
+ name: ZName,
14
+ address: ZAddress,
15
+ provider: ZProvider,
16
+ description: Base_type_1.ZDescription,
17
+ createdAt: Base_type_1.ZCreatedAt,
18
+ });
19
+ exports.ZCreatePaymentMethodPayload = zod_1.z.object({
20
+ owner: zod_1.z.string().uuid(),
21
+ name: ZName,
22
+ address: ZAddress,
23
+ provider: ZProvider,
24
+ description: Base_type_1.ZDescription,
25
+ });
26
+ exports.ZUpdatePaymentMethodPayload = zod_1.z.object({
27
+ id: zod_1.z.number(),
28
+ name: ZName,
29
+ address: ZAddress,
30
+ provider: ZProvider,
31
+ description: Base_type_1.ZDescription,
32
+ });
33
+ exports.ZDeletePaymentMethodPayload = zod_1.z.object({
34
+ paymentMethodId: zod_1.z.number(),
35
+ });
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const ZRole: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ name: z.ZodString;
5
+ description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
6
+ permissions: z.ZodNumber;
7
+ createdAt: z.ZodEffects<z.ZodUnion<[z.ZodDate, z.ZodNumber]>, Date, number | Date>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ id: number;
10
+ name: string;
11
+ description: string | null;
12
+ permissions: number;
13
+ createdAt: Date;
14
+ }, {
15
+ id: number;
16
+ name: string;
17
+ permissions: number;
18
+ createdAt: (number | Date) & (number | Date | undefined);
19
+ description?: string | null | undefined;
20
+ }>;
21
+ export type TRole = z.infer<typeof ZRole>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZRole = void 0;
4
+ const zod_1 = require("zod");
5
+ const Base_type_1 = require("./Base.type");
6
+ exports.ZRole = zod_1.z.object({
7
+ id: zod_1.z.number(),
8
+ name: zod_1.z.string(),
9
+ description: Base_type_1.ZDescription,
10
+ permissions: zod_1.z.number(),
11
+ createdAt: Base_type_1.ZCreatedAt,
12
+ });