@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.
Files changed (48) hide show
  1. package/lib/ApiResponse.type.d.ts +0 -3
  2. package/lib/Budget.types.d.ts +114 -0
  3. package/lib/Budget.types.js +27 -0
  4. package/lib/Category.types.d.ts +52 -0
  5. package/lib/Category.types.js +23 -0
  6. package/lib/DailyBalance.types.d.ts +24 -0
  7. package/lib/DailyBalance.types.js +14 -0
  8. package/lib/{Auth.type.js → Deprecated/Auth.type.js} +1 -1
  9. package/lib/{Budget.type.js → Deprecated/Budget.type.js} +1 -1
  10. package/lib/{Category.type.js → Deprecated/Category.type.js} +1 -1
  11. package/lib/{DailyTransaction.type.js → Deprecated/DailyTransaction.type.js} +1 -1
  12. package/lib/{File.type.js → Deprecated/File.type.js} +1 -1
  13. package/lib/{PaymentMethod.type.js → Deprecated/PaymentMethod.type.js} +1 -1
  14. package/lib/{Role.type.js → Deprecated/Role.type.js} +1 -1
  15. package/lib/Deprecated/Stock.types.d.ts +326 -0
  16. package/lib/Deprecated/Stock.types.js +110 -0
  17. package/lib/{Subscription.type.js → Deprecated/Subscription.type.js} +1 -1
  18. package/lib/{Transaction.type.js → Deprecated/Transaction.type.js} +1 -1
  19. package/lib/{User.type.js → Deprecated/User.type.js} +1 -1
  20. package/lib/MonthlyBalance.types.d.ts +24 -0
  21. package/lib/MonthlyBalance.types.js +14 -0
  22. package/lib/PaymentMethod.types.d.ts +70 -0
  23. package/lib/PaymentMethod.types.js +29 -0
  24. package/lib/PocketBase.types.d.ts +22 -0
  25. package/lib/PocketBase.types.js +19 -0
  26. package/lib/{Stock.types.d.ts → Stocks/Stock.types.d.ts} +494 -489
  27. package/lib/{Stock.types.js → Stocks/Stock.types.js} +85 -126
  28. package/lib/Stocks/index.d.ts +1 -0
  29. package/lib/Stocks/index.js +17 -0
  30. package/lib/Subscription.types.d.ts +233 -0
  31. package/lib/Subscription.types.js +46 -0
  32. package/lib/Transaction.types.d.ts +227 -0
  33. package/lib/Transaction.types.js +45 -0
  34. package/lib/User.types.d.ts +36 -0
  35. package/lib/User.types.js +19 -0
  36. package/lib/index.d.ts +10 -11
  37. package/lib/index.js +10 -11
  38. package/package.json +1 -1
  39. package/lib/{Auth.type.d.ts → Deprecated/Auth.type.d.ts} +12 -12
  40. package/lib/{Budget.type.d.ts → Deprecated/Budget.type.d.ts} +107 -107
  41. package/lib/{Category.type.d.ts → Deprecated/Category.type.d.ts} +30 -30
  42. package/lib/{DailyTransaction.type.d.ts → Deprecated/DailyTransaction.type.d.ts} +0 -0
  43. package/lib/{File.type.d.ts → Deprecated/File.type.d.ts} +0 -0
  44. package/lib/{PaymentMethod.type.d.ts → Deprecated/PaymentMethod.type.d.ts} +30 -30
  45. package/lib/{Role.type.d.ts → Deprecated/Role.type.d.ts} +2 -2
  46. package/lib/{Subscription.type.d.ts → Deprecated/Subscription.type.d.ts} +124 -124
  47. package/lib/{Transaction.type.d.ts → Deprecated/Transaction.type.d.ts} +126 -126
  48. package/lib/{User.type.d.ts → Deprecated/User.type.d.ts} +6 -6
@@ -1,15 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZAssetDetails = exports.ZStockPosition = exports.ZClosePositionPayload = exports.ZUpdatePositionPayload = exports.ZOpenPositionPayload = exports.ZMaterializedStockPositionTable = exports.ZStockPositionTable = exports.ZStockExchangeTable = exports.ZStockQuote = exports.ZDividendDetailList = exports.ZDividendDetails = exports.ZDividend = exports.ZAssetChartQuote = exports.ZAssetSearchResult = exports.ZAsset = exports.ZStockExchanges = exports.ZStockType = exports.ZTimeframe = exports.ZCurrency = void 0;
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;
4
4
  const zod_1 = require("zod");
5
- const Base_type_1 = require("./Base.type");
6
- // Base
5
+ const PocketBase_types_1 = require("../PocketBase.types");
6
+ const Base_type_1 = require("../Base.type");
7
7
  exports.ZCurrency = zod_1.z.string().max(3, { message: 'Currency must be 3 characters long' });
8
8
  exports.ZTimeframe = zod_1.z.enum(['1d', '1m', '3m', '1y', '5y', 'ytd']);
9
9
  exports.ZStockType = zod_1.z.enum(['Aktie', 'ETF']).or(zod_1.z.string());
10
- // Exchanges
11
- exports.ZStockExchanges = zod_1.z.record(zod_1.z.string(), zod_1.z.object({ label: zod_1.z.string(), ticker: zod_1.z.string() }));
12
- // Assets
10
+ /**
11
+ * Stock API Types
12
+ */
13
+ exports.ZStockQuote = zod_1.z.object({
14
+ currency: zod_1.z.string().max(3),
15
+ exchange: zod_1.z.string().max(100),
16
+ date: Base_type_1.ZDate,
17
+ datetime: Base_type_1.ZDate,
18
+ price: zod_1.z.number(),
19
+ isin: zod_1.z.string().max(12),
20
+ cachedAt: Base_type_1.ZDate,
21
+ });
13
22
  exports.ZAsset = zod_1.z.object({
14
23
  _id: zod_1.z.object({
15
24
  identifier: zod_1.z.string(),
@@ -62,7 +71,6 @@ exports.ZAssetChartQuote = zod_1.z.object({
62
71
  })),
63
72
  exchange: zod_1.z.string(),
64
73
  });
65
- // Dividends
66
74
  exports.ZDividend = zod_1.z.object({
67
75
  type: zod_1.z.string(),
68
76
  security: zod_1.z.string(),
@@ -105,9 +113,9 @@ exports.ZDividendDetails = zod_1.z.object({
105
113
  futureDividends: zod_1.z.array(exports.ZDividend).nullable().default([]),
106
114
  dividendKPIs: zod_1.z
107
115
  .object({
108
- cagr3Y: zod_1.z.number(),
109
- cagr5Y: zod_1.z.number(),
110
- cagr10Y: zod_1.z.number(),
116
+ cagr3Y: zod_1.z.number().nullable(),
117
+ cagr5Y: zod_1.z.number().nullable(),
118
+ cagr10Y: zod_1.z.number().nullable(),
111
119
  dividendYieldPercentageTTM: zod_1.z.number(),
112
120
  dividendPerShareTTM: zod_1.z.number(),
113
121
  })
@@ -116,119 +124,6 @@ exports.ZDividendDetails = zod_1.z.object({
116
124
  exports.ZDividendDetailList = zod_1.z.object({
117
125
  dividendDetails: zod_1.z.record(zod_1.z.string(), exports.ZDividendDetails),
118
126
  });
119
- // SORT
120
- exports.ZStockQuote = zod_1.z.object({
121
- currency: zod_1.z.string().max(3),
122
- exchange: zod_1.z.string().max(100),
123
- date: Base_type_1.ZDate,
124
- datetime: Base_type_1.ZDate,
125
- price: zod_1.z.number(),
126
- isin: zod_1.z.string().max(12),
127
- cachedAt: Base_type_1.ZDate,
128
- });
129
- /**
130
- * Represents a stock exchange table.
131
- */
132
- exports.ZStockExchangeTable = zod_1.z.object({
133
- symbol: zod_1.z.string().max(5),
134
- name: zod_1.z.string().max(100),
135
- exchange: zod_1.z.string().max(100),
136
- country: zod_1.z.string().max(100),
137
- created_at: Base_type_1.ZCreatedAt,
138
- });
139
- /**
140
- * Represents a stock position table.
141
- *
142
- * @remarks
143
- * This type defines the structure of a stock position table, including properties such as id, owner, bought_at, exchange, isin, buy_in, and currency.
144
- */
145
- exports.ZStockPositionTable = zod_1.z.object({
146
- id: zod_1.z.number(),
147
- owner: zod_1.z.string().uuid(),
148
- bought_at: Base_type_1.ZDate,
149
- exchange: zod_1.z.string(),
150
- isin: zod_1.z.string().max(12),
151
- buy_in: zod_1.z.number(),
152
- currency: zod_1.z.string().max(3),
153
- quantity: zod_1.z.number(),
154
- created_at: Base_type_1.ZCreatedAt,
155
- });
156
- /**
157
- * Represents a stock position table with resolved joins.
158
- */
159
- exports.ZMaterializedStockPositionTable = zod_1.z.object({
160
- id: zod_1.z.number(),
161
- owner: zod_1.z.string(),
162
- bought_at: Base_type_1.ZDate,
163
- exchange: zod_1.z.object({
164
- symbol: zod_1.z.string().max(5),
165
- name: zod_1.z.string().max(100),
166
- exchange: zod_1.z.string().max(100),
167
- country: zod_1.z.string().max(100),
168
- }),
169
- isin: zod_1.z.string().max(12),
170
- buy_in: zod_1.z.number(),
171
- currency: zod_1.z.string().max(3),
172
- quantity: zod_1.z.number(),
173
- created_at: Base_type_1.ZCreatedAt,
174
- });
175
- /**
176
- * Represents the payload for opening a position.
177
- */
178
- exports.ZOpenPositionPayload = zod_1.z.object({
179
- owner: zod_1.z.string().uuid(),
180
- bought_at: Base_type_1.ZDate,
181
- exchange: zod_1.z.string(),
182
- isin: zod_1.z.string().max(12),
183
- buy_in: zod_1.z.number(),
184
- currency: zod_1.z.string().max(3),
185
- quantity: zod_1.z.number(),
186
- });
187
- /**
188
- * Represents the payload for updating a position.
189
- */
190
- exports.ZUpdatePositionPayload = zod_1.z.object({
191
- id: zod_1.z.number(),
192
- bought_at: Base_type_1.ZDate,
193
- exchange: zod_1.z.string(),
194
- isin: zod_1.z.string().max(12),
195
- buy_in: zod_1.z.number(),
196
- quantity: zod_1.z.number(),
197
- });
198
- /**
199
- * Represents the payload for closing a position.
200
- */
201
- exports.ZClosePositionPayload = zod_1.z.object({
202
- id: zod_1.z.number(),
203
- });
204
- exports.ZStockPosition = zod_1.z.object({
205
- id: zod_1.z.number(),
206
- owner: zod_1.z.string().uuid(),
207
- bought_at: Base_type_1.ZDate,
208
- exchange: zod_1.z.object({
209
- symbol: zod_1.z.string(),
210
- name: zod_1.z.string(),
211
- exchange: zod_1.z.string(),
212
- country: zod_1.z.string(),
213
- }),
214
- isin: zod_1.z.string(),
215
- buy_in: zod_1.z.number(),
216
- currency: exports.ZCurrency,
217
- quantity: zod_1.z.number(),
218
- created_at: Base_type_1.ZDate,
219
- name: zod_1.z.string(),
220
- logo: zod_1.z.string(),
221
- volume: zod_1.z.number(),
222
- quote: zod_1.z.object({
223
- currency: exports.ZCurrency,
224
- exchange: zod_1.z.string(),
225
- date: Base_type_1.ZDate,
226
- datetime: Base_type_1.ZDate,
227
- price: zod_1.z.number(),
228
- isin: zod_1.z.string(),
229
- cachedAt: Base_type_1.ZDate,
230
- }),
231
- });
232
127
  exports.ZAssetDetails = zod_1.z.object({
233
128
  asset: zod_1.z.object({
234
129
  _id: zod_1.z.object({
@@ -413,9 +308,9 @@ exports.ZAssetDetails = zod_1.z.object({
413
308
  payoutIntervalSource: zod_1.z.string().nullable(),
414
309
  dividendKPIs: zod_1.z
415
310
  .object({
416
- cagr3Y: zod_1.z.number(),
417
- cagr5Y: zod_1.z.number(),
418
- cagr10Y: zod_1.z.number(),
311
+ cagr3Y: zod_1.z.number().nullable(),
312
+ cagr5Y: zod_1.z.number().nullable(),
313
+ cagr10Y: zod_1.z.number().nullable(),
419
314
  dividendYieldPercentageTTM: zod_1.z.number(),
420
315
  dividendPerShareTTM: zod_1.z.number(),
421
316
  })
@@ -424,3 +319,67 @@ exports.ZAssetDetails = zod_1.z.object({
424
319
  dividendYearlyTTM: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).nullable(),
425
320
  }),
426
321
  });
322
+ /**
323
+ * Pocketbase Table Types
324
+ */
325
+ exports.ZStockExchange = zod_1.z.object({
326
+ ...PocketBase_types_1.ZBaseModel.shape,
327
+ ...zod_1.z.object({
328
+ name: zod_1.z.string(),
329
+ symbol: zod_1.z.string(),
330
+ exchange: zod_1.z.string(),
331
+ }).shape,
332
+ });
333
+ exports.ZStockPosition = zod_1.z.object({
334
+ ...PocketBase_types_1.ZBaseModel.shape,
335
+ ...zod_1.z.object({
336
+ owner: PocketBase_types_1.ZId,
337
+ exchange: PocketBase_types_1.ZId,
338
+ bought_at: Base_type_1.ZDate,
339
+ isin: zod_1.z.string(),
340
+ buy_in: zod_1.z.number(),
341
+ currency: exports.ZCurrency,
342
+ quantity: zod_1.z.number(),
343
+ expand: zod_1.z.object({
344
+ exchange: exports.ZStockExchange,
345
+ }),
346
+ }).shape,
347
+ });
348
+ exports.ZStockPositionWithQuote = zod_1.z.object({
349
+ ...PocketBase_types_1.ZBaseModel.shape,
350
+ ...zod_1.z.object({
351
+ owner: PocketBase_types_1.ZId,
352
+ exchange: PocketBase_types_1.ZId,
353
+ bought_at: Base_type_1.ZDate,
354
+ isin: zod_1.z.string(),
355
+ buy_in: zod_1.z.number(),
356
+ currency: exports.ZCurrency,
357
+ quantity: zod_1.z.number(),
358
+ expand: zod_1.z.object({
359
+ exchange: exports.ZStockExchange,
360
+ }),
361
+ name: zod_1.z.string(),
362
+ logo: zod_1.z.string().url(),
363
+ volume: zod_1.z.number(),
364
+ quote: exports.ZStockQuote,
365
+ }).shape,
366
+ });
367
+ exports.ZCreateStockPositionPayload = zod_1.z.object({
368
+ owner: PocketBase_types_1.ZId,
369
+ exchange: PocketBase_types_1.ZId,
370
+ bought_at: Base_type_1.ZDate,
371
+ isin: zod_1.z.string(),
372
+ buy_in: zod_1.z.number(),
373
+ currency: exports.ZCurrency,
374
+ quantity: zod_1.z.number(),
375
+ });
376
+ exports.ZUpdateStockPositionPayload = zod_1.z.object({
377
+ id: PocketBase_types_1.ZId,
378
+ owner: PocketBase_types_1.ZId,
379
+ exchange: PocketBase_types_1.ZId,
380
+ bought_at: Base_type_1.ZDate,
381
+ isin: zod_1.z.string(),
382
+ buy_in: zod_1.z.number(),
383
+ currency: exports.ZCurrency,
384
+ quantity: zod_1.z.number(),
385
+ });
@@ -0,0 +1 @@
1
+ export * from './Stock.types';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Stock.types"), exports);
@@ -0,0 +1,233 @@
1
+ import { z } from 'zod';
2
+ export declare const ZSubscription: z.ZodObject<{
3
+ owner: z.ZodString;
4
+ category: z.ZodString;
5
+ payment_method: z.ZodString;
6
+ paused: z.ZodBoolean;
7
+ execute_at: z.ZodNumber;
8
+ receiver: z.ZodString;
9
+ transfer_amount: z.ZodNumber;
10
+ information: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
11
+ expand: z.ZodObject<{
12
+ category: z.ZodObject<{
13
+ owner: z.ZodString;
14
+ name: z.ZodString;
15
+ description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
16
+ id: z.ZodString;
17
+ created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
18
+ updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ id: string;
21
+ name: string;
22
+ description: string | null;
23
+ created: Date;
24
+ updated: Date;
25
+ owner: string;
26
+ }, {
27
+ id: string;
28
+ name: string;
29
+ created: (string | number | Date) & (string | number | Date | undefined);
30
+ updated: (string | number | Date) & (string | number | Date | undefined);
31
+ owner: string;
32
+ description?: string | null | undefined;
33
+ }>;
34
+ payment_method: z.ZodObject<{
35
+ owner: z.ZodString;
36
+ name: z.ZodString;
37
+ provider: z.ZodString;
38
+ address: z.ZodString;
39
+ description: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
40
+ id: z.ZodString;
41
+ created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
42
+ updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ id: string;
45
+ address: string;
46
+ name: string;
47
+ description: string | null;
48
+ created: Date;
49
+ updated: Date;
50
+ owner: string;
51
+ provider: string;
52
+ }, {
53
+ id: string;
54
+ address: string;
55
+ name: string;
56
+ created: (string | number | Date) & (string | number | Date | undefined);
57
+ updated: (string | number | Date) & (string | number | Date | undefined);
58
+ owner: string;
59
+ provider: string;
60
+ description?: string | null | undefined;
61
+ }>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ category: {
64
+ id: string;
65
+ name: string;
66
+ description: string | null;
67
+ created: Date;
68
+ updated: Date;
69
+ owner: string;
70
+ };
71
+ payment_method: {
72
+ id: string;
73
+ address: string;
74
+ name: string;
75
+ description: string | null;
76
+ created: Date;
77
+ updated: Date;
78
+ owner: string;
79
+ provider: string;
80
+ };
81
+ }, {
82
+ category: {
83
+ id: string;
84
+ name: string;
85
+ created: (string | number | Date) & (string | number | Date | undefined);
86
+ updated: (string | number | Date) & (string | number | Date | undefined);
87
+ owner: string;
88
+ description?: string | null | undefined;
89
+ };
90
+ payment_method: {
91
+ id: string;
92
+ address: string;
93
+ name: string;
94
+ created: (string | number | Date) & (string | number | Date | undefined);
95
+ updated: (string | number | Date) & (string | number | Date | undefined);
96
+ owner: string;
97
+ provider: string;
98
+ description?: string | null | undefined;
99
+ };
100
+ }>;
101
+ id: z.ZodString;
102
+ created: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
103
+ updated: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodDate, z.ZodNumber]>, z.ZodString]>, Date, string | number | Date>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ id: string;
106
+ receiver: string;
107
+ paused: boolean;
108
+ created: Date;
109
+ updated: Date;
110
+ owner: string;
111
+ category: string;
112
+ expand: {
113
+ category: {
114
+ id: string;
115
+ name: string;
116
+ description: string | null;
117
+ created: Date;
118
+ updated: Date;
119
+ owner: string;
120
+ };
121
+ payment_method: {
122
+ id: string;
123
+ address: string;
124
+ name: string;
125
+ description: string | null;
126
+ created: Date;
127
+ updated: Date;
128
+ owner: string;
129
+ provider: string;
130
+ };
131
+ };
132
+ payment_method: string;
133
+ execute_at: number;
134
+ transfer_amount: number;
135
+ information: string | null;
136
+ }, {
137
+ id: string;
138
+ receiver: string;
139
+ paused: boolean;
140
+ created: (string | number | Date) & (string | number | Date | undefined);
141
+ updated: (string | number | Date) & (string | number | Date | undefined);
142
+ owner: string;
143
+ category: string;
144
+ expand: {
145
+ category: {
146
+ id: string;
147
+ name: string;
148
+ created: (string | number | Date) & (string | number | Date | undefined);
149
+ updated: (string | number | Date) & (string | number | Date | undefined);
150
+ owner: string;
151
+ description?: string | null | undefined;
152
+ };
153
+ payment_method: {
154
+ id: string;
155
+ address: string;
156
+ name: string;
157
+ created: (string | number | Date) & (string | number | Date | undefined);
158
+ updated: (string | number | Date) & (string | number | Date | undefined);
159
+ owner: string;
160
+ provider: string;
161
+ description?: string | null | undefined;
162
+ };
163
+ };
164
+ payment_method: string;
165
+ execute_at: number;
166
+ transfer_amount: number;
167
+ information?: string | null | undefined;
168
+ }>;
169
+ export type TSubscription = z.infer<typeof ZSubscription>;
170
+ export declare const ZCreateSubscriptionPayload: z.ZodObject<{
171
+ owner: z.ZodString;
172
+ category: z.ZodString;
173
+ payment_method: z.ZodString;
174
+ paused: z.ZodBoolean;
175
+ execute_at: z.ZodNumber;
176
+ receiver: z.ZodString;
177
+ information: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
178
+ transfer_amount: z.ZodNumber;
179
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ receiver: string;
182
+ paused: boolean;
183
+ owner: string;
184
+ category: string;
185
+ payment_method: string;
186
+ execute_at: number;
187
+ transfer_amount: number;
188
+ information: string | null;
189
+ attachments?: string[] | undefined;
190
+ }, {
191
+ receiver: string;
192
+ paused: boolean;
193
+ owner: string;
194
+ category: string;
195
+ payment_method: string;
196
+ execute_at: number;
197
+ transfer_amount: number;
198
+ information?: string | null | undefined;
199
+ attachments?: string[] | undefined;
200
+ }>;
201
+ export type TCreateSubscriptionPayload = z.infer<typeof ZCreateSubscriptionPayload>;
202
+ export declare const ZUpdateSubscriptionPayload: z.ZodObject<{
203
+ owner: z.ZodString;
204
+ category: z.ZodString;
205
+ payment_method: z.ZodString;
206
+ paused: z.ZodBoolean;
207
+ execute_at: z.ZodNumber;
208
+ receiver: z.ZodString;
209
+ information: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
210
+ transfer_amount: z.ZodNumber;
211
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ receiver: string;
214
+ paused: boolean;
215
+ owner: string;
216
+ category: string;
217
+ payment_method: string;
218
+ execute_at: number;
219
+ transfer_amount: number;
220
+ information: string | null;
221
+ attachments?: string[] | undefined;
222
+ }, {
223
+ receiver: string;
224
+ paused: boolean;
225
+ owner: string;
226
+ category: string;
227
+ payment_method: string;
228
+ execute_at: number;
229
+ transfer_amount: number;
230
+ information?: string | null | undefined;
231
+ attachments?: string[] | undefined;
232
+ }>;
233
+ export type TUpdateSubscriptionPayload = z.infer<typeof ZUpdateSubscriptionPayload>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZUpdateSubscriptionPayload = exports.ZCreateSubscriptionPayload = exports.ZSubscription = 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
+ const PaymentMethod_types_1 = require("./PaymentMethod.types");
8
+ exports.ZSubscription = zod_1.z.object({
9
+ ...PocketBase_types_1.ZBaseModel.shape,
10
+ ...zod_1.z.object({
11
+ owner: PocketBase_types_1.ZId,
12
+ category: PocketBase_types_1.ZId,
13
+ payment_method: PocketBase_types_1.ZId,
14
+ paused: zod_1.z.boolean(),
15
+ execute_at: zod_1.z.number().min(1).max(31),
16
+ receiver: zod_1.z.string(),
17
+ transfer_amount: zod_1.z.number(),
18
+ information: PocketBase_types_1.ZNullableString,
19
+ expand: zod_1.z.object({
20
+ category: Category_types_1.ZCategory,
21
+ payment_method: PaymentMethod_types_1.ZPaymentMethod,
22
+ }),
23
+ }).shape,
24
+ });
25
+ exports.ZCreateSubscriptionPayload = zod_1.z.object({
26
+ owner: PocketBase_types_1.ZId,
27
+ category: PocketBase_types_1.ZId,
28
+ payment_method: PocketBase_types_1.ZId,
29
+ paused: zod_1.z.boolean(),
30
+ execute_at: zod_1.z.number().min(1).max(31),
31
+ receiver: zod_1.z.string(),
32
+ information: PocketBase_types_1.ZNullableString,
33
+ transfer_amount: zod_1.z.number(),
34
+ attachments: zod_1.z.array(zod_1.z.string()).optional(),
35
+ });
36
+ exports.ZUpdateSubscriptionPayload = zod_1.z.object({
37
+ owner: PocketBase_types_1.ZId,
38
+ category: PocketBase_types_1.ZId,
39
+ payment_method: PocketBase_types_1.ZId,
40
+ paused: zod_1.z.boolean(),
41
+ execute_at: zod_1.z.number().min(1).max(31),
42
+ receiver: zod_1.z.string(),
43
+ information: PocketBase_types_1.ZNullableString,
44
+ transfer_amount: zod_1.z.number(),
45
+ attachments: zod_1.z.array(zod_1.z.string()).optional(),
46
+ });