@financeable/aggregation 0.2.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 +35 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +225 -0
- package/README.md +967 -0
- package/RUNTIMES.md +48 -0
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/applications/README.md +467 -0
- package/docs/sdks/financeable/README.md +5 -0
- package/financeable-typescript/.devcontainer/README.md +30 -0
- package/financeable-typescript/FUNCTIONS.md +205 -0
- package/financeable-typescript/README.md +895 -0
- package/financeable-typescript/RUNTIMES.md +22 -0
- package/financeable-typescript/docs/sdks/applications/README.md +427 -0
- package/financeable-typescript/docs/sdks/financeable/README.md +5 -0
- package/financeable-typescript/src/core.ts +13 -0
- package/financeable-typescript/src/funcs/applicationsCreate.ts +124 -0
- package/financeable-typescript/src/funcs/applicationsGet.ts +128 -0
- package/financeable-typescript/src/funcs/applicationsList.ts +126 -0
- package/financeable-typescript/src/hooks/hooks.ts +129 -0
- package/financeable-typescript/src/hooks/index.ts +6 -0
- package/financeable-typescript/src/hooks/types.ts +109 -0
- package/financeable-typescript/src/index.ts +7 -0
- package/financeable-typescript/src/lib/base64.ts +37 -0
- package/financeable-typescript/src/lib/config.ts +59 -0
- package/financeable-typescript/src/lib/dlv.ts +53 -0
- package/financeable-typescript/src/lib/encodings.ts +449 -0
- package/financeable-typescript/src/lib/env.ts +37 -0
- package/financeable-typescript/src/lib/files.ts +40 -0
- package/financeable-typescript/src/lib/http.ts +323 -0
- package/financeable-typescript/src/lib/is-plain-object.ts +43 -0
- package/financeable-typescript/src/lib/logger.ts +9 -0
- package/financeable-typescript/src/lib/matchers.ts +322 -0
- package/financeable-typescript/src/lib/primitives.ts +122 -0
- package/financeable-typescript/src/lib/retries.ts +219 -0
- package/financeable-typescript/src/lib/schemas.ts +86 -0
- package/financeable-typescript/src/lib/sdks.ts +392 -0
- package/financeable-typescript/src/lib/security.ts +227 -0
- package/financeable-typescript/src/lib/url.ts +33 -0
- package/financeable-typescript/src/models/components/addressattributes.ts +148 -0
- package/financeable-typescript/src/models/components/apierrorlinks.ts +65 -0
- package/financeable-typescript/src/models/components/applicationattributes.ts +128 -0
- package/financeable-typescript/src/models/components/applicationattributescreate.ts +90 -0
- package/financeable-typescript/src/models/components/applicationresourcebulksubmission.ts +1000 -0
- package/financeable-typescript/src/models/components/applicationstatus.ts +39 -0
- package/financeable-typescript/src/models/components/applicationtype.ts +33 -0
- package/financeable-typescript/src/models/components/assetattributes.ts +400 -0
- package/financeable-typescript/src/models/components/customerattributes.ts +171 -0
- package/financeable-typescript/src/models/components/customertitle.ts +35 -0
- package/financeable-typescript/src/models/components/errorsource.ts +79 -0
- package/financeable-typescript/src/models/components/forbiddenerror.ts +207 -0
- package/financeable-typescript/src/models/components/frequencytype.ts +40 -0
- package/financeable-typescript/src/models/components/index.ts +20 -0
- package/financeable-typescript/src/models/components/links.ts +72 -0
- package/financeable-typescript/src/models/components/loandetailsattributes.ts +187 -0
- package/financeable-typescript/src/models/components/repaymentstructure.ts +40 -0
- package/financeable-typescript/src/models/errors/apierror.ts +27 -0
- package/financeable-typescript/src/models/errors/createapplication.ts +76 -0
- package/financeable-typescript/src/models/errors/getapplication.ts +76 -0
- package/financeable-typescript/src/models/errors/getapplications.ts +76 -0
- package/financeable-typescript/src/models/errors/httpclienterrors.ts +62 -0
- package/financeable-typescript/src/models/errors/index.ts +10 -0
- package/financeable-typescript/src/models/errors/sdkvalidationerror.ts +97 -0
- package/financeable-typescript/src/models/operations/createapplication.ts +1649 -0
- package/financeable-typescript/src/models/operations/getapplication.ts +1829 -0
- package/financeable-typescript/src/models/operations/getapplications.ts +1790 -0
- package/financeable-typescript/src/models/operations/index.ts +7 -0
- package/financeable-typescript/src/sdk/applications.ts +55 -0
- package/financeable-typescript/src/sdk/index.ts +5 -0
- package/financeable-typescript/src/sdk/sdk.ts +13 -0
- package/financeable-typescript/src/types/blobs.ts +31 -0
- package/financeable-typescript/src/types/constdatetime.ts +15 -0
- package/financeable-typescript/src/types/enums.ts +16 -0
- package/financeable-typescript/src/types/fp.ts +50 -0
- package/financeable-typescript/src/types/index.ts +11 -0
- package/financeable-typescript/src/types/operations.ts +105 -0
- package/financeable-typescript/src/types/rfcdate.ts +54 -0
- package/financeable-typescript/src/types/streams.ts +21 -0
- package/funcs/applicationsCreate.d.ts +14 -0
- package/funcs/applicationsCreate.d.ts.map +1 -0
- package/funcs/applicationsCreate.js +105 -0
- package/funcs/applicationsCreate.js.map +1 -0
- package/funcs/applicationsGet.d.ts +13 -0
- package/funcs/applicationsGet.d.ts.map +1 -0
- package/funcs/applicationsGet.js +109 -0
- package/funcs/applicationsGet.js.map +1 -0
- package/funcs/applicationsList.d.ts +13 -0
- package/funcs/applicationsList.d.ts.map +1 -0
- package/funcs/applicationsList.js +107 -0
- package/funcs/applicationsList.js.map +1 -0
- package/hooks/hooks.d.ts +24 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +84 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/types.d.ts +78 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/jsr.json +27 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +33 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +35 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.d.ts +52 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +368 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.d.ts +14 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +64 -0
- package/lib/env.js.map +1 -0
- package/lib/files.d.ts +8 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +36 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +67 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +217 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +204 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +23 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +104 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +38 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +153 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +19 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +62 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +60 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +280 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +79 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +121 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/addressattributes.d.ts +83 -0
- package/models/components/addressattributes.d.ts.map +1 -0
- package/models/components/addressattributes.js +117 -0
- package/models/components/addressattributes.js.map +1 -0
- package/models/components/apierrorlinks.d.ts +32 -0
- package/models/components/apierrorlinks.d.ts.map +1 -0
- package/models/components/apierrorlinks.js +69 -0
- package/models/components/apierrorlinks.js.map +1 -0
- package/models/components/applicationattributes.d.ts +69 -0
- package/models/components/applicationattributes.d.ts.map +1 -0
- package/models/components/applicationattributes.js +85 -0
- package/models/components/applicationattributes.js.map +1 -0
- package/models/components/applicationattributescreate.d.ts +43 -0
- package/models/components/applicationattributescreate.d.ts.map +1 -0
- package/models/components/applicationattributescreate.js +74 -0
- package/models/components/applicationattributescreate.js.map +1 -0
- package/models/components/applicationresourcebulksubmission.d.ts +456 -0
- package/models/components/applicationresourcebulksubmission.d.ts.map +1 -0
- package/models/components/applicationresourcebulksubmission.js +492 -0
- package/models/components/applicationresourcebulksubmission.js.map +1 -0
- package/models/components/applicationstatus.d.ts +46 -0
- package/models/components/applicationstatus.d.ts.map +1 -0
- package/models/components/applicationstatus.js +66 -0
- package/models/components/applicationstatus.js.map +1 -0
- package/models/components/applicationtype.d.ts +28 -0
- package/models/components/applicationtype.d.ts.map +1 -0
- package/models/components/applicationtype.js +60 -0
- package/models/components/applicationtype.js.map +1 -0
- package/models/components/assetattributes.d.ts +388 -0
- package/models/components/assetattributes.d.ts.map +1 -0
- package/models/components/assetattributes.js +244 -0
- package/models/components/assetattributes.js.map +1 -0
- package/models/components/customerattributes.d.ts +103 -0
- package/models/components/customerattributes.d.ts.map +1 -0
- package/models/components/customerattributes.js +120 -0
- package/models/components/customerattributes.js.map +1 -0
- package/models/components/customertitle.d.ts +34 -0
- package/models/components/customertitle.d.ts.map +1 -0
- package/models/components/customertitle.js +62 -0
- package/models/components/customertitle.js.map +1 -0
- package/models/components/errorsource.d.ts +42 -0
- package/models/components/errorsource.d.ts.map +1 -0
- package/models/components/errorsource.js +73 -0
- package/models/components/errorsource.js.map +1 -0
- package/models/components/forbiddenerror.d.ts +141 -0
- package/models/components/forbiddenerror.d.ts.map +1 -0
- package/models/components/forbiddenerror.js +158 -0
- package/models/components/forbiddenerror.js.map +1 -0
- package/models/components/frequencytype.d.ts +37 -0
- package/models/components/frequencytype.d.ts.map +1 -0
- package/models/components/frequencytype.js +64 -0
- package/models/components/frequencytype.js.map +1 -0
- package/models/components/index.d.ts +17 -0
- package/models/components/index.d.ts.map +1 -0
- package/models/components/index.js +36 -0
- package/models/components/index.js.map +1 -0
- package/models/components/links.d.ts +40 -0
- package/models/components/links.d.ts.map +1 -0
- package/models/components/links.js +72 -0
- package/models/components/links.js.map +1 -0
- package/models/components/loandetailsattributes.d.ts +112 -0
- package/models/components/loandetailsattributes.d.ts.map +1 -0
- package/models/components/loandetailsattributes.js +101 -0
- package/models/components/loandetailsattributes.js.map +1 -0
- package/models/components/repaymentstructure.d.ts +37 -0
- package/models/components/repaymentstructure.d.ts.map +1 -0
- package/models/components/repaymentstructure.js +64 -0
- package/models/components/repaymentstructure.js.map +1 -0
- package/models/errors/apierror.d.ts +8 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +21 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/createapplication.d.ts +38 -0
- package/models/errors/createapplication.d.ts.map +1 -0
- package/models/errors/createapplication.js +81 -0
- package/models/errors/createapplication.js.map +1 -0
- package/models/errors/getapplication.d.ts +38 -0
- package/models/errors/getapplication.d.ts.map +1 -0
- package/models/errors/getapplication.js +81 -0
- package/models/errors/getapplication.js.map +1 -0
- package/models/errors/getapplications.d.ts +38 -0
- package/models/errors/getapplications.d.ts.map +1 -0
- package/models/errors/getapplications.js +81 -0
- package/models/errors/getapplications.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.d.ts +7 -0
- package/models/errors/index.d.ts.map +1 -0
- package/models/errors/index.js +26 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +20 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +115 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/operations/createapplication.d.ts +780 -0
- package/models/operations/createapplication.d.ts.map +1 -0
- package/models/operations/createapplication.js +834 -0
- package/models/operations/createapplication.js.map +1 -0
- package/models/operations/getapplication.d.ts +805 -0
- package/models/operations/getapplication.d.ts.map +1 -0
- package/models/operations/getapplication.js +861 -0
- package/models/operations/getapplication.js.map +1 -0
- package/models/operations/getapplications.d.ts +805 -0
- package/models/operations/getapplications.d.ts.map +1 -0
- package/models/operations/getapplications.js +864 -0
- package/models/operations/getapplications.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -0
- package/models/operations/index.js +23 -0
- package/models/operations/index.js.map +1 -0
- package/package.json +30 -0
- package/sdk/applications.d.ts +18 -0
- package/sdk/applications.d.ts.map +1 -0
- package/sdk/applications.js +33 -0
- package/sdk/applications.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/sdk.d.ts +7 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +15 -0
- package/sdk/sdk.js.map +1 -0
- package/src/core.ts +13 -0
- package/src/funcs/applicationsCreate.ts +128 -0
- package/src/funcs/applicationsGet.ts +132 -0
- package/src/funcs/applicationsList.ts +130 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +110 -0
- package/src/index.ts +7 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +59 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +37 -0
- package/src/lib/files.ts +40 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +322 -0
- package/src/lib/primitives.ts +136 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +400 -0
- package/src/lib/security.ts +227 -0
- package/src/lib/url.ts +33 -0
- package/src/models/components/addressattributes.ts +148 -0
- package/src/models/components/apierrorlinks.ts +65 -0
- package/src/models/components/applicationattributes.ts +128 -0
- package/src/models/components/applicationattributescreate.ts +90 -0
- package/src/models/components/applicationresourcebulksubmission.ts +1000 -0
- package/src/models/components/applicationstatus.ts +39 -0
- package/src/models/components/applicationtype.ts +33 -0
- package/src/models/components/assetattributes.ts +400 -0
- package/src/models/components/customerattributes.ts +171 -0
- package/src/models/components/customertitle.ts +35 -0
- package/src/models/components/errorsource.ts +79 -0
- package/src/models/components/forbiddenerror.ts +207 -0
- package/src/models/components/frequencytype.ts +40 -0
- package/src/models/components/index.ts +20 -0
- package/src/models/components/links.ts +72 -0
- package/src/models/components/loandetailsattributes.ts +187 -0
- package/src/models/components/repaymentstructure.ts +40 -0
- package/src/models/errors/apierror.ts +27 -0
- package/src/models/errors/createapplication.ts +76 -0
- package/src/models/errors/getapplication.ts +76 -0
- package/src/models/errors/getapplications.ts +76 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/sdkvalidationerror.ts +97 -0
- package/src/models/operations/createapplication.ts +1649 -0
- package/src/models/operations/getapplication.ts +1829 -0
- package/src/models/operations/getapplications.ts +1790 -0
- package/src/models/operations/index.ts +7 -0
- package/src/sdk/applications.ts +55 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +13 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.d.ts +3 -0
- package/types/constdatetime.d.ts.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +10 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +16 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +27 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +83 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Supported JavaScript runtimes
|
|
2
|
+
|
|
3
|
+
This SDK is intended to be used in JavaScript runtimes that support the following features:
|
|
4
|
+
|
|
5
|
+
* [Web Fetch API][web-fetch]
|
|
6
|
+
* [Web Streams API][web-streams] and in particular `ReadableStream`
|
|
7
|
+
* [Async iterables][async-iter] using `Symbol.asyncIterator`
|
|
8
|
+
|
|
9
|
+
[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
|
10
|
+
[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
|
|
11
|
+
[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
|
|
12
|
+
|
|
13
|
+
Runtime environments that are explicitly supported are:
|
|
14
|
+
|
|
15
|
+
- Evergreen browsers which include: Chrome, Safari, Edge, Firefox
|
|
16
|
+
- Node.js active and maintenance LTS releases
|
|
17
|
+
- Currently, this is v18 and v20
|
|
18
|
+
- Bun v1 and above
|
|
19
|
+
- Deno v1.39
|
|
20
|
+
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
|
21
|
+
|
|
22
|
+
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
# Applications
|
|
2
|
+
(*applications*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
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
|
+
|
|
12
|
+
## create
|
|
13
|
+
|
|
14
|
+
Create an application in the Financeable platform.
|
|
15
|
+
|
|
16
|
+
### Example Usage
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { Financeable } from "@financeable/aggregation";
|
|
20
|
+
|
|
21
|
+
const financeable = new Financeable();
|
|
22
|
+
|
|
23
|
+
async function run() {
|
|
24
|
+
const result = await financeable.applications.create({
|
|
25
|
+
data: {
|
|
26
|
+
type: "applications",
|
|
27
|
+
attributes: {
|
|
28
|
+
purpose: "Purchase of a motor vehicle",
|
|
29
|
+
applicationType: "consumer",
|
|
30
|
+
},
|
|
31
|
+
relationships: {
|
|
32
|
+
loanDetails: {
|
|
33
|
+
data: {
|
|
34
|
+
type: "loan-details",
|
|
35
|
+
attributes: {
|
|
36
|
+
repayments: 12,
|
|
37
|
+
repaymentFrequency: "monthly",
|
|
38
|
+
repaymentStructure: "group-payments",
|
|
39
|
+
loanAmount: "10280.95",
|
|
40
|
+
purpose: "Purchase of a motor vehicle",
|
|
41
|
+
term: 48,
|
|
42
|
+
balloon: 5,
|
|
43
|
+
deposit: "2500",
|
|
44
|
+
originationFee: 200,
|
|
45
|
+
rate: "0.15",
|
|
46
|
+
rateAdjustment: "-0.01",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
customers: {
|
|
51
|
+
data: [
|
|
52
|
+
{
|
|
53
|
+
id: "<id>",
|
|
54
|
+
type: "customers",
|
|
55
|
+
attributes: {
|
|
56
|
+
title: "Mr",
|
|
57
|
+
firstName: "John",
|
|
58
|
+
lastName: "Smith",
|
|
59
|
+
dateOfBirth: "01-01-1990",
|
|
60
|
+
idExpiryDate: "01-01-2025",
|
|
61
|
+
idType: "licence",
|
|
62
|
+
idNumber: "12345678",
|
|
63
|
+
},
|
|
64
|
+
relationships: {
|
|
65
|
+
addresses: {
|
|
66
|
+
data: [
|
|
67
|
+
{
|
|
68
|
+
id: "<id>",
|
|
69
|
+
type: "addresses",
|
|
70
|
+
attributes: {
|
|
71
|
+
addressType: "residential",
|
|
72
|
+
fullAddress: "42 Wallaby Way, Sydney NSW 2000",
|
|
73
|
+
city: "Sydney",
|
|
74
|
+
postCode: "2000",
|
|
75
|
+
streetAddress: "42 Wallaby Way",
|
|
76
|
+
addressLine2: "",
|
|
77
|
+
streetNumber: "42",
|
|
78
|
+
streetType: "Way",
|
|
79
|
+
street: "Wallaby",
|
|
80
|
+
state: "NSW",
|
|
81
|
+
country: "Australia",
|
|
82
|
+
status: "current",
|
|
83
|
+
monthsAt: 24,
|
|
84
|
+
yearsAt: 2,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
asset: {
|
|
94
|
+
data: {
|
|
95
|
+
id: "<id>",
|
|
96
|
+
type: "asset",
|
|
97
|
+
attributes: {
|
|
98
|
+
ageOfAsset: 3,
|
|
99
|
+
ageOfAssetAtEnd: 8,
|
|
100
|
+
condition: "USED",
|
|
101
|
+
assetType: "MOTOR_VEHICLE_(<4.5_TONNES)",
|
|
102
|
+
purpose: "VEHICLE",
|
|
103
|
+
assetValue: "35000.00",
|
|
104
|
+
make: "Toyota",
|
|
105
|
+
assetModel: "Camry",
|
|
106
|
+
registrationNumber: "ABC123",
|
|
107
|
+
registrationState: "VIC",
|
|
108
|
+
vin: "1HGCM82633A123456",
|
|
109
|
+
supplierName: "Mr and Mrs Smith",
|
|
110
|
+
supplierABN: "12345678901",
|
|
111
|
+
supplierAddress: "123 Car Street, Melbourne VIC 3000",
|
|
112
|
+
supplierPhone: "0412345678",
|
|
113
|
+
supplierContactName: "John Smith",
|
|
114
|
+
supplierEmail: "john.smith@mrandmrssmith.com.au",
|
|
115
|
+
privateSale: false,
|
|
116
|
+
typeOfSale: "DEALER",
|
|
117
|
+
description: "2020 Toyota Camry Hybrid SL, Silver, 45,000km",
|
|
118
|
+
netAssetValue: "32000.00",
|
|
119
|
+
isLuxury: false,
|
|
120
|
+
additionalFees: "995.00",
|
|
121
|
+
additionalTaxes: "0.00",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// Handle the result
|
|
130
|
+
console.log(result);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
run();
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Standalone function
|
|
137
|
+
|
|
138
|
+
The standalone function version of this method:
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { FinanceableCore } from "@financeable/aggregation/core.js";
|
|
142
|
+
import { applicationsCreate } from "@financeable/aggregation/funcs/applicationsCreate.js";
|
|
143
|
+
|
|
144
|
+
// Use `FinanceableCore` for best tree-shaking performance.
|
|
145
|
+
// You can create one instance of it to use across an application.
|
|
146
|
+
const financeable = new FinanceableCore();
|
|
147
|
+
|
|
148
|
+
async function run() {
|
|
149
|
+
const res = await applicationsCreate(financeable, {
|
|
150
|
+
data: {
|
|
151
|
+
type: "applications",
|
|
152
|
+
attributes: {
|
|
153
|
+
purpose: "Purchase of a motor vehicle",
|
|
154
|
+
applicationType: "consumer",
|
|
155
|
+
},
|
|
156
|
+
relationships: {
|
|
157
|
+
loanDetails: {
|
|
158
|
+
data: {
|
|
159
|
+
type: "loan-details",
|
|
160
|
+
attributes: {
|
|
161
|
+
repayments: 12,
|
|
162
|
+
repaymentFrequency: "monthly",
|
|
163
|
+
repaymentStructure: "group-payments",
|
|
164
|
+
loanAmount: "10280.95",
|
|
165
|
+
purpose: "Purchase of a motor vehicle",
|
|
166
|
+
term: 48,
|
|
167
|
+
balloon: 5,
|
|
168
|
+
deposit: "2500",
|
|
169
|
+
originationFee: 200,
|
|
170
|
+
rate: "0.15",
|
|
171
|
+
rateAdjustment: "-0.01",
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
customers: {
|
|
176
|
+
data: [
|
|
177
|
+
{
|
|
178
|
+
id: "<id>",
|
|
179
|
+
type: "customers",
|
|
180
|
+
attributes: {
|
|
181
|
+
title: "Mr",
|
|
182
|
+
firstName: "John",
|
|
183
|
+
lastName: "Smith",
|
|
184
|
+
dateOfBirth: "01-01-1990",
|
|
185
|
+
idExpiryDate: "01-01-2025",
|
|
186
|
+
idType: "licence",
|
|
187
|
+
idNumber: "12345678",
|
|
188
|
+
},
|
|
189
|
+
relationships: {
|
|
190
|
+
addresses: {
|
|
191
|
+
data: [
|
|
192
|
+
{
|
|
193
|
+
id: "<id>",
|
|
194
|
+
type: "addresses",
|
|
195
|
+
attributes: {
|
|
196
|
+
addressType: "residential",
|
|
197
|
+
fullAddress: "42 Wallaby Way, Sydney NSW 2000",
|
|
198
|
+
city: "Sydney",
|
|
199
|
+
postCode: "2000",
|
|
200
|
+
streetAddress: "42 Wallaby Way",
|
|
201
|
+
addressLine2: "",
|
|
202
|
+
streetNumber: "42",
|
|
203
|
+
streetType: "Way",
|
|
204
|
+
street: "Wallaby",
|
|
205
|
+
state: "NSW",
|
|
206
|
+
country: "Australia",
|
|
207
|
+
status: "current",
|
|
208
|
+
monthsAt: 24,
|
|
209
|
+
yearsAt: 2,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
asset: {
|
|
219
|
+
data: {
|
|
220
|
+
id: "<id>",
|
|
221
|
+
type: "asset",
|
|
222
|
+
attributes: {
|
|
223
|
+
ageOfAsset: 3,
|
|
224
|
+
ageOfAssetAtEnd: 8,
|
|
225
|
+
condition: "USED",
|
|
226
|
+
assetType: "MOTOR_VEHICLE_(<4.5_TONNES)",
|
|
227
|
+
purpose: "VEHICLE",
|
|
228
|
+
assetValue: "35000.00",
|
|
229
|
+
make: "Toyota",
|
|
230
|
+
assetModel: "Camry",
|
|
231
|
+
registrationNumber: "ABC123",
|
|
232
|
+
registrationState: "VIC",
|
|
233
|
+
vin: "1HGCM82633A123456",
|
|
234
|
+
supplierName: "Mr and Mrs Smith",
|
|
235
|
+
supplierABN: "12345678901",
|
|
236
|
+
supplierAddress: "123 Car Street, Melbourne VIC 3000",
|
|
237
|
+
supplierPhone: "0412345678",
|
|
238
|
+
supplierContactName: "John Smith",
|
|
239
|
+
supplierEmail: "john.smith@mrandmrssmith.com.au",
|
|
240
|
+
privateSale: false,
|
|
241
|
+
typeOfSale: "DEALER",
|
|
242
|
+
description: "2020 Toyota Camry Hybrid SL, Silver, 45,000km",
|
|
243
|
+
netAssetValue: "32000.00",
|
|
244
|
+
isLuxury: false,
|
|
245
|
+
additionalFees: "995.00",
|
|
246
|
+
additionalTaxes: "0.00",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
if (!res.ok) {
|
|
255
|
+
throw res.error;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const { value: result } = res;
|
|
259
|
+
|
|
260
|
+
// Handle the result
|
|
261
|
+
console.log(result);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
run();
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Parameters
|
|
268
|
+
|
|
269
|
+
| Parameter | Type | Required | Description |
|
|
270
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
271
|
+
| `request` | [components.ApplicationResourceBulkSubmission](../../models/components/applicationresourcebulksubmission.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
272
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
273
|
+
| `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. |
|
|
274
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
275
|
+
|
|
276
|
+
### Response
|
|
277
|
+
|
|
278
|
+
**Promise\<[operations.CreateApplicationResponseBody](../../models/operations/createapplicationresponsebody.md)\>**
|
|
279
|
+
|
|
280
|
+
### Errors
|
|
281
|
+
|
|
282
|
+
| Error Type | Status Code | Content Type |
|
|
283
|
+
| ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
|
284
|
+
| errors.CreateApplicationResponseBody | 403 | application/json |
|
|
285
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
286
|
+
|
|
287
|
+
## list
|
|
288
|
+
|
|
289
|
+
Retrieve a list of applications
|
|
290
|
+
|
|
291
|
+
### Example Usage
|
|
292
|
+
|
|
293
|
+
```typescript
|
|
294
|
+
import { Financeable } from "@financeable/aggregation";
|
|
295
|
+
|
|
296
|
+
const financeable = new Financeable();
|
|
297
|
+
|
|
298
|
+
async function run() {
|
|
299
|
+
const result = await financeable.applications.list({});
|
|
300
|
+
|
|
301
|
+
// Handle the result
|
|
302
|
+
console.log(result);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
run();
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Standalone function
|
|
309
|
+
|
|
310
|
+
The standalone function version of this method:
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
import { FinanceableCore } from "@financeable/aggregation/core.js";
|
|
314
|
+
import { applicationsList } from "@financeable/aggregation/funcs/applicationsList.js";
|
|
315
|
+
|
|
316
|
+
// Use `FinanceableCore` for best tree-shaking performance.
|
|
317
|
+
// You can create one instance of it to use across an application.
|
|
318
|
+
const financeable = new FinanceableCore();
|
|
319
|
+
|
|
320
|
+
async function run() {
|
|
321
|
+
const res = await applicationsList(financeable, {});
|
|
322
|
+
|
|
323
|
+
if (!res.ok) {
|
|
324
|
+
throw res.error;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const { value: result } = res;
|
|
328
|
+
|
|
329
|
+
// Handle the result
|
|
330
|
+
console.log(result);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
run();
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Parameters
|
|
337
|
+
|
|
338
|
+
| Parameter | Type | Required | Description |
|
|
339
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
340
|
+
| `request` | [operations.GetApplicationsRequest](../../models/operations/getapplicationsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
341
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
342
|
+
| `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. |
|
|
343
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
344
|
+
|
|
345
|
+
### Response
|
|
346
|
+
|
|
347
|
+
**Promise\<[operations.GetApplicationsResponseBody](../../models/operations/getapplicationsresponsebody.md)\>**
|
|
348
|
+
|
|
349
|
+
### Errors
|
|
350
|
+
|
|
351
|
+
| Error Type | Status Code | Content Type |
|
|
352
|
+
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
|
353
|
+
| errors.GetApplicationsResponseBody | 403 | application/json |
|
|
354
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
355
|
+
|
|
356
|
+
## get
|
|
357
|
+
|
|
358
|
+
Retrieve an application by its ID
|
|
359
|
+
|
|
360
|
+
### Example Usage
|
|
361
|
+
|
|
362
|
+
```typescript
|
|
363
|
+
import { Financeable } from "@financeable/aggregation";
|
|
364
|
+
|
|
365
|
+
const financeable = new Financeable();
|
|
366
|
+
|
|
367
|
+
async function run() {
|
|
368
|
+
const result = await financeable.applications.get({
|
|
369
|
+
id: "<id>",
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
// Handle the result
|
|
373
|
+
console.log(result);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
run();
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Standalone function
|
|
380
|
+
|
|
381
|
+
The standalone function version of this method:
|
|
382
|
+
|
|
383
|
+
```typescript
|
|
384
|
+
import { FinanceableCore } from "@financeable/aggregation/core.js";
|
|
385
|
+
import { applicationsGet } from "@financeable/aggregation/funcs/applicationsGet.js";
|
|
386
|
+
|
|
387
|
+
// Use `FinanceableCore` for best tree-shaking performance.
|
|
388
|
+
// You can create one instance of it to use across an application.
|
|
389
|
+
const financeable = new FinanceableCore();
|
|
390
|
+
|
|
391
|
+
async function run() {
|
|
392
|
+
const res = await applicationsGet(financeable, {
|
|
393
|
+
id: "<id>",
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
if (!res.ok) {
|
|
397
|
+
throw res.error;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
const { value: result } = res;
|
|
401
|
+
|
|
402
|
+
// Handle the result
|
|
403
|
+
console.log(result);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
run();
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Parameters
|
|
410
|
+
|
|
411
|
+
| Parameter | Type | Required | Description |
|
|
412
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
413
|
+
| `request` | [operations.GetApplicationRequest](../../models/operations/getapplicationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
414
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
415
|
+
| `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. |
|
|
416
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
417
|
+
|
|
418
|
+
### Response
|
|
419
|
+
|
|
420
|
+
**Promise\<[operations.GetApplicationResponseBody](../../models/operations/getapplicationresponsebody.md)\>**
|
|
421
|
+
|
|
422
|
+
### Errors
|
|
423
|
+
|
|
424
|
+
| Error Type | Status Code | Content Type |
|
|
425
|
+
| --------------------------------- | --------------------------------- | --------------------------------- |
|
|
426
|
+
| errors.GetApplicationResponseBody | 403 | application/json |
|
|
427
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK } from "./lib/sdks.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A minimal client to use when calling standalone SDK functions. Typically, an
|
|
9
|
+
* instance of this class would be instantiated once at the start of an
|
|
10
|
+
* application and passed around through some dependency injection mechanism to
|
|
11
|
+
* parts of an application that need to make SDK calls.
|
|
12
|
+
*/
|
|
13
|
+
export class FinanceableCore extends ClientSDK {}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { FinanceableCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import * as components from "../models/components/index.js";
|
|
12
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Create an application in the Financeable platform.
|
|
27
|
+
*/
|
|
28
|
+
export async function applicationsCreate(
|
|
29
|
+
client: FinanceableCore,
|
|
30
|
+
request: components.ApplicationResourceBulkSubmission,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<
|
|
33
|
+
Result<
|
|
34
|
+
operations.CreateApplicationResponseBody,
|
|
35
|
+
| errors.CreateApplicationResponseBody
|
|
36
|
+
| APIError
|
|
37
|
+
| SDKValidationError
|
|
38
|
+
| UnexpectedClientError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
const parsed = safeParse(
|
|
46
|
+
request,
|
|
47
|
+
(value) =>
|
|
48
|
+
components.ApplicationResourceBulkSubmission$outboundSchema.parse(value),
|
|
49
|
+
"Input validation failed",
|
|
50
|
+
);
|
|
51
|
+
if (!parsed.ok) {
|
|
52
|
+
return parsed;
|
|
53
|
+
}
|
|
54
|
+
const payload = parsed.value;
|
|
55
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
56
|
+
|
|
57
|
+
const path = pathToFunc("/applications")();
|
|
58
|
+
|
|
59
|
+
const headers = new Headers({
|
|
60
|
+
"Content-Type": "application/json",
|
|
61
|
+
Accept: "application/json",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const context = {
|
|
65
|
+
operationID: "createApplication",
|
|
66
|
+
oAuth2Scopes: [],
|
|
67
|
+
|
|
68
|
+
resolvedSecurity: null,
|
|
69
|
+
|
|
70
|
+
securitySource: null,
|
|
71
|
+
retryConfig: options?.retries
|
|
72
|
+
|| client._options.retryConfig
|
|
73
|
+
|| { strategy: "none" },
|
|
74
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const requestRes = client._createRequest(context, {
|
|
78
|
+
method: "POST",
|
|
79
|
+
path: path,
|
|
80
|
+
headers: headers,
|
|
81
|
+
body: body,
|
|
82
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
83
|
+
}, options);
|
|
84
|
+
if (!requestRes.ok) {
|
|
85
|
+
return requestRes;
|
|
86
|
+
}
|
|
87
|
+
const req = requestRes.value;
|
|
88
|
+
|
|
89
|
+
const doResult = await client._do(req, {
|
|
90
|
+
context,
|
|
91
|
+
errorCodes: ["403", "4XX", "5XX"],
|
|
92
|
+
retryConfig: context.retryConfig,
|
|
93
|
+
retryCodes: context.retryCodes,
|
|
94
|
+
});
|
|
95
|
+
if (!doResult.ok) {
|
|
96
|
+
return doResult;
|
|
97
|
+
}
|
|
98
|
+
const response = doResult.value;
|
|
99
|
+
|
|
100
|
+
const responseFields = {
|
|
101
|
+
HttpMeta: { Response: response, Request: req },
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const [result] = await M.match<
|
|
105
|
+
operations.CreateApplicationResponseBody,
|
|
106
|
+
| errors.CreateApplicationResponseBody
|
|
107
|
+
| APIError
|
|
108
|
+
| SDKValidationError
|
|
109
|
+
| UnexpectedClientError
|
|
110
|
+
| InvalidRequestError
|
|
111
|
+
| RequestAbortedError
|
|
112
|
+
| RequestTimeoutError
|
|
113
|
+
| ConnectionError
|
|
114
|
+
>(
|
|
115
|
+
M.json(201, operations.CreateApplicationResponseBody$inboundSchema),
|
|
116
|
+
M.jsonErr(403, errors.CreateApplicationResponseBody$inboundSchema),
|
|
117
|
+
M.fail(["4XX", "5XX"]),
|
|
118
|
+
)(response, { extraFields: responseFields });
|
|
119
|
+
if (!result.ok) {
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return result;
|
|
124
|
+
}
|