@financeable/aggregation 0.12.1 → 0.13.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 (513) hide show
  1. package/lib/config.d.ts +3 -3
  2. package/lib/config.js +3 -3
  3. package/lib/encodings.d.ts +1 -0
  4. package/lib/encodings.d.ts.map +1 -1
  5. package/models/components/addressattributes.d.ts +0 -28
  6. package/models/components/addressattributes.d.ts.map +1 -1
  7. package/models/components/apierrorlinks.d.ts +0 -19
  8. package/models/components/apierrorlinks.d.ts.map +1 -1
  9. package/models/components/applicationresource.d.ts +4 -21
  10. package/models/components/applicationresource.d.ts.map +1 -1
  11. package/models/components/applicationstatus.d.ts +0 -30
  12. package/models/components/applicationstatus.d.ts.map +1 -1
  13. package/models/components/australianstatesandterritories.d.ts +0 -28
  14. package/models/components/australianstatesandterritories.d.ts.map +1 -1
  15. package/models/components/badrequesterror.d.ts +3 -85
  16. package/models/components/badrequesterror.d.ts.map +1 -1
  17. package/models/components/businessapplicationjsonapirelationships.d.ts +1 -205
  18. package/models/components/businessapplicationjsonapirelationships.d.ts.map +1 -1
  19. package/models/components/businessapplicationpayload.d.ts +0 -64
  20. package/models/components/businessapplicationpayload.d.ts.map +1 -1
  21. package/models/components/businessapplicationresource.d.ts +12 -94
  22. package/models/components/businessapplicationresource.d.ts.map +1 -1
  23. package/models/components/businessloanbusinessapplicationrelationships.d.ts +0 -308
  24. package/models/components/businessloanbusinessapplicationrelationships.d.ts.map +1 -1
  25. package/models/components/commercialapplicationjsonapirelationships.d.ts +1 -267
  26. package/models/components/commercialapplicationjsonapirelationships.d.ts.map +1 -1
  27. package/models/components/commercialsecuredapplicationpayload.d.ts +0 -78
  28. package/models/components/commercialsecuredapplicationpayload.d.ts.map +1 -1
  29. package/models/components/commercialsecuredapplicationresource.d.ts +12 -94
  30. package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -1
  31. package/models/components/commercialsecuredloanassetattributes.d.ts +0 -130
  32. package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -1
  33. package/models/components/commercialsecuredloanassettype.d.ts +0 -64
  34. package/models/components/commercialsecuredloanassettype.d.ts.map +1 -1
  35. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +0 -354
  36. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
  37. package/models/components/commercialsecuredloantypeofsale.d.ts +0 -24
  38. package/models/components/commercialsecuredloantypeofsale.d.ts.map +1 -1
  39. package/models/components/consumerapplicationjsonapirelationships.d.ts +1 -205
  40. package/models/components/consumerapplicationjsonapirelationships.d.ts.map +1 -1
  41. package/models/components/consumersecuredapplicationpayload.d.ts +0 -78
  42. package/models/components/consumersecuredapplicationpayload.d.ts.map +1 -1
  43. package/models/components/consumersecuredapplicationresource.d.ts +12 -94
  44. package/models/components/consumersecuredapplicationresource.d.ts.map +1 -1
  45. package/models/components/consumersecuredloanassetattributes.d.ts +0 -130
  46. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -1
  47. package/models/components/consumersecuredloanassettype.d.ts +0 -40
  48. package/models/components/consumersecuredloanassettype.d.ts.map +1 -1
  49. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +0 -400
  50. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
  51. package/models/components/consumersecuredloantypeofsale.d.ts +0 -24
  52. package/models/components/consumersecuredloantypeofsale.d.ts.map +1 -1
  53. package/models/components/createsupportingdocumentsresponse.d.ts +3 -78
  54. package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -1
  55. package/models/components/currencycodeiso4217.d.ts +0 -14
  56. package/models/components/currencycodeiso4217.d.ts.map +1 -1
  57. package/models/components/customerassetattributes.d.ts +0 -12
  58. package/models/components/customerassetattributes.d.ts.map +1 -1
  59. package/models/components/customerassettype.d.ts +0 -28
  60. package/models/components/customerassettype.d.ts.map +1 -1
  61. package/models/components/customerattributes.d.ts +1 -33
  62. package/models/components/customerattributes.d.ts.map +1 -1
  63. package/models/components/customerattributescreateitem.d.ts +0 -17
  64. package/models/components/customerattributescreateitem.d.ts.map +1 -1
  65. package/models/components/customeridtype.d.ts +0 -18
  66. package/models/components/customeridtype.d.ts.map +1 -1
  67. package/models/components/customerliabilityattributes.d.ts +0 -12
  68. package/models/components/customerliabilityattributes.d.ts.map +1 -1
  69. package/models/components/customerliabilityrepaymentfrequency.d.ts +0 -18
  70. package/models/components/customerliabilityrepaymentfrequency.d.ts.map +1 -1
  71. package/models/components/customerliabilitytype.d.ts +0 -24
  72. package/models/components/customerliabilitytype.d.ts.map +1 -1
  73. package/models/components/customertitle.d.ts +0 -20
  74. package/models/components/customertitle.d.ts.map +1 -1
  75. package/models/components/documenttype.d.ts +0 -40
  76. package/models/components/documenttype.d.ts.map +1 -1
  77. package/models/components/entityattributes.d.ts +0 -84
  78. package/models/components/entityattributes.d.ts.map +1 -1
  79. package/models/components/entityattributesinput.d.ts +0 -17
  80. package/models/components/entityattributesinput.d.ts.map +1 -1
  81. package/models/components/errorsource.d.ts +0 -21
  82. package/models/components/errorsource.d.ts.map +1 -1
  83. package/models/components/expenseattributes.d.ts +0 -17
  84. package/models/components/expenseattributes.d.ts.map +1 -1
  85. package/models/components/expensefrequency.d.ts +0 -20
  86. package/models/components/expensefrequency.d.ts.map +1 -1
  87. package/models/components/expensetype.d.ts +0 -52
  88. package/models/components/expensetype.d.ts.map +1 -1
  89. package/models/components/forbiddenerror.d.ts +2 -78
  90. package/models/components/forbiddenerror.d.ts.map +1 -1
  91. package/models/components/frequencytype.d.ts +0 -18
  92. package/models/components/frequencytype.d.ts.map +1 -1
  93. package/models/components/incomeattributes.d.ts +0 -17
  94. package/models/components/incomeattributes.d.ts.map +1 -1
  95. package/models/components/incomefrequency.d.ts +0 -22
  96. package/models/components/incomefrequency.d.ts.map +1 -1
  97. package/models/components/incometype.d.ts +0 -32
  98. package/models/components/incometype.d.ts.map +1 -1
  99. package/models/components/linkobject.d.ts +0 -12
  100. package/models/components/linkobject.d.ts.map +1 -1
  101. package/models/components/livingarrangements.d.ts +0 -20
  102. package/models/components/livingarrangements.d.ts.map +1 -1
  103. package/models/components/loandetailsattributes.d.ts +5 -132
  104. package/models/components/loandetailsattributes.d.ts.map +1 -1
  105. package/models/components/maritalstatus.d.ts +0 -16
  106. package/models/components/maritalstatus.d.ts.map +1 -1
  107. package/models/components/monetaryquantity.d.ts +0 -26
  108. package/models/components/monetaryquantity.d.ts.map +1 -1
  109. package/models/components/paginationlinks.d.ts +0 -22
  110. package/models/components/paginationlinks.d.ts.map +1 -1
  111. package/models/components/paginationmeta.d.ts +0 -22
  112. package/models/components/paginationmeta.d.ts.map +1 -1
  113. package/models/components/percentagequantity.d.ts +0 -26
  114. package/models/components/percentagequantity.d.ts.map +1 -1
  115. package/models/components/personalapplicationjsonapirelationships.d.ts +1 -143
  116. package/models/components/personalapplicationjsonapirelationships.d.ts.map +1 -1
  117. package/models/components/personalapplicationpayload.d.ts +0 -64
  118. package/models/components/personalapplicationpayload.d.ts.map +1 -1
  119. package/models/components/personalapplicationresource.d.ts +12 -94
  120. package/models/components/personalapplicationresource.d.ts.map +1 -1
  121. package/models/components/personalloanpersonalapplicationrelationships.d.ts +0 -354
  122. package/models/components/personalloanpersonalapplicationrelationships.d.ts.map +1 -1
  123. package/models/components/relationshipresourcenotfound.d.ts +2 -78
  124. package/models/components/relationshipresourcenotfound.d.ts.map +1 -1
  125. package/models/components/repaymentstructure.d.ts +0 -18
  126. package/models/components/repaymentstructure.d.ts.map +1 -1
  127. package/models/components/residencystatus.d.ts +0 -22
  128. package/models/components/residencystatus.d.ts.map +1 -1
  129. package/models/components/resourcenotfound.d.ts +2 -78
  130. package/models/components/resourcenotfound.d.ts.map +1 -1
  131. package/models/components/security.d.ts +0 -17
  132. package/models/components/security.d.ts.map +1 -1
  133. package/models/components/supportingdocumentattributes.d.ts +0 -21
  134. package/models/components/supportingdocumentattributes.d.ts.map +1 -1
  135. package/models/components/supportingdocumentattributesinput.d.ts +0 -17
  136. package/models/components/supportingdocumentattributesinput.d.ts.map +1 -1
  137. package/models/components/supportingdocumentrelationships.d.ts +0 -190
  138. package/models/components/supportingdocumentrelationships.d.ts.map +1 -1
  139. package/models/components/supportingdocumentresource.d.ts +0 -33
  140. package/models/components/supportingdocumentresource.d.ts.map +1 -1
  141. package/models/components/tokenrequest.d.ts +0 -33
  142. package/models/components/tokenrequest.d.ts.map +1 -1
  143. package/models/components/tokenresponse.d.ts +0 -22
  144. package/models/components/tokenresponse.d.ts.map +1 -1
  145. package/models/components/uploadmimetype.d.ts +0 -28
  146. package/models/components/uploadmimetype.d.ts.map +1 -1
  147. package/models/operations/createapplication.d.ts +0 -484
  148. package/models/operations/createapplication.d.ts.map +1 -1
  149. package/models/operations/getapplication.d.ts +0 -469
  150. package/models/operations/getapplication.d.ts.map +1 -1
  151. package/models/operations/listapplications.d.ts +0 -91
  152. package/models/operations/listapplications.d.ts.map +1 -1
  153. package/models/operations/supportingdocumentscreate.d.ts +6 -159
  154. package/models/operations/supportingdocumentscreate.d.ts.map +1 -1
  155. package/package.json +16 -1
  156. package/src/hooks/oauth2scopes.ts +16 -0
  157. package/src/lib/config.ts +3 -3
  158. package/src/lib/encodings.ts +17 -3
  159. package/src/models/components/addressattributes.ts +0 -27
  160. package/src/models/components/apierrorlinks.ts +0 -31
  161. package/src/models/components/applicationresource.ts +0 -48
  162. package/src/models/components/applicationstatus.ts +0 -16
  163. package/src/models/components/australianstatesandterritories.ts +0 -12
  164. package/src/models/components/badrequesterror.ts +4 -119
  165. package/src/models/components/businessapplicationjsonapirelationships.ts +1 -395
  166. package/src/models/components/businessapplicationpayload.ts +2 -114
  167. package/src/models/components/businessapplicationresource.ts +14 -156
  168. package/src/models/components/businessloanbusinessapplicationrelationships.ts +6 -776
  169. package/src/models/components/commercialapplicationjsonapirelationships.ts +1 -497
  170. package/src/models/components/commercialsecuredapplicationpayload.ts +2 -112
  171. package/src/models/components/commercialsecuredapplicationresource.ts +14 -164
  172. package/src/models/components/commercialsecuredloanassetattributes.ts +0 -131
  173. package/src/models/components/commercialsecuredloanassettype.ts +0 -12
  174. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +7 -790
  175. package/src/models/components/commercialsecuredloantypeofsale.ts +0 -12
  176. package/src/models/components/consumerapplicationjsonapirelationships.ts +1 -390
  177. package/src/models/components/consumersecuredapplicationpayload.ts +2 -127
  178. package/src/models/components/consumersecuredapplicationresource.ts +14 -163
  179. package/src/models/components/consumersecuredloanassetattributes.ts +0 -149
  180. package/src/models/components/consumersecuredloanassettype.ts +0 -12
  181. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +8 -977
  182. package/src/models/components/consumersecuredloantypeofsale.ts +0 -12
  183. package/src/models/components/createsupportingdocumentsresponse.ts +1 -107
  184. package/src/models/components/currencycodeiso4217.ts +0 -12
  185. package/src/models/components/customerassetattributes.ts +0 -15
  186. package/src/models/components/customerassettype.ts +0 -12
  187. package/src/models/components/customerattributes.ts +2 -75
  188. package/src/models/components/customerattributescreateitem.ts +0 -59
  189. package/src/models/components/customeridtype.ts +1 -17
  190. package/src/models/components/customerliabilityattributes.ts +0 -15
  191. package/src/models/components/customerliabilityrepaymentfrequency.ts +0 -14
  192. package/src/models/components/customerliabilitytype.ts +0 -12
  193. package/src/models/components/customertitle.ts +0 -12
  194. package/src/models/components/documenttype.ts +0 -12
  195. package/src/models/components/entityattributes.ts +0 -95
  196. package/src/models/components/entityattributesinput.ts +0 -41
  197. package/src/models/components/errorsource.ts +0 -35
  198. package/src/models/components/expenseattributes.ts +1 -45
  199. package/src/models/components/expensefrequency.ts +1 -17
  200. package/src/models/components/expensetype.ts +1 -16
  201. package/src/models/components/forbiddenerror.ts +2 -103
  202. package/src/models/components/frequencytype.ts +0 -12
  203. package/src/models/components/incomeattributes.ts +1 -45
  204. package/src/models/components/incomefrequency.ts +1 -17
  205. package/src/models/components/incometype.ts +1 -16
  206. package/src/models/components/linkobject.ts +0 -15
  207. package/src/models/components/livingarrangements.ts +0 -12
  208. package/src/models/components/loandetailsattributes.ts +7 -165
  209. package/src/models/components/maritalstatus.ts +0 -12
  210. package/src/models/components/monetaryquantity.ts +0 -27
  211. package/src/models/components/paginationlinks.ts +0 -39
  212. package/src/models/components/paginationmeta.ts +0 -43
  213. package/src/models/components/percentagequantity.ts +0 -27
  214. package/src/models/components/personalapplicationjsonapirelationships.ts +1 -277
  215. package/src/models/components/personalapplicationpayload.ts +2 -114
  216. package/src/models/components/personalapplicationresource.ts +14 -156
  217. package/src/models/components/personalloanpersonalapplicationrelationships.ts +7 -892
  218. package/src/models/components/relationshipresourcenotfound.ts +2 -113
  219. package/src/models/components/repaymentstructure.ts +0 -12
  220. package/src/models/components/residencystatus.ts +0 -12
  221. package/src/models/components/resourcenotfound.ts +2 -109
  222. package/src/models/components/security.ts +0 -35
  223. package/src/models/components/supportingdocumentattributes.ts +1 -46
  224. package/src/models/components/supportingdocumentattributesinput.ts +1 -42
  225. package/src/models/components/supportingdocumentrelationships.ts +0 -230
  226. package/src/models/components/supportingdocumentresource.ts +1 -59
  227. package/src/models/components/tokenrequest.ts +1 -60
  228. package/src/models/components/tokenresponse.ts +0 -43
  229. package/src/models/components/uploadmimetype.ts +1 -17
  230. package/src/models/operations/createapplication.ts +0 -779
  231. package/src/models/operations/getapplication.ts +0 -759
  232. package/src/models/operations/listapplications.ts +0 -199
  233. package/src/models/operations/supportingdocumentscreate.ts +10 -340
  234. package/src/types/enums.ts +38 -9
  235. package/src/types/index.ts +2 -2
  236. package/src/types/unrecognized.ts +35 -0
  237. package/types/enums.d.ts +8 -11
  238. package/types/enums.d.ts.map +1 -1
  239. package/types/index.d.ts +2 -2
  240. package/types/index.d.ts.map +1 -1
  241. package/.devcontainer/README.md +0 -35
  242. package/.devcontainer/devcontainer.json +0 -45
  243. package/FUNCTIONS.md +0 -240
  244. package/RUNTIMES.md +0 -48
  245. package/core.js +0 -17
  246. package/core.js.map +0 -1
  247. package/docs/sdks/applications/README.md +0 -527
  248. package/docs/sdks/oauthtoken/README.md +0 -87
  249. package/docs/sdks/supportingdocuments/README.md +0 -115
  250. package/examples/README.md +0 -31
  251. package/examples/applicationsCreate.example.ts +0 -179
  252. package/examples/package-lock.json +0 -610
  253. package/examples/package.json +0 -18
  254. package/hooks/hooks.js +0 -84
  255. package/hooks/hooks.js.map +0 -1
  256. package/hooks/index.js +0 -22
  257. package/hooks/index.js.map +0 -1
  258. package/hooks/types.js +0 -6
  259. package/hooks/types.js.map +0 -1
  260. package/index.js +0 -48
  261. package/index.js.map +0 -1
  262. package/jsr.json +0 -27
  263. package/lib/base64.js +0 -71
  264. package/lib/base64.js.map +0 -1
  265. package/lib/dlv.d.ts +0 -14
  266. package/lib/dlv.d.ts.map +0 -1
  267. package/lib/dlv.js +0 -49
  268. package/lib/dlv.js.map +0 -1
  269. package/lib/encodings.js +0 -368
  270. package/lib/encodings.js.map +0 -1
  271. package/lib/env.js +0 -82
  272. package/lib/env.js.map +0 -1
  273. package/lib/files.d.ts +0 -13
  274. package/lib/files.d.ts.map +0 -1
  275. package/lib/files.js +0 -77
  276. package/lib/files.js.map +0 -1
  277. package/lib/http.d.ts +0 -67
  278. package/lib/http.d.ts.map +0 -1
  279. package/lib/http.js +0 -217
  280. package/lib/http.js.map +0 -1
  281. package/lib/is-plain-object.d.ts +0 -2
  282. package/lib/is-plain-object.d.ts.map +0 -1
  283. package/lib/is-plain-object.js +0 -41
  284. package/lib/is-plain-object.js.map +0 -1
  285. package/lib/logger.d.ts +0 -6
  286. package/lib/logger.d.ts.map +0 -1
  287. package/lib/logger.js +0 -6
  288. package/lib/logger.js.map +0 -1
  289. package/lib/matchers.js +0 -218
  290. package/lib/matchers.js.map +0 -1
  291. package/lib/primitives.d.ts +0 -26
  292. package/lib/primitives.d.ts.map +0 -1
  293. package/lib/primitives.js +0 -111
  294. package/lib/primitives.js.map +0 -1
  295. package/lib/retries.d.ts +0 -38
  296. package/lib/retries.d.ts.map +0 -1
  297. package/lib/retries.js +0 -153
  298. package/lib/retries.js.map +0 -1
  299. package/lib/schemas.js +0 -62
  300. package/lib/schemas.js.map +0 -1
  301. package/lib/sdks.js +0 -274
  302. package/lib/sdks.js.map +0 -1
  303. package/lib/security.js +0 -145
  304. package/lib/security.js.map +0 -1
  305. package/lib/url.d.ts +0 -5
  306. package/lib/url.d.ts.map +0 -1
  307. package/lib/url.js +0 -25
  308. package/lib/url.js.map +0 -1
  309. package/models/components/addressattributes.js +0 -120
  310. package/models/components/addressattributes.js.map +0 -1
  311. package/models/components/apierrorlinks.js +0 -69
  312. package/models/components/apierrorlinks.js.map +0 -1
  313. package/models/components/applicationresource.js +0 -79
  314. package/models/components/applicationresource.js.map +0 -1
  315. package/models/components/applicationstatus.js +0 -66
  316. package/models/components/applicationstatus.js.map +0 -1
  317. package/models/components/australianstatesandterritories.js +0 -66
  318. package/models/components/australianstatesandterritories.js.map +0 -1
  319. package/models/components/badrequesterror.js +0 -139
  320. package/models/components/badrequesterror.js.map +0 -1
  321. package/models/components/businessapplicationjsonapirelationships.js +0 -309
  322. package/models/components/businessapplicationjsonapirelationships.js.map +0 -1
  323. package/models/components/businessapplicationpayload.js +0 -150
  324. package/models/components/businessapplicationpayload.js.map +0 -1
  325. package/models/components/businessapplicationresource.js +0 -159
  326. package/models/components/businessapplicationresource.js.map +0 -1
  327. package/models/components/businessloanbusinessapplicationrelationships.js +0 -597
  328. package/models/components/businessloanbusinessapplicationrelationships.js.map +0 -1
  329. package/models/components/commercialapplicationjsonapirelationships.js +0 -391
  330. package/models/components/commercialapplicationjsonapirelationships.js.map +0 -1
  331. package/models/components/commercialsecuredapplicationpayload.js +0 -159
  332. package/models/components/commercialsecuredapplicationpayload.js.map +0 -1
  333. package/models/components/commercialsecuredapplicationresource.js +0 -159
  334. package/models/components/commercialsecuredapplicationresource.js.map +0 -1
  335. package/models/components/commercialsecuredloanassetattributes.js +0 -322
  336. package/models/components/commercialsecuredloanassetattributes.js.map +0 -1
  337. package/models/components/commercialsecuredloanassettype.js +0 -84
  338. package/models/components/commercialsecuredloanassettype.js.map +0 -1
  339. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +0 -682
  340. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +0 -1
  341. package/models/components/commercialsecuredloantypeofsale.js +0 -64
  342. package/models/components/commercialsecuredloantypeofsale.js.map +0 -1
  343. package/models/components/consumerapplicationjsonapirelationships.js +0 -310
  344. package/models/components/consumerapplicationjsonapirelationships.js.map +0 -1
  345. package/models/components/consumersecuredapplicationpayload.js +0 -160
  346. package/models/components/consumersecuredapplicationpayload.js.map +0 -1
  347. package/models/components/consumersecuredapplicationresource.js +0 -159
  348. package/models/components/consumersecuredapplicationresource.js.map +0 -1
  349. package/models/components/consumersecuredloanassetattributes.js +0 -324
  350. package/models/components/consumersecuredloanassetattributes.js.map +0 -1
  351. package/models/components/consumersecuredloanassettype.js +0 -72
  352. package/models/components/consumersecuredloanassettype.js.map +0 -1
  353. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +0 -775
  354. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +0 -1
  355. package/models/components/consumersecuredloantypeofsale.js +0 -64
  356. package/models/components/consumersecuredloantypeofsale.js.map +0 -1
  357. package/models/components/createsupportingdocumentsresponse.js +0 -138
  358. package/models/components/createsupportingdocumentsresponse.js.map +0 -1
  359. package/models/components/currencycodeiso4217.js +0 -59
  360. package/models/components/currencycodeiso4217.js.map +0 -1
  361. package/models/components/customerassetattributes.js +0 -77
  362. package/models/components/customerassetattributes.js.map +0 -1
  363. package/models/components/customerassettype.js +0 -66
  364. package/models/components/customerassettype.js.map +0 -1
  365. package/models/components/customerattributes.js +0 -100
  366. package/models/components/customerattributes.js.map +0 -1
  367. package/models/components/customerattributescreateitem.js +0 -110
  368. package/models/components/customerattributescreateitem.js.map +0 -1
  369. package/models/components/customeridtype.js +0 -60
  370. package/models/components/customeridtype.js.map +0 -1
  371. package/models/components/customerliabilityattributes.js +0 -88
  372. package/models/components/customerliabilityattributes.js.map +0 -1
  373. package/models/components/customerliabilityrepaymentfrequency.js +0 -61
  374. package/models/components/customerliabilityrepaymentfrequency.js.map +0 -1
  375. package/models/components/customerliabilitytype.js +0 -64
  376. package/models/components/customerliabilitytype.js.map +0 -1
  377. package/models/components/customertitle.js +0 -62
  378. package/models/components/customertitle.js.map +0 -1
  379. package/models/components/documenttype.js +0 -75
  380. package/models/components/documenttype.js.map +0 -1
  381. package/models/components/entityattributes.js +0 -151
  382. package/models/components/entityattributes.js.map +0 -1
  383. package/models/components/entityattributesinput.js +0 -81
  384. package/models/components/entityattributesinput.js.map +0 -1
  385. package/models/components/errorsource.js +0 -73
  386. package/models/components/errorsource.js.map +0 -1
  387. package/models/components/expenseattributes.js +0 -78
  388. package/models/components/expenseattributes.js.map +0 -1
  389. package/models/components/expensefrequency.js +0 -61
  390. package/models/components/expensefrequency.js.map +0 -1
  391. package/models/components/expensetype.js +0 -78
  392. package/models/components/expensetype.js.map +0 -1
  393. package/models/components/forbiddenerror.js +0 -139
  394. package/models/components/forbiddenerror.js.map +0 -1
  395. package/models/components/frequencytype.js +0 -64
  396. package/models/components/frequencytype.js.map +0 -1
  397. package/models/components/incomeattributes.js +0 -78
  398. package/models/components/incomeattributes.js.map +0 -1
  399. package/models/components/incomefrequency.js +0 -62
  400. package/models/components/incomefrequency.js.map +0 -1
  401. package/models/components/incometype.js +0 -68
  402. package/models/components/incometype.js.map +0 -1
  403. package/models/components/index.js +0 -91
  404. package/models/components/index.js.map +0 -1
  405. package/models/components/linkobject.js +0 -77
  406. package/models/components/linkobject.js.map +0 -1
  407. package/models/components/livingarrangements.js +0 -62
  408. package/models/components/livingarrangements.js.map +0 -1
  409. package/models/components/loandetailsattributes.js +0 -375
  410. package/models/components/loandetailsattributes.js.map +0 -1
  411. package/models/components/maritalstatus.js +0 -60
  412. package/models/components/maritalstatus.js.map +0 -1
  413. package/models/components/monetaryquantity.js +0 -93
  414. package/models/components/monetaryquantity.js.map +0 -1
  415. package/models/components/paginationlinks.js +0 -75
  416. package/models/components/paginationlinks.js.map +0 -1
  417. package/models/components/paginationmeta.js +0 -88
  418. package/models/components/paginationmeta.js.map +0 -1
  419. package/models/components/percentagequantity.js +0 -89
  420. package/models/components/percentagequantity.js.map +0 -1
  421. package/models/components/personalapplicationjsonapirelationships.js +0 -229
  422. package/models/components/personalapplicationjsonapirelationships.js.map +0 -1
  423. package/models/components/personalapplicationpayload.js +0 -150
  424. package/models/components/personalapplicationpayload.js.map +0 -1
  425. package/models/components/personalapplicationresource.js +0 -159
  426. package/models/components/personalapplicationresource.js.map +0 -1
  427. package/models/components/personalloanpersonalapplicationrelationships.js +0 -682
  428. package/models/components/personalloanpersonalapplicationrelationships.js.map +0 -1
  429. package/models/components/relationshipresourcenotfound.js +0 -139
  430. package/models/components/relationshipresourcenotfound.js.map +0 -1
  431. package/models/components/repaymentstructure.js +0 -64
  432. package/models/components/repaymentstructure.js.map +0 -1
  433. package/models/components/residencystatus.js +0 -63
  434. package/models/components/residencystatus.js.map +0 -1
  435. package/models/components/resourcenotfound.js +0 -139
  436. package/models/components/resourcenotfound.js.map +0 -1
  437. package/models/components/security.js +0 -69
  438. package/models/components/security.js.map +0 -1
  439. package/models/components/supportingdocumentattributes.js +0 -74
  440. package/models/components/supportingdocumentattributes.js.map +0 -1
  441. package/models/components/supportingdocumentattributesinput.js +0 -72
  442. package/models/components/supportingdocumentattributesinput.js.map +0 -1
  443. package/models/components/supportingdocumentrelationships.js +0 -434
  444. package/models/components/supportingdocumentrelationships.js.map +0 -1
  445. package/models/components/supportingdocumentresource.js +0 -98
  446. package/models/components/supportingdocumentresource.js.map +0 -1
  447. package/models/components/tokenrequest.js +0 -110
  448. package/models/components/tokenrequest.js.map +0 -1
  449. package/models/components/tokenresponse.js +0 -88
  450. package/models/components/tokenresponse.js.map +0 -1
  451. package/models/components/uploadmimetype.js +0 -68
  452. package/models/components/uploadmimetype.js.map +0 -1
  453. package/models/errors/apierror.d.ts +0 -10
  454. package/models/errors/apierror.d.ts.map +0 -1
  455. package/models/errors/apierror.js +0 -34
  456. package/models/errors/apierror.js.map +0 -1
  457. package/models/errors/financeableerror.d.ts +0 -19
  458. package/models/errors/financeableerror.d.ts.map +0 -1
  459. package/models/errors/financeableerror.js +0 -20
  460. package/models/errors/financeableerror.js.map +0 -1
  461. package/models/errors/httpclienterrors.d.ts +0 -44
  462. package/models/errors/httpclienterrors.d.ts.map +0 -1
  463. package/models/errors/httpclienterrors.js +0 -78
  464. package/models/errors/httpclienterrors.js.map +0 -1
  465. package/models/errors/index.js +0 -25
  466. package/models/errors/index.js.map +0 -1
  467. package/models/errors/responsevalidationerror.js +0 -66
  468. package/models/errors/responsevalidationerror.js.map +0 -1
  469. package/models/errors/sdkvalidationerror.js +0 -129
  470. package/models/errors/sdkvalidationerror.js.map +0 -1
  471. package/models/operations/createapplication.js +0 -747
  472. package/models/operations/createapplication.js.map +0 -1
  473. package/models/operations/getapplication.js +0 -697
  474. package/models/operations/getapplication.js.map +0 -1
  475. package/models/operations/index.js +0 -24
  476. package/models/operations/index.js.map +0 -1
  477. package/models/operations/listapplications.js +0 -199
  478. package/models/operations/listapplications.js.map +0 -1
  479. package/models/operations/supportingdocumentscreate.js +0 -320
  480. package/models/operations/supportingdocumentscreate.js.map +0 -1
  481. package/sdk/index.js +0 -21
  482. package/sdk/index.js.map +0 -1
  483. package/sdk/sdk.js +0 -23
  484. package/sdk/sdk.js.map +0 -1
  485. package/tsconfig.json +0 -41
  486. package/types/async.d.ts +0 -23
  487. package/types/async.d.ts.map +0 -1
  488. package/types/async.js +0 -44
  489. package/types/async.js.map +0 -1
  490. package/types/blobs.js +0 -62
  491. package/types/blobs.js.map +0 -1
  492. package/types/constdatetime.js +0 -46
  493. package/types/constdatetime.js.map +0 -1
  494. package/types/enums.js +0 -10
  495. package/types/enums.js.map +0 -1
  496. package/types/fp.d.ts +0 -31
  497. package/types/fp.d.ts.map +0 -1
  498. package/types/fp.js +0 -37
  499. package/types/fp.js.map +0 -1
  500. package/types/index.js +0 -16
  501. package/types/index.js.map +0 -1
  502. package/types/operations.d.ts +0 -27
  503. package/types/operations.d.ts.map +0 -1
  504. package/types/operations.js +0 -83
  505. package/types/operations.js.map +0 -1
  506. package/types/rfcdate.d.ts +0 -21
  507. package/types/rfcdate.d.ts.map +0 -1
  508. package/types/rfcdate.js +0 -46
  509. package/types/rfcdate.js.map +0 -1
  510. package/types/streams.d.ts +0 -2
  511. package/types/streams.d.ts.map +0 -1
  512. package/types/streams.js +0 -18
  513. package/types/streams.js.map +0 -1
@@ -2,15 +2,44 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- declare const __brand: unique symbol;
6
- export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
5
+ import * as z from "zod/v3";
6
+ import { Unrecognized, unrecognized } from "./unrecognized.js";
7
7
 
8
- export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
9
- return value as Unrecognized<T>;
8
+ export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
9
+ T[keyof T];
10
+ export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
11
+ | T[keyof T]
12
+ | Unrecognized<T[keyof T] extends number ? number : string>;
13
+
14
+ export function inboundSchema<T extends Record<string, string>>(
15
+ enumObj: T,
16
+ ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
17
+ const options = Object.values(enumObj);
18
+ return z.union([
19
+ ...options.map(x => z.literal(x)),
20
+ z.string().transform(x => unrecognized(x)),
21
+ ] as any);
10
22
  }
11
23
 
12
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
13
- export type ClosedEnum<T> = T[keyof T];
14
- export type OpenEnum<T> =
15
- | Prettify<T[keyof T]>
16
- | Unrecognized<T[keyof T] extends number ? number : string>;
24
+ export function inboundSchemaInt<T extends Record<string, number | string>>(
25
+ enumObj: T,
26
+ ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
27
+ // For numeric enums, Object.values returns both numbers and string keys
28
+ const options = Object.values(enumObj).filter(v => typeof v === "number");
29
+ return z.union([
30
+ ...options.map(x => z.literal(x)),
31
+ z.number().int().transform(x => unrecognized(x)),
32
+ ] as any);
33
+ }
34
+
35
+ export function outboundSchema<T extends Record<string, string>>(
36
+ _: T,
37
+ ): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>> {
38
+ return z.string() as any;
39
+ }
40
+
41
+ export function outboundSchemaInt<T extends Record<string, number | string>>(
42
+ _: T,
43
+ ): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>> {
44
+ return z.number().int() as any;
45
+ }
@@ -3,9 +3,9 @@
3
3
  */
4
4
 
5
5
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
- export { catchUnrecognizedEnum } from "./enums.js";
7
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
6
+ export type { ClosedEnum, OpenEnum } from "./enums.js";
8
7
  export type { Result } from "./fp.js";
9
8
  export type { PageIterator, Paginator } from "./operations.js";
10
9
  export { createPageIterator } from "./operations.js";
11
10
  export { RFCDate } from "./rfcdate.js";
11
+ export * from "./unrecognized.js";
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ declare const __brand: unique symbol;
6
+ export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
7
+
8
+ function unrecognized<T>(value: T): Unrecognized<T> {
9
+ globalCount++;
10
+ return value as Unrecognized<T>;
11
+ }
12
+
13
+ let globalCount = 0;
14
+ let refCount = 0;
15
+ export function startCountingUnrecognized() {
16
+ refCount++;
17
+ const start = globalCount;
18
+ return {
19
+ /**
20
+ * Ends counting and returns the delta.
21
+ * @param delta - If provided, only this amount is added to the parent counter
22
+ * (used for nested unions where we only want to record the winning option's count).
23
+ * If not provided, records all counts since start().
24
+ */
25
+ end: (delta?: number) => {
26
+ const count = globalCount - start;
27
+ // Reset globalCount back to start, then add only the specified delta
28
+ globalCount = start + (delta ?? count);
29
+ if (--refCount === 0) globalCount = 0;
30
+ return count;
31
+ },
32
+ };
33
+ }
34
+
35
+ export { unrecognized };
package/types/enums.d.ts CHANGED
@@ -1,12 +1,9 @@
1
- declare const __brand: unique symbol;
2
- export type Unrecognized<T> = T & {
3
- [__brand]: "unrecognized";
4
- };
5
- export declare function catchUnrecognizedEnum<T>(value: T): Unrecognized<T>;
6
- type Prettify<T> = {
7
- [K in keyof T]: T[K];
8
- } & {};
9
- export type ClosedEnum<T> = T[keyof T];
10
- export type OpenEnum<T> = Prettify<T[keyof T]> | Unrecognized<T[keyof T] extends number ? number : string>;
11
- export {};
1
+ import * as z from "zod/v3";
2
+ import { Unrecognized } from "./unrecognized.js";
3
+ export type ClosedEnum<T extends Readonly<Record<string, string | number>>> = T[keyof T];
4
+ export type OpenEnum<T extends Readonly<Record<string, string | number>>> = T[keyof T] | Unrecognized<T[keyof T] extends number ? number : string>;
5
+ export declare function inboundSchema<T extends Record<string, string>>(enumObj: T): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown>;
6
+ export declare function inboundSchemaInt<T extends Record<string, number | string>>(enumObj: T): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown>;
7
+ export declare function outboundSchema<T extends Record<string, string>>(_: T): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>>;
8
+ export declare function outboundSchemaInt<T extends Record<string, number | string>>(_: T): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>>;
12
9
  //# sourceMappingURL=enums.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAElE;AAED,KAAK,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAC;AACjD,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACvC,MAAM,MAAM,QAAQ,CAAC,CAAC,IAClB,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GACpB,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/types/enums.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAE/D,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,IACxE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACb,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,IACpE,CAAC,CAAC,MAAM,CAAC,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAE9D,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5D,OAAO,EAAE,CAAC,GACT,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAM/C;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACxE,OAAO,EAAE,CAAC,GACT,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,CAO/C;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7D,CAAC,EAAE,CAAC,GACH,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAE9C;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACzE,CAAC,EAAE,CAAC,GACH,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAE9C"}
package/types/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
2
- export { catchUnrecognizedEnum } from "./enums.js";
3
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
2
+ export type { ClosedEnum, OpenEnum } from "./enums.js";
4
3
  export type { Result } from "./fp.js";
5
4
  export type { PageIterator, Paginator } from "./operations.js";
6
5
  export { createPageIterator } from "./operations.js";
7
6
  export { RFCDate } from "./rfcdate.js";
7
+ export * from "./unrecognized.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACrE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
@@ -1,35 +0,0 @@
1
-
2
- <div align="center">
3
- <a href="https://codespaces.new/financeable-com-au/financeable-aggregation-sdk.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
4
- </div>
5
- <br>
6
-
7
- > **Remember to shutdown a GitHub Codespace when it is not in use!**
8
-
9
- # Dev Containers Quick Start
10
-
11
- The default location for usage snippets is the `samples` directory.
12
-
13
- ## Running a Usage Sample
14
-
15
- A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below.
16
-
17
- ```
18
- ts-node root.ts
19
- ```
20
-
21
- ## Generating Additional Usage Samples
22
-
23
- The speakeasy CLI allows you to generate more usage snippets. Here's how:
24
-
25
- - To generate a sample for a specific operation by providing an operation ID, use:
26
-
27
- ```
28
- speakeasy generate usage -s ./spec.yaml -l typescript -i {INPUT_OPERATION_ID} -o ./samples
29
- ```
30
-
31
- - To generate samples for an entire namespace (like a tag or group name), use:
32
-
33
- ```
34
- speakeasy generate usage -s ./spec.yaml -l typescript -n {INPUT_TAG_NAME} -o ./samples
35
- ```
@@ -1,45 +0,0 @@
1
- // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
- // README at: https://github.com/devcontainers/images/tree/main/src/typescript-node
3
- {
4
- "name": "TypeScript",
5
- "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
6
- // Features to add to the dev container. More info: https://containers.dev/features.
7
- // "features": {},
8
- // Use 'forwardPorts' to make a list of ports inside the container available locally.
9
- // "forwardPorts": [],
10
- // Use 'postCreateCommand' to run commands after the container is created.
11
- "postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh",
12
- "customizations": {
13
- "vscode": {
14
- "extensions": [
15
- "ms-vscode.vscode-typescript-tslint-plugin",
16
- "esbenp.prettier-vscode",
17
- "github.vscode-pull-request-github"
18
- ],
19
- "settings": {
20
- "files.eol": "\n",
21
- "editor.formatOnSave": true,
22
- "typescript.tsc.autoDetect": "on",
23
- "typescript.updateImportsOnFileMove.enabled": "always",
24
- "typescript.preferences.importModuleSpecifier": "relative",
25
- "[typescript]": {
26
- "editor.codeActionsOnSave": {
27
- "source.organizeImports": true
28
- }
29
- },
30
- "[typescriptreact]": {
31
- "editor.codeActionsOnSave": {
32
- "source.organizeImports": true
33
- }
34
- }
35
- }
36
- },
37
- "codespaces": {
38
- "openFiles": [
39
- ".devcontainer/README.md"
40
- ]
41
- }
42
- }
43
- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44
- // "remoteUser": "root"
45
- }
package/FUNCTIONS.md DELETED
@@ -1,240 +0,0 @@
1
- # Standalone Functions
2
-
3
- > [!NOTE]
4
- > This section is useful if you are using a bundler and targetting browsers and
5
- > runtimes where the size of an application affects performance and load times.
6
-
7
- Every method in this SDK is also available as a standalone function. This
8
- alternative API is suitable when targetting the browser or serverless runtimes
9
- and using a bundler to build your application since all unused functionality
10
- will be tree-shaken away. This includes code for unused methods, Zod schemas,
11
- encoding helpers and response handlers. The result is dramatically smaller
12
- impact on the application's final bundle size which grows very slowly as you use
13
- more and more functionality from this SDK.
14
-
15
- Calling methods through the main SDK class remains a valid and generally more
16
- more ergonomic option. Standalone functions represent an optimisation for a
17
- specific category of applications.
18
-
19
- ## Example
20
-
21
- ```typescript
22
- import { FinanceableCore } from "@financeable/aggregation/core.js";
23
- import { applicationsCreate } from "@financeable/aggregation/funcs/applicationsCreate.js";
24
-
25
- // Use `FinanceableCore` for best tree-shaking performance.
26
- // You can create one instance of it to use across an application.
27
- const financeable = new FinanceableCore({
28
- clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
29
- });
30
-
31
- async function run() {
32
- const res = await applicationsCreate(financeable, {
33
- data: {
34
- type: "entities",
35
- attributes: {
36
- applicationType: "consumerSecured",
37
- associatedBrokerEmail: "<value>",
38
- },
39
- relationships: {
40
- customers: {
41
- data: [
42
- {
43
- type: "customers",
44
- attributes: {
45
- title: "Mr",
46
- firstName: "Courtney",
47
- lastName: "Greenfelder",
48
- dateOfBirth: "1981-06-22",
49
- idExpiryDate: "<value>",
50
- },
51
- relationships: {
52
- addresses: {
53
- data: [
54
- {
55
- type: "addresses",
56
- attributes: {
57
- id: "12345678901",
58
- addressType: "residential",
59
- fullAddress: "42 Wallaby Way, Sydney NSW 2000",
60
- city: "Sydney",
61
- postCode: "2000",
62
- streetAddress: "42 Wallaby Way",
63
- addressLine2: "",
64
- streetNumber: "42",
65
- streetType: "Way",
66
- street: "Wallaby",
67
- state: "NSW",
68
- country: "Australia",
69
- status: "current",
70
- monthsAt: 24,
71
- yearsAt: 2,
72
- },
73
- },
74
- ],
75
- },
76
- },
77
- },
78
- {
79
- type: "customers",
80
- attributes: {
81
- title: "Mr",
82
- firstName: "Courtney",
83
- lastName: "Greenfelder",
84
- dateOfBirth: "1981-06-22",
85
- idExpiryDate: "<value>",
86
- },
87
- relationships: {
88
- addresses: {
89
- data: [
90
- {
91
- type: "addresses",
92
- attributes: {
93
- id: "12345678901",
94
- addressType: "residential",
95
- fullAddress: "42 Wallaby Way, Sydney NSW 2000",
96
- city: "Sydney",
97
- postCode: "2000",
98
- streetAddress: "42 Wallaby Way",
99
- addressLine2: "",
100
- streetNumber: "42",
101
- streetType: "Way",
102
- street: "Wallaby",
103
- state: "NSW",
104
- country: "Australia",
105
- status: "current",
106
- monthsAt: 24,
107
- yearsAt: 2,
108
- },
109
- },
110
- ],
111
- },
112
- },
113
- },
114
- {
115
- type: "customers",
116
- attributes: {
117
- title: "Mr",
118
- firstName: "Courtney",
119
- lastName: "Greenfelder",
120
- dateOfBirth: "1981-06-22",
121
- idExpiryDate: "<value>",
122
- },
123
- relationships: {
124
- addresses: {
125
- data: [
126
- {
127
- type: "addresses",
128
- attributes: {
129
- id: "12345678901",
130
- addressType: "residential",
131
- fullAddress: "42 Wallaby Way, Sydney NSW 2000",
132
- city: "Sydney",
133
- postCode: "2000",
134
- streetAddress: "42 Wallaby Way",
135
- addressLine2: "",
136
- streetNumber: "42",
137
- streetType: "Way",
138
- street: "Wallaby",
139
- state: "NSW",
140
- country: "Australia",
141
- status: "current",
142
- monthsAt: 24,
143
- yearsAt: 2,
144
- },
145
- },
146
- ],
147
- },
148
- },
149
- },
150
- ],
151
- },
152
- asset: {
153
- data: {
154
- type: "assets",
155
- attributes: {
156
- id: "12345678901",
157
- ageOfAsset: 3,
158
- ageOfAssetAtEnd: 8,
159
- condition: "USED",
160
- assetType: "CARAVAN",
161
- assetValue: "35000.00",
162
- make: "Toyota",
163
- assetModel: "Camry",
164
- registrationNumber: "ABC123",
165
- registrationState: "VIC",
166
- vin: "1HGCM82633A123456",
167
- supplierName: "Mr and Mrs Smith",
168
- supplierABN: "12345678901",
169
- supplierAddress: "123 Car Street, Melbourne VIC 3000",
170
- supplierPhone: "0412345678",
171
- supplierContactName: "John Smith",
172
- supplierEmail: "john.smith@mrandmrssmith.com.au",
173
- privateSale: false,
174
- typeOfSale: "AUTHORISED_SELLER",
175
- description: "2020 Toyota Camry Hybrid SL, Silver, 45,000km",
176
- netAssetValue: "32000.00",
177
- isLuxury: false,
178
- additionalFees: "995.00",
179
- additionalTaxes: "0.00",
180
- },
181
- },
182
- },
183
- },
184
- },
185
- });
186
- if (res.ok) {
187
- const { value: result } = res;
188
- console.log(result);
189
- } else {
190
- console.log("applicationsCreate failed:", res.error);
191
- }
192
- }
193
-
194
- run();
195
- ```
196
-
197
- ## Result types
198
-
199
- Standalone functions differ from SDK methods in that they return a
200
- `Result<Value, Error>` type to capture _known errors_ and document them using
201
- the type system. By avoiding throwing errors, application code maintains clear
202
- control flow and error-handling become part of the regular flow of application
203
- code.
204
-
205
- > We use the term "known errors" because standalone functions, and JavaScript
206
- > code in general, can still throw unexpected errors such as `TypeError`s,
207
- > `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
208
- > something this SDK addresses in the future. Nevertheless, there is still a lot
209
- > of benefit from capturing most errors and turning them into values.
210
-
211
- The second reason for this style of programming is because these functions will
212
- typically be used in front-end applications where exception throwing is
213
- sometimes discouraged or considered unidiomatic. React and similar ecosystems
214
- and libraries tend to promote this style of programming so that components
215
- render useful content under all states (loading, success, error and so on).
216
-
217
- The general pattern when calling standalone functions looks like this:
218
-
219
- ```typescript
220
- import { Core } from "<sdk-package-name>";
221
- import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
222
-
223
- const client = new Core();
224
-
225
- async function run() {
226
- const result = await fetchSomething(client, { id: "123" });
227
- if (!result.ok) {
228
- // You can throw the error or handle it. It's your choice now.
229
- throw result.error;
230
- }
231
-
232
- console.log(result.value);
233
- }
234
-
235
- run();
236
- ```
237
-
238
- Notably, `result.error` above will have an explicit type compared to a try-catch
239
- variation where the error in the catch block can only be of type `unknown` (or
240
- `any` depending on your TypeScript settings).
package/RUNTIMES.md DELETED
@@ -1,48 +0,0 @@
1
- # Supported JavaScript runtimes
2
-
3
- This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
4
-
5
- - [Web Fetch API][web-fetch]
6
- - [Web Streams API][web-streams] and in particular `ReadableStream`
7
- - [Async iterables][async-iter] using `Symbol.asyncIterator`
8
-
9
- [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
10
- [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
11
- [async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
12
-
13
- Runtime environments that are explicitly supported are:
14
-
15
- - Evergreen browsers which include: Chrome, Safari, Edge, Firefox
16
- - Node.js active and maintenance LTS releases
17
- - Currently, this is v18 and v20
18
- - Bun v1 and above
19
- - Deno v1.39
20
- - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
21
-
22
- [deno-file-streaming]: https://github.com/denoland/deno/issues/11018
23
-
24
- ## Recommended TypeScript compiler options
25
-
26
- The following `tsconfig.json` options are recommended for projects using this
27
- SDK in order to get static type support for features like async iterables,
28
- streams and `fetch`-related APIs ([`for await...of`][for-await-of],
29
- [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
30
- so on):
31
-
32
- [for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
33
- [abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
34
- [request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
35
- [response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
36
-
37
- ```jsonc
38
- {
39
- "compilerOptions": {
40
- "target": "es2020", // or higher
41
- "lib": ["es2020", "dom", "dom.iterable"]
42
- }
43
- }
44
- ```
45
-
46
- While `target` can be set to older ECMAScript versions, it may result in extra,
47
- unnecessary compatibility code being generated if you are not targeting old
48
- runtimes.
package/core.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FinanceableCore = void 0;
7
- const sdks_js_1 = require("./lib/sdks.js");
8
- /**
9
- * A minimal client to use when calling standalone SDK functions. Typically, an
10
- * instance of this class would be instantiated once at the start of an
11
- * application and passed around through some dependency injection mechanism to
12
- * parts of an application that need to make SDK calls.
13
- */
14
- class FinanceableCore extends sdks_js_1.ClientSDK {
15
- }
16
- exports.FinanceableCore = FinanceableCore;
17
- //# sourceMappingURL=core.js.map
package/core.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2CAA0C;AAE1C;;;;;GAKG;AACH,MAAa,eAAgB,SAAQ,mBAAS;CAAG;AAAjD,0CAAiD"}