diff --git a/.github/workflows/speakeasy_sdk_generate.yml b/.github/workflows/speakeasy_sdk_generate.yml index 9ff534e4..c5c9783e 100644 --- a/.github/workflows/speakeasy_sdk_generate.yml +++ b/.github/workflows/speakeasy_sdk_generate.yml @@ -28,6 +28,8 @@ jobs: speakeasy_version: latest openapi_docs: | - ${{ needs.get_openai_spec_url.outputs.openapi_spec_url }} + overlay_docs: | + - overlay.yaml languages: |- - typescript publish_typescript: true diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a086b5a3..90960844 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2bb10af9-e48a-4bd7-ae46-a35fa809dc29 management: - docChecksum: de4ce37109543835d271fd330d36d4f0 + docChecksum: b7dab401105771ee0cc7b55046e7eed0 docVersion: v2.0.0-rc.26 - speakeasyVersion: 1.277.0 - generationVersion: 2.317.0 - releaseVersion: 2.3.1 - configChecksum: 03fb7096b8613ce631c03c3877f901db + speakeasyVersion: 1.277.6 + generationVersion: 2.319.7 + releaseVersion: 2.3.2 + configChecksum: 154d9a8e4eef12aade459e53e6265d96 repoURL: https://github.com/formancehq/formance-sdk-typescript.git repoSubDirectory: . installationURL: https://github.com/formancehq/formance-sdk-typescript @@ -98,11 +98,16 @@ generatedFiles: - src/sdk/models/operations/v2deleteledgermetadata.ts - src/sdk/models/operations/v2deletetransactionmetadata.ts - src/sdk/models/operations/v2getaccount.ts + - src/sdk/models/operations/v2getbalancesaggregated.ts - src/sdk/models/operations/v2getinfo.ts - src/sdk/models/operations/v2getledger.ts - src/sdk/models/operations/v2getledgerinfo.ts - src/sdk/models/operations/v2gettransaction.ts + - src/sdk/models/operations/v2getvolumeswithbalances.ts + - src/sdk/models/operations/v2listaccounts.ts - src/sdk/models/operations/v2listledgers.ts + - src/sdk/models/operations/v2listlogs.ts + - src/sdk/models/operations/v2listtransactions.ts - src/sdk/models/operations/v2readstats.ts - src/sdk/models/operations/v2reverttransaction.ts - src/sdk/models/operations/v2updateledgermetadata.ts @@ -170,6 +175,7 @@ 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 @@ -282,6 +288,7 @@ generatedFiles: - src/sdk/models/shared/v2accountresponse.ts - src/sdk/models/shared/v2account.ts - src/sdk/models/shared/v2volume.ts + - src/sdk/models/shared/v2aggregatebalancesresponse.ts - src/sdk/models/shared/v2configinforesponse.ts - src/sdk/models/shared/v2getledgerresponse.ts - src/sdk/models/shared/v2ledger.ts @@ -290,7 +297,13 @@ generatedFiles: - src/sdk/models/shared/v2migrationinfo.ts - src/sdk/models/shared/v2gettransactionresponse.ts - src/sdk/models/shared/v2expandedtransaction.ts + - src/sdk/models/shared/v2volumeswithbalancecursorresponse.ts + - src/sdk/models/shared/v2volumeswithbalance.ts + - src/sdk/models/shared/v2accountscursorresponse.ts - src/sdk/models/shared/v2ledgerlistresponse.ts + - src/sdk/models/shared/v2logscursorresponse.ts + - src/sdk/models/shared/v2log.ts + - src/sdk/models/shared/v2transactionscursorresponse.ts - src/sdk/models/shared/v2statsresponse.ts - src/sdk/models/shared/v2stats.ts - src/sdk/models/shared/v2reverttransactionresponse.ts @@ -501,6 +514,7 @@ generatedFiles: - src/sdk/models/shared/paymentscursor.ts - src/sdk/models/shared/poolscursor.ts - src/sdk/models/shared/transferinitiationscursor.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 @@ -632,6 +646,8 @@ generatedFiles: - docs/sdk/models/operations/v2deletetransactionmetadataresponse.md - docs/sdk/models/operations/v2getaccountrequest.md - docs/sdk/models/operations/v2getaccountresponse.md + - docs/sdk/models/operations/v2getbalancesaggregatedrequest.md + - docs/sdk/models/operations/v2getbalancesaggregatedresponse.md - docs/sdk/models/operations/v2getinforesponse.md - docs/sdk/models/operations/v2getledgerrequest.md - docs/sdk/models/operations/v2getledgerresponse.md @@ -639,8 +655,16 @@ generatedFiles: - docs/sdk/models/operations/v2getledgerinforesponse.md - docs/sdk/models/operations/v2gettransactionrequest.md - docs/sdk/models/operations/v2gettransactionresponse.md + - docs/sdk/models/operations/v2getvolumeswithbalancesrequest.md + - docs/sdk/models/operations/v2getvolumeswithbalancesresponse.md + - docs/sdk/models/operations/v2listaccountsrequest.md + - docs/sdk/models/operations/v2listaccountsresponse.md - docs/sdk/models/operations/v2listledgersrequest.md - docs/sdk/models/operations/v2listledgersresponse.md + - docs/sdk/models/operations/v2listlogsrequest.md + - docs/sdk/models/operations/v2listlogsresponse.md + - docs/sdk/models/operations/v2listtransactionsrequest.md + - docs/sdk/models/operations/v2listtransactionsresponse.md - docs/sdk/models/operations/v2readstatsrequest.md - docs/sdk/models/operations/v2readstatsresponse.md - docs/sdk/models/operations/v2reverttransactionrequest.md @@ -762,6 +786,8 @@ 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 @@ -892,7 +918,7 @@ generatedFiles: - docs/sdk/models/shared/expr.md - docs/sdk/models/shared/contract.md - docs/sdk/models/shared/transactionresponse.md - - docs/sdk/models/shared/cursor.md + - docs/sdk/models/shared/accountscursorresponsecursor.md - docs/sdk/models/shared/accountscursorresponse.md - docs/sdk/models/shared/account.md - docs/sdk/models/shared/logscursorresponsecursor.md @@ -932,6 +958,7 @@ generatedFiles: - docs/sdk/models/shared/v2accountresponse.md - docs/sdk/models/shared/v2account.md - docs/sdk/models/shared/v2volume.md + - docs/sdk/models/shared/v2aggregatebalancesresponse.md - docs/sdk/models/shared/v2configinforesponse.md - docs/sdk/models/shared/v2getledgerresponse.md - docs/sdk/models/shared/v2ledger.md @@ -942,8 +969,19 @@ generatedFiles: - docs/sdk/models/shared/v2migrationinfo.md - docs/sdk/models/shared/v2gettransactionresponse.md - docs/sdk/models/shared/v2expandedtransaction.md + - docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md + - docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md + - docs/sdk/models/shared/v2volumeswithbalance.md + - docs/sdk/models/shared/v2accountscursorresponsecursor.md + - docs/sdk/models/shared/v2accountscursorresponse.md - docs/sdk/models/shared/v2ledgerlistresponsecursor.md - docs/sdk/models/shared/v2ledgerlistresponse.md + - docs/sdk/models/shared/v2logscursorresponsecursor.md + - docs/sdk/models/shared/v2logscursorresponse.md + - docs/sdk/models/shared/v2logtype.md + - docs/sdk/models/shared/v2log.md + - docs/sdk/models/shared/v2transactionscursorresponsecursor.md + - docs/sdk/models/shared/v2transactionscursorresponse.md - docs/sdk/models/shared/v2statsresponse.md - docs/sdk/models/shared/v2stats.md - docs/sdk/models/shared/v2reverttransactionresponse.md @@ -1209,6 +1247,8 @@ generatedFiles: - docs/sdk/models/shared/poolscursor.md - docs/sdk/models/shared/transferinitiationscursorcursor.md - docs/sdk/models/shared/transferinitiationscursor.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 diff --git a/README.md b/README.md index baba897e..1def1dec 100644 --- a/README.md +++ b/README.md @@ -115,11 +115,16 @@ run(); * [v2DeleteLedgerMetadata](docs/sdks/ledger/README.md#v2deleteledgermetadata) - Delete ledger metadata by key * [v2DeleteTransactionMetadata](docs/sdks/ledger/README.md#v2deletetransactionmetadata) - Delete metadata by key * [v2GetAccount](docs/sdks/ledger/README.md#v2getaccount) - Get account by its address +* [v2GetBalancesAggregated](docs/sdks/ledger/README.md#v2getbalancesaggregated) - Get the aggregated balances from selected accounts * [v2GetInfo](docs/sdks/ledger/README.md#v2getinfo) - Show server information * [v2GetLedger](docs/sdks/ledger/README.md#v2getledger) - Get a ledger * [v2GetLedgerInfo](docs/sdks/ledger/README.md#v2getledgerinfo) - Get information about a ledger * [v2GetTransaction](docs/sdks/ledger/README.md#v2gettransaction) - Get transaction from a ledger by its ID +* [v2GetVolumesWithBalances](docs/sdks/ledger/README.md#v2getvolumeswithbalances) - Get list of volumes with balances for (account/asset) +* [v2ListAccounts](docs/sdks/ledger/README.md#v2listaccounts) - List accounts from a ledger * [v2ListLedgers](docs/sdks/ledger/README.md#v2listledgers) - List ledgers +* [v2ListLogs](docs/sdks/ledger/README.md#v2listlogs) - List the logs from a ledger +* [v2ListTransactions](docs/sdks/ledger/README.md#v2listtransactions) - List transactions from a ledger * [v2ReadStats](docs/sdks/ledger/README.md#v2readstats) - Get statistics from a ledger * [v2RevertTransaction](docs/sdks/ledger/README.md#v2reverttransaction) - Revert a ledger transaction by its ID * [v2UpdateLedgerMetadata](docs/sdks/ledger/README.md#v2updateledgermetadata) - Update ledger metadata @@ -193,6 +198,7 @@ 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 @@ -281,12 +287,9 @@ async function run() { transactions: { transactions: [ { - metadata: { - key: "", - }, postings: [ { - amount: BigInt(100), + amount: BigInt("100"), asset: "COIN", destination: "users:002", source: "users:001", diff --git a/RELEASES.md b/RELEASES.md index adc573d1..fac79059 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -76,4 +76,14 @@ Based on: ### Generated - [typescript v2.3.1] . ### Releases -- [NPM v2.3.1] https://www.npmjs.com/package/@formance/formance-sdk/v/2.3.1 - . \ No newline at end of file +- [NPM v2.3.1] https://www.npmjs.com/package/@formance/formance-sdk/v/2.3.1 - . + +## 2024-05-02 11:54:31 +### Changes +Based on: +- OpenAPI Doc v2.0.0-rc.26 +- Speakeasy CLI 1.277.6 (2.319.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v2.3.2] . +### Releases +- [NPM v2.3.2] https://www.npmjs.com/package/@formance/formance-sdk/v/2.3.2 - . \ No newline at end of file diff --git a/docs/sdk/models/operations/paymentslistaccountsrequest.md b/docs/sdk/models/operations/paymentslistaccountsrequest.md new file mode 100644 index 00000000..bf75862b --- /dev/null +++ b/docs/sdk/models/operations/paymentslistaccountsrequest.md @@ -0,0 +1,11 @@ +# PaymentslistAccountsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `query` | Record | :heavy_minus_sign: | N/A | | +| `sort` | *string*[] | :heavy_minus_sign: | Fields used to sort payments (default is date:desc). | | \ No newline at end of file diff --git a/docs/sdk/models/operations/paymentslistaccountsresponse.md b/docs/sdk/models/operations/paymentslistaccountsresponse.md new file mode 100644 index 00000000..a5059a0e --- /dev/null +++ b/docs/sdk/models/operations/paymentslistaccountsresponse.md @@ -0,0 +1,11 @@ +# PaymentslistAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `accountsCursor` | [shared.AccountsCursor](../../../sdk/models/shared/accountscursor.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2countaccountsrequest.md b/docs/sdk/models/operations/v2countaccountsrequest.md index 854a5f81..71ffcf1a 100644 --- a/docs/sdk/models/operations/v2countaccountsrequest.md +++ b/docs/sdk/models/operations/v2countaccountsrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `requestBody` | Record | :heavy_minus_sign: | N/A | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `query` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2counttransactionsrequest.md b/docs/sdk/models/operations/v2counttransactionsrequest.md index 000ee96c..67254bc0 100644 --- a/docs/sdk/models/operations/v2counttransactionsrequest.md +++ b/docs/sdk/models/operations/v2counttransactionsrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `requestBody` | Record | :heavy_minus_sign: | N/A | | | `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | -| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `query` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2getbalancesaggregatedrequest.md b/docs/sdk/models/operations/v2getbalancesaggregatedrequest.md new file mode 100644 index 00000000..34042b00 --- /dev/null +++ b/docs/sdk/models/operations/v2getbalancesaggregatedrequest.md @@ -0,0 +1,11 @@ +# V2GetBalancesAggregatedRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `query` | Record | :heavy_minus_sign: | N/A | | +| `useInsertionDate` | *boolean* | :heavy_minus_sign: | Use insertion date instead of effective date | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2getbalancesaggregatedresponse.md b/docs/sdk/models/operations/v2getbalancesaggregatedresponse.md new file mode 100644 index 00000000..8ec24fcd --- /dev/null +++ b/docs/sdk/models/operations/v2getbalancesaggregatedresponse.md @@ -0,0 +1,11 @@ +# V2GetBalancesAggregatedResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `v2AggregateBalancesResponse` | [shared.V2AggregateBalancesResponse](../../../sdk/models/shared/v2aggregatebalancesresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2getvolumeswithbalancesrequest.md b/docs/sdk/models/operations/v2getvolumeswithbalancesrequest.md new file mode 100644 index 00000000..17f501f6 --- /dev/null +++ b/docs/sdk/models/operations/v2getvolumeswithbalancesrequest.md @@ -0,0 +1,15 @@ +# V2GetVolumesWithBalancesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `groupBy` | *number* | :heavy_minus_sign: | Group volumes and balance by the level of the segment of the address | | +| `insertionDate` | *boolean* | :heavy_minus_sign: | Use insertion date instead of effective date | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `query` | Record | :heavy_minus_sign: | N/A | | +| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2getvolumeswithbalancesresponse.md b/docs/sdk/models/operations/v2getvolumeswithbalancesresponse.md new file mode 100644 index 00000000..b38f82fa --- /dev/null +++ b/docs/sdk/models/operations/v2getvolumeswithbalancesresponse.md @@ -0,0 +1,11 @@ +# V2GetVolumesWithBalancesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `v2VolumesWithBalanceCursorResponse` | [shared.V2VolumesWithBalanceCursorResponse](../../../sdk/models/shared/v2volumeswithbalancecursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2listaccountsrequest.md b/docs/sdk/models/operations/v2listaccountsrequest.md new file mode 100644 index 00000000..7d254f49 --- /dev/null +++ b/docs/sdk/models/operations/v2listaccountsrequest.md @@ -0,0 +1,13 @@ +# V2ListAccountsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `expand` | *string* | :heavy_minus_sign: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `query` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2listaccountsresponse.md b/docs/sdk/models/operations/v2listaccountsresponse.md new file mode 100644 index 00000000..1343b88c --- /dev/null +++ b/docs/sdk/models/operations/v2listaccountsresponse.md @@ -0,0 +1,11 @@ +# V2ListAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `v2AccountsCursorResponse` | [shared.V2AccountsCursorResponse](../../../sdk/models/shared/v2accountscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2listlogsrequest.md b/docs/sdk/models/operations/v2listlogsrequest.md new file mode 100644 index 00000000..27d8be86 --- /dev/null +++ b/docs/sdk/models/operations/v2listlogsrequest.md @@ -0,0 +1,12 @@ +# V2ListLogsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `query` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2listlogsresponse.md b/docs/sdk/models/operations/v2listlogsresponse.md new file mode 100644 index 00000000..207f2826 --- /dev/null +++ b/docs/sdk/models/operations/v2listlogsresponse.md @@ -0,0 +1,11 @@ +# V2ListLogsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `v2LogsCursorResponse` | [shared.V2LogsCursorResponse](../../../sdk/models/shared/v2logscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2listtransactionsrequest.md b/docs/sdk/models/operations/v2listtransactionsrequest.md new file mode 100644 index 00000000..0e5c9163 --- /dev/null +++ b/docs/sdk/models/operations/v2listtransactionsrequest.md @@ -0,0 +1,13 @@ +# V2ListTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | Parameter used in pagination requests. Maximum page size is set to 15.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when this parameter is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== | +| `expand` | *string* | :heavy_minus_sign: | N/A | | +| `ledger` | *string* | :heavy_check_mark: | Name of the ledger. | ledger001 | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of results to return per page.
| | +| `pit` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `query` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/operations/v2listtransactionsresponse.md b/docs/sdk/models/operations/v2listtransactionsresponse.md new file mode 100644 index 00000000..b1dc805b --- /dev/null +++ b/docs/sdk/models/operations/v2listtransactionsresponse.md @@ -0,0 +1,11 @@ +# V2ListTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `v2TransactionsCursorResponse` | [shared.V2TransactionsCursorResponse](../../../sdk/models/shared/v2transactionscursorresponse.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/sdk/models/shared/accountscursor.md b/docs/sdk/models/shared/accountscursor.md new file mode 100644 index 00000000..46c2a522 --- /dev/null +++ b/docs/sdk/models/shared/accountscursor.md @@ -0,0 +1,8 @@ +# AccountsCursor + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `cursor` | [shared.Cursor](../../../sdk/models/shared/cursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/accountscursorresponse.md b/docs/sdk/models/shared/accountscursorresponse.md index 3fbe3fc2..8d3b6a9e 100644 --- a/docs/sdk/models/shared/accountscursorresponse.md +++ b/docs/sdk/models/shared/accountscursorresponse.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `cursor` | [shared.Cursor](../../../sdk/models/shared/cursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `cursor` | [shared.AccountsCursorResponseCursor](../../../sdk/models/shared/accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/accountscursorresponsecursor.md b/docs/sdk/models/shared/accountscursorresponsecursor.md new file mode 100644 index 00000000..70d50ada --- /dev/null +++ b/docs/sdk/models/shared/accountscursorresponsecursor.md @@ -0,0 +1,12 @@ +# AccountsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `data` | [shared.Account](../../../sdk/models/shared/account.md)[] | :heavy_check_mark: | N/A | | +| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | +| `next` | *string* | :heavy_minus_sign: | N/A | | +| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | +| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/sdk/models/shared/cursor.md b/docs/sdk/models/shared/cursor.md index 2550298e..169a147c 100644 --- a/docs/sdk/models/shared/cursor.md +++ b/docs/sdk/models/shared/cursor.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `data` | [shared.Account](../../../sdk/models/shared/account.md)[] | :heavy_check_mark: | N/A | | -| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | -| `next` | *string* | :heavy_minus_sign: | N/A | | -| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | -| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `data` | [shared.PaymentsAccount](../../../sdk/models/shared/paymentsaccount.md)[] | :heavy_check_mark: | N/A | | +| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | +| `next` | *string* | :heavy_minus_sign: | N/A | | +| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | +| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2accountscursorresponse.md b/docs/sdk/models/shared/v2accountscursorresponse.md new file mode 100644 index 00000000..d996d6de --- /dev/null +++ b/docs/sdk/models/shared/v2accountscursorresponse.md @@ -0,0 +1,8 @@ +# V2AccountsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `cursor` | [shared.V2AccountsCursorResponseCursor](../../../sdk/models/shared/v2accountscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2accountscursorresponsecursor.md b/docs/sdk/models/shared/v2accountscursorresponsecursor.md new file mode 100644 index 00000000..ef314f88 --- /dev/null +++ b/docs/sdk/models/shared/v2accountscursorresponsecursor.md @@ -0,0 +1,12 @@ +# V2AccountsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `data` | [shared.V2Account](../../../sdk/models/shared/v2account.md)[] | :heavy_check_mark: | N/A | | +| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | +| `next` | *string* | :heavy_minus_sign: | N/A | | +| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | +| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2aggregatebalancesresponse.md b/docs/sdk/models/shared/v2aggregatebalancesresponse.md new file mode 100644 index 00000000..3bc78dcd --- /dev/null +++ b/docs/sdk/models/shared/v2aggregatebalancesresponse.md @@ -0,0 +1,8 @@ +# V2AggregateBalancesResponse + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `data` | Record | :heavy_check_mark: | N/A | {
"USD": 100,
"EUR": 12
} | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2log.md b/docs/sdk/models/shared/v2log.md new file mode 100644 index 00000000..bd974e2f --- /dev/null +++ b/docs/sdk/models/shared/v2log.md @@ -0,0 +1,12 @@ +# V2Log + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `data` | Record | :heavy_check_mark: | N/A | | +| `date` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | N/A | | +| `hash` | *string* | :heavy_check_mark: | N/A | 9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e | +| `id` | *BigInt* | :heavy_check_mark: | N/A | 1234 | +| `type` | [shared.V2LogType](../../../sdk/models/shared/v2logtype.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2logscursorresponse.md b/docs/sdk/models/shared/v2logscursorresponse.md new file mode 100644 index 00000000..bb8d3481 --- /dev/null +++ b/docs/sdk/models/shared/v2logscursorresponse.md @@ -0,0 +1,8 @@ +# V2LogsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `cursor` | [shared.V2LogsCursorResponseCursor](../../../sdk/models/shared/v2logscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2logscursorresponsecursor.md b/docs/sdk/models/shared/v2logscursorresponsecursor.md new file mode 100644 index 00000000..c6755c40 --- /dev/null +++ b/docs/sdk/models/shared/v2logscursorresponsecursor.md @@ -0,0 +1,12 @@ +# V2LogsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `data` | [shared.V2Log](../../../sdk/models/shared/v2log.md)[] | :heavy_check_mark: | N/A | | +| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | +| `next` | *string* | :heavy_minus_sign: | N/A | | +| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | +| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2logtype.md b/docs/sdk/models/shared/v2logtype.md new file mode 100644 index 00000000..d5c4d8b6 --- /dev/null +++ b/docs/sdk/models/shared/v2logtype.md @@ -0,0 +1,10 @@ +# V2LogType + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `NewTransaction` | NEW_TRANSACTION | +| `SetMetadata` | SET_METADATA | +| `RevertedTransaction` | REVERTED_TRANSACTION | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2transactionscursorresponse.md b/docs/sdk/models/shared/v2transactionscursorresponse.md new file mode 100644 index 00000000..57fef18c --- /dev/null +++ b/docs/sdk/models/shared/v2transactionscursorresponse.md @@ -0,0 +1,8 @@ +# V2TransactionsCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `cursor` | [shared.V2TransactionsCursorResponseCursor](../../../sdk/models/shared/v2transactionscursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2transactionscursorresponsecursor.md b/docs/sdk/models/shared/v2transactionscursorresponsecursor.md new file mode 100644 index 00000000..385ded23 --- /dev/null +++ b/docs/sdk/models/shared/v2transactionscursorresponsecursor.md @@ -0,0 +1,12 @@ +# V2TransactionsCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `data` | [shared.V2ExpandedTransaction](../../../sdk/models/shared/v2expandedtransaction.md)[] | :heavy_check_mark: | N/A | | +| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | +| `next` | *string* | :heavy_minus_sign: | N/A | | +| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | +| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2volumeswithbalance.md b/docs/sdk/models/shared/v2volumeswithbalance.md new file mode 100644 index 00000000..f8cecf42 --- /dev/null +++ b/docs/sdk/models/shared/v2volumeswithbalance.md @@ -0,0 +1,12 @@ +# V2VolumesWithBalance + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `account` | *string* | :heavy_check_mark: | N/A | +| `asset` | *string* | :heavy_check_mark: | N/A | +| `balance` | *BigInt* | :heavy_check_mark: | N/A | +| `input` | *BigInt* | :heavy_check_mark: | N/A | +| `output` | *BigInt* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md b/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md new file mode 100644 index 00000000..4f02646a --- /dev/null +++ b/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md @@ -0,0 +1,8 @@ +# V2VolumesWithBalanceCursorResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | [shared.V2VolumesWithBalanceCursorResponseCursor](../../../sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md b/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md new file mode 100644 index 00000000..7e963f6c --- /dev/null +++ b/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md @@ -0,0 +1,12 @@ +# V2VolumesWithBalanceCursorResponseCursor + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `data` | [shared.V2VolumesWithBalance](../../../sdk/models/shared/v2volumeswithbalance.md)[] | :heavy_check_mark: | N/A | | +| `hasMore` | *boolean* | :heavy_check_mark: | N/A | false | +| `next` | *string* | :heavy_minus_sign: | N/A | | +| `pageSize` | *number* | :heavy_check_mark: | N/A | 15 | +| `previous` | *string* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= | \ No newline at end of file diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index a0ef1356..d707da76 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -28,19 +28,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.auth.createClient({ - metadata: { - "key": "", - }, name: "", - postLogoutRedirectUris: [ - "", - ], - redirectUris: [ - "", - ], - scopes: [ - "", - ], }); // Handle the result @@ -83,12 +71,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.auth.createSecret({ - createSecretRequest: { - metadata: { - "key": "", - }, - name: "", - }, clientId: "", }); @@ -385,21 +367,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.auth.updateClient({ - updateClientRequest: { - metadata: { - "key": "", - }, - name: "", - postLogoutRedirectUris: [ - "", - ], - redirectUris: [ - "", - ], - scopes: [ - "", - ], - }, clientId: "", }); diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index bed83539..6604cfa7 100644 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -34,11 +34,16 @@ * [v2DeleteLedgerMetadata](#v2deleteledgermetadata) - Delete ledger metadata by key * [v2DeleteTransactionMetadata](#v2deletetransactionmetadata) - Delete metadata by key * [v2GetAccount](#v2getaccount) - Get account by its address +* [v2GetBalancesAggregated](#v2getbalancesaggregated) - Get the aggregated balances from selected accounts * [v2GetInfo](#v2getinfo) - Show server information * [v2GetLedger](#v2getledger) - Get a ledger * [v2GetLedgerInfo](#v2getledgerinfo) - Get information about a ledger * [v2GetTransaction](#v2gettransaction) - Get transaction from a ledger by its ID +* [v2GetVolumesWithBalances](#v2getvolumeswithbalances) - Get list of volumes with balances for (account/asset) +* [v2ListAccounts](#v2listaccounts) - List accounts from a ledger * [v2ListLedgers](#v2listledgers) - List ledgers +* [v2ListLogs](#v2listlogs) - List the logs from a ledger +* [v2ListTransactions](#v2listtransactions) - List transactions from a ledger * [v2ReadStats](#v2readstats) - Get statistics from a ledger * [v2RevertTransaction](#v2reverttransaction) - Revert a ledger transaction by its ID * [v2UpdateLedgerMetadata](#v2updateledgermetadata) - Update ledger metadata @@ -61,12 +66,9 @@ async function run() { transactions: { transactions: [ { - metadata: { - "key": "", - }, postings: [ { - amount: BigInt(100), + amount: BigInt("100"), asset: "COIN", destination: "users:002", source: "users:001", @@ -120,11 +122,8 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.addMetadataOnTransaction({ - requestBody: { - "key": "", - }, ledger: "ledger001", - txid: BigInt(1234), + txid: BigInt("1234"), }); // Handle the result @@ -218,9 +217,6 @@ async function run() { const result = await sdk.ledger.countAccounts({ address: "users:.+", ledger: "ledger001", - metadata: { - "key": "", - }, }); // Handle the result @@ -267,7 +263,6 @@ async function run() { account: "users:001", destination: "users:001", ledger: "ledger001", - metadata: {}, reference: "ref:001", source: "users:001", }); @@ -314,12 +309,9 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.createTransaction({ postTransaction: { - metadata: { - "key": "", - }, postings: [ { - amount: BigInt(100), + amount: BigInt("100"), asset: "COIN", destination: "users:002", source: "users:001", @@ -652,7 +644,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.getTransaction({ ledger: "ledger001", - txid: BigInt(1234), + txid: BigInt("1234"), }); // Handle the result @@ -701,9 +693,6 @@ async function run() { balance: 2400, cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", ledger: "ledger001", - metadata: { - "key": "", - }, paginationToken: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", }); @@ -799,9 +788,6 @@ async function run() { cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", destination: "users:001", ledger: "ledger001", - metadata: { - "key": "", - }, reference: "ref:001", source: "users:001", }); @@ -893,7 +879,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.revertTransaction({ ledger: "ledger001", - txid: BigInt(1234), + txid: BigInt("1234"), }); // Handle the result @@ -941,9 +927,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.runScript({ script: { - metadata: { - "key": "", - }, plain: "vars { account $user } @@ -1057,7 +1040,7 @@ async function run() { "admin": "true", }, dryRun: true, - id: BigInt(1234), + id: BigInt("1234"), ledger: "ledger001", }); @@ -1151,9 +1134,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.v2CountAccounts({ - requestBody: { - "key": "", - }, ledger: "ledger001", }); @@ -1198,9 +1178,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.v2CountTransactions({ - requestBody: { - "key": "", - }, ledger: "ledger001", }); @@ -1238,7 +1215,6 @@ Bulk request ```typescript import { SDK } from "@formance/formance-sdk"; -import { V2TargetType } from "@formance/formance-sdk/sdk/models/shared"; const sdk = new SDK({ authorization: "", @@ -1249,13 +1225,6 @@ async function run() { requestBody: [ { action: "", - data: { - metadata: { - "key": "", - }, - targetId: "", - targetType: V2TargetType.Account, - }, }, ], ledger: "ledger001", @@ -1357,7 +1326,7 @@ async function run() { }, postings: [ { - amount: BigInt(100), + amount: BigInt("100"), asset: "COIN", destination: "users:002", source: "users:001", @@ -1513,7 +1482,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.v2DeleteTransactionMetadata({ - id: BigInt(1234), + id: BigInt("1234"), key: "foo", ledger: "ledger001", }); @@ -1589,6 +1558,50 @@ run(); | errors.V2ErrorResponse | default | application/json | | errors.SDKError | 4xx-5xx | */* | +## v2GetBalancesAggregated + +Get the aggregated balances from selected accounts + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + authorization: "", +}); + +async function run() { + const result = await sdk.ledger.v2GetBalancesAggregated({ + ledger: "ledger001", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2GetBalancesAggregatedRequest](../../sdk/models/operations/v2getbalancesaggregatedrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | + + +### Response + +**Promise<[operations.V2GetBalancesAggregatedResponse](../../sdk/models/operations/v2getbalancesaggregatedresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| errors.V2ErrorResponse | default | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## v2GetInfo Show server information @@ -1733,7 +1746,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.v2GetTransaction({ - id: BigInt(1234), + id: BigInt("1234"), ledger: "ledger001", }); @@ -1763,6 +1776,96 @@ run(); | errors.V2ErrorResponse | default | application/json | | errors.SDKError | 4xx-5xx | */* | +## v2GetVolumesWithBalances + +Get list of volumes with balances for (account/asset) + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + authorization: "", +}); + +async function run() { + const result = await sdk.ledger.v2GetVolumesWithBalances({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2GetVolumesWithBalancesRequest](../../sdk/models/operations/v2getvolumeswithbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | + + +### Response + +**Promise<[operations.V2GetVolumesWithBalancesResponse](../../sdk/models/operations/v2getvolumeswithbalancesresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| errors.V2ErrorResponse | default | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## v2ListAccounts + +List accounts from a ledger, sorted by address in descending order. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + authorization: "", +}); + +async function run() { + const result = await sdk.ledger.v2ListAccounts({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListAccountsRequest](../../sdk/models/operations/v2listaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | + + +### Response + +**Promise<[operations.V2ListAccountsResponse](../../sdk/models/operations/v2listaccountsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| errors.V2ErrorResponse | default | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## v2ListLedgers List ledgers @@ -1807,6 +1910,96 @@ run(); | errors.V2ErrorResponse | default | application/json | | errors.SDKError | 4xx-5xx | */* | +## v2ListLogs + +List the logs from a ledger, sorted by ID in descending order. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + authorization: "", +}); + +async function run() { + const result = await sdk.ledger.v2ListLogs({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListLogsRequest](../../sdk/models/operations/v2listlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | + + +### Response + +**Promise<[operations.V2ListLogsResponse](../../sdk/models/operations/v2listlogsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| errors.V2ErrorResponse | default | application/json | +| errors.SDKError | 4xx-5xx | */* | + +## v2ListTransactions + +List transactions from a ledger, sorted by id in descending order. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + authorization: "", +}); + +async function run() { + const result = await sdk.ledger.v2ListTransactions({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListTransactionsRequest](../../sdk/models/operations/v2listtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | + + +### Response + +**Promise<[operations.V2ListTransactionsResponse](../../sdk/models/operations/v2listtransactionsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| errors.V2ErrorResponse | default | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## v2ReadStats Get statistics from a ledger. (aggregate metrics on accounts and transactions) @@ -1867,7 +2060,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.v2RevertTransaction({ - id: BigInt(1234), + id: BigInt("1234"), ledger: "ledger001", }); diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index 31449793..648d525e 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -99,9 +99,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.createTrigger({ event: "", - vars: { - "key": "", - }, workflowID: "", }); @@ -713,9 +710,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.runWorkflow({ - requestBody: { - "key": "", - }, workflowID: "", }); @@ -760,9 +754,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.sendEvent({ - requestBody: { - name: "", - }, instanceID: "", }); @@ -807,9 +798,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.testTrigger({ - requestBody: { - "key": "", - }, triggerID: "", }); @@ -899,9 +887,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.v2CreateTrigger({ event: "", - vars: { - "key": "", - }, workflowID: "", }); @@ -1521,9 +1506,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.v2RunWorkflow({ - requestBody: { - "key": "", - }, workflowID: "", }); @@ -1568,9 +1550,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.orchestration.v2SendEvent({ - requestBody: { - name: "", - }, instanceID: "", }); diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index 5340cc7f..27b036d8 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -32,6 +32,7 @@ * [listTransferInitiations](#listtransferinitiations) - List Transfer Initiations * [paymentsgetAccount](#paymentsgetaccount) - Get an account * [paymentsgetServerInfo](#paymentsgetserverinfo) - Get server info +* [paymentslistAccounts](#paymentslistaccounts) - List accounts * [~~readConnectorConfig~~](#readconnectorconfig) - Read the config of a connector :warning: **Deprecated** * [readConnectorConfigV1](#readconnectorconfigv1) - Read the config of a connector * [removeAccountFromPool](#removeaccountfrompool) - Remove an account from a pool @@ -109,7 +110,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.connectorsTransfer({ transferRequest: { - amount: BigInt(100), + amount: BigInt("100"), asset: "USD", destination: "acct_1Gqj58KZcSIg2N2q", source: "acct_1Gqj58KZcSIg2N2q", @@ -160,9 +161,6 @@ async function run() { const result = await sdk.payments.createAccount({ connectorID: "", createdAt: new Date("2024-08-19T02:15:08.668Z"), - metadata: { - "key": "", - }, reference: "", type: AccountType.Unknown, }); @@ -209,9 +207,6 @@ async function run() { const result = await sdk.payments.createBankAccount({ connectorID: "", country: "GB", - metadata: { - "key": "", - }, name: "My account", }); @@ -256,7 +251,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.createPayment({ - amount: BigInt(100), + amount: BigInt("100"), asset: "USD", connectorID: "", createdAt: new Date("2024-11-09T01:03:21.153Z"), @@ -353,13 +348,10 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.createTransferInitiation({ - amount: BigInt(256698), + amount: BigInt("256698"), asset: "USD", description: "Multi-tiered incremental methodology", destinationAccountID: "", - metadata: { - "key": "", - }, reference: "XXX", scheduledAt: new Date("2023-05-04T22:47:54.364Z"), sourceAccountID: "", @@ -541,9 +533,6 @@ async function run() { const result = await sdk.payments.getAccountBalances({ accountId: "", cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - sort: [ - "", - ], }); // Handle the result @@ -985,9 +974,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.listBankAccounts({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - sort: [ - "", - ], }); // Handle the result @@ -1164,9 +1150,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.listPayments({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - sort: [ - "", - ], }); // Handle the result @@ -1210,9 +1193,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.listPools({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - sort: [ - "", - ], }); // Handle the result @@ -1256,9 +1236,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.listTransferInitiations({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - sort: [ - "", - ], }); // Handle the result @@ -1369,6 +1346,49 @@ run(); | --------------- | --------------- | --------------- | | errors.SDKError | 4xx-5xx | */* | +## paymentslistAccounts + +List accounts + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + authorization: "", +}); + +async function run() { + const result = await sdk.payments.paymentslistAccounts({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PaymentslistAccountsRequest](../../sdk/models/operations/paymentslistaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `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. | + + +### Response + +**Promise<[operations.PaymentslistAccountsResponse](../../sdk/models/operations/paymentslistaccountsresponse.md)>** +### Errors + +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4xx-5xx | */* | + ## ~~readConnectorConfig~~ Read connector config @@ -1658,7 +1678,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.payments.reverseTransferInitiation({ reverseTransferInitiationRequest: { - amount: BigInt(327549), + amount: BigInt("327549"), asset: "USD", description: "Streamlined high-level local area network", metadata: { diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index a9898d1f..cefff09e 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -36,7 +36,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.wallets.confirmHold({ confirmHoldRequest: { - amount: BigInt(100), + amount: BigInt("100"), final: true, }, holdId: "", @@ -83,9 +83,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.wallets.createBalance({ - createBalanceRequest: { - name: "", - }, id: "", }); @@ -179,7 +176,7 @@ async function run() { const result = await sdk.wallets.creditWallet({ creditWalletRequest: { amount: { - amount: BigInt(100), + amount: BigInt("100"), asset: "USD/2", }, metadata: { @@ -238,16 +235,9 @@ async function run() { const result = await sdk.wallets.debitWallet({ debitWalletRequest: { amount: { - amount: BigInt(100), + amount: BigInt("100"), asset: "USD/2", }, - balances: [ - "", - ], - destination: { - identifier: "", - type: "", - }, metadata: { "key": "", }, @@ -387,9 +377,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.wallets.getHolds({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - metadata: { - "key": "", - }, }); // Handle the result @@ -607,9 +594,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.wallets.listWallets({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - metadata: { - "key": "", - }, }); // Handle the result @@ -653,11 +637,6 @@ const sdk = new SDK({ async function run() { const result = await sdk.wallets.updateWallet({ - requestBody: { - metadata: { - "key": "", - }, - }, id: "", }); diff --git a/gen.yaml b/gen.yaml index e46b9211..c50a3a2a 100755 --- a/gen.yaml +++ b/gen.yaml @@ -12,7 +12,7 @@ generation: comments: {} telemetryEnabled: false typescript: - version: 2.3.1 + version: 2.3.2 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/jsr.json b/jsr.json index b9ee886d..ed09256e 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@formance/formance-sdk", - "version": "2.3.1", + "version": "2.3.2", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/overlay.yaml b/overlay.yaml new file mode 100644 index 00000000..3269b336 --- /dev/null +++ b/overlay.yaml @@ -0,0 +1,45 @@ +overlay: 1.0.0 +info: + title: Overlay spec.json => updated-spec.json + version: 0.0.0 +actions: + - target: $["paths"]["/api/ledger/v2/{ledger}/accounts"]["head"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/accounts"]["head"]["requestBody"] + remove: true + - target: $["paths"]["/api/ledger/v2/{ledger}/accounts"]["get"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/accounts"]["get"]["requestBody"] + remove: true + - target: $["paths"]["/api/ledger/v2/{ledger}/transactions"]["head"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/transactions"]["head"]["requestBody"] + remove: true + - target: $["paths"]["/api/ledger/v2/{ledger}/transactions"]["get"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/transactions"]["get"]["requestBody"] + remove: true + - target: $["paths"]["/api/ledger/v2/{ledger}/aggregate/balances"]["get"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/aggregate/balances"]["get"]["requestBody"] + remove: true + - target: $["paths"]["/api/ledger/v2/{ledger}/volumes"]["get"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/volumes"]["get"]["requestBody"] + remove: true + - target: $["paths"]["/api/ledger/v2/{ledger}/logs"]["get"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/ledger/v2/{ledger}/logs"]["get"]["requestBody"] + remove: true + - target: $["paths"]["/api/payments/accounts"]["get"]["parameters"] + update: + - {"name": "query", "in": "query", "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}} + - target: $["paths"]["/api/payments/accounts"]["get"]["requestBody"] + remove: true diff --git a/package-lock.json b/package-lock.json index b3e91015..41274fc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@formance/formance-sdk", - "version": "2.3.1", + "version": "2.3.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@formance/formance-sdk", - "version": "2.3.1", + "version": "2.3.2", "devDependencies": { "@types/jsonpath": "^0.2.4", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index a31eb2dd..1fc131b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@formance/formance-sdk", - "version": "2.3.1", + "version": "2.3.2", "author": "Formance", "main": "./index.js", "sideEffects": false, diff --git a/src/lib/config.ts b/src/lib/config.ts index ed6064fc..33b0f003 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -54,7 +54,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "v2.0.0-rc.26", - sdkVersion: "2.3.1", - genVersion: "2.317.0", - userAgent: "speakeasy-sdk/typescript 2.3.1 2.317.0 v2.0.0-rc.26 @formance/formance-sdk", + sdkVersion: "2.3.2", + genVersion: "2.319.7", + userAgent: "speakeasy-sdk/typescript 2.3.2 2.319.7 v2.0.0-rc.26 @formance/formance-sdk", } as const; diff --git a/src/sdk/auth.ts b/src/sdk/auth.ts index 37c950df..0fed1cf5 100644 --- a/src/sdk/auth.ts +++ b/src/sdk/auth.ts @@ -98,6 +98,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -189,6 +190,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -277,6 +279,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -366,6 +369,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -432,6 +436,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -506,6 +511,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -594,6 +600,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -685,6 +692,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -774,6 +782,7 @@ export class Auth extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/ledger.ts b/src/sdk/ledger.ts index 36cf0dc8..eba67449 100644 --- a/src/sdk/ledger.ts +++ b/src/sdk/ledger.ts @@ -104,6 +104,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -212,6 +213,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -315,6 +317,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -419,6 +422,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -542,6 +546,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -648,6 +653,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -755,6 +761,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -869,6 +876,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -983,6 +991,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1067,6 +1076,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1168,6 +1178,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1269,6 +1280,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1376,6 +1388,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1502,6 +1515,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1623,6 +1637,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1758,6 +1773,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1863,6 +1879,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1977,6 +1994,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -2092,6 +2110,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2181,6 +2200,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2298,6 +2318,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2414,6 +2435,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2456,7 +2478,6 @@ export class Ledger extends ClientSDK { ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Content-Type", "application/json"); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( @@ -2464,7 +2485,7 @@ export class Ledger extends ClientSDK { (value$) => operations.V2CountAccountsRequest$.outboundSchema.parse(value$), "Input validation failed" ); - const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true }); + const body$ = null; const pathParams$ = { ledger: enc$.encodeSimple("ledger", payload$.ledger, { @@ -2476,6 +2497,7 @@ export class Ledger extends ClientSDK { const query$ = [ enc$.encodeForm("pit", payload$.pit, { explode: true, charEncoding: "percent" }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), ] .filter(Boolean) .join("&"); @@ -2515,6 +2537,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2559,7 +2582,6 @@ export class Ledger extends ClientSDK { ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); - headers$.set("Content-Type", "application/json"); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( @@ -2567,7 +2589,7 @@ export class Ledger extends ClientSDK { (value$) => operations.V2CountTransactionsRequest$.outboundSchema.parse(value$), "Input validation failed" ); - const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true }); + const body$ = null; const pathParams$ = { ledger: enc$.encodeSimple("ledger", payload$.ledger, { @@ -2581,6 +2603,7 @@ export class Ledger extends ClientSDK { const query$ = [ enc$.encodeForm("pit", payload$.pit, { explode: true, charEncoding: "percent" }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), ] .filter(Boolean) .join("&"); @@ -2620,6 +2643,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2719,6 +2743,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, [200, 400], "application/json")) { @@ -2821,6 +2846,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2932,6 +2958,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3046,6 +3073,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, "2XX")) { @@ -3135,6 +3163,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3241,6 +3270,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, "2XX")) { @@ -3351,6 +3381,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3389,6 +3420,119 @@ export class Ledger extends ClientSDK { } } + /** + * Get the aggregated balances from selected accounts + */ + async v2GetBalancesAggregated( + input: operations.V2GetBalancesAggregatedRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.V2GetBalancesAggregatedRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const pathParams$ = { + ledger: enc$.encodeSimple("ledger", payload$.ledger, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/api/ledger/v2/{ledger}/aggregate/balances")( + pathParams$ + ); + + const query$ = [ + enc$.encodeForm("pit", payload$.pit, { explode: true, charEncoding: "percent" }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), + enc$.encodeForm("useInsertionDate", payload$.useInsertionDate, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.authorization === "function") { + security$ = { authorization: await this.options$.authorization() }; + } else if (this.options$.authorization) { + security$ = { authorization: this.options$.authorization }; + } else { + security$ = {}; + } + const context = { + operationID: "v2GetBalancesAggregated", + oAuth2Scopes: [], + securitySource: this.options$.authorization, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["default"] }; + const request = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.V2GetBalancesAggregatedResponse$.inboundSchema.parse({ + ...responseFields$, + V2AggregateBalancesResponse: val$, + }); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, "default", "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.V2ErrorResponse$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + } + /** * Show server information */ @@ -3435,6 +3579,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3536,6 +3681,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3637,6 +3783,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3746,6 +3893,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3785,31 +3933,170 @@ export class Ledger extends ClientSDK { } /** - * List ledgers + * Get list of volumes with balances for (account/asset) */ - async v2ListLedgers( - input: operations.V2ListLedgersRequest, + async v2GetVolumesWithBalances( + input: operations.V2GetVolumesWithBalancesRequest, options?: RequestOptions - ): Promise { + ): Promise { const headers$ = new Headers(); headers$.set("user-agent", SDK_METADATA.userAgent); headers$.set("Accept", "application/json"); const payload$ = schemas$.parse( input, - (value$) => operations.V2ListLedgersRequest$.outboundSchema.parse(value$), + (value$) => operations.V2GetVolumesWithBalancesRequest$.outboundSchema.parse(value$), "Input validation failed" ); const body$ = null; - const path$ = this.templateURLComponent("/api/ledger/v2")(); + const pathParams$ = { + ledger: enc$.encodeSimple("ledger", payload$.ledger, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/api/ledger/v2/{ledger}/volumes")(pathParams$); + + const query$ = [ + enc$.encodeForm("cursor", payload$.cursor, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("endTime", payload$.endTime, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("groupBy", payload$.groupBy, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("insertionDate", payload$.insertionDate, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("pageSize", payload$.pageSize, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), + enc$.encodeForm("startTime", payload$.startTime, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.authorization === "function") { + security$ = { authorization: await this.options$.authorization() }; + } else if (this.options$.authorization) { + security$ = { authorization: this.options$.authorization }; + } else { + security$ = {}; + } + const context = { + operationID: "v2GetVolumesWithBalances", + oAuth2Scopes: [], + securitySource: this.options$.authorization, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["default"] }; + const request = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.V2GetVolumesWithBalancesResponse$.inboundSchema.parse({ + ...responseFields$, + V2VolumesWithBalanceCursorResponse: val$, + }); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, "default", "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.V2ErrorResponse$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + } + + /** + * List accounts from a ledger + * + * @remarks + * List accounts from a ledger, sorted by address in descending order. + */ + async v2ListAccounts( + input: operations.V2ListAccountsRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.V2ListAccountsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const pathParams$ = { + ledger: enc$.encodeSimple("ledger", payload$.ledger, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/api/ledger/v2/{ledger}/accounts")(pathParams$); const query$ = [ enc$.encodeForm("cursor", payload$.cursor, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("expand", payload$.expand, { explode: true, charEncoding: "percent" }), enc$.encodeForm("pageSize", payload$.pageSize, { explode: true, charEncoding: "percent", }), + enc$.encodeForm("pit", payload$.pit, { explode: true, charEncoding: "percent" }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), ] .filter(Boolean) .join("&"); @@ -3823,7 +4110,7 @@ export class Ledger extends ClientSDK { security$ = {}; } const context = { - operationID: "v2ListLedgers", + operationID: "v2ListAccounts", oAuth2Scopes: [], securitySource: this.options$.authorization, }; @@ -3849,6 +4136,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3856,9 +4144,346 @@ export class Ledger extends ClientSDK { const result = schemas$.parse( responseBody, (val$) => { - return operations.V2ListLedgersResponse$.inboundSchema.parse({ + return operations.V2ListAccountsResponse$.inboundSchema.parse({ ...responseFields$, - V2LedgerListResponse: val$, + V2AccountsCursorResponse: val$, + }); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, "default", "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.V2ErrorResponse$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + } + + /** + * List ledgers + */ + async v2ListLedgers( + input: operations.V2ListLedgersRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.V2ListLedgersRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/api/ledger/v2")(); + + const query$ = [ + enc$.encodeForm("cursor", payload$.cursor, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("pageSize", payload$.pageSize, { + explode: true, + charEncoding: "percent", + }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.authorization === "function") { + security$ = { authorization: await this.options$.authorization() }; + } else if (this.options$.authorization) { + security$ = { authorization: this.options$.authorization }; + } else { + security$ = {}; + } + const context = { + operationID: "v2ListLedgers", + oAuth2Scopes: [], + securitySource: this.options$.authorization, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["default"] }; + const request = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.V2ListLedgersResponse$.inboundSchema.parse({ + ...responseFields$, + V2LedgerListResponse: val$, + }); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, "default", "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.V2ErrorResponse$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + } + + /** + * List the logs from a ledger + * + * @remarks + * List the logs from a ledger, sorted by ID in descending order. + */ + async v2ListLogs( + input: operations.V2ListLogsRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.V2ListLogsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const pathParams$ = { + ledger: enc$.encodeSimple("ledger", payload$.ledger, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/api/ledger/v2/{ledger}/logs")(pathParams$); + + const query$ = [ + enc$.encodeForm("cursor", payload$.cursor, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("pageSize", payload$.pageSize, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("pit", payload$.pit, { explode: true, charEncoding: "percent" }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.authorization === "function") { + security$ = { authorization: await this.options$.authorization() }; + } else if (this.options$.authorization) { + security$ = { authorization: this.options$.authorization }; + } else { + security$ = {}; + } + const context = { + operationID: "v2ListLogs", + oAuth2Scopes: [], + securitySource: this.options$.authorization, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["default"] }; + const request = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.V2ListLogsResponse$.inboundSchema.parse({ + ...responseFields$, + V2LogsCursorResponse: val$, + }); + }, + "Response validation failed" + ); + return result; + } else if (this.matchResponse(response, "default", "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return errors.V2ErrorResponse$.inboundSchema.parse({ + ...responseFields$, + ...val$, + }); + }, + "Response validation failed" + ); + throw result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + } + + /** + * List transactions from a ledger + * + * @remarks + * List transactions from a ledger, sorted by id in descending order. + */ + async v2ListTransactions( + input: operations.V2ListTransactionsRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.V2ListTransactionsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const pathParams$ = { + ledger: enc$.encodeSimple("ledger", payload$.ledger, { + explode: false, + charEncoding: "percent", + }), + }; + const path$ = this.templateURLComponent("/api/ledger/v2/{ledger}/transactions")( + pathParams$ + ); + + const query$ = [ + enc$.encodeForm("cursor", payload$.cursor, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("expand", payload$.expand, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("pageSize", payload$.pageSize, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeForm("pit", payload$.pit, { explode: true, charEncoding: "percent" }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.authorization === "function") { + security$ = { authorization: await this.options$.authorization() }; + } else if (this.options$.authorization) { + security$ = { authorization: this.options$.authorization }; + } else { + security$ = {}; + } + const context = { + operationID: "v2ListTransactions", + oAuth2Scopes: [], + securitySource: this.options$.authorization, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["default"] }; + const request = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.V2ListTransactionsResponse$.inboundSchema.parse({ + ...responseFields$, + V2TransactionsCursorResponse: val$, }); }, "Response validation failed" @@ -3954,6 +4579,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -4066,6 +4692,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -4168,6 +4795,7 @@ export class Ledger extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { diff --git a/src/sdk/models/operations/index.ts b/src/sdk/models/operations/index.ts index 3b886ac1..c817de37 100644 --- a/src/sdk/models/operations/index.ts +++ b/src/sdk/models/operations/index.ts @@ -94,6 +94,7 @@ export * from "./listworkflows"; export * from "./orchestrationgetserverinfo"; export * from "./paymentsgetaccount"; export * from "./paymentsgetserverinfo"; +export * from "./paymentslistaccounts"; export * from "./readclient"; export * from "./readconnectorconfig"; export * from "./readconnectorconfigv1"; @@ -140,6 +141,7 @@ export * from "./v2deletetransactionmetadata"; export * from "./v2deletetrigger"; export * from "./v2deleteworkflow"; export * from "./v2getaccount"; +export * from "./v2getbalancesaggregated"; export * from "./v2getinfo"; export * from "./v2getinstance"; export * from "./v2getinstancehistory"; @@ -148,9 +150,13 @@ export * from "./v2getledger"; export * from "./v2getledgerinfo"; export * from "./v2getserverinfo"; export * from "./v2gettransaction"; +export * from "./v2getvolumeswithbalances"; export * from "./v2getworkflow"; +export * from "./v2listaccounts"; export * from "./v2listinstances"; export * from "./v2listledgers"; +export * from "./v2listlogs"; +export * from "./v2listtransactions"; export * from "./v2listtriggers"; export * from "./v2listtriggersoccurrences"; export * from "./v2listworkflows"; diff --git a/src/sdk/models/operations/paymentslistaccounts.ts b/src/sdk/models/operations/paymentslistaccounts.ts new file mode 100644 index 00000000..14c31682 --- /dev/null +++ b/src/sdk/models/operations/paymentslistaccounts.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as shared from "../shared"; +import * as z from "zod"; + +export type PaymentslistAccountsRequest = { + /** + * Parameter used in pagination requests. Maximum page size is set to 15. + * + * @remarks + * Set to the value of next for the next page of results. + * Set to the value of previous for the previous page of results. + * No other parameters can be set when this parameter is set. + * + */ + cursor?: string | undefined; + /** + * The maximum number of results to return per page. + * + * @remarks + * + */ + pageSize?: number | undefined; + query?: Record | undefined; + /** + * Fields used to sort payments (default is date:desc). + */ + sort?: Array | undefined; +}; + +export type PaymentslistAccountsResponse = { + /** + * OK + */ + accountsCursor?: shared.AccountsCursor | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; +}; + +/** @internal */ +export namespace PaymentslistAccountsRequest$ { + export type Inbound = { + cursor?: string | undefined; + pageSize?: number | undefined; + query?: Record | undefined; + sort?: Array | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + pageSize: z.number().int().default(15), + query: z.record(z.any()).optional(), + sort: z.array(z.string()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + pageSize: v.pageSize, + ...(v.query === undefined ? null : { query: v.query }), + ...(v.sort === undefined ? null : { sort: v.sort }), + }; + }); + + export type Outbound = { + cursor?: string | undefined; + pageSize: number; + query?: Record | undefined; + sort?: Array | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + pageSize: z.number().int().default(15), + query: z.record(z.any()).optional(), + sort: z.array(z.string()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + pageSize: v.pageSize, + ...(v.query === undefined ? null : { query: v.query }), + ...(v.sort === undefined ? null : { sort: v.sort }), + }; + }); +} + +/** @internal */ +export namespace PaymentslistAccountsResponse$ { + export type Inbound = { + AccountsCursor?: shared.AccountsCursor$.Inbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: Response; + }; + + export const inboundSchema: z.ZodType = z + .object({ + AccountsCursor: shared.AccountsCursor$.inboundSchema.optional(), + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + }) + .transform((v) => { + return { + ...(v.AccountsCursor === undefined ? null : { accountsCursor: v.AccountsCursor }), + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + }; + }); + + export type Outbound = { + AccountsCursor?: shared.AccountsCursor$.Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + }; + + export const outboundSchema: z.ZodType = z + .object({ + accountsCursor: shared.AccountsCursor$.outboundSchema.optional(), + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + }) + .transform((v) => { + return { + ...(v.accountsCursor === undefined ? null : { AccountsCursor: v.accountsCursor }), + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + }; + }); +} diff --git a/src/sdk/models/operations/v2countaccounts.ts b/src/sdk/models/operations/v2countaccounts.ts index 729f04fb..9dbde1e5 100644 --- a/src/sdk/models/operations/v2countaccounts.ts +++ b/src/sdk/models/operations/v2countaccounts.ts @@ -5,12 +5,12 @@ import * as z from "zod"; export type V2CountAccountsRequest = { - requestBody?: Record | undefined; /** * Name of the ledger. */ ledger: string; pit?: Date | undefined; + query?: Record | undefined; }; export type V2CountAccountsResponse = { @@ -32,49 +32,49 @@ export type V2CountAccountsResponse = { /** @internal */ export namespace V2CountAccountsRequest$ { export type Inbound = { - RequestBody?: Record | undefined; ledger: string; pit?: string | undefined; + query?: Record | undefined; }; export const inboundSchema: z.ZodType = z .object({ - RequestBody: z.record(z.any()).optional(), ledger: z.string(), pit: z .string() .datetime({ offset: true }) .transform((v) => new Date(v)) .optional(), + query: z.record(z.any()).optional(), }) .transform((v) => { return { - ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }), ledger: v.ledger, ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), }; }); export type Outbound = { - RequestBody?: Record | undefined; ledger: string; pit?: string | undefined; + query?: Record | undefined; }; export const outboundSchema: z.ZodType = z .object({ - requestBody: z.record(z.any()).optional(), ledger: z.string(), pit: z .date() .transform((v) => v.toISOString()) .optional(), + query: z.record(z.any()).optional(), }) .transform((v) => { return { - ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }), ledger: v.ledger, ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), }; }); } diff --git a/src/sdk/models/operations/v2counttransactions.ts b/src/sdk/models/operations/v2counttransactions.ts index f2fad57d..b7db8a4a 100644 --- a/src/sdk/models/operations/v2counttransactions.ts +++ b/src/sdk/models/operations/v2counttransactions.ts @@ -5,12 +5,12 @@ import * as z from "zod"; export type V2CountTransactionsRequest = { - requestBody?: Record | undefined; /** * Name of the ledger. */ ledger: string; pit?: Date | undefined; + query?: Record | undefined; }; export type V2CountTransactionsResponse = { @@ -32,49 +32,49 @@ export type V2CountTransactionsResponse = { /** @internal */ export namespace V2CountTransactionsRequest$ { export type Inbound = { - RequestBody?: Record | undefined; ledger: string; pit?: string | undefined; + query?: Record | undefined; }; export const inboundSchema: z.ZodType = z .object({ - RequestBody: z.record(z.any()).optional(), ledger: z.string(), pit: z .string() .datetime({ offset: true }) .transform((v) => new Date(v)) .optional(), + query: z.record(z.any()).optional(), }) .transform((v) => { return { - ...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }), ledger: v.ledger, ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), }; }); export type Outbound = { - RequestBody?: Record | undefined; ledger: string; pit?: string | undefined; + query?: Record | undefined; }; export const outboundSchema: z.ZodType = z .object({ - requestBody: z.record(z.any()).optional(), ledger: z.string(), pit: z .date() .transform((v) => v.toISOString()) .optional(), + query: z.record(z.any()).optional(), }) .transform((v) => { return { - ...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }), ledger: v.ledger, ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), }; }); } diff --git a/src/sdk/models/operations/v2getbalancesaggregated.ts b/src/sdk/models/operations/v2getbalancesaggregated.ts new file mode 100644 index 00000000..7064027c --- /dev/null +++ b/src/sdk/models/operations/v2getbalancesaggregated.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as shared from "../shared"; +import * as z from "zod"; + +export type V2GetBalancesAggregatedRequest = { + /** + * Name of the ledger. + */ + ledger: string; + pit?: Date | undefined; + query?: Record | undefined; + /** + * Use insertion date instead of effective date + */ + useInsertionDate?: boolean | undefined; +}; + +export type V2GetBalancesAggregatedResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * OK + */ + v2AggregateBalancesResponse?: shared.V2AggregateBalancesResponse | undefined; +}; + +/** @internal */ +export namespace V2GetBalancesAggregatedRequest$ { + export type Inbound = { + ledger: string; + pit?: string | undefined; + query?: Record | undefined; + useInsertionDate?: boolean | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ledger: z.string(), + pit: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + query: z.record(z.any()).optional(), + useInsertionDate: z.boolean().optional(), + }) + .transform((v) => { + return { + ledger: v.ledger, + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + ...(v.useInsertionDate === undefined + ? null + : { useInsertionDate: v.useInsertionDate }), + }; + }); + + export type Outbound = { + ledger: string; + pit?: string | undefined; + query?: Record | undefined; + useInsertionDate?: boolean | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + ledger: z.string(), + pit: z + .date() + .transform((v) => v.toISOString()) + .optional(), + query: z.record(z.any()).optional(), + useInsertionDate: z.boolean().optional(), + }) + .transform((v) => { + return { + ledger: v.ledger, + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + ...(v.useInsertionDate === undefined + ? null + : { useInsertionDate: v.useInsertionDate }), + }; + }); +} + +/** @internal */ +export namespace V2GetBalancesAggregatedResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + V2AggregateBalancesResponse?: shared.V2AggregateBalancesResponse$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + V2AggregateBalancesResponse: + shared.V2AggregateBalancesResponse$.inboundSchema.optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.V2AggregateBalancesResponse === undefined + ? null + : { v2AggregateBalancesResponse: v.V2AggregateBalancesResponse }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + V2AggregateBalancesResponse?: shared.V2AggregateBalancesResponse$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + V2GetBalancesAggregatedResponse + > = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + v2AggregateBalancesResponse: + shared.V2AggregateBalancesResponse$.outboundSchema.optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.v2AggregateBalancesResponse === undefined + ? null + : { V2AggregateBalancesResponse: v.v2AggregateBalancesResponse }), + }; + }); +} diff --git a/src/sdk/models/operations/v2getvolumeswithbalances.ts b/src/sdk/models/operations/v2getvolumeswithbalances.ts new file mode 100644 index 00000000..d46a8dbb --- /dev/null +++ b/src/sdk/models/operations/v2getvolumeswithbalances.ts @@ -0,0 +1,221 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as shared from "../shared"; +import * as z from "zod"; + +export type V2GetVolumesWithBalancesRequest = { + /** + * Parameter used in pagination requests. Maximum page size is set to 15. + * + * @remarks + * Set to the value of next for the next page of results. + * Set to the value of previous for the previous page of results. + * No other parameters can be set when this parameter is set. + * + */ + cursor?: string | undefined; + endTime?: Date | undefined; + /** + * Group volumes and balance by the level of the segment of the address + */ + groupBy?: number | undefined; + /** + * Use insertion date instead of effective date + */ + insertionDate?: boolean | undefined; + /** + * Name of the ledger. + */ + ledger: string; + /** + * The maximum number of results to return per page. + * + * @remarks + * + */ + pageSize?: number | undefined; + query?: Record | undefined; + startTime?: Date | undefined; +}; + +export type V2GetVolumesWithBalancesResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * OK + */ + v2VolumesWithBalanceCursorResponse?: shared.V2VolumesWithBalanceCursorResponse | undefined; +}; + +/** @internal */ +export namespace V2GetVolumesWithBalancesRequest$ { + export type Inbound = { + cursor?: string | undefined; + endTime?: string | undefined; + groupBy?: number | undefined; + insertionDate?: boolean | undefined; + ledger: string; + pageSize?: number | undefined; + query?: Record | undefined; + startTime?: string | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + cursor: z.string().optional(), + endTime: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + groupBy: z.number().int().optional(), + insertionDate: z.boolean().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + query: z.record(z.any()).optional(), + startTime: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ...(v.endTime === undefined ? null : { endTime: v.endTime }), + ...(v.groupBy === undefined ? null : { groupBy: v.groupBy }), + ...(v.insertionDate === undefined ? null : { insertionDate: v.insertionDate }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.query === undefined ? null : { query: v.query }), + ...(v.startTime === undefined ? null : { startTime: v.startTime }), + }; + }); + + export type Outbound = { + cursor?: string | undefined; + endTime?: string | undefined; + groupBy?: number | undefined; + insertionDate?: boolean | undefined; + ledger: string; + pageSize?: number | undefined; + query?: Record | undefined; + startTime?: string | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + V2GetVolumesWithBalancesRequest + > = z + .object({ + cursor: z.string().optional(), + endTime: z + .date() + .transform((v) => v.toISOString()) + .optional(), + groupBy: z.number().int().optional(), + insertionDate: z.boolean().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + query: z.record(z.any()).optional(), + startTime: z + .date() + .transform((v) => v.toISOString()) + .optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ...(v.endTime === undefined ? null : { endTime: v.endTime }), + ...(v.groupBy === undefined ? null : { groupBy: v.groupBy }), + ...(v.insertionDate === undefined ? null : { insertionDate: v.insertionDate }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.query === undefined ? null : { query: v.query }), + ...(v.startTime === undefined ? null : { startTime: v.startTime }), + }; + }); +} + +/** @internal */ +export namespace V2GetVolumesWithBalancesResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + V2VolumesWithBalanceCursorResponse?: + | shared.V2VolumesWithBalanceCursorResponse$.Inbound + | undefined; + }; + + export const inboundSchema: z.ZodType = + z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + V2VolumesWithBalanceCursorResponse: + shared.V2VolumesWithBalanceCursorResponse$.inboundSchema.optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.V2VolumesWithBalanceCursorResponse === undefined + ? null + : { + v2VolumesWithBalanceCursorResponse: + v.V2VolumesWithBalanceCursorResponse, + }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + V2VolumesWithBalanceCursorResponse?: + | shared.V2VolumesWithBalanceCursorResponse$.Outbound + | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + V2GetVolumesWithBalancesResponse + > = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + v2VolumesWithBalanceCursorResponse: + shared.V2VolumesWithBalanceCursorResponse$.outboundSchema.optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.v2VolumesWithBalanceCursorResponse === undefined + ? null + : { V2VolumesWithBalanceCursorResponse: v.v2VolumesWithBalanceCursorResponse }), + }; + }); +} diff --git a/src/sdk/models/operations/v2listaccounts.ts b/src/sdk/models/operations/v2listaccounts.ts new file mode 100644 index 00000000..a7e5b513 --- /dev/null +++ b/src/sdk/models/operations/v2listaccounts.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as shared from "../shared"; +import * as z from "zod"; + +export type V2ListAccountsRequest = { + /** + * Parameter used in pagination requests. Maximum page size is set to 15. + * + * @remarks + * Set to the value of next for the next page of results. + * Set to the value of previous for the previous page of results. + * No other parameters can be set when this parameter is set. + * + */ + cursor?: string | undefined; + expand?: string | undefined; + /** + * Name of the ledger. + */ + ledger: string; + /** + * The maximum number of results to return per page. + * + * @remarks + * + */ + pageSize?: number | undefined; + pit?: Date | undefined; + query?: Record | undefined; +}; + +export type V2ListAccountsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * OK + */ + v2AccountsCursorResponse?: shared.V2AccountsCursorResponse | undefined; +}; + +/** @internal */ +export namespace V2ListAccountsRequest$ { + export type Inbound = { + cursor?: string | undefined; + expand?: string | undefined; + ledger: string; + pageSize?: number | undefined; + pit?: string | undefined; + query?: Record | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + expand: z.string().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + pit: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + query: z.record(z.any()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ...(v.expand === undefined ? null : { expand: v.expand }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + }; + }); + + export type Outbound = { + cursor?: string | undefined; + expand?: string | undefined; + ledger: string; + pageSize?: number | undefined; + pit?: string | undefined; + query?: Record | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + expand: z.string().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + pit: z + .date() + .transform((v) => v.toISOString()) + .optional(), + query: z.record(z.any()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ...(v.expand === undefined ? null : { expand: v.expand }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + }; + }); +} + +/** @internal */ +export namespace V2ListAccountsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + V2AccountsCursorResponse?: shared.V2AccountsCursorResponse$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + V2AccountsCursorResponse: shared.V2AccountsCursorResponse$.inboundSchema.optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.V2AccountsCursorResponse === undefined + ? null + : { v2AccountsCursorResponse: v.V2AccountsCursorResponse }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + V2AccountsCursorResponse?: shared.V2AccountsCursorResponse$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + v2AccountsCursorResponse: shared.V2AccountsCursorResponse$.outboundSchema.optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.v2AccountsCursorResponse === undefined + ? null + : { V2AccountsCursorResponse: v.v2AccountsCursorResponse }), + }; + }); +} diff --git a/src/sdk/models/operations/v2listlogs.ts b/src/sdk/models/operations/v2listlogs.ts new file mode 100644 index 00000000..077b7f27 --- /dev/null +++ b/src/sdk/models/operations/v2listlogs.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as shared from "../shared"; +import * as z from "zod"; + +export type V2ListLogsRequest = { + /** + * Parameter used in pagination requests. Maximum page size is set to 15. + * + * @remarks + * Set to the value of next for the next page of results. + * Set to the value of previous for the previous page of results. + * No other parameters can be set when this parameter is set. + * + */ + cursor?: string | undefined; + /** + * Name of the ledger. + */ + ledger: string; + /** + * The maximum number of results to return per page. + * + * @remarks + * + */ + pageSize?: number | undefined; + pit?: Date | undefined; + query?: Record | undefined; +}; + +export type V2ListLogsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * OK + */ + v2LogsCursorResponse?: shared.V2LogsCursorResponse | undefined; +}; + +/** @internal */ +export namespace V2ListLogsRequest$ { + export type Inbound = { + cursor?: string | undefined; + ledger: string; + pageSize?: number | undefined; + pit?: string | undefined; + query?: Record | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + pit: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + query: z.record(z.any()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + }; + }); + + export type Outbound = { + cursor?: string | undefined; + ledger: string; + pageSize?: number | undefined; + pit?: string | undefined; + query?: Record | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + pit: z + .date() + .transform((v) => v.toISOString()) + .optional(), + query: z.record(z.any()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + }; + }); +} + +/** @internal */ +export namespace V2ListLogsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + V2LogsCursorResponse?: shared.V2LogsCursorResponse$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + V2LogsCursorResponse: shared.V2LogsCursorResponse$.inboundSchema.optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.V2LogsCursorResponse === undefined + ? null + : { v2LogsCursorResponse: v.V2LogsCursorResponse }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + V2LogsCursorResponse?: shared.V2LogsCursorResponse$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + v2LogsCursorResponse: shared.V2LogsCursorResponse$.outboundSchema.optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.v2LogsCursorResponse === undefined + ? null + : { V2LogsCursorResponse: v.v2LogsCursorResponse }), + }; + }); +} diff --git a/src/sdk/models/operations/v2listtransactions.ts b/src/sdk/models/operations/v2listtransactions.ts new file mode 100644 index 00000000..467fd8a6 --- /dev/null +++ b/src/sdk/models/operations/v2listtransactions.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as shared from "../shared"; +import * as z from "zod"; + +export type V2ListTransactionsRequest = { + /** + * Parameter used in pagination requests. Maximum page size is set to 15. + * + * @remarks + * Set to the value of next for the next page of results. + * Set to the value of previous for the previous page of results. + * No other parameters can be set when this parameter is set. + * + */ + cursor?: string | undefined; + expand?: string | undefined; + /** + * Name of the ledger. + */ + ledger: string; + /** + * The maximum number of results to return per page. + * + * @remarks + * + */ + pageSize?: number | undefined; + pit?: Date | undefined; + query?: Record | undefined; +}; + +export type V2ListTransactionsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * OK + */ + v2TransactionsCursorResponse?: shared.V2TransactionsCursorResponse | undefined; +}; + +/** @internal */ +export namespace V2ListTransactionsRequest$ { + export type Inbound = { + cursor?: string | undefined; + expand?: string | undefined; + ledger: string; + pageSize?: number | undefined; + pit?: string | undefined; + query?: Record | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + expand: z.string().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + pit: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)) + .optional(), + query: z.record(z.any()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ...(v.expand === undefined ? null : { expand: v.expand }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + }; + }); + + export type Outbound = { + cursor?: string | undefined; + expand?: string | undefined; + ledger: string; + pageSize?: number | undefined; + pit?: string | undefined; + query?: Record | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.string().optional(), + expand: z.string().optional(), + ledger: z.string(), + pageSize: z.number().int().optional(), + pit: z + .date() + .transform((v) => v.toISOString()) + .optional(), + query: z.record(z.any()).optional(), + }) + .transform((v) => { + return { + ...(v.cursor === undefined ? null : { cursor: v.cursor }), + ...(v.expand === undefined ? null : { expand: v.expand }), + ledger: v.ledger, + ...(v.pageSize === undefined ? null : { pageSize: v.pageSize }), + ...(v.pit === undefined ? null : { pit: v.pit }), + ...(v.query === undefined ? null : { query: v.query }), + }; + }); +} + +/** @internal */ +export namespace V2ListTransactionsResponse$ { + export type Inbound = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + V2TransactionsCursorResponse?: shared.V2TransactionsCursorResponse$.Inbound | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + V2TransactionsCursorResponse: + shared.V2TransactionsCursorResponse$.inboundSchema.optional(), + }) + .transform((v) => { + return { + contentType: v.ContentType, + statusCode: v.StatusCode, + rawResponse: v.RawResponse, + ...(v.V2TransactionsCursorResponse === undefined + ? null + : { v2TransactionsCursorResponse: v.V2TransactionsCursorResponse }), + }; + }); + + export type Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + V2TransactionsCursorResponse?: shared.V2TransactionsCursorResponse$.Outbound | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + v2TransactionsCursorResponse: + shared.V2TransactionsCursorResponse$.outboundSchema.optional(), + }) + .transform((v) => { + return { + ContentType: v.contentType, + StatusCode: v.statusCode, + RawResponse: v.rawResponse, + ...(v.v2TransactionsCursorResponse === undefined + ? null + : { V2TransactionsCursorResponse: v.v2TransactionsCursorResponse }), + }; + }); +} diff --git a/src/sdk/models/shared/accountscursor.ts b/src/sdk/models/shared/accountscursor.ts new file mode 100644 index 00000000..72652460 --- /dev/null +++ b/src/sdk/models/shared/accountscursor.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { PaymentsAccount, PaymentsAccount$ } from "./paymentsaccount"; +import * as z from "zod"; + +export type Cursor = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; +}; + +export type AccountsCursor = { + cursor: Cursor; +}; + +/** @internal */ +export namespace Cursor$ { + export type Inbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + data: z.array(PaymentsAccount$.inboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); + + export type Outbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + data: z.array(PaymentsAccount$.outboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); +} + +/** @internal */ +export namespace AccountsCursor$ { + export type Inbound = { + cursor: Cursor$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => Cursor$.inboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); + + export type Outbound = { + cursor: Cursor$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => Cursor$.outboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); +} diff --git a/src/sdk/models/shared/accountscursorresponse.ts b/src/sdk/models/shared/accountscursorresponse.ts index 61f93b0c..5cb8fe0c 100644 --- a/src/sdk/models/shared/accountscursorresponse.ts +++ b/src/sdk/models/shared/accountscursorresponse.ts @@ -5,7 +5,7 @@ import { Account, Account$ } from "./account"; import * as z from "zod"; -export type Cursor = { +export type AccountsCursorResponseCursor = { data: Array; hasMore: boolean; next?: string | undefined; @@ -14,11 +14,11 @@ export type Cursor = { }; export type AccountsCursorResponse = { - cursor: Cursor; + cursor: AccountsCursorResponseCursor; }; /** @internal */ -export namespace Cursor$ { +export namespace AccountsCursorResponseCursor$ { export type Inbound = { data: Array; hasMore: boolean; @@ -27,7 +27,7 @@ export namespace Cursor$ { previous?: string | undefined; }; - export const inboundSchema: z.ZodType = z + export const inboundSchema: z.ZodType = z .object({ data: z.array(Account$.inboundSchema), hasMore: z.boolean(), @@ -53,7 +53,7 @@ export namespace Cursor$ { previous?: string | undefined; }; - export const outboundSchema: z.ZodType = z + export const outboundSchema: z.ZodType = z .object({ data: z.array(Account$.outboundSchema), hasMore: z.boolean(), @@ -75,12 +75,12 @@ export namespace Cursor$ { /** @internal */ export namespace AccountsCursorResponse$ { export type Inbound = { - cursor: Cursor$.Inbound; + cursor: AccountsCursorResponseCursor$.Inbound; }; export const inboundSchema: z.ZodType = z .object({ - cursor: z.lazy(() => Cursor$.inboundSchema), + cursor: z.lazy(() => AccountsCursorResponseCursor$.inboundSchema), }) .transform((v) => { return { @@ -89,12 +89,12 @@ export namespace AccountsCursorResponse$ { }); export type Outbound = { - cursor: Cursor$.Outbound; + cursor: AccountsCursorResponseCursor$.Outbound; }; export const outboundSchema: z.ZodType = z .object({ - cursor: z.lazy(() => Cursor$.outboundSchema), + cursor: z.lazy(() => AccountsCursorResponseCursor$.outboundSchema), }) .transform((v) => { return { diff --git a/src/sdk/models/shared/index.ts b/src/sdk/models/shared/index.ts index 6f2feb7b..fc3acaa7 100644 --- a/src/sdk/models/shared/index.ts +++ b/src/sdk/models/shared/index.ts @@ -6,6 +6,7 @@ export * from "./account"; export * from "./accountbalance"; export * from "./accountrequest"; export * from "./accountresponse"; +export * from "./accountscursor"; export * from "./accountscursorresponse"; export * from "./accounttype"; export * from "./accountwithvolumesandbalances"; @@ -214,6 +215,7 @@ export * from "./updatetransferinitiationstatusrequest"; export * from "./user"; export * from "./v2account"; export * from "./v2accountresponse"; +export * from "./v2accountscursorresponse"; export * from "./v2activityconfirmhold"; export * from "./v2activitycreatetransaction"; export * from "./v2activitycreatetransactionoutput"; @@ -229,6 +231,7 @@ export * from "./v2activitygetwalletoutput"; export * from "./v2activitylistwallets"; export * from "./v2activitystripetransfer"; export * from "./v2activityvoidhold"; +export * from "./v2aggregatebalancesresponse"; export * from "./v2assetholder"; export * from "./v2bulkelement"; export * from "./v2bulkelementaddmetadata"; @@ -265,6 +268,8 @@ export * from "./v2listtriggersoccurrencesresponse"; export * from "./v2listtriggersresponse"; export * from "./v2listwalletsresponse"; export * from "./v2listworkflowsresponse"; +export * from "./v2log"; +export * from "./v2logscursorresponse"; export * from "./v2migrationinfo"; export * from "./v2monetary"; export * from "./v2payment"; @@ -297,11 +302,14 @@ export * from "./v2targetid"; export * from "./v2targettype"; export * from "./v2testtriggerresponse"; export * from "./v2transaction"; +export * from "./v2transactionscursorresponse"; export * from "./v2trigger"; export * from "./v2triggerdata"; export * from "./v2triggeroccurrence"; export * from "./v2triggertest"; export * from "./v2volume"; +export * from "./v2volumeswithbalance"; +export * from "./v2volumeswithbalancecursorresponse"; export * from "./v2wallet"; export * from "./v2walletsubject"; export * from "./v2walletwithbalances"; diff --git a/src/sdk/models/shared/v2accountscursorresponse.ts b/src/sdk/models/shared/v2accountscursorresponse.ts new file mode 100644 index 00000000..bf4d4e95 --- /dev/null +++ b/src/sdk/models/shared/v2accountscursorresponse.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { V2Account, V2Account$ } from "./v2account"; +import * as z from "zod"; + +export type V2AccountsCursorResponseCursor = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; +}; + +export type V2AccountsCursorResponse = { + cursor: V2AccountsCursorResponseCursor; +}; + +/** @internal */ +export namespace V2AccountsCursorResponseCursor$ { + export type Inbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + data: z.array(V2Account$.inboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); + + export type Outbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const outboundSchema: z.ZodType = + z + .object({ + data: z.array(V2Account$.outboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); +} + +/** @internal */ +export namespace V2AccountsCursorResponse$ { + export type Inbound = { + cursor: V2AccountsCursorResponseCursor$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => V2AccountsCursorResponseCursor$.inboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); + + export type Outbound = { + cursor: V2AccountsCursorResponseCursor$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => V2AccountsCursorResponseCursor$.outboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); +} diff --git a/src/sdk/models/shared/v2aggregatebalancesresponse.ts b/src/sdk/models/shared/v2aggregatebalancesresponse.ts new file mode 100644 index 00000000..74300217 --- /dev/null +++ b/src/sdk/models/shared/v2aggregatebalancesresponse.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type V2AggregateBalancesResponse = { + data: Record; +}; + +/** @internal */ +export namespace V2AggregateBalancesResponse$ { + export type Inbound = { + data: Record; + }; + + export const inboundSchema: z.ZodType = z + .object({ + data: z.record(z.number().transform((v) => BigInt(v))), + }) + .transform((v) => { + return { + data: v.data, + }; + }); + + export type Outbound = { + data: Record; + }; + + export const outboundSchema: z.ZodType = z + .object({ + data: z.record(z.bigint().transform((v) => Number(v))), + }) + .transform((v) => { + return { + data: v.data, + }; + }); +} diff --git a/src/sdk/models/shared/v2log.ts b/src/sdk/models/shared/v2log.ts new file mode 100644 index 00000000..9a25fb1c --- /dev/null +++ b/src/sdk/models/shared/v2log.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export enum V2LogType { + NewTransaction = "NEW_TRANSACTION", + SetMetadata = "SET_METADATA", + RevertedTransaction = "REVERTED_TRANSACTION", +} + +export type V2Log = { + data: Record; + date: Date; + hash: string; + id: bigint; + type: V2LogType; +}; + +/** @internal */ +export const V2LogType$: z.ZodNativeEnum = z.nativeEnum(V2LogType); + +/** @internal */ +export namespace V2Log$ { + export type Inbound = { + data: Record; + date: string; + hash: string; + id: number; + type: V2LogType; + }; + + export const inboundSchema: z.ZodType = z + .object({ + data: z.record(z.any()), + date: z + .string() + .datetime({ offset: true }) + .transform((v) => new Date(v)), + hash: z.string(), + id: z.number().transform((v) => BigInt(v)), + type: V2LogType$, + }) + .transform((v) => { + return { + data: v.data, + date: v.date, + hash: v.hash, + id: v.id, + type: v.type, + }; + }); + + export type Outbound = { + data: Record; + date: string; + hash: string; + id: number; + type: V2LogType; + }; + + export const outboundSchema: z.ZodType = z + .object({ + data: z.record(z.any()), + date: z.date().transform((v) => v.toISOString()), + hash: z.string(), + id: z.bigint().transform((v) => Number(v)), + type: V2LogType$, + }) + .transform((v) => { + return { + data: v.data, + date: v.date, + hash: v.hash, + id: v.id, + type: v.type, + }; + }); +} diff --git a/src/sdk/models/shared/v2logscursorresponse.ts b/src/sdk/models/shared/v2logscursorresponse.ts new file mode 100644 index 00000000..30c99707 --- /dev/null +++ b/src/sdk/models/shared/v2logscursorresponse.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { V2Log, V2Log$ } from "./v2log"; +import * as z from "zod"; + +export type V2LogsCursorResponseCursor = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; +}; + +export type V2LogsCursorResponse = { + cursor: V2LogsCursorResponseCursor; +}; + +/** @internal */ +export namespace V2LogsCursorResponseCursor$ { + export type Inbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const inboundSchema: z.ZodType = z + .object({ + data: z.array(V2Log$.inboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); + + export type Outbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const outboundSchema: z.ZodType = z + .object({ + data: z.array(V2Log$.outboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); +} + +/** @internal */ +export namespace V2LogsCursorResponse$ { + export type Inbound = { + cursor: V2LogsCursorResponseCursor$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => V2LogsCursorResponseCursor$.inboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); + + export type Outbound = { + cursor: V2LogsCursorResponseCursor$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => V2LogsCursorResponseCursor$.outboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); +} diff --git a/src/sdk/models/shared/v2transactionscursorresponse.ts b/src/sdk/models/shared/v2transactionscursorresponse.ts new file mode 100644 index 00000000..df587650 --- /dev/null +++ b/src/sdk/models/shared/v2transactionscursorresponse.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { V2ExpandedTransaction, V2ExpandedTransaction$ } from "./v2expandedtransaction"; +import * as z from "zod"; + +export type V2TransactionsCursorResponseCursor = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; +}; + +export type V2TransactionsCursorResponse = { + cursor: V2TransactionsCursorResponseCursor; +}; + +/** @internal */ +export namespace V2TransactionsCursorResponseCursor$ { + export type Inbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const inboundSchema: z.ZodType< + V2TransactionsCursorResponseCursor, + z.ZodTypeDef, + Inbound + > = z + .object({ + data: z.array(V2ExpandedTransaction$.inboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); + + export type Outbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + V2TransactionsCursorResponseCursor + > = z + .object({ + data: z.array(V2ExpandedTransaction$.outboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); +} + +/** @internal */ +export namespace V2TransactionsCursorResponse$ { + export type Inbound = { + cursor: V2TransactionsCursorResponseCursor$.Inbound; + }; + + export const inboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => V2TransactionsCursorResponseCursor$.inboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); + + export type Outbound = { + cursor: V2TransactionsCursorResponseCursor$.Outbound; + }; + + export const outboundSchema: z.ZodType = z + .object({ + cursor: z.lazy(() => V2TransactionsCursorResponseCursor$.outboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); +} diff --git a/src/sdk/models/shared/v2volumeswithbalance.ts b/src/sdk/models/shared/v2volumeswithbalance.ts new file mode 100644 index 00000000..27a52a52 --- /dev/null +++ b/src/sdk/models/shared/v2volumeswithbalance.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type V2VolumesWithBalance = { + account: string; + asset: string; + balance: bigint; + input: bigint; + output: bigint; +}; + +/** @internal */ +export namespace V2VolumesWithBalance$ { + export type Inbound = { + account: string; + asset: string; + balance: number; + input: number; + output: number; + }; + + export const inboundSchema: z.ZodType = z + .object({ + account: z.string(), + asset: z.string(), + balance: z.number().transform((v) => BigInt(v)), + input: z.number().transform((v) => BigInt(v)), + output: z.number().transform((v) => BigInt(v)), + }) + .transform((v) => { + return { + account: v.account, + asset: v.asset, + balance: v.balance, + input: v.input, + output: v.output, + }; + }); + + export type Outbound = { + account: string; + asset: string; + balance: number; + input: number; + output: number; + }; + + export const outboundSchema: z.ZodType = z + .object({ + account: z.string(), + asset: z.string(), + balance: z.bigint().transform((v) => Number(v)), + input: z.bigint().transform((v) => Number(v)), + output: z.bigint().transform((v) => Number(v)), + }) + .transform((v) => { + return { + account: v.account, + asset: v.asset, + balance: v.balance, + input: v.input, + output: v.output, + }; + }); +} diff --git a/src/sdk/models/shared/v2volumeswithbalancecursorresponse.ts b/src/sdk/models/shared/v2volumeswithbalancecursorresponse.ts new file mode 100644 index 00000000..1fd34341 --- /dev/null +++ b/src/sdk/models/shared/v2volumeswithbalancecursorresponse.ts @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { V2VolumesWithBalance, V2VolumesWithBalance$ } from "./v2volumeswithbalance"; +import * as z from "zod"; + +export type V2VolumesWithBalanceCursorResponseCursor = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; +}; + +export type V2VolumesWithBalanceCursorResponse = { + cursor: V2VolumesWithBalanceCursorResponseCursor; +}; + +/** @internal */ +export namespace V2VolumesWithBalanceCursorResponseCursor$ { + export type Inbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const inboundSchema: z.ZodType< + V2VolumesWithBalanceCursorResponseCursor, + z.ZodTypeDef, + Inbound + > = z + .object({ + data: z.array(V2VolumesWithBalance$.inboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); + + export type Outbound = { + data: Array; + hasMore: boolean; + next?: string | undefined; + pageSize: number; + previous?: string | undefined; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + V2VolumesWithBalanceCursorResponseCursor + > = z + .object({ + data: z.array(V2VolumesWithBalance$.outboundSchema), + hasMore: z.boolean(), + next: z.string().optional(), + pageSize: z.number().int(), + previous: z.string().optional(), + }) + .transform((v) => { + return { + data: v.data, + hasMore: v.hasMore, + ...(v.next === undefined ? null : { next: v.next }), + pageSize: v.pageSize, + ...(v.previous === undefined ? null : { previous: v.previous }), + }; + }); +} + +/** @internal */ +export namespace V2VolumesWithBalanceCursorResponse$ { + export type Inbound = { + cursor: V2VolumesWithBalanceCursorResponseCursor$.Inbound; + }; + + export const inboundSchema: z.ZodType< + V2VolumesWithBalanceCursorResponse, + z.ZodTypeDef, + Inbound + > = z + .object({ + cursor: z.lazy(() => V2VolumesWithBalanceCursorResponseCursor$.inboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); + + export type Outbound = { + cursor: V2VolumesWithBalanceCursorResponseCursor$.Outbound; + }; + + export const outboundSchema: z.ZodType< + Outbound, + z.ZodTypeDef, + V2VolumesWithBalanceCursorResponse + > = z + .object({ + cursor: z.lazy(() => V2VolumesWithBalanceCursorResponseCursor$.outboundSchema), + }) + .transform((v) => { + return { + cursor: v.cursor, + }; + }); +} diff --git a/src/sdk/orchestration.ts b/src/sdk/orchestration.ts index 147316bc..d66a3959 100644 --- a/src/sdk/orchestration.ts +++ b/src/sdk/orchestration.ts @@ -107,6 +107,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -202,6 +203,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -302,6 +304,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -408,6 +411,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -509,6 +513,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -610,6 +615,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -716,6 +722,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -826,6 +833,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -932,6 +940,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1041,6 +1050,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1143,6 +1153,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1249,6 +1260,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1336,6 +1348,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1422,6 +1435,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1528,6 +1542,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1639,6 +1654,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -1746,6 +1762,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -1848,6 +1865,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1954,6 +1972,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2049,6 +2068,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -2149,6 +2169,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -2255,6 +2276,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2356,6 +2378,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -2457,6 +2480,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2563,6 +2587,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2673,6 +2698,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2757,6 +2783,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2863,6 +2890,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2977,6 +3005,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3084,6 +3113,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3198,6 +3228,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3304,6 +3335,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3410,6 +3442,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -3521,6 +3554,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -3628,6 +3662,7 @@ export class Orchestration extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { diff --git a/src/sdk/payments.ts b/src/sdk/payments.ts index 249fdb24..e160fefc 100644 --- a/src/sdk/payments.ts +++ b/src/sdk/payments.ts @@ -108,6 +108,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -197,6 +198,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -283,6 +285,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -369,6 +372,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -455,6 +459,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -541,6 +546,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -627,6 +633,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -718,6 +725,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -806,6 +814,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -894,6 +903,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -997,6 +1007,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1087,6 +1098,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1186,6 +1198,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1287,6 +1300,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1375,6 +1389,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1463,6 +1478,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1557,6 +1573,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1647,6 +1664,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1741,6 +1759,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -1817,6 +1836,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1911,6 +1931,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1987,6 +2008,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2090,6 +2112,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2195,6 +2218,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2287,6 +2311,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2379,6 +2404,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2471,6 +2497,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2559,6 +2586,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2632,6 +2660,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2657,6 +2686,99 @@ export class Payments extends ClientSDK { } } + /** + * List accounts + */ + async paymentslistAccounts( + input: operations.PaymentslistAccountsRequest, + options?: RequestOptions + ): Promise { + const headers$ = new Headers(); + headers$.set("user-agent", SDK_METADATA.userAgent); + headers$.set("Accept", "application/json"); + + const payload$ = schemas$.parse( + input, + (value$) => operations.PaymentslistAccountsRequest$.outboundSchema.parse(value$), + "Input validation failed" + ); + const body$ = null; + + const path$ = this.templateURLComponent("/api/payments/accounts")(); + + const query$ = [ + enc$.encodeForm("cursor", payload$.cursor, { explode: true, charEncoding: "percent" }), + enc$.encodeForm("pageSize", payload$.pageSize, { + explode: true, + charEncoding: "percent", + }), + enc$.encodeJSON("query", payload$.query, { explode: false, charEncoding: "percent" }), + enc$.encodeForm("sort", payload$.sort, { explode: true, charEncoding: "percent" }), + ] + .filter(Boolean) + .join("&"); + + let security$; + if (typeof this.options$.authorization === "function") { + security$ = { authorization: await this.options$.authorization() }; + } else if (this.options$.authorization) { + security$ = { authorization: this.options$.authorization }; + } else { + security$ = {}; + } + const context = { + operationID: "paymentslistAccounts", + oAuth2Scopes: [], + securitySource: this.options$.authorization, + }; + const securitySettings$ = this.resolveGlobalSecurity(security$); + + const doOptions = { context, errorCodes: ["default"] }; + const request = this.createRequest$( + context, + { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + }, + options + ); + + const response = await this.do$(request, doOptions); + + const responseFields$ = { + ContentType: response.headers.get("content-type") ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + if (this.matchResponse(response, 200, "application/json")) { + const responseBody = await response.json(); + const result = schemas$.parse( + responseBody, + (val$) => { + return operations.PaymentslistAccountsResponse$.inboundSchema.parse({ + ...responseFields$, + AccountsCursor: val$, + }); + }, + "Response validation failed" + ); + return result; + } else { + const responseBody = await response.text(); + throw new errors.SDKError( + "Unexpected API response status or content-type", + response, + responseBody + ); + } + } + /** * Read the config of a connector * @@ -2727,6 +2849,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2824,6 +2947,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -2921,6 +3045,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3013,6 +3138,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3107,6 +3233,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3195,6 +3322,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3286,6 +3414,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3379,6 +3508,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3472,6 +3602,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3564,6 +3695,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3652,6 +3784,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3746,6 +3879,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -3832,6 +3966,7 @@ export class Payments extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { diff --git a/src/sdk/reconciliation.ts b/src/sdk/reconciliation.ts index 9a40848e..78ac6ec3 100644 --- a/src/sdk/reconciliation.ts +++ b/src/sdk/reconciliation.ts @@ -100,6 +100,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -206,6 +207,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -304,6 +306,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -407,6 +410,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -510,6 +514,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -613,6 +618,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -720,6 +726,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -806,6 +813,7 @@ export class Reconciliation extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index d59285b3..8cbb78ca 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -133,6 +133,7 @@ export class SDK extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -199,6 +200,7 @@ export class SDK extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/search.ts b/src/sdk/search.ts index a6d5c895..578593ae 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -100,6 +100,7 @@ export class Search extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -173,6 +174,7 @@ export class Search extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/wallets.ts b/src/sdk/wallets.ts index e4c5a267..85608683 100644 --- a/src/sdk/wallets.ts +++ b/src/sdk/wallets.ts @@ -105,6 +105,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -199,6 +200,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -296,6 +298,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -395,6 +398,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -489,6 +493,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 201, "application/json")) { @@ -601,6 +606,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -702,6 +708,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -810,6 +817,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -914,6 +922,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1012,6 +1021,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1118,6 +1128,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1224,6 +1235,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1316,6 +1328,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -1415,6 +1428,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -1511,6 +1525,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 204)) { @@ -1592,6 +1607,7 @@ export class Wallets extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { diff --git a/src/sdk/webhooks.ts b/src/sdk/webhooks.ts index b5249353..ccebdbc0 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -102,6 +102,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -210,6 +211,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -313,6 +315,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -414,6 +417,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchStatusCode(response, 200)) { @@ -515,6 +519,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -623,6 +628,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) { @@ -724,6 +730,7 @@ export class Webhooks extends ClientSDK { ContentType: response.headers.get("content-type") ?? "application/octet-stream", StatusCode: response.status, RawResponse: response, + Headers: {}, }; if (this.matchResponse(response, 200, "application/json")) {