@financeable/aggregation 0.13.3 → 0.14.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/devcontainer.json +45 -0
- package/FUNCTIONS.md +240 -0
- package/RUNTIMES.md +48 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/examples/applicationsCreate.example.ts +179 -0
- package/examples/package-lock.json +610 -0
- package/examples/package.json +18 -0
- package/hooks/hooks.js +84 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/oauth2scopes.d.ts +13 -0
- package/hooks/oauth2scopes.d.ts.map +1 -0
- package/hooks/oauth2scopes.js +6 -0
- package/hooks/oauth2scopes.js.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.js +48 -0
- package/index.js.map +1 -0
- package/jsr.json +27 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +38 -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.js +379 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.js +82 -0
- package/lib/env.js.map +1 -0
- package/lib/files.d.ts +13 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +77 -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.js +218 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +26 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +111 -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.js +62 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.js +274 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.js +145 -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/abnstatus.d.ts +10 -0
- package/models/components/abnstatus.d.ts.map +1 -0
- package/models/components/abnstatus.js +48 -0
- package/models/components/abnstatus.js.map +1 -0
- package/models/components/addressattributes.js +98 -0
- package/models/components/addressattributes.js.map +1 -0
- package/models/components/apierrorlinks.js +50 -0
- package/models/components/apierrorlinks.js.map +1 -0
- package/models/components/applicationresource.js +57 -0
- package/models/components/applicationresource.js.map +1 -0
- package/models/components/applicationstatus.js +53 -0
- package/models/components/applicationstatus.js.map +1 -0
- package/models/components/australianstatesandterritories.js +55 -0
- package/models/components/australianstatesandterritories.js.map +1 -0
- package/models/components/badrequesterror.js +69 -0
- package/models/components/badrequesterror.js.map +1 -0
- package/models/components/businessapplicationjsonapirelationships.js +126 -0
- package/models/components/businessapplicationjsonapirelationships.js.map +1 -0
- package/models/components/businessapplicationpayload.js +79 -0
- package/models/components/businessapplicationpayload.js.map +1 -0
- package/models/components/businessapplicationresource.js +82 -0
- package/models/components/businessapplicationresource.js.map +1 -0
- package/models/components/businessloanbusinessapplicationrelationships.js +221 -0
- package/models/components/businessloanbusinessapplicationrelationships.js.map +1 -0
- package/models/components/commercialapplicationjsonapirelationships.js +153 -0
- package/models/components/commercialapplicationjsonapirelationships.js.map +1 -0
- package/models/components/commercialsecuredapplicationpayload.js +88 -0
- package/models/components/commercialsecuredapplicationpayload.js.map +1 -0
- package/models/components/commercialsecuredapplicationresource.js +81 -0
- package/models/components/commercialsecuredapplicationresource.js.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.js +223 -0
- package/models/components/commercialsecuredloanassetattributes.js.map +1 -0
- package/models/components/commercialsecuredloanassettype.js +73 -0
- package/models/components/commercialsecuredloanassettype.js.map +1 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +101 -6
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js +309 -0
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -0
- package/models/components/commercialsecuredloantypeofsale.js +53 -0
- package/models/components/commercialsecuredloantypeofsale.js.map +1 -0
- package/models/components/consumerapplicationjsonapirelationships.js +127 -0
- package/models/components/consumerapplicationjsonapirelationships.js.map +1 -0
- package/models/components/consumersecuredapplicationpayload.js +89 -0
- package/models/components/consumersecuredapplicationpayload.js.map +1 -0
- package/models/components/consumersecuredapplicationresource.js +82 -0
- package/models/components/consumersecuredapplicationresource.js.map +1 -0
- package/models/components/consumersecuredloanassetattributes.js +225 -0
- package/models/components/consumersecuredloanassetattributes.js.map +1 -0
- package/models/components/consumersecuredloanassettype.js +61 -0
- package/models/components/consumersecuredloanassettype.js.map +1 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +105 -10
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js +344 -0
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
- package/models/components/consumersecuredloantypeofsale.js +53 -0
- package/models/components/consumersecuredloantypeofsale.js.map +1 -0
- package/models/components/createsupportingdocumentsresponse.js +82 -0
- package/models/components/createsupportingdocumentsresponse.js.map +1 -0
- package/models/components/currencycodeiso4217.js +48 -0
- package/models/components/currencycodeiso4217.js.map +1 -0
- package/models/components/customerassetattributes.js +66 -0
- package/models/components/customerassetattributes.js.map +1 -0
- package/models/components/customerassettype.js +55 -0
- package/models/components/customerassettype.js.map +1 -0
- package/models/components/customerattributes.js +68 -0
- package/models/components/customerattributes.js.map +1 -0
- package/models/components/customerattributescreateitem.js +73 -0
- package/models/components/customerattributescreateitem.js.map +1 -0
- package/models/components/customeridtype.js +47 -0
- package/models/components/customeridtype.js.map +1 -0
- package/models/components/customerliabilityattributes.js +77 -0
- package/models/components/customerliabilityattributes.js.map +1 -0
- package/models/components/customerliabilityrepaymentfrequency.js +50 -0
- package/models/components/customerliabilityrepaymentfrequency.js.map +1 -0
- package/models/components/customerliabilitytype.js +53 -0
- package/models/components/customerliabilitytype.js.map +1 -0
- package/models/components/customertitle.js +51 -0
- package/models/components/customertitle.js.map +1 -0
- package/models/components/documenttype.js +64 -0
- package/models/components/documenttype.js.map +1 -0
- package/models/components/employerattributes.d.ts +58 -0
- package/models/components/employerattributes.d.ts.map +1 -0
- package/models/components/employerattributes.js +69 -0
- package/models/components/employerattributes.js.map +1 -0
- package/models/components/employmentstatus.d.ts +10 -0
- package/models/components/employmentstatus.d.ts.map +1 -0
- package/models/components/employmentstatus.js +47 -0
- package/models/components/employmentstatus.js.map +1 -0
- package/models/components/employmenttype.d.ts +15 -0
- package/models/components/employmenttype.d.ts.map +1 -0
- package/models/components/employmenttype.js +52 -0
- package/models/components/employmenttype.js.map +1 -0
- package/models/components/entityattributes.d.ts +4 -4
- package/models/components/entityattributes.d.ts.map +1 -1
- package/models/components/entityattributes.js +90 -0
- package/models/components/entityattributes.js.map +1 -0
- package/models/components/entityattributesinput.js +55 -0
- package/models/components/entityattributesinput.js.map +1 -0
- package/models/components/entitytype.d.ts +152 -0
- package/models/components/entitytype.d.ts.map +1 -0
- package/models/components/entitytype.js +190 -0
- package/models/components/entitytype.js.map +1 -0
- package/models/components/errorsource.js +52 -0
- package/models/components/errorsource.js.map +1 -0
- package/models/components/expenseattributes.js +55 -0
- package/models/components/expenseattributes.js.map +1 -0
- package/models/components/expensefrequency.js +48 -0
- package/models/components/expensefrequency.js.map +1 -0
- package/models/components/expensetype.js +65 -0
- package/models/components/expensetype.js.map +1 -0
- package/models/components/forbiddenerror.js +74 -0
- package/models/components/forbiddenerror.js.map +1 -0
- package/models/components/frequencytype.js +53 -0
- package/models/components/frequencytype.js.map +1 -0
- package/models/components/incomeattributes.js +55 -0
- package/models/components/incomeattributes.js.map +1 -0
- package/models/components/incomefrequency.js +49 -0
- package/models/components/incomefrequency.js.map +1 -0
- package/models/components/incometype.js +55 -0
- package/models/components/incometype.js.map +1 -0
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +98 -0
- package/models/components/index.js.map +1 -0
- package/models/components/industry.d.ts +27 -0
- package/models/components/industry.d.ts.map +1 -0
- package/models/components/industry.js +65 -0
- package/models/components/industry.js.map +1 -0
- package/models/components/linkobject.js +66 -0
- package/models/components/linkobject.js.map +1 -0
- package/models/components/livingarrangements.js +51 -0
- package/models/components/livingarrangements.js.map +1 -0
- package/models/components/loandetailsattributes.js +256 -0
- package/models/components/loandetailsattributes.js.map +1 -0
- package/models/components/maritalstatus.js +49 -0
- package/models/components/maritalstatus.js.map +1 -0
- package/models/components/monetaryquantity.js +71 -0
- package/models/components/monetaryquantity.js.map +1 -0
- package/models/components/occupation.d.ts +201 -0
- package/models/components/occupation.d.ts.map +1 -0
- package/models/components/occupation.js +239 -0
- package/models/components/occupation.js.map +1 -0
- package/models/components/paginationlinks.js +53 -0
- package/models/components/paginationlinks.js.map +1 -0
- package/models/components/paginationmeta.js +60 -0
- package/models/components/paginationmeta.js.map +1 -0
- package/models/components/percentagequantity.js +67 -0
- package/models/components/percentagequantity.js.map +1 -0
- package/models/components/personalapplicationjsonapirelationships.js +101 -0
- package/models/components/personalapplicationjsonapirelationships.js.map +1 -0
- package/models/components/personalapplicationpayload.js +79 -0
- package/models/components/personalapplicationpayload.js.map +1 -0
- package/models/components/personalapplicationresource.js +82 -0
- package/models/components/personalapplicationresource.js.map +1 -0
- package/models/components/personalloanpersonalapplicationrelationships.d.ts +105 -10
- package/models/components/personalloanpersonalapplicationrelationships.d.ts.map +1 -1
- package/models/components/personalloanpersonalapplicationrelationships.js +311 -0
- package/models/components/personalloanpersonalapplicationrelationships.js.map +1 -0
- package/models/components/relationshipresourcenotfound.js +74 -0
- package/models/components/relationshipresourcenotfound.js.map +1 -0
- package/models/components/repaymentstructure.js +53 -0
- package/models/components/repaymentstructure.js.map +1 -0
- package/models/components/residencystatus.js +52 -0
- package/models/components/residencystatus.js.map +1 -0
- package/models/components/resourcenotfound.js +74 -0
- package/models/components/resourcenotfound.js.map +1 -0
- package/models/components/security.js +49 -0
- package/models/components/security.js.map +1 -0
- package/models/components/supportingdocumentattributes.js +53 -0
- package/models/components/supportingdocumentattributes.js.map +1 -0
- package/models/components/supportingdocumentattributesinput.js +51 -0
- package/models/components/supportingdocumentattributesinput.js.map +1 -0
- package/models/components/supportingdocumentrelationships.js +269 -0
- package/models/components/supportingdocumentrelationships.js.map +1 -0
- package/models/components/supportingdocumentresource.js +61 -0
- package/models/components/supportingdocumentresource.js.map +1 -0
- package/models/components/tokenrequest.js +68 -0
- package/models/components/tokenrequest.js.map +1 -0
- package/models/components/tokenresponse.js +60 -0
- package/models/components/tokenresponse.js.map +1 -0
- package/models/components/uploadmimetype.js +55 -0
- package/models/components/uploadmimetype.js.map +1 -0
- package/models/errors/apierror.d.ts +10 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +34 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/financeableerror.d.ts +19 -0
- package/models/errors/financeableerror.d.ts.map +1 -0
- package/models/errors/financeableerror.js +20 -0
- package/models/errors/financeableerror.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.js +25 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/responsevalidationerror.js +66 -0
- package/models/errors/responsevalidationerror.js.map +1 -0
- package/models/errors/sdkvalidationerror.js +129 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/operations/createapplication.js +278 -0
- package/models/operations/createapplication.js.map +1 -0
- package/models/operations/getapplication.js +256 -0
- package/models/operations/getapplication.js.map +1 -0
- package/models/operations/index.js +24 -0
- package/models/operations/index.js.map +1 -0
- package/models/operations/listapplications.js +94 -0
- package/models/operations/listapplications.js.map +1 -0
- package/models/operations/supportingdocumentscreate.js +133 -0
- package/models/operations/supportingdocumentscreate.js.map +1 -0
- package/package.json +1 -16
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/sdk.js +23 -0
- package/sdk/sdk.js.map +1 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/abnstatus.ts +16 -0
- package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +241 -13
- package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +275 -19
- package/src/models/components/employerattributes.ts +97 -0
- package/src/models/components/employmentstatus.ts +17 -0
- package/src/models/components/employmenttype.ts +22 -0
- package/src/models/components/entityattributes.ts +9 -6
- package/src/models/components/entitytype.ts +215 -0
- package/src/models/components/index.ts +7 -0
- package/src/models/components/industry.ts +36 -0
- package/src/models/components/occupation.ts +226 -0
- package/src/models/components/personalloanpersonalapplicationrelationships.ts +272 -20
- package/tsconfig.json +40 -0
- package/types/async.d.ts +23 -0
- package/types/async.d.ts.map +1 -0
- package/types/async.js +44 -0
- package/types/async.js.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.js +66 -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.js +29 -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
- package/types/unrecognized.d.ts +16 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +34 -0
- package/types/unrecognized.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenresponse.js","sourceRoot":"","sources":["../../src/models/components/tokenresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDH,sDAQC;AAtDD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AA0BjD,gBAAgB;AACH,QAAA,2BAA2B,GAIpC,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,aAAa;QAC7B,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,qBAAqB,CACnC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvD,2CAA2C,CAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.UploadMimetype$outboundSchema = exports.UploadMimetype = void 0;
|
|
40
|
+
const z = __importStar(require("zod/v3"));
|
|
41
|
+
/**
|
|
42
|
+
* The MIME type of the document
|
|
43
|
+
*/
|
|
44
|
+
exports.UploadMimetype = {
|
|
45
|
+
ApplicationPdf: "application/pdf",
|
|
46
|
+
ImagePng: "image/png",
|
|
47
|
+
ImageJpeg: "image/jpeg",
|
|
48
|
+
TextPlain: "text/plain",
|
|
49
|
+
TextCsv: "text/csv",
|
|
50
|
+
TextJson: "text/json",
|
|
51
|
+
TextHtml: "text/html",
|
|
52
|
+
};
|
|
53
|
+
/** @internal */
|
|
54
|
+
exports.UploadMimetype$outboundSchema = z.nativeEnum(exports.UploadMimetype);
|
|
55
|
+
//# sourceMappingURL=uploadmimetype.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadmimetype.js","sourceRoot":"","sources":["../../src/models/components/uploadmimetype.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAG5B;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,cAAc,EAAE,iBAAiB;IACjC,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,WAAW;CACb,CAAC;AAMX,gBAAgB;AACH,QAAA,6BAA6B,GAEtC,CAAC,CAAC,UAAU,CAAC,sBAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FinanceableError } from "./financeableerror.js";
|
|
2
|
+
/** The fallback error class if no more specific error class is matched */
|
|
3
|
+
export declare class APIError extends FinanceableError {
|
|
4
|
+
constructor(message: string, httpMeta: {
|
|
5
|
+
response: Response;
|
|
6
|
+
request: Request;
|
|
7
|
+
body: string;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=apierror.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apierror.d.ts","sourceRoot":"","sources":["../../src/models/errors/apierror.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,0EAA0E;AAC1E,qBAAa,QAAS,SAAQ,gBAAgB;gBAE1C,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE;QACR,QAAQ,EAAE,QAAQ,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd;CAyBJ"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.APIError = void 0;
|
|
7
|
+
const financeableerror_js_1 = require("./financeableerror.js");
|
|
8
|
+
/** The fallback error class if no more specific error class is matched */
|
|
9
|
+
class APIError extends financeableerror_js_1.FinanceableError {
|
|
10
|
+
constructor(message, httpMeta) {
|
|
11
|
+
if (message) {
|
|
12
|
+
message += `: `;
|
|
13
|
+
}
|
|
14
|
+
message += `Status ${httpMeta.response.status}`;
|
|
15
|
+
const contentType = httpMeta.response.headers.get("content-type") || `""`;
|
|
16
|
+
if (contentType !== "application/json") {
|
|
17
|
+
message += ` Content-Type ${contentType.includes(" ") ? `"${contentType}"` : contentType}`;
|
|
18
|
+
}
|
|
19
|
+
const body = httpMeta.body || `""`;
|
|
20
|
+
message += body.length > 100 ? "\n" : ". ";
|
|
21
|
+
let bodyDisplay = body;
|
|
22
|
+
if (body.length > 10000) {
|
|
23
|
+
const truncated = body.substring(0, 10000);
|
|
24
|
+
const remaining = body.length - 10000;
|
|
25
|
+
bodyDisplay = `${truncated}...and ${remaining} more chars`;
|
|
26
|
+
}
|
|
27
|
+
message += `Body: ${bodyDisplay}`;
|
|
28
|
+
message = message.trim();
|
|
29
|
+
super(message, httpMeta);
|
|
30
|
+
this.name = "APIError";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.APIError = APIError;
|
|
34
|
+
//# sourceMappingURL=apierror.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apierror.js","sourceRoot":"","sources":["../../src/models/errors/apierror.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,+DAAyD;AAEzD,0EAA0E;AAC1E,MAAa,QAAS,SAAQ,sCAAgB;IAC5C,YACE,OAAe,EACf,QAIC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,IAAI,IAAI,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,UAAU,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAChD,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC;QAC1E,IAAI,WAAW,KAAK,kBAAkB,EAAE,CAAC;YACvC,OAAO,IAAI,iBACT,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,WACnD,EAAE,CAAC;QACL,CAAC;QACD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC;QACnC,OAAO,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3C,IAAI,WAAW,GAAG,IAAI,CAAC;QACvB,IAAI,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;YACxB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACtC,WAAW,GAAG,GAAG,SAAS,UAAU,SAAS,aAAa,CAAC;QAC7D,CAAC;QACD,OAAO,IAAI,SAAS,WAAW,EAAE,CAAC;QAClC,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QACzB,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAhCD,4BAgCC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** The base class for all HTTP error responses */
|
|
2
|
+
export declare class FinanceableError extends Error {
|
|
3
|
+
/** HTTP status code */
|
|
4
|
+
readonly statusCode: number;
|
|
5
|
+
/** HTTP body */
|
|
6
|
+
readonly body: string;
|
|
7
|
+
/** HTTP headers */
|
|
8
|
+
readonly headers: Headers;
|
|
9
|
+
/** HTTP content type */
|
|
10
|
+
readonly contentType: string;
|
|
11
|
+
/** Raw response */
|
|
12
|
+
readonly rawResponse: Response;
|
|
13
|
+
constructor(message: string, httpMeta: {
|
|
14
|
+
response: Response;
|
|
15
|
+
request: Request;
|
|
16
|
+
body: string;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=financeableerror.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financeableerror.d.ts","sourceRoot":"","sources":["../../src/models/errors/financeableerror.ts"],"names":[],"mappings":"AAIA,kDAAkD;AAClD,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,uBAAuB;IACvB,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,gBAAgB;IAChB,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,mBAAmB;IACnB,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,wBAAwB;IACxB,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,mBAAmB;IACnB,SAAgB,WAAW,EAAE,QAAQ,CAAC;gBAGpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE;QACR,QAAQ,EAAE,QAAQ,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd;CAWJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FinanceableError = void 0;
|
|
7
|
+
/** The base class for all HTTP error responses */
|
|
8
|
+
class FinanceableError extends Error {
|
|
9
|
+
constructor(message, httpMeta) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.statusCode = httpMeta.response.status;
|
|
12
|
+
this.body = httpMeta.body;
|
|
13
|
+
this.headers = httpMeta.response.headers;
|
|
14
|
+
this.contentType = httpMeta.response.headers.get("content-type") || "";
|
|
15
|
+
this.rawResponse = httpMeta.response;
|
|
16
|
+
this.name = "FinanceableError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.FinanceableError = FinanceableError;
|
|
20
|
+
//# sourceMappingURL=financeableerror.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financeableerror.js","sourceRoot":"","sources":["../../src/models/errors/financeableerror.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAkD;AAClD,MAAa,gBAAiB,SAAQ,KAAK;IAYzC,YACE,OAAe,EACf,QAIC;QAED,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QACvE,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC;QAErC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AA7BD,4CA6BC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for all HTTP errors.
|
|
3
|
+
*/
|
|
4
|
+
export declare class HTTPClientError extends Error {
|
|
5
|
+
/** The underlying cause of the error. */
|
|
6
|
+
readonly cause: unknown;
|
|
7
|
+
name: string;
|
|
8
|
+
constructor(message: string, opts?: {
|
|
9
|
+
cause?: unknown;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
14
|
+
*/
|
|
15
|
+
export declare class UnexpectedClientError extends HTTPClientError {
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
20
|
+
*/
|
|
21
|
+
export declare class InvalidRequestError extends HTTPClientError {
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
26
|
+
*/
|
|
27
|
+
export declare class RequestAbortedError extends HTTPClientError {
|
|
28
|
+
readonly name = "RequestAbortedError";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
32
|
+
* signal timeout.
|
|
33
|
+
*/
|
|
34
|
+
export declare class RequestTimeoutError extends HTTPClientError {
|
|
35
|
+
readonly name = "RequestTimeoutError";
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
39
|
+
* a server.
|
|
40
|
+
*/
|
|
41
|
+
export declare class ConnectionError extends HTTPClientError {
|
|
42
|
+
readonly name = "ConnectionError";
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=httpclienterrors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpclienterrors.d.ts","sourceRoot":"","sources":["../../src/models/errors/httpclienterrors.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,yCAAyC;IACzC,SAAkB,KAAK,EAAE,OAAO,CAAC;IACxB,IAAI,SAAqB;gBACtB,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAaxD;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IAC/C,IAAI,SAA2B;CACzC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IAC7C,IAAI,SAAyB;CACvC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,SAAkB,IAAI,yBAAyB;CAChD;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,SAAkB,IAAI,yBAAyB;CAChD;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,eAAe;IAClD,SAAkB,IAAI,qBAAqB;CAC5C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ConnectionError = exports.RequestTimeoutError = exports.RequestAbortedError = exports.InvalidRequestError = exports.UnexpectedClientError = exports.HTTPClientError = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Base class for all HTTP errors.
|
|
9
|
+
*/
|
|
10
|
+
class HTTPClientError extends Error {
|
|
11
|
+
constructor(message, opts) {
|
|
12
|
+
let msg = message;
|
|
13
|
+
if (opts?.cause) {
|
|
14
|
+
msg += `: ${opts.cause}`;
|
|
15
|
+
}
|
|
16
|
+
super(msg, opts);
|
|
17
|
+
this.name = "HTTPClientError";
|
|
18
|
+
// In older runtimes, the cause field would not have been assigned through
|
|
19
|
+
// the super() call.
|
|
20
|
+
if (typeof this.cause === "undefined") {
|
|
21
|
+
this.cause = opts?.cause;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.HTTPClientError = HTTPClientError;
|
|
26
|
+
/**
|
|
27
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
28
|
+
*/
|
|
29
|
+
class UnexpectedClientError extends HTTPClientError {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this.name = "UnexpectedClientError";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.UnexpectedClientError = UnexpectedClientError;
|
|
36
|
+
/**
|
|
37
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
38
|
+
*/
|
|
39
|
+
class InvalidRequestError extends HTTPClientError {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.name = "InvalidRequestError";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.InvalidRequestError = InvalidRequestError;
|
|
46
|
+
/**
|
|
47
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
48
|
+
*/
|
|
49
|
+
class RequestAbortedError extends HTTPClientError {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments);
|
|
52
|
+
this.name = "RequestAbortedError";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.RequestAbortedError = RequestAbortedError;
|
|
56
|
+
/**
|
|
57
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
58
|
+
* signal timeout.
|
|
59
|
+
*/
|
|
60
|
+
class RequestTimeoutError extends HTTPClientError {
|
|
61
|
+
constructor() {
|
|
62
|
+
super(...arguments);
|
|
63
|
+
this.name = "RequestTimeoutError";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.RequestTimeoutError = RequestTimeoutError;
|
|
67
|
+
/**
|
|
68
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
69
|
+
* a server.
|
|
70
|
+
*/
|
|
71
|
+
class ConnectionError extends HTTPClientError {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments);
|
|
74
|
+
this.name = "ConnectionError";
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.ConnectionError = ConnectionError;
|
|
78
|
+
//# sourceMappingURL=httpclienterrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpclienterrors.js","sourceRoot":"","sources":["../../src/models/errors/httpclienterrors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,MAAa,eAAgB,SAAQ,KAAK;IAIxC,YAAY,OAAe,EAAE,IAA0B;QACrD,IAAI,GAAG,GAAG,OAAO,CAAC;QAClB,IAAI,IAAI,EAAE,KAAK,EAAE,CAAC;YAChB,GAAG,IAAI,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3B,CAAC;QAED,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAPV,SAAI,GAAG,iBAAiB,CAAC;QAQhC,0EAA0E;QAC1E,oBAAoB;QACpB,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,WAAW,EAAE,CAAC;YACtC,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AAjBD,0CAiBC;AAED;;GAEG;AACH,MAAa,qBAAsB,SAAQ,eAAe;IAA1D;;QACW,SAAI,GAAG,uBAAuB,CAAC;IAC1C,CAAC;CAAA;AAFD,sDAEC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ,eAAe;IAAxD;;QACW,SAAI,GAAG,qBAAqB,CAAC;IACxC,CAAC;CAAA;AAFD,kDAEC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ,eAAe;IAAxD;;QACoB,SAAI,GAAG,qBAAqB,CAAC;IACjD,CAAC;CAAA;AAFD,kDAEC;AAED;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,eAAe;IAAxD;;QACoB,SAAI,GAAG,qBAAqB,CAAC;IACjD,CAAC;CAAA;AAFD,kDAEC;AAED;;;GAGG;AACH,MAAa,eAAgB,SAAQ,eAAe;IAApD;;QACoB,SAAI,GAAG,iBAAiB,CAAC;IAC7C,CAAC;CAAA;AAFD,0CAEC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./apierror.js"), exports);
|
|
21
|
+
__exportStar(require("./financeableerror.js"), exports);
|
|
22
|
+
__exportStar(require("./httpclienterrors.js"), exports);
|
|
23
|
+
__exportStar(require("./responsevalidationerror.js"), exports);
|
|
24
|
+
__exportStar(require("./sdkvalidationerror.js"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/errors/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,wDAAsC;AACtC,wDAAsC;AACtC,+DAA6C;AAC7C,0DAAwC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ResponseValidationError = void 0;
|
|
40
|
+
const z = __importStar(require("zod/v3"));
|
|
41
|
+
const financeableerror_js_1 = require("./financeableerror.js");
|
|
42
|
+
const sdkvalidationerror_js_1 = require("./sdkvalidationerror.js");
|
|
43
|
+
class ResponseValidationError extends financeableerror_js_1.FinanceableError {
|
|
44
|
+
constructor(message, extra) {
|
|
45
|
+
super(message, extra);
|
|
46
|
+
this.name = "ResponseValidationError";
|
|
47
|
+
this.cause = extra.cause;
|
|
48
|
+
this.rawValue = extra.rawValue;
|
|
49
|
+
this.rawMessage = extra.rawMessage;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
53
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
54
|
+
* default error message.
|
|
55
|
+
*/
|
|
56
|
+
pretty() {
|
|
57
|
+
if (this.cause instanceof z.ZodError) {
|
|
58
|
+
return `${this.rawMessage}\n${(0, sdkvalidationerror_js_1.formatZodError)(this.cause)}`;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return this.toString();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.ResponseValidationError = ResponseValidationError;
|
|
66
|
+
//# sourceMappingURL=responsevalidationerror.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsevalidationerror.js","sourceRoot":"","sources":["../../src/models/errors/responsevalidationerror.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAC5B,+DAAyD;AACzD,mEAAyD;AAEzD,MAAa,uBAAwB,SAAQ,sCAAgB;IAW3D,YACE,OAAe,EACf,KAOC;QAED,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACI,MAAM;QACX,IAAI,IAAI,CAAC,KAAK,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;YACrC,OAAO,GAAG,IAAI,CAAC,UAAU,KAAK,IAAA,sCAAc,EAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;CACF;AAzCD,0DAyCC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.SDKValidationError = void 0;
|
|
40
|
+
exports.formatZodError = formatZodError;
|
|
41
|
+
const z = __importStar(require("zod/v3"));
|
|
42
|
+
class SDKValidationError extends Error {
|
|
43
|
+
// Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError`
|
|
44
|
+
static [Symbol.hasInstance](instance) {
|
|
45
|
+
if (!(instance instanceof Error))
|
|
46
|
+
return false;
|
|
47
|
+
if (!("rawValue" in instance))
|
|
48
|
+
return false;
|
|
49
|
+
if (!("rawMessage" in instance))
|
|
50
|
+
return false;
|
|
51
|
+
if (!("pretty" in instance))
|
|
52
|
+
return false;
|
|
53
|
+
if (typeof instance.pretty !== "function")
|
|
54
|
+
return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
constructor(message, cause, rawValue) {
|
|
58
|
+
super(`${message}: ${cause}`);
|
|
59
|
+
this.name = "SDKValidationError";
|
|
60
|
+
this.cause = cause;
|
|
61
|
+
this.rawValue = rawValue;
|
|
62
|
+
this.rawMessage = message;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
66
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
67
|
+
* default error message.
|
|
68
|
+
*/
|
|
69
|
+
pretty() {
|
|
70
|
+
if (this.cause instanceof z.ZodError) {
|
|
71
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return this.toString();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.SDKValidationError = SDKValidationError;
|
|
79
|
+
function formatZodError(err, level = 0) {
|
|
80
|
+
let pre = " ".repeat(level);
|
|
81
|
+
pre = level > 0 ? `│${pre}` : pre;
|
|
82
|
+
pre += " ".repeat(level);
|
|
83
|
+
let message = "";
|
|
84
|
+
const append = (str) => (message += `\n${pre}${str}`);
|
|
85
|
+
const len = err.issues.length;
|
|
86
|
+
const headline = len === 1 ? `${len} issue found` : `${len} issues found`;
|
|
87
|
+
if (len) {
|
|
88
|
+
append(`┌ ${headline}:`);
|
|
89
|
+
}
|
|
90
|
+
for (const issue of err.issues) {
|
|
91
|
+
let path = issue.path.join(".");
|
|
92
|
+
path = path ? `<root>.${path}` : "<root>";
|
|
93
|
+
append(`│ • [${path}]: ${issue.message} (${issue.code})`);
|
|
94
|
+
switch (issue.code) {
|
|
95
|
+
case "invalid_literal":
|
|
96
|
+
case "invalid_type": {
|
|
97
|
+
append(`│ Want: ${issue.expected}`);
|
|
98
|
+
append(`│ Got: ${issue.received}`);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case "unrecognized_keys": {
|
|
102
|
+
append(`│ Keys: ${issue.keys.join(", ")}`);
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
case "invalid_enum_value": {
|
|
106
|
+
append(`│ Allowed: ${issue.options.join(", ")}`);
|
|
107
|
+
append(`│ Got: ${issue.received}`);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
case "invalid_union_discriminator": {
|
|
111
|
+
append(`│ Allowed: ${issue.options.join(", ")}`);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case "invalid_union": {
|
|
115
|
+
const len = issue.unionErrors.length;
|
|
116
|
+
append(`│ ✖︎ Attemped to deserialize into one of ${len} union members:`);
|
|
117
|
+
issue.unionErrors.forEach((err, i) => {
|
|
118
|
+
append(`│ ✖︎ Member ${i + 1} of ${len}`);
|
|
119
|
+
append(`${formatZodError(err, level + 1)}`);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (err.issues.length) {
|
|
125
|
+
append(`└─*`);
|
|
126
|
+
}
|
|
127
|
+
return message.slice(1);
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=sdkvalidationerror.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkvalidationerror.js","sourceRoot":"","sources":["../../src/models/errors/sdkvalidationerror.ts"],"names":[],"mappings":"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"}
|