@budgetbuddyde/types 1.0.25 → 1.0.26

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.
@@ -1,4 +1,8 @@
1
1
  import { z } from 'zod';
2
+ export declare const ZIsin: z.ZodString;
3
+ export type TIsin = z.infer<typeof ZIsin>;
4
+ export declare const ZWKN: z.ZodString;
5
+ export type TWKN = z.infer<typeof ZWKN>;
2
6
  export declare const ZCurrency: z.ZodString;
3
7
  export type TCurrency = z.infer<typeof ZCurrency>;
4
8
  export declare const ZTimeframe: z.ZodEnum<["1d", "1m", "3m", "1y", "5y", "ytd"]>;
@@ -2996,3 +3000,111 @@ export declare const ZUpdateStockPositionPayload: z.ZodObject<{
2996
3000
  quantity: number;
2997
3001
  }>;
2998
3002
  export type TUpdateStockPositionPayload = z.infer<typeof ZUpdateStockPositionPayload>;
3003
+ export declare const ZRelatedStock: z.ZodObject<{
3004
+ asset: z.ZodObject<{
3005
+ _id: z.ZodObject<{
3006
+ identifier: z.ZodString;
3007
+ assetType: z.ZodString;
3008
+ }, "strip", z.ZodTypeAny, {
3009
+ identifier: string;
3010
+ assetType: string;
3011
+ }, {
3012
+ identifier: string;
3013
+ assetType: string;
3014
+ }>;
3015
+ assetType: z.ZodString;
3016
+ name: z.ZodString;
3017
+ logo: z.ZodString;
3018
+ security: z.ZodObject<{
3019
+ website: z.ZodString;
3020
+ type: z.ZodString;
3021
+ wkn: z.ZodString;
3022
+ isin: z.ZodString;
3023
+ etfDomicile: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3024
+ etfCompany: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3025
+ }, "strip", z.ZodTypeAny, {
3026
+ type: string;
3027
+ isin: string;
3028
+ website: string;
3029
+ wkn: string;
3030
+ etfDomicile: string | null;
3031
+ etfCompany: string | null;
3032
+ }, {
3033
+ type: string;
3034
+ isin: string;
3035
+ website: string;
3036
+ wkn: string;
3037
+ etfDomicile?: string | null | undefined;
3038
+ etfCompany?: string | null | undefined;
3039
+ }>;
3040
+ }, "strip", z.ZodTypeAny, {
3041
+ name: string;
3042
+ _id: {
3043
+ identifier: string;
3044
+ assetType: string;
3045
+ };
3046
+ assetType: string;
3047
+ logo: string;
3048
+ security: {
3049
+ type: string;
3050
+ isin: string;
3051
+ website: string;
3052
+ wkn: string;
3053
+ etfDomicile: string | null;
3054
+ etfCompany: string | null;
3055
+ };
3056
+ }, {
3057
+ name: string;
3058
+ _id: {
3059
+ identifier: string;
3060
+ assetType: string;
3061
+ };
3062
+ assetType: string;
3063
+ logo: string;
3064
+ security: {
3065
+ type: string;
3066
+ isin: string;
3067
+ website: string;
3068
+ wkn: string;
3069
+ etfDomicile?: string | null | undefined;
3070
+ etfCompany?: string | null | undefined;
3071
+ };
3072
+ }>;
3073
+ }, "strip", z.ZodTypeAny, {
3074
+ asset: {
3075
+ name: string;
3076
+ _id: {
3077
+ identifier: string;
3078
+ assetType: string;
3079
+ };
3080
+ assetType: string;
3081
+ logo: string;
3082
+ security: {
3083
+ type: string;
3084
+ isin: string;
3085
+ website: string;
3086
+ wkn: string;
3087
+ etfDomicile: string | null;
3088
+ etfCompany: string | null;
3089
+ };
3090
+ };
3091
+ }, {
3092
+ asset: {
3093
+ name: string;
3094
+ _id: {
3095
+ identifier: string;
3096
+ assetType: string;
3097
+ };
3098
+ assetType: string;
3099
+ logo: string;
3100
+ security: {
3101
+ type: string;
3102
+ isin: string;
3103
+ website: string;
3104
+ wkn: string;
3105
+ etfDomicile?: string | null | undefined;
3106
+ etfCompany?: string | null | undefined;
3107
+ };
3108
+ };
3109
+ }>;
3110
+ export type TRelatedStock = z.infer<typeof ZRelatedStock>;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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 = void 0;
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;
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().length(12, { message: 'ISIN must be 12 characters long' });
8
+ exports.ZWKN = zod_1.z.string().length(6, { message: 'WKN must be 6 characters long' });
7
9
  exports.ZCurrency = zod_1.z.string().max(3, { message: 'Currency must be 3 characters long' });
8
10
  exports.ZTimeframe = zod_1.z.enum(['1d', '1m', '3m', '1y', '5y', 'ytd']);
9
11
  exports.ZStockType = zod_1.z.enum(['Aktie', 'ETF']).or(zod_1.z.string());
@@ -383,3 +385,22 @@ exports.ZUpdateStockPositionPayload = zod_1.z.object({
383
385
  currency: exports.ZCurrency,
384
386
  quantity: zod_1.z.number(),
385
387
  });
388
+ exports.ZRelatedStock = zod_1.z.object({
389
+ asset: zod_1.z.object({
390
+ _id: zod_1.z.object({
391
+ identifier: exports.ZIsin,
392
+ assetType: zod_1.z.string(),
393
+ }),
394
+ assetType: zod_1.z.string(),
395
+ name: zod_1.z.string(),
396
+ logo: zod_1.z.string().url(),
397
+ security: zod_1.z.object({
398
+ website: zod_1.z.string().url(),
399
+ type: zod_1.z.string(),
400
+ wkn: exports.ZWKN,
401
+ isin: exports.ZIsin,
402
+ etfDomicile: zod_1.z.string().nullable().default(null),
403
+ etfCompany: zod_1.z.string().nullable().default(null),
404
+ }),
405
+ }),
406
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budgetbuddyde/types",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "description": "Budget Buddy Typescript Types",