Skip to content

Commit

Permalink
Merge pull request #21 from formancehq/speakeasy-sdk-regen-1710509982
Browse files Browse the repository at this point in the history
chore: 🐝 Update SDK - Generate
  • Loading branch information
Antoine Wacheux authored Mar 15, 2024
2 parents 79e2efd + a3fab50 commit aed070e
Show file tree
Hide file tree
Showing 565 changed files with 9,467 additions and 3,825 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/hooks
/models
/sdk/models/errors
/sdk/types
Expand Down
44 changes: 22 additions & 22 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
lockVersion: 2.0.0
id: 2bb10af9-e48a-4bd7-ae46-a35fa809dc29
management:
docChecksum: 5e9a79dbe7142aa90188e21ea54c7198
docVersion: v2.0.0-rc.15
speakeasyVersion: internal
generationVersion: 2.237.2
releaseVersion: v2.0.0-rc.15
configChecksum: a5971d68894f6192d10eed3cd372c215
docChecksum: 254f15d23bfd21d49b8db8ecb44639be
docVersion: v2.0.0-rc.16
speakeasyVersion: 1.209.3
generationVersion: 2.281.2
releaseVersion: 2.1.0
configChecksum: 47f722bb5f17d7fcacc07a121a9b6247
repoURL: https://github.com/formancehq/formance-sdk-typescript.git
repoSubDirectory: .
installationURL: https://github.com/formancehq/formance-sdk-typescript
features:
typescript:
constsAndDefaults: 0.1.1
core: 3.4.7
constsAndDefaults: 0.1.5
core: 3.6.1
deprecations: 2.81.1
errors: 2.81.8
globalSecurity: 2.82.2
globalServerURLs: 2.82.1
globalSecurity: 2.82.6
globalServerURLs: 2.82.4
groups: 2.81.2
ignores: 2.81.1
unions: 2.85.0
responseFormat: 0.2.2
unions: 2.85.3
generatedFiles:
- src/sdk/auth.ts
- src/sdk/ledger.ts
Expand All @@ -31,22 +35,21 @@ generatedFiles:
- .eslintrc.js
- .npmignore
- RUNTIMES.md
- package-lock.json
- package.json
- src/index.ts
- src/lib/base64.ts
- src/lib/config.ts
- src/lib/encodings.ts
- src/lib/event-streams.ts
- src/lib/http.ts
- src/lib/retries.ts
- src/lib/schemas.ts
- src/lib/sdks.ts
- src/lib/security.ts
- src/lib/url.ts
- src/sdk/index.ts
- src/sdk/models/errors/sdkerror.ts
- src/sdk/models/errors/sdkvalidationerror.ts
- src/sdk/types/blobs.ts
- src/sdk/types/decimal.ts
- src/sdk/types/index.ts
- src/sdk/types/operations.ts
- src/sdk/types/rfcdate.ts
Expand Down Expand Up @@ -162,7 +165,6 @@ generatedFiles:
- src/sdk/models/operations/listtransferinitiations.ts
- src/sdk/models/operations/paymentsgetaccount.ts
- src/sdk/models/operations/paymentsgetserverinfo.ts
- src/sdk/models/operations/paymentslistaccounts.ts
- src/sdk/models/operations/readconnectorconfig.ts
- src/sdk/models/operations/readconnectorconfigv1.ts
- src/sdk/models/operations/removeaccountfrompool.ts
Expand Down Expand Up @@ -491,7 +493,6 @@ generatedFiles:
- src/sdk/models/shared/transferinitiationscursor.ts
- src/sdk/models/shared/paymentsaccountresponse.ts
- src/sdk/models/shared/paymentsaccount.ts
- src/sdk/models/shared/accountscursor.ts
- src/sdk/models/shared/connectorconfigresponse.ts
- src/sdk/models/shared/reversetransferinitiationrequest.ts
- src/sdk/models/shared/updatetransferinitiationstatusrequest.ts
Expand Down Expand Up @@ -744,8 +745,6 @@ generatedFiles:
- docs/sdk/models/operations/paymentsgetaccountrequest.md
- docs/sdk/models/operations/paymentsgetaccountresponse.md
- docs/sdk/models/operations/paymentsgetserverinforesponse.md
- docs/sdk/models/operations/paymentslistaccountsrequest.md
- docs/sdk/models/operations/paymentslistaccountsresponse.md
- docs/sdk/models/operations/readconnectorconfigrequest.md
- docs/sdk/models/operations/readconnectorconfigresponse.md
- docs/sdk/models/operations/readconnectorconfigv1request.md
Expand Down Expand Up @@ -876,12 +875,12 @@ generatedFiles:
- docs/sdk/models/shared/expr.md
- docs/sdk/models/shared/contract.md
- docs/sdk/models/shared/transactionresponse.md
- docs/sdk/models/shared/accountscursorresponsecursor.md
- docs/sdk/models/shared/cursor.md
- docs/sdk/models/shared/accountscursorresponse.md
- docs/sdk/models/shared/account.md
- docs/sdk/models/shared/logscursorresponsecursor.md
- docs/sdk/models/shared/logscursorresponse.md
- docs/sdk/models/shared/typet.md
- docs/sdk/models/shared/type.md
- docs/sdk/models/shared/log.md
- docs/sdk/models/shared/transactionscursorresponsecursor.md
- docs/sdk/models/shared/transactionscursorresponse.md
Expand Down Expand Up @@ -1191,8 +1190,6 @@ generatedFiles:
- docs/sdk/models/shared/paymentsaccountresponse.md
- docs/sdk/models/shared/paymentsaccountraw.md
- docs/sdk/models/shared/paymentsaccount.md
- docs/sdk/models/shared/cursor.md
- docs/sdk/models/shared/accountscursor.md
- docs/sdk/models/shared/connectorconfigresponse.md
- docs/sdk/models/shared/reversetransferinitiationrequest.md
- docs/sdk/models/shared/status.md
Expand Down Expand Up @@ -1265,3 +1262,6 @@ generatedFiles:
- docs/sdks/webhooks/README.md
- USAGE.md
- .gitattributes
- src/hooks/hooks.ts
- src/hooks/types.ts
- src/hooks/index.ts
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ It has been generated successfully based on your OpenAPI spec. However, it is no
### NPM

```bash
npm add <UNSET>
npm add https://github.com/formancehq/formance-sdk-typescript
```

### Yarn

```bash
yarn add <UNSET>
yarn add https://github.com/formancehq/formance-sdk-typescript
```
<!-- End SDK Installation [installation] -->

Expand Down Expand Up @@ -190,7 +190,6 @@ run();
* [listTransferInitiations](docs/sdks/payments/README.md#listtransferinitiations) - List Transfer Initiations
* [paymentsgetAccount](docs/sdks/payments/README.md#paymentsgetaccount) - Get an account
* [paymentsgetServerInfo](docs/sdks/payments/README.md#paymentsgetserverinfo) - Get server info
* [paymentslistAccounts](docs/sdks/payments/README.md#paymentslistaccounts) - List accounts
* [~~readConnectorConfig~~](docs/sdks/payments/README.md#readconnectorconfig) - Read the config of a connector :warning: **Deprecated**
* [readConnectorConfigV1](docs/sdks/payments/README.md#readconnectorconfigv1) - Read the config of a connector
* [removeAccountFromPool](docs/sdks/payments/README.md#removeaccountfrompool) - Remove an account from a pool
Expand Down Expand Up @@ -261,7 +260,8 @@ All SDK methods return a response object or throw an error. If Error objects are
| errors.ErrorResponse | 400,404 | application/json |
| errors.SDKError | 4xx-5xx | */* |

Example
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.


```typescript
import { SDK } from "@formance/formance-sdk";
Expand All @@ -276,13 +276,20 @@ async function run() {
try {
result = await sdk.ledger.addMetadataToAccount({
requestBody: {
key: "string",
key: "<value>",
},
address: "users:001",
ledger: "ledger001",
});
} catch (err) {
switch (true) {
case err instanceof errors.SDKValidationError: {
// Validation errors can be pretty-printed
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
return;
}
case err instanceof errors.ErrorResponse: {
console.error(err); // handle exception
return;
Expand Down
9 changes: 9 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


## 2024-03-15 13:39:39
### Changes
Based on:
- OpenAPI Doc v2.0.0-rc.16
- Speakeasy CLI 1.209.3 (2.281.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v2.1.0] .
8 changes: 4 additions & 4 deletions docs/sdk/models/operations/creditwalletrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `creditWalletRequest` | [shared.CreditWalletRequest](../../../sdk/models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A |
| `id` | *string* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `creditWalletRequest` | [shared.CreditWalletRequest](../../../sdk/models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | {<br/>"amount": {<br/>"asset": "USD/2",<br/>"amount": 100<br/>},<br/>"metadata": {<br/>"key": ""<br/>},<br/>"sources": []<br/>} |
| `id` | *string* | :heavy_check_mark: | N/A | |
8 changes: 4 additions & 4 deletions docs/sdk/models/operations/debitwalletrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Fields

| Field | Type | Required | Description |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `debitWalletRequest` | [shared.DebitWalletRequest](../../../sdk/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A |
| `id` | *string* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `debitWalletRequest` | [shared.DebitWalletRequest](../../../sdk/models/shared/debitwalletrequest.md) | :heavy_minus_sign: | N/A | {<br/>"amount": {<br/>"asset": "USD/2",<br/>"amount": 100<br/>},<br/>"metadata": {<br/>"key": ""<br/>},<br/>"pending": true<br/>} |
| `id` | *string* | :heavy_check_mark: | N/A | |
Loading

0 comments on commit aed070e

Please sign in to comment.