Skip to content

Commit ee9fa93

Browse files
authored
Merge pull request #626 from codatio/speakeasy-sdk-regen-1727874684
chore: 🐝 Update SDK - Generate Sync for Payables library SYNC-FOR-PAYABLES-LIBRARY 5.0.0
2 parents 0634fc3 + eaaee96 commit ee9fa93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1331
-1517
lines changed

β€Ž.speakeasy/workflow.lockβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.396.7
1+
speakeasyVersion: 1.405.9
22
sources:
33
bank-feeds-source:
44
sourceNamespace: bank-feeds-source
@@ -30,8 +30,8 @@ sources:
3030
- main
3131
sync-for-payables-source:
3232
sourceNamespace: sync-for-payables-source
33-
sourceRevisionDigest: sha256:daca0e08a3d44b87bb2242380dfc8be94f2cb83b1ea0a252af7f31f9b0c2c247
34-
sourceBlobDigest: sha256:6ed96ad8ecab289621839d0df446a473e3dc8ea83765e3316020a6670b44da0b
33+
sourceRevisionDigest: sha256:15cdb98984bf13e095abd0570737564feb6d1c56000e3ff22b3dec5e0616315f
34+
sourceBlobDigest: sha256:b2999b2b9b935bfc647fe90125f27429ceca251baba134fe2e1b28ee05204eb6
3535
tags:
3636
- latest
3737
- main
@@ -73,8 +73,8 @@ targets:
7373
sync-for-payables-library:
7474
source: sync-for-payables-source
7575
sourceNamespace: sync-for-payables-source
76-
sourceRevisionDigest: sha256:daca0e08a3d44b87bb2242380dfc8be94f2cb83b1ea0a252af7f31f9b0c2c247
77-
sourceBlobDigest: sha256:6ed96ad8ecab289621839d0df446a473e3dc8ea83765e3316020a6670b44da0b
76+
sourceRevisionDigest: sha256:15cdb98984bf13e095abd0570737564feb6d1c56000e3ff22b3dec5e0616315f
77+
sourceBlobDigest: sha256:b2999b2b9b935bfc647fe90125f27429ceca251baba134fe2e1b28ee05204eb6
7878
sync-for-payables-version-1-library:
7979
source: sync-for-payables-version-1-source
8080
sourceNamespace: sync-for-payables-version-1-source

β€Žsync-for-payables/.speakeasy/gen.lockβ€Ž

Lines changed: 38 additions & 32 deletions
Large diffs are not rendered by default.

β€Žsync-for-payables/.speakeasy/gen.yamlβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ generation:
1313
oAuth2ClientCredentialsEnabled: false
1414
telemetryEnabled: true
1515
typescript:
16-
version: 4.0.0
16+
version: 5.0.0
1717
additionalDependencies:
1818
dependencies: {}
1919
devDependencies: {}
@@ -24,6 +24,7 @@ typescript:
2424
description: Streamline your customers' accounts payable workflow.
2525
enumFormat: union
2626
flattenGlobalSecurity: true
27+
flatteningOrder: body-first
2728
imports:
2829
option: openapi
2930
paths:

β€Žsync-for-payables/FUNCTIONS.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function run() {
5757
const { value: result } = res;
5858

5959
// Handle the result
60-
console.log(result)
60+
console.log(result);
6161
}
6262

6363
run();

β€Žsync-for-payables/README.mdβ€Ž

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,24 @@ run();
322322
<!-- Start Error Handling [errors] -->
323323
## Error Handling
324324

325-
All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
325+
All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.
326326

327-
| Error Object | Status Code | Content Type |
328-
| ------------------------------- | ------------------------------- | ------------------------------- |
329-
| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json |
330-
| errors.SDKError | 4xx-5xx | */* |
327+
If a HTTP request fails, an operation my also throw an error from the `sdk/models/errors/httpclienterrors.ts` module:
331328

332-
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.
329+
| HTTP Client Error | Description |
330+
| ---------------------------------------------------- | ---------------------------------------------------- |
331+
| RequestAbortedError | HTTP request was aborted by the client |
332+
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
333+
| ConnectionError | HTTP client was unable to make a request to a server |
334+
| InvalidRequestError | Any input used to create a request is invalid |
335+
| UnexpectedClientError | Unrecognised or unexpected error |
333336

337+
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:
338+
339+
| Error Type | Status Code | Content Type |
340+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
341+
| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json |
342+
| errors.SDKError | 4XX, 5XX | \*/\* |
334343

335344
```typescript
336345
import { CodatSyncPayables } from "@codat/sync-for-payables";
@@ -379,6 +388,8 @@ async function run() {
379388
run();
380389

381390
```
391+
392+
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.
382393
<!-- End Error Handling [errors] -->
383394

384395
<!-- Start Server Selection [server] -->

β€Žsync-for-payables/RELEASES.mdβ€Ž

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@ Based on:
88
### Generated
99
- [typescript v4.0.0] sync-for-payables
1010
### Releases
11-
- [NPM v4.0.0] https://www.npmjs.com/package/@codat/sync-for-payables/v/4.0.0 - sync-for-payables
11+
- [NPM v4.0.0] https://www.npmjs.com/package/@codat/sync-for-payables/v/4.0.0 - sync-for-payables
12+
13+
## 2024-10-02 13:11:12
14+
### Changes
15+
Based on:
16+
- OpenAPI Doc
17+
- Speakeasy CLI 1.405.9 (2.429.0) https://github.com/speakeasy-api/speakeasy
18+
### Generated
19+
- [typescript v5.0.0] sync-for-payables
20+
### Releases
21+
- [NPM v5.0.0] https://www.npmjs.com/package/@codat/sync-for-payables/v/5.0.0 - sync-for-payables

β€Žsync-for-payables/docs/sdk/models/errors/errormessage.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ErrorMessage
22

3-
The request made is not valid.
3+
Your `query` parameter was not correctly formed
44

55
## Example Usage
66

β€Žsync-for-payables/docs/sdk/models/operations/createbankaccountrequest.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ let value: CreateBankAccountRequest = {
1010
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
1111
bankAccountPrototype: {
1212
name: "<value>",
13-
accountType: "Unknown",
13+
accountType: "Credit",
1414
accountNumber: "<value>",
15-
currency: "USD",
15+
currency: "GBP",
1616
},
1717
};
1818
```

β€Žsync-for-payables/docs/sdk/models/operations/createbillpaymentrequest.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Decimal } from "@codat/sync-for-payables/sdk/types";
99
let value: CreateBillPaymentRequest = {
1010
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
1111
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
12-
billId: "EILBDVJVNUAGVKRQ",
12+
billId: "13d946f0-c5d5-42bc-b092-97ece17923ab",
1313
billPaymentPrototype: {
1414
amount: new Decimal("1329.54"),
1515
date: "2022-10-23T00:00:00Z",

β€Žsync-for-payables/docs/sdk/models/operations/createsupplierrequest.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ let value: CreateSupplierRequest = {
1010
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
1111
supplierPrototype: {
1212
supplierName: "<value>",
13-
phone: "+44 25691 154789",
14-
status: "Active",
13+
phone: "(877) 492-8687",
14+
status: "Unknown",
1515
},
1616
};
1717
```

0 commit comments

Comments
Β (0)