@financeable/aggregation 0.11.0 → 0.12.0

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 (102) hide show
  1. package/README.md +4 -0
  2. package/docs/sdks/applications/README.md +144 -0
  3. package/examples/package-lock.json +1 -1
  4. package/funcs/applicationsGet.d.ts +14 -0
  5. package/funcs/applicationsGet.d.ts.map +1 -0
  6. package/funcs/applicationsGet.js +122 -0
  7. package/funcs/applicationsGet.js.map +1 -0
  8. package/funcs/applicationsList.d.ts +14 -0
  9. package/funcs/applicationsList.d.ts.map +1 -0
  10. package/funcs/applicationsList.js +117 -0
  11. package/funcs/applicationsList.js.map +1 -0
  12. package/lib/config.d.ts +3 -3
  13. package/lib/config.js +3 -3
  14. package/models/components/businessloanbusinessapplicationrelationships.d.ts +21 -21
  15. package/models/components/businessloanbusinessapplicationrelationships.d.ts.map +1 -1
  16. package/models/components/businessloanbusinessapplicationrelationships.js +24 -26
  17. package/models/components/businessloanbusinessapplicationrelationships.js.map +1 -1
  18. package/models/components/commercialapplicationjsonapirelationships.d.ts +15 -15
  19. package/models/components/commercialapplicationjsonapirelationships.d.ts.map +1 -1
  20. package/models/components/commercialapplicationjsonapirelationships.js +18 -18
  21. package/models/components/commercialapplicationjsonapirelationships.js.map +1 -1
  22. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +36 -36
  23. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
  24. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +46 -44
  25. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -1
  26. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +3 -3
  27. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
  28. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +3 -3
  29. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -1
  30. package/models/components/customerattributes.d.ts +0 -22
  31. package/models/components/customerattributes.d.ts.map +1 -1
  32. package/models/components/customerattributes.js +0 -10
  33. package/models/components/customerattributes.js.map +1 -1
  34. package/models/components/customerattributescreateitem.d.ts +112 -0
  35. package/models/components/customerattributescreateitem.d.ts.map +1 -0
  36. package/models/components/customerattributescreateitem.js +110 -0
  37. package/models/components/customerattributescreateitem.js.map +1 -0
  38. package/models/components/entityattributes.d.ts +129 -0
  39. package/models/components/entityattributes.d.ts.map +1 -1
  40. package/models/components/entityattributes.js +71 -1
  41. package/models/components/entityattributes.js.map +1 -1
  42. package/models/components/entityattributesinput.d.ts +41 -0
  43. package/models/components/entityattributesinput.d.ts.map +1 -0
  44. package/models/components/entityattributesinput.js +81 -0
  45. package/models/components/entityattributesinput.js.map +1 -0
  46. package/models/components/index.d.ts +4 -0
  47. package/models/components/index.d.ts.map +1 -1
  48. package/models/components/index.js +4 -0
  49. package/models/components/index.js.map +1 -1
  50. package/models/components/paginationlinks.d.ts +47 -0
  51. package/models/components/paginationlinks.d.ts.map +1 -0
  52. package/models/components/paginationlinks.js +75 -0
  53. package/models/components/paginationlinks.js.map +1 -0
  54. package/models/components/paginationmeta.d.ts +47 -0
  55. package/models/components/paginationmeta.d.ts.map +1 -0
  56. package/models/components/paginationmeta.js +88 -0
  57. package/models/components/paginationmeta.js.map +1 -0
  58. package/models/components/personalloanpersonalapplicationrelationships.d.ts +3 -3
  59. package/models/components/personalloanpersonalapplicationrelationships.d.ts.map +1 -1
  60. package/models/components/personalloanpersonalapplicationrelationships.js +3 -3
  61. package/models/components/personalloanpersonalapplicationrelationships.js.map +1 -1
  62. package/models/operations/createapplication.d.ts +218 -45
  63. package/models/operations/createapplication.d.ts.map +1 -1
  64. package/models/operations/createapplication.js +145 -45
  65. package/models/operations/createapplication.js.map +1 -1
  66. package/models/operations/getapplication.d.ts +703 -0
  67. package/models/operations/getapplication.d.ts.map +1 -0
  68. package/models/operations/getapplication.js +697 -0
  69. package/models/operations/getapplication.js.map +1 -0
  70. package/models/operations/index.d.ts +2 -0
  71. package/models/operations/index.d.ts.map +1 -1
  72. package/models/operations/index.js +2 -0
  73. package/models/operations/index.js.map +1 -1
  74. package/models/operations/listapplications.d.ts +141 -0
  75. package/models/operations/listapplications.d.ts.map +1 -0
  76. package/models/operations/listapplications.js +199 -0
  77. package/models/operations/listapplications.js.map +1 -0
  78. package/package.json +1 -1
  79. package/sdk/applications.d.ts +8 -0
  80. package/sdk/applications.d.ts.map +1 -1
  81. package/sdk/applications.js +14 -0
  82. package/sdk/applications.js.map +1 -1
  83. package/src/funcs/applicationsGet.ts +170 -0
  84. package/src/funcs/applicationsList.ts +164 -0
  85. package/src/lib/config.ts +3 -3
  86. package/src/models/components/businessloanbusinessapplicationrelationships.ts +52 -53
  87. package/src/models/components/commercialapplicationjsonapirelationships.ts +43 -67
  88. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +114 -94
  89. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +9 -9
  90. package/src/models/components/customerattributes.ts +0 -38
  91. package/src/models/components/customerattributescreateitem.ts +214 -0
  92. package/src/models/components/entityattributes.ts +134 -0
  93. package/src/models/components/entityattributesinput.ts +90 -0
  94. package/src/models/components/index.ts +4 -0
  95. package/src/models/components/paginationlinks.ts +88 -0
  96. package/src/models/components/paginationmeta.ts +99 -0
  97. package/src/models/components/personalloanpersonalapplicationrelationships.ts +9 -9
  98. package/src/models/operations/createapplication.ts +289 -62
  99. package/src/models/operations/getapplication.ts +1378 -0
  100. package/src/models/operations/index.ts +2 -0
  101. package/src/models/operations/listapplications.ts +364 -0
  102. package/src/sdk/applications.ts +30 -0
@@ -0,0 +1,1378 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type GetApplicationRequest = {
13
+ id: string;
14
+ include?: string | undefined;
15
+ };
16
+
17
+ /**
18
+ * The server cannot find the requested resource.
19
+ */
20
+ export type GetApplicationApplicationsResponseResponseBody = {
21
+ errors: Array<components.ResourceNotFound>;
22
+ };
23
+
24
+ /**
25
+ * Access is forbidden.
26
+ */
27
+ export type GetApplicationApplicationsResponseBody = {
28
+ errors: Array<components.ForbiddenError>;
29
+ };
30
+
31
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type =
32
+ {
33
+ CustomerAssets: "customer-assets",
34
+ } as const;
35
+ export type GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type =
36
+ ClosedEnum<
37
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type
38
+ >;
39
+
40
+ export type Included8 = {
41
+ type:
42
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type;
43
+ id: string;
44
+ attributes: components.CustomerAssetAttributes;
45
+ links?: { [k: string]: components.LinkObject } | undefined;
46
+ meta?: { [k: string]: any } | undefined;
47
+ };
48
+
49
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type =
50
+ {
51
+ CustomerLiabilities: "customer-liabilities",
52
+ } as const;
53
+ export type GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type =
54
+ ClosedEnum<
55
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type
56
+ >;
57
+
58
+ export type Included7 = {
59
+ type:
60
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type;
61
+ id: string;
62
+ attributes: components.CustomerLiabilityAttributes;
63
+ links?: { [k: string]: components.LinkObject } | undefined;
64
+ meta?: { [k: string]: any } | undefined;
65
+ };
66
+
67
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType =
68
+ {
69
+ Customers: "customers",
70
+ } as const;
71
+ export type GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType =
72
+ ClosedEnum<
73
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType
74
+ >;
75
+
76
+ export type Included6 = {
77
+ type:
78
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType;
79
+ id: string;
80
+ /**
81
+ * A customer of the proposed financing
82
+ */
83
+ attributes: components.CustomerAttributes;
84
+ links?: { [k: string]: components.LinkObject } | undefined;
85
+ meta?: { [k: string]: any } | undefined;
86
+ };
87
+
88
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONType =
89
+ {
90
+ LoanDetails: "loan-details",
91
+ } as const;
92
+ export type GetApplicationIncludedApplicationsResponse200ApplicationJSONType =
93
+ ClosedEnum<
94
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONType
95
+ >;
96
+
97
+ export type Included5 = {
98
+ type: GetApplicationIncludedApplicationsResponse200ApplicationJSONType;
99
+ id: string;
100
+ /**
101
+ * Loan details model
102
+ */
103
+ attributes: components.LoanDetailsAttributes;
104
+ links?: { [k: string]: components.LinkObject } | undefined;
105
+ meta?: { [k: string]: any } | undefined;
106
+ };
107
+
108
+ export const GetApplicationIncludedApplicationsResponse200Type = {
109
+ Entities: "entities",
110
+ } as const;
111
+ export type GetApplicationIncludedApplicationsResponse200Type = ClosedEnum<
112
+ typeof GetApplicationIncludedApplicationsResponse200Type
113
+ >;
114
+
115
+ export type Included4 = {
116
+ type: GetApplicationIncludedApplicationsResponse200Type;
117
+ id: string;
118
+ attributes: components.EntityAttributes;
119
+ links?: { [k: string]: components.LinkObject } | undefined;
120
+ meta?: { [k: string]: any } | undefined;
121
+ };
122
+
123
+ export const GetApplicationIncludedApplicationsResponseType = {
124
+ Assets: "assets",
125
+ } as const;
126
+ export type GetApplicationIncludedApplicationsResponseType = ClosedEnum<
127
+ typeof GetApplicationIncludedApplicationsResponseType
128
+ >;
129
+
130
+ export type Included3 = {
131
+ type: GetApplicationIncludedApplicationsResponseType;
132
+ id: string;
133
+ /**
134
+ * Type of asset for secured commercial loans
135
+ */
136
+ attributes: components.CommercialSecuredLoanAssetAttributes;
137
+ links?: { [k: string]: components.LinkObject } | undefined;
138
+ meta?: { [k: string]: any } | undefined;
139
+ };
140
+
141
+ export const GetApplicationIncludedApplicationsType = {
142
+ Assets: "assets",
143
+ } as const;
144
+ export type GetApplicationIncludedApplicationsType = ClosedEnum<
145
+ typeof GetApplicationIncludedApplicationsType
146
+ >;
147
+
148
+ export type Included2 = {
149
+ type: GetApplicationIncludedApplicationsType;
150
+ id: string;
151
+ /**
152
+ * The asset to be obtained by the customer, using the proposed loan financing.
153
+ */
154
+ attributes: components.ConsumerSecuredLoanAssetAttributes;
155
+ links?: { [k: string]: components.LinkObject } | undefined;
156
+ meta?: { [k: string]: any } | undefined;
157
+ };
158
+
159
+ export const GetApplicationIncludedType = {
160
+ Addresses: "addresses",
161
+ } as const;
162
+ export type GetApplicationIncludedType = ClosedEnum<
163
+ typeof GetApplicationIncludedType
164
+ >;
165
+
166
+ export type Included1 = {
167
+ type: GetApplicationIncludedType;
168
+ id: string;
169
+ attributes: components.AddressAttributes;
170
+ links?: { [k: string]: components.LinkObject } | undefined;
171
+ meta?: { [k: string]: any } | undefined;
172
+ };
173
+
174
+ export type GetApplicationIncluded =
175
+ | Included1
176
+ | Included2
177
+ | Included3
178
+ | Included4
179
+ | Included5
180
+ | Included6
181
+ | Included7
182
+ | Included8;
183
+
184
+ export type GetApplicationLinks = {};
185
+
186
+ /**
187
+ * The request has succeeded.
188
+ */
189
+ export type GetApplicationResponseBody = {
190
+ /**
191
+ * Represents either a Consumer or Commercial Application resource
192
+ */
193
+ data: components.ApplicationResource;
194
+ included?:
195
+ | Array<
196
+ | Included1
197
+ | Included2
198
+ | Included3
199
+ | Included4
200
+ | Included5
201
+ | Included6
202
+ | Included7
203
+ | Included8
204
+ >
205
+ | undefined;
206
+ links?: GetApplicationLinks | undefined;
207
+ };
208
+
209
+ export type GetApplicationResponse =
210
+ | GetApplicationResponseBody
211
+ | GetApplicationApplicationsResponseBody
212
+ | GetApplicationApplicationsResponseResponseBody;
213
+
214
+ /** @internal */
215
+ export const GetApplicationRequest$inboundSchema: z.ZodType<
216
+ GetApplicationRequest,
217
+ z.ZodTypeDef,
218
+ unknown
219
+ > = z.object({
220
+ id: z.string(),
221
+ include: z.string().optional(),
222
+ });
223
+
224
+ /** @internal */
225
+ export type GetApplicationRequest$Outbound = {
226
+ id: string;
227
+ include?: string | undefined;
228
+ };
229
+
230
+ /** @internal */
231
+ export const GetApplicationRequest$outboundSchema: z.ZodType<
232
+ GetApplicationRequest$Outbound,
233
+ z.ZodTypeDef,
234
+ GetApplicationRequest
235
+ > = z.object({
236
+ id: z.string(),
237
+ include: z.string().optional(),
238
+ });
239
+
240
+ /**
241
+ * @internal
242
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
243
+ */
244
+ export namespace GetApplicationRequest$ {
245
+ /** @deprecated use `GetApplicationRequest$inboundSchema` instead. */
246
+ export const inboundSchema = GetApplicationRequest$inboundSchema;
247
+ /** @deprecated use `GetApplicationRequest$outboundSchema` instead. */
248
+ export const outboundSchema = GetApplicationRequest$outboundSchema;
249
+ /** @deprecated use `GetApplicationRequest$Outbound` instead. */
250
+ export type Outbound = GetApplicationRequest$Outbound;
251
+ }
252
+
253
+ export function getApplicationRequestToJSON(
254
+ getApplicationRequest: GetApplicationRequest,
255
+ ): string {
256
+ return JSON.stringify(
257
+ GetApplicationRequest$outboundSchema.parse(getApplicationRequest),
258
+ );
259
+ }
260
+
261
+ export function getApplicationRequestFromJSON(
262
+ jsonString: string,
263
+ ): SafeParseResult<GetApplicationRequest, SDKValidationError> {
264
+ return safeParse(
265
+ jsonString,
266
+ (x) => GetApplicationRequest$inboundSchema.parse(JSON.parse(x)),
267
+ `Failed to parse 'GetApplicationRequest' from JSON`,
268
+ );
269
+ }
270
+
271
+ /** @internal */
272
+ export const GetApplicationApplicationsResponseResponseBody$inboundSchema:
273
+ z.ZodType<
274
+ GetApplicationApplicationsResponseResponseBody,
275
+ z.ZodTypeDef,
276
+ unknown
277
+ > = z.object({
278
+ errors: z.array(components.ResourceNotFound$inboundSchema),
279
+ });
280
+
281
+ /** @internal */
282
+ export type GetApplicationApplicationsResponseResponseBody$Outbound = {
283
+ errors: Array<components.ResourceNotFound$Outbound>;
284
+ };
285
+
286
+ /** @internal */
287
+ export const GetApplicationApplicationsResponseResponseBody$outboundSchema:
288
+ z.ZodType<
289
+ GetApplicationApplicationsResponseResponseBody$Outbound,
290
+ z.ZodTypeDef,
291
+ GetApplicationApplicationsResponseResponseBody
292
+ > = z.object({
293
+ errors: z.array(components.ResourceNotFound$outboundSchema),
294
+ });
295
+
296
+ /**
297
+ * @internal
298
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
299
+ */
300
+ export namespace GetApplicationApplicationsResponseResponseBody$ {
301
+ /** @deprecated use `GetApplicationApplicationsResponseResponseBody$inboundSchema` instead. */
302
+ export const inboundSchema =
303
+ GetApplicationApplicationsResponseResponseBody$inboundSchema;
304
+ /** @deprecated use `GetApplicationApplicationsResponseResponseBody$outboundSchema` instead. */
305
+ export const outboundSchema =
306
+ GetApplicationApplicationsResponseResponseBody$outboundSchema;
307
+ /** @deprecated use `GetApplicationApplicationsResponseResponseBody$Outbound` instead. */
308
+ export type Outbound =
309
+ GetApplicationApplicationsResponseResponseBody$Outbound;
310
+ }
311
+
312
+ export function getApplicationApplicationsResponseResponseBodyToJSON(
313
+ getApplicationApplicationsResponseResponseBody:
314
+ GetApplicationApplicationsResponseResponseBody,
315
+ ): string {
316
+ return JSON.stringify(
317
+ GetApplicationApplicationsResponseResponseBody$outboundSchema.parse(
318
+ getApplicationApplicationsResponseResponseBody,
319
+ ),
320
+ );
321
+ }
322
+
323
+ export function getApplicationApplicationsResponseResponseBodyFromJSON(
324
+ jsonString: string,
325
+ ): SafeParseResult<
326
+ GetApplicationApplicationsResponseResponseBody,
327
+ SDKValidationError
328
+ > {
329
+ return safeParse(
330
+ jsonString,
331
+ (x) =>
332
+ GetApplicationApplicationsResponseResponseBody$inboundSchema.parse(
333
+ JSON.parse(x),
334
+ ),
335
+ `Failed to parse 'GetApplicationApplicationsResponseResponseBody' from JSON`,
336
+ );
337
+ }
338
+
339
+ /** @internal */
340
+ export const GetApplicationApplicationsResponseBody$inboundSchema: z.ZodType<
341
+ GetApplicationApplicationsResponseBody,
342
+ z.ZodTypeDef,
343
+ unknown
344
+ > = z.object({
345
+ errors: z.array(components.ForbiddenError$inboundSchema),
346
+ });
347
+
348
+ /** @internal */
349
+ export type GetApplicationApplicationsResponseBody$Outbound = {
350
+ errors: Array<components.ForbiddenError$Outbound>;
351
+ };
352
+
353
+ /** @internal */
354
+ export const GetApplicationApplicationsResponseBody$outboundSchema: z.ZodType<
355
+ GetApplicationApplicationsResponseBody$Outbound,
356
+ z.ZodTypeDef,
357
+ GetApplicationApplicationsResponseBody
358
+ > = z.object({
359
+ errors: z.array(components.ForbiddenError$outboundSchema),
360
+ });
361
+
362
+ /**
363
+ * @internal
364
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
365
+ */
366
+ export namespace GetApplicationApplicationsResponseBody$ {
367
+ /** @deprecated use `GetApplicationApplicationsResponseBody$inboundSchema` instead. */
368
+ export const inboundSchema =
369
+ GetApplicationApplicationsResponseBody$inboundSchema;
370
+ /** @deprecated use `GetApplicationApplicationsResponseBody$outboundSchema` instead. */
371
+ export const outboundSchema =
372
+ GetApplicationApplicationsResponseBody$outboundSchema;
373
+ /** @deprecated use `GetApplicationApplicationsResponseBody$Outbound` instead. */
374
+ export type Outbound = GetApplicationApplicationsResponseBody$Outbound;
375
+ }
376
+
377
+ export function getApplicationApplicationsResponseBodyToJSON(
378
+ getApplicationApplicationsResponseBody:
379
+ GetApplicationApplicationsResponseBody,
380
+ ): string {
381
+ return JSON.stringify(
382
+ GetApplicationApplicationsResponseBody$outboundSchema.parse(
383
+ getApplicationApplicationsResponseBody,
384
+ ),
385
+ );
386
+ }
387
+
388
+ export function getApplicationApplicationsResponseBodyFromJSON(
389
+ jsonString: string,
390
+ ): SafeParseResult<GetApplicationApplicationsResponseBody, SDKValidationError> {
391
+ return safeParse(
392
+ jsonString,
393
+ (x) =>
394
+ GetApplicationApplicationsResponseBody$inboundSchema.parse(JSON.parse(x)),
395
+ `Failed to parse 'GetApplicationApplicationsResponseBody' from JSON`,
396
+ );
397
+ }
398
+
399
+ /** @internal */
400
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$inboundSchema:
401
+ z.ZodNativeEnum<
402
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type
403
+ > = z.nativeEnum(
404
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type,
405
+ );
406
+
407
+ /** @internal */
408
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$outboundSchema:
409
+ z.ZodNativeEnum<
410
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type
411
+ > =
412
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$inboundSchema;
413
+
414
+ /**
415
+ * @internal
416
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
417
+ */
418
+ export namespace GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$ {
419
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$inboundSchema` instead. */
420
+ export const inboundSchema =
421
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$inboundSchema;
422
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$outboundSchema` instead. */
423
+ export const outboundSchema =
424
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$outboundSchema;
425
+ }
426
+
427
+ /** @internal */
428
+ export const Included8$inboundSchema: z.ZodType<
429
+ Included8,
430
+ z.ZodTypeDef,
431
+ unknown
432
+ > = z.object({
433
+ type:
434
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$inboundSchema,
435
+ id: z.string(),
436
+ attributes: components.CustomerAssetAttributes$inboundSchema,
437
+ links: z.record(components.LinkObject$inboundSchema).optional(),
438
+ meta: z.record(z.any()).optional(),
439
+ });
440
+
441
+ /** @internal */
442
+ export type Included8$Outbound = {
443
+ type: string;
444
+ id: string;
445
+ attributes: components.CustomerAssetAttributes$Outbound;
446
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
447
+ meta?: { [k: string]: any } | undefined;
448
+ };
449
+
450
+ /** @internal */
451
+ export const Included8$outboundSchema: z.ZodType<
452
+ Included8$Outbound,
453
+ z.ZodTypeDef,
454
+ Included8
455
+ > = z.object({
456
+ type:
457
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody8Type$outboundSchema,
458
+ id: z.string(),
459
+ attributes: components.CustomerAssetAttributes$outboundSchema,
460
+ links: z.record(components.LinkObject$outboundSchema).optional(),
461
+ meta: z.record(z.any()).optional(),
462
+ });
463
+
464
+ /**
465
+ * @internal
466
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
467
+ */
468
+ export namespace Included8$ {
469
+ /** @deprecated use `Included8$inboundSchema` instead. */
470
+ export const inboundSchema = Included8$inboundSchema;
471
+ /** @deprecated use `Included8$outboundSchema` instead. */
472
+ export const outboundSchema = Included8$outboundSchema;
473
+ /** @deprecated use `Included8$Outbound` instead. */
474
+ export type Outbound = Included8$Outbound;
475
+ }
476
+
477
+ export function included8ToJSON(included8: Included8): string {
478
+ return JSON.stringify(Included8$outboundSchema.parse(included8));
479
+ }
480
+
481
+ export function included8FromJSON(
482
+ jsonString: string,
483
+ ): SafeParseResult<Included8, SDKValidationError> {
484
+ return safeParse(
485
+ jsonString,
486
+ (x) => Included8$inboundSchema.parse(JSON.parse(x)),
487
+ `Failed to parse 'Included8' from JSON`,
488
+ );
489
+ }
490
+
491
+ /** @internal */
492
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$inboundSchema:
493
+ z.ZodNativeEnum<
494
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type
495
+ > = z.nativeEnum(
496
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type,
497
+ );
498
+
499
+ /** @internal */
500
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$outboundSchema:
501
+ z.ZodNativeEnum<
502
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type
503
+ > =
504
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$inboundSchema;
505
+
506
+ /**
507
+ * @internal
508
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
509
+ */
510
+ export namespace GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$ {
511
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$inboundSchema` instead. */
512
+ export const inboundSchema =
513
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$inboundSchema;
514
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$outboundSchema` instead. */
515
+ export const outboundSchema =
516
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$outboundSchema;
517
+ }
518
+
519
+ /** @internal */
520
+ export const Included7$inboundSchema: z.ZodType<
521
+ Included7,
522
+ z.ZodTypeDef,
523
+ unknown
524
+ > = z.object({
525
+ type:
526
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$inboundSchema,
527
+ id: z.string(),
528
+ attributes: components.CustomerLiabilityAttributes$inboundSchema,
529
+ links: z.record(components.LinkObject$inboundSchema).optional(),
530
+ meta: z.record(z.any()).optional(),
531
+ });
532
+
533
+ /** @internal */
534
+ export type Included7$Outbound = {
535
+ type: string;
536
+ id: string;
537
+ attributes: components.CustomerLiabilityAttributes$Outbound;
538
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
539
+ meta?: { [k: string]: any } | undefined;
540
+ };
541
+
542
+ /** @internal */
543
+ export const Included7$outboundSchema: z.ZodType<
544
+ Included7$Outbound,
545
+ z.ZodTypeDef,
546
+ Included7
547
+ > = z.object({
548
+ type:
549
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBody7Type$outboundSchema,
550
+ id: z.string(),
551
+ attributes: components.CustomerLiabilityAttributes$outboundSchema,
552
+ links: z.record(components.LinkObject$outboundSchema).optional(),
553
+ meta: z.record(z.any()).optional(),
554
+ });
555
+
556
+ /**
557
+ * @internal
558
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
559
+ */
560
+ export namespace Included7$ {
561
+ /** @deprecated use `Included7$inboundSchema` instead. */
562
+ export const inboundSchema = Included7$inboundSchema;
563
+ /** @deprecated use `Included7$outboundSchema` instead. */
564
+ export const outboundSchema = Included7$outboundSchema;
565
+ /** @deprecated use `Included7$Outbound` instead. */
566
+ export type Outbound = Included7$Outbound;
567
+ }
568
+
569
+ export function included7ToJSON(included7: Included7): string {
570
+ return JSON.stringify(Included7$outboundSchema.parse(included7));
571
+ }
572
+
573
+ export function included7FromJSON(
574
+ jsonString: string,
575
+ ): SafeParseResult<Included7, SDKValidationError> {
576
+ return safeParse(
577
+ jsonString,
578
+ (x) => Included7$inboundSchema.parse(JSON.parse(x)),
579
+ `Failed to parse 'Included7' from JSON`,
580
+ );
581
+ }
582
+
583
+ /** @internal */
584
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$inboundSchema:
585
+ z.ZodNativeEnum<
586
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType
587
+ > = z.nativeEnum(
588
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType,
589
+ );
590
+
591
+ /** @internal */
592
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$outboundSchema:
593
+ z.ZodNativeEnum<
594
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType
595
+ > =
596
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$inboundSchema;
597
+
598
+ /**
599
+ * @internal
600
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
601
+ */
602
+ export namespace GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$ {
603
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$inboundSchema` instead. */
604
+ export const inboundSchema =
605
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$inboundSchema;
606
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$outboundSchema` instead. */
607
+ export const outboundSchema =
608
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$outboundSchema;
609
+ }
610
+
611
+ /** @internal */
612
+ export const Included6$inboundSchema: z.ZodType<
613
+ Included6,
614
+ z.ZodTypeDef,
615
+ unknown
616
+ > = z.object({
617
+ type:
618
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$inboundSchema,
619
+ id: z.string(),
620
+ attributes: components.CustomerAttributes$inboundSchema,
621
+ links: z.record(components.LinkObject$inboundSchema).optional(),
622
+ meta: z.record(z.any()).optional(),
623
+ });
624
+
625
+ /** @internal */
626
+ export type Included6$Outbound = {
627
+ type: string;
628
+ id: string;
629
+ attributes: components.CustomerAttributes$Outbound;
630
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
631
+ meta?: { [k: string]: any } | undefined;
632
+ };
633
+
634
+ /** @internal */
635
+ export const Included6$outboundSchema: z.ZodType<
636
+ Included6$Outbound,
637
+ z.ZodTypeDef,
638
+ Included6
639
+ > = z.object({
640
+ type:
641
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONResponseBodyType$outboundSchema,
642
+ id: z.string(),
643
+ attributes: components.CustomerAttributes$outboundSchema,
644
+ links: z.record(components.LinkObject$outboundSchema).optional(),
645
+ meta: z.record(z.any()).optional(),
646
+ });
647
+
648
+ /**
649
+ * @internal
650
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
651
+ */
652
+ export namespace Included6$ {
653
+ /** @deprecated use `Included6$inboundSchema` instead. */
654
+ export const inboundSchema = Included6$inboundSchema;
655
+ /** @deprecated use `Included6$outboundSchema` instead. */
656
+ export const outboundSchema = Included6$outboundSchema;
657
+ /** @deprecated use `Included6$Outbound` instead. */
658
+ export type Outbound = Included6$Outbound;
659
+ }
660
+
661
+ export function included6ToJSON(included6: Included6): string {
662
+ return JSON.stringify(Included6$outboundSchema.parse(included6));
663
+ }
664
+
665
+ export function included6FromJSON(
666
+ jsonString: string,
667
+ ): SafeParseResult<Included6, SDKValidationError> {
668
+ return safeParse(
669
+ jsonString,
670
+ (x) => Included6$inboundSchema.parse(JSON.parse(x)),
671
+ `Failed to parse 'Included6' from JSON`,
672
+ );
673
+ }
674
+
675
+ /** @internal */
676
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONType$inboundSchema:
677
+ z.ZodNativeEnum<
678
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONType
679
+ > = z.nativeEnum(
680
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONType,
681
+ );
682
+
683
+ /** @internal */
684
+ export const GetApplicationIncludedApplicationsResponse200ApplicationJSONType$outboundSchema:
685
+ z.ZodNativeEnum<
686
+ typeof GetApplicationIncludedApplicationsResponse200ApplicationJSONType
687
+ > =
688
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONType$inboundSchema;
689
+
690
+ /**
691
+ * @internal
692
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
693
+ */
694
+ export namespace GetApplicationIncludedApplicationsResponse200ApplicationJSONType$ {
695
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONType$inboundSchema` instead. */
696
+ export const inboundSchema =
697
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONType$inboundSchema;
698
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200ApplicationJSONType$outboundSchema` instead. */
699
+ export const outboundSchema =
700
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONType$outboundSchema;
701
+ }
702
+
703
+ /** @internal */
704
+ export const Included5$inboundSchema: z.ZodType<
705
+ Included5,
706
+ z.ZodTypeDef,
707
+ unknown
708
+ > = z.object({
709
+ type:
710
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONType$inboundSchema,
711
+ id: z.string(),
712
+ attributes: components.LoanDetailsAttributes$inboundSchema,
713
+ links: z.record(components.LinkObject$inboundSchema).optional(),
714
+ meta: z.record(z.any()).optional(),
715
+ });
716
+
717
+ /** @internal */
718
+ export type Included5$Outbound = {
719
+ type: string;
720
+ id: string;
721
+ attributes: components.LoanDetailsAttributes$Outbound;
722
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
723
+ meta?: { [k: string]: any } | undefined;
724
+ };
725
+
726
+ /** @internal */
727
+ export const Included5$outboundSchema: z.ZodType<
728
+ Included5$Outbound,
729
+ z.ZodTypeDef,
730
+ Included5
731
+ > = z.object({
732
+ type:
733
+ GetApplicationIncludedApplicationsResponse200ApplicationJSONType$outboundSchema,
734
+ id: z.string(),
735
+ attributes: components.LoanDetailsAttributes$outboundSchema,
736
+ links: z.record(components.LinkObject$outboundSchema).optional(),
737
+ meta: z.record(z.any()).optional(),
738
+ });
739
+
740
+ /**
741
+ * @internal
742
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
743
+ */
744
+ export namespace Included5$ {
745
+ /** @deprecated use `Included5$inboundSchema` instead. */
746
+ export const inboundSchema = Included5$inboundSchema;
747
+ /** @deprecated use `Included5$outboundSchema` instead. */
748
+ export const outboundSchema = Included5$outboundSchema;
749
+ /** @deprecated use `Included5$Outbound` instead. */
750
+ export type Outbound = Included5$Outbound;
751
+ }
752
+
753
+ export function included5ToJSON(included5: Included5): string {
754
+ return JSON.stringify(Included5$outboundSchema.parse(included5));
755
+ }
756
+
757
+ export function included5FromJSON(
758
+ jsonString: string,
759
+ ): SafeParseResult<Included5, SDKValidationError> {
760
+ return safeParse(
761
+ jsonString,
762
+ (x) => Included5$inboundSchema.parse(JSON.parse(x)),
763
+ `Failed to parse 'Included5' from JSON`,
764
+ );
765
+ }
766
+
767
+ /** @internal */
768
+ export const GetApplicationIncludedApplicationsResponse200Type$inboundSchema:
769
+ z.ZodNativeEnum<typeof GetApplicationIncludedApplicationsResponse200Type> = z
770
+ .nativeEnum(GetApplicationIncludedApplicationsResponse200Type);
771
+
772
+ /** @internal */
773
+ export const GetApplicationIncludedApplicationsResponse200Type$outboundSchema:
774
+ z.ZodNativeEnum<typeof GetApplicationIncludedApplicationsResponse200Type> =
775
+ GetApplicationIncludedApplicationsResponse200Type$inboundSchema;
776
+
777
+ /**
778
+ * @internal
779
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
780
+ */
781
+ export namespace GetApplicationIncludedApplicationsResponse200Type$ {
782
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200Type$inboundSchema` instead. */
783
+ export const inboundSchema =
784
+ GetApplicationIncludedApplicationsResponse200Type$inboundSchema;
785
+ /** @deprecated use `GetApplicationIncludedApplicationsResponse200Type$outboundSchema` instead. */
786
+ export const outboundSchema =
787
+ GetApplicationIncludedApplicationsResponse200Type$outboundSchema;
788
+ }
789
+
790
+ /** @internal */
791
+ export const Included4$inboundSchema: z.ZodType<
792
+ Included4,
793
+ z.ZodTypeDef,
794
+ unknown
795
+ > = z.object({
796
+ type: GetApplicationIncludedApplicationsResponse200Type$inboundSchema,
797
+ id: z.string(),
798
+ attributes: components.EntityAttributes$inboundSchema,
799
+ links: z.record(components.LinkObject$inboundSchema).optional(),
800
+ meta: z.record(z.any()).optional(),
801
+ });
802
+
803
+ /** @internal */
804
+ export type Included4$Outbound = {
805
+ type: string;
806
+ id: string;
807
+ attributes: components.EntityAttributes$Outbound;
808
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
809
+ meta?: { [k: string]: any } | undefined;
810
+ };
811
+
812
+ /** @internal */
813
+ export const Included4$outboundSchema: z.ZodType<
814
+ Included4$Outbound,
815
+ z.ZodTypeDef,
816
+ Included4
817
+ > = z.object({
818
+ type: GetApplicationIncludedApplicationsResponse200Type$outboundSchema,
819
+ id: z.string(),
820
+ attributes: components.EntityAttributes$outboundSchema,
821
+ links: z.record(components.LinkObject$outboundSchema).optional(),
822
+ meta: z.record(z.any()).optional(),
823
+ });
824
+
825
+ /**
826
+ * @internal
827
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
828
+ */
829
+ export namespace Included4$ {
830
+ /** @deprecated use `Included4$inboundSchema` instead. */
831
+ export const inboundSchema = Included4$inboundSchema;
832
+ /** @deprecated use `Included4$outboundSchema` instead. */
833
+ export const outboundSchema = Included4$outboundSchema;
834
+ /** @deprecated use `Included4$Outbound` instead. */
835
+ export type Outbound = Included4$Outbound;
836
+ }
837
+
838
+ export function included4ToJSON(included4: Included4): string {
839
+ return JSON.stringify(Included4$outboundSchema.parse(included4));
840
+ }
841
+
842
+ export function included4FromJSON(
843
+ jsonString: string,
844
+ ): SafeParseResult<Included4, SDKValidationError> {
845
+ return safeParse(
846
+ jsonString,
847
+ (x) => Included4$inboundSchema.parse(JSON.parse(x)),
848
+ `Failed to parse 'Included4' from JSON`,
849
+ );
850
+ }
851
+
852
+ /** @internal */
853
+ export const GetApplicationIncludedApplicationsResponseType$inboundSchema:
854
+ z.ZodNativeEnum<typeof GetApplicationIncludedApplicationsResponseType> = z
855
+ .nativeEnum(GetApplicationIncludedApplicationsResponseType);
856
+
857
+ /** @internal */
858
+ export const GetApplicationIncludedApplicationsResponseType$outboundSchema:
859
+ z.ZodNativeEnum<typeof GetApplicationIncludedApplicationsResponseType> =
860
+ GetApplicationIncludedApplicationsResponseType$inboundSchema;
861
+
862
+ /**
863
+ * @internal
864
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
865
+ */
866
+ export namespace GetApplicationIncludedApplicationsResponseType$ {
867
+ /** @deprecated use `GetApplicationIncludedApplicationsResponseType$inboundSchema` instead. */
868
+ export const inboundSchema =
869
+ GetApplicationIncludedApplicationsResponseType$inboundSchema;
870
+ /** @deprecated use `GetApplicationIncludedApplicationsResponseType$outboundSchema` instead. */
871
+ export const outboundSchema =
872
+ GetApplicationIncludedApplicationsResponseType$outboundSchema;
873
+ }
874
+
875
+ /** @internal */
876
+ export const Included3$inboundSchema: z.ZodType<
877
+ Included3,
878
+ z.ZodTypeDef,
879
+ unknown
880
+ > = z.object({
881
+ type: GetApplicationIncludedApplicationsResponseType$inboundSchema,
882
+ id: z.string(),
883
+ attributes: components.CommercialSecuredLoanAssetAttributes$inboundSchema,
884
+ links: z.record(components.LinkObject$inboundSchema).optional(),
885
+ meta: z.record(z.any()).optional(),
886
+ });
887
+
888
+ /** @internal */
889
+ export type Included3$Outbound = {
890
+ type: string;
891
+ id: string;
892
+ attributes: components.CommercialSecuredLoanAssetAttributes$Outbound;
893
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
894
+ meta?: { [k: string]: any } | undefined;
895
+ };
896
+
897
+ /** @internal */
898
+ export const Included3$outboundSchema: z.ZodType<
899
+ Included3$Outbound,
900
+ z.ZodTypeDef,
901
+ Included3
902
+ > = z.object({
903
+ type: GetApplicationIncludedApplicationsResponseType$outboundSchema,
904
+ id: z.string(),
905
+ attributes: components.CommercialSecuredLoanAssetAttributes$outboundSchema,
906
+ links: z.record(components.LinkObject$outboundSchema).optional(),
907
+ meta: z.record(z.any()).optional(),
908
+ });
909
+
910
+ /**
911
+ * @internal
912
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
913
+ */
914
+ export namespace Included3$ {
915
+ /** @deprecated use `Included3$inboundSchema` instead. */
916
+ export const inboundSchema = Included3$inboundSchema;
917
+ /** @deprecated use `Included3$outboundSchema` instead. */
918
+ export const outboundSchema = Included3$outboundSchema;
919
+ /** @deprecated use `Included3$Outbound` instead. */
920
+ export type Outbound = Included3$Outbound;
921
+ }
922
+
923
+ export function included3ToJSON(included3: Included3): string {
924
+ return JSON.stringify(Included3$outboundSchema.parse(included3));
925
+ }
926
+
927
+ export function included3FromJSON(
928
+ jsonString: string,
929
+ ): SafeParseResult<Included3, SDKValidationError> {
930
+ return safeParse(
931
+ jsonString,
932
+ (x) => Included3$inboundSchema.parse(JSON.parse(x)),
933
+ `Failed to parse 'Included3' from JSON`,
934
+ );
935
+ }
936
+
937
+ /** @internal */
938
+ export const GetApplicationIncludedApplicationsType$inboundSchema:
939
+ z.ZodNativeEnum<typeof GetApplicationIncludedApplicationsType> = z.nativeEnum(
940
+ GetApplicationIncludedApplicationsType,
941
+ );
942
+
943
+ /** @internal */
944
+ export const GetApplicationIncludedApplicationsType$outboundSchema:
945
+ z.ZodNativeEnum<typeof GetApplicationIncludedApplicationsType> =
946
+ GetApplicationIncludedApplicationsType$inboundSchema;
947
+
948
+ /**
949
+ * @internal
950
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
951
+ */
952
+ export namespace GetApplicationIncludedApplicationsType$ {
953
+ /** @deprecated use `GetApplicationIncludedApplicationsType$inboundSchema` instead. */
954
+ export const inboundSchema =
955
+ GetApplicationIncludedApplicationsType$inboundSchema;
956
+ /** @deprecated use `GetApplicationIncludedApplicationsType$outboundSchema` instead. */
957
+ export const outboundSchema =
958
+ GetApplicationIncludedApplicationsType$outboundSchema;
959
+ }
960
+
961
+ /** @internal */
962
+ export const Included2$inboundSchema: z.ZodType<
963
+ Included2,
964
+ z.ZodTypeDef,
965
+ unknown
966
+ > = z.object({
967
+ type: GetApplicationIncludedApplicationsType$inboundSchema,
968
+ id: z.string(),
969
+ attributes: components.ConsumerSecuredLoanAssetAttributes$inboundSchema,
970
+ links: z.record(components.LinkObject$inboundSchema).optional(),
971
+ meta: z.record(z.any()).optional(),
972
+ });
973
+
974
+ /** @internal */
975
+ export type Included2$Outbound = {
976
+ type: string;
977
+ id: string;
978
+ attributes: components.ConsumerSecuredLoanAssetAttributes$Outbound;
979
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
980
+ meta?: { [k: string]: any } | undefined;
981
+ };
982
+
983
+ /** @internal */
984
+ export const Included2$outboundSchema: z.ZodType<
985
+ Included2$Outbound,
986
+ z.ZodTypeDef,
987
+ Included2
988
+ > = z.object({
989
+ type: GetApplicationIncludedApplicationsType$outboundSchema,
990
+ id: z.string(),
991
+ attributes: components.ConsumerSecuredLoanAssetAttributes$outboundSchema,
992
+ links: z.record(components.LinkObject$outboundSchema).optional(),
993
+ meta: z.record(z.any()).optional(),
994
+ });
995
+
996
+ /**
997
+ * @internal
998
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
999
+ */
1000
+ export namespace Included2$ {
1001
+ /** @deprecated use `Included2$inboundSchema` instead. */
1002
+ export const inboundSchema = Included2$inboundSchema;
1003
+ /** @deprecated use `Included2$outboundSchema` instead. */
1004
+ export const outboundSchema = Included2$outboundSchema;
1005
+ /** @deprecated use `Included2$Outbound` instead. */
1006
+ export type Outbound = Included2$Outbound;
1007
+ }
1008
+
1009
+ export function included2ToJSON(included2: Included2): string {
1010
+ return JSON.stringify(Included2$outboundSchema.parse(included2));
1011
+ }
1012
+
1013
+ export function included2FromJSON(
1014
+ jsonString: string,
1015
+ ): SafeParseResult<Included2, SDKValidationError> {
1016
+ return safeParse(
1017
+ jsonString,
1018
+ (x) => Included2$inboundSchema.parse(JSON.parse(x)),
1019
+ `Failed to parse 'Included2' from JSON`,
1020
+ );
1021
+ }
1022
+
1023
+ /** @internal */
1024
+ export const GetApplicationIncludedType$inboundSchema: z.ZodNativeEnum<
1025
+ typeof GetApplicationIncludedType
1026
+ > = z.nativeEnum(GetApplicationIncludedType);
1027
+
1028
+ /** @internal */
1029
+ export const GetApplicationIncludedType$outboundSchema: z.ZodNativeEnum<
1030
+ typeof GetApplicationIncludedType
1031
+ > = GetApplicationIncludedType$inboundSchema;
1032
+
1033
+ /**
1034
+ * @internal
1035
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1036
+ */
1037
+ export namespace GetApplicationIncludedType$ {
1038
+ /** @deprecated use `GetApplicationIncludedType$inboundSchema` instead. */
1039
+ export const inboundSchema = GetApplicationIncludedType$inboundSchema;
1040
+ /** @deprecated use `GetApplicationIncludedType$outboundSchema` instead. */
1041
+ export const outboundSchema = GetApplicationIncludedType$outboundSchema;
1042
+ }
1043
+
1044
+ /** @internal */
1045
+ export const Included1$inboundSchema: z.ZodType<
1046
+ Included1,
1047
+ z.ZodTypeDef,
1048
+ unknown
1049
+ > = z.object({
1050
+ type: GetApplicationIncludedType$inboundSchema,
1051
+ id: z.string(),
1052
+ attributes: components.AddressAttributes$inboundSchema,
1053
+ links: z.record(components.LinkObject$inboundSchema).optional(),
1054
+ meta: z.record(z.any()).optional(),
1055
+ });
1056
+
1057
+ /** @internal */
1058
+ export type Included1$Outbound = {
1059
+ type: string;
1060
+ id: string;
1061
+ attributes: components.AddressAttributes$Outbound;
1062
+ links?: { [k: string]: components.LinkObject$Outbound } | undefined;
1063
+ meta?: { [k: string]: any } | undefined;
1064
+ };
1065
+
1066
+ /** @internal */
1067
+ export const Included1$outboundSchema: z.ZodType<
1068
+ Included1$Outbound,
1069
+ z.ZodTypeDef,
1070
+ Included1
1071
+ > = z.object({
1072
+ type: GetApplicationIncludedType$outboundSchema,
1073
+ id: z.string(),
1074
+ attributes: components.AddressAttributes$outboundSchema,
1075
+ links: z.record(components.LinkObject$outboundSchema).optional(),
1076
+ meta: z.record(z.any()).optional(),
1077
+ });
1078
+
1079
+ /**
1080
+ * @internal
1081
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1082
+ */
1083
+ export namespace Included1$ {
1084
+ /** @deprecated use `Included1$inboundSchema` instead. */
1085
+ export const inboundSchema = Included1$inboundSchema;
1086
+ /** @deprecated use `Included1$outboundSchema` instead. */
1087
+ export const outboundSchema = Included1$outboundSchema;
1088
+ /** @deprecated use `Included1$Outbound` instead. */
1089
+ export type Outbound = Included1$Outbound;
1090
+ }
1091
+
1092
+ export function included1ToJSON(included1: Included1): string {
1093
+ return JSON.stringify(Included1$outboundSchema.parse(included1));
1094
+ }
1095
+
1096
+ export function included1FromJSON(
1097
+ jsonString: string,
1098
+ ): SafeParseResult<Included1, SDKValidationError> {
1099
+ return safeParse(
1100
+ jsonString,
1101
+ (x) => Included1$inboundSchema.parse(JSON.parse(x)),
1102
+ `Failed to parse 'Included1' from JSON`,
1103
+ );
1104
+ }
1105
+
1106
+ /** @internal */
1107
+ export const GetApplicationIncluded$inboundSchema: z.ZodType<
1108
+ GetApplicationIncluded,
1109
+ z.ZodTypeDef,
1110
+ unknown
1111
+ > = z.union([
1112
+ z.lazy(() => Included1$inboundSchema),
1113
+ z.lazy(() => Included2$inboundSchema),
1114
+ z.lazy(() => Included3$inboundSchema),
1115
+ z.lazy(() => Included4$inboundSchema),
1116
+ z.lazy(() => Included5$inboundSchema),
1117
+ z.lazy(() => Included6$inboundSchema),
1118
+ z.lazy(() => Included7$inboundSchema),
1119
+ z.lazy(() => Included8$inboundSchema),
1120
+ ]);
1121
+
1122
+ /** @internal */
1123
+ export type GetApplicationIncluded$Outbound =
1124
+ | Included1$Outbound
1125
+ | Included2$Outbound
1126
+ | Included3$Outbound
1127
+ | Included4$Outbound
1128
+ | Included5$Outbound
1129
+ | Included6$Outbound
1130
+ | Included7$Outbound
1131
+ | Included8$Outbound;
1132
+
1133
+ /** @internal */
1134
+ export const GetApplicationIncluded$outboundSchema: z.ZodType<
1135
+ GetApplicationIncluded$Outbound,
1136
+ z.ZodTypeDef,
1137
+ GetApplicationIncluded
1138
+ > = z.union([
1139
+ z.lazy(() => Included1$outboundSchema),
1140
+ z.lazy(() => Included2$outboundSchema),
1141
+ z.lazy(() => Included3$outboundSchema),
1142
+ z.lazy(() => Included4$outboundSchema),
1143
+ z.lazy(() => Included5$outboundSchema),
1144
+ z.lazy(() => Included6$outboundSchema),
1145
+ z.lazy(() => Included7$outboundSchema),
1146
+ z.lazy(() => Included8$outboundSchema),
1147
+ ]);
1148
+
1149
+ /**
1150
+ * @internal
1151
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1152
+ */
1153
+ export namespace GetApplicationIncluded$ {
1154
+ /** @deprecated use `GetApplicationIncluded$inboundSchema` instead. */
1155
+ export const inboundSchema = GetApplicationIncluded$inboundSchema;
1156
+ /** @deprecated use `GetApplicationIncluded$outboundSchema` instead. */
1157
+ export const outboundSchema = GetApplicationIncluded$outboundSchema;
1158
+ /** @deprecated use `GetApplicationIncluded$Outbound` instead. */
1159
+ export type Outbound = GetApplicationIncluded$Outbound;
1160
+ }
1161
+
1162
+ export function getApplicationIncludedToJSON(
1163
+ getApplicationIncluded: GetApplicationIncluded,
1164
+ ): string {
1165
+ return JSON.stringify(
1166
+ GetApplicationIncluded$outboundSchema.parse(getApplicationIncluded),
1167
+ );
1168
+ }
1169
+
1170
+ export function getApplicationIncludedFromJSON(
1171
+ jsonString: string,
1172
+ ): SafeParseResult<GetApplicationIncluded, SDKValidationError> {
1173
+ return safeParse(
1174
+ jsonString,
1175
+ (x) => GetApplicationIncluded$inboundSchema.parse(JSON.parse(x)),
1176
+ `Failed to parse 'GetApplicationIncluded' from JSON`,
1177
+ );
1178
+ }
1179
+
1180
+ /** @internal */
1181
+ export const GetApplicationLinks$inboundSchema: z.ZodType<
1182
+ GetApplicationLinks,
1183
+ z.ZodTypeDef,
1184
+ unknown
1185
+ > = z.object({});
1186
+
1187
+ /** @internal */
1188
+ export type GetApplicationLinks$Outbound = {};
1189
+
1190
+ /** @internal */
1191
+ export const GetApplicationLinks$outboundSchema: z.ZodType<
1192
+ GetApplicationLinks$Outbound,
1193
+ z.ZodTypeDef,
1194
+ GetApplicationLinks
1195
+ > = z.object({});
1196
+
1197
+ /**
1198
+ * @internal
1199
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1200
+ */
1201
+ export namespace GetApplicationLinks$ {
1202
+ /** @deprecated use `GetApplicationLinks$inboundSchema` instead. */
1203
+ export const inboundSchema = GetApplicationLinks$inboundSchema;
1204
+ /** @deprecated use `GetApplicationLinks$outboundSchema` instead. */
1205
+ export const outboundSchema = GetApplicationLinks$outboundSchema;
1206
+ /** @deprecated use `GetApplicationLinks$Outbound` instead. */
1207
+ export type Outbound = GetApplicationLinks$Outbound;
1208
+ }
1209
+
1210
+ export function getApplicationLinksToJSON(
1211
+ getApplicationLinks: GetApplicationLinks,
1212
+ ): string {
1213
+ return JSON.stringify(
1214
+ GetApplicationLinks$outboundSchema.parse(getApplicationLinks),
1215
+ );
1216
+ }
1217
+
1218
+ export function getApplicationLinksFromJSON(
1219
+ jsonString: string,
1220
+ ): SafeParseResult<GetApplicationLinks, SDKValidationError> {
1221
+ return safeParse(
1222
+ jsonString,
1223
+ (x) => GetApplicationLinks$inboundSchema.parse(JSON.parse(x)),
1224
+ `Failed to parse 'GetApplicationLinks' from JSON`,
1225
+ );
1226
+ }
1227
+
1228
+ /** @internal */
1229
+ export const GetApplicationResponseBody$inboundSchema: z.ZodType<
1230
+ GetApplicationResponseBody,
1231
+ z.ZodTypeDef,
1232
+ unknown
1233
+ > = z.object({
1234
+ data: components.ApplicationResource$inboundSchema,
1235
+ included: z.array(
1236
+ z.union([
1237
+ z.lazy(() => Included1$inboundSchema),
1238
+ z.lazy(() => Included2$inboundSchema),
1239
+ z.lazy(() => Included3$inboundSchema),
1240
+ z.lazy(() => Included4$inboundSchema),
1241
+ z.lazy(() => Included5$inboundSchema),
1242
+ z.lazy(() => Included6$inboundSchema),
1243
+ z.lazy(() => Included7$inboundSchema),
1244
+ z.lazy(() => Included8$inboundSchema),
1245
+ ]),
1246
+ ).optional(),
1247
+ links: z.lazy(() => GetApplicationLinks$inboundSchema).optional(),
1248
+ });
1249
+
1250
+ /** @internal */
1251
+ export type GetApplicationResponseBody$Outbound = {
1252
+ data: components.ApplicationResource$Outbound;
1253
+ included?:
1254
+ | Array<
1255
+ | Included1$Outbound
1256
+ | Included2$Outbound
1257
+ | Included3$Outbound
1258
+ | Included4$Outbound
1259
+ | Included5$Outbound
1260
+ | Included6$Outbound
1261
+ | Included7$Outbound
1262
+ | Included8$Outbound
1263
+ >
1264
+ | undefined;
1265
+ links?: GetApplicationLinks$Outbound | undefined;
1266
+ };
1267
+
1268
+ /** @internal */
1269
+ export const GetApplicationResponseBody$outboundSchema: z.ZodType<
1270
+ GetApplicationResponseBody$Outbound,
1271
+ z.ZodTypeDef,
1272
+ GetApplicationResponseBody
1273
+ > = z.object({
1274
+ data: components.ApplicationResource$outboundSchema,
1275
+ included: z.array(
1276
+ z.union([
1277
+ z.lazy(() => Included1$outboundSchema),
1278
+ z.lazy(() => Included2$outboundSchema),
1279
+ z.lazy(() => Included3$outboundSchema),
1280
+ z.lazy(() => Included4$outboundSchema),
1281
+ z.lazy(() => Included5$outboundSchema),
1282
+ z.lazy(() => Included6$outboundSchema),
1283
+ z.lazy(() => Included7$outboundSchema),
1284
+ z.lazy(() => Included8$outboundSchema),
1285
+ ]),
1286
+ ).optional(),
1287
+ links: z.lazy(() => GetApplicationLinks$outboundSchema).optional(),
1288
+ });
1289
+
1290
+ /**
1291
+ * @internal
1292
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1293
+ */
1294
+ export namespace GetApplicationResponseBody$ {
1295
+ /** @deprecated use `GetApplicationResponseBody$inboundSchema` instead. */
1296
+ export const inboundSchema = GetApplicationResponseBody$inboundSchema;
1297
+ /** @deprecated use `GetApplicationResponseBody$outboundSchema` instead. */
1298
+ export const outboundSchema = GetApplicationResponseBody$outboundSchema;
1299
+ /** @deprecated use `GetApplicationResponseBody$Outbound` instead. */
1300
+ export type Outbound = GetApplicationResponseBody$Outbound;
1301
+ }
1302
+
1303
+ export function getApplicationResponseBodyToJSON(
1304
+ getApplicationResponseBody: GetApplicationResponseBody,
1305
+ ): string {
1306
+ return JSON.stringify(
1307
+ GetApplicationResponseBody$outboundSchema.parse(getApplicationResponseBody),
1308
+ );
1309
+ }
1310
+
1311
+ export function getApplicationResponseBodyFromJSON(
1312
+ jsonString: string,
1313
+ ): SafeParseResult<GetApplicationResponseBody, SDKValidationError> {
1314
+ return safeParse(
1315
+ jsonString,
1316
+ (x) => GetApplicationResponseBody$inboundSchema.parse(JSON.parse(x)),
1317
+ `Failed to parse 'GetApplicationResponseBody' from JSON`,
1318
+ );
1319
+ }
1320
+
1321
+ /** @internal */
1322
+ export const GetApplicationResponse$inboundSchema: z.ZodType<
1323
+ GetApplicationResponse,
1324
+ z.ZodTypeDef,
1325
+ unknown
1326
+ > = z.union([
1327
+ z.lazy(() => GetApplicationResponseBody$inboundSchema),
1328
+ z.lazy(() => GetApplicationApplicationsResponseBody$inboundSchema),
1329
+ z.lazy(() => GetApplicationApplicationsResponseResponseBody$inboundSchema),
1330
+ ]);
1331
+
1332
+ /** @internal */
1333
+ export type GetApplicationResponse$Outbound =
1334
+ | GetApplicationResponseBody$Outbound
1335
+ | GetApplicationApplicationsResponseBody$Outbound
1336
+ | GetApplicationApplicationsResponseResponseBody$Outbound;
1337
+
1338
+ /** @internal */
1339
+ export const GetApplicationResponse$outboundSchema: z.ZodType<
1340
+ GetApplicationResponse$Outbound,
1341
+ z.ZodTypeDef,
1342
+ GetApplicationResponse
1343
+ > = z.union([
1344
+ z.lazy(() => GetApplicationResponseBody$outboundSchema),
1345
+ z.lazy(() => GetApplicationApplicationsResponseBody$outboundSchema),
1346
+ z.lazy(() => GetApplicationApplicationsResponseResponseBody$outboundSchema),
1347
+ ]);
1348
+
1349
+ /**
1350
+ * @internal
1351
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1352
+ */
1353
+ export namespace GetApplicationResponse$ {
1354
+ /** @deprecated use `GetApplicationResponse$inboundSchema` instead. */
1355
+ export const inboundSchema = GetApplicationResponse$inboundSchema;
1356
+ /** @deprecated use `GetApplicationResponse$outboundSchema` instead. */
1357
+ export const outboundSchema = GetApplicationResponse$outboundSchema;
1358
+ /** @deprecated use `GetApplicationResponse$Outbound` instead. */
1359
+ export type Outbound = GetApplicationResponse$Outbound;
1360
+ }
1361
+
1362
+ export function getApplicationResponseToJSON(
1363
+ getApplicationResponse: GetApplicationResponse,
1364
+ ): string {
1365
+ return JSON.stringify(
1366
+ GetApplicationResponse$outboundSchema.parse(getApplicationResponse),
1367
+ );
1368
+ }
1369
+
1370
+ export function getApplicationResponseFromJSON(
1371
+ jsonString: string,
1372
+ ): SafeParseResult<GetApplicationResponse, SDKValidationError> {
1373
+ return safeParse(
1374
+ jsonString,
1375
+ (x) => GetApplicationResponse$inboundSchema.parse(JSON.parse(x)),
1376
+ `Failed to parse 'GetApplicationResponse' from JSON`,
1377
+ );
1378
+ }