@financeable/aggregation 0.5.1 → 0.6.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 (292) hide show
  1. package/FUNCTIONS.md +11 -132
  2. package/README.md +262 -1515
  3. package/docs/sdks/applications/README.md +171 -295
  4. package/docs/sdks/oauthtoken/README.md +5 -5
  5. package/docs/sdks/supportingdocuments/README.md +113 -0
  6. package/funcs/applicationsCreate.d.ts +1 -2
  7. package/funcs/applicationsCreate.d.ts.map +1 -1
  8. package/funcs/applicationsCreate.js +2 -3
  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 +15 -0
  15. package/funcs/supportingDocumentsCreate.d.ts.map +1 -0
  16. package/funcs/{applicationsList.js → supportingDocumentsCreate.js} +15 -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 +8 -8
  32. package/models/components/addressattributes.d.ts.map +1 -1
  33. package/models/components/addressattributes.js +13 -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/commercialapplicationresource.d.ts +191 -0
  48. package/models/components/commercialapplicationresource.d.ts.map +1 -0
  49. package/models/components/commercialapplicationresource.js +183 -0
  50. package/models/components/commercialapplicationresource.js.map +1 -0
  51. package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts +124 -0
  52. package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts.map +1 -0
  53. package/models/components/commercialsecuredloanapplicationsubmissionpayload.js +144 -0
  54. package/models/components/commercialsecuredloanapplicationsubmissionpayload.js.map +1 -0
  55. package/models/components/commercialsecuredloanassetattributes.d.ts +235 -0
  56. package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -0
  57. package/models/components/commercialsecuredloanassetattributes.js +168 -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 +455 -0
  64. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -0
  65. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +504 -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/consumerapplicationresource.d.ts +191 -0
  72. package/models/components/consumerapplicationresource.d.ts.map +1 -0
  73. package/models/components/consumerapplicationresource.js +187 -0
  74. package/models/components/consumerapplicationresource.js.map +1 -0
  75. package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts +124 -0
  76. package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts.map +1 -0
  77. package/models/components/consumersecuredloanapplicationsubmissionpayload.js +146 -0
  78. package/models/components/consumersecuredloanapplicationsubmissionpayload.js.map +1 -0
  79. package/models/components/consumersecuredloanassetattributes.d.ts +235 -0
  80. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -0
  81. package/models/components/consumersecuredloanassetattributes.js +170 -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 +376 -0
  88. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -0
  89. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +426 -0
  90. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
  91. package/models/components/createsupportingdocumentsresponse.d.ts +121 -0
  92. package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -0
  93. package/models/components/createsupportingdocumentsresponse.js +149 -0
  94. package/models/components/createsupportingdocumentsresponse.js.map +1 -0
  95. package/models/components/documenttype.d.ts +70 -0
  96. package/models/components/documenttype.d.ts.map +1 -0
  97. package/models/components/documenttype.js +75 -0
  98. package/models/components/documenttype.js.map +1 -0
  99. package/models/components/entityattributes.d.ts +0 -22
  100. package/models/components/entityattributes.d.ts.map +1 -1
  101. package/models/components/entityattributes.js +0 -19
  102. package/models/components/entityattributes.js.map +1 -1
  103. package/models/components/forbiddenerror.d.ts +17 -39
  104. package/models/components/forbiddenerror.d.ts.map +1 -1
  105. package/models/components/forbiddenerror.js +27 -46
  106. package/models/components/forbiddenerror.js.map +1 -1
  107. package/models/components/index.d.ts +25 -8
  108. package/models/components/index.d.ts.map +1 -1
  109. package/models/components/index.js +25 -8
  110. package/models/components/index.js.map +1 -1
  111. package/models/components/linkobject.d.ts +47 -0
  112. package/models/components/linkobject.d.ts.map +1 -0
  113. package/models/components/linkobject.js +77 -0
  114. package/models/components/linkobject.js.map +1 -0
  115. package/models/components/relationshipresourcenotfound.d.ts +116 -0
  116. package/models/components/relationshipresourcenotfound.d.ts.map +1 -0
  117. package/models/components/relationshipresourcenotfound.js +139 -0
  118. package/models/components/relationshipresourcenotfound.js.map +1 -0
  119. package/models/components/resourcenotfound.d.ts +119 -0
  120. package/models/components/resourcenotfound.d.ts.map +1 -0
  121. package/models/components/resourcenotfound.js +139 -0
  122. package/models/components/resourcenotfound.js.map +1 -0
  123. package/models/components/resourcetypes.d.ts +46 -0
  124. package/models/components/resourcetypes.d.ts.map +1 -0
  125. package/models/components/{links.js → resourcetypes.js} +21 -27
  126. package/models/components/resourcetypes.js.map +1 -0
  127. package/models/components/supportingdocumentattributes.d.ts +40 -0
  128. package/models/components/supportingdocumentattributes.d.ts.map +1 -0
  129. package/models/components/{applicationattributescreate.js → supportingdocumentattributes.js} +24 -24
  130. package/models/components/supportingdocumentattributes.js.map +1 -0
  131. package/models/components/supportingdocumentattributesinput.d.ts +38 -0
  132. package/models/components/supportingdocumentattributesinput.d.ts.map +1 -0
  133. package/models/components/supportingdocumentattributesinput.js +72 -0
  134. package/models/components/supportingdocumentattributesinput.js.map +1 -0
  135. package/models/components/supportingdocumentrelationships.d.ts +448 -0
  136. package/models/components/supportingdocumentrelationships.d.ts.map +1 -0
  137. package/models/components/supportingdocumentrelationships.js +434 -0
  138. package/models/components/supportingdocumentrelationships.js.map +1 -0
  139. package/models/components/supportingdocumentresource.d.ts +91 -0
  140. package/models/components/supportingdocumentresource.d.ts.map +1 -0
  141. package/models/components/supportingdocumentresource.js +121 -0
  142. package/models/components/supportingdocumentresource.js.map +1 -0
  143. package/models/components/uploadmimetype.d.ts +49 -0
  144. package/models/components/uploadmimetype.d.ts.map +1 -0
  145. package/models/components/{applicationtype.js → uploadmimetype.js} +22 -14
  146. package/models/components/uploadmimetype.js.map +1 -0
  147. package/models/errors/createapplication.d.ts +38 -0
  148. package/models/errors/createapplication.d.ts.map +1 -0
  149. package/models/errors/{responsebody.js → createapplication.js} +15 -15
  150. package/models/errors/createapplication.js.map +1 -0
  151. package/models/errors/index.d.ts +2 -1
  152. package/models/errors/index.d.ts.map +1 -1
  153. package/models/errors/index.js +2 -1
  154. package/models/errors/index.js.map +1 -1
  155. package/models/errors/supportingdocumentscreate.d.ts +143 -0
  156. package/models/errors/supportingdocumentscreate.d.ts.map +1 -0
  157. package/models/errors/supportingdocumentscreate.js +225 -0
  158. package/models/errors/supportingdocumentscreate.js.map +1 -0
  159. package/models/operations/createapplication.d.ts +66 -808
  160. package/models/operations/createapplication.d.ts.map +1 -1
  161. package/models/operations/createapplication.js +82 -837
  162. package/models/operations/createapplication.js.map +1 -1
  163. package/models/operations/index.d.ts +1 -2
  164. package/models/operations/index.d.ts.map +1 -1
  165. package/models/operations/index.js +1 -2
  166. package/models/operations/index.js.map +1 -1
  167. package/models/operations/supportingdocumentscreate.d.ts +60 -0
  168. package/models/operations/supportingdocumentscreate.d.ts.map +1 -0
  169. package/models/operations/supportingdocumentscreate.js +108 -0
  170. package/models/operations/supportingdocumentscreate.js.map +1 -0
  171. package/package.json +2 -2
  172. package/sdk/applications.d.ts +1 -10
  173. package/sdk/applications.d.ts.map +1 -1
  174. package/sdk/applications.js +0 -14
  175. package/sdk/applications.js.map +1 -1
  176. package/sdk/oauthtoken.d.ts +1 -1
  177. package/sdk/oauthtoken.d.ts.map +1 -1
  178. package/sdk/oauthtoken.js +3 -3
  179. package/sdk/oauthtoken.js.map +1 -1
  180. package/sdk/sdk.d.ts +3 -0
  181. package/sdk/sdk.d.ts.map +1 -1
  182. package/sdk/sdk.js +4 -0
  183. package/sdk/sdk.js.map +1 -1
  184. package/sdk/supportingdocuments.d.ts +10 -0
  185. package/sdk/supportingdocuments.d.ts.map +1 -0
  186. package/sdk/supportingdocuments.js +19 -0
  187. package/sdk/supportingdocuments.js.map +1 -0
  188. package/src/funcs/applicationsCreate.ts +7 -8
  189. package/src/funcs/{oauthTokenGet.ts → oauthTokenOauthToken.ts} +1 -1
  190. package/src/funcs/{applicationsList.ts → supportingDocumentsCreate.ts} +31 -20
  191. package/src/lib/config.ts +4 -7
  192. package/src/lib/matchers.ts +20 -0
  193. package/src/lib/sdks.ts +19 -13
  194. package/src/models/components/addressattributes.ts +18 -14
  195. package/src/models/components/applicationresource.ts +83 -0
  196. package/src/models/components/badrequesterror.ts +182 -0
  197. package/src/models/components/commercialapplicationjsonapirelationships.ts +894 -0
  198. package/src/models/components/commercialapplicationresource.ts +355 -0
  199. package/src/models/components/commercialsecuredloanapplicationsubmissionpayload.ts +237 -0
  200. package/src/models/components/commercialsecuredloanassetattributes.ts +315 -0
  201. package/src/models/components/commercialsecuredloanassettype.ts +64 -0
  202. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +1148 -0
  203. package/src/models/components/consumerapplicationjsonapirelationships.ts +683 -0
  204. package/src/models/components/consumerapplicationresource.ts +342 -0
  205. package/src/models/components/consumersecuredloanapplicationsubmissionpayload.ts +270 -0
  206. package/src/models/components/consumersecuredloanassetattributes.ts +330 -0
  207. package/src/models/components/consumersecuredloanassettype.ts +47 -0
  208. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +1011 -0
  209. package/src/models/components/createsupportingdocumentsresponse.ts +252 -0
  210. package/src/models/components/documenttype.ts +49 -0
  211. package/src/models/components/entityattributes.ts +0 -44
  212. package/src/models/components/forbiddenerror.ts +35 -58
  213. package/src/models/components/index.ts +25 -8
  214. package/src/models/components/linkobject.ts +84 -0
  215. package/src/models/components/relationshipresourcenotfound.ts +195 -0
  216. package/src/models/components/resourcenotfound.ts +188 -0
  217. package/src/models/components/resourcetypes.ts +39 -0
  218. package/src/models/components/supportingdocumentattributes.ts +87 -0
  219. package/src/models/components/supportingdocumentattributesinput.ts +84 -0
  220. package/src/models/components/supportingdocumentrelationships.ts +828 -0
  221. package/src/models/components/supportingdocumentresource.ts +163 -0
  222. package/src/models/components/uploadmimetype.ts +44 -0
  223. package/src/models/errors/createapplication.ts +76 -0
  224. package/src/models/errors/index.ts +2 -1
  225. package/src/models/errors/supportingdocumentscreate.ts +342 -0
  226. package/src/models/operations/createapplication.ts +143 -1778
  227. package/src/models/operations/index.ts +1 -2
  228. package/src/models/operations/supportingdocumentscreate.ts +150 -0
  229. package/src/sdk/applications.ts +1 -32
  230. package/src/sdk/oauthtoken.ts +3 -3
  231. package/src/sdk/sdk.ts +8 -0
  232. package/src/sdk/supportingdocuments.ts +25 -0
  233. package/funcs/applicationsGet.d.ts +0 -14
  234. package/funcs/applicationsGet.d.ts.map +0 -1
  235. package/funcs/applicationsGet.js +0 -120
  236. package/funcs/applicationsGet.js.map +0 -1
  237. package/funcs/applicationsList.d.ts +0 -14
  238. package/funcs/applicationsList.d.ts.map +0 -1
  239. package/funcs/applicationsList.js.map +0 -1
  240. package/funcs/oauthTokenGet.d.ts.map +0 -1
  241. package/funcs/oauthTokenGet.js.map +0 -1
  242. package/models/components/applicationattributes.d.ts +0 -69
  243. package/models/components/applicationattributes.d.ts.map +0 -1
  244. package/models/components/applicationattributes.js +0 -85
  245. package/models/components/applicationattributes.js.map +0 -1
  246. package/models/components/applicationattributescreate.d.ts +0 -43
  247. package/models/components/applicationattributescreate.d.ts.map +0 -1
  248. package/models/components/applicationattributescreate.js.map +0 -1
  249. package/models/components/applicationresourcebulksubmission.d.ts +0 -527
  250. package/models/components/applicationresourcebulksubmission.d.ts.map +0 -1
  251. package/models/components/applicationresourcebulksubmission.js +0 -565
  252. package/models/components/applicationresourcebulksubmission.js.map +0 -1
  253. package/models/components/applicationtype.d.ts +0 -28
  254. package/models/components/applicationtype.d.ts.map +0 -1
  255. package/models/components/applicationtype.js.map +0 -1
  256. package/models/components/assetattributes.d.ts +0 -311
  257. package/models/components/assetattributes.d.ts.map +0 -1
  258. package/models/components/assetattributes.js +0 -234
  259. package/models/components/assetattributes.js.map +0 -1
  260. package/models/components/commercialassettype.d.ts +0 -44
  261. package/models/components/commercialassettype.d.ts.map +0 -1
  262. package/models/components/commercialassettype.js +0 -85
  263. package/models/components/commercialassettype.js.map +0 -1
  264. package/models/components/consumerassettype.d.ts +0 -32
  265. package/models/components/consumerassettype.d.ts.map +0 -1
  266. package/models/components/consumerassettype.js.map +0 -1
  267. package/models/components/links.d.ts +0 -40
  268. package/models/components/links.d.ts.map +0 -1
  269. package/models/components/links.js.map +0 -1
  270. package/models/errors/responsebody.d.ts +0 -38
  271. package/models/errors/responsebody.d.ts.map +0 -1
  272. package/models/errors/responsebody.js.map +0 -1
  273. package/models/operations/getapplication.d.ts +0 -962
  274. package/models/operations/getapplication.d.ts.map +0 -1
  275. package/models/operations/getapplication.js +0 -1030
  276. package/models/operations/getapplication.js.map +0 -1
  277. package/models/operations/getapplications.d.ts +0 -962
  278. package/models/operations/getapplications.d.ts.map +0 -1
  279. package/models/operations/getapplications.js +0 -1029
  280. package/models/operations/getapplications.js.map +0 -1
  281. package/src/funcs/applicationsGet.ts +0 -168
  282. package/src/models/components/applicationattributes.ts +0 -128
  283. package/src/models/components/applicationattributescreate.ts +0 -90
  284. package/src/models/components/applicationresourcebulksubmission.ts +0 -1172
  285. package/src/models/components/applicationtype.ts +0 -33
  286. package/src/models/components/assetattributes.ts +0 -411
  287. package/src/models/components/commercialassettype.ts +0 -61
  288. package/src/models/components/consumerassettype.ts +0 -43
  289. package/src/models/components/links.ts +0 -72
  290. package/src/models/errors/responsebody.ts +0 -76
  291. package/src/models/operations/getapplication.ts +0 -2246
  292. package/src/models/operations/getapplications.ts +0 -2191
@@ -0,0 +1,252 @@
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
+ LinkObject,
12
+ LinkObject$inboundSchema,
13
+ LinkObject$Outbound,
14
+ LinkObject$outboundSchema,
15
+ } from "./linkobject.js";
16
+ import {
17
+ SupportingDocumentAttributes,
18
+ SupportingDocumentAttributes$inboundSchema,
19
+ SupportingDocumentAttributes$Outbound,
20
+ SupportingDocumentAttributes$outboundSchema,
21
+ } from "./supportingdocumentattributes.js";
22
+
23
+ export const CreateSupportingDocumentsResponseType = {
24
+ SupportingDocuments: "supporting-documents",
25
+ } as const;
26
+ export type CreateSupportingDocumentsResponseType = ClosedEnum<
27
+ typeof CreateSupportingDocumentsResponseType
28
+ >;
29
+
30
+ export type Relationships = {};
31
+
32
+ export type CreateSupportingDocumentsResponseLinks = {
33
+ /**
34
+ * Standard link object
35
+ */
36
+ upload: LinkObject;
37
+ };
38
+
39
+ export type CreateSupportingDocumentsResponse = {
40
+ type: CreateSupportingDocumentsResponseType;
41
+ id: string;
42
+ attributes?: SupportingDocumentAttributes | undefined;
43
+ relationships: Relationships;
44
+ links?: { [k: string]: CreateSupportingDocumentsResponseLinks } | undefined;
45
+ meta?: { [k: string]: any } | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const CreateSupportingDocumentsResponseType$inboundSchema:
50
+ z.ZodNativeEnum<typeof CreateSupportingDocumentsResponseType> = z.nativeEnum(
51
+ CreateSupportingDocumentsResponseType,
52
+ );
53
+
54
+ /** @internal */
55
+ export const CreateSupportingDocumentsResponseType$outboundSchema:
56
+ z.ZodNativeEnum<typeof CreateSupportingDocumentsResponseType> =
57
+ CreateSupportingDocumentsResponseType$inboundSchema;
58
+
59
+ /**
60
+ * @internal
61
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
62
+ */
63
+ export namespace CreateSupportingDocumentsResponseType$ {
64
+ /** @deprecated use `CreateSupportingDocumentsResponseType$inboundSchema` instead. */
65
+ export const inboundSchema =
66
+ CreateSupportingDocumentsResponseType$inboundSchema;
67
+ /** @deprecated use `CreateSupportingDocumentsResponseType$outboundSchema` instead. */
68
+ export const outboundSchema =
69
+ CreateSupportingDocumentsResponseType$outboundSchema;
70
+ }
71
+
72
+ /** @internal */
73
+ export const Relationships$inboundSchema: z.ZodType<
74
+ Relationships,
75
+ z.ZodTypeDef,
76
+ unknown
77
+ > = z.object({});
78
+
79
+ /** @internal */
80
+ export type Relationships$Outbound = {};
81
+
82
+ /** @internal */
83
+ export const Relationships$outboundSchema: z.ZodType<
84
+ Relationships$Outbound,
85
+ z.ZodTypeDef,
86
+ Relationships
87
+ > = z.object({});
88
+
89
+ /**
90
+ * @internal
91
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
92
+ */
93
+ export namespace Relationships$ {
94
+ /** @deprecated use `Relationships$inboundSchema` instead. */
95
+ export const inboundSchema = Relationships$inboundSchema;
96
+ /** @deprecated use `Relationships$outboundSchema` instead. */
97
+ export const outboundSchema = Relationships$outboundSchema;
98
+ /** @deprecated use `Relationships$Outbound` instead. */
99
+ export type Outbound = Relationships$Outbound;
100
+ }
101
+
102
+ export function relationshipsToJSON(relationships: Relationships): string {
103
+ return JSON.stringify(Relationships$outboundSchema.parse(relationships));
104
+ }
105
+
106
+ export function relationshipsFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<Relationships, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => Relationships$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'Relationships' from JSON`,
113
+ );
114
+ }
115
+
116
+ /** @internal */
117
+ export const CreateSupportingDocumentsResponseLinks$inboundSchema: z.ZodType<
118
+ CreateSupportingDocumentsResponseLinks,
119
+ z.ZodTypeDef,
120
+ unknown
121
+ > = z.object({
122
+ upload: LinkObject$inboundSchema,
123
+ });
124
+
125
+ /** @internal */
126
+ export type CreateSupportingDocumentsResponseLinks$Outbound = {
127
+ upload: LinkObject$Outbound;
128
+ };
129
+
130
+ /** @internal */
131
+ export const CreateSupportingDocumentsResponseLinks$outboundSchema: z.ZodType<
132
+ CreateSupportingDocumentsResponseLinks$Outbound,
133
+ z.ZodTypeDef,
134
+ CreateSupportingDocumentsResponseLinks
135
+ > = z.object({
136
+ upload: LinkObject$outboundSchema,
137
+ });
138
+
139
+ /**
140
+ * @internal
141
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
142
+ */
143
+ export namespace CreateSupportingDocumentsResponseLinks$ {
144
+ /** @deprecated use `CreateSupportingDocumentsResponseLinks$inboundSchema` instead. */
145
+ export const inboundSchema =
146
+ CreateSupportingDocumentsResponseLinks$inboundSchema;
147
+ /** @deprecated use `CreateSupportingDocumentsResponseLinks$outboundSchema` instead. */
148
+ export const outboundSchema =
149
+ CreateSupportingDocumentsResponseLinks$outboundSchema;
150
+ /** @deprecated use `CreateSupportingDocumentsResponseLinks$Outbound` instead. */
151
+ export type Outbound = CreateSupportingDocumentsResponseLinks$Outbound;
152
+ }
153
+
154
+ export function createSupportingDocumentsResponseLinksToJSON(
155
+ createSupportingDocumentsResponseLinks:
156
+ CreateSupportingDocumentsResponseLinks,
157
+ ): string {
158
+ return JSON.stringify(
159
+ CreateSupportingDocumentsResponseLinks$outboundSchema.parse(
160
+ createSupportingDocumentsResponseLinks,
161
+ ),
162
+ );
163
+ }
164
+
165
+ export function createSupportingDocumentsResponseLinksFromJSON(
166
+ jsonString: string,
167
+ ): SafeParseResult<CreateSupportingDocumentsResponseLinks, SDKValidationError> {
168
+ return safeParse(
169
+ jsonString,
170
+ (x) =>
171
+ CreateSupportingDocumentsResponseLinks$inboundSchema.parse(JSON.parse(x)),
172
+ `Failed to parse 'CreateSupportingDocumentsResponseLinks' from JSON`,
173
+ );
174
+ }
175
+
176
+ /** @internal */
177
+ export const CreateSupportingDocumentsResponse$inboundSchema: z.ZodType<
178
+ CreateSupportingDocumentsResponse,
179
+ z.ZodTypeDef,
180
+ unknown
181
+ > = z.object({
182
+ type: CreateSupportingDocumentsResponseType$inboundSchema,
183
+ id: z.string(),
184
+ attributes: SupportingDocumentAttributes$inboundSchema.optional(),
185
+ relationships: z.lazy(() => Relationships$inboundSchema),
186
+ links: z.record(
187
+ z.lazy(() => CreateSupportingDocumentsResponseLinks$inboundSchema),
188
+ ).optional(),
189
+ meta: z.record(z.any()).optional(),
190
+ });
191
+
192
+ /** @internal */
193
+ export type CreateSupportingDocumentsResponse$Outbound = {
194
+ type: string;
195
+ id: string;
196
+ attributes?: SupportingDocumentAttributes$Outbound | undefined;
197
+ relationships: Relationships$Outbound;
198
+ links?:
199
+ | { [k: string]: CreateSupportingDocumentsResponseLinks$Outbound }
200
+ | undefined;
201
+ meta?: { [k: string]: any } | undefined;
202
+ };
203
+
204
+ /** @internal */
205
+ export const CreateSupportingDocumentsResponse$outboundSchema: z.ZodType<
206
+ CreateSupportingDocumentsResponse$Outbound,
207
+ z.ZodTypeDef,
208
+ CreateSupportingDocumentsResponse
209
+ > = z.object({
210
+ type: CreateSupportingDocumentsResponseType$outboundSchema,
211
+ id: z.string(),
212
+ attributes: SupportingDocumentAttributes$outboundSchema.optional(),
213
+ relationships: z.lazy(() => Relationships$outboundSchema),
214
+ links: z.record(
215
+ z.lazy(() => CreateSupportingDocumentsResponseLinks$outboundSchema),
216
+ ).optional(),
217
+ meta: z.record(z.any()).optional(),
218
+ });
219
+
220
+ /**
221
+ * @internal
222
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
223
+ */
224
+ export namespace CreateSupportingDocumentsResponse$ {
225
+ /** @deprecated use `CreateSupportingDocumentsResponse$inboundSchema` instead. */
226
+ export const inboundSchema = CreateSupportingDocumentsResponse$inboundSchema;
227
+ /** @deprecated use `CreateSupportingDocumentsResponse$outboundSchema` instead. */
228
+ export const outboundSchema =
229
+ CreateSupportingDocumentsResponse$outboundSchema;
230
+ /** @deprecated use `CreateSupportingDocumentsResponse$Outbound` instead. */
231
+ export type Outbound = CreateSupportingDocumentsResponse$Outbound;
232
+ }
233
+
234
+ export function createSupportingDocumentsResponseToJSON(
235
+ createSupportingDocumentsResponse: CreateSupportingDocumentsResponse,
236
+ ): string {
237
+ return JSON.stringify(
238
+ CreateSupportingDocumentsResponse$outboundSchema.parse(
239
+ createSupportingDocumentsResponse,
240
+ ),
241
+ );
242
+ }
243
+
244
+ export function createSupportingDocumentsResponseFromJSON(
245
+ jsonString: string,
246
+ ): SafeParseResult<CreateSupportingDocumentsResponse, SDKValidationError> {
247
+ return safeParse(
248
+ jsonString,
249
+ (x) => CreateSupportingDocumentsResponse$inboundSchema.parse(JSON.parse(x)),
250
+ `Failed to parse 'CreateSupportingDocumentsResponse' from JSON`,
251
+ );
252
+ }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * The type/purpose of the supporting document
10
+ */
11
+ export const DocumentType = {
12
+ PrivacyAgreement: "PRIVACY AGREEMENT",
13
+ PrivacyFile: "PRIVACY FILE",
14
+ DisclosureStatement: "DISCLOSURE STATEMENT",
15
+ PpsrCertificate: "PPSR CERTIFICATE",
16
+ BankStatement: "BANK STATEMENT",
17
+ CommercialCreditFile: "COMMERCIAL CREDIT FILE",
18
+ AsicFile: "ASIC FILE",
19
+ IdDocument: "ID DOCUMENT",
20
+ DriverLicenceFront: "DRIVER LICENCE FRONT",
21
+ DriverLicenceBack: "DRIVER LICENCE BACK",
22
+ CustomerPhoto: "CUSTOMER PHOTO",
23
+ VerificationCertificate: "VERIFICATION CERTIFICATE",
24
+ CreditFile: "CREDIT FILE",
25
+ CreditScore: "CREDIT SCORE",
26
+ } as const;
27
+ /**
28
+ * The type/purpose of the supporting document
29
+ */
30
+ export type DocumentType = ClosedEnum<typeof DocumentType>;
31
+
32
+ /** @internal */
33
+ export const DocumentType$inboundSchema: z.ZodNativeEnum<typeof DocumentType> =
34
+ z.nativeEnum(DocumentType);
35
+
36
+ /** @internal */
37
+ export const DocumentType$outboundSchema: z.ZodNativeEnum<typeof DocumentType> =
38
+ DocumentType$inboundSchema;
39
+
40
+ /**
41
+ * @internal
42
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
+ */
44
+ export namespace DocumentType$ {
45
+ /** @deprecated use `DocumentType$inboundSchema` instead. */
46
+ export const inboundSchema = DocumentType$inboundSchema;
47
+ /** @deprecated use `DocumentType$outboundSchema` instead. */
48
+ export const outboundSchema = DocumentType$outboundSchema;
49
+ }
@@ -6,29 +6,12 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
- import {
10
- AustralianStatesAndTerritories,
11
- AustralianStatesAndTerritories$inboundSchema,
12
- AustralianStatesAndTerritories$outboundSchema,
13
- } from "./australianstatesandterritories.js";
14
9
 
15
10
  export type EntityAttributes = {
16
- businessNames: Array<string>;
17
11
  entityName: string;
18
12
  abn: string;
19
- acn: string;
20
- state: AustralianStatesAndTerritories;
21
- entityType?: string | undefined;
22
- gst?: string | undefined;
23
- abnStatus?: string | undefined;
24
- /**
25
- * in format YYYY-MM-DD
26
- */
27
- abnStatusEffectiveFrom?: string | undefined;
28
- monthsInBusiness?: number | undefined;
29
13
  turnover?: number | undefined;
30
14
  industryType?: string | undefined;
31
- ppsr?: string | undefined;
32
15
  emails?: Array<string> | undefined;
33
16
  phoneNumbers?: Array<string> | undefined;
34
17
  };
@@ -39,38 +22,20 @@ export const EntityAttributes$inboundSchema: z.ZodType<
39
22
  z.ZodTypeDef,
40
23
  unknown
41
24
  > = z.object({
42
- businessNames: z.array(z.string()),
43
25
  entityName: z.string(),
44
26
  abn: z.string(),
45
- acn: z.string(),
46
- state: AustralianStatesAndTerritories$inboundSchema,
47
- entityType: z.string().optional(),
48
- gst: z.string().optional(),
49
- abnStatus: z.string().optional(),
50
- abnStatusEffectiveFrom: z.string().optional(),
51
- monthsInBusiness: z.number().int().optional(),
52
27
  turnover: z.number().int().optional(),
53
28
  industryType: z.string().optional(),
54
- ppsr: z.string().optional(),
55
29
  emails: z.array(z.string()).optional(),
56
30
  phoneNumbers: z.array(z.string()).optional(),
57
31
  });
58
32
 
59
33
  /** @internal */
60
34
  export type EntityAttributes$Outbound = {
61
- businessNames: Array<string>;
62
35
  entityName: string;
63
36
  abn: string;
64
- acn: string;
65
- state: string;
66
- entityType?: string | undefined;
67
- gst?: string | undefined;
68
- abnStatus?: string | undefined;
69
- abnStatusEffectiveFrom?: string | undefined;
70
- monthsInBusiness?: number | undefined;
71
37
  turnover?: number | undefined;
72
38
  industryType?: string | undefined;
73
- ppsr?: string | undefined;
74
39
  emails?: Array<string> | undefined;
75
40
  phoneNumbers?: Array<string> | undefined;
76
41
  };
@@ -81,19 +46,10 @@ export const EntityAttributes$outboundSchema: z.ZodType<
81
46
  z.ZodTypeDef,
82
47
  EntityAttributes
83
48
  > = z.object({
84
- businessNames: z.array(z.string()),
85
49
  entityName: z.string(),
86
50
  abn: z.string(),
87
- acn: z.string(),
88
- state: AustralianStatesAndTerritories$outboundSchema,
89
- entityType: z.string().optional(),
90
- gst: z.string().optional(),
91
- abnStatus: z.string().optional(),
92
- abnStatusEffectiveFrom: z.string().optional(),
93
- monthsInBusiness: z.number().int().optional(),
94
51
  turnover: z.number().int().optional(),
95
52
  industryType: z.string().optional(),
96
- ppsr: z.string().optional(),
97
53
  emails: z.array(z.string()).optional(),
98
54
  phoneNumbers: z.array(z.string()).optional(),
99
55
  });
@@ -25,29 +25,23 @@ export const ForbiddenErrorStatus = {
25
25
  } as const;
26
26
  export type ForbiddenErrorStatus = ClosedEnum<typeof ForbiddenErrorStatus>;
27
27
 
28
- export const Code = {
28
+ export const ForbiddenErrorCode = {
29
29
  Unauthorised: "Unauthorised",
30
30
  } as const;
31
- export type Code = ClosedEnum<typeof Code>;
31
+ export type ForbiddenErrorCode = ClosedEnum<typeof ForbiddenErrorCode>;
32
32
 
33
- export const Title = {
33
+ export const ForbiddenErrorTitle = {
34
34
  Unauthorised: "Unauthorised",
35
35
  } as const;
36
- export type Title = ClosedEnum<typeof Title>;
37
-
38
- export const Detail = {
39
- YouAreNotAuthorizedToPerformThisAction:
40
- "You are not authorized to perform this action.",
41
- } as const;
42
- export type Detail = ClosedEnum<typeof Detail>;
36
+ export type ForbiddenErrorTitle = ClosedEnum<typeof ForbiddenErrorTitle>;
43
37
 
44
38
  export type ForbiddenError = {
45
39
  id?: string | undefined;
46
40
  links?: APIErrorLinks | undefined;
47
41
  status: ForbiddenErrorStatus;
48
- code: Code;
49
- title: Title;
50
- detail: Detail;
42
+ code: ForbiddenErrorCode;
43
+ title: ForbiddenErrorTitle;
44
+ detail: string;
51
45
  /**
52
46
  * An object describing the source of the error from the request
53
47
  */
@@ -77,62 +71,45 @@ export namespace ForbiddenErrorStatus$ {
77
71
  }
78
72
 
79
73
  /** @internal */
80
- export const Code$inboundSchema: z.ZodNativeEnum<typeof Code> = z.nativeEnum(
81
- Code,
82
- );
83
-
84
- /** @internal */
85
- export const Code$outboundSchema: z.ZodNativeEnum<typeof Code> =
86
- Code$inboundSchema;
87
-
88
- /**
89
- * @internal
90
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
91
- */
92
- export namespace Code$ {
93
- /** @deprecated use `Code$inboundSchema` instead. */
94
- export const inboundSchema = Code$inboundSchema;
95
- /** @deprecated use `Code$outboundSchema` instead. */
96
- export const outboundSchema = Code$outboundSchema;
97
- }
98
-
99
- /** @internal */
100
- export const Title$inboundSchema: z.ZodNativeEnum<typeof Title> = z.nativeEnum(
101
- Title,
102
- );
74
+ export const ForbiddenErrorCode$inboundSchema: z.ZodNativeEnum<
75
+ typeof ForbiddenErrorCode
76
+ > = z.nativeEnum(ForbiddenErrorCode);
103
77
 
104
78
  /** @internal */
105
- export const Title$outboundSchema: z.ZodNativeEnum<typeof Title> =
106
- Title$inboundSchema;
79
+ export const ForbiddenErrorCode$outboundSchema: z.ZodNativeEnum<
80
+ typeof ForbiddenErrorCode
81
+ > = ForbiddenErrorCode$inboundSchema;
107
82
 
108
83
  /**
109
84
  * @internal
110
85
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
86
  */
112
- export namespace Title$ {
113
- /** @deprecated use `Title$inboundSchema` instead. */
114
- export const inboundSchema = Title$inboundSchema;
115
- /** @deprecated use `Title$outboundSchema` instead. */
116
- export const outboundSchema = Title$outboundSchema;
87
+ export namespace ForbiddenErrorCode$ {
88
+ /** @deprecated use `ForbiddenErrorCode$inboundSchema` instead. */
89
+ export const inboundSchema = ForbiddenErrorCode$inboundSchema;
90
+ /** @deprecated use `ForbiddenErrorCode$outboundSchema` instead. */
91
+ export const outboundSchema = ForbiddenErrorCode$outboundSchema;
117
92
  }
118
93
 
119
94
  /** @internal */
120
- export const Detail$inboundSchema: z.ZodNativeEnum<typeof Detail> = z
121
- .nativeEnum(Detail);
95
+ export const ForbiddenErrorTitle$inboundSchema: z.ZodNativeEnum<
96
+ typeof ForbiddenErrorTitle
97
+ > = z.nativeEnum(ForbiddenErrorTitle);
122
98
 
123
99
  /** @internal */
124
- export const Detail$outboundSchema: z.ZodNativeEnum<typeof Detail> =
125
- Detail$inboundSchema;
100
+ export const ForbiddenErrorTitle$outboundSchema: z.ZodNativeEnum<
101
+ typeof ForbiddenErrorTitle
102
+ > = ForbiddenErrorTitle$inboundSchema;
126
103
 
127
104
  /**
128
105
  * @internal
129
106
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
130
107
  */
131
- export namespace Detail$ {
132
- /** @deprecated use `Detail$inboundSchema` instead. */
133
- export const inboundSchema = Detail$inboundSchema;
134
- /** @deprecated use `Detail$outboundSchema` instead. */
135
- export const outboundSchema = Detail$outboundSchema;
108
+ export namespace ForbiddenErrorTitle$ {
109
+ /** @deprecated use `ForbiddenErrorTitle$inboundSchema` instead. */
110
+ export const inboundSchema = ForbiddenErrorTitle$inboundSchema;
111
+ /** @deprecated use `ForbiddenErrorTitle$outboundSchema` instead. */
112
+ export const outboundSchema = ForbiddenErrorTitle$outboundSchema;
136
113
  }
137
114
 
138
115
  /** @internal */
@@ -144,9 +121,9 @@ export const ForbiddenError$inboundSchema: z.ZodType<
144
121
  id: z.string().optional(),
145
122
  links: APIErrorLinks$inboundSchema.optional(),
146
123
  status: ForbiddenErrorStatus$inboundSchema,
147
- code: Code$inboundSchema,
148
- title: Title$inboundSchema,
149
- detail: Detail$inboundSchema,
124
+ code: ForbiddenErrorCode$inboundSchema,
125
+ title: ForbiddenErrorTitle$inboundSchema,
126
+ detail: z.string(),
150
127
  source: ErrorSource$inboundSchema.optional(),
151
128
  meta: z.record(z.any()).optional(),
152
129
  });
@@ -172,9 +149,9 @@ export const ForbiddenError$outboundSchema: z.ZodType<
172
149
  id: z.string().optional(),
173
150
  links: APIErrorLinks$outboundSchema.optional(),
174
151
  status: ForbiddenErrorStatus$outboundSchema,
175
- code: Code$outboundSchema,
176
- title: Title$outboundSchema,
177
- detail: Detail$outboundSchema,
152
+ code: ForbiddenErrorCode$outboundSchema,
153
+ title: ForbiddenErrorTitle$outboundSchema,
154
+ detail: z.string(),
178
155
  source: ErrorSource$outboundSchema.optional(),
179
156
  meta: z.record(z.any()).optional(),
180
157
  });
@@ -4,25 +4,42 @@
4
4
 
5
5
  export * from "./addressattributes.js";
6
6
  export * from "./apierrorlinks.js";
7
- export * from "./applicationattributes.js";
8
- export * from "./applicationattributescreate.js";
9
- export * from "./applicationresourcebulksubmission.js";
7
+ export * from "./applicationresource.js";
10
8
  export * from "./applicationstatus.js";
11
- export * from "./applicationtype.js";
12
- export * from "./assetattributes.js";
13
9
  export * from "./australianstatesandterritories.js";
14
- export * from "./commercialassettype.js";
15
- export * from "./consumerassettype.js";
10
+ export * from "./badrequesterror.js";
11
+ export * from "./commercialapplicationjsonapirelationships.js";
12
+ export * from "./commercialapplicationresource.js";
13
+ export * from "./commercialsecuredloanapplicationsubmissionpayload.js";
14
+ export * from "./commercialsecuredloanassetattributes.js";
15
+ export * from "./commercialsecuredloanassettype.js";
16
+ export * from "./commercialsecuredloancommercialapplicationrelationships.js";
17
+ export * from "./consumerapplicationjsonapirelationships.js";
18
+ export * from "./consumerapplicationresource.js";
19
+ export * from "./consumersecuredloanapplicationsubmissionpayload.js";
20
+ export * from "./consumersecuredloanassetattributes.js";
21
+ export * from "./consumersecuredloanassettype.js";
22
+ export * from "./consumersecuredloanconsumerapplicationrelationships.js";
23
+ export * from "./createsupportingdocumentsresponse.js";
16
24
  export * from "./customerattributes.js";
17
25
  export * from "./customeridtype.js";
18
26
  export * from "./customertitle.js";
27
+ export * from "./documenttype.js";
19
28
  export * from "./entityattributes.js";
20
29
  export * from "./errorsource.js";
21
30
  export * from "./forbiddenerror.js";
22
31
  export * from "./frequencytype.js";
23
- export * from "./links.js";
32
+ export * from "./linkobject.js";
24
33
  export * from "./loandetailsattributes.js";
34
+ export * from "./relationshipresourcenotfound.js";
25
35
  export * from "./repaymentstructure.js";
36
+ export * from "./resourcenotfound.js";
37
+ export * from "./resourcetypes.js";
26
38
  export * from "./security.js";
39
+ export * from "./supportingdocumentattributes.js";
40
+ export * from "./supportingdocumentattributesinput.js";
41
+ export * from "./supportingdocumentrelationships.js";
42
+ export * from "./supportingdocumentresource.js";
27
43
  export * from "./tokenrequest.js";
28
44
  export * from "./tokenresponse.js";
45
+ export * from "./uploadmimetype.js";
@@ -0,0 +1,84 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * Standard link object
12
+ */
13
+ export type LinkObject = {
14
+ /**
15
+ * A URI reference
16
+ */
17
+ href: string;
18
+ describedby?: string | undefined;
19
+ title?: string | undefined;
20
+ type?: string | undefined;
21
+ meta?: { [k: string]: any } | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const LinkObject$inboundSchema: z.ZodType<
26
+ LinkObject,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ href: z.string(),
31
+ describedby: z.string().optional(),
32
+ title: z.string().optional(),
33
+ type: z.string().optional(),
34
+ meta: z.record(z.any()).optional(),
35
+ });
36
+
37
+ /** @internal */
38
+ export type LinkObject$Outbound = {
39
+ href: string;
40
+ describedby?: string | undefined;
41
+ title?: string | undefined;
42
+ type?: string | undefined;
43
+ meta?: { [k: string]: any } | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const LinkObject$outboundSchema: z.ZodType<
48
+ LinkObject$Outbound,
49
+ z.ZodTypeDef,
50
+ LinkObject
51
+ > = z.object({
52
+ href: z.string(),
53
+ describedby: z.string().optional(),
54
+ title: z.string().optional(),
55
+ type: z.string().optional(),
56
+ meta: z.record(z.any()).optional(),
57
+ });
58
+
59
+ /**
60
+ * @internal
61
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
62
+ */
63
+ export namespace LinkObject$ {
64
+ /** @deprecated use `LinkObject$inboundSchema` instead. */
65
+ export const inboundSchema = LinkObject$inboundSchema;
66
+ /** @deprecated use `LinkObject$outboundSchema` instead. */
67
+ export const outboundSchema = LinkObject$outboundSchema;
68
+ /** @deprecated use `LinkObject$Outbound` instead. */
69
+ export type Outbound = LinkObject$Outbound;
70
+ }
71
+
72
+ export function linkObjectToJSON(linkObject: LinkObject): string {
73
+ return JSON.stringify(LinkObject$outboundSchema.parse(linkObject));
74
+ }
75
+
76
+ export function linkObjectFromJSON(
77
+ jsonString: string,
78
+ ): SafeParseResult<LinkObject, SDKValidationError> {
79
+ return safeParse(
80
+ jsonString,
81
+ (x) => LinkObject$inboundSchema.parse(JSON.parse(x)),
82
+ `Failed to parse 'LinkObject' from JSON`,
83
+ );
84
+ }