@financeable/aggregation 0.5.1 → 0.6.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 (297) hide show
  1. package/FUNCTIONS.md +14 -131
  2. package/README.md +271 -1512
  3. package/docs/sdks/applications/README.md +24 -383
  4. package/docs/sdks/oauthtoken/README.md +5 -5
  5. package/docs/sdks/supportingdocuments/README.md +121 -0
  6. package/funcs/applicationsCreate.d.ts +1 -2
  7. package/funcs/applicationsCreate.d.ts.map +1 -1
  8. package/funcs/applicationsCreate.js +3 -4
  9. package/funcs/applicationsCreate.js.map +1 -1
  10. package/funcs/{oauthTokenGet.d.ts → oauthTokenOauthToken.d.ts} +2 -2
  11. package/funcs/oauthTokenOauthToken.d.ts.map +1 -0
  12. package/funcs/{oauthTokenGet.js → oauthTokenOauthToken.js} +3 -3
  13. package/funcs/oauthTokenOauthToken.js.map +1 -0
  14. package/funcs/supportingDocumentsCreate.d.ts +14 -0
  15. package/funcs/supportingDocumentsCreate.d.ts.map +1 -0
  16. package/funcs/{applicationsList.js → supportingDocumentsCreate.js} +14 -12
  17. package/funcs/supportingDocumentsCreate.js.map +1 -0
  18. package/jsr.json +1 -1
  19. package/lib/config.d.ts +4 -4
  20. package/lib/config.d.ts.map +1 -1
  21. package/lib/config.js +4 -7
  22. package/lib/config.js.map +1 -1
  23. package/lib/matchers.d.ts +3 -1
  24. package/lib/matchers.d.ts.map +1 -1
  25. package/lib/matchers.js +12 -0
  26. package/lib/matchers.js.map +1 -1
  27. package/lib/sdks.d.ts +3 -1
  28. package/lib/sdks.d.ts.map +1 -1
  29. package/lib/sdks.js +13 -13
  30. package/lib/sdks.js.map +1 -1
  31. package/models/components/addressattributes.d.ts +10 -8
  32. package/models/components/addressattributes.d.ts.map +1 -1
  33. package/models/components/addressattributes.js +15 -14
  34. package/models/components/addressattributes.js.map +1 -1
  35. package/models/components/applicationresource.d.ts +30 -0
  36. package/models/components/applicationresource.d.ts.map +1 -0
  37. package/models/components/applicationresource.js +73 -0
  38. package/models/components/applicationresource.js.map +1 -0
  39. package/models/components/badrequesterror.d.ts +119 -0
  40. package/models/components/badrequesterror.d.ts.map +1 -0
  41. package/models/components/badrequesterror.js +140 -0
  42. package/models/components/badrequesterror.js.map +1 -0
  43. package/models/components/commercialapplicationjsonapirelationships.d.ts +384 -0
  44. package/models/components/commercialapplicationjsonapirelationships.d.ts.map +1 -0
  45. package/models/components/commercialapplicationjsonapirelationships.js +391 -0
  46. package/models/components/commercialapplicationjsonapirelationships.js.map +1 -0
  47. package/models/components/commercialsecuredapplicationpayload.d.ts +164 -0
  48. package/models/components/commercialsecuredapplicationpayload.d.ts.map +1 -0
  49. package/models/components/commercialsecuredapplicationpayload.js +158 -0
  50. package/models/components/commercialsecuredapplicationpayload.js.map +1 -0
  51. package/models/components/commercialsecuredapplicationresource.d.ts +171 -0
  52. package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -0
  53. package/models/components/commercialsecuredapplicationresource.js +161 -0
  54. package/models/components/commercialsecuredapplicationresource.js.map +1 -0
  55. package/models/components/commercialsecuredloanassetattributes.d.ts +237 -0
  56. package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -0
  57. package/models/components/commercialsecuredloanassetattributes.js +170 -0
  58. package/models/components/commercialsecuredloanassetattributes.js.map +1 -0
  59. package/models/components/commercialsecuredloanassettype.d.ts +100 -0
  60. package/models/components/commercialsecuredloanassettype.d.ts.map +1 -0
  61. package/models/components/commercialsecuredloanassettype.js +84 -0
  62. package/models/components/commercialsecuredloanassettype.js.map +1 -0
  63. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +537 -0
  64. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -0
  65. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +548 -0
  66. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -0
  67. package/models/components/consumerapplicationjsonapirelationships.d.ts +296 -0
  68. package/models/components/consumerapplicationjsonapirelationships.d.ts.map +1 -0
  69. package/models/components/consumerapplicationjsonapirelationships.js +310 -0
  70. package/models/components/consumerapplicationjsonapirelationships.js.map +1 -0
  71. package/models/components/consumersecuredapplicationpayload.d.ts +164 -0
  72. package/models/components/consumersecuredapplicationpayload.d.ts.map +1 -0
  73. package/models/components/consumersecuredapplicationpayload.js +158 -0
  74. package/models/components/consumersecuredapplicationpayload.js.map +1 -0
  75. package/models/components/consumersecuredapplicationresource.d.ts +171 -0
  76. package/models/components/consumersecuredapplicationresource.d.ts.map +1 -0
  77. package/models/components/consumersecuredapplicationresource.js +161 -0
  78. package/models/components/consumersecuredapplicationresource.js.map +1 -0
  79. package/models/components/consumersecuredloanassetattributes.d.ts +237 -0
  80. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -0
  81. package/models/components/consumersecuredloanassetattributes.js +172 -0
  82. package/models/components/consumersecuredloanassetattributes.js.map +1 -0
  83. package/models/components/consumersecuredloanassettype.d.ts +64 -0
  84. package/models/components/consumersecuredloanassettype.d.ts.map +1 -0
  85. package/models/components/{consumerassettype.js → consumersecuredloanassettype.js} +27 -28
  86. package/models/components/consumersecuredloanassettype.js.map +1 -0
  87. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +425 -0
  88. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -0
  89. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +443 -0
  90. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
  91. package/models/components/createsupportingdocumentsresponse.d.ts +124 -0
  92. package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -0
  93. package/models/components/createsupportingdocumentsresponse.js +138 -0
  94. package/models/components/createsupportingdocumentsresponse.js.map +1 -0
  95. package/models/components/customerattributes.d.ts +2 -0
  96. package/models/components/customerattributes.d.ts.map +1 -1
  97. package/models/components/customerattributes.js +2 -0
  98. package/models/components/customerattributes.js.map +1 -1
  99. package/models/components/documenttype.d.ts +70 -0
  100. package/models/components/documenttype.d.ts.map +1 -0
  101. package/models/{errors/responsebody.js → components/documenttype.js} +28 -34
  102. package/models/components/documenttype.js.map +1 -0
  103. package/models/components/entityattributes.d.ts +2 -22
  104. package/models/components/entityattributes.d.ts.map +1 -1
  105. package/models/components/entityattributes.js +2 -19
  106. package/models/components/entityattributes.js.map +1 -1
  107. package/models/components/forbiddenerror.d.ts +17 -39
  108. package/models/components/forbiddenerror.d.ts.map +1 -1
  109. package/models/components/forbiddenerror.js +27 -46
  110. package/models/components/forbiddenerror.js.map +1 -1
  111. package/models/components/index.d.ts +24 -8
  112. package/models/components/index.d.ts.map +1 -1
  113. package/models/components/index.js +24 -8
  114. package/models/components/index.js.map +1 -1
  115. package/models/components/linkobject.d.ts +47 -0
  116. package/models/components/linkobject.d.ts.map +1 -0
  117. package/models/components/{links.js → linkobject.js} +27 -22
  118. package/models/components/linkobject.js.map +1 -0
  119. package/models/components/loandetailsattributes.d.ts +2 -0
  120. package/models/components/loandetailsattributes.d.ts.map +1 -1
  121. package/models/components/loandetailsattributes.js +2 -0
  122. package/models/components/loandetailsattributes.js.map +1 -1
  123. package/models/components/relationshipresourcenotfound.d.ts +116 -0
  124. package/models/components/relationshipresourcenotfound.d.ts.map +1 -0
  125. package/models/components/relationshipresourcenotfound.js +139 -0
  126. package/models/components/relationshipresourcenotfound.js.map +1 -0
  127. package/models/components/resourcenotfound.d.ts +119 -0
  128. package/models/components/resourcenotfound.d.ts.map +1 -0
  129. package/models/components/resourcenotfound.js +139 -0
  130. package/models/components/resourcenotfound.js.map +1 -0
  131. package/models/components/supportingdocumentattributes.d.ts +40 -0
  132. package/models/components/supportingdocumentattributes.d.ts.map +1 -0
  133. package/models/components/{applicationattributescreate.js → supportingdocumentattributes.js} +24 -24
  134. package/models/components/supportingdocumentattributes.js.map +1 -0
  135. package/models/components/supportingdocumentattributesinput.d.ts +38 -0
  136. package/models/components/supportingdocumentattributesinput.d.ts.map +1 -0
  137. package/models/components/supportingdocumentattributesinput.js +72 -0
  138. package/models/components/supportingdocumentattributesinput.js.map +1 -0
  139. package/models/components/supportingdocumentrelationships.d.ts +448 -0
  140. package/models/components/supportingdocumentrelationships.d.ts.map +1 -0
  141. package/models/components/supportingdocumentrelationships.js +434 -0
  142. package/models/components/supportingdocumentrelationships.js.map +1 -0
  143. package/models/components/supportingdocumentresource.d.ts +71 -0
  144. package/models/components/supportingdocumentresource.d.ts.map +1 -0
  145. package/models/components/supportingdocumentresource.js +98 -0
  146. package/models/components/supportingdocumentresource.js.map +1 -0
  147. package/models/components/uploadmimetype.d.ts +49 -0
  148. package/models/components/uploadmimetype.d.ts.map +1 -0
  149. package/models/components/{applicationtype.js → uploadmimetype.js} +22 -14
  150. package/models/components/uploadmimetype.js.map +1 -0
  151. package/models/errors/createapplication.d.ts +73 -0
  152. package/models/errors/createapplication.d.ts.map +1 -0
  153. package/models/errors/createapplication.js +120 -0
  154. package/models/errors/createapplication.js.map +1 -0
  155. package/models/errors/index.d.ts +2 -1
  156. package/models/errors/index.d.ts.map +1 -1
  157. package/models/errors/index.js +2 -1
  158. package/models/errors/index.js.map +1 -1
  159. package/models/errors/supportingdocumentscreate.d.ts +143 -0
  160. package/models/errors/supportingdocumentscreate.d.ts.map +1 -0
  161. package/models/errors/supportingdocumentscreate.js +225 -0
  162. package/models/errors/supportingdocumentscreate.js.map +1 -0
  163. package/models/operations/createapplication.d.ts +26 -874
  164. package/models/operations/createapplication.d.ts.map +1 -1
  165. package/models/operations/createapplication.js +37 -899
  166. package/models/operations/createapplication.js.map +1 -1
  167. package/models/operations/index.d.ts +1 -2
  168. package/models/operations/index.d.ts.map +1 -1
  169. package/models/operations/index.js +1 -2
  170. package/models/operations/index.js.map +1 -1
  171. package/models/operations/supportingdocumentscreate.d.ts +94 -0
  172. package/models/operations/supportingdocumentscreate.d.ts.map +1 -0
  173. package/models/operations/supportingdocumentscreate.js +135 -0
  174. package/models/operations/supportingdocumentscreate.js.map +1 -0
  175. package/package.json +2 -2
  176. package/sdk/applications.d.ts +1 -10
  177. package/sdk/applications.d.ts.map +1 -1
  178. package/sdk/applications.js +0 -14
  179. package/sdk/applications.js.map +1 -1
  180. package/sdk/oauthtoken.d.ts +1 -1
  181. package/sdk/oauthtoken.d.ts.map +1 -1
  182. package/sdk/oauthtoken.js +3 -3
  183. package/sdk/oauthtoken.js.map +1 -1
  184. package/sdk/sdk.d.ts +3 -0
  185. package/sdk/sdk.d.ts.map +1 -1
  186. package/sdk/sdk.js +4 -0
  187. package/sdk/sdk.js.map +1 -1
  188. package/sdk/supportingdocuments.d.ts +9 -0
  189. package/sdk/supportingdocuments.d.ts.map +1 -0
  190. package/sdk/supportingdocuments.js +19 -0
  191. package/sdk/supportingdocuments.js.map +1 -0
  192. package/src/funcs/applicationsCreate.ts +15 -9
  193. package/src/funcs/{oauthTokenGet.ts → oauthTokenOauthToken.ts} +1 -1
  194. package/src/funcs/{applicationsList.ts → supportingDocumentsCreate.ts} +30 -20
  195. package/src/lib/config.ts +4 -7
  196. package/src/lib/matchers.ts +20 -0
  197. package/src/lib/sdks.ts +19 -13
  198. package/src/models/components/addressattributes.ts +22 -14
  199. package/src/models/components/applicationresource.ts +83 -0
  200. package/src/models/components/badrequesterror.ts +182 -0
  201. package/src/models/components/commercialapplicationjsonapirelationships.ts +894 -0
  202. package/src/models/components/commercialsecuredapplicationpayload.ts +248 -0
  203. package/src/models/components/commercialsecuredapplicationresource.ts +310 -0
  204. package/src/models/components/commercialsecuredloanassetattributes.ts +319 -0
  205. package/src/models/components/commercialsecuredloanassettype.ts +64 -0
  206. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +1238 -0
  207. package/src/models/components/consumerapplicationjsonapirelationships.ts +683 -0
  208. package/src/models/components/consumersecuredapplicationpayload.ts +273 -0
  209. package/src/models/components/consumersecuredapplicationresource.ts +309 -0
  210. package/src/models/components/consumersecuredloanassetattributes.ts +334 -0
  211. package/src/models/components/consumersecuredloanassettype.ts +47 -0
  212. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +1047 -0
  213. package/src/models/components/createsupportingdocumentsresponse.ts +206 -0
  214. package/src/models/components/customerattributes.ts +4 -0
  215. package/src/models/components/documenttype.ts +49 -0
  216. package/src/models/components/entityattributes.ts +4 -44
  217. package/src/models/components/forbiddenerror.ts +35 -58
  218. package/src/models/components/index.ts +24 -8
  219. package/src/models/components/linkobject.ts +84 -0
  220. package/src/models/components/loandetailsattributes.ts +4 -0
  221. package/src/models/components/relationshipresourcenotfound.ts +195 -0
  222. package/src/models/components/resourcenotfound.ts +188 -0
  223. package/src/models/components/supportingdocumentattributes.ts +87 -0
  224. package/src/models/components/supportingdocumentattributesinput.ts +84 -0
  225. package/src/models/components/supportingdocumentrelationships.ts +828 -0
  226. package/src/models/components/supportingdocumentresource.ts +126 -0
  227. package/src/models/components/uploadmimetype.ts +44 -0
  228. package/src/models/errors/createapplication.ts +149 -0
  229. package/src/models/errors/index.ts +2 -1
  230. package/src/models/errors/supportingdocumentscreate.ts +342 -0
  231. package/src/models/operations/createapplication.ts +69 -1913
  232. package/src/models/operations/index.ts +1 -2
  233. package/src/models/operations/supportingdocumentscreate.ts +222 -0
  234. package/src/sdk/applications.ts +1 -32
  235. package/src/sdk/oauthtoken.ts +3 -3
  236. package/src/sdk/sdk.ts +8 -0
  237. package/src/sdk/supportingdocuments.ts +24 -0
  238. package/funcs/applicationsGet.d.ts +0 -14
  239. package/funcs/applicationsGet.d.ts.map +0 -1
  240. package/funcs/applicationsGet.js +0 -120
  241. package/funcs/applicationsGet.js.map +0 -1
  242. package/funcs/applicationsList.d.ts +0 -14
  243. package/funcs/applicationsList.d.ts.map +0 -1
  244. package/funcs/applicationsList.js.map +0 -1
  245. package/funcs/oauthTokenGet.d.ts.map +0 -1
  246. package/funcs/oauthTokenGet.js.map +0 -1
  247. package/models/components/applicationattributes.d.ts +0 -69
  248. package/models/components/applicationattributes.d.ts.map +0 -1
  249. package/models/components/applicationattributes.js +0 -85
  250. package/models/components/applicationattributes.js.map +0 -1
  251. package/models/components/applicationattributescreate.d.ts +0 -43
  252. package/models/components/applicationattributescreate.d.ts.map +0 -1
  253. package/models/components/applicationattributescreate.js.map +0 -1
  254. package/models/components/applicationresourcebulksubmission.d.ts +0 -527
  255. package/models/components/applicationresourcebulksubmission.d.ts.map +0 -1
  256. package/models/components/applicationresourcebulksubmission.js +0 -565
  257. package/models/components/applicationresourcebulksubmission.js.map +0 -1
  258. package/models/components/applicationtype.d.ts +0 -28
  259. package/models/components/applicationtype.d.ts.map +0 -1
  260. package/models/components/applicationtype.js.map +0 -1
  261. package/models/components/assetattributes.d.ts +0 -311
  262. package/models/components/assetattributes.d.ts.map +0 -1
  263. package/models/components/assetattributes.js +0 -234
  264. package/models/components/assetattributes.js.map +0 -1
  265. package/models/components/commercialassettype.d.ts +0 -44
  266. package/models/components/commercialassettype.d.ts.map +0 -1
  267. package/models/components/commercialassettype.js +0 -85
  268. package/models/components/commercialassettype.js.map +0 -1
  269. package/models/components/consumerassettype.d.ts +0 -32
  270. package/models/components/consumerassettype.d.ts.map +0 -1
  271. package/models/components/consumerassettype.js.map +0 -1
  272. package/models/components/links.d.ts +0 -40
  273. package/models/components/links.d.ts.map +0 -1
  274. package/models/components/links.js.map +0 -1
  275. package/models/errors/responsebody.d.ts +0 -38
  276. package/models/errors/responsebody.d.ts.map +0 -1
  277. package/models/errors/responsebody.js.map +0 -1
  278. package/models/operations/getapplication.d.ts +0 -962
  279. package/models/operations/getapplication.d.ts.map +0 -1
  280. package/models/operations/getapplication.js +0 -1030
  281. package/models/operations/getapplication.js.map +0 -1
  282. package/models/operations/getapplications.d.ts +0 -962
  283. package/models/operations/getapplications.d.ts.map +0 -1
  284. package/models/operations/getapplications.js +0 -1029
  285. package/models/operations/getapplications.js.map +0 -1
  286. package/src/funcs/applicationsGet.ts +0 -168
  287. package/src/models/components/applicationattributes.ts +0 -128
  288. package/src/models/components/applicationattributescreate.ts +0 -90
  289. package/src/models/components/applicationresourcebulksubmission.ts +0 -1172
  290. package/src/models/components/applicationtype.ts +0 -33
  291. package/src/models/components/assetattributes.ts +0 -411
  292. package/src/models/components/commercialassettype.ts +0 -61
  293. package/src/models/components/consumerassettype.ts +0 -43
  294. package/src/models/components/links.ts +0 -72
  295. package/src/models/errors/responsebody.ts +0 -76
  296. package/src/models/operations/getapplication.ts +0 -2246
  297. package/src/models/operations/getapplications.ts +0 -2191
@@ -0,0 +1,1238 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AddressAttributes,
12
+ AddressAttributes$inboundSchema,
13
+ AddressAttributes$Outbound,
14
+ AddressAttributes$outboundSchema,
15
+ } from "./addressattributes.js";
16
+ import {
17
+ CommercialSecuredLoanAssetAttributes,
18
+ CommercialSecuredLoanAssetAttributes$inboundSchema,
19
+ CommercialSecuredLoanAssetAttributes$Outbound,
20
+ CommercialSecuredLoanAssetAttributes$outboundSchema,
21
+ } from "./commercialsecuredloanassetattributes.js";
22
+ import {
23
+ CustomerAttributes,
24
+ CustomerAttributes$inboundSchema,
25
+ CustomerAttributes$Outbound,
26
+ CustomerAttributes$outboundSchema,
27
+ } from "./customerattributes.js";
28
+ import {
29
+ EntityAttributes,
30
+ EntityAttributes$inboundSchema,
31
+ EntityAttributes$Outbound,
32
+ EntityAttributes$outboundSchema,
33
+ } from "./entityattributes.js";
34
+ import {
35
+ LinkObject,
36
+ LinkObject$inboundSchema,
37
+ LinkObject$Outbound,
38
+ LinkObject$outboundSchema,
39
+ } from "./linkobject.js";
40
+ import {
41
+ LoanDetailsAttributes,
42
+ LoanDetailsAttributes$inboundSchema,
43
+ LoanDetailsAttributes$Outbound,
44
+ LoanDetailsAttributes$outboundSchema,
45
+ } from "./loandetailsattributes.js";
46
+
47
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsType = {
48
+ LoanDetails: "loan-details",
49
+ } as const;
50
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsType =
51
+ ClosedEnum<
52
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsType
53
+ >;
54
+
55
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsData = {
56
+ type: CommercialSecuredLoanCommercialApplicationRelationshipsType;
57
+ /**
58
+ * Loan details model
59
+ */
60
+ attributes: LoanDetailsAttributes;
61
+ relationships?: any | null | undefined;
62
+ links?: { [k: string]: LinkObject } | undefined;
63
+ meta?: { [k: string]: any } | undefined;
64
+ };
65
+
66
+ export type LoanDetails = {
67
+ data: CommercialSecuredLoanCommercialApplicationRelationshipsData;
68
+ };
69
+
70
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType =
71
+ {
72
+ Customers: "customers",
73
+ } as const;
74
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType =
75
+ ClosedEnum<
76
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType
77
+ >;
78
+
79
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType =
80
+ {
81
+ Addresses: "addresses",
82
+ } as const;
83
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType =
84
+ ClosedEnum<
85
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType
86
+ >;
87
+
88
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsRelationships =
89
+ {};
90
+
91
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData =
92
+ {
93
+ type:
94
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType;
95
+ attributes: AddressAttributes;
96
+ relationships:
97
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships;
98
+ links?: { [k: string]: LinkObject } | undefined;
99
+ meta?: { [k: string]: any } | undefined;
100
+ };
101
+
102
+ export type Addresses = {
103
+ data: Array<
104
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData
105
+ >;
106
+ };
107
+
108
+ export type Relationships = {
109
+ addresses?: Addresses | undefined;
110
+ };
111
+
112
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData =
113
+ {
114
+ type: CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType;
115
+ /**
116
+ * A customer of the proposed financing
117
+ */
118
+ attributes: CustomerAttributes;
119
+ relationships: Relationships;
120
+ links?: { [k: string]: LinkObject } | undefined;
121
+ meta?: { [k: string]: any } | undefined;
122
+ };
123
+
124
+ export type Customers = {
125
+ data: Array<
126
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData
127
+ >;
128
+ };
129
+
130
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAssetType =
131
+ {
132
+ Assets: "assets",
133
+ } as const;
134
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsAssetType =
135
+ ClosedEnum<
136
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsAssetType
137
+ >;
138
+
139
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsAssetData = {
140
+ type: CommercialSecuredLoanCommercialApplicationRelationshipsAssetType;
141
+ /**
142
+ * Type of asset for secured commercial loans
143
+ */
144
+ attributes: CommercialSecuredLoanAssetAttributes;
145
+ relationships?: any | null | undefined;
146
+ links?: { [k: string]: LinkObject } | undefined;
147
+ meta?: { [k: string]: any } | undefined;
148
+ };
149
+
150
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsAsset = {
151
+ data: CommercialSecuredLoanCommercialApplicationRelationshipsAssetData;
152
+ };
153
+
154
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType =
155
+ {
156
+ Entities: "entities",
157
+ } as const;
158
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType =
159
+ ClosedEnum<
160
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType
161
+ >;
162
+
163
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData =
164
+ {
165
+ type: CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType;
166
+ attributes: EntityAttributes;
167
+ relationships?: any | null | undefined;
168
+ links?: { [k: string]: LinkObject } | undefined;
169
+ meta?: { [k: string]: any } | undefined;
170
+ };
171
+
172
+ export type Entities = {
173
+ data: Array<
174
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData
175
+ >;
176
+ };
177
+
178
+ export type CommercialSecuredLoanCommercialApplicationRelationships = {
179
+ loanDetails?: LoanDetails | undefined;
180
+ customers?: Customers | undefined;
181
+ asset?:
182
+ | CommercialSecuredLoanCommercialApplicationRelationshipsAsset
183
+ | undefined;
184
+ entities?: Entities | undefined;
185
+ };
186
+
187
+ /** @internal */
188
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsType$inboundSchema:
189
+ z.ZodNativeEnum<
190
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsType
191
+ > = z.nativeEnum(CommercialSecuredLoanCommercialApplicationRelationshipsType);
192
+
193
+ /** @internal */
194
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsType$outboundSchema:
195
+ z.ZodNativeEnum<
196
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsType
197
+ > = CommercialSecuredLoanCommercialApplicationRelationshipsType$inboundSchema;
198
+
199
+ /**
200
+ * @internal
201
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
202
+ */
203
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsType$ {
204
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsType$inboundSchema` instead. */
205
+ export const inboundSchema =
206
+ CommercialSecuredLoanCommercialApplicationRelationshipsType$inboundSchema;
207
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsType$outboundSchema` instead. */
208
+ export const outboundSchema =
209
+ CommercialSecuredLoanCommercialApplicationRelationshipsType$outboundSchema;
210
+ }
211
+
212
+ /** @internal */
213
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsData$inboundSchema:
214
+ z.ZodType<
215
+ CommercialSecuredLoanCommercialApplicationRelationshipsData,
216
+ z.ZodTypeDef,
217
+ unknown
218
+ > = z.object({
219
+ type:
220
+ CommercialSecuredLoanCommercialApplicationRelationshipsType$inboundSchema,
221
+ attributes: LoanDetailsAttributes$inboundSchema,
222
+ relationships: z.nullable(z.any()).optional(),
223
+ links: z.record(LinkObject$inboundSchema).optional(),
224
+ meta: z.record(z.any()).optional(),
225
+ });
226
+
227
+ /** @internal */
228
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsData$Outbound =
229
+ {
230
+ type: string;
231
+ attributes: LoanDetailsAttributes$Outbound;
232
+ relationships?: any | null | undefined;
233
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
234
+ meta?: { [k: string]: any } | undefined;
235
+ };
236
+
237
+ /** @internal */
238
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsData$outboundSchema:
239
+ z.ZodType<
240
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$Outbound,
241
+ z.ZodTypeDef,
242
+ CommercialSecuredLoanCommercialApplicationRelationshipsData
243
+ > = z.object({
244
+ type:
245
+ CommercialSecuredLoanCommercialApplicationRelationshipsType$outboundSchema,
246
+ attributes: LoanDetailsAttributes$outboundSchema,
247
+ relationships: z.nullable(z.any()).optional(),
248
+ links: z.record(LinkObject$outboundSchema).optional(),
249
+ meta: z.record(z.any()).optional(),
250
+ });
251
+
252
+ /**
253
+ * @internal
254
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
255
+ */
256
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsData$ {
257
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsData$inboundSchema` instead. */
258
+ export const inboundSchema =
259
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$inboundSchema;
260
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsData$outboundSchema` instead. */
261
+ export const outboundSchema =
262
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$outboundSchema;
263
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsData$Outbound` instead. */
264
+ export type Outbound =
265
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$Outbound;
266
+ }
267
+
268
+ export function commercialSecuredLoanCommercialApplicationRelationshipsDataToJSON(
269
+ commercialSecuredLoanCommercialApplicationRelationshipsData:
270
+ CommercialSecuredLoanCommercialApplicationRelationshipsData,
271
+ ): string {
272
+ return JSON.stringify(
273
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$outboundSchema
274
+ .parse(commercialSecuredLoanCommercialApplicationRelationshipsData),
275
+ );
276
+ }
277
+
278
+ export function commercialSecuredLoanCommercialApplicationRelationshipsDataFromJSON(
279
+ jsonString: string,
280
+ ): SafeParseResult<
281
+ CommercialSecuredLoanCommercialApplicationRelationshipsData,
282
+ SDKValidationError
283
+ > {
284
+ return safeParse(
285
+ jsonString,
286
+ (x) =>
287
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$inboundSchema
288
+ .parse(JSON.parse(x)),
289
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsData' from JSON`,
290
+ );
291
+ }
292
+
293
+ /** @internal */
294
+ export const LoanDetails$inboundSchema: z.ZodType<
295
+ LoanDetails,
296
+ z.ZodTypeDef,
297
+ unknown
298
+ > = z.object({
299
+ data: z.lazy(() =>
300
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$inboundSchema
301
+ ),
302
+ });
303
+
304
+ /** @internal */
305
+ export type LoanDetails$Outbound = {
306
+ data: CommercialSecuredLoanCommercialApplicationRelationshipsData$Outbound;
307
+ };
308
+
309
+ /** @internal */
310
+ export const LoanDetails$outboundSchema: z.ZodType<
311
+ LoanDetails$Outbound,
312
+ z.ZodTypeDef,
313
+ LoanDetails
314
+ > = z.object({
315
+ data: z.lazy(() =>
316
+ CommercialSecuredLoanCommercialApplicationRelationshipsData$outboundSchema
317
+ ),
318
+ });
319
+
320
+ /**
321
+ * @internal
322
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
323
+ */
324
+ export namespace LoanDetails$ {
325
+ /** @deprecated use `LoanDetails$inboundSchema` instead. */
326
+ export const inboundSchema = LoanDetails$inboundSchema;
327
+ /** @deprecated use `LoanDetails$outboundSchema` instead. */
328
+ export const outboundSchema = LoanDetails$outboundSchema;
329
+ /** @deprecated use `LoanDetails$Outbound` instead. */
330
+ export type Outbound = LoanDetails$Outbound;
331
+ }
332
+
333
+ export function loanDetailsToJSON(loanDetails: LoanDetails): string {
334
+ return JSON.stringify(LoanDetails$outboundSchema.parse(loanDetails));
335
+ }
336
+
337
+ export function loanDetailsFromJSON(
338
+ jsonString: string,
339
+ ): SafeParseResult<LoanDetails, SDKValidationError> {
340
+ return safeParse(
341
+ jsonString,
342
+ (x) => LoanDetails$inboundSchema.parse(JSON.parse(x)),
343
+ `Failed to parse 'LoanDetails' from JSON`,
344
+ );
345
+ }
346
+
347
+ /** @internal */
348
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$inboundSchema:
349
+ z.ZodNativeEnum<
350
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType
351
+ > = z.nativeEnum(
352
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType,
353
+ );
354
+
355
+ /** @internal */
356
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$outboundSchema:
357
+ z.ZodNativeEnum<
358
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType
359
+ > =
360
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$inboundSchema;
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 CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$ {
367
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$inboundSchema` instead. */
368
+ export const inboundSchema =
369
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$inboundSchema;
370
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$outboundSchema` instead. */
371
+ export const outboundSchema =
372
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$outboundSchema;
373
+ }
374
+
375
+ /** @internal */
376
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$inboundSchema:
377
+ z.ZodNativeEnum<
378
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType
379
+ > = z.nativeEnum(
380
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType,
381
+ );
382
+
383
+ /** @internal */
384
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$outboundSchema:
385
+ z.ZodNativeEnum<
386
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType
387
+ > =
388
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$inboundSchema;
389
+
390
+ /**
391
+ * @internal
392
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
393
+ */
394
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$ {
395
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$inboundSchema` instead. */
396
+ export const inboundSchema =
397
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$inboundSchema;
398
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$outboundSchema` instead. */
399
+ export const outboundSchema =
400
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$outboundSchema;
401
+ }
402
+
403
+ /** @internal */
404
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$inboundSchema:
405
+ z.ZodType<
406
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships,
407
+ z.ZodTypeDef,
408
+ unknown
409
+ > = z.object({});
410
+
411
+ /** @internal */
412
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound =
413
+ {};
414
+
415
+ /** @internal */
416
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema:
417
+ z.ZodType<
418
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound,
419
+ z.ZodTypeDef,
420
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships
421
+ > = z.object({});
422
+
423
+ /**
424
+ * @internal
425
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
426
+ */
427
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$ {
428
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$inboundSchema` instead. */
429
+ export const inboundSchema =
430
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$inboundSchema;
431
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema` instead. */
432
+ export const outboundSchema =
433
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema;
434
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound` instead. */
435
+ export type Outbound =
436
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound;
437
+ }
438
+
439
+ export function commercialSecuredLoanCommercialApplicationRelationshipsRelationshipsToJSON(
440
+ commercialSecuredLoanCommercialApplicationRelationshipsRelationships:
441
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships,
442
+ ): string {
443
+ return JSON.stringify(
444
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema
445
+ .parse(
446
+ commercialSecuredLoanCommercialApplicationRelationshipsRelationships,
447
+ ),
448
+ );
449
+ }
450
+
451
+ export function commercialSecuredLoanCommercialApplicationRelationshipsRelationshipsFromJSON(
452
+ jsonString: string,
453
+ ): SafeParseResult<
454
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships,
455
+ SDKValidationError
456
+ > {
457
+ return safeParse(
458
+ jsonString,
459
+ (x) =>
460
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$inboundSchema
461
+ .parse(JSON.parse(x)),
462
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsRelationships' from JSON`,
463
+ );
464
+ }
465
+
466
+ /** @internal */
467
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$inboundSchema:
468
+ z.ZodType<
469
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData,
470
+ z.ZodTypeDef,
471
+ unknown
472
+ > = z.object({
473
+ type:
474
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$inboundSchema,
475
+ attributes: AddressAttributes$inboundSchema,
476
+ relationships: z.lazy(() =>
477
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$inboundSchema
478
+ ),
479
+ links: z.record(LinkObject$inboundSchema).optional(),
480
+ meta: z.record(z.any()).optional(),
481
+ });
482
+
483
+ /** @internal */
484
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$Outbound =
485
+ {
486
+ type: string;
487
+ attributes: AddressAttributes$Outbound;
488
+ relationships:
489
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound;
490
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
491
+ meta?: { [k: string]: any } | undefined;
492
+ };
493
+
494
+ /** @internal */
495
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$outboundSchema:
496
+ z.ZodType<
497
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$Outbound,
498
+ z.ZodTypeDef,
499
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData
500
+ > = z.object({
501
+ type:
502
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$outboundSchema,
503
+ attributes: AddressAttributes$outboundSchema,
504
+ relationships: z.lazy(() =>
505
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema
506
+ ),
507
+ links: z.record(LinkObject$outboundSchema).optional(),
508
+ meta: z.record(z.any()).optional(),
509
+ });
510
+
511
+ /**
512
+ * @internal
513
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
514
+ */
515
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$ {
516
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$inboundSchema` instead. */
517
+ export const inboundSchema =
518
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$inboundSchema;
519
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$outboundSchema` instead. */
520
+ export const outboundSchema =
521
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$outboundSchema;
522
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$Outbound` instead. */
523
+ export type Outbound =
524
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$Outbound;
525
+ }
526
+
527
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataDataToJSON(
528
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData:
529
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData,
530
+ ): string {
531
+ return JSON.stringify(
532
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$outboundSchema
533
+ .parse(
534
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData,
535
+ ),
536
+ );
537
+ }
538
+
539
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataDataFromJSON(
540
+ jsonString: string,
541
+ ): SafeParseResult<
542
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData,
543
+ SDKValidationError
544
+ > {
545
+ return safeParse(
546
+ jsonString,
547
+ (x) =>
548
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$inboundSchema
549
+ .parse(JSON.parse(x)),
550
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData' from JSON`,
551
+ );
552
+ }
553
+
554
+ /** @internal */
555
+ export const Addresses$inboundSchema: z.ZodType<
556
+ Addresses,
557
+ z.ZodTypeDef,
558
+ unknown
559
+ > = z.object({
560
+ data: z.array(
561
+ z.lazy(() =>
562
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$inboundSchema
563
+ ),
564
+ ),
565
+ });
566
+
567
+ /** @internal */
568
+ export type Addresses$Outbound = {
569
+ data: Array<
570
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$Outbound
571
+ >;
572
+ };
573
+
574
+ /** @internal */
575
+ export const Addresses$outboundSchema: z.ZodType<
576
+ Addresses$Outbound,
577
+ z.ZodTypeDef,
578
+ Addresses
579
+ > = z.object({
580
+ data: z.array(
581
+ z.lazy(() =>
582
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataData$outboundSchema
583
+ ),
584
+ ),
585
+ });
586
+
587
+ /**
588
+ * @internal
589
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
590
+ */
591
+ export namespace Addresses$ {
592
+ /** @deprecated use `Addresses$inboundSchema` instead. */
593
+ export const inboundSchema = Addresses$inboundSchema;
594
+ /** @deprecated use `Addresses$outboundSchema` instead. */
595
+ export const outboundSchema = Addresses$outboundSchema;
596
+ /** @deprecated use `Addresses$Outbound` instead. */
597
+ export type Outbound = Addresses$Outbound;
598
+ }
599
+
600
+ export function addressesToJSON(addresses: Addresses): string {
601
+ return JSON.stringify(Addresses$outboundSchema.parse(addresses));
602
+ }
603
+
604
+ export function addressesFromJSON(
605
+ jsonString: string,
606
+ ): SafeParseResult<Addresses, SDKValidationError> {
607
+ return safeParse(
608
+ jsonString,
609
+ (x) => Addresses$inboundSchema.parse(JSON.parse(x)),
610
+ `Failed to parse 'Addresses' from JSON`,
611
+ );
612
+ }
613
+
614
+ /** @internal */
615
+ export const Relationships$inboundSchema: z.ZodType<
616
+ Relationships,
617
+ z.ZodTypeDef,
618
+ unknown
619
+ > = z.object({
620
+ addresses: z.lazy(() => Addresses$inboundSchema).optional(),
621
+ });
622
+
623
+ /** @internal */
624
+ export type Relationships$Outbound = {
625
+ addresses?: Addresses$Outbound | undefined;
626
+ };
627
+
628
+ /** @internal */
629
+ export const Relationships$outboundSchema: z.ZodType<
630
+ Relationships$Outbound,
631
+ z.ZodTypeDef,
632
+ Relationships
633
+ > = z.object({
634
+ addresses: z.lazy(() => Addresses$outboundSchema).optional(),
635
+ });
636
+
637
+ /**
638
+ * @internal
639
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
640
+ */
641
+ export namespace Relationships$ {
642
+ /** @deprecated use `Relationships$inboundSchema` instead. */
643
+ export const inboundSchema = Relationships$inboundSchema;
644
+ /** @deprecated use `Relationships$outboundSchema` instead. */
645
+ export const outboundSchema = Relationships$outboundSchema;
646
+ /** @deprecated use `Relationships$Outbound` instead. */
647
+ export type Outbound = Relationships$Outbound;
648
+ }
649
+
650
+ export function relationshipsToJSON(relationships: Relationships): string {
651
+ return JSON.stringify(Relationships$outboundSchema.parse(relationships));
652
+ }
653
+
654
+ export function relationshipsFromJSON(
655
+ jsonString: string,
656
+ ): SafeParseResult<Relationships, SDKValidationError> {
657
+ return safeParse(
658
+ jsonString,
659
+ (x) => Relationships$inboundSchema.parse(JSON.parse(x)),
660
+ `Failed to parse 'Relationships' from JSON`,
661
+ );
662
+ }
663
+
664
+ /** @internal */
665
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$inboundSchema:
666
+ z.ZodType<
667
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData,
668
+ z.ZodTypeDef,
669
+ unknown
670
+ > = z.object({
671
+ type:
672
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$inboundSchema,
673
+ attributes: CustomerAttributes$inboundSchema,
674
+ relationships: z.lazy(() => Relationships$inboundSchema),
675
+ links: z.record(LinkObject$inboundSchema).optional(),
676
+ meta: z.record(z.any()).optional(),
677
+ });
678
+
679
+ /** @internal */
680
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$Outbound =
681
+ {
682
+ type: string;
683
+ attributes: CustomerAttributes$Outbound;
684
+ relationships: Relationships$Outbound;
685
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
686
+ meta?: { [k: string]: any } | undefined;
687
+ };
688
+
689
+ /** @internal */
690
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$outboundSchema:
691
+ z.ZodType<
692
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$Outbound,
693
+ z.ZodTypeDef,
694
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData
695
+ > = z.object({
696
+ type:
697
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersType$outboundSchema,
698
+ attributes: CustomerAttributes$outboundSchema,
699
+ relationships: z.lazy(() => Relationships$outboundSchema),
700
+ links: z.record(LinkObject$outboundSchema).optional(),
701
+ meta: z.record(z.any()).optional(),
702
+ });
703
+
704
+ /**
705
+ * @internal
706
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
707
+ */
708
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$ {
709
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$inboundSchema` instead. */
710
+ export const inboundSchema =
711
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$inboundSchema;
712
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$outboundSchema` instead. */
713
+ export const outboundSchema =
714
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$outboundSchema;
715
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$Outbound` instead. */
716
+ export type Outbound =
717
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$Outbound;
718
+ }
719
+
720
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataToJSON(
721
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersData:
722
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData,
723
+ ): string {
724
+ return JSON.stringify(
725
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$outboundSchema
726
+ .parse(
727
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersData,
728
+ ),
729
+ );
730
+ }
731
+
732
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataFromJSON(
733
+ jsonString: string,
734
+ ): SafeParseResult<
735
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData,
736
+ SDKValidationError
737
+ > {
738
+ return safeParse(
739
+ jsonString,
740
+ (x) =>
741
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$inboundSchema
742
+ .parse(JSON.parse(x)),
743
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData' from JSON`,
744
+ );
745
+ }
746
+
747
+ /** @internal */
748
+ export const Customers$inboundSchema: z.ZodType<
749
+ Customers,
750
+ z.ZodTypeDef,
751
+ unknown
752
+ > = z.object({
753
+ data: z.array(
754
+ z.lazy(() =>
755
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$inboundSchema
756
+ ),
757
+ ),
758
+ });
759
+
760
+ /** @internal */
761
+ export type Customers$Outbound = {
762
+ data: Array<
763
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$Outbound
764
+ >;
765
+ };
766
+
767
+ /** @internal */
768
+ export const Customers$outboundSchema: z.ZodType<
769
+ Customers$Outbound,
770
+ z.ZodTypeDef,
771
+ Customers
772
+ > = z.object({
773
+ data: z.array(
774
+ z.lazy(() =>
775
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData$outboundSchema
776
+ ),
777
+ ),
778
+ });
779
+
780
+ /**
781
+ * @internal
782
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
783
+ */
784
+ export namespace Customers$ {
785
+ /** @deprecated use `Customers$inboundSchema` instead. */
786
+ export const inboundSchema = Customers$inboundSchema;
787
+ /** @deprecated use `Customers$outboundSchema` instead. */
788
+ export const outboundSchema = Customers$outboundSchema;
789
+ /** @deprecated use `Customers$Outbound` instead. */
790
+ export type Outbound = Customers$Outbound;
791
+ }
792
+
793
+ export function customersToJSON(customers: Customers): string {
794
+ return JSON.stringify(Customers$outboundSchema.parse(customers));
795
+ }
796
+
797
+ export function customersFromJSON(
798
+ jsonString: string,
799
+ ): SafeParseResult<Customers, SDKValidationError> {
800
+ return safeParse(
801
+ jsonString,
802
+ (x) => Customers$inboundSchema.parse(JSON.parse(x)),
803
+ `Failed to parse 'Customers' from JSON`,
804
+ );
805
+ }
806
+
807
+ /** @internal */
808
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$inboundSchema:
809
+ z.ZodNativeEnum<
810
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsAssetType
811
+ > = z.nativeEnum(
812
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetType,
813
+ );
814
+
815
+ /** @internal */
816
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$outboundSchema:
817
+ z.ZodNativeEnum<
818
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsAssetType
819
+ > =
820
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$inboundSchema;
821
+
822
+ /**
823
+ * @internal
824
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
825
+ */
826
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$ {
827
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$inboundSchema` instead. */
828
+ export const inboundSchema =
829
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$inboundSchema;
830
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$outboundSchema` instead. */
831
+ export const outboundSchema =
832
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$outboundSchema;
833
+ }
834
+
835
+ /** @internal */
836
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$inboundSchema:
837
+ z.ZodType<
838
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData,
839
+ z.ZodTypeDef,
840
+ unknown
841
+ > = z.object({
842
+ type:
843
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$inboundSchema,
844
+ attributes: CommercialSecuredLoanAssetAttributes$inboundSchema,
845
+ relationships: z.nullable(z.any()).optional(),
846
+ links: z.record(LinkObject$inboundSchema).optional(),
847
+ meta: z.record(z.any()).optional(),
848
+ });
849
+
850
+ /** @internal */
851
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$Outbound =
852
+ {
853
+ type: string;
854
+ attributes: CommercialSecuredLoanAssetAttributes$Outbound;
855
+ relationships?: any | null | undefined;
856
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
857
+ meta?: { [k: string]: any } | undefined;
858
+ };
859
+
860
+ /** @internal */
861
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$outboundSchema:
862
+ z.ZodType<
863
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$Outbound,
864
+ z.ZodTypeDef,
865
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData
866
+ > = z.object({
867
+ type:
868
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetType$outboundSchema,
869
+ attributes: CommercialSecuredLoanAssetAttributes$outboundSchema,
870
+ relationships: z.nullable(z.any()).optional(),
871
+ links: z.record(LinkObject$outboundSchema).optional(),
872
+ meta: z.record(z.any()).optional(),
873
+ });
874
+
875
+ /**
876
+ * @internal
877
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
878
+ */
879
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$ {
880
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$inboundSchema` instead. */
881
+ export const inboundSchema =
882
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$inboundSchema;
883
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$outboundSchema` instead. */
884
+ export const outboundSchema =
885
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$outboundSchema;
886
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$Outbound` instead. */
887
+ export type Outbound =
888
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$Outbound;
889
+ }
890
+
891
+ export function commercialSecuredLoanCommercialApplicationRelationshipsAssetDataToJSON(
892
+ commercialSecuredLoanCommercialApplicationRelationshipsAssetData:
893
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData,
894
+ ): string {
895
+ return JSON.stringify(
896
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$outboundSchema
897
+ .parse(commercialSecuredLoanCommercialApplicationRelationshipsAssetData),
898
+ );
899
+ }
900
+
901
+ export function commercialSecuredLoanCommercialApplicationRelationshipsAssetDataFromJSON(
902
+ jsonString: string,
903
+ ): SafeParseResult<
904
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData,
905
+ SDKValidationError
906
+ > {
907
+ return safeParse(
908
+ jsonString,
909
+ (x) =>
910
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$inboundSchema
911
+ .parse(JSON.parse(x)),
912
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsAssetData' from JSON`,
913
+ );
914
+ }
915
+
916
+ /** @internal */
917
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAsset$inboundSchema:
918
+ z.ZodType<
919
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset,
920
+ z.ZodTypeDef,
921
+ unknown
922
+ > = z.object({
923
+ data: z.lazy(() =>
924
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$inboundSchema
925
+ ),
926
+ });
927
+
928
+ /** @internal */
929
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsAsset$Outbound =
930
+ {
931
+ data:
932
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$Outbound;
933
+ };
934
+
935
+ /** @internal */
936
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsAsset$outboundSchema:
937
+ z.ZodType<
938
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$Outbound,
939
+ z.ZodTypeDef,
940
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset
941
+ > = z.object({
942
+ data: z.lazy(() =>
943
+ CommercialSecuredLoanCommercialApplicationRelationshipsAssetData$outboundSchema
944
+ ),
945
+ });
946
+
947
+ /**
948
+ * @internal
949
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
950
+ */
951
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsAsset$ {
952
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAsset$inboundSchema` instead. */
953
+ export const inboundSchema =
954
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$inboundSchema;
955
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAsset$outboundSchema` instead. */
956
+ export const outboundSchema =
957
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$outboundSchema;
958
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsAsset$Outbound` instead. */
959
+ export type Outbound =
960
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$Outbound;
961
+ }
962
+
963
+ export function commercialSecuredLoanCommercialApplicationRelationshipsAssetToJSON(
964
+ commercialSecuredLoanCommercialApplicationRelationshipsAsset:
965
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset,
966
+ ): string {
967
+ return JSON.stringify(
968
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$outboundSchema
969
+ .parse(commercialSecuredLoanCommercialApplicationRelationshipsAsset),
970
+ );
971
+ }
972
+
973
+ export function commercialSecuredLoanCommercialApplicationRelationshipsAssetFromJSON(
974
+ jsonString: string,
975
+ ): SafeParseResult<
976
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset,
977
+ SDKValidationError
978
+ > {
979
+ return safeParse(
980
+ jsonString,
981
+ (x) =>
982
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$inboundSchema
983
+ .parse(JSON.parse(x)),
984
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsAsset' from JSON`,
985
+ );
986
+ }
987
+
988
+ /** @internal */
989
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$inboundSchema:
990
+ z.ZodNativeEnum<
991
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType
992
+ > = z.nativeEnum(
993
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType,
994
+ );
995
+
996
+ /** @internal */
997
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$outboundSchema:
998
+ z.ZodNativeEnum<
999
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType
1000
+ > =
1001
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$inboundSchema;
1002
+
1003
+ /**
1004
+ * @internal
1005
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1006
+ */
1007
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$ {
1008
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$inboundSchema` instead. */
1009
+ export const inboundSchema =
1010
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$inboundSchema;
1011
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$outboundSchema` instead. */
1012
+ export const outboundSchema =
1013
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$outboundSchema;
1014
+ }
1015
+
1016
+ /** @internal */
1017
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$inboundSchema:
1018
+ z.ZodType<
1019
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData,
1020
+ z.ZodTypeDef,
1021
+ unknown
1022
+ > = z.object({
1023
+ type:
1024
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$inboundSchema,
1025
+ attributes: EntityAttributes$inboundSchema,
1026
+ relationships: z.nullable(z.any()).optional(),
1027
+ links: z.record(LinkObject$inboundSchema).optional(),
1028
+ meta: z.record(z.any()).optional(),
1029
+ });
1030
+
1031
+ /** @internal */
1032
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$Outbound =
1033
+ {
1034
+ type: string;
1035
+ attributes: EntityAttributes$Outbound;
1036
+ relationships?: any | null | undefined;
1037
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
1038
+ meta?: { [k: string]: any } | undefined;
1039
+ };
1040
+
1041
+ /** @internal */
1042
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$outboundSchema:
1043
+ z.ZodType<
1044
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$Outbound,
1045
+ z.ZodTypeDef,
1046
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData
1047
+ > = z.object({
1048
+ type:
1049
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesType$outboundSchema,
1050
+ attributes: EntityAttributes$outboundSchema,
1051
+ relationships: z.nullable(z.any()).optional(),
1052
+ links: z.record(LinkObject$outboundSchema).optional(),
1053
+ meta: z.record(z.any()).optional(),
1054
+ });
1055
+
1056
+ /**
1057
+ * @internal
1058
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1059
+ */
1060
+ export namespace CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$ {
1061
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$inboundSchema` instead. */
1062
+ export const inboundSchema =
1063
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$inboundSchema;
1064
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$outboundSchema` instead. */
1065
+ export const outboundSchema =
1066
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$outboundSchema;
1067
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$Outbound` instead. */
1068
+ export type Outbound =
1069
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$Outbound;
1070
+ }
1071
+
1072
+ export function commercialSecuredLoanCommercialApplicationRelationshipsEntitiesDataToJSON(
1073
+ commercialSecuredLoanCommercialApplicationRelationshipsEntitiesData:
1074
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData,
1075
+ ): string {
1076
+ return JSON.stringify(
1077
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$outboundSchema
1078
+ .parse(
1079
+ commercialSecuredLoanCommercialApplicationRelationshipsEntitiesData,
1080
+ ),
1081
+ );
1082
+ }
1083
+
1084
+ export function commercialSecuredLoanCommercialApplicationRelationshipsEntitiesDataFromJSON(
1085
+ jsonString: string,
1086
+ ): SafeParseResult<
1087
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData,
1088
+ SDKValidationError
1089
+ > {
1090
+ return safeParse(
1091
+ jsonString,
1092
+ (x) =>
1093
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$inboundSchema
1094
+ .parse(JSON.parse(x)),
1095
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData' from JSON`,
1096
+ );
1097
+ }
1098
+
1099
+ /** @internal */
1100
+ export const Entities$inboundSchema: z.ZodType<
1101
+ Entities,
1102
+ z.ZodTypeDef,
1103
+ unknown
1104
+ > = z.object({
1105
+ data: z.array(
1106
+ z.lazy(() =>
1107
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$inboundSchema
1108
+ ),
1109
+ ),
1110
+ });
1111
+
1112
+ /** @internal */
1113
+ export type Entities$Outbound = {
1114
+ data: Array<
1115
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$Outbound
1116
+ >;
1117
+ };
1118
+
1119
+ /** @internal */
1120
+ export const Entities$outboundSchema: z.ZodType<
1121
+ Entities$Outbound,
1122
+ z.ZodTypeDef,
1123
+ Entities
1124
+ > = z.object({
1125
+ data: z.array(
1126
+ z.lazy(() =>
1127
+ CommercialSecuredLoanCommercialApplicationRelationshipsEntitiesData$outboundSchema
1128
+ ),
1129
+ ),
1130
+ });
1131
+
1132
+ /**
1133
+ * @internal
1134
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1135
+ */
1136
+ export namespace Entities$ {
1137
+ /** @deprecated use `Entities$inboundSchema` instead. */
1138
+ export const inboundSchema = Entities$inboundSchema;
1139
+ /** @deprecated use `Entities$outboundSchema` instead. */
1140
+ export const outboundSchema = Entities$outboundSchema;
1141
+ /** @deprecated use `Entities$Outbound` instead. */
1142
+ export type Outbound = Entities$Outbound;
1143
+ }
1144
+
1145
+ export function entitiesToJSON(entities: Entities): string {
1146
+ return JSON.stringify(Entities$outboundSchema.parse(entities));
1147
+ }
1148
+
1149
+ export function entitiesFromJSON(
1150
+ jsonString: string,
1151
+ ): SafeParseResult<Entities, SDKValidationError> {
1152
+ return safeParse(
1153
+ jsonString,
1154
+ (x) => Entities$inboundSchema.parse(JSON.parse(x)),
1155
+ `Failed to parse 'Entities' from JSON`,
1156
+ );
1157
+ }
1158
+
1159
+ /** @internal */
1160
+ export const CommercialSecuredLoanCommercialApplicationRelationships$inboundSchema:
1161
+ z.ZodType<
1162
+ CommercialSecuredLoanCommercialApplicationRelationships,
1163
+ z.ZodTypeDef,
1164
+ unknown
1165
+ > = z.object({
1166
+ loanDetails: z.lazy(() => LoanDetails$inboundSchema).optional(),
1167
+ customers: z.lazy(() => Customers$inboundSchema).optional(),
1168
+ asset: z.lazy(() =>
1169
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$inboundSchema
1170
+ ).optional(),
1171
+ entities: z.lazy(() => Entities$inboundSchema).optional(),
1172
+ });
1173
+
1174
+ /** @internal */
1175
+ export type CommercialSecuredLoanCommercialApplicationRelationships$Outbound = {
1176
+ loanDetails?: LoanDetails$Outbound | undefined;
1177
+ customers?: Customers$Outbound | undefined;
1178
+ asset?:
1179
+ | CommercialSecuredLoanCommercialApplicationRelationshipsAsset$Outbound
1180
+ | undefined;
1181
+ entities?: Entities$Outbound | undefined;
1182
+ };
1183
+
1184
+ /** @internal */
1185
+ export const CommercialSecuredLoanCommercialApplicationRelationships$outboundSchema:
1186
+ z.ZodType<
1187
+ CommercialSecuredLoanCommercialApplicationRelationships$Outbound,
1188
+ z.ZodTypeDef,
1189
+ CommercialSecuredLoanCommercialApplicationRelationships
1190
+ > = z.object({
1191
+ loanDetails: z.lazy(() => LoanDetails$outboundSchema).optional(),
1192
+ customers: z.lazy(() => Customers$outboundSchema).optional(),
1193
+ asset: z.lazy(() =>
1194
+ CommercialSecuredLoanCommercialApplicationRelationshipsAsset$outboundSchema
1195
+ ).optional(),
1196
+ entities: z.lazy(() => Entities$outboundSchema).optional(),
1197
+ });
1198
+
1199
+ /**
1200
+ * @internal
1201
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1202
+ */
1203
+ export namespace CommercialSecuredLoanCommercialApplicationRelationships$ {
1204
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationships$inboundSchema` instead. */
1205
+ export const inboundSchema =
1206
+ CommercialSecuredLoanCommercialApplicationRelationships$inboundSchema;
1207
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationships$outboundSchema` instead. */
1208
+ export const outboundSchema =
1209
+ CommercialSecuredLoanCommercialApplicationRelationships$outboundSchema;
1210
+ /** @deprecated use `CommercialSecuredLoanCommercialApplicationRelationships$Outbound` instead. */
1211
+ export type Outbound =
1212
+ CommercialSecuredLoanCommercialApplicationRelationships$Outbound;
1213
+ }
1214
+
1215
+ export function commercialSecuredLoanCommercialApplicationRelationshipsToJSON(
1216
+ commercialSecuredLoanCommercialApplicationRelationships:
1217
+ CommercialSecuredLoanCommercialApplicationRelationships,
1218
+ ): string {
1219
+ return JSON.stringify(
1220
+ CommercialSecuredLoanCommercialApplicationRelationships$outboundSchema
1221
+ .parse(commercialSecuredLoanCommercialApplicationRelationships),
1222
+ );
1223
+ }
1224
+
1225
+ export function commercialSecuredLoanCommercialApplicationRelationshipsFromJSON(
1226
+ jsonString: string,
1227
+ ): SafeParseResult<
1228
+ CommercialSecuredLoanCommercialApplicationRelationships,
1229
+ SDKValidationError
1230
+ > {
1231
+ return safeParse(
1232
+ jsonString,
1233
+ (x) =>
1234
+ CommercialSecuredLoanCommercialApplicationRelationships$inboundSchema
1235
+ .parse(JSON.parse(x)),
1236
+ `Failed to parse 'CommercialSecuredLoanCommercialApplicationRelationships' from JSON`,
1237
+ );
1238
+ }