@budgetbuddyde/types 1.0.26 → 1.0.27
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/Stocks/Stock.types.d.ts +146 -10
- package/lib/Stocks/Stock.types.js +16 -5
- package/package.json +1 -1
|
@@ -3015,7 +3015,7 @@ export declare const ZRelatedStock: z.ZodObject<{
|
|
|
3015
3015
|
assetType: z.ZodString;
|
|
3016
3016
|
name: z.ZodString;
|
|
3017
3017
|
logo: z.ZodString;
|
|
3018
|
-
security: z.ZodObject<{
|
|
3018
|
+
security: z.ZodOptional<z.ZodObject<{
|
|
3019
3019
|
website: z.ZodString;
|
|
3020
3020
|
type: z.ZodString;
|
|
3021
3021
|
wkn: z.ZodString;
|
|
@@ -3036,7 +3036,7 @@ export declare const ZRelatedStock: z.ZodObject<{
|
|
|
3036
3036
|
wkn: string;
|
|
3037
3037
|
etfDomicile?: string | null | undefined;
|
|
3038
3038
|
etfCompany?: string | null | undefined;
|
|
3039
|
-
}
|
|
3039
|
+
}>>;
|
|
3040
3040
|
}, "strip", z.ZodTypeAny, {
|
|
3041
3041
|
name: string;
|
|
3042
3042
|
_id: {
|
|
@@ -3045,14 +3045,14 @@ export declare const ZRelatedStock: z.ZodObject<{
|
|
|
3045
3045
|
};
|
|
3046
3046
|
assetType: string;
|
|
3047
3047
|
logo: string;
|
|
3048
|
-
security
|
|
3048
|
+
security?: {
|
|
3049
3049
|
type: string;
|
|
3050
3050
|
isin: string;
|
|
3051
3051
|
website: string;
|
|
3052
3052
|
wkn: string;
|
|
3053
3053
|
etfDomicile: string | null;
|
|
3054
3054
|
etfCompany: string | null;
|
|
3055
|
-
};
|
|
3055
|
+
} | undefined;
|
|
3056
3056
|
}, {
|
|
3057
3057
|
name: string;
|
|
3058
3058
|
_id: {
|
|
@@ -3061,14 +3061,14 @@ export declare const ZRelatedStock: z.ZodObject<{
|
|
|
3061
3061
|
};
|
|
3062
3062
|
assetType: string;
|
|
3063
3063
|
logo: string;
|
|
3064
|
-
security
|
|
3064
|
+
security?: {
|
|
3065
3065
|
type: string;
|
|
3066
3066
|
isin: string;
|
|
3067
3067
|
website: string;
|
|
3068
3068
|
wkn: string;
|
|
3069
3069
|
etfDomicile?: string | null | undefined;
|
|
3070
3070
|
etfCompany?: string | null | undefined;
|
|
3071
|
-
};
|
|
3071
|
+
} | undefined;
|
|
3072
3072
|
}>;
|
|
3073
3073
|
}, "strip", z.ZodTypeAny, {
|
|
3074
3074
|
asset: {
|
|
@@ -3079,14 +3079,14 @@ export declare const ZRelatedStock: z.ZodObject<{
|
|
|
3079
3079
|
};
|
|
3080
3080
|
assetType: string;
|
|
3081
3081
|
logo: string;
|
|
3082
|
-
security
|
|
3082
|
+
security?: {
|
|
3083
3083
|
type: string;
|
|
3084
3084
|
isin: string;
|
|
3085
3085
|
website: string;
|
|
3086
3086
|
wkn: string;
|
|
3087
3087
|
etfDomicile: string | null;
|
|
3088
3088
|
etfCompany: string | null;
|
|
3089
|
-
};
|
|
3089
|
+
} | undefined;
|
|
3090
3090
|
};
|
|
3091
3091
|
}, {
|
|
3092
3092
|
asset: {
|
|
@@ -3097,14 +3097,150 @@ export declare const ZRelatedStock: z.ZodObject<{
|
|
|
3097
3097
|
};
|
|
3098
3098
|
assetType: string;
|
|
3099
3099
|
logo: string;
|
|
3100
|
-
security
|
|
3100
|
+
security?: {
|
|
3101
3101
|
type: string;
|
|
3102
3102
|
isin: string;
|
|
3103
3103
|
website: string;
|
|
3104
3104
|
wkn: string;
|
|
3105
3105
|
etfDomicile?: string | null | undefined;
|
|
3106
3106
|
etfCompany?: string | null | undefined;
|
|
3107
|
-
};
|
|
3107
|
+
} | undefined;
|
|
3108
3108
|
};
|
|
3109
3109
|
}>;
|
|
3110
3110
|
export type TRelatedStock = z.infer<typeof ZRelatedStock>;
|
|
3111
|
+
export declare const ZRelatedStockWithQuotes: z.ZodObject<{
|
|
3112
|
+
quotes: z.ZodArray<z.ZodObject<{
|
|
3113
|
+
date: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
|
|
3114
|
+
price: z.ZodNumber;
|
|
3115
|
+
exchange: z.ZodString;
|
|
3116
|
+
currency: z.ZodString;
|
|
3117
|
+
}, "strip", z.ZodTypeAny, {
|
|
3118
|
+
currency: string;
|
|
3119
|
+
date: Date;
|
|
3120
|
+
exchange: string;
|
|
3121
|
+
price: number;
|
|
3122
|
+
}, {
|
|
3123
|
+
currency: string;
|
|
3124
|
+
date: (string | number | Date) & (string | number | Date | undefined);
|
|
3125
|
+
exchange: string;
|
|
3126
|
+
price: number;
|
|
3127
|
+
}>, "many">;
|
|
3128
|
+
asset: z.ZodObject<{
|
|
3129
|
+
_id: z.ZodObject<{
|
|
3130
|
+
identifier: z.ZodString;
|
|
3131
|
+
assetType: z.ZodString;
|
|
3132
|
+
}, "strip", z.ZodTypeAny, {
|
|
3133
|
+
identifier: string;
|
|
3134
|
+
assetType: string;
|
|
3135
|
+
}, {
|
|
3136
|
+
identifier: string;
|
|
3137
|
+
assetType: string;
|
|
3138
|
+
}>;
|
|
3139
|
+
assetType: z.ZodString;
|
|
3140
|
+
name: z.ZodString;
|
|
3141
|
+
logo: z.ZodString;
|
|
3142
|
+
security: z.ZodOptional<z.ZodObject<{
|
|
3143
|
+
website: z.ZodString;
|
|
3144
|
+
type: z.ZodString;
|
|
3145
|
+
wkn: z.ZodString;
|
|
3146
|
+
isin: z.ZodString;
|
|
3147
|
+
etfDomicile: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
3148
|
+
etfCompany: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
3149
|
+
}, "strip", z.ZodTypeAny, {
|
|
3150
|
+
type: string;
|
|
3151
|
+
isin: string;
|
|
3152
|
+
website: string;
|
|
3153
|
+
wkn: string;
|
|
3154
|
+
etfDomicile: string | null;
|
|
3155
|
+
etfCompany: string | null;
|
|
3156
|
+
}, {
|
|
3157
|
+
type: string;
|
|
3158
|
+
isin: string;
|
|
3159
|
+
website: string;
|
|
3160
|
+
wkn: string;
|
|
3161
|
+
etfDomicile?: string | null | undefined;
|
|
3162
|
+
etfCompany?: string | null | undefined;
|
|
3163
|
+
}>>;
|
|
3164
|
+
}, "strip", z.ZodTypeAny, {
|
|
3165
|
+
name: string;
|
|
3166
|
+
_id: {
|
|
3167
|
+
identifier: string;
|
|
3168
|
+
assetType: string;
|
|
3169
|
+
};
|
|
3170
|
+
assetType: string;
|
|
3171
|
+
logo: string;
|
|
3172
|
+
security?: {
|
|
3173
|
+
type: string;
|
|
3174
|
+
isin: string;
|
|
3175
|
+
website: string;
|
|
3176
|
+
wkn: string;
|
|
3177
|
+
etfDomicile: string | null;
|
|
3178
|
+
etfCompany: string | null;
|
|
3179
|
+
} | undefined;
|
|
3180
|
+
}, {
|
|
3181
|
+
name: string;
|
|
3182
|
+
_id: {
|
|
3183
|
+
identifier: string;
|
|
3184
|
+
assetType: string;
|
|
3185
|
+
};
|
|
3186
|
+
assetType: string;
|
|
3187
|
+
logo: string;
|
|
3188
|
+
security?: {
|
|
3189
|
+
type: string;
|
|
3190
|
+
isin: string;
|
|
3191
|
+
website: string;
|
|
3192
|
+
wkn: string;
|
|
3193
|
+
etfDomicile?: string | null | undefined;
|
|
3194
|
+
etfCompany?: string | null | undefined;
|
|
3195
|
+
} | undefined;
|
|
3196
|
+
}>;
|
|
3197
|
+
}, "strip", z.ZodTypeAny, {
|
|
3198
|
+
quotes: {
|
|
3199
|
+
currency: string;
|
|
3200
|
+
date: Date;
|
|
3201
|
+
exchange: string;
|
|
3202
|
+
price: number;
|
|
3203
|
+
}[];
|
|
3204
|
+
asset: {
|
|
3205
|
+
name: string;
|
|
3206
|
+
_id: {
|
|
3207
|
+
identifier: string;
|
|
3208
|
+
assetType: string;
|
|
3209
|
+
};
|
|
3210
|
+
assetType: string;
|
|
3211
|
+
logo: string;
|
|
3212
|
+
security?: {
|
|
3213
|
+
type: string;
|
|
3214
|
+
isin: string;
|
|
3215
|
+
website: string;
|
|
3216
|
+
wkn: string;
|
|
3217
|
+
etfDomicile: string | null;
|
|
3218
|
+
etfCompany: string | null;
|
|
3219
|
+
} | undefined;
|
|
3220
|
+
};
|
|
3221
|
+
}, {
|
|
3222
|
+
quotes: {
|
|
3223
|
+
currency: string;
|
|
3224
|
+
date: (string | number | Date) & (string | number | Date | undefined);
|
|
3225
|
+
exchange: string;
|
|
3226
|
+
price: number;
|
|
3227
|
+
}[];
|
|
3228
|
+
asset: {
|
|
3229
|
+
name: string;
|
|
3230
|
+
_id: {
|
|
3231
|
+
identifier: string;
|
|
3232
|
+
assetType: string;
|
|
3233
|
+
};
|
|
3234
|
+
assetType: string;
|
|
3235
|
+
logo: string;
|
|
3236
|
+
security?: {
|
|
3237
|
+
type: string;
|
|
3238
|
+
isin: string;
|
|
3239
|
+
website: string;
|
|
3240
|
+
wkn: string;
|
|
3241
|
+
etfDomicile?: string | null | undefined;
|
|
3242
|
+
etfCompany?: string | null | undefined;
|
|
3243
|
+
} | undefined;
|
|
3244
|
+
};
|
|
3245
|
+
}>;
|
|
3246
|
+
export type TRelatedStockWithQuotes = z.infer<typeof ZRelatedStockWithQuotes>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZRelatedStock = exports.ZUpdateStockPositionPayload = exports.ZCreateStockPositionPayload = exports.ZStockPositionWithQuote = exports.ZStockPosition = exports.ZStockExchange = exports.ZAssetDetails = exports.ZDividendDetailList = exports.ZDividendDetails = exports.ZDividend = exports.ZAssetChartQuote = exports.ZAssetSearchResult = exports.ZAsset = exports.ZStockQuote = exports.ZStockType = exports.ZTimeframe = exports.ZCurrency = exports.ZWKN = exports.ZIsin = void 0;
|
|
3
|
+
exports.ZRelatedStockWithQuotes = exports.ZRelatedStock = exports.ZUpdateStockPositionPayload = exports.ZCreateStockPositionPayload = exports.ZStockPositionWithQuote = exports.ZStockPosition = exports.ZStockExchange = exports.ZAssetDetails = exports.ZDividendDetailList = exports.ZDividendDetails = exports.ZDividend = exports.ZAssetChartQuote = exports.ZAssetSearchResult = exports.ZAsset = exports.ZStockQuote = exports.ZStockType = exports.ZTimeframe = exports.ZCurrency = exports.ZWKN = exports.ZIsin = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const PocketBase_types_1 = require("../PocketBase.types");
|
|
6
6
|
const Base_type_1 = require("../Base.type");
|
|
7
|
-
exports.ZIsin = zod_1.z.string().
|
|
8
|
-
exports.ZWKN = zod_1.z.string().
|
|
7
|
+
exports.ZIsin = zod_1.z.string().max(12, { message: 'ISIN can only be 12 characters long' });
|
|
8
|
+
exports.ZWKN = zod_1.z.string().max(6, { message: 'WKN can only be 6 characters long' });
|
|
9
9
|
exports.ZCurrency = zod_1.z.string().max(3, { message: 'Currency must be 3 characters long' });
|
|
10
10
|
exports.ZTimeframe = zod_1.z.enum(['1d', '1m', '3m', '1y', '5y', 'ytd']);
|
|
11
11
|
exports.ZStockType = zod_1.z.enum(['Aktie', 'ETF']).or(zod_1.z.string());
|
|
@@ -394,13 +394,24 @@ exports.ZRelatedStock = zod_1.z.object({
|
|
|
394
394
|
assetType: zod_1.z.string(),
|
|
395
395
|
name: zod_1.z.string(),
|
|
396
396
|
logo: zod_1.z.string().url(),
|
|
397
|
-
security: zod_1.z
|
|
397
|
+
security: zod_1.z
|
|
398
|
+
.object({
|
|
398
399
|
website: zod_1.z.string().url(),
|
|
399
400
|
type: zod_1.z.string(),
|
|
400
401
|
wkn: exports.ZWKN,
|
|
401
402
|
isin: exports.ZIsin,
|
|
402
403
|
etfDomicile: zod_1.z.string().nullable().default(null),
|
|
403
404
|
etfCompany: zod_1.z.string().nullable().default(null),
|
|
404
|
-
})
|
|
405
|
+
})
|
|
406
|
+
.optional(),
|
|
405
407
|
}),
|
|
406
408
|
});
|
|
409
|
+
exports.ZRelatedStockWithQuotes = zod_1.z.object({
|
|
410
|
+
...exports.ZRelatedStock.shape,
|
|
411
|
+
quotes: zod_1.z.array(zod_1.z.object({
|
|
412
|
+
date: Base_type_1.ZDate,
|
|
413
|
+
price: zod_1.z.number(),
|
|
414
|
+
exchange: zod_1.z.string(),
|
|
415
|
+
currency: exports.ZCurrency,
|
|
416
|
+
})),
|
|
417
|
+
});
|