@budgetbuddyde/types 1.0.6 → 1.0.12

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.
@@ -25,6 +25,23 @@ export declare const ZTransactionFile: z.ZodObject<{
25
25
  mimeType: string;
26
26
  }>;
27
27
  export type TTransactionFile = z.infer<typeof ZTransactionFile>;
28
+ export declare const ZCreateTransactionFilePayload: z.ZodObject<{
29
+ fileName: z.ZodString;
30
+ fileSize: z.ZodNumber;
31
+ mimeType: z.ZodString;
32
+ fileUrl: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ fileName: string;
35
+ fileSize: number;
36
+ mimeType: string;
37
+ fileUrl: string;
38
+ }, {
39
+ fileName: string;
40
+ fileSize: number;
41
+ mimeType: string;
42
+ fileUrl: string;
43
+ }>;
44
+ export type TCreateTransactionFilePayload = z.infer<typeof ZCreateTransactionFilePayload>;
28
45
  export declare const ZTransaction: z.ZodObject<{
29
46
  id: z.ZodNumber;
30
47
  owner: z.ZodObject<{
@@ -520,6 +537,22 @@ export declare const ZUpdateTransactionPayload: z.ZodObject<{
520
537
  receiver: z.ZodString;
521
538
  description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
522
539
  transferAmount: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodString]>, number, string | number>;
540
+ attachedFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
541
+ fileName: z.ZodString;
542
+ fileSize: z.ZodNumber;
543
+ mimeType: z.ZodString;
544
+ fileUrl: z.ZodString;
545
+ }, "strip", z.ZodTypeAny, {
546
+ fileName: string;
547
+ fileSize: number;
548
+ mimeType: string;
549
+ fileUrl: string;
550
+ }, {
551
+ fileName: string;
552
+ fileSize: number;
553
+ mimeType: string;
554
+ fileUrl: string;
555
+ }>, "many">>;
523
556
  }, "strip", z.ZodTypeAny, {
524
557
  receiver: string;
525
558
  description: string | null;
@@ -527,6 +560,12 @@ export declare const ZUpdateTransactionPayload: z.ZodObject<{
527
560
  paymentMethodId: number;
528
561
  processedAt: Date;
529
562
  transferAmount: number;
563
+ attachedFiles: {
564
+ fileName: string;
565
+ fileSize: number;
566
+ mimeType: string;
567
+ fileUrl: string;
568
+ }[];
530
569
  transactionId: number;
531
570
  }, {
532
571
  receiver: string;
@@ -536,6 +575,12 @@ export declare const ZUpdateTransactionPayload: z.ZodObject<{
536
575
  transferAmount: string | number;
537
576
  transactionId: number;
538
577
  description?: string | null | undefined;
578
+ attachedFiles?: {
579
+ fileName: string;
580
+ fileSize: number;
581
+ mimeType: string;
582
+ fileUrl: string;
583
+ }[] | undefined;
539
584
  }>;
540
585
  export type TUpdateTransactionPayload = z.infer<typeof ZUpdateTransactionPayload>;
541
586
  export declare const ZDeleteTransactionPayload: z.ZodArray<z.ZodObject<{
@@ -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.ZTransactionFile = void 0;
3
+ 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");
@@ -19,6 +19,12 @@ exports.ZTransactionFile = zod_1.z.object({
19
19
  location: zod_1.z.string().max(100, { message: 'Location is too long' }),
20
20
  createdAt: Base_type_1.ZCreatedAt,
21
21
  });
22
+ exports.ZCreateTransactionFilePayload = zod_1.z.object({
23
+ fileName: zod_1.z.string(),
24
+ fileSize: zod_1.z.number(),
25
+ mimeType: zod_1.z.string().max(20, { message: 'Mimetype is too long' }),
26
+ fileUrl: zod_1.z.string().max(100, { message: 'FileURL is too long' }),
27
+ });
22
28
  /**
23
29
  * Transaction
24
30
  */
@@ -55,6 +61,7 @@ exports.ZUpdateTransactionPayload = zod_1.z.object({
55
61
  receiver: zod_1.z.string(),
56
62
  description: Base_type_1.ZDescription,
57
63
  transferAmount: ZTransferAmount,
64
+ attachedFiles: zod_1.z.array(exports.ZCreateTransactionFilePayload).default([]),
58
65
  });
59
66
  exports.ZDeleteTransactionPayload = zod_1.z.array(zod_1.z.object({
60
67
  transactionId: zod_1.z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budgetbuddyde/types",
3
- "version": "1.0.6",
3
+ "version": "1.0.12",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "description": "Budget Buddy Typescript Types",