@apideck/unify 0.11.5 → 0.12.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/README.md +27 -15
- package/docs/sdks/agedcreditors/README.md +113 -0
- package/docs/sdks/ageddebtors/README.md +113 -0
- package/funcs/accountingAgedCreditorsGet.d.ts +16 -0
- package/funcs/accountingAgedCreditorsGet.d.ts.map +1 -0
- package/funcs/accountingAgedCreditorsGet.js +121 -0
- package/funcs/accountingAgedCreditorsGet.js.map +1 -0
- package/funcs/accountingAgedDebtorsGet.d.ts +16 -0
- package/funcs/accountingAgedDebtorsGet.d.ts.map +1 -0
- package/funcs/accountingAgedDebtorsGet.js +121 -0
- package/funcs/accountingAgedDebtorsGet.js.map +1 -0
- package/funcs/accountingAttachmentsDownload.d.ts +1 -1
- package/funcs/accountingAttachmentsDownload.d.ts.map +1 -1
- package/funcs/accountingAttachmentsDownload.js +1 -1
- package/funcs/accountingAttachmentsDownload.js.map +1 -1
- package/funcs/fileStorageFilesDownload.d.ts +1 -1
- package/funcs/fileStorageFilesDownload.d.ts.map +1 -1
- package/funcs/fileStorageFilesDownload.js +1 -1
- package/funcs/fileStorageFilesDownload.js.map +1 -1
- package/funcs/fileStorageFilesExport.d.ts +1 -1
- package/funcs/fileStorageFilesExport.d.ts.map +1 -1
- package/funcs/fileStorageFilesExport.js +1 -1
- package/funcs/fileStorageFilesExport.js.map +1 -1
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/agedcreditors.d.ts +51 -0
- package/models/components/agedcreditors.d.ts.map +1 -0
- package/models/components/agedcreditors.js +86 -0
- package/models/components/agedcreditors.js.map +1 -0
- package/models/components/ageddebtors.d.ts +51 -0
- package/models/components/ageddebtors.d.ts.map +1 -0
- package/models/components/ageddebtors.js +86 -0
- package/models/components/ageddebtors.js.map +1 -0
- package/models/components/agedreportfilter.d.ts +47 -0
- package/models/components/agedreportfilter.d.ts.map +1 -0
- package/models/components/agedreportfilter.js +80 -0
- package/models/components/agedreportfilter.js.map +1 -0
- package/models/components/balancebyperiod.d.ts +46 -0
- package/models/components/balancebyperiod.d.ts.map +1 -0
- package/models/components/balancebyperiod.js +84 -0
- package/models/components/balancebyperiod.js.map +1 -0
- package/models/components/balancebytransaction.d.ts +99 -0
- package/models/components/balancebytransaction.d.ts.map +1 -0
- package/models/components/balancebytransaction.js +115 -0
- package/models/components/balancebytransaction.js.map +1 -0
- package/models/components/getagedcreditorsresponse.d.ts +58 -0
- package/models/components/getagedcreditorsresponse.d.ts.map +1 -0
- package/models/components/getagedcreditorsresponse.js +79 -0
- package/models/components/getagedcreditorsresponse.js.map +1 -0
- package/models/components/getageddebtorsresponse.d.ts +58 -0
- package/models/components/getageddebtorsresponse.d.ts.map +1 -0
- package/models/components/getageddebtorsresponse.js +79 -0
- package/models/components/getageddebtorsresponse.js.map +1 -0
- package/models/components/index.d.ts +9 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -0
- package/models/components/index.js.map +1 -1
- package/models/components/outstandingbalance.d.ts +40 -0
- package/models/components/outstandingbalance.d.ts.map +1 -0
- package/models/components/outstandingbalance.js +77 -0
- package/models/components/outstandingbalance.js.map +1 -0
- package/models/components/outstandingbalancebycurrency.d.ts +36 -0
- package/models/components/outstandingbalancebycurrency.d.ts.map +1 -0
- package/models/components/outstandingbalancebycurrency.js +72 -0
- package/models/components/outstandingbalancebycurrency.js.map +1 -0
- package/models/operations/accountingagedcreditorsone.d.ts +125 -0
- package/models/operations/accountingagedcreditorsone.d.ts.map +1 -0
- package/models/operations/accountingagedcreditorsone.js +153 -0
- package/models/operations/accountingagedcreditorsone.js.map +1 -0
- package/models/operations/accountingageddebtorsone.d.ts +125 -0
- package/models/operations/accountingageddebtorsone.d.ts.map +1 -0
- package/models/operations/accountingageddebtorsone.js +153 -0
- package/models/operations/accountingageddebtorsone.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -3
- package/sdk/accounting.d.ts +6 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +10 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/agedcreditors.d.ts +12 -0
- package/sdk/agedcreditors.d.ts.map +1 -0
- package/sdk/agedcreditors.js +22 -0
- package/sdk/agedcreditors.js.map +1 -0
- package/sdk/ageddebtors.d.ts +12 -0
- package/sdk/ageddebtors.d.ts.map +1 -0
- package/sdk/ageddebtors.js +22 -0
- package/sdk/ageddebtors.js.map +1 -0
- package/src/funcs/accountingAgedCreditorsGet.ts +192 -0
- package/src/funcs/accountingAgedDebtorsGet.ts +192 -0
- package/src/funcs/accountingAttachmentsDownload.ts +1 -1
- package/src/funcs/fileStorageFilesDownload.ts +1 -1
- package/src/funcs/fileStorageFilesExport.ts +1 -1
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +7 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/agedcreditors.ts +116 -0
- package/src/models/components/ageddebtors.ts +116 -0
- package/src/models/components/agedreportfilter.ts +105 -0
- package/src/models/components/balancebyperiod.ts +109 -0
- package/src/models/components/balancebytransaction.ts +162 -0
- package/src/models/components/getagedcreditorsresponse.ts +119 -0
- package/src/models/components/getageddebtorsresponse.ts +119 -0
- package/src/models/components/index.ts +9 -0
- package/src/models/components/outstandingbalance.ts +107 -0
- package/src/models/components/outstandingbalancebycurrency.ts +95 -0
- package/src/models/operations/accountingagedcreditorsone.ts +277 -0
- package/src/models/operations/accountingageddebtorsone.ts +273 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/accounting.ts +12 -0
- package/src/sdk/agedcreditors.ts +27 -0
- package/src/sdk/ageddebtors.ts +27 -0
package/README.md
CHANGED
|
@@ -130,6 +130,14 @@ run();
|
|
|
130
130
|
### [accounting](docs/sdks/accounting/README.md)
|
|
131
131
|
|
|
132
132
|
|
|
133
|
+
#### [accounting.agedCreditors](docs/sdks/agedcreditors/README.md)
|
|
134
|
+
|
|
135
|
+
* [get](docs/sdks/agedcreditors/README.md#get) - Get Aged Creditors
|
|
136
|
+
|
|
137
|
+
#### [accounting.agedDebtors](docs/sdks/ageddebtors/README.md)
|
|
138
|
+
|
|
139
|
+
* [get](docs/sdks/ageddebtors/README.md#get) - Get Aged Debtors
|
|
140
|
+
|
|
133
141
|
#### [accounting.attachments](docs/sdks/attachments/README.md)
|
|
134
142
|
|
|
135
143
|
* [list](docs/sdks/attachments/README.md#list) - List Attachments
|
|
@@ -663,6 +671,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
663
671
|
|
|
664
672
|
<summary>Available standalone functions</summary>
|
|
665
673
|
|
|
674
|
+
- [`accountingAgedCreditorsGet`](docs/sdks/agedcreditors/README.md#get) - Get Aged Creditors
|
|
675
|
+
- [`accountingAgedDebtorsGet`](docs/sdks/ageddebtors/README.md#get) - Get Aged Debtors
|
|
666
676
|
- [`accountingAttachmentsDelete`](docs/sdks/attachments/README.md#delete) - Delete Attachment
|
|
667
677
|
- [`accountingAttachmentsDownload`](docs/sdks/attachments/README.md#download) - Download Attachment
|
|
668
678
|
- [`accountingAttachmentsGet`](docs/sdks/attachments/README.md#get) - Get Attachment
|
|
@@ -1027,19 +1037,7 @@ run();
|
|
|
1027
1037
|
<!-- Start Error Handling [errors] -->
|
|
1028
1038
|
## Error Handling
|
|
1029
1039
|
|
|
1030
|
-
All
|
|
1031
|
-
|
|
1032
|
-
If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:
|
|
1033
|
-
|
|
1034
|
-
| HTTP Client Error | Description |
|
|
1035
|
-
| ---------------------------------------------------- | ---------------------------------------------------- |
|
|
1036
|
-
| RequestAbortedError | HTTP request was aborted by the client |
|
|
1037
|
-
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
|
|
1038
|
-
| ConnectionError | HTTP client was unable to make a request to a server |
|
|
1039
|
-
| InvalidRequestError | Any input used to create a request is invalid |
|
|
1040
|
-
| UnexpectedClientError | Unrecognised or unexpected error |
|
|
1041
|
-
|
|
1042
|
-
In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `list` method may throw the following errors:
|
|
1040
|
+
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `list` method may throw the following errors:
|
|
1043
1041
|
|
|
1044
1042
|
| Error Type | Status Code | Content Type |
|
|
1045
1043
|
| ------------------------------ | ----------- | ---------------- |
|
|
@@ -1050,6 +1048,8 @@ In addition, when custom error responses are specified for an operation, the SDK
|
|
|
1050
1048
|
| errors.UnprocessableResponse | 422 | application/json |
|
|
1051
1049
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
1052
1050
|
|
|
1051
|
+
If the method throws an error and it is not captured by the known errors, it will default to throwing a `APIError`.
|
|
1052
|
+
|
|
1053
1053
|
```typescript
|
|
1054
1054
|
import { Apideck } from "@apideck/unify";
|
|
1055
1055
|
import {
|
|
@@ -1089,8 +1089,9 @@ async function run() {
|
|
|
1089
1089
|
console.log(result);
|
|
1090
1090
|
} catch (err) {
|
|
1091
1091
|
switch (true) {
|
|
1092
|
+
// The server response does not match the expected SDK schema
|
|
1092
1093
|
case (err instanceof SDKValidationError): {
|
|
1093
|
-
//
|
|
1094
|
+
// Pretty-print will provide a human-readable multi-line error message
|
|
1094
1095
|
console.error(err.pretty());
|
|
1095
1096
|
// Raw value may also be inspected
|
|
1096
1097
|
console.error(err.rawValue);
|
|
@@ -1122,6 +1123,7 @@ async function run() {
|
|
|
1122
1123
|
return;
|
|
1123
1124
|
}
|
|
1124
1125
|
default: {
|
|
1126
|
+
// Other errors such as network errors, see HTTPClientErrors for more details
|
|
1125
1127
|
throw err;
|
|
1126
1128
|
}
|
|
1127
1129
|
}
|
|
@@ -1132,7 +1134,17 @@ run();
|
|
|
1132
1134
|
|
|
1133
1135
|
```
|
|
1134
1136
|
|
|
1135
|
-
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
|
|
1137
|
+
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
|
|
1138
|
+
|
|
1139
|
+
In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:
|
|
1140
|
+
|
|
1141
|
+
| HTTP Client Error | Description |
|
|
1142
|
+
| ---------------------------------------------------- | ---------------------------------------------------- |
|
|
1143
|
+
| RequestAbortedError | HTTP request was aborted by the client |
|
|
1144
|
+
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
|
|
1145
|
+
| ConnectionError | HTTP client was unable to make a request to a server |
|
|
1146
|
+
| InvalidRequestError | Any input used to create a request is invalid |
|
|
1147
|
+
| UnexpectedClientError | Unrecognised or unexpected error |
|
|
1136
1148
|
<!-- End Error Handling [errors] -->
|
|
1137
1149
|
|
|
1138
1150
|
<!-- Start Server Selection [server] -->
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# AgedCreditors
|
|
2
|
+
(*accounting.agedCreditors*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [get](#get) - Get Aged Creditors
|
|
9
|
+
|
|
10
|
+
## get
|
|
11
|
+
|
|
12
|
+
Get Aged Creditors
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Apideck } from "@apideck/unify";
|
|
18
|
+
|
|
19
|
+
const apideck = new Apideck({
|
|
20
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
21
|
+
consumerId: "test-consumer",
|
|
22
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
async function run() {
|
|
26
|
+
const result = await apideck.accounting.agedCreditors.get({
|
|
27
|
+
serviceId: "salesforce",
|
|
28
|
+
filter: {
|
|
29
|
+
customerId: "123abc",
|
|
30
|
+
reportAsOfDate: "2024-01-01",
|
|
31
|
+
periodCount: 3,
|
|
32
|
+
periodLength: 30,
|
|
33
|
+
},
|
|
34
|
+
passThrough: {
|
|
35
|
+
"search": "San Francisco",
|
|
36
|
+
},
|
|
37
|
+
fields: "id,updated_at",
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Handle the result
|
|
41
|
+
console.log(result);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
run();
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Standalone function
|
|
48
|
+
|
|
49
|
+
The standalone function version of this method:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
53
|
+
import { accountingAgedCreditorsGet } from "@apideck/unify/funcs/accountingAgedCreditorsGet.js";
|
|
54
|
+
|
|
55
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
56
|
+
// You can create one instance of it to use across an application.
|
|
57
|
+
const apideck = new ApideckCore({
|
|
58
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
59
|
+
consumerId: "test-consumer",
|
|
60
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
async function run() {
|
|
64
|
+
const res = await accountingAgedCreditorsGet(apideck, {
|
|
65
|
+
serviceId: "salesforce",
|
|
66
|
+
filter: {
|
|
67
|
+
customerId: "123abc",
|
|
68
|
+
reportAsOfDate: "2024-01-01",
|
|
69
|
+
periodCount: 3,
|
|
70
|
+
periodLength: 30,
|
|
71
|
+
},
|
|
72
|
+
passThrough: {
|
|
73
|
+
"search": "San Francisco",
|
|
74
|
+
},
|
|
75
|
+
fields: "id,updated_at",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (!res.ok) {
|
|
79
|
+
throw res.error;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const { value: result } = res;
|
|
83
|
+
|
|
84
|
+
// Handle the result
|
|
85
|
+
console.log(result);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
run();
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
| Parameter | Type | Required | Description |
|
|
94
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
95
|
+
| `request` | [operations.AccountingAgedCreditorsOneRequest](../../models/operations/accountingagedcreditorsonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
96
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
97
|
+
| `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. |
|
|
98
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
99
|
+
|
|
100
|
+
### Response
|
|
101
|
+
|
|
102
|
+
**Promise\<[operations.AccountingAgedCreditorsOneResponse](../../models/operations/accountingagedcreditorsoneresponse.md)\>**
|
|
103
|
+
|
|
104
|
+
### Errors
|
|
105
|
+
|
|
106
|
+
| Error Type | Status Code | Content Type |
|
|
107
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
108
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
109
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
110
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
111
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
112
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
113
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# AgedDebtors
|
|
2
|
+
(*accounting.agedDebtors*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [get](#get) - Get Aged Debtors
|
|
9
|
+
|
|
10
|
+
## get
|
|
11
|
+
|
|
12
|
+
Get Aged Debtors
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Apideck } from "@apideck/unify";
|
|
18
|
+
|
|
19
|
+
const apideck = new Apideck({
|
|
20
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
21
|
+
consumerId: "test-consumer",
|
|
22
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
async function run() {
|
|
26
|
+
const result = await apideck.accounting.agedDebtors.get({
|
|
27
|
+
serviceId: "salesforce",
|
|
28
|
+
filter: {
|
|
29
|
+
customerId: "123abc",
|
|
30
|
+
reportAsOfDate: "2024-01-01",
|
|
31
|
+
periodCount: 3,
|
|
32
|
+
periodLength: 30,
|
|
33
|
+
},
|
|
34
|
+
passThrough: {
|
|
35
|
+
"search": "San Francisco",
|
|
36
|
+
},
|
|
37
|
+
fields: "id,updated_at",
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Handle the result
|
|
41
|
+
console.log(result);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
run();
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Standalone function
|
|
48
|
+
|
|
49
|
+
The standalone function version of this method:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { ApideckCore } from "@apideck/unify/core.js";
|
|
53
|
+
import { accountingAgedDebtorsGet } from "@apideck/unify/funcs/accountingAgedDebtorsGet.js";
|
|
54
|
+
|
|
55
|
+
// Use `ApideckCore` for best tree-shaking performance.
|
|
56
|
+
// You can create one instance of it to use across an application.
|
|
57
|
+
const apideck = new ApideckCore({
|
|
58
|
+
apiKey: process.env["APIDECK_API_KEY"] ?? "",
|
|
59
|
+
consumerId: "test-consumer",
|
|
60
|
+
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
async function run() {
|
|
64
|
+
const res = await accountingAgedDebtorsGet(apideck, {
|
|
65
|
+
serviceId: "salesforce",
|
|
66
|
+
filter: {
|
|
67
|
+
customerId: "123abc",
|
|
68
|
+
reportAsOfDate: "2024-01-01",
|
|
69
|
+
periodCount: 3,
|
|
70
|
+
periodLength: 30,
|
|
71
|
+
},
|
|
72
|
+
passThrough: {
|
|
73
|
+
"search": "San Francisco",
|
|
74
|
+
},
|
|
75
|
+
fields: "id,updated_at",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (!res.ok) {
|
|
79
|
+
throw res.error;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const { value: result } = res;
|
|
83
|
+
|
|
84
|
+
// Handle the result
|
|
85
|
+
console.log(result);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
run();
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
| Parameter | Type | Required | Description |
|
|
94
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
95
|
+
| `request` | [operations.AccountingAgedDebtorsOneRequest](../../models/operations/accountingageddebtorsonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
96
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
97
|
+
| `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. |
|
|
98
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
99
|
+
|
|
100
|
+
### Response
|
|
101
|
+
|
|
102
|
+
**Promise\<[operations.AccountingAgedDebtorsOneResponse](../../models/operations/accountingageddebtorsoneresponse.md)\>**
|
|
103
|
+
|
|
104
|
+
### Errors
|
|
105
|
+
|
|
106
|
+
| Error Type | Status Code | Content Type |
|
|
107
|
+
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
108
|
+
| errors.BadRequestResponse | 400 | application/json |
|
|
109
|
+
| errors.UnauthorizedResponse | 401 | application/json |
|
|
110
|
+
| errors.PaymentRequiredResponse | 402 | application/json |
|
|
111
|
+
| errors.NotFoundResponse | 404 | application/json |
|
|
112
|
+
| errors.UnprocessableResponse | 422 | application/json |
|
|
113
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApideckCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Get Aged Creditors
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Get Aged Creditors
|
|
14
|
+
*/
|
|
15
|
+
export declare function accountingAgedCreditorsGet(client: ApideckCore, request: operations.AccountingAgedCreditorsOneRequest, options?: RequestOptions): Promise<Result<operations.AccountingAgedCreditorsOneResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=accountingAgedCreditorsGet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountingAgedCreditorsGet.d.ts","sourceRoot":"","sources":["../src/funcs/accountingAgedCreditorsGet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,kCAAkC,EAC3C,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAwIA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.accountingAgedCreditorsGet = accountingAgedCreditorsGet;
|
|
30
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
32
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
33
|
+
const security_js_1 = require("../lib/security.js");
|
|
34
|
+
const url_js_1 = require("../lib/url.js");
|
|
35
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
36
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
37
|
+
/**
|
|
38
|
+
* Get Aged Creditors
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Get Aged Creditors
|
|
42
|
+
*/
|
|
43
|
+
async function accountingAgedCreditorsGet(client, request, options) {
|
|
44
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.AccountingAgedCreditorsOneRequest$outboundSchema.parse(value), "Input validation failed");
|
|
45
|
+
if (!parsed.ok) {
|
|
46
|
+
return parsed;
|
|
47
|
+
}
|
|
48
|
+
const payload = parsed.value;
|
|
49
|
+
const body = null;
|
|
50
|
+
const path = (0, url_js_1.pathToFunc)("/accounting/aged-creditors")();
|
|
51
|
+
const query = (0, encodings_js_1.queryJoin)((0, encodings_js_1.encodeDeepObjectQuery)({
|
|
52
|
+
"filter": payload.filter,
|
|
53
|
+
"pass_through": payload.pass_through,
|
|
54
|
+
}), (0, encodings_js_1.encodeFormQuery)({
|
|
55
|
+
"fields": payload.fields,
|
|
56
|
+
"raw": payload.raw,
|
|
57
|
+
}));
|
|
58
|
+
const headers = new Headers({
|
|
59
|
+
Accept: "application/json",
|
|
60
|
+
"x-apideck-service-id": (0, encodings_js_1.encodeSimple)("x-apideck-service-id", payload.serviceId, { explode: false, charEncoding: "none" }),
|
|
61
|
+
"x-apideck-app-id": (0, encodings_js_1.encodeSimple)("x-apideck-app-id", client._options.appId, { explode: false, charEncoding: "none" }),
|
|
62
|
+
"x-apideck-consumer-id": (0, encodings_js_1.encodeSimple)("x-apideck-consumer-id", client._options.consumerId, { explode: false, charEncoding: "none" }),
|
|
63
|
+
});
|
|
64
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
65
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
66
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
67
|
+
const context = {
|
|
68
|
+
operationID: "accounting.agedCreditorsOne",
|
|
69
|
+
oAuth2Scopes: [],
|
|
70
|
+
resolvedSecurity: requestSecurity,
|
|
71
|
+
securitySource: client._options.apiKey,
|
|
72
|
+
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
73
|
+
|| client._options.retryConfig
|
|
74
|
+
|| {
|
|
75
|
+
strategy: "backoff",
|
|
76
|
+
backoff: {
|
|
77
|
+
initialInterval: 500,
|
|
78
|
+
maxInterval: 60000,
|
|
79
|
+
exponent: 1.5,
|
|
80
|
+
maxElapsedTime: 3600000,
|
|
81
|
+
},
|
|
82
|
+
retryConnectionErrors: true,
|
|
83
|
+
}
|
|
84
|
+
|| { strategy: "none" },
|
|
85
|
+
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["5XX"],
|
|
86
|
+
};
|
|
87
|
+
const requestRes = client._createRequest(context, {
|
|
88
|
+
security: requestSecurity,
|
|
89
|
+
method: "GET",
|
|
90
|
+
path: path,
|
|
91
|
+
headers: headers,
|
|
92
|
+
query: query,
|
|
93
|
+
body: body,
|
|
94
|
+
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
|
|
95
|
+
}, options);
|
|
96
|
+
if (!requestRes.ok) {
|
|
97
|
+
return requestRes;
|
|
98
|
+
}
|
|
99
|
+
const req = requestRes.value;
|
|
100
|
+
const doResult = await client._do(req, {
|
|
101
|
+
context,
|
|
102
|
+
errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
|
|
103
|
+
retryConfig: context.retryConfig,
|
|
104
|
+
retryCodes: context.retryCodes,
|
|
105
|
+
});
|
|
106
|
+
if (!doResult.ok) {
|
|
107
|
+
return doResult;
|
|
108
|
+
}
|
|
109
|
+
const response = doResult.value;
|
|
110
|
+
const responseFields = {
|
|
111
|
+
HttpMeta: { Response: response, Request: req },
|
|
112
|
+
};
|
|
113
|
+
const [result] = await M.match(M.json(200, operations.AccountingAgedCreditorsOneResponse$inboundSchema, {
|
|
114
|
+
key: "GetAgedCreditorsResponse",
|
|
115
|
+
}), M.jsonErr(400, errors.BadRequestResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema), M.jsonErr(404, errors.NotFoundResponse$inboundSchema), M.jsonErr(422, errors.UnprocessableResponse$inboundSchema), M.fail(["4XX", "5XX"]), M.json("default", operations.AccountingAgedCreditorsOneResponse$inboundSchema, { key: "UnexpectedErrorResponse" }))(response, req, { extraFields: responseFields });
|
|
116
|
+
if (!result.ok) {
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=accountingAgedCreditorsGet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountingAgedCreditorsGet.js","sourceRoot":"","sources":["../src/funcs/accountingAgedCreditorsGet.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,gEA4JC;AA1LD,sDAK6B;AAC7B,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA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AAE,MAAM,CAAC,mCAAmC,CAAC,EAC1D,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EACtB,CAAC,CAAC,IAAI,CACJ,SAAS,EACT,UAAU,CAAC,gDAAgD,EAC3D,EAAE,GAAG,EAAE,yBAAyB,EAAE,CACnC,CACF,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApideckCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Get Aged Debtors
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Get Aged Debtors
|
|
14
|
+
*/
|
|
15
|
+
export declare function accountingAgedDebtorsGet(client: ApideckCore, request: operations.AccountingAgedDebtorsOneRequest, options?: RequestOptions): Promise<Result<operations.AccountingAgedDebtorsOneResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=accountingAgedDebtorsGet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountingAgedDebtorsGet.d.ts","sourceRoot":"","sources":["../src/funcs/accountingAgedDebtorsGet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,+BAA+B,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,gCAAgC,EACzC,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAwIA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.accountingAgedDebtorsGet = accountingAgedDebtorsGet;
|
|
30
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
32
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
33
|
+
const security_js_1 = require("../lib/security.js");
|
|
34
|
+
const url_js_1 = require("../lib/url.js");
|
|
35
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
36
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
37
|
+
/**
|
|
38
|
+
* Get Aged Debtors
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Get Aged Debtors
|
|
42
|
+
*/
|
|
43
|
+
async function accountingAgedDebtorsGet(client, request, options) {
|
|
44
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.AccountingAgedDebtorsOneRequest$outboundSchema.parse(value), "Input validation failed");
|
|
45
|
+
if (!parsed.ok) {
|
|
46
|
+
return parsed;
|
|
47
|
+
}
|
|
48
|
+
const payload = parsed.value;
|
|
49
|
+
const body = null;
|
|
50
|
+
const path = (0, url_js_1.pathToFunc)("/accounting/aged-debtors")();
|
|
51
|
+
const query = (0, encodings_js_1.queryJoin)((0, encodings_js_1.encodeDeepObjectQuery)({
|
|
52
|
+
"filter": payload.filter,
|
|
53
|
+
"pass_through": payload.pass_through,
|
|
54
|
+
}), (0, encodings_js_1.encodeFormQuery)({
|
|
55
|
+
"fields": payload.fields,
|
|
56
|
+
"raw": payload.raw,
|
|
57
|
+
}));
|
|
58
|
+
const headers = new Headers({
|
|
59
|
+
Accept: "application/json",
|
|
60
|
+
"x-apideck-service-id": (0, encodings_js_1.encodeSimple)("x-apideck-service-id", payload.serviceId, { explode: false, charEncoding: "none" }),
|
|
61
|
+
"x-apideck-app-id": (0, encodings_js_1.encodeSimple)("x-apideck-app-id", client._options.appId, { explode: false, charEncoding: "none" }),
|
|
62
|
+
"x-apideck-consumer-id": (0, encodings_js_1.encodeSimple)("x-apideck-consumer-id", client._options.consumerId, { explode: false, charEncoding: "none" }),
|
|
63
|
+
});
|
|
64
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
65
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
66
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
67
|
+
const context = {
|
|
68
|
+
operationID: "accounting.agedDebtorsOne",
|
|
69
|
+
oAuth2Scopes: [],
|
|
70
|
+
resolvedSecurity: requestSecurity,
|
|
71
|
+
securitySource: client._options.apiKey,
|
|
72
|
+
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
73
|
+
|| client._options.retryConfig
|
|
74
|
+
|| {
|
|
75
|
+
strategy: "backoff",
|
|
76
|
+
backoff: {
|
|
77
|
+
initialInterval: 500,
|
|
78
|
+
maxInterval: 60000,
|
|
79
|
+
exponent: 1.5,
|
|
80
|
+
maxElapsedTime: 3600000,
|
|
81
|
+
},
|
|
82
|
+
retryConnectionErrors: true,
|
|
83
|
+
}
|
|
84
|
+
|| { strategy: "none" },
|
|
85
|
+
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["5XX"],
|
|
86
|
+
};
|
|
87
|
+
const requestRes = client._createRequest(context, {
|
|
88
|
+
security: requestSecurity,
|
|
89
|
+
method: "GET",
|
|
90
|
+
path: path,
|
|
91
|
+
headers: headers,
|
|
92
|
+
query: query,
|
|
93
|
+
body: body,
|
|
94
|
+
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || -1,
|
|
95
|
+
}, options);
|
|
96
|
+
if (!requestRes.ok) {
|
|
97
|
+
return requestRes;
|
|
98
|
+
}
|
|
99
|
+
const req = requestRes.value;
|
|
100
|
+
const doResult = await client._do(req, {
|
|
101
|
+
context,
|
|
102
|
+
errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
|
|
103
|
+
retryConfig: context.retryConfig,
|
|
104
|
+
retryCodes: context.retryCodes,
|
|
105
|
+
});
|
|
106
|
+
if (!doResult.ok) {
|
|
107
|
+
return doResult;
|
|
108
|
+
}
|
|
109
|
+
const response = doResult.value;
|
|
110
|
+
const responseFields = {
|
|
111
|
+
HttpMeta: { Response: response, Request: req },
|
|
112
|
+
};
|
|
113
|
+
const [result] = await M.match(M.json(200, operations.AccountingAgedDebtorsOneResponse$inboundSchema, {
|
|
114
|
+
key: "GetAgedDebtorsResponse",
|
|
115
|
+
}), M.jsonErr(400, errors.BadRequestResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema), M.jsonErr(404, errors.NotFoundResponse$inboundSchema), M.jsonErr(422, errors.UnprocessableResponse$inboundSchema), M.fail(["4XX", "5XX"]), M.json("default", operations.AccountingAgedDebtorsOneResponse$inboundSchema, { key: "UnexpectedErrorResponse" }))(response, req, { extraFields: responseFields });
|
|
116
|
+
if (!result.ok) {
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=accountingAgedDebtorsGet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountingAgedDebtorsGet.js","sourceRoot":"","sources":["../src/funcs/accountingAgedDebtorsGet.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,4DA4JC;AA1LD,sDAK6B;AAC7B,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAEpD,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,wBAAwB,CAC5C,MAAmB,EACnB,OAAmD,EACnD,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,8CAA8C,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,0BAA0B,CAAC,EAAE,CAAC;IAEtD,MAAM,KAAK,GAAG,IAAA,wBAAS,EACrB,IAAA,oCAAqB,EAAC;QACpB,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,cAAc,EAAE,OAAO,CAAC,YAAY;KACrC,CAAC,EACF,IAAA,8BAAe,EAAC;QACd,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,KAAK,E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AAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAe5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,8CAA8C,EAAE;QACrE,GAAG,EAAE,wBAAwB;KAC9B,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,gCAAgC,CAAC,EACvD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,kCAAkC,CAAC,EACzD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,qCAAqC,CAAC,EAC5D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,8BAA8B,CAAC,EACrD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAmC,CAAC,EAC1D,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EACtB,CAAC,CAAC,IAAI,CACJ,SAAS,EACT,UAAU,CAAC,8CAA8C,EACzD,EAAE,GAAG,EAAE,yBAAyB,EAAE,CACnC,CACF,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -8,7 +8,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
8
8
|
import { Result } from "../types/fp.js";
|
|
9
9
|
export declare enum DownloadAcceptEnum {
|
|
10
10
|
applicationJson = "application/json",
|
|
11
|
-
|
|
11
|
+
wildcardRootWildcard = "*/*"
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Download Attachment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountingAttachmentsDownload.d.ts","sourceRoot":"","sources":["../src/funcs/accountingAttachmentsDownload.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,oBAAY,kBAAkB;IAC5B,eAAe,qBAAqB;IACpC,
|
|
1
|
+
{"version":3,"file":"accountingAttachmentsDownload.d.ts","sourceRoot":"","sources":["../src/funcs/accountingAttachmentsDownload.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,oBAAY,kBAAkB;IAC5B,eAAe,qBAAqB;IACpC,oBAAoB,QAAQ;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GAAG;IAAE,oBAAoB,CAAC,EAAE,kBAAkB,CAAA;CAAE,GACvE,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,qCAAqC,EAC9C,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAsJA"}
|