@budgetbuddyde/types 1.0.35 → 1.0.37

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,53 @@
1
+ import { z } from 'zod';
2
+ export declare const ZMailOptInPayload: z.ZodObject<{
3
+ userId: z.ZodString;
4
+ newsletterId: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ userId: string;
7
+ newsletterId: string;
8
+ }, {
9
+ userId: string;
10
+ newsletterId: string;
11
+ }>;
12
+ export type TMailOptInPayload = z.infer<typeof ZMailOptInPayload>;
13
+ export declare const ZVerifyMailOptInPayload: z.ZodObject<{
14
+ userId: z.ZodString;
15
+ newsletterId: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ userId: string;
18
+ newsletterId: string;
19
+ }, {
20
+ userId: string;
21
+ newsletterId: string;
22
+ }>;
23
+ export type TVerifyMailOptInPayload = z.infer<typeof ZVerifyMailOptInPayload>;
24
+ export declare const ZMailOptOutPayload: z.ZodObject<{
25
+ userId: z.ZodString;
26
+ newsletterId: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ userId: string;
29
+ newsletterId: string;
30
+ }, {
31
+ userId: string;
32
+ newsletterId: string;
33
+ }>;
34
+ export type TMailOptOutPayload = z.infer<typeof ZMailOptOutPayload>;
35
+ export declare const ZTriggerWeeklyReportPayload: z.ZodObject<{
36
+ startDate: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
37
+ endDate: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ startDate: Date;
40
+ endDate: Date;
41
+ }, {
42
+ startDate: (string | number | Date) & (string | number | Date | undefined);
43
+ endDate: (string | number | Date) & (string | number | Date | undefined);
44
+ }>;
45
+ export type TTriggerWeeklyReportPayload = z.infer<typeof ZTriggerWeeklyReportPayload>;
46
+ export declare const ZTriggerMonthlyReportPayload: z.ZodObject<{
47
+ month: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ month: Date;
50
+ }, {
51
+ month: (string | number | Date) & (string | number | Date | undefined);
52
+ }>;
53
+ export type TTriggerMonthlyReportPayload = z.infer<typeof ZTriggerMonthlyReportPayload>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZTriggerMonthlyReportPayload = exports.ZTriggerWeeklyReportPayload = exports.ZMailOptOutPayload = exports.ZVerifyMailOptInPayload = exports.ZMailOptInPayload = void 0;
4
+ const zod_1 = require("zod");
5
+ const PocketBase_types_1 = require("./PocketBase.types");
6
+ const Base_type_1 = require("./Base.type");
7
+ exports.ZMailOptInPayload = zod_1.z.object({
8
+ userId: PocketBase_types_1.ZId,
9
+ newsletterId: PocketBase_types_1.ZId,
10
+ });
11
+ exports.ZVerifyMailOptInPayload = zod_1.z.object({
12
+ userId: PocketBase_types_1.ZId,
13
+ newsletterId: PocketBase_types_1.ZId,
14
+ });
15
+ exports.ZMailOptOutPayload = zod_1.z.object({
16
+ userId: PocketBase_types_1.ZId,
17
+ newsletterId: PocketBase_types_1.ZId,
18
+ });
19
+ exports.ZTriggerWeeklyReportPayload = zod_1.z.object({
20
+ startDate: Base_type_1.ZDate,
21
+ endDate: Base_type_1.ZDate,
22
+ });
23
+ exports.ZTriggerMonthlyReportPayload = zod_1.z.object({
24
+ month: Base_type_1.ZDate,
25
+ });
@@ -3294,6 +3294,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3294
3294
  name: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
3295
3295
  surname: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
3296
3296
  verified: z.ZodBoolean;
3297
+ marked_for_deletion: z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>>;
3297
3298
  newsletter: z.ZodArray<z.ZodString, "many">;
3298
3299
  collectionId: z.ZodString;
3299
3300
  collectionName: z.ZodString;
@@ -3314,6 +3315,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3314
3315
  username: string;
3315
3316
  surname: string | null;
3316
3317
  verified: boolean;
3318
+ marked_for_deletion: Date | null;
3317
3319
  }, {
3318
3320
  id: string;
3319
3321
  email: string;
@@ -3325,6 +3327,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3325
3327
  emailVisibility: boolean;
3326
3328
  username: string;
3327
3329
  verified: boolean;
3330
+ marked_for_deletion: ((string | number | Date) & (string | number | Date | undefined)) | null;
3328
3331
  avatar?: string | null | undefined;
3329
3332
  name?: string | null | undefined;
3330
3333
  surname?: string | null | undefined;
@@ -3372,6 +3375,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3372
3375
  username: string;
3373
3376
  surname: string | null;
3374
3377
  verified: boolean;
3378
+ marked_for_deletion: Date | null;
3375
3379
  } | null;
3376
3380
  exchange: {
3377
3381
  symbol: string;
@@ -3395,6 +3399,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3395
3399
  emailVisibility: boolean;
3396
3400
  username: string;
3397
3401
  verified: boolean;
3402
+ marked_for_deletion: ((string | number | Date) & (string | number | Date | undefined)) | null;
3398
3403
  avatar?: string | null | undefined;
3399
3404
  name?: string | null | undefined;
3400
3405
  surname?: string | null | undefined;
@@ -3463,6 +3468,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3463
3468
  username: string;
3464
3469
  surname: string | null;
3465
3470
  verified: boolean;
3471
+ marked_for_deletion: Date | null;
3466
3472
  } | null;
3467
3473
  exchange: {
3468
3474
  symbol: string;
@@ -3508,6 +3514,7 @@ export declare const ZAssetWatchlistWithQuote: z.ZodObject<{
3508
3514
  emailVisibility: boolean;
3509
3515
  username: string;
3510
3516
  verified: boolean;
3517
+ marked_for_deletion: ((string | number | Date) & (string | number | Date | undefined)) | null;
3511
3518
  avatar?: string | null | undefined;
3512
3519
  name?: string | null | undefined;
3513
3520
  surname?: string | null | undefined;
@@ -7,6 +7,7 @@ export declare const ZUser: z.ZodNullable<z.ZodObject<{
7
7
  name: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
8
8
  surname: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
9
9
  verified: z.ZodBoolean;
10
+ marked_for_deletion: z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>>;
10
11
  newsletter: z.ZodArray<z.ZodString, "many">;
11
12
  collectionId: z.ZodString;
12
13
  collectionName: z.ZodString;
@@ -27,6 +28,7 @@ export declare const ZUser: z.ZodNullable<z.ZodObject<{
27
28
  username: string;
28
29
  surname: string | null;
29
30
  verified: boolean;
31
+ marked_for_deletion: Date | null;
30
32
  }, {
31
33
  id: string;
32
34
  email: string;
@@ -38,6 +40,7 @@ export declare const ZUser: z.ZodNullable<z.ZodObject<{
38
40
  emailVisibility: boolean;
39
41
  username: string;
40
42
  verified: boolean;
43
+ marked_for_deletion: ((string | number | Date) & (string | number | Date | undefined)) | null;
41
44
  avatar?: string | null | undefined;
42
45
  name?: string | null | undefined;
43
46
  surname?: string | null | undefined;
package/lib/User.types.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ZUser = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const PocketBase_types_1 = require("./PocketBase.types");
6
+ const Base_type_1 = require("./Base.type");
6
7
  exports.ZUser = zod_1.z
7
8
  .object({
8
9
  ...PocketBase_types_1.ZBaseModel.shape,
@@ -14,6 +15,7 @@ exports.ZUser = zod_1.z
14
15
  name: PocketBase_types_1.ZNullableString,
15
16
  surname: PocketBase_types_1.ZNullableString,
16
17
  verified: zod_1.z.boolean(),
18
+ marked_for_deletion: Base_type_1.ZDate.nullable(),
17
19
  newsletter: zod_1.z.array(PocketBase_types_1.ZId),
18
20
  }).shape,
19
21
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budgetbuddyde/types",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "description": "Budget Buddy Typescript Types",
@@ -1,146 +0,0 @@
1
- import { z } from 'zod';
2
- import { type TUser } from './User.type';
3
- export type TSession = TUser;
4
- export declare const ZSignUpPayload: z.ZodObject<{
5
- email: z.ZodString;
6
- password: z.ZodString;
7
- name: z.ZodString;
8
- surname: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- name: string;
11
- email: string;
12
- surname: string;
13
- password: string;
14
- }, {
15
- name: string;
16
- email: string;
17
- surname: string;
18
- password: string;
19
- }>;
20
- export type TSignUpPayload = z.infer<typeof ZSignUpPayload>;
21
- export declare const ZSignInPayload: z.ZodObject<{
22
- email: z.ZodString;
23
- password: z.ZodString;
24
- }, "strip", z.ZodTypeAny, {
25
- email: string;
26
- password: string;
27
- }, {
28
- email: string;
29
- password: string;
30
- }>;
31
- export type TSignInPayload = z.infer<typeof ZSignInPayload>;
32
- export declare enum EVerifyMailReturnCode {
33
- SUCCESS = "SUCCESS",
34
- ALREADY_VERIFIED = "ALREADY_VERIFIED",
35
- INVALID_EMAIL = "INVALID_EMAIL",
36
- NOT_FOUND = "NOT_FOUND"
37
- }
38
- export declare const ZVerifyMailReturnCode: z.ZodNativeEnum<typeof EVerifyMailReturnCode>;
39
- export declare const VerifyMailReturnCodeToMessage: Record<EVerifyMailReturnCode, string>;
40
- export declare const ZPasswordReset: z.ZodObject<{
41
- id: z.ZodNumber;
42
- owner: z.ZodObject<{
43
- uuid: z.ZodString;
44
- isVerified: z.ZodDefault<z.ZodBoolean>;
45
- role: z.ZodObject<{
46
- id: z.ZodNumber;
47
- name: z.ZodString;
48
- description: z.ZodDefault<z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, string | null>>;
49
- permissions: z.ZodNumber;
50
- createdAt: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
51
- }, "strip", z.ZodTypeAny, {
52
- id: number;
53
- name: string;
54
- description: string | null;
55
- createdAt: Date;
56
- permissions: number;
57
- }, {
58
- id: number;
59
- name: string;
60
- createdAt: (string | number | Date) & (string | number | Date | undefined);
61
- permissions: number;
62
- description?: string | null | undefined;
63
- }>;
64
- email: z.ZodString;
65
- name: z.ZodString;
66
- surname: z.ZodString;
67
- password: z.ZodString;
68
- createdAt: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
69
- }, "strip", z.ZodTypeAny, {
70
- name: string;
71
- role: {
72
- id: number;
73
- name: string;
74
- description: string | null;
75
- createdAt: Date;
76
- permissions: number;
77
- };
78
- email: string;
79
- uuid: string;
80
- surname: string;
81
- createdAt: Date;
82
- isVerified: boolean;
83
- password: string;
84
- }, {
85
- name: string;
86
- role: {
87
- id: number;
88
- name: string;
89
- createdAt: (string | number | Date) & (string | number | Date | undefined);
90
- permissions: number;
91
- description?: string | null | undefined;
92
- };
93
- email: string;
94
- uuid: string;
95
- surname: string;
96
- createdAt: (string | number | Date) & (string | number | Date | undefined);
97
- password: string;
98
- isVerified?: boolean | undefined;
99
- }>;
100
- otp: z.ZodString;
101
- used: z.ZodBoolean;
102
- createdAt: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
103
- }, "strip", z.ZodTypeAny, {
104
- id: number;
105
- owner: {
106
- name: string;
107
- role: {
108
- id: number;
109
- name: string;
110
- description: string | null;
111
- createdAt: Date;
112
- permissions: number;
113
- };
114
- email: string;
115
- uuid: string;
116
- surname: string;
117
- createdAt: Date;
118
- isVerified: boolean;
119
- password: string;
120
- };
121
- createdAt: Date;
122
- otp: string;
123
- used: boolean;
124
- }, {
125
- id: number;
126
- owner: {
127
- name: string;
128
- role: {
129
- id: number;
130
- name: string;
131
- createdAt: (string | number | Date) & (string | number | Date | undefined);
132
- permissions: number;
133
- description?: string | null | undefined;
134
- };
135
- email: string;
136
- uuid: string;
137
- surname: string;
138
- createdAt: (string | number | Date) & (string | number | Date | undefined);
139
- password: string;
140
- isVerified?: boolean | undefined;
141
- };
142
- createdAt: (string | number | Date) & (string | number | Date | undefined);
143
- otp: string;
144
- used: boolean;
145
- }>;
146
- export type TPasswordReset = z.infer<typeof ZPasswordReset>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZPasswordReset = exports.VerifyMailReturnCodeToMessage = exports.ZVerifyMailReturnCode = exports.EVerifyMailReturnCode = exports.ZSignInPayload = exports.ZSignUpPayload = 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
- exports.ZSignUpPayload = zod_1.z.object({
8
- email: Base_type_1.ZEmail,
9
- password: zod_1.z.string(),
10
- name: zod_1.z.string(),
11
- surname: zod_1.z.string(),
12
- });
13
- exports.ZSignInPayload = zod_1.z.object({
14
- email: Base_type_1.ZEmail,
15
- password: zod_1.z.string(),
16
- });
17
- var EVerifyMailReturnCode;
18
- (function (EVerifyMailReturnCode) {
19
- EVerifyMailReturnCode["SUCCESS"] = "SUCCESS";
20
- EVerifyMailReturnCode["ALREADY_VERIFIED"] = "ALREADY_VERIFIED";
21
- EVerifyMailReturnCode["INVALID_EMAIL"] = "INVALID_EMAIL";
22
- EVerifyMailReturnCode["NOT_FOUND"] = "NOT_FOUND";
23
- })(EVerifyMailReturnCode = exports.EVerifyMailReturnCode || (exports.EVerifyMailReturnCode = {}));
24
- exports.ZVerifyMailReturnCode = zod_1.z.nativeEnum(EVerifyMailReturnCode);
25
- exports.VerifyMailReturnCodeToMessage = {
26
- [EVerifyMailReturnCode.SUCCESS]: "You're successfully verified your email!",
27
- [EVerifyMailReturnCode.ALREADY_VERIFIED]: 'Your email is already verified!',
28
- [EVerifyMailReturnCode.INVALID_EMAIL]: "This email isn't bound to your user account!",
29
- [EVerifyMailReturnCode.NOT_FOUND]: 'User not found!',
30
- };
31
- exports.ZPasswordReset = zod_1.z.object({
32
- id: zod_1.z.number(),
33
- owner: User_type_1.ZUser,
34
- otp: zod_1.z.string().uuid(),
35
- used: zod_1.z.boolean(),
36
- createdAt: Base_type_1.ZCreatedAt,
37
- });