@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
@@ -6,8 +6,6 @@
6
6
  ### Available Operations
7
7
 
8
8
  * [create](#create) - Create an application in the Financeable platform.
9
- * [list](#list) - Retrieve a list of applications
10
- * [get](#get) - Retrieve an application by its ID
11
9
 
12
10
  ## create
13
11
 
@@ -17,7 +15,6 @@ Create an application in the Financeable platform.
17
15
 
18
16
  ```typescript
19
17
  import { Financeable } from "@financeable/aggregation";
20
- import { CommercialAssetType } from "@financeable/aggregation/models/components";
21
18
 
22
19
  const financeable = new Financeable({
23
20
  clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
@@ -26,57 +23,35 @@ const financeable = new Financeable({
26
23
  async function run() {
27
24
  const result = await financeable.applications.create({
28
25
  data: {
29
- type: "applications",
26
+ type: "commercial-secured-applications",
30
27
  attributes: {
31
- purpose: "Purchase of a motor vehicle",
32
- applicationType: "consumer",
28
+ applicationType: "commercialSecured",
33
29
  },
34
30
  relationships: {
35
- loanDetails: {
36
- data: {
37
- type: "loan-details",
38
- attributes: {
39
- repayments: 12,
40
- repaymentFrequency: "monthly",
41
- repaymentStructure: "group-payments",
42
- loanAmount: "10280.95",
43
- purpose: "Purchase of a motor vehicle",
44
- term: 48,
45
- balloon: 5,
46
- deposit: "2500",
47
- originationFee: 200,
48
- rate: "0.15",
49
- rateAdjustment: "-0.01",
50
- },
51
- },
52
- },
53
- entities: {
31
+ customers: {
54
32
  data: [
55
33
  {
56
- type: "entities",
34
+ type: "customers",
57
35
  attributes: {
58
- businessNames: [
59
- "<value>",
60
- "<value>",
61
- ],
62
- entityName: "<value>",
63
- abn: "<value>",
64
- acn: "<value>",
65
- state: "QLD",
66
- entityType: "Australian Private Company",
36
+ title: "Ms",
37
+ firstName: "Bria",
38
+ lastName: "Schinner",
39
+ dateOfBirth: "2004-04-11",
40
+ idExpiryDate: "<value>",
41
+ },
42
+ relationships: {
43
+ addresses: {
44
+ data: [],
45
+ },
67
46
  },
68
47
  },
69
- ],
70
- },
71
- customers: {
72
- data: [
73
48
  {
74
49
  type: "customers",
75
50
  attributes: {
76
51
  title: "Mr",
77
- firstName: "John",
78
- lastName: "Smith",
79
- dateOfBirth: "01-01-1990",
52
+ firstName: "Astrid",
53
+ lastName: "Schumm",
54
+ dateOfBirth: "1981-04-17",
80
55
  idExpiryDate: "<value>",
81
56
  },
82
57
  relationships: {
@@ -120,42 +95,79 @@ async function run() {
120
95
  yearsAt: 2,
121
96
  },
122
97
  },
98
+ {
99
+ type: "addresses",
100
+ attributes: {
101
+ addressType: "residential",
102
+ fullAddress: "42 Wallaby Way, Sydney NSW 2000",
103
+ city: "Sydney",
104
+ postCode: "2000",
105
+ streetAddress: "42 Wallaby Way",
106
+ addressLine2: "",
107
+ streetNumber: "42",
108
+ streetType: "Way",
109
+ street: "Wallaby",
110
+ state: "NSW",
111
+ country: "Australia",
112
+ status: "current",
113
+ monthsAt: 24,
114
+ yearsAt: 2,
115
+ },
116
+ },
123
117
  ],
124
118
  },
125
119
  },
126
120
  },
127
121
  ],
128
122
  },
129
- asset: {
130
- data: {
131
- type: "assets",
132
- attributes: {
133
- ageOfAsset: 3,
134
- ageOfAssetAtEnd: 8,
135
- condition: "USED",
136
- assetType: CommercialAssetType.MotorVehicleLessThan45Tonnes,
137
- purpose: "VEHICLE",
138
- assetValue: "35000.00",
139
- make: "Toyota",
140
- assetModel: "Camry",
141
- registrationNumber: "ABC123",
142
- registrationState: "VIC",
143
- vin: "1HGCM82633A123456",
144
- supplierName: "Mr and Mrs Smith",
145
- supplierABN: "12345678901",
146
- supplierAddress: "123 Car Street, Melbourne VIC 3000",
147
- supplierPhone: "0412345678",
148
- supplierContactName: "John Smith",
149
- supplierEmail: "john.smith@mrandmrssmith.com.au",
150
- privateSale: false,
151
- typeOfSale: "DEALER",
152
- description: "2020 Toyota Camry Hybrid SL, Silver, 45,000km",
153
- netAssetValue: "32000.00",
154
- isLuxury: false,
155
- additionalFees: "995.00",
156
- additionalTaxes: "0.00",
123
+ entities: {
124
+ data: [
125
+ {
126
+ type: "entities",
127
+ attributes: {
128
+ entityName: "Financeable Pty Ltd",
129
+ abn: "12345678901",
130
+ turnover: 1000000,
131
+ industryType: "Finance",
132
+ emails: [
133
+ "test@financeable.com.au",
134
+ ],
135
+ phoneNumbers: [
136
+ "0412345678",
137
+ ],
138
+ },
139
+ },
140
+ {
141
+ type: "entities",
142
+ attributes: {
143
+ entityName: "Financeable Pty Ltd",
144
+ abn: "12345678901",
145
+ turnover: 1000000,
146
+ industryType: "Finance",
147
+ emails: [
148
+ "test@financeable.com.au",
149
+ ],
150
+ phoneNumbers: [
151
+ "0412345678",
152
+ ],
153
+ },
157
154
  },
158
- },
155
+ {
156
+ type: "entities",
157
+ attributes: {
158
+ entityName: "Financeable Pty Ltd",
159
+ abn: "12345678901",
160
+ turnover: 1000000,
161
+ industryType: "Finance",
162
+ emails: [
163
+ "test@financeable.com.au",
164
+ ],
165
+ phoneNumbers: [
166
+ "0412345678",
167
+ ],
168
+ },
169
+ },
170
+ ],
159
171
  },
160
172
  },
161
173
  },
@@ -175,7 +187,6 @@ The standalone function version of this method:
175
187
  ```typescript
176
188
  import { FinanceableCore } from "@financeable/aggregation/core.js";
177
189
  import { applicationsCreate } from "@financeable/aggregation/funcs/applicationsCreate.js";
178
- import { CommercialAssetType } from "@financeable/aggregation/models/components";
179
190
 
180
191
  // Use `FinanceableCore` for best tree-shaking performance.
181
192
  // You can create one instance of it to use across an application.
@@ -186,57 +197,35 @@ const financeable = new FinanceableCore({
186
197
  async function run() {
187
198
  const res = await applicationsCreate(financeable, {
188
199
  data: {
189
- type: "applications",
200
+ type: "commercial-secured-applications",
190
201
  attributes: {
191
- purpose: "Purchase of a motor vehicle",
192
- applicationType: "consumer",
202
+ applicationType: "commercialSecured",
193
203
  },
194
204
  relationships: {
195
- loanDetails: {
196
- data: {
197
- type: "loan-details",
198
- attributes: {
199
- repayments: 12,
200
- repaymentFrequency: "monthly",
201
- repaymentStructure: "group-payments",
202
- loanAmount: "10280.95",
203
- purpose: "Purchase of a motor vehicle",
204
- term: 48,
205
- balloon: 5,
206
- deposit: "2500",
207
- originationFee: 200,
208
- rate: "0.15",
209
- rateAdjustment: "-0.01",
210
- },
211
- },
212
- },
213
- entities: {
205
+ customers: {
214
206
  data: [
215
207
  {
216
- type: "entities",
208
+ type: "customers",
217
209
  attributes: {
218
- businessNames: [
219
- "<value>",
220
- "<value>",
221
- ],
222
- entityName: "<value>",
223
- abn: "<value>",
224
- acn: "<value>",
225
- state: "QLD",
226
- entityType: "Australian Private Company",
210
+ title: "Ms",
211
+ firstName: "Bria",
212
+ lastName: "Schinner",
213
+ dateOfBirth: "2004-04-11",
214
+ idExpiryDate: "<value>",
215
+ },
216
+ relationships: {
217
+ addresses: {
218
+ data: [],
219
+ },
227
220
  },
228
221
  },
229
- ],
230
- },
231
- customers: {
232
- data: [
233
222
  {
234
223
  type: "customers",
235
224
  attributes: {
236
225
  title: "Mr",
237
- firstName: "John",
238
- lastName: "Smith",
239
- dateOfBirth: "01-01-1990",
226
+ firstName: "Astrid",
227
+ lastName: "Schumm",
228
+ dateOfBirth: "1981-04-17",
240
229
  idExpiryDate: "<value>",
241
230
  },
242
231
  relationships: {
@@ -280,42 +269,79 @@ async function run() {
280
269
  yearsAt: 2,
281
270
  },
282
271
  },
272
+ {
273
+ type: "addresses",
274
+ attributes: {
275
+ addressType: "residential",
276
+ fullAddress: "42 Wallaby Way, Sydney NSW 2000",
277
+ city: "Sydney",
278
+ postCode: "2000",
279
+ streetAddress: "42 Wallaby Way",
280
+ addressLine2: "",
281
+ streetNumber: "42",
282
+ streetType: "Way",
283
+ street: "Wallaby",
284
+ state: "NSW",
285
+ country: "Australia",
286
+ status: "current",
287
+ monthsAt: 24,
288
+ yearsAt: 2,
289
+ },
290
+ },
283
291
  ],
284
292
  },
285
293
  },
286
294
  },
287
295
  ],
288
296
  },
289
- asset: {
290
- data: {
291
- type: "assets",
292
- attributes: {
293
- ageOfAsset: 3,
294
- ageOfAssetAtEnd: 8,
295
- condition: "USED",
296
- assetType: CommercialAssetType.MotorVehicleLessThan45Tonnes,
297
- purpose: "VEHICLE",
298
- assetValue: "35000.00",
299
- make: "Toyota",
300
- assetModel: "Camry",
301
- registrationNumber: "ABC123",
302
- registrationState: "VIC",
303
- vin: "1HGCM82633A123456",
304
- supplierName: "Mr and Mrs Smith",
305
- supplierABN: "12345678901",
306
- supplierAddress: "123 Car Street, Melbourne VIC 3000",
307
- supplierPhone: "0412345678",
308
- supplierContactName: "John Smith",
309
- supplierEmail: "john.smith@mrandmrssmith.com.au",
310
- privateSale: false,
311
- typeOfSale: "DEALER",
312
- description: "2020 Toyota Camry Hybrid SL, Silver, 45,000km",
313
- netAssetValue: "32000.00",
314
- isLuxury: false,
315
- additionalFees: "995.00",
316
- additionalTaxes: "0.00",
297
+ entities: {
298
+ data: [
299
+ {
300
+ type: "entities",
301
+ attributes: {
302
+ entityName: "Financeable Pty Ltd",
303
+ abn: "12345678901",
304
+ turnover: 1000000,
305
+ industryType: "Finance",
306
+ emails: [
307
+ "test@financeable.com.au",
308
+ ],
309
+ phoneNumbers: [
310
+ "0412345678",
311
+ ],
312
+ },
313
+ },
314
+ {
315
+ type: "entities",
316
+ attributes: {
317
+ entityName: "Financeable Pty Ltd",
318
+ abn: "12345678901",
319
+ turnover: 1000000,
320
+ industryType: "Finance",
321
+ emails: [
322
+ "test@financeable.com.au",
323
+ ],
324
+ phoneNumbers: [
325
+ "0412345678",
326
+ ],
327
+ },
317
328
  },
318
- },
329
+ {
330
+ type: "entities",
331
+ attributes: {
332
+ entityName: "Financeable Pty Ltd",
333
+ abn: "12345678901",
334
+ turnover: 1000000,
335
+ industryType: "Finance",
336
+ emails: [
337
+ "test@financeable.com.au",
338
+ ],
339
+ phoneNumbers: [
340
+ "0412345678",
341
+ ],
342
+ },
343
+ },
344
+ ],
319
345
  },
320
346
  },
321
347
  },
@@ -338,7 +364,7 @@ run();
338
364
 
339
365
  | Parameter | Type | Required | Description |
340
366
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
341
- | `request` | [components.ApplicationResourceBulkSubmission](../../models/components/applicationresourcebulksubmission.md) | :heavy_check_mark: | The request object to use for the request. |
367
+ | `request` | [operations.CreateApplicationRequestBody](../../models/operations/createapplicationrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
342
368
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
343
369
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
344
370
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
@@ -349,157 +375,7 @@ run();
349
375
 
350
376
  ### Errors
351
377
 
352
- | Error Type | Status Code | Content Type |
353
- | ------------------- | ------------------- | ------------------- |
354
- | errors.ResponseBody | 403 | application/json |
355
- | errors.APIError | 4XX, 5XX | \*/\* |
356
-
357
- ## list
358
-
359
- Retrieve a list of applications
360
-
361
- ### Example Usage
362
-
363
- ```typescript
364
- import { Financeable } from "@financeable/aggregation";
365
-
366
- const financeable = new Financeable({
367
- clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
368
- });
369
-
370
- async function run() {
371
- const result = await financeable.applications.list({});
372
-
373
- // Handle the result
374
- console.log(result);
375
- }
376
-
377
- run();
378
- ```
379
-
380
- ### Standalone function
381
-
382
- The standalone function version of this method:
383
-
384
- ```typescript
385
- import { FinanceableCore } from "@financeable/aggregation/core.js";
386
- import { applicationsList } from "@financeable/aggregation/funcs/applicationsList.js";
387
-
388
- // Use `FinanceableCore` for best tree-shaking performance.
389
- // You can create one instance of it to use across an application.
390
- const financeable = new FinanceableCore({
391
- clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
392
- });
393
-
394
- async function run() {
395
- const res = await applicationsList(financeable, {});
396
-
397
- if (!res.ok) {
398
- throw res.error;
399
- }
400
-
401
- const { value: result } = res;
402
-
403
- // Handle the result
404
- console.log(result);
405
- }
406
-
407
- run();
408
- ```
409
-
410
- ### Parameters
411
-
412
- | Parameter | Type | Required | Description |
413
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
414
- | `request` | [operations.GetApplicationsRequest](../../models/operations/getapplicationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
415
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
416
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
417
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
418
-
419
- ### Response
420
-
421
- **Promise\<[operations.GetApplicationsResponseBody](../../models/operations/getapplicationsresponsebody.md)\>**
422
-
423
- ### Errors
424
-
425
- | Error Type | Status Code | Content Type |
426
- | ------------------- | ------------------- | ------------------- |
427
- | errors.ResponseBody | 403 | application/json |
428
- | errors.APIError | 4XX, 5XX | \*/\* |
429
-
430
- ## get
431
-
432
- Retrieve an application by its ID
433
-
434
- ### Example Usage
435
-
436
- ```typescript
437
- import { Financeable } from "@financeable/aggregation";
438
-
439
- const financeable = new Financeable({
440
- clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
441
- });
442
-
443
- async function run() {
444
- const result = await financeable.applications.get({
445
- id: "<id>",
446
- });
447
-
448
- // Handle the result
449
- console.log(result);
450
- }
451
-
452
- run();
453
- ```
454
-
455
- ### Standalone function
456
-
457
- The standalone function version of this method:
458
-
459
- ```typescript
460
- import { FinanceableCore } from "@financeable/aggregation/core.js";
461
- import { applicationsGet } from "@financeable/aggregation/funcs/applicationsGet.js";
462
-
463
- // Use `FinanceableCore` for best tree-shaking performance.
464
- // You can create one instance of it to use across an application.
465
- const financeable = new FinanceableCore({
466
- clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
467
- });
468
-
469
- async function run() {
470
- const res = await applicationsGet(financeable, {
471
- id: "<id>",
472
- });
473
-
474
- if (!res.ok) {
475
- throw res.error;
476
- }
477
-
478
- const { value: result } = res;
479
-
480
- // Handle the result
481
- console.log(result);
482
- }
483
-
484
- run();
485
- ```
486
-
487
- ### Parameters
488
-
489
- | Parameter | Type | Required | Description |
490
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
491
- | `request` | [operations.GetApplicationRequest](../../models/operations/getapplicationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
492
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
493
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
494
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
495
-
496
- ### Response
497
-
498
- **Promise\<[operations.GetApplicationResponseBody](../../models/operations/getapplicationresponsebody.md)\>**
499
-
500
- ### Errors
501
-
502
- | Error Type | Status Code | Content Type |
503
- | ------------------- | ------------------- | ------------------- |
504
- | errors.ResponseBody | 403 | application/json |
505
- | errors.APIError | 4XX, 5XX | \*/\* |
378
+ | Error Type | Status Code | Content Type |
379
+ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
380
+ | errors.CreateApplicationResponseBody | 403 | application/json |
381
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -5,9 +5,9 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [get](#get) - Obtain an OAuth client_credentials token
8
+ * [oauthToken](#oauthtoken) - Obtain an OAuth client_credentials token
9
9
 
10
- ## get
10
+ ## oauthToken
11
11
 
12
12
  Obtain an OAuth client_credentials token
13
13
 
@@ -21,7 +21,7 @@ const financeable = new Financeable({
21
21
  });
22
22
 
23
23
  async function run() {
24
- const result = await financeable.oauthToken.get({
24
+ const result = await financeable.oauthToken.oauthToken({
25
25
  grantType: "client_credentials",
26
26
  clientId: "<id>",
27
27
  clientSecret: "<value>",
@@ -41,7 +41,7 @@ The standalone function version of this method:
41
41
 
42
42
  ```typescript
43
43
  import { FinanceableCore } from "@financeable/aggregation/core.js";
44
- import { oauthTokenGet } from "@financeable/aggregation/funcs/oauthTokenGet.js";
44
+ import { oauthTokenOauthToken } from "@financeable/aggregation/funcs/oauthTokenOauthToken.js";
45
45
 
46
46
  // Use `FinanceableCore` for best tree-shaking performance.
47
47
  // You can create one instance of it to use across an application.
@@ -50,7 +50,7 @@ const financeable = new FinanceableCore({
50
50
  });
51
51
 
52
52
  async function run() {
53
- const res = await oauthTokenGet(financeable, {
53
+ const res = await oauthTokenOauthToken(financeable, {
54
54
  grantType: "client_credentials",
55
55
  clientId: "<id>",
56
56
  clientSecret: "<value>",