@financeable/aggregation 0.5.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +14 -131
- package/README.md +271 -1512
- package/docs/sdks/applications/README.md +24 -383
- package/docs/sdks/oauthtoken/README.md +5 -5
- package/docs/sdks/supportingdocuments/README.md +121 -0
- package/funcs/applicationsCreate.d.ts +1 -2
- package/funcs/applicationsCreate.d.ts.map +1 -1
- package/funcs/applicationsCreate.js +3 -4
- 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 +14 -0
- package/funcs/supportingDocumentsCreate.d.ts.map +1 -0
- package/funcs/{applicationsList.js → supportingDocumentsCreate.js} +14 -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 +10 -8
- package/models/components/addressattributes.d.ts.map +1 -1
- package/models/components/addressattributes.js +15 -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/commercialsecuredapplicationpayload.d.ts +164 -0
- package/models/components/commercialsecuredapplicationpayload.d.ts.map +1 -0
- package/models/components/commercialsecuredapplicationpayload.js +158 -0
- package/models/components/commercialsecuredapplicationpayload.js.map +1 -0
- package/models/components/commercialsecuredapplicationresource.d.ts +171 -0
- package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -0
- package/models/components/commercialsecuredapplicationresource.js +161 -0
- package/models/components/commercialsecuredapplicationresource.js.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.d.ts +237 -0
- package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.js +170 -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 +537 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js +548 -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/consumersecuredapplicationpayload.d.ts +164 -0
- package/models/components/consumersecuredapplicationpayload.d.ts.map +1 -0
- package/models/components/consumersecuredapplicationpayload.js +158 -0
- package/models/components/consumersecuredapplicationpayload.js.map +1 -0
- package/models/components/consumersecuredapplicationresource.d.ts +171 -0
- package/models/components/consumersecuredapplicationresource.d.ts.map +1 -0
- package/models/components/consumersecuredapplicationresource.js +161 -0
- package/models/components/consumersecuredapplicationresource.js.map +1 -0
- package/models/components/consumersecuredloanassetattributes.d.ts +237 -0
- package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -0
- package/models/components/consumersecuredloanassetattributes.js +172 -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 +425 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js +443 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
- package/models/components/createsupportingdocumentsresponse.d.ts +124 -0
- package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -0
- package/models/components/createsupportingdocumentsresponse.js +138 -0
- package/models/components/createsupportingdocumentsresponse.js.map +1 -0
- package/models/components/customerattributes.d.ts +2 -0
- package/models/components/customerattributes.d.ts.map +1 -1
- package/models/components/customerattributes.js +2 -0
- package/models/components/customerattributes.js.map +1 -1
- package/models/components/documenttype.d.ts +70 -0
- package/models/components/documenttype.d.ts.map +1 -0
- package/models/{errors/responsebody.js → components/documenttype.js} +28 -34
- package/models/components/documenttype.js.map +1 -0
- package/models/components/entityattributes.d.ts +2 -22
- package/models/components/entityattributes.d.ts.map +1 -1
- package/models/components/entityattributes.js +2 -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 +24 -8
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +24 -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/{links.js → linkobject.js} +27 -22
- package/models/components/linkobject.js.map +1 -0
- package/models/components/loandetailsattributes.d.ts +2 -0
- package/models/components/loandetailsattributes.d.ts.map +1 -1
- package/models/components/loandetailsattributes.js +2 -0
- package/models/components/loandetailsattributes.js.map +1 -1
- 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/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 +71 -0
- package/models/components/supportingdocumentresource.d.ts.map +1 -0
- package/models/components/supportingdocumentresource.js +98 -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 +73 -0
- package/models/errors/createapplication.d.ts.map +1 -0
- package/models/errors/createapplication.js +120 -0
- 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 +26 -874
- package/models/operations/createapplication.d.ts.map +1 -1
- package/models/operations/createapplication.js +37 -899
- 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 +94 -0
- package/models/operations/supportingdocumentscreate.d.ts.map +1 -0
- package/models/operations/supportingdocumentscreate.js +135 -0
- package/models/operations/supportingdocumentscreate.js.map +1 -0
- package/package.json +2 -2
- 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 +9 -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 +15 -9
- package/src/funcs/{oauthTokenGet.ts → oauthTokenOauthToken.ts} +1 -1
- package/src/funcs/{applicationsList.ts → supportingDocumentsCreate.ts} +30 -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 +22 -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/commercialsecuredapplicationpayload.ts +248 -0
- package/src/models/components/commercialsecuredapplicationresource.ts +310 -0
- package/src/models/components/commercialsecuredloanassetattributes.ts +319 -0
- package/src/models/components/commercialsecuredloanassettype.ts +64 -0
- package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +1238 -0
- package/src/models/components/consumerapplicationjsonapirelationships.ts +683 -0
- package/src/models/components/consumersecuredapplicationpayload.ts +273 -0
- package/src/models/components/consumersecuredapplicationresource.ts +309 -0
- package/src/models/components/consumersecuredloanassetattributes.ts +334 -0
- package/src/models/components/consumersecuredloanassettype.ts +47 -0
- package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +1047 -0
- package/src/models/components/createsupportingdocumentsresponse.ts +206 -0
- package/src/models/components/customerattributes.ts +4 -0
- package/src/models/components/documenttype.ts +49 -0
- package/src/models/components/entityattributes.ts +4 -44
- package/src/models/components/forbiddenerror.ts +35 -58
- package/src/models/components/index.ts +24 -8
- package/src/models/components/linkobject.ts +84 -0
- package/src/models/components/loandetailsattributes.ts +4 -0
- package/src/models/components/relationshipresourcenotfound.ts +195 -0
- package/src/models/components/resourcenotfound.ts +188 -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 +126 -0
- package/src/models/components/uploadmimetype.ts +44 -0
- package/src/models/errors/createapplication.ts +149 -0
- package/src/models/errors/index.ts +2 -1
- package/src/models/errors/supportingdocumentscreate.ts +342 -0
- package/src/models/operations/createapplication.ts +69 -1913
- package/src/models/operations/index.ts +1 -2
- package/src/models/operations/supportingdocumentscreate.ts +222 -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 +24 -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 -527
- 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 -1172
- 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,136 +23,33 @@ const financeable = new Financeable({
|
|
|
26
23
|
async function run() {
|
|
27
24
|
const result = await financeable.applications.create({
|
|
28
25
|
data: {
|
|
29
|
-
type: "
|
|
26
|
+
type: "entities",
|
|
30
27
|
attributes: {
|
|
31
|
-
|
|
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: {
|
|
54
|
-
data: [
|
|
55
|
-
{
|
|
56
|
-
type: "entities",
|
|
57
|
-
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",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
31
|
customers: {
|
|
72
32
|
data: [
|
|
73
33
|
{
|
|
74
34
|
type: "customers",
|
|
75
35
|
attributes: {
|
|
36
|
+
id: "<id>",
|
|
76
37
|
title: "Mr",
|
|
77
|
-
firstName: "
|
|
78
|
-
lastName: "
|
|
79
|
-
dateOfBirth: "
|
|
38
|
+
firstName: "Annie",
|
|
39
|
+
lastName: "Wiegand",
|
|
40
|
+
dateOfBirth: "1944-05-18",
|
|
80
41
|
idExpiryDate: "<value>",
|
|
81
42
|
},
|
|
82
43
|
relationships: {
|
|
83
44
|
addresses: {
|
|
84
|
-
data: [
|
|
85
|
-
{
|
|
86
|
-
type: "addresses",
|
|
87
|
-
attributes: {
|
|
88
|
-
addressType: "residential",
|
|
89
|
-
fullAddress: "42 Wallaby Way, Sydney NSW 2000",
|
|
90
|
-
city: "Sydney",
|
|
91
|
-
postCode: "2000",
|
|
92
|
-
streetAddress: "42 Wallaby Way",
|
|
93
|
-
addressLine2: "",
|
|
94
|
-
streetNumber: "42",
|
|
95
|
-
streetType: "Way",
|
|
96
|
-
street: "Wallaby",
|
|
97
|
-
state: "NSW",
|
|
98
|
-
country: "Australia",
|
|
99
|
-
status: "current",
|
|
100
|
-
monthsAt: 24,
|
|
101
|
-
yearsAt: 2,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
type: "addresses",
|
|
106
|
-
attributes: {
|
|
107
|
-
addressType: "residential",
|
|
108
|
-
fullAddress: "42 Wallaby Way, Sydney NSW 2000",
|
|
109
|
-
city: "Sydney",
|
|
110
|
-
postCode: "2000",
|
|
111
|
-
streetAddress: "42 Wallaby Way",
|
|
112
|
-
addressLine2: "",
|
|
113
|
-
streetNumber: "42",
|
|
114
|
-
streetType: "Way",
|
|
115
|
-
street: "Wallaby",
|
|
116
|
-
state: "NSW",
|
|
117
|
-
country: "Australia",
|
|
118
|
-
status: "current",
|
|
119
|
-
monthsAt: 24,
|
|
120
|
-
yearsAt: 2,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
],
|
|
45
|
+
data: [],
|
|
124
46
|
},
|
|
125
47
|
},
|
|
126
48
|
},
|
|
127
49
|
],
|
|
128
50
|
},
|
|
129
|
-
|
|
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",
|
|
157
|
-
},
|
|
158
|
-
},
|
|
51
|
+
entities: {
|
|
52
|
+
data: [],
|
|
159
53
|
},
|
|
160
54
|
},
|
|
161
55
|
},
|
|
@@ -175,7 +69,6 @@ The standalone function version of this method:
|
|
|
175
69
|
```typescript
|
|
176
70
|
import { FinanceableCore } from "@financeable/aggregation/core.js";
|
|
177
71
|
import { applicationsCreate } from "@financeable/aggregation/funcs/applicationsCreate.js";
|
|
178
|
-
import { CommercialAssetType } from "@financeable/aggregation/models/components";
|
|
179
72
|
|
|
180
73
|
// Use `FinanceableCore` for best tree-shaking performance.
|
|
181
74
|
// You can create one instance of it to use across an application.
|
|
@@ -186,136 +79,33 @@ const financeable = new FinanceableCore({
|
|
|
186
79
|
async function run() {
|
|
187
80
|
const res = await applicationsCreate(financeable, {
|
|
188
81
|
data: {
|
|
189
|
-
type: "
|
|
82
|
+
type: "entities",
|
|
190
83
|
attributes: {
|
|
191
|
-
|
|
192
|
-
applicationType: "consumer",
|
|
84
|
+
applicationType: "commercialSecured",
|
|
193
85
|
},
|
|
194
86
|
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: {
|
|
214
|
-
data: [
|
|
215
|
-
{
|
|
216
|
-
type: "entities",
|
|
217
|
-
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",
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
],
|
|
230
|
-
},
|
|
231
87
|
customers: {
|
|
232
88
|
data: [
|
|
233
89
|
{
|
|
234
90
|
type: "customers",
|
|
235
91
|
attributes: {
|
|
92
|
+
id: "<id>",
|
|
236
93
|
title: "Mr",
|
|
237
|
-
firstName: "
|
|
238
|
-
lastName: "
|
|
239
|
-
dateOfBirth: "
|
|
94
|
+
firstName: "Annie",
|
|
95
|
+
lastName: "Wiegand",
|
|
96
|
+
dateOfBirth: "1944-05-18",
|
|
240
97
|
idExpiryDate: "<value>",
|
|
241
98
|
},
|
|
242
99
|
relationships: {
|
|
243
100
|
addresses: {
|
|
244
|
-
data: [
|
|
245
|
-
{
|
|
246
|
-
type: "addresses",
|
|
247
|
-
attributes: {
|
|
248
|
-
addressType: "residential",
|
|
249
|
-
fullAddress: "42 Wallaby Way, Sydney NSW 2000",
|
|
250
|
-
city: "Sydney",
|
|
251
|
-
postCode: "2000",
|
|
252
|
-
streetAddress: "42 Wallaby Way",
|
|
253
|
-
addressLine2: "",
|
|
254
|
-
streetNumber: "42",
|
|
255
|
-
streetType: "Way",
|
|
256
|
-
street: "Wallaby",
|
|
257
|
-
state: "NSW",
|
|
258
|
-
country: "Australia",
|
|
259
|
-
status: "current",
|
|
260
|
-
monthsAt: 24,
|
|
261
|
-
yearsAt: 2,
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
type: "addresses",
|
|
266
|
-
attributes: {
|
|
267
|
-
addressType: "residential",
|
|
268
|
-
fullAddress: "42 Wallaby Way, Sydney NSW 2000",
|
|
269
|
-
city: "Sydney",
|
|
270
|
-
postCode: "2000",
|
|
271
|
-
streetAddress: "42 Wallaby Way",
|
|
272
|
-
addressLine2: "",
|
|
273
|
-
streetNumber: "42",
|
|
274
|
-
streetType: "Way",
|
|
275
|
-
street: "Wallaby",
|
|
276
|
-
state: "NSW",
|
|
277
|
-
country: "Australia",
|
|
278
|
-
status: "current",
|
|
279
|
-
monthsAt: 24,
|
|
280
|
-
yearsAt: 2,
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
],
|
|
101
|
+
data: [],
|
|
284
102
|
},
|
|
285
103
|
},
|
|
286
104
|
},
|
|
287
105
|
],
|
|
288
106
|
},
|
|
289
|
-
|
|
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",
|
|
317
|
-
},
|
|
318
|
-
},
|
|
107
|
+
entities: {
|
|
108
|
+
data: [],
|
|
319
109
|
},
|
|
320
110
|
},
|
|
321
111
|
},
|
|
@@ -338,7 +128,7 @@ run();
|
|
|
338
128
|
|
|
339
129
|
| Parameter | Type | Required | Description |
|
|
340
130
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
341
|
-
| `request` | [
|
|
131
|
+
| `request` | [operations.CreateApplicationRequestBody](../../models/operations/createapplicationrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
342
132
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
343
133
|
| `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
134
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
@@ -349,157 +139,8 @@ run();
|
|
|
349
139
|
|
|
350
140
|
### Errors
|
|
351
141
|
|
|
352
|
-
| Error Type
|
|
353
|
-
|
|
|
354
|
-
| errors.
|
|
355
|
-
| errors.
|
|
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 | \*/\* |
|
|
142
|
+
| Error Type | Status Code | Content Type |
|
|
143
|
+
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
|
144
|
+
| errors.CreateApplicationResponseBody | 403 | application/json |
|
|
145
|
+
| errors.CreateApplicationApplicationsResponseBody | 404 | application/json |
|
|
146
|
+
| 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>",
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# SupportingDocuments
|
|
2
|
+
(*supportingDocuments*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [create](#create) - Create a supporting document record in Financeable, and returns a pre-signed URL to upload this document with.
|
|
9
|
+
|
|
10
|
+
## create
|
|
11
|
+
|
|
12
|
+
Create a supporting document record in Financeable, and returns a pre-signed URL to upload this document with.
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Financeable } from "@financeable/aggregation";
|
|
18
|
+
|
|
19
|
+
const financeable = new Financeable({
|
|
20
|
+
clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
async function run() {
|
|
24
|
+
const result = await financeable.supportingDocuments.create({
|
|
25
|
+
mimeType: "text/plain",
|
|
26
|
+
requestBody: {
|
|
27
|
+
data: {
|
|
28
|
+
type: "supporting-documents",
|
|
29
|
+
attributes: {
|
|
30
|
+
filename: "example.file",
|
|
31
|
+
documentType: "ASIC FILE",
|
|
32
|
+
},
|
|
33
|
+
relationships: {
|
|
34
|
+
application: {
|
|
35
|
+
data: {
|
|
36
|
+
type: "consumer-secured-applications",
|
|
37
|
+
id: "<id>",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Handle the result
|
|
46
|
+
console.log(result);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
run();
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Standalone function
|
|
53
|
+
|
|
54
|
+
The standalone function version of this method:
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { FinanceableCore } from "@financeable/aggregation/core.js";
|
|
58
|
+
import { supportingDocumentsCreate } from "@financeable/aggregation/funcs/supportingDocumentsCreate.js";
|
|
59
|
+
|
|
60
|
+
// Use `FinanceableCore` for best tree-shaking performance.
|
|
61
|
+
// You can create one instance of it to use across an application.
|
|
62
|
+
const financeable = new FinanceableCore({
|
|
63
|
+
clientCredentials: process.env["FINANCEABLE_CLIENT_CREDENTIALS"] ?? "",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
async function run() {
|
|
67
|
+
const res = await supportingDocumentsCreate(financeable, {
|
|
68
|
+
mimeType: "text/plain",
|
|
69
|
+
requestBody: {
|
|
70
|
+
data: {
|
|
71
|
+
type: "supporting-documents",
|
|
72
|
+
attributes: {
|
|
73
|
+
filename: "example.file",
|
|
74
|
+
documentType: "ASIC FILE",
|
|
75
|
+
},
|
|
76
|
+
relationships: {
|
|
77
|
+
application: {
|
|
78
|
+
data: {
|
|
79
|
+
type: "consumer-secured-applications",
|
|
80
|
+
id: "<id>",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
if (!res.ok) {
|
|
89
|
+
throw res.error;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const { value: result } = res;
|
|
93
|
+
|
|
94
|
+
// Handle the result
|
|
95
|
+
console.log(result);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
run();
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Parameters
|
|
102
|
+
|
|
103
|
+
| Parameter | Type | Required | Description |
|
|
104
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
105
|
+
| `request` | [operations.SupportingDocumentsCreateRequest](../../models/operations/supportingdocumentscreaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
106
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
107
|
+
| `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. |
|
|
108
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
109
|
+
|
|
110
|
+
### Response
|
|
111
|
+
|
|
112
|
+
**Promise\<[operations.SupportingDocumentsCreateResponseBody](../../models/operations/supportingdocumentscreateresponsebody.md)\>**
|
|
113
|
+
|
|
114
|
+
### Errors
|
|
115
|
+
|
|
116
|
+
| Error Type | Status Code | Content Type |
|
|
117
|
+
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
|
118
|
+
| errors.SupportingDocumentsCreateResponseBody | 400 | application/json |
|
|
119
|
+
| errors.One | 404 | application/json |
|
|
120
|
+
| errors.Two | 404 | application/json |
|
|
121
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|