@financeable/aggregation 0.7.4 → 0.8.1

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 (111) hide show
  1. package/README.md +1 -0
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +192 -14
  6. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
  7. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +186 -19
  8. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -1
  9. package/models/components/consumersecuredloanassetattributes.d.ts +136 -15
  10. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -1
  11. package/models/components/consumersecuredloanassetattributes.js +131 -11
  12. package/models/components/consumersecuredloanassetattributes.js.map +1 -1
  13. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +370 -14
  14. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
  15. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +358 -20
  16. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -1
  17. package/models/components/currencycodeiso4217.d.ts +25 -0
  18. package/models/components/currencycodeiso4217.d.ts.map +1 -0
  19. package/models/components/currencycodeiso4217.js +59 -0
  20. package/models/components/currencycodeiso4217.js.map +1 -0
  21. package/models/components/customerassetattributes.d.ts +37 -0
  22. package/models/components/customerassetattributes.d.ts.map +1 -0
  23. package/models/components/customerassetattributes.js +77 -0
  24. package/models/components/customerassetattributes.js.map +1 -0
  25. package/models/components/customerassettype.d.ts +46 -0
  26. package/models/components/customerassettype.d.ts.map +1 -0
  27. package/models/components/customerassettype.js +66 -0
  28. package/models/components/customerassettype.js.map +1 -0
  29. package/models/components/customerattributes.d.ts +3 -0
  30. package/models/components/customerattributes.d.ts.map +1 -1
  31. package/models/components/customerattributes.js +3 -0
  32. package/models/components/customerattributes.js.map +1 -1
  33. package/models/components/customerliabilityattributes.d.ts +46 -0
  34. package/models/components/customerliabilityattributes.d.ts.map +1 -0
  35. package/models/components/customerliabilityattributes.js +88 -0
  36. package/models/components/customerliabilityattributes.js.map +1 -0
  37. package/models/components/customerliabilityrepaymentfrequency.d.ts +31 -0
  38. package/models/components/customerliabilityrepaymentfrequency.d.ts.map +1 -0
  39. package/models/components/customerliabilityrepaymentfrequency.js +61 -0
  40. package/models/components/customerliabilityrepaymentfrequency.js.map +1 -0
  41. package/models/components/customerliabilitytype.d.ts +40 -0
  42. package/models/components/customerliabilitytype.d.ts.map +1 -0
  43. package/models/components/customerliabilitytype.js +64 -0
  44. package/models/components/customerliabilitytype.js.map +1 -0
  45. package/models/components/expenseattributes.d.ts +38 -0
  46. package/models/components/expenseattributes.d.ts.map +1 -0
  47. package/models/components/expenseattributes.js +78 -0
  48. package/models/components/expenseattributes.js.map +1 -0
  49. package/models/components/expensefrequency.d.ts +31 -0
  50. package/models/components/expensefrequency.d.ts.map +1 -0
  51. package/models/components/expensefrequency.js +61 -0
  52. package/models/components/expensefrequency.js.map +1 -0
  53. package/models/components/expensetype.d.ts +79 -0
  54. package/models/components/expensetype.d.ts.map +1 -0
  55. package/models/components/expensetype.js +78 -0
  56. package/models/components/expensetype.js.map +1 -0
  57. package/models/components/incomeattributes.d.ts +38 -0
  58. package/models/components/incomeattributes.d.ts.map +1 -0
  59. package/models/components/incomeattributes.js +78 -0
  60. package/models/components/incomeattributes.js.map +1 -0
  61. package/models/components/incomefrequency.d.ts +34 -0
  62. package/models/components/incomefrequency.d.ts.map +1 -0
  63. package/models/components/incomefrequency.js +62 -0
  64. package/models/components/incomefrequency.js.map +1 -0
  65. package/models/components/incometype.d.ts +49 -0
  66. package/models/components/incometype.d.ts.map +1 -0
  67. package/models/components/incometype.js +68 -0
  68. package/models/components/incometype.js.map +1 -0
  69. package/models/components/index.d.ts +14 -0
  70. package/models/components/index.d.ts.map +1 -1
  71. package/models/components/index.js +14 -0
  72. package/models/components/index.js.map +1 -1
  73. package/models/components/loandetailsattributes.d.ts +252 -30
  74. package/models/components/loandetailsattributes.d.ts.map +1 -1
  75. package/models/components/loandetailsattributes.js +266 -19
  76. package/models/components/loandetailsattributes.js.map +1 -1
  77. package/models/components/monetaryquantity.d.ts +63 -0
  78. package/models/components/monetaryquantity.d.ts.map +1 -0
  79. package/models/components/monetaryquantity.js +93 -0
  80. package/models/components/monetaryquantity.js.map +1 -0
  81. package/models/components/percentagequantity.d.ts +57 -0
  82. package/models/components/percentagequantity.d.ts.map +1 -0
  83. package/models/components/percentagequantity.js +89 -0
  84. package/models/components/percentagequantity.js.map +1 -0
  85. package/models/operations/createapplication.d.ts +102 -4
  86. package/models/operations/createapplication.d.ts.map +1 -1
  87. package/models/operations/createapplication.js +107 -1
  88. package/models/operations/createapplication.js.map +1 -1
  89. package/package.json +2 -2
  90. package/src/lib/config.ts +3 -3
  91. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +426 -25
  92. package/src/models/components/consumersecuredloanassetattributes.ts +282 -25
  93. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +895 -40
  94. package/src/models/components/currencycodeiso4217.ts +32 -0
  95. package/src/models/components/customerassetattributes.ts +89 -0
  96. package/src/models/components/customerassettype.ts +39 -0
  97. package/src/models/components/customerattributes.ts +10 -0
  98. package/src/models/components/customerliabilityattributes.ts +114 -0
  99. package/src/models/components/customerliabilityrepaymentfrequency.ts +38 -0
  100. package/src/models/components/customerliabilitytype.ts +37 -0
  101. package/src/models/components/expenseattributes.ts +94 -0
  102. package/src/models/components/expensefrequency.ts +34 -0
  103. package/src/models/components/expensetype.ts +48 -0
  104. package/src/models/components/incomeattributes.ts +94 -0
  105. package/src/models/components/incomefrequency.ts +35 -0
  106. package/src/models/components/incometype.ts +38 -0
  107. package/src/models/components/index.ts +14 -0
  108. package/src/models/components/loandetailsattributes.ts +537 -48
  109. package/src/models/components/monetaryquantity.ts +110 -0
  110. package/src/models/components/percentagequantity.ts +102 -0
  111. package/src/models/operations/createapplication.ts +191 -3
@@ -11,12 +11,69 @@ import {
11
11
  FrequencyType$inboundSchema,
12
12
  FrequencyType$outboundSchema,
13
13
  } from "./frequencytype.js";
14
+ import {
15
+ MonetaryQuantity,
16
+ MonetaryQuantity$inboundSchema,
17
+ MonetaryQuantity$Outbound,
18
+ MonetaryQuantity$outboundSchema,
19
+ } from "./monetaryquantity.js";
20
+ import {
21
+ PercentageQuantity,
22
+ PercentageQuantity$inboundSchema,
23
+ PercentageQuantity$Outbound,
24
+ PercentageQuantity$outboundSchema,
25
+ } from "./percentagequantity.js";
14
26
  import {
15
27
  RepaymentStructure,
16
28
  RepaymentStructure$inboundSchema,
17
29
  RepaymentStructure$outboundSchema,
18
30
  } from "./repaymentstructure.js";
19
31
 
32
+ /**
33
+ * Total loan amount, either MonetaryQuantity model (preferred) or floating point dollars as string. The latter will be deprecated.
34
+ */
35
+ export type LoanAmount = MonetaryQuantity | string;
36
+
37
+ /**
38
+ * Brokerage quantity as either BrokerageQuantity model (preferred) or floating point dollars as string. The latter will be deprecated. Only applicable to commercialSecured loans.
39
+ */
40
+ export type Brokerage = PercentageQuantity | MonetaryQuantity | string;
41
+
42
+ /**
43
+ * Balloon quantity as either BalloonQuantity model (preferred) or dollar integer as int32 (the latter will be deprecated)
44
+ */
45
+ export type Balloon = PercentageQuantity | MonetaryQuantity | number;
46
+
47
+ /**
48
+ * Either MonetaryQuantity model (preferred) or floating point AUD dollars as string. The latter will be deprecated.
49
+ */
50
+ export type Deposit = MonetaryQuantity | string;
51
+
52
+ /**
53
+ * Trade in amount as MonetaryQuantity model (preferred),or floating point AUD dollars as string. The latter will be deprecated
54
+ */
55
+ export type TradeIn = MonetaryQuantity | string;
56
+
57
+ /**
58
+ * Origination fee as either MonetaryQuantity model (preferred) or integer AUD dollars. The latter will be deprecated.
59
+ */
60
+ export type OriginationFee = MonetaryQuantity | number;
61
+
62
+ /**
63
+ * Payout amount as either MonetaryQuantity model (preferred) or floating point AUD dollars as string. The latter will be deprecated.
64
+ */
65
+ export type Payout = MonetaryQuantity | string;
66
+
67
+ /**
68
+ * Interest rate as either PercentageQuantity model (preferred) or floating point percentage as string. The latter will be deprecated.
69
+ */
70
+ export type Rate = PercentageQuantity | string;
71
+
72
+ /**
73
+ * Rate adjustment as either PercentageQuantity model (preferred) or floating point percentage as string. The latter will be deprecated.
74
+ */
75
+ export type RateAdjustment = PercentageQuantity | string;
76
+
20
77
  /**
21
78
  * Loan details model
22
79
  */
@@ -35,59 +92,463 @@ export type LoanDetailsAttributes = {
35
92
  */
36
93
  repaymentStructure?: RepaymentStructure | undefined;
37
94
  /**
38
- * Total loan amount, floating point as string
95
+ * Total loan amount, either MonetaryQuantity model (preferred) or floating point dollars as string. The latter will be deprecated.
39
96
  */
40
- loanAmount?: string | undefined;
97
+ loanAmount?: MonetaryQuantity | string | undefined;
41
98
  /**
42
99
  * Loan purpose
43
100
  */
44
101
  purpose?: string | undefined;
45
102
  /**
46
- * Loan term in months
103
+ * Loan term in integer months
47
104
  */
48
105
  term?: number | undefined;
49
106
  /**
50
- * Brokerage percentage, floating point as string
107
+ * Brokerage quantity as either BrokerageQuantity model (preferred) or floating point dollars as string. The latter will be deprecated. Only applicable to commercialSecured loans.
51
108
  */
52
- brokerage?: string | undefined;
109
+ brokerage?: PercentageQuantity | MonetaryQuantity | string | undefined;
53
110
  /**
54
- * Brokerage amount, floating point as string
111
+ * Broker amount as floating point dollars string. Will be deprecated in the future, use brokerage instead. Only applicable to commercialSecured loans.
112
+ *
113
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
55
114
  */
56
115
  brokerageAmount?: string | undefined;
57
116
  /**
58
- * Balloon percentage as integer, e.g. provide 10 for 10%
117
+ * Balloon quantity as either BalloonQuantity model (preferred) or dollar integer as int32 (the latter will be deprecated)
59
118
  */
60
- balloon?: number | undefined;
119
+ balloon?: PercentageQuantity | MonetaryQuantity | number | undefined;
61
120
  /**
62
- * Balloon amount, floating point as string
121
+ * Balloon amount, floating point AUD dollars as string. Will be deprecated in the future, use balloon instead
122
+ *
123
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
63
124
  */
64
125
  balloonAmount?: string | undefined;
65
126
  /**
66
- * Deposit amount, floating point as string
127
+ * Either MonetaryQuantity model (preferred) or floating point AUD dollars as string. The latter will be deprecated.
67
128
  */
68
- deposit?: string | undefined;
129
+ deposit?: MonetaryQuantity | string | undefined;
69
130
  /**
70
- * Trade in amount, floating point as string
131
+ * Trade in amount as MonetaryQuantity model (preferred),or floating point AUD dollars as string. The latter will be deprecated
71
132
  */
72
- tradeIn?: string | undefined;
133
+ tradeIn?: MonetaryQuantity | string | undefined;
73
134
  /**
74
- * Origination fee, floating point as string
135
+ * Origination fee as either MonetaryQuantity model (preferred) or integer AUD dollars. The latter will be deprecated.
75
136
  */
76
- originationFee?: number | undefined;
137
+ originationFee?: MonetaryQuantity | number | undefined;
77
138
  /**
78
- * Payout amount, floating point as string
139
+ * Payout amount as either MonetaryQuantity model (preferred) or floating point AUD dollars as string. The latter will be deprecated.
79
140
  */
80
- payout?: string | undefined;
141
+ payout?: MonetaryQuantity | string | undefined;
81
142
  /**
82
- * Interest rate, floating point as string
143
+ * Interest rate as either PercentageQuantity model (preferred) or floating point percentage as string. The latter will be deprecated.
83
144
  */
84
- rate?: string | undefined;
145
+ rate?: PercentageQuantity | string | undefined;
85
146
  /**
86
- * Rate adjustment, floating point as string
147
+ * Rate adjustment as either PercentageQuantity model (preferred) or floating point percentage as string. The latter will be deprecated.
87
148
  */
88
- rateAdjustment?: string | undefined;
149
+ rateAdjustment?: PercentageQuantity | string | undefined;
89
150
  };
90
151
 
152
+ /** @internal */
153
+ export const LoanAmount$inboundSchema: z.ZodType<
154
+ LoanAmount,
155
+ z.ZodTypeDef,
156
+ unknown
157
+ > = z.union([MonetaryQuantity$inboundSchema, z.string()]);
158
+
159
+ /** @internal */
160
+ export type LoanAmount$Outbound = MonetaryQuantity$Outbound | string;
161
+
162
+ /** @internal */
163
+ export const LoanAmount$outboundSchema: z.ZodType<
164
+ LoanAmount$Outbound,
165
+ z.ZodTypeDef,
166
+ LoanAmount
167
+ > = z.union([MonetaryQuantity$outboundSchema, z.string()]);
168
+
169
+ /**
170
+ * @internal
171
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
172
+ */
173
+ export namespace LoanAmount$ {
174
+ /** @deprecated use `LoanAmount$inboundSchema` instead. */
175
+ export const inboundSchema = LoanAmount$inboundSchema;
176
+ /** @deprecated use `LoanAmount$outboundSchema` instead. */
177
+ export const outboundSchema = LoanAmount$outboundSchema;
178
+ /** @deprecated use `LoanAmount$Outbound` instead. */
179
+ export type Outbound = LoanAmount$Outbound;
180
+ }
181
+
182
+ export function loanAmountToJSON(loanAmount: LoanAmount): string {
183
+ return JSON.stringify(LoanAmount$outboundSchema.parse(loanAmount));
184
+ }
185
+
186
+ export function loanAmountFromJSON(
187
+ jsonString: string,
188
+ ): SafeParseResult<LoanAmount, SDKValidationError> {
189
+ return safeParse(
190
+ jsonString,
191
+ (x) => LoanAmount$inboundSchema.parse(JSON.parse(x)),
192
+ `Failed to parse 'LoanAmount' from JSON`,
193
+ );
194
+ }
195
+
196
+ /** @internal */
197
+ export const Brokerage$inboundSchema: z.ZodType<
198
+ Brokerage,
199
+ z.ZodTypeDef,
200
+ unknown
201
+ > = z.union([
202
+ PercentageQuantity$inboundSchema,
203
+ MonetaryQuantity$inboundSchema,
204
+ z.string(),
205
+ ]);
206
+
207
+ /** @internal */
208
+ export type Brokerage$Outbound =
209
+ | PercentageQuantity$Outbound
210
+ | MonetaryQuantity$Outbound
211
+ | string;
212
+
213
+ /** @internal */
214
+ export const Brokerage$outboundSchema: z.ZodType<
215
+ Brokerage$Outbound,
216
+ z.ZodTypeDef,
217
+ Brokerage
218
+ > = z.union([
219
+ PercentageQuantity$outboundSchema,
220
+ MonetaryQuantity$outboundSchema,
221
+ z.string(),
222
+ ]);
223
+
224
+ /**
225
+ * @internal
226
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
227
+ */
228
+ export namespace Brokerage$ {
229
+ /** @deprecated use `Brokerage$inboundSchema` instead. */
230
+ export const inboundSchema = Brokerage$inboundSchema;
231
+ /** @deprecated use `Brokerage$outboundSchema` instead. */
232
+ export const outboundSchema = Brokerage$outboundSchema;
233
+ /** @deprecated use `Brokerage$Outbound` instead. */
234
+ export type Outbound = Brokerage$Outbound;
235
+ }
236
+
237
+ export function brokerageToJSON(brokerage: Brokerage): string {
238
+ return JSON.stringify(Brokerage$outboundSchema.parse(brokerage));
239
+ }
240
+
241
+ export function brokerageFromJSON(
242
+ jsonString: string,
243
+ ): SafeParseResult<Brokerage, SDKValidationError> {
244
+ return safeParse(
245
+ jsonString,
246
+ (x) => Brokerage$inboundSchema.parse(JSON.parse(x)),
247
+ `Failed to parse 'Brokerage' from JSON`,
248
+ );
249
+ }
250
+
251
+ /** @internal */
252
+ export const Balloon$inboundSchema: z.ZodType<Balloon, z.ZodTypeDef, unknown> =
253
+ z.union([
254
+ PercentageQuantity$inboundSchema,
255
+ MonetaryQuantity$inboundSchema,
256
+ z.number().int(),
257
+ ]);
258
+
259
+ /** @internal */
260
+ export type Balloon$Outbound =
261
+ | PercentageQuantity$Outbound
262
+ | MonetaryQuantity$Outbound
263
+ | number;
264
+
265
+ /** @internal */
266
+ export const Balloon$outboundSchema: z.ZodType<
267
+ Balloon$Outbound,
268
+ z.ZodTypeDef,
269
+ Balloon
270
+ > = z.union([
271
+ PercentageQuantity$outboundSchema,
272
+ MonetaryQuantity$outboundSchema,
273
+ z.number().int(),
274
+ ]);
275
+
276
+ /**
277
+ * @internal
278
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
279
+ */
280
+ export namespace Balloon$ {
281
+ /** @deprecated use `Balloon$inboundSchema` instead. */
282
+ export const inboundSchema = Balloon$inboundSchema;
283
+ /** @deprecated use `Balloon$outboundSchema` instead. */
284
+ export const outboundSchema = Balloon$outboundSchema;
285
+ /** @deprecated use `Balloon$Outbound` instead. */
286
+ export type Outbound = Balloon$Outbound;
287
+ }
288
+
289
+ export function balloonToJSON(balloon: Balloon): string {
290
+ return JSON.stringify(Balloon$outboundSchema.parse(balloon));
291
+ }
292
+
293
+ export function balloonFromJSON(
294
+ jsonString: string,
295
+ ): SafeParseResult<Balloon, SDKValidationError> {
296
+ return safeParse(
297
+ jsonString,
298
+ (x) => Balloon$inboundSchema.parse(JSON.parse(x)),
299
+ `Failed to parse 'Balloon' from JSON`,
300
+ );
301
+ }
302
+
303
+ /** @internal */
304
+ export const Deposit$inboundSchema: z.ZodType<Deposit, z.ZodTypeDef, unknown> =
305
+ z.union([MonetaryQuantity$inboundSchema, z.string()]);
306
+
307
+ /** @internal */
308
+ export type Deposit$Outbound = MonetaryQuantity$Outbound | string;
309
+
310
+ /** @internal */
311
+ export const Deposit$outboundSchema: z.ZodType<
312
+ Deposit$Outbound,
313
+ z.ZodTypeDef,
314
+ Deposit
315
+ > = z.union([MonetaryQuantity$outboundSchema, z.string()]);
316
+
317
+ /**
318
+ * @internal
319
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
320
+ */
321
+ export namespace Deposit$ {
322
+ /** @deprecated use `Deposit$inboundSchema` instead. */
323
+ export const inboundSchema = Deposit$inboundSchema;
324
+ /** @deprecated use `Deposit$outboundSchema` instead. */
325
+ export const outboundSchema = Deposit$outboundSchema;
326
+ /** @deprecated use `Deposit$Outbound` instead. */
327
+ export type Outbound = Deposit$Outbound;
328
+ }
329
+
330
+ export function depositToJSON(deposit: Deposit): string {
331
+ return JSON.stringify(Deposit$outboundSchema.parse(deposit));
332
+ }
333
+
334
+ export function depositFromJSON(
335
+ jsonString: string,
336
+ ): SafeParseResult<Deposit, SDKValidationError> {
337
+ return safeParse(
338
+ jsonString,
339
+ (x) => Deposit$inboundSchema.parse(JSON.parse(x)),
340
+ `Failed to parse 'Deposit' from JSON`,
341
+ );
342
+ }
343
+
344
+ /** @internal */
345
+ export const TradeIn$inboundSchema: z.ZodType<TradeIn, z.ZodTypeDef, unknown> =
346
+ z.union([MonetaryQuantity$inboundSchema, z.string()]);
347
+
348
+ /** @internal */
349
+ export type TradeIn$Outbound = MonetaryQuantity$Outbound | string;
350
+
351
+ /** @internal */
352
+ export const TradeIn$outboundSchema: z.ZodType<
353
+ TradeIn$Outbound,
354
+ z.ZodTypeDef,
355
+ TradeIn
356
+ > = z.union([MonetaryQuantity$outboundSchema, z.string()]);
357
+
358
+ /**
359
+ * @internal
360
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
361
+ */
362
+ export namespace TradeIn$ {
363
+ /** @deprecated use `TradeIn$inboundSchema` instead. */
364
+ export const inboundSchema = TradeIn$inboundSchema;
365
+ /** @deprecated use `TradeIn$outboundSchema` instead. */
366
+ export const outboundSchema = TradeIn$outboundSchema;
367
+ /** @deprecated use `TradeIn$Outbound` instead. */
368
+ export type Outbound = TradeIn$Outbound;
369
+ }
370
+
371
+ export function tradeInToJSON(tradeIn: TradeIn): string {
372
+ return JSON.stringify(TradeIn$outboundSchema.parse(tradeIn));
373
+ }
374
+
375
+ export function tradeInFromJSON(
376
+ jsonString: string,
377
+ ): SafeParseResult<TradeIn, SDKValidationError> {
378
+ return safeParse(
379
+ jsonString,
380
+ (x) => TradeIn$inboundSchema.parse(JSON.parse(x)),
381
+ `Failed to parse 'TradeIn' from JSON`,
382
+ );
383
+ }
384
+
385
+ /** @internal */
386
+ export const OriginationFee$inboundSchema: z.ZodType<
387
+ OriginationFee,
388
+ z.ZodTypeDef,
389
+ unknown
390
+ > = z.union([MonetaryQuantity$inboundSchema, z.number().int()]);
391
+
392
+ /** @internal */
393
+ export type OriginationFee$Outbound = MonetaryQuantity$Outbound | number;
394
+
395
+ /** @internal */
396
+ export const OriginationFee$outboundSchema: z.ZodType<
397
+ OriginationFee$Outbound,
398
+ z.ZodTypeDef,
399
+ OriginationFee
400
+ > = z.union([MonetaryQuantity$outboundSchema, z.number().int()]);
401
+
402
+ /**
403
+ * @internal
404
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
405
+ */
406
+ export namespace OriginationFee$ {
407
+ /** @deprecated use `OriginationFee$inboundSchema` instead. */
408
+ export const inboundSchema = OriginationFee$inboundSchema;
409
+ /** @deprecated use `OriginationFee$outboundSchema` instead. */
410
+ export const outboundSchema = OriginationFee$outboundSchema;
411
+ /** @deprecated use `OriginationFee$Outbound` instead. */
412
+ export type Outbound = OriginationFee$Outbound;
413
+ }
414
+
415
+ export function originationFeeToJSON(originationFee: OriginationFee): string {
416
+ return JSON.stringify(OriginationFee$outboundSchema.parse(originationFee));
417
+ }
418
+
419
+ export function originationFeeFromJSON(
420
+ jsonString: string,
421
+ ): SafeParseResult<OriginationFee, SDKValidationError> {
422
+ return safeParse(
423
+ jsonString,
424
+ (x) => OriginationFee$inboundSchema.parse(JSON.parse(x)),
425
+ `Failed to parse 'OriginationFee' from JSON`,
426
+ );
427
+ }
428
+
429
+ /** @internal */
430
+ export const Payout$inboundSchema: z.ZodType<Payout, z.ZodTypeDef, unknown> = z
431
+ .union([MonetaryQuantity$inboundSchema, z.string()]);
432
+
433
+ /** @internal */
434
+ export type Payout$Outbound = MonetaryQuantity$Outbound | string;
435
+
436
+ /** @internal */
437
+ export const Payout$outboundSchema: z.ZodType<
438
+ Payout$Outbound,
439
+ z.ZodTypeDef,
440
+ Payout
441
+ > = z.union([MonetaryQuantity$outboundSchema, z.string()]);
442
+
443
+ /**
444
+ * @internal
445
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
446
+ */
447
+ export namespace Payout$ {
448
+ /** @deprecated use `Payout$inboundSchema` instead. */
449
+ export const inboundSchema = Payout$inboundSchema;
450
+ /** @deprecated use `Payout$outboundSchema` instead. */
451
+ export const outboundSchema = Payout$outboundSchema;
452
+ /** @deprecated use `Payout$Outbound` instead. */
453
+ export type Outbound = Payout$Outbound;
454
+ }
455
+
456
+ export function payoutToJSON(payout: Payout): string {
457
+ return JSON.stringify(Payout$outboundSchema.parse(payout));
458
+ }
459
+
460
+ export function payoutFromJSON(
461
+ jsonString: string,
462
+ ): SafeParseResult<Payout, SDKValidationError> {
463
+ return safeParse(
464
+ jsonString,
465
+ (x) => Payout$inboundSchema.parse(JSON.parse(x)),
466
+ `Failed to parse 'Payout' from JSON`,
467
+ );
468
+ }
469
+
470
+ /** @internal */
471
+ export const Rate$inboundSchema: z.ZodType<Rate, z.ZodTypeDef, unknown> = z
472
+ .union([PercentageQuantity$inboundSchema, z.string()]);
473
+
474
+ /** @internal */
475
+ export type Rate$Outbound = PercentageQuantity$Outbound | string;
476
+
477
+ /** @internal */
478
+ export const Rate$outboundSchema: z.ZodType<Rate$Outbound, z.ZodTypeDef, Rate> =
479
+ z.union([PercentageQuantity$outboundSchema, z.string()]);
480
+
481
+ /**
482
+ * @internal
483
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
484
+ */
485
+ export namespace Rate$ {
486
+ /** @deprecated use `Rate$inboundSchema` instead. */
487
+ export const inboundSchema = Rate$inboundSchema;
488
+ /** @deprecated use `Rate$outboundSchema` instead. */
489
+ export const outboundSchema = Rate$outboundSchema;
490
+ /** @deprecated use `Rate$Outbound` instead. */
491
+ export type Outbound = Rate$Outbound;
492
+ }
493
+
494
+ export function rateToJSON(rate: Rate): string {
495
+ return JSON.stringify(Rate$outboundSchema.parse(rate));
496
+ }
497
+
498
+ export function rateFromJSON(
499
+ jsonString: string,
500
+ ): SafeParseResult<Rate, SDKValidationError> {
501
+ return safeParse(
502
+ jsonString,
503
+ (x) => Rate$inboundSchema.parse(JSON.parse(x)),
504
+ `Failed to parse 'Rate' from JSON`,
505
+ );
506
+ }
507
+
508
+ /** @internal */
509
+ export const RateAdjustment$inboundSchema: z.ZodType<
510
+ RateAdjustment,
511
+ z.ZodTypeDef,
512
+ unknown
513
+ > = z.union([PercentageQuantity$inboundSchema, z.string()]);
514
+
515
+ /** @internal */
516
+ export type RateAdjustment$Outbound = PercentageQuantity$Outbound | string;
517
+
518
+ /** @internal */
519
+ export const RateAdjustment$outboundSchema: z.ZodType<
520
+ RateAdjustment$Outbound,
521
+ z.ZodTypeDef,
522
+ RateAdjustment
523
+ > = z.union([PercentageQuantity$outboundSchema, z.string()]);
524
+
525
+ /**
526
+ * @internal
527
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
528
+ */
529
+ export namespace RateAdjustment$ {
530
+ /** @deprecated use `RateAdjustment$inboundSchema` instead. */
531
+ export const inboundSchema = RateAdjustment$inboundSchema;
532
+ /** @deprecated use `RateAdjustment$outboundSchema` instead. */
533
+ export const outboundSchema = RateAdjustment$outboundSchema;
534
+ /** @deprecated use `RateAdjustment$Outbound` instead. */
535
+ export type Outbound = RateAdjustment$Outbound;
536
+ }
537
+
538
+ export function rateAdjustmentToJSON(rateAdjustment: RateAdjustment): string {
539
+ return JSON.stringify(RateAdjustment$outboundSchema.parse(rateAdjustment));
540
+ }
541
+
542
+ export function rateAdjustmentFromJSON(
543
+ jsonString: string,
544
+ ): SafeParseResult<RateAdjustment, SDKValidationError> {
545
+ return safeParse(
546
+ jsonString,
547
+ (x) => RateAdjustment$inboundSchema.parse(JSON.parse(x)),
548
+ `Failed to parse 'RateAdjustment' from JSON`,
549
+ );
550
+ }
551
+
91
552
  /** @internal */
92
553
  export const LoanDetailsAttributes$inboundSchema: z.ZodType<
93
554
  LoanDetailsAttributes,
@@ -98,19 +559,29 @@ export const LoanDetailsAttributes$inboundSchema: z.ZodType<
98
559
  repayments: z.number().int().optional(),
99
560
  repaymentFrequency: FrequencyType$inboundSchema.optional(),
100
561
  repaymentStructure: RepaymentStructure$inboundSchema.optional(),
101
- loanAmount: z.string().optional(),
562
+ loanAmount: z.union([MonetaryQuantity$inboundSchema, z.string()]).optional(),
102
563
  purpose: z.string().optional(),
103
564
  term: z.number().int().optional(),
104
- brokerage: z.string().optional(),
565
+ brokerage: z.union([
566
+ PercentageQuantity$inboundSchema,
567
+ MonetaryQuantity$inboundSchema,
568
+ z.string(),
569
+ ]).optional(),
105
570
  brokerageAmount: z.string().optional(),
106
- balloon: z.number().int().optional(),
571
+ balloon: z.union([
572
+ PercentageQuantity$inboundSchema,
573
+ MonetaryQuantity$inboundSchema,
574
+ z.number().int(),
575
+ ]).optional(),
107
576
  balloonAmount: z.string().optional(),
108
- deposit: z.string().optional(),
109
- tradeIn: z.string().optional(),
110
- originationFee: z.number().int().optional(),
111
- payout: z.string().optional(),
112
- rate: z.string().optional(),
113
- rateAdjustment: z.string().optional(),
577
+ deposit: z.union([MonetaryQuantity$inboundSchema, z.string()]).optional(),
578
+ tradeIn: z.union([MonetaryQuantity$inboundSchema, z.string()]).optional(),
579
+ originationFee: z.union([MonetaryQuantity$inboundSchema, z.number().int()])
580
+ .optional(),
581
+ payout: z.union([MonetaryQuantity$inboundSchema, z.string()]).optional(),
582
+ rate: z.union([PercentageQuantity$inboundSchema, z.string()]).optional(),
583
+ rateAdjustment: z.union([PercentageQuantity$inboundSchema, z.string()])
584
+ .optional(),
114
585
  });
115
586
 
116
587
  /** @internal */
@@ -119,19 +590,27 @@ export type LoanDetailsAttributes$Outbound = {
119
590
  repayments?: number | undefined;
120
591
  repaymentFrequency?: string | undefined;
121
592
  repaymentStructure?: string | undefined;
122
- loanAmount?: string | undefined;
593
+ loanAmount?: MonetaryQuantity$Outbound | string | undefined;
123
594
  purpose?: string | undefined;
124
595
  term?: number | undefined;
125
- brokerage?: string | undefined;
596
+ brokerage?:
597
+ | PercentageQuantity$Outbound
598
+ | MonetaryQuantity$Outbound
599
+ | string
600
+ | undefined;
126
601
  brokerageAmount?: string | undefined;
127
- balloon?: number | undefined;
602
+ balloon?:
603
+ | PercentageQuantity$Outbound
604
+ | MonetaryQuantity$Outbound
605
+ | number
606
+ | undefined;
128
607
  balloonAmount?: string | undefined;
129
- deposit?: string | undefined;
130
- tradeIn?: string | undefined;
131
- originationFee?: number | undefined;
132
- payout?: string | undefined;
133
- rate?: string | undefined;
134
- rateAdjustment?: string | undefined;
608
+ deposit?: MonetaryQuantity$Outbound | string | undefined;
609
+ tradeIn?: MonetaryQuantity$Outbound | string | undefined;
610
+ originationFee?: MonetaryQuantity$Outbound | number | undefined;
611
+ payout?: MonetaryQuantity$Outbound | string | undefined;
612
+ rate?: PercentageQuantity$Outbound | string | undefined;
613
+ rateAdjustment?: PercentageQuantity$Outbound | string | undefined;
135
614
  };
136
615
 
137
616
  /** @internal */
@@ -144,19 +623,29 @@ export const LoanDetailsAttributes$outboundSchema: z.ZodType<
144
623
  repayments: z.number().int().optional(),
145
624
  repaymentFrequency: FrequencyType$outboundSchema.optional(),
146
625
  repaymentStructure: RepaymentStructure$outboundSchema.optional(),
147
- loanAmount: z.string().optional(),
626
+ loanAmount: z.union([MonetaryQuantity$outboundSchema, z.string()]).optional(),
148
627
  purpose: z.string().optional(),
149
628
  term: z.number().int().optional(),
150
- brokerage: z.string().optional(),
629
+ brokerage: z.union([
630
+ PercentageQuantity$outboundSchema,
631
+ MonetaryQuantity$outboundSchema,
632
+ z.string(),
633
+ ]).optional(),
151
634
  brokerageAmount: z.string().optional(),
152
- balloon: z.number().int().optional(),
635
+ balloon: z.union([
636
+ PercentageQuantity$outboundSchema,
637
+ MonetaryQuantity$outboundSchema,
638
+ z.number().int(),
639
+ ]).optional(),
153
640
  balloonAmount: z.string().optional(),
154
- deposit: z.string().optional(),
155
- tradeIn: z.string().optional(),
156
- originationFee: z.number().int().optional(),
157
- payout: z.string().optional(),
158
- rate: z.string().optional(),
159
- rateAdjustment: z.string().optional(),
641
+ deposit: z.union([MonetaryQuantity$outboundSchema, z.string()]).optional(),
642
+ tradeIn: z.union([MonetaryQuantity$outboundSchema, z.string()]).optional(),
643
+ originationFee: z.union([MonetaryQuantity$outboundSchema, z.number().int()])
644
+ .optional(),
645
+ payout: z.union([MonetaryQuantity$outboundSchema, z.string()]).optional(),
646
+ rate: z.union([PercentageQuantity$outboundSchema, z.string()]).optional(),
647
+ rateAdjustment: z.union([PercentageQuantity$outboundSchema, z.string()])
648
+ .optional(),
160
649
  });
161
650
 
162
651
  /**