@budgetbuddyde/types 1.0.21 → 1.0.23
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/ApiResponse.type.d.ts +0 -3
- package/lib/Budget.types.d.ts +114 -0
- package/lib/Budget.types.js +27 -0
- package/lib/Category.types.d.ts +52 -0
- package/lib/Category.types.js +23 -0
- package/lib/DailyBalance.types.d.ts +24 -0
- package/lib/DailyBalance.types.js +14 -0
- package/lib/{Auth.type.js → Deprecated/Auth.type.js} +1 -1
- package/lib/{Budget.type.js → Deprecated/Budget.type.js} +1 -1
- package/lib/{Category.type.js → Deprecated/Category.type.js} +1 -1
- package/lib/{DailyTransaction.type.js → Deprecated/DailyTransaction.type.js} +1 -1
- package/lib/{File.type.js → Deprecated/File.type.js} +1 -1
- package/lib/{PaymentMethod.type.js → Deprecated/PaymentMethod.type.js} +1 -1
- package/lib/{Role.type.js → Deprecated/Role.type.js} +1 -1
- package/lib/Deprecated/Stock.types.d.ts +326 -0
- package/lib/Deprecated/Stock.types.js +110 -0
- package/lib/{Subscription.type.js → Deprecated/Subscription.type.js} +1 -1
- package/lib/{Transaction.type.js → Deprecated/Transaction.type.js} +1 -1
- package/lib/{User.type.js → Deprecated/User.type.js} +1 -1
- package/lib/MonthlyBalance.types.d.ts +24 -0
- package/lib/MonthlyBalance.types.js +14 -0
- package/lib/PaymentMethod.types.d.ts +70 -0
- package/lib/PaymentMethod.types.js +29 -0
- package/lib/PocketBase.types.d.ts +22 -0
- package/lib/PocketBase.types.js +19 -0
- package/lib/{Stock.types.d.ts → Stocks/Stock.types.d.ts} +494 -489
- package/lib/{Stock.types.js → Stocks/Stock.types.js} +85 -126
- package/lib/Stocks/index.d.ts +1 -0
- package/lib/Stocks/index.js +17 -0
- package/lib/Subscription.types.d.ts +233 -0
- package/lib/Subscription.types.js +46 -0
- package/lib/Transaction.types.d.ts +227 -0
- package/lib/Transaction.types.js +45 -0
- package/lib/User.types.d.ts +36 -0
- package/lib/User.types.js +19 -0
- package/lib/index.d.ts +10 -11
- package/lib/index.js +10 -11
- package/package.json +1 -1
- package/lib/{Auth.type.d.ts → Deprecated/Auth.type.d.ts} +12 -12
- package/lib/{Budget.type.d.ts → Deprecated/Budget.type.d.ts} +107 -107
- package/lib/{Category.type.d.ts → Deprecated/Category.type.d.ts} +30 -30
- package/lib/{DailyTransaction.type.d.ts → Deprecated/DailyTransaction.type.d.ts} +0 -0
- package/lib/{File.type.d.ts → Deprecated/File.type.d.ts} +0 -0
- package/lib/{PaymentMethod.type.d.ts → Deprecated/PaymentMethod.type.d.ts} +30 -30
- package/lib/{Role.type.d.ts → Deprecated/Role.type.d.ts} +2 -2
- package/lib/{Subscription.type.d.ts → Deprecated/Subscription.type.d.ts} +124 -124
- package/lib/{Transaction.type.d.ts → Deprecated/Transaction.type.d.ts} +126 -126
- package/lib/{User.type.d.ts → Deprecated/User.type.d.ts} +6 -6
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ZBudget: z.ZodObject<{
|
|
3
|
+
owner: z.ZodString;
|
|
4
|
+
category: z.ZodString;
|
|
5
|
+
budget: z.ZodNumber;
|
|
6
|
+
expand: z.ZodObject<{
|
|
7
|
+
category: z.ZodObject<{
|
|
8
|
+
owner: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
13
|
+
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
created: Date;
|
|
19
|
+
updated: Date;
|
|
20
|
+
owner: string;
|
|
21
|
+
}, {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
25
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
26
|
+
owner: string;
|
|
27
|
+
description?: string | null | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
category: {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string | null;
|
|
34
|
+
created: Date;
|
|
35
|
+
updated: Date;
|
|
36
|
+
owner: string;
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
category: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
43
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
44
|
+
owner: string;
|
|
45
|
+
description?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
50
|
+
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
id: string;
|
|
53
|
+
created: Date;
|
|
54
|
+
updated: Date;
|
|
55
|
+
owner: string;
|
|
56
|
+
category: string;
|
|
57
|
+
budget: number;
|
|
58
|
+
expand: {
|
|
59
|
+
category: {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
description: string | null;
|
|
63
|
+
created: Date;
|
|
64
|
+
updated: Date;
|
|
65
|
+
owner: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
id: string;
|
|
70
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
71
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
72
|
+
owner: string;
|
|
73
|
+
category: string;
|
|
74
|
+
budget: number;
|
|
75
|
+
expand: {
|
|
76
|
+
category: {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
80
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
81
|
+
owner: string;
|
|
82
|
+
description?: string | null | undefined;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}>;
|
|
86
|
+
export type TBudget = z.infer<typeof ZBudget>;
|
|
87
|
+
export declare const ZCreateBudgetPayload: z.ZodObject<{
|
|
88
|
+
owner: z.ZodString;
|
|
89
|
+
category: z.ZodString;
|
|
90
|
+
budget: z.ZodNumber;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
owner: string;
|
|
93
|
+
category: string;
|
|
94
|
+
budget: number;
|
|
95
|
+
}, {
|
|
96
|
+
owner: string;
|
|
97
|
+
category: string;
|
|
98
|
+
budget: number;
|
|
99
|
+
}>;
|
|
100
|
+
export type TCreateBudgetPayload = z.infer<typeof ZCreateBudgetPayload>;
|
|
101
|
+
export declare const ZUpdateBudgetPayload: z.ZodObject<{
|
|
102
|
+
owner: z.ZodString;
|
|
103
|
+
category: z.ZodString;
|
|
104
|
+
budget: z.ZodNumber;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
owner: string;
|
|
107
|
+
category: string;
|
|
108
|
+
budget: number;
|
|
109
|
+
}, {
|
|
110
|
+
owner: string;
|
|
111
|
+
category: string;
|
|
112
|
+
budget: number;
|
|
113
|
+
}>;
|
|
114
|
+
export type TUpdateBudgetPayload = z.infer<typeof ZUpdateBudgetPayload>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZUpdateBudgetPayload = exports.ZCreateBudgetPayload = exports.ZBudget = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const PocketBase_types_1 = require("./PocketBase.types");
|
|
6
|
+
const Category_types_1 = require("./Category.types");
|
|
7
|
+
exports.ZBudget = zod_1.z.object({
|
|
8
|
+
...PocketBase_types_1.ZBaseModel.shape,
|
|
9
|
+
...zod_1.z.object({
|
|
10
|
+
owner: PocketBase_types_1.ZId,
|
|
11
|
+
category: PocketBase_types_1.ZId,
|
|
12
|
+
budget: zod_1.z.number(),
|
|
13
|
+
expand: zod_1.z.object({
|
|
14
|
+
category: Category_types_1.ZCategory,
|
|
15
|
+
}),
|
|
16
|
+
}).shape,
|
|
17
|
+
});
|
|
18
|
+
exports.ZCreateBudgetPayload = zod_1.z.object({
|
|
19
|
+
owner: PocketBase_types_1.ZId,
|
|
20
|
+
category: PocketBase_types_1.ZId,
|
|
21
|
+
budget: zod_1.z.number(),
|
|
22
|
+
});
|
|
23
|
+
exports.ZUpdateBudgetPayload = zod_1.z.object({
|
|
24
|
+
owner: PocketBase_types_1.ZId,
|
|
25
|
+
category: PocketBase_types_1.ZId,
|
|
26
|
+
budget: zod_1.z.number(),
|
|
27
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ZCategory: z.ZodObject<{
|
|
3
|
+
owner: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
8
|
+
updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
created: Date;
|
|
14
|
+
updated: Date;
|
|
15
|
+
owner: string;
|
|
16
|
+
}, {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
created: (string | number | Date) & (string | number | Date | undefined);
|
|
20
|
+
updated: (string | number | Date) & (string | number | Date | undefined);
|
|
21
|
+
owner: string;
|
|
22
|
+
description?: string | null | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type TCategory = z.infer<typeof ZCategory>;
|
|
25
|
+
export declare const ZCreateCategoryPayload: z.ZodObject<{
|
|
26
|
+
owner: z.ZodString;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string | null;
|
|
32
|
+
owner: string;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
owner: string;
|
|
36
|
+
description?: string | null | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export type TCreateCategoryPayload = z.infer<typeof ZCreateCategoryPayload>;
|
|
39
|
+
export declare const ZUpdateCategoryPayload: z.ZodObject<{
|
|
40
|
+
owner: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
name: string;
|
|
45
|
+
description: string | null;
|
|
46
|
+
owner: string;
|
|
47
|
+
}, {
|
|
48
|
+
name: string;
|
|
49
|
+
owner: string;
|
|
50
|
+
description?: string | null | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export type TUpdateCategoryPayload = z.infer<typeof ZUpdateCategoryPayload>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZUpdateCategoryPayload = exports.ZCreateCategoryPayload = exports.ZCategory = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const PocketBase_types_1 = require("./PocketBase.types");
|
|
6
|
+
exports.ZCategory = zod_1.z.object({
|
|
7
|
+
...PocketBase_types_1.ZBaseModel.shape,
|
|
8
|
+
...zod_1.z.object({
|
|
9
|
+
owner: PocketBase_types_1.ZId,
|
|
10
|
+
name: zod_1.z.string(),
|
|
11
|
+
description: PocketBase_types_1.ZNullableString,
|
|
12
|
+
}).shape,
|
|
13
|
+
});
|
|
14
|
+
exports.ZCreateCategoryPayload = zod_1.z.object({
|
|
15
|
+
owner: PocketBase_types_1.ZId,
|
|
16
|
+
name: zod_1.z.string(),
|
|
17
|
+
description: PocketBase_types_1.ZNullableString,
|
|
18
|
+
});
|
|
19
|
+
exports.ZUpdateCategoryPayload = zod_1.z.object({
|
|
20
|
+
owner: PocketBase_types_1.ZId,
|
|
21
|
+
name: zod_1.z.string(),
|
|
22
|
+
description: PocketBase_types_1.ZNullableString,
|
|
23
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ZDailyBalance: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
date: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
5
|
+
balance: z.ZodNumber;
|
|
6
|
+
income: z.ZodNumber;
|
|
7
|
+
expenses: z.ZodNumber;
|
|
8
|
+
owner: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
date: Date;
|
|
12
|
+
owner: string;
|
|
13
|
+
balance: number;
|
|
14
|
+
income: number;
|
|
15
|
+
expenses: number;
|
|
16
|
+
}, {
|
|
17
|
+
id: string;
|
|
18
|
+
date: (string | number | Date) & (string | number | Date | undefined);
|
|
19
|
+
owner: string;
|
|
20
|
+
balance: number;
|
|
21
|
+
income: number;
|
|
22
|
+
expenses: number;
|
|
23
|
+
}>;
|
|
24
|
+
export type TDailyBalance = z.infer<typeof ZDailyBalance>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZDailyBalance = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const Base_type_1 = require("./Base.type");
|
|
6
|
+
const PocketBase_types_1 = require("./PocketBase.types");
|
|
7
|
+
exports.ZDailyBalance = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string(),
|
|
9
|
+
date: Base_type_1.ZDate,
|
|
10
|
+
balance: zod_1.z.number(),
|
|
11
|
+
income: zod_1.z.number(),
|
|
12
|
+
expenses: zod_1.z.number(),
|
|
13
|
+
owner: PocketBase_types_1.ZId,
|
|
14
|
+
});
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZPasswordReset = exports.VerifyMailReturnCodeToMessage = exports.ZVerifyMailReturnCode = exports.EVerifyMailReturnCode = exports.ZSignInPayload = exports.ZSignUpPayload = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const User_type_1 = require("./User.type");
|
|
6
|
-
const Base_type_1 = require("
|
|
6
|
+
const Base_type_1 = require("../Base.type");
|
|
7
7
|
exports.ZSignUpPayload = zod_1.z.object({
|
|
8
8
|
email: Base_type_1.ZEmail,
|
|
9
9
|
password: zod_1.z.string(),
|
|
@@ -4,7 +4,7 @@ exports.ZBudgetProgress = exports.ZDeleteBudgetResponsePayload = exports.ZDelete
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Category_type_1 = require("./Category.type");
|
|
6
6
|
const User_type_1 = require("./User.type");
|
|
7
|
-
const Base_type_1 = require("
|
|
7
|
+
const Base_type_1 = require("../Base.type");
|
|
8
8
|
const ZBudgetAmount = zod_1.z.number().min(0, { message: 'Budget must be positive' });
|
|
9
9
|
exports.ZBudget = zod_1.z.object({
|
|
10
10
|
id: zod_1.z.number(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZDeleteCategoryResponsePayload = exports.ZDeleteCategoryPayload = exports.ZUpdateCategoryPayload = exports.ZCreateCategoryPayload = exports.ZCategory = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const User_type_1 = require("./User.type");
|
|
6
|
-
const Base_type_1 = require("
|
|
6
|
+
const Base_type_1 = require("../Base.type");
|
|
7
7
|
const ZName = zod_1.z.string().max(100, { message: 'Name is too long' });
|
|
8
8
|
exports.ZCategory = zod_1.z.object({
|
|
9
9
|
id: zod_1.z.number(),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZDailyTransaction = exports.EDailyTransactionType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const Base_type_1 = require("
|
|
5
|
+
const Base_type_1 = require("../Base.type");
|
|
6
6
|
var EDailyTransactionType;
|
|
7
7
|
(function (EDailyTransactionType) {
|
|
8
8
|
EDailyTransactionType["INCOME"] = "INCOME";
|
|
@@ -2,7 +2,7 @@
|
|
|
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("
|
|
5
|
+
const Base_type_1 = require("../Base.type");
|
|
6
6
|
exports.ZFile = zod_1.z.object({
|
|
7
7
|
name: zod_1.z.string(),
|
|
8
8
|
size: zod_1.z.number(),
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZDeletePaymentMethodResponsePayload = exports.ZDeletePaymentMethodPayload = exports.ZUpdatePaymentMethodPayload = exports.ZCreatePaymentMethodPayload = exports.ZPaymentMethod = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const User_type_1 = require("./User.type");
|
|
6
|
-
const Base_type_1 = require("
|
|
6
|
+
const Base_type_1 = require("../Base.type");
|
|
7
7
|
const ZName = zod_1.z.string().max(100, { message: 'Name is too long' });
|
|
8
8
|
const ZAddress = zod_1.z.string().max(100, { message: 'Address is too long' });
|
|
9
9
|
const ZProvider = zod_1.z.string().max(100, { message: 'Provider is too long' });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZRole = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const Base_type_1 = require("
|
|
5
|
+
const Base_type_1 = require("../Base.type");
|
|
6
6
|
exports.ZRole = zod_1.z.object({
|
|
7
7
|
id: zod_1.z.number(),
|
|
8
8
|
name: zod_1.z.string(),
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ZStockExchanges: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3
|
+
label: z.ZodString;
|
|
4
|
+
ticker: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
label: string;
|
|
7
|
+
ticker: string;
|
|
8
|
+
}, {
|
|
9
|
+
label: string;
|
|
10
|
+
ticker: string;
|
|
11
|
+
}>>;
|
|
12
|
+
export type TStockExchanges = z.infer<typeof ZStockExchanges>;
|
|
13
|
+
/**
|
|
14
|
+
* Represents a stock exchange table.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ZStockExchangeTable: z.ZodObject<{
|
|
17
|
+
symbol: z.ZodString;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
exchange: z.ZodString;
|
|
20
|
+
country: z.ZodString;
|
|
21
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
symbol: string;
|
|
24
|
+
name: string;
|
|
25
|
+
exchange: string;
|
|
26
|
+
created_at: Date;
|
|
27
|
+
country: string;
|
|
28
|
+
}, {
|
|
29
|
+
symbol: string;
|
|
30
|
+
name: string;
|
|
31
|
+
exchange: string;
|
|
32
|
+
created_at: (string | number | Date) & (string | number | Date | undefined);
|
|
33
|
+
country: string;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Represents the type of the stock exchange table.
|
|
37
|
+
*/
|
|
38
|
+
export type TStockExchangeTable = z.infer<typeof ZStockExchangeTable>;
|
|
39
|
+
/**
|
|
40
|
+
* Represents a stock position table.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* This type defines the structure of a stock position table, including properties such as id, owner, bought_at, exchange, isin, buy_in, and currency.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ZStockPositionTable: z.ZodObject<{
|
|
46
|
+
id: z.ZodNumber;
|
|
47
|
+
owner: z.ZodString;
|
|
48
|
+
bought_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
49
|
+
exchange: z.ZodString;
|
|
50
|
+
isin: z.ZodString;
|
|
51
|
+
buy_in: z.ZodNumber;
|
|
52
|
+
currency: z.ZodString;
|
|
53
|
+
quantity: z.ZodNumber;
|
|
54
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
id: number;
|
|
57
|
+
currency: string;
|
|
58
|
+
owner: string;
|
|
59
|
+
exchange: string;
|
|
60
|
+
isin: string;
|
|
61
|
+
bought_at: Date;
|
|
62
|
+
buy_in: number;
|
|
63
|
+
quantity: number;
|
|
64
|
+
created_at: Date;
|
|
65
|
+
}, {
|
|
66
|
+
id: number;
|
|
67
|
+
currency: string;
|
|
68
|
+
owner: string;
|
|
69
|
+
exchange: string;
|
|
70
|
+
isin: string;
|
|
71
|
+
bought_at: (string | number | Date) & (string | number | Date | undefined);
|
|
72
|
+
buy_in: number;
|
|
73
|
+
quantity: number;
|
|
74
|
+
created_at: (string | number | Date) & (string | number | Date | undefined);
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Represents the type of the stock position table.
|
|
78
|
+
*/
|
|
79
|
+
export type TStockPositionTable = z.infer<typeof ZStockPositionTable>;
|
|
80
|
+
/**
|
|
81
|
+
* Represents a stock position table with resolved joins.
|
|
82
|
+
*/
|
|
83
|
+
export declare const ZMaterializedStockPositionTable: z.ZodObject<{
|
|
84
|
+
id: z.ZodNumber;
|
|
85
|
+
owner: z.ZodString;
|
|
86
|
+
bought_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
87
|
+
exchange: z.ZodObject<{
|
|
88
|
+
symbol: z.ZodString;
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
exchange: z.ZodString;
|
|
91
|
+
country: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
symbol: string;
|
|
94
|
+
name: string;
|
|
95
|
+
exchange: string;
|
|
96
|
+
country: string;
|
|
97
|
+
}, {
|
|
98
|
+
symbol: string;
|
|
99
|
+
name: string;
|
|
100
|
+
exchange: string;
|
|
101
|
+
country: string;
|
|
102
|
+
}>;
|
|
103
|
+
isin: z.ZodString;
|
|
104
|
+
buy_in: z.ZodNumber;
|
|
105
|
+
currency: z.ZodString;
|
|
106
|
+
quantity: z.ZodNumber;
|
|
107
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
id: number;
|
|
110
|
+
currency: string;
|
|
111
|
+
owner: string;
|
|
112
|
+
exchange: {
|
|
113
|
+
symbol: string;
|
|
114
|
+
name: string;
|
|
115
|
+
exchange: string;
|
|
116
|
+
country: string;
|
|
117
|
+
};
|
|
118
|
+
isin: string;
|
|
119
|
+
bought_at: Date;
|
|
120
|
+
buy_in: number;
|
|
121
|
+
quantity: number;
|
|
122
|
+
created_at: Date;
|
|
123
|
+
}, {
|
|
124
|
+
id: number;
|
|
125
|
+
currency: string;
|
|
126
|
+
owner: string;
|
|
127
|
+
exchange: {
|
|
128
|
+
symbol: string;
|
|
129
|
+
name: string;
|
|
130
|
+
exchange: string;
|
|
131
|
+
country: string;
|
|
132
|
+
};
|
|
133
|
+
isin: string;
|
|
134
|
+
bought_at: (string | number | Date) & (string | number | Date | undefined);
|
|
135
|
+
buy_in: number;
|
|
136
|
+
quantity: number;
|
|
137
|
+
created_at: (string | number | Date) & (string | number | Date | undefined);
|
|
138
|
+
}>;
|
|
139
|
+
/**
|
|
140
|
+
* Represents the type of a stock position table with resolved join.
|
|
141
|
+
*/
|
|
142
|
+
export type TMaterializedStockPositionTable = z.infer<typeof ZMaterializedStockPositionTable>;
|
|
143
|
+
/**
|
|
144
|
+
* Represents the payload for opening a position.
|
|
145
|
+
*/
|
|
146
|
+
export declare const ZOpenPositionPayload: z.ZodObject<{
|
|
147
|
+
owner: z.ZodString;
|
|
148
|
+
bought_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
149
|
+
exchange: z.ZodString;
|
|
150
|
+
isin: z.ZodString;
|
|
151
|
+
buy_in: z.ZodNumber;
|
|
152
|
+
currency: z.ZodString;
|
|
153
|
+
quantity: z.ZodNumber;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
currency: string;
|
|
156
|
+
owner: string;
|
|
157
|
+
exchange: string;
|
|
158
|
+
isin: string;
|
|
159
|
+
bought_at: Date;
|
|
160
|
+
buy_in: number;
|
|
161
|
+
quantity: number;
|
|
162
|
+
}, {
|
|
163
|
+
currency: string;
|
|
164
|
+
owner: string;
|
|
165
|
+
exchange: string;
|
|
166
|
+
isin: string;
|
|
167
|
+
bought_at: (string | number | Date) & (string | number | Date | undefined);
|
|
168
|
+
buy_in: number;
|
|
169
|
+
quantity: number;
|
|
170
|
+
}>;
|
|
171
|
+
/**
|
|
172
|
+
* Represents the type of the payload for opening a position.
|
|
173
|
+
*/
|
|
174
|
+
export type TOpenPositionPayload = z.infer<typeof ZOpenPositionPayload>;
|
|
175
|
+
/**
|
|
176
|
+
* Represents the payload for updating a position.
|
|
177
|
+
*/
|
|
178
|
+
export declare const ZUpdatePositionPayload: z.ZodObject<{
|
|
179
|
+
id: z.ZodNumber;
|
|
180
|
+
bought_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
181
|
+
exchange: z.ZodString;
|
|
182
|
+
isin: z.ZodString;
|
|
183
|
+
buy_in: z.ZodNumber;
|
|
184
|
+
quantity: z.ZodNumber;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
id: number;
|
|
187
|
+
exchange: string;
|
|
188
|
+
isin: string;
|
|
189
|
+
bought_at: Date;
|
|
190
|
+
buy_in: number;
|
|
191
|
+
quantity: number;
|
|
192
|
+
}, {
|
|
193
|
+
id: number;
|
|
194
|
+
exchange: string;
|
|
195
|
+
isin: string;
|
|
196
|
+
bought_at: (string | number | Date) & (string | number | Date | undefined);
|
|
197
|
+
buy_in: number;
|
|
198
|
+
quantity: number;
|
|
199
|
+
}>;
|
|
200
|
+
/**
|
|
201
|
+
* Represents the payload for updating a position.
|
|
202
|
+
*/
|
|
203
|
+
export type TUpdatePositionPayload = z.infer<typeof ZUpdatePositionPayload>;
|
|
204
|
+
/**
|
|
205
|
+
* Represents the payload for closing a position.
|
|
206
|
+
*/
|
|
207
|
+
export declare const ZClosePositionPayload: z.ZodObject<{
|
|
208
|
+
id: z.ZodNumber;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
id: number;
|
|
211
|
+
}, {
|
|
212
|
+
id: number;
|
|
213
|
+
}>;
|
|
214
|
+
/**
|
|
215
|
+
* Represents the payload for closing a position.
|
|
216
|
+
*/
|
|
217
|
+
export type TClosePositionPayload = z.infer<typeof ZClosePositionPayload>;
|
|
218
|
+
export declare const ZStockPosition: z.ZodObject<{
|
|
219
|
+
id: z.ZodNumber;
|
|
220
|
+
owner: z.ZodString;
|
|
221
|
+
bought_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
222
|
+
exchange: z.ZodObject<{
|
|
223
|
+
symbol: z.ZodString;
|
|
224
|
+
name: z.ZodString;
|
|
225
|
+
exchange: z.ZodString;
|
|
226
|
+
country: z.ZodString;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
symbol: string;
|
|
229
|
+
name: string;
|
|
230
|
+
exchange: string;
|
|
231
|
+
country: string;
|
|
232
|
+
}, {
|
|
233
|
+
symbol: string;
|
|
234
|
+
name: string;
|
|
235
|
+
exchange: string;
|
|
236
|
+
country: string;
|
|
237
|
+
}>;
|
|
238
|
+
isin: z.ZodString;
|
|
239
|
+
buy_in: z.ZodNumber;
|
|
240
|
+
currency: z.ZodString;
|
|
241
|
+
quantity: z.ZodNumber;
|
|
242
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
243
|
+
name: z.ZodString;
|
|
244
|
+
logo: z.ZodString;
|
|
245
|
+
volume: z.ZodNumber;
|
|
246
|
+
quote: z.ZodObject<{
|
|
247
|
+
currency: z.ZodString;
|
|
248
|
+
exchange: z.ZodString;
|
|
249
|
+
date: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
250
|
+
datetime: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
251
|
+
price: z.ZodNumber;
|
|
252
|
+
isin: z.ZodString;
|
|
253
|
+
cachedAt: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
currency: string;
|
|
256
|
+
date: Date;
|
|
257
|
+
datetime: Date;
|
|
258
|
+
exchange: string;
|
|
259
|
+
price: number;
|
|
260
|
+
isin: string;
|
|
261
|
+
cachedAt: Date;
|
|
262
|
+
}, {
|
|
263
|
+
currency: string;
|
|
264
|
+
date: (string | number | Date) & (string | number | Date | undefined);
|
|
265
|
+
datetime: (string | number | Date) & (string | number | Date | undefined);
|
|
266
|
+
exchange: string;
|
|
267
|
+
price: number;
|
|
268
|
+
isin: string;
|
|
269
|
+
cachedAt: (string | number | Date) & (string | number | Date | undefined);
|
|
270
|
+
}>;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
id: number;
|
|
273
|
+
name: string;
|
|
274
|
+
currency: string;
|
|
275
|
+
owner: string;
|
|
276
|
+
exchange: {
|
|
277
|
+
symbol: string;
|
|
278
|
+
name: string;
|
|
279
|
+
exchange: string;
|
|
280
|
+
country: string;
|
|
281
|
+
};
|
|
282
|
+
isin: string;
|
|
283
|
+
logo: string;
|
|
284
|
+
quote: {
|
|
285
|
+
currency: string;
|
|
286
|
+
date: Date;
|
|
287
|
+
datetime: Date;
|
|
288
|
+
exchange: string;
|
|
289
|
+
price: number;
|
|
290
|
+
isin: string;
|
|
291
|
+
cachedAt: Date;
|
|
292
|
+
};
|
|
293
|
+
bought_at: Date;
|
|
294
|
+
buy_in: number;
|
|
295
|
+
quantity: number;
|
|
296
|
+
volume: number;
|
|
297
|
+
created_at: Date;
|
|
298
|
+
}, {
|
|
299
|
+
id: number;
|
|
300
|
+
name: string;
|
|
301
|
+
currency: string;
|
|
302
|
+
owner: string;
|
|
303
|
+
exchange: {
|
|
304
|
+
symbol: string;
|
|
305
|
+
name: string;
|
|
306
|
+
exchange: string;
|
|
307
|
+
country: string;
|
|
308
|
+
};
|
|
309
|
+
isin: string;
|
|
310
|
+
logo: string;
|
|
311
|
+
quote: {
|
|
312
|
+
currency: string;
|
|
313
|
+
date: (string | number | Date) & (string | number | Date | undefined);
|
|
314
|
+
datetime: (string | number | Date) & (string | number | Date | undefined);
|
|
315
|
+
exchange: string;
|
|
316
|
+
price: number;
|
|
317
|
+
isin: string;
|
|
318
|
+
cachedAt: (string | number | Date) & (string | number | Date | undefined);
|
|
319
|
+
};
|
|
320
|
+
bought_at: (string | number | Date) & (string | number | Date | undefined);
|
|
321
|
+
buy_in: number;
|
|
322
|
+
quantity: number;
|
|
323
|
+
volume: number;
|
|
324
|
+
created_at: (string | number | Date) & (string | number | Date | undefined);
|
|
325
|
+
}>;
|
|
326
|
+
export type TStockPosition = z.infer<typeof ZStockPosition>;
|