Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to v1.10.10 #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
dist
14 changes: 7 additions & 7 deletions AccountsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json; charset=utf-8
- **Accept**: application/json; charset=utf-8
- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -91,7 +91,7 @@ let body:ledger.AccountsApiCountAccountsRequest = {
ledger: "ledger001",
// string | Filter accounts by address pattern (regular expression placed between ^ and $). (optional)
address: "users:.+",
// any | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. (optional)
// any | Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]=value1&metadata[a.nested.key]=value2 (optional)
metadata: {},
};

Expand All @@ -107,7 +107,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ledger** | [**string**] | Name of the ledger. | defaults to undefined
**address** | [**string**] | Filter accounts by address pattern (regular expression placed between ^ and $). | (optional) defaults to undefined
**metadata** | **any** | Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below. | (optional) defaults to undefined
**metadata** | **any** | Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]=value1&metadata[a.nested.key]=value2 | (optional) defaults to undefined


### Return type
Expand All @@ -121,7 +121,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -178,7 +178,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -263,7 +263,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
4 changes: 2 additions & 2 deletions BalancesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -120,7 +120,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
2 changes: 1 addition & 1 deletion LedgerApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
2 changes: 1 addition & 1 deletion LogsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
6 changes: 3 additions & 3 deletions MappingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -114,8 +114,8 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json; charset=utf-8
- **Accept**: application/json; charset=utf-8
- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
Expand Down
56 changes: 3 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## @numaryhq/ledger-nodejs@v1.9.3
## @numaryhq/ledger-nodejs@v1.10.10

This generator creates TypeScript/JavaScript client that utilizes fetch-api.

Expand All @@ -16,65 +16,15 @@ First build the package then run ```npm publish```

### Consuming

Navigate to the folder of your consuming project and run one of the following commands.
navigate to the folder of your consuming project and run one of the following commands.

_published:_

```
npm install @numaryhq/ledger-nodejs@v1.9.3 --save
npm install @numaryhq/ledger-nodejs@v1.10.10 --save
```

_unPublished (not recommended):_

```
npm install PATH_TO_GENERATED_PACKAGE --save
```

### Usage

Below code snippet shows exemplary usage of the configuration and the API based
on the typical `PetStore` example used for OpenAPI.

```
import * as your_api from 'your_api_package'

// Covers all auth methods included in your OpenAPI yaml definition
const authConfig: your_api.AuthMethodsConfiguration = {
"api_key": "YOUR_API_KEY"
}

// Implements a simple middleware to modify requests before (`pre`) they are sent
// and after (`post`) they have been received
class Test implements your_api.Middleware {
pre(context: your_api.RequestContext): Promise<your_api.RequestContext> {
// Modify context here and return
return Promise.resolve(context);
}

post(context: your_api.ResponseContext): Promise<your_api.ResponseContext> {
return Promise.resolve(context);
}

}

// Create configuration parameter object
const configurationParameters = {
httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine
baseServer: your_api.servers[0], // First server is default
authMethods: authConfig, // No auth is default
promiseMiddleware: [new Test()],
}

// Convert to actual configuration
const config = your_api.createConfiguration(configurationParameters);

// Use configuration with your_api
const api = new your_api.PetApi(config);
your_api.Pet p = new your_api.Pet();
p.name = "My new pet";
p.photoUrls = [];
p.tags = [];
p.status = "available";
Promise<your_api.Pet> createdPet = api.addPet(p);

```
4 changes: 2 additions & 2 deletions ScriptApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json; charset=utf-8
- **Accept**: application/json; charset=utf-8
- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
Expand Down
2 changes: 1 addition & 1 deletion ServerApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
2 changes: 1 addition & 1 deletion StatsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tasks:
--rm
-e NUMARY_SERVER_HTTP_BIND_ADDRESS=0.0.0.0:3068
-p 3068:3068
ghcr.io/formancehq/ledger:v1.9.3
ghcr.io/formancehq/ledger:v1.10.10

stop-ledger:
cmds:
Expand Down
23 changes: 13 additions & 10 deletions TransactionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json; charset=utf-8
- **Accept**: application/json; charset=utf-8
- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -145,7 +145,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -229,8 +229,8 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json; charset=utf-8
- **Accept**: application/json; charset=utf-8
- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -304,8 +304,8 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json; charset=utf-8
- **Accept**: application/json; charset=utf-8
- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -362,7 +362,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -459,7 +459,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down Expand Up @@ -489,6 +489,8 @@ let body:ledger.TransactionsApiRevertTransactionRequest = {
ledger: "ledger001",
// number | Transaction ID.
txid: 1234,
// boolean | Allow to disable balances checks (optional)
disableChecks: true,
};

apiInstance.revertTransaction(body).then((data:any) => {
Expand All @@ -503,6 +505,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ledger** | [**string**] | Name of the ledger. | defaults to undefined
**txid** | [**number**] | Transaction ID. | defaults to undefined
**disableChecks** | [**boolean**] | Allow to disable balances checks | (optional) defaults to undefined


### Return type
Expand All @@ -516,7 +519,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json; charset=utf-8
- **Accept**: application/json


### HTTP response details
Expand Down
4 changes: 2 additions & 2 deletions apis/AccountsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class AccountsApiRequestFactory extends BaseAPIRequestFactory {

// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json; charset=utf-8"
"application/json"
]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
Expand All @@ -80,7 +80,7 @@ export class AccountsApiRequestFactory extends BaseAPIRequestFactory {
* Count the accounts from a ledger
* @param ledger Name of the ledger.
* @param address Filter accounts by address pattern (regular expression placed between ^ and $).
* @param metadata Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below.
* @param metadata Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]&#x3D;value1&amp;metadata[a.nested.key]&#x3D;value2
*/
public async countAccounts(ledger: string, address?: string, metadata?: any, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
Expand Down
2 changes: 1 addition & 1 deletion apis/MappingApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class MappingApiRequestFactory extends BaseAPIRequestFactory {

// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json; charset=utf-8"
"application/json"
]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
Expand Down
2 changes: 1 addition & 1 deletion apis/ScriptApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ScriptApiRequestFactory extends BaseAPIRequestFactory {

// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json; charset=utf-8"
"application/json"
]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
Expand Down
Loading