@financeable/aggregation 0.5.0 → 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.
- package/.devcontainer/README.md +1 -1
- package/FUNCTIONS.md +11 -132
- package/README.md +262 -1515
- package/docs/sdks/applications/README.md +171 -295
- package/docs/sdks/oauthtoken/README.md +5 -5
- package/docs/sdks/supportingdocuments/README.md +113 -0
- package/funcs/applicationsCreate.d.ts +1 -2
- package/funcs/applicationsCreate.d.ts.map +1 -1
- package/funcs/applicationsCreate.js +2 -3
- package/funcs/applicationsCreate.js.map +1 -1
- package/funcs/{oauthTokenGet.d.ts → oauthTokenOauthToken.d.ts} +2 -2
- package/funcs/oauthTokenOauthToken.d.ts.map +1 -0
- package/funcs/{oauthTokenGet.js → oauthTokenOauthToken.js} +3 -3
- package/funcs/oauthTokenOauthToken.js.map +1 -0
- package/funcs/supportingDocumentsCreate.d.ts +15 -0
- package/funcs/supportingDocumentsCreate.d.ts.map +1 -0
- package/funcs/{applicationsList.js → supportingDocumentsCreate.js} +15 -12
- package/funcs/supportingDocumentsCreate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +4 -7
- package/lib/config.js.map +1 -1
- package/lib/matchers.d.ts +3 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +12 -0
- package/lib/matchers.js.map +1 -1
- package/lib/sdks.d.ts +3 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +13 -13
- package/lib/sdks.js.map +1 -1
- package/models/components/addressattributes.d.ts +8 -8
- package/models/components/addressattributes.d.ts.map +1 -1
- package/models/components/addressattributes.js +13 -14
- package/models/components/addressattributes.js.map +1 -1
- package/models/components/applicationresource.d.ts +30 -0
- package/models/components/applicationresource.d.ts.map +1 -0
- package/models/components/applicationresource.js +73 -0
- package/models/components/applicationresource.js.map +1 -0
- package/models/components/badrequesterror.d.ts +119 -0
- package/models/components/badrequesterror.d.ts.map +1 -0
- package/models/components/badrequesterror.js +140 -0
- package/models/components/badrequesterror.js.map +1 -0
- package/models/components/commercialapplicationjsonapirelationships.d.ts +384 -0
- package/models/components/commercialapplicationjsonapirelationships.d.ts.map +1 -0
- package/models/components/commercialapplicationjsonapirelationships.js +391 -0
- package/models/components/commercialapplicationjsonapirelationships.js.map +1 -0
- package/models/components/commercialapplicationresource.d.ts +191 -0
- package/models/components/commercialapplicationresource.d.ts.map +1 -0
- package/models/components/commercialapplicationresource.js +183 -0
- package/models/components/commercialapplicationresource.js.map +1 -0
- package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts +124 -0
- package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts.map +1 -0
- package/models/components/commercialsecuredloanapplicationsubmissionpayload.js +144 -0
- package/models/components/commercialsecuredloanapplicationsubmissionpayload.js.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.d.ts +235 -0
- package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.js +168 -0
- package/models/components/commercialsecuredloanassetattributes.js.map +1 -0
- package/models/components/commercialsecuredloanassettype.d.ts +100 -0
- package/models/components/commercialsecuredloanassettype.d.ts.map +1 -0
- package/models/components/commercialsecuredloanassettype.js +84 -0
- package/models/components/commercialsecuredloanassettype.js.map +1 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +455 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js +504 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -0
- package/models/components/consumerapplicationjsonapirelationships.d.ts +296 -0
- package/models/components/consumerapplicationjsonapirelationships.d.ts.map +1 -0
- package/models/components/consumerapplicationjsonapirelationships.js +310 -0
- package/models/components/consumerapplicationjsonapirelationships.js.map +1 -0
- package/models/components/consumerapplicationresource.d.ts +191 -0
- package/models/components/consumerapplicationresource.d.ts.map +1 -0
- package/models/components/consumerapplicationresource.js +187 -0
- package/models/components/consumerapplicationresource.js.map +1 -0
- package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts +124 -0
- package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts.map +1 -0
- package/models/components/consumersecuredloanapplicationsubmissionpayload.js +146 -0
- package/models/components/consumersecuredloanapplicationsubmissionpayload.js.map +1 -0
- package/models/components/consumersecuredloanassetattributes.d.ts +235 -0
- package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -0
- package/models/components/consumersecuredloanassetattributes.js +170 -0
- package/models/components/consumersecuredloanassetattributes.js.map +1 -0
- package/models/components/consumersecuredloanassettype.d.ts +64 -0
- package/models/components/consumersecuredloanassettype.d.ts.map +1 -0
- package/models/components/{consumerassettype.js → consumersecuredloanassettype.js} +27 -28
- package/models/components/consumersecuredloanassettype.js.map +1 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +376 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js +426 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
- package/models/components/createsupportingdocumentsresponse.d.ts +121 -0
- package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -0
- package/models/components/createsupportingdocumentsresponse.js +149 -0
- package/models/components/createsupportingdocumentsresponse.js.map +1 -0
- package/models/components/documenttype.d.ts +70 -0
- package/models/components/documenttype.d.ts.map +1 -0
- package/models/components/documenttype.js +75 -0
- package/models/components/documenttype.js.map +1 -0
- package/models/components/entityattributes.d.ts +0 -22
- package/models/components/entityattributes.d.ts.map +1 -1
- package/models/components/entityattributes.js +0 -19
- package/models/components/entityattributes.js.map +1 -1
- package/models/components/forbiddenerror.d.ts +17 -39
- package/models/components/forbiddenerror.d.ts.map +1 -1
- package/models/components/forbiddenerror.js +27 -46
- package/models/components/forbiddenerror.js.map +1 -1
- package/models/components/index.d.ts +25 -8
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +25 -8
- package/models/components/index.js.map +1 -1
- package/models/components/linkobject.d.ts +47 -0
- package/models/components/linkobject.d.ts.map +1 -0
- package/models/components/linkobject.js +77 -0
- package/models/components/linkobject.js.map +1 -0
- package/models/components/relationshipresourcenotfound.d.ts +116 -0
- package/models/components/relationshipresourcenotfound.d.ts.map +1 -0
- package/models/components/relationshipresourcenotfound.js +139 -0
- package/models/components/relationshipresourcenotfound.js.map +1 -0
- package/models/components/resourcenotfound.d.ts +119 -0
- package/models/components/resourcenotfound.d.ts.map +1 -0
- package/models/components/resourcenotfound.js +139 -0
- package/models/components/resourcenotfound.js.map +1 -0
- package/models/components/resourcetypes.d.ts +46 -0
- package/models/components/resourcetypes.d.ts.map +1 -0
- package/models/components/{links.js → resourcetypes.js} +21 -27
- package/models/components/resourcetypes.js.map +1 -0
- package/models/components/supportingdocumentattributes.d.ts +40 -0
- package/models/components/supportingdocumentattributes.d.ts.map +1 -0
- package/models/components/{applicationattributescreate.js → supportingdocumentattributes.js} +24 -24
- package/models/components/supportingdocumentattributes.js.map +1 -0
- package/models/components/supportingdocumentattributesinput.d.ts +38 -0
- package/models/components/supportingdocumentattributesinput.d.ts.map +1 -0
- package/models/components/supportingdocumentattributesinput.js +72 -0
- package/models/components/supportingdocumentattributesinput.js.map +1 -0
- package/models/components/supportingdocumentrelationships.d.ts +448 -0
- package/models/components/supportingdocumentrelationships.d.ts.map +1 -0
- package/models/components/supportingdocumentrelationships.js +434 -0
- package/models/components/supportingdocumentrelationships.js.map +1 -0
- package/models/components/supportingdocumentresource.d.ts +91 -0
- package/models/components/supportingdocumentresource.d.ts.map +1 -0
- package/models/components/supportingdocumentresource.js +121 -0
- package/models/components/supportingdocumentresource.js.map +1 -0
- package/models/components/uploadmimetype.d.ts +49 -0
- package/models/components/uploadmimetype.d.ts.map +1 -0
- package/models/components/{applicationtype.js → uploadmimetype.js} +22 -14
- package/models/components/uploadmimetype.js.map +1 -0
- package/models/errors/createapplication.d.ts +38 -0
- package/models/errors/createapplication.d.ts.map +1 -0
- package/models/errors/{responsebody.js → createapplication.js} +15 -15
- package/models/errors/createapplication.js.map +1 -0
- package/models/errors/index.d.ts +2 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +2 -1
- package/models/errors/index.js.map +1 -1
- package/models/errors/supportingdocumentscreate.d.ts +143 -0
- package/models/errors/supportingdocumentscreate.d.ts.map +1 -0
- package/models/errors/supportingdocumentscreate.js +225 -0
- package/models/errors/supportingdocumentscreate.js.map +1 -0
- package/models/operations/createapplication.d.ts +66 -808
- package/models/operations/createapplication.d.ts.map +1 -1
- package/models/operations/createapplication.js +82 -837
- package/models/operations/createapplication.js.map +1 -1
- package/models/operations/index.d.ts +1 -2
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -2
- package/models/operations/index.js.map +1 -1
- package/models/operations/supportingdocumentscreate.d.ts +60 -0
- package/models/operations/supportingdocumentscreate.d.ts.map +1 -0
- package/models/operations/supportingdocumentscreate.js +108 -0
- package/models/operations/supportingdocumentscreate.js.map +1 -0
- package/package.json +3 -3
- package/sdk/applications.d.ts +1 -10
- package/sdk/applications.d.ts.map +1 -1
- package/sdk/applications.js +0 -14
- package/sdk/applications.js.map +1 -1
- package/sdk/oauthtoken.d.ts +1 -1
- package/sdk/oauthtoken.d.ts.map +1 -1
- package/sdk/oauthtoken.js +3 -3
- package/sdk/oauthtoken.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/supportingdocuments.d.ts +10 -0
- package/sdk/supportingdocuments.d.ts.map +1 -0
- package/sdk/supportingdocuments.js +19 -0
- package/sdk/supportingdocuments.js.map +1 -0
- package/src/funcs/applicationsCreate.ts +7 -8
- package/src/funcs/{oauthTokenGet.ts → oauthTokenOauthToken.ts} +1 -1
- package/src/funcs/{applicationsList.ts → supportingDocumentsCreate.ts} +31 -20
- package/src/lib/config.ts +4 -7
- package/src/lib/matchers.ts +20 -0
- package/src/lib/sdks.ts +19 -13
- package/src/models/components/addressattributes.ts +18 -14
- package/src/models/components/applicationresource.ts +83 -0
- package/src/models/components/badrequesterror.ts +182 -0
- package/src/models/components/commercialapplicationjsonapirelationships.ts +894 -0
- package/src/models/components/commercialapplicationresource.ts +355 -0
- package/src/models/components/commercialsecuredloanapplicationsubmissionpayload.ts +237 -0
- package/src/models/components/commercialsecuredloanassetattributes.ts +315 -0
- package/src/models/components/commercialsecuredloanassettype.ts +64 -0
- package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +1148 -0
- package/src/models/components/consumerapplicationjsonapirelationships.ts +683 -0
- package/src/models/components/consumerapplicationresource.ts +342 -0
- package/src/models/components/consumersecuredloanapplicationsubmissionpayload.ts +270 -0
- package/src/models/components/consumersecuredloanassetattributes.ts +330 -0
- package/src/models/components/consumersecuredloanassettype.ts +47 -0
- package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +1011 -0
- package/src/models/components/createsupportingdocumentsresponse.ts +252 -0
- package/src/models/components/documenttype.ts +49 -0
- package/src/models/components/entityattributes.ts +0 -44
- package/src/models/components/forbiddenerror.ts +35 -58
- package/src/models/components/index.ts +25 -8
- package/src/models/components/linkobject.ts +84 -0
- package/src/models/components/relationshipresourcenotfound.ts +195 -0
- package/src/models/components/resourcenotfound.ts +188 -0
- package/src/models/components/resourcetypes.ts +39 -0
- package/src/models/components/supportingdocumentattributes.ts +87 -0
- package/src/models/components/supportingdocumentattributesinput.ts +84 -0
- package/src/models/components/supportingdocumentrelationships.ts +828 -0
- package/src/models/components/supportingdocumentresource.ts +163 -0
- package/src/models/components/uploadmimetype.ts +44 -0
- package/src/models/errors/createapplication.ts +76 -0
- package/src/models/errors/index.ts +2 -1
- package/src/models/errors/supportingdocumentscreate.ts +342 -0
- package/src/models/operations/createapplication.ts +143 -1778
- package/src/models/operations/index.ts +1 -2
- package/src/models/operations/supportingdocumentscreate.ts +150 -0
- package/src/sdk/applications.ts +1 -32
- package/src/sdk/oauthtoken.ts +3 -3
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/supportingdocuments.ts +25 -0
- package/funcs/applicationsGet.d.ts +0 -14
- package/funcs/applicationsGet.d.ts.map +0 -1
- package/funcs/applicationsGet.js +0 -120
- package/funcs/applicationsGet.js.map +0 -1
- package/funcs/applicationsList.d.ts +0 -14
- package/funcs/applicationsList.d.ts.map +0 -1
- package/funcs/applicationsList.js.map +0 -1
- package/funcs/oauthTokenGet.d.ts.map +0 -1
- package/funcs/oauthTokenGet.js.map +0 -1
- package/models/components/applicationattributes.d.ts +0 -69
- package/models/components/applicationattributes.d.ts.map +0 -1
- package/models/components/applicationattributes.js +0 -85
- package/models/components/applicationattributes.js.map +0 -1
- package/models/components/applicationattributescreate.d.ts +0 -43
- package/models/components/applicationattributescreate.d.ts.map +0 -1
- package/models/components/applicationattributescreate.js.map +0 -1
- package/models/components/applicationresourcebulksubmission.d.ts +0 -533
- package/models/components/applicationresourcebulksubmission.d.ts.map +0 -1
- package/models/components/applicationresourcebulksubmission.js +0 -565
- package/models/components/applicationresourcebulksubmission.js.map +0 -1
- package/models/components/applicationtype.d.ts +0 -28
- package/models/components/applicationtype.d.ts.map +0 -1
- package/models/components/applicationtype.js.map +0 -1
- package/models/components/assetattributes.d.ts +0 -311
- package/models/components/assetattributes.d.ts.map +0 -1
- package/models/components/assetattributes.js +0 -234
- package/models/components/assetattributes.js.map +0 -1
- package/models/components/commercialassettype.d.ts +0 -44
- package/models/components/commercialassettype.d.ts.map +0 -1
- package/models/components/commercialassettype.js +0 -85
- package/models/components/commercialassettype.js.map +0 -1
- package/models/components/consumerassettype.d.ts +0 -32
- package/models/components/consumerassettype.d.ts.map +0 -1
- package/models/components/consumerassettype.js.map +0 -1
- package/models/components/links.d.ts +0 -40
- package/models/components/links.d.ts.map +0 -1
- package/models/components/links.js.map +0 -1
- package/models/errors/responsebody.d.ts +0 -38
- package/models/errors/responsebody.d.ts.map +0 -1
- package/models/errors/responsebody.js.map +0 -1
- package/models/operations/getapplication.d.ts +0 -962
- package/models/operations/getapplication.d.ts.map +0 -1
- package/models/operations/getapplication.js +0 -1030
- package/models/operations/getapplication.js.map +0 -1
- package/models/operations/getapplications.d.ts +0 -962
- package/models/operations/getapplications.d.ts.map +0 -1
- package/models/operations/getapplications.js +0 -1029
- package/models/operations/getapplications.js.map +0 -1
- package/src/funcs/applicationsGet.ts +0 -168
- package/src/models/components/applicationattributes.ts +0 -128
- package/src/models/components/applicationattributescreate.ts +0 -90
- package/src/models/components/applicationresourcebulksubmission.ts +0 -1178
- package/src/models/components/applicationtype.ts +0 -33
- package/src/models/components/assetattributes.ts +0 -411
- package/src/models/components/commercialassettype.ts +0 -61
- package/src/models/components/consumerassettype.ts +0 -43
- package/src/models/components/links.ts +0 -72
- package/src/models/errors/responsebody.ts +0 -76
- package/src/models/operations/getapplication.ts +0 -2246
- 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
|
-
|
|
32
|
-
applicationType: "consumer",
|
|
28
|
+
applicationType: "commercialSecured",
|
|
33
29
|
},
|
|
34
30
|
relationships: {
|
|
35
|
-
|
|
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: "
|
|
34
|
+
type: "customers",
|
|
57
35
|
attributes: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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: "
|
|
78
|
-
lastName: "
|
|
79
|
-
dateOfBirth: "
|
|
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
|
-
|
|
130
|
-
data:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
192
|
-
applicationType: "consumer",
|
|
202
|
+
applicationType: "commercialSecured",
|
|
193
203
|
},
|
|
194
204
|
relationships: {
|
|
195
|
-
|
|
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: "
|
|
208
|
+
type: "customers",
|
|
217
209
|
attributes: {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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: "
|
|
238
|
-
lastName: "
|
|
239
|
-
dateOfBirth: "
|
|
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
|
-
|
|
290
|
-
data:
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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` | [
|
|
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
|
|
353
|
-
|
|
|
354
|
-
| errors.
|
|
355
|
-
| errors.APIError
|
|
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
|
-
* [
|
|
8
|
+
* [oauthToken](#oauthtoken) - Obtain an OAuth client_credentials token
|
|
9
9
|
|
|
10
|
-
##
|
|
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.
|
|
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 {
|
|
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
|
|
53
|
+
const res = await oauthTokenOauthToken(financeable, {
|
|
54
54
|
grantType: "client_credentials",
|
|
55
55
|
clientId: "<id>",
|
|
56
56
|
clientSecret: "<value>",
|