@budgetbuddyde/types 1.0.45 → 1.0.46
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/Budget.types.d.ts +157 -20
- package/lib/Budget.types.js +34 -7
- package/package.json +1 -1
package/lib/Budget.types.d.ts
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const ZBudget: z.ZodObject<{
|
|
3
3
|
owner: z.ZodString;
|
|
4
|
-
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
category: z.ZodArray<z.ZodString, "many">;
|
|
5
6
|
budget: z.ZodNumber;
|
|
7
|
+
type: z.ZodEnum<["include", "exclude"]>;
|
|
8
|
+
collectionId: z.ZodString;
|
|
9
|
+
collectionName: z.ZodString;
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
12
|
+
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: "include" | "exclude";
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
collectionId: string;
|
|
18
|
+
collectionName: string;
|
|
19
|
+
created: Date;
|
|
20
|
+
updated: Date;
|
|
21
|
+
owner: string;
|
|
22
|
+
category: string[];
|
|
23
|
+
budget: number;
|
|
24
|
+
}, {
|
|
25
|
+
type: "include" | "exclude";
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
collectionId: string;
|
|
29
|
+
collectionName: string;
|
|
30
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
31
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
32
|
+
owner: string;
|
|
33
|
+
category: string[];
|
|
34
|
+
budget: number;
|
|
35
|
+
}>;
|
|
36
|
+
export type TBudget = z.infer<typeof ZBudget>;
|
|
37
|
+
export declare const ZExpandedBudget: z.ZodObject<{
|
|
38
|
+
owner: z.ZodString;
|
|
39
|
+
label: z.ZodString;
|
|
40
|
+
category: z.ZodArray<z.ZodString, "many">;
|
|
6
41
|
expand: z.ZodObject<{
|
|
7
|
-
|
|
42
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
8
43
|
owner: z.ZodString;
|
|
9
44
|
name: z.ZodString;
|
|
10
45
|
description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
|
|
@@ -31,9 +66,9 @@ export declare const ZBudget: z.ZodObject<{
|
|
|
31
66
|
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
32
67
|
owner: string;
|
|
33
68
|
description?: string | null | undefined;
|
|
34
|
-
}>;
|
|
69
|
+
}>, "many">;
|
|
35
70
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
|
|
71
|
+
categories: {
|
|
37
72
|
id: string;
|
|
38
73
|
name: string;
|
|
39
74
|
description: string | null;
|
|
@@ -42,9 +77,9 @@ export declare const ZBudget: z.ZodObject<{
|
|
|
42
77
|
created: Date;
|
|
43
78
|
updated: Date;
|
|
44
79
|
owner: string;
|
|
45
|
-
};
|
|
80
|
+
}[];
|
|
46
81
|
}, {
|
|
47
|
-
|
|
82
|
+
categories: {
|
|
48
83
|
id: string;
|
|
49
84
|
name: string;
|
|
50
85
|
collectionId: string;
|
|
@@ -53,24 +88,28 @@ export declare const ZBudget: z.ZodObject<{
|
|
|
53
88
|
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
54
89
|
owner: string;
|
|
55
90
|
description?: string | null | undefined;
|
|
56
|
-
};
|
|
91
|
+
}[];
|
|
57
92
|
}>;
|
|
93
|
+
budget: z.ZodNumber;
|
|
94
|
+
type: z.ZodEnum<["include", "exclude"]>;
|
|
58
95
|
collectionId: z.ZodString;
|
|
59
96
|
collectionName: z.ZodString;
|
|
60
97
|
id: z.ZodString;
|
|
61
98
|
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
62
99
|
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
63
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
type: "include" | "exclude";
|
|
64
102
|
id: string;
|
|
103
|
+
label: string;
|
|
65
104
|
collectionId: string;
|
|
66
105
|
collectionName: string;
|
|
67
106
|
created: Date;
|
|
68
107
|
updated: Date;
|
|
69
108
|
owner: string;
|
|
70
|
-
category: string;
|
|
109
|
+
category: string[];
|
|
71
110
|
budget: number;
|
|
72
111
|
expand: {
|
|
73
|
-
|
|
112
|
+
categories: {
|
|
74
113
|
id: string;
|
|
75
114
|
name: string;
|
|
76
115
|
description: string | null;
|
|
@@ -79,19 +118,21 @@ export declare const ZBudget: z.ZodObject<{
|
|
|
79
118
|
created: Date;
|
|
80
119
|
updated: Date;
|
|
81
120
|
owner: string;
|
|
82
|
-
};
|
|
121
|
+
}[];
|
|
83
122
|
};
|
|
84
123
|
}, {
|
|
124
|
+
type: "include" | "exclude";
|
|
85
125
|
id: string;
|
|
126
|
+
label: string;
|
|
86
127
|
collectionId: string;
|
|
87
128
|
collectionName: string;
|
|
88
129
|
created: (string | number | Date) & (string | number | Date | undefined);
|
|
89
130
|
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
90
131
|
owner: string;
|
|
91
|
-
category: string;
|
|
132
|
+
category: string[];
|
|
92
133
|
budget: number;
|
|
93
134
|
expand: {
|
|
94
|
-
|
|
135
|
+
categories: {
|
|
95
136
|
id: string;
|
|
96
137
|
name: string;
|
|
97
138
|
collectionId: string;
|
|
@@ -100,35 +141,131 @@ export declare const ZBudget: z.ZodObject<{
|
|
|
100
141
|
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
101
142
|
owner: string;
|
|
102
143
|
description?: string | null | undefined;
|
|
103
|
-
};
|
|
144
|
+
}[];
|
|
104
145
|
};
|
|
105
146
|
}>;
|
|
106
|
-
export type
|
|
147
|
+
export type TExpandedBudget = z.infer<typeof ZExpandedBudget>;
|
|
148
|
+
export declare const ZBudgetProgress: z.ZodObject<{
|
|
149
|
+
progress: z.ZodNumber;
|
|
150
|
+
owner: z.ZodString;
|
|
151
|
+
label: z.ZodString;
|
|
152
|
+
category: z.ZodArray<z.ZodString, "many">;
|
|
153
|
+
budget: z.ZodNumber;
|
|
154
|
+
type: z.ZodEnum<["include", "exclude"]>;
|
|
155
|
+
collectionId: z.ZodString;
|
|
156
|
+
collectionName: z.ZodString;
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
159
|
+
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
type: "include" | "exclude";
|
|
162
|
+
progress: number;
|
|
163
|
+
id: string;
|
|
164
|
+
label: string;
|
|
165
|
+
collectionId: string;
|
|
166
|
+
collectionName: string;
|
|
167
|
+
created: Date;
|
|
168
|
+
updated: Date;
|
|
169
|
+
owner: string;
|
|
170
|
+
category: string[];
|
|
171
|
+
budget: number;
|
|
172
|
+
}, {
|
|
173
|
+
type: "include" | "exclude";
|
|
174
|
+
progress: number;
|
|
175
|
+
id: string;
|
|
176
|
+
label: string;
|
|
177
|
+
collectionId: string;
|
|
178
|
+
collectionName: string;
|
|
179
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
180
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
181
|
+
owner: string;
|
|
182
|
+
category: string[];
|
|
183
|
+
budget: number;
|
|
184
|
+
}>;
|
|
185
|
+
export type TBudgetProgress = z.infer<typeof ZBudgetProgress>;
|
|
186
|
+
export declare const ZExpandedBudgetProgress: z.ZodObject<{
|
|
187
|
+
progress: z.ZodNumber;
|
|
188
|
+
owner: z.ZodString;
|
|
189
|
+
label: z.ZodString;
|
|
190
|
+
category: z.ZodArray<z.ZodString, "many">;
|
|
191
|
+
budget: z.ZodNumber;
|
|
192
|
+
type: z.ZodEnum<["include", "exclude"]>;
|
|
193
|
+
collectionId: z.ZodString;
|
|
194
|
+
collectionName: z.ZodString;
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
197
|
+
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
type: "include" | "exclude";
|
|
200
|
+
progress: number;
|
|
201
|
+
id: string;
|
|
202
|
+
label: string;
|
|
203
|
+
collectionId: string;
|
|
204
|
+
collectionName: string;
|
|
205
|
+
created: Date;
|
|
206
|
+
updated: Date;
|
|
207
|
+
owner: string;
|
|
208
|
+
category: string[];
|
|
209
|
+
budget: number;
|
|
210
|
+
}, {
|
|
211
|
+
type: "include" | "exclude";
|
|
212
|
+
progress: number;
|
|
213
|
+
id: string;
|
|
214
|
+
label: string;
|
|
215
|
+
collectionId: string;
|
|
216
|
+
collectionName: string;
|
|
217
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
218
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
219
|
+
owner: string;
|
|
220
|
+
category: string[];
|
|
221
|
+
budget: number;
|
|
222
|
+
}>;
|
|
223
|
+
export type TExpandedBudgetProgress = z.infer<typeof ZExpandedBudgetProgress>;
|
|
107
224
|
export declare const ZCreateBudgetPayload: z.ZodObject<{
|
|
108
225
|
owner: z.ZodString;
|
|
109
|
-
|
|
226
|
+
label: z.ZodString;
|
|
227
|
+
category: z.ZodArray<z.ZodString, "many">;
|
|
110
228
|
budget: z.ZodNumber;
|
|
229
|
+
type: z.ZodEnum<["include", "exclude"]>;
|
|
111
230
|
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
type: "include" | "exclude";
|
|
232
|
+
label: string;
|
|
112
233
|
owner: string;
|
|
113
|
-
category: string;
|
|
234
|
+
category: string[];
|
|
114
235
|
budget: number;
|
|
115
236
|
}, {
|
|
237
|
+
type: "include" | "exclude";
|
|
238
|
+
label: string;
|
|
116
239
|
owner: string;
|
|
117
|
-
category: string;
|
|
240
|
+
category: string[];
|
|
118
241
|
budget: number;
|
|
119
242
|
}>;
|
|
120
243
|
export type TCreateBudgetPayload = z.infer<typeof ZCreateBudgetPayload>;
|
|
121
244
|
export declare const ZUpdateBudgetPayload: z.ZodObject<{
|
|
122
245
|
owner: z.ZodString;
|
|
123
|
-
|
|
246
|
+
label: z.ZodString;
|
|
247
|
+
category: z.ZodArray<z.ZodString, "many">;
|
|
124
248
|
budget: z.ZodNumber;
|
|
249
|
+
type: z.ZodEnum<["include", "exclude"]>;
|
|
125
250
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
+
type: "include" | "exclude";
|
|
252
|
+
label: string;
|
|
126
253
|
owner: string;
|
|
127
|
-
category: string;
|
|
254
|
+
category: string[];
|
|
128
255
|
budget: number;
|
|
129
256
|
}, {
|
|
257
|
+
type: "include" | "exclude";
|
|
258
|
+
label: string;
|
|
130
259
|
owner: string;
|
|
131
|
-
category: string;
|
|
260
|
+
category: string[];
|
|
132
261
|
budget: number;
|
|
133
262
|
}>;
|
|
134
263
|
export type TUpdateBudgetPayload = z.infer<typeof ZUpdateBudgetPayload>;
|
|
264
|
+
export declare const ZDeleteBudgetPayload: z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
id: string;
|
|
268
|
+
}, {
|
|
269
|
+
id: string;
|
|
270
|
+
}>;
|
|
271
|
+
export type TDeleteBudgetPayload = z.infer<typeof ZDeleteBudgetPayload>;
|
package/lib/Budget.types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZUpdateBudgetPayload = exports.ZCreateBudgetPayload = exports.ZBudget = void 0;
|
|
3
|
+
exports.ZDeleteBudgetPayload = exports.ZUpdateBudgetPayload = exports.ZCreateBudgetPayload = exports.ZExpandedBudgetProgress = exports.ZBudgetProgress = exports.ZExpandedBudget = exports.ZBudget = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const PocketBase_types_1 = require("./PocketBase.types");
|
|
6
6
|
const Category_types_1 = require("./Category.types");
|
|
@@ -8,20 +8,47 @@ exports.ZBudget = zod_1.z.object({
|
|
|
8
8
|
...PocketBase_types_1.ZBaseModel.shape,
|
|
9
9
|
...zod_1.z.object({
|
|
10
10
|
owner: PocketBase_types_1.ZId,
|
|
11
|
-
|
|
11
|
+
label: zod_1.z.string(),
|
|
12
|
+
category: zod_1.z.array(PocketBase_types_1.ZId),
|
|
12
13
|
budget: zod_1.z.number(),
|
|
14
|
+
type: zod_1.z.enum(['include', 'exclude']),
|
|
15
|
+
}).shape,
|
|
16
|
+
});
|
|
17
|
+
exports.ZExpandedBudget = zod_1.z.object({
|
|
18
|
+
...PocketBase_types_1.ZBaseModel.shape,
|
|
19
|
+
...zod_1.z.object({
|
|
20
|
+
owner: PocketBase_types_1.ZId,
|
|
21
|
+
label: zod_1.z.string(),
|
|
22
|
+
category: zod_1.z.array(PocketBase_types_1.ZId),
|
|
13
23
|
expand: zod_1.z.object({
|
|
14
|
-
|
|
24
|
+
categories: zod_1.z.array(Category_types_1.ZCategory),
|
|
15
25
|
}),
|
|
26
|
+
budget: zod_1.z.number(),
|
|
27
|
+
type: zod_1.z.enum(['include', 'exclude']),
|
|
16
28
|
}).shape,
|
|
17
29
|
});
|
|
30
|
+
exports.ZBudgetProgress = zod_1.z.object({
|
|
31
|
+
...exports.ZBudget.shape,
|
|
32
|
+
progress: zod_1.z.number(),
|
|
33
|
+
});
|
|
34
|
+
exports.ZExpandedBudgetProgress = zod_1.z.object({
|
|
35
|
+
...exports.ZBudget.shape,
|
|
36
|
+
progress: zod_1.z.number(),
|
|
37
|
+
});
|
|
18
38
|
exports.ZCreateBudgetPayload = zod_1.z.object({
|
|
19
39
|
owner: PocketBase_types_1.ZId,
|
|
20
|
-
|
|
21
|
-
|
|
40
|
+
label: zod_1.z.string(),
|
|
41
|
+
category: zod_1.z.array(PocketBase_types_1.ZId),
|
|
42
|
+
budget: zod_1.z.number().min(0),
|
|
43
|
+
type: zod_1.z.enum(['include', 'exclude']),
|
|
22
44
|
});
|
|
23
45
|
exports.ZUpdateBudgetPayload = zod_1.z.object({
|
|
24
46
|
owner: PocketBase_types_1.ZId,
|
|
25
|
-
|
|
26
|
-
|
|
47
|
+
label: zod_1.z.string(),
|
|
48
|
+
category: zod_1.z.array(PocketBase_types_1.ZId),
|
|
49
|
+
budget: zod_1.z.number().min(0),
|
|
50
|
+
type: zod_1.z.enum(['include', 'exclude']),
|
|
51
|
+
});
|
|
52
|
+
exports.ZDeleteBudgetPayload = zod_1.z.object({
|
|
53
|
+
id: PocketBase_types_1.ZId,
|
|
27
54
|
});
|