From 7d9514ccf6375453aea6905ff659cc20ba12751a Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 28 Jan 2025 00:24:30 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.2 --- .gitignore | 2 + .npmignore | 4 + .speakeasy/gen.lock | 580 +-- .speakeasy/workflow.lock | 19 +- .speakeasy/workflow.yaml | 2 +- FUNCTIONS.md | 4 +- README.md | 685 +-- RELEASES.md | 12 +- RUNTIMES.md | 28 +- USAGE.md | 2 +- docs/sdk/models/errors/errorcode.md | 2 +- .../schemaswalletserrorresponseerrorcode.md | 2 +- .../operations/activateconfigresponse.md | 8 +- .../operations/addaccounttopoolresponse.md | 2 +- .../operations/changeconfigsecretresponse.md | 8 +- .../models/operations/confirmholdresponse.md | 2 +- .../operations/connectorstransferrequest.md | 2 +- .../operations/connectorstransferresponse.md | 2 +- .../operations/createaccountresponse.md | 2 +- .../operations/createbalanceresponse.md | 2 +- .../operations/createbankaccountresponse.md | 2 +- .../models/operations/createclientresponse.md | 2 +- .../operations/createpaymentresponse.md | 14 +- .../models/operations/createpolicyresponse.md | 2 +- .../models/operations/createpoolresponse.md | 2 +- .../models/operations/createsecretresponse.md | 2 +- .../operations/createtransactionresponse.md | 2 +- .../operations/createtransactionsresponse.md | 2 +- .../createtransferinitiationresponse.md | 17 +- .../models/operations/createwalletresponse.md | 2 +- .../models/operations/creditwalletrequest.md | 7 +- .../models/operations/creditwalletresponse.md | 2 +- .../operations/deactivateconfigresponse.md | 8 +- .../models/operations/debitwalletresponse.md | 2 +- .../models/operations/deleteclientresponse.md | 2 +- .../models/operations/deleteconfigresponse.md | 2 +- .../models/operations/deletepolicyresponse.md | 2 +- .../models/operations/deletepoolresponse.md | 2 +- .../models/operations/deletesecretresponse.md | 2 +- .../deletetransferinitiationresponse.md | 2 +- .../operations/forwardbankaccountresponse.md | 2 +- .../operations/getaccountbalancesresponse.md | 10 +- .../models/operations/getbalanceresponse.md | 2 +- .../operations/getbankaccountresponse.md | 2 +- .../operations/getconnectortaskrequest.md | 2 +- .../operations/getconnectortaskresponse.md | 2 +- .../operations/getconnectortaskv1request.md | 2 +- .../operations/getconnectortaskv1response.md | 2 +- docs/sdk/models/operations/getholdresponse.md | 6 +- .../sdk/models/operations/getholdsresponse.md | 6 +- .../getinstancestagehistoryresponse.md | 31 +- .../operations/getmanyconfigsresponse.md | 8 +- .../operations/getoidcwellknownsresponse.md | 2 +- .../models/operations/getpaymentresponse.md | 14 +- .../models/operations/getpolicyresponse.md | 2 +- .../operations/getpoolbalancesrequest.md | 2 +- .../operations/getpoolbalancesresponse.md | 2 +- docs/sdk/models/operations/getpoolresponse.md | 2 +- .../operations/getreconciliationresponse.md | 8 +- .../operations/getserverinforesponse.md | 2 +- .../operations/gettransactionresponse.md | 2 +- .../operations/gettransactionsresponse.md | 6 +- .../gettransferinitiationresponse.md | 17 +- .../models/operations/getversionsresponse.md | 2 +- .../models/operations/getwalletresponse.md | 2 +- .../operations/getwalletsummaryresponse.md | 2 +- .../models/operations/getworkflowresponse.md | 2 +- .../models/operations/insertconfigresponse.md | 8 +- .../operations/installconnectorrequest.md | 6 +- .../operations/installconnectorresponse.md | 2 +- .../operations/listallconnectorsresponse.md | 2 +- .../models/operations/listbalancesresponse.md | 2 +- .../operations/listbankaccountsresponse.md | 6 +- .../listconfigsavailableconnectorsresponse.md | 2 +- .../operations/listconnectortasksrequest.md | 2 +- .../operations/listconnectortasksresponse.md | 10 +- .../operations/listconnectortasksv1request.md | 2 +- .../listconnectortasksv1response.md | 10 +- .../operations/listinstancesresponse.md | 2 +- .../sdk/models/operations/listlogsresponse.md | 2 +- .../models/operations/listpaymentsresponse.md | 14 +- .../models/operations/listpoliciesresponse.md | 2 +- .../models/operations/listpoolsresponse.md | 2 +- .../operations/listreconciliationsresponse.md | 8 +- .../operations/listtransactionsresponse.md | 2 +- .../listtransferinitiationsresponse.md | 17 +- .../listtriggersoccurrencesresponse.md | 2 +- .../models/operations/listtriggersresponse.md | 2 +- .../models/operations/listwalletsresponse.md | 6 +- .../operations/listworkflowsresponse.md | 2 +- .../orchestrationgetserverinforesponse.md | 2 +- .../operations/paymentsgetaccountresponse.md | 2 +- .../paymentsgetserverinforesponse.md | 2 +- .../paymentslistaccountsresponse.md | 6 +- .../operations/readconnectorconfigrequest.md | 2 +- .../operations/readconnectorconfigresponse.md | 12 +- .../readconnectorconfigv1response.md | 11 +- .../models/operations/readtriggerresponse.md | 2 +- .../models/operations/reconcileresponse.md | 8 +- .../reconciliationgetserverinforesponse.md | 2 +- .../removeaccountfrompoolresponse.md | 2 +- .../operations/resetconnectorrequest.md | 2 +- .../operations/resetconnectorresponse.md | 2 +- .../operations/resetconnectorv1response.md | 2 +- .../retrytransferinitiationresponse.md | 2 +- .../reversetransferinitiationrequest.md | 4 +- .../reversetransferinitiationresponse.md | 2 +- .../operations/reverttransactionresponse.md | 2 +- .../models/operations/runscriptresponse.md | 2 +- .../models/operations/runworkflowresponse.md | 2 +- .../operations/searchgetserverinforesponse.md | 2 +- docs/sdk/models/operations/searchresponse.md | 2 +- .../models/operations/sendeventresponse.md | 2 +- .../models/operations/testconfigresponse.md | 16 +- .../models/operations/testtriggerresponse.md | 2 +- .../udpatetransferinitiationstatusresponse.md | 2 +- .../operations/uninstallconnectorrequest.md | 2 +- .../operations/uninstallconnectorresponse.md | 2 +- .../operations/uninstallconnectorv1request.md | 2 +- .../uninstallconnectorv1response.md | 2 +- .../updatebankaccountmetadataresponse.md | 2 +- .../updateconnectorconfigv1request.md | 8 +- .../updateconnectorconfigv1response.md | 2 +- .../operations/updatemetadataresponse.md | 2 +- .../models/operations/updatewalletresponse.md | 2 +- .../operations/v2canceleventresponse.md | 2 +- .../models/operations/v2createbulkresponse.md | 2 +- .../operations/v2createtransactionresponse.md | 2 +- .../operations/v2createtriggerresponse.md | 2 +- .../operations/v2createworkflowresponse.md | 2 +- .../operations/v2deletetriggerresponse.md | 2 +- .../operations/v2deleteworkflowresponse.md | 2 +- .../v2getinstancehistoryresponse.md | 2 +- .../operations/v2getinstanceresponse.md | 2 +- .../v2getinstancestagehistoryresponse.md | 21 +- .../models/operations/v2getledgerresponse.md | 2 +- .../operations/v2gettransactionresponse.md | 2 +- .../operations/v2listinstancesresponse.md | 4 +- .../operations/v2listledgersresponse.md | 2 +- .../models/operations/v2listlogsresponse.md | 2 +- .../operations/v2listtransactionsresponse.md | 2 +- .../v2listtriggersoccurrencesresponse.md | 2 +- .../operations/v2listtriggersresponse.md | 2 +- .../operations/v2listworkflowsresponse.md | 4 +- .../operations/v2reverttransactionresponse.md | 2 +- .../sdk/models/operations/voidholdresponse.md | 2 +- .../walletsgetserverinforesponse.md | 2 +- docs/sdk/models/shared/accountbalance.md | 8 +- docs/sdk/models/shared/accountrequest.md | 2 +- docs/sdk/models/shared/accountscursor.md | 4 +- docs/sdk/models/shared/accounttype.md | 2 +- .../shared/activitycreatetransactionoutput.md | 4 +- .../sdk/models/shared/activitycreditwallet.md | 7 +- .../shared/activitydebitwalletoutput.md | 4 +- .../models/shared/activitygetpaymentoutput.md | 12 +- .../models/shared/activitygetwalletoutput.md | 6 +- .../shared/activityreverttransactionoutput.md | 4 +- docs/sdk/models/shared/assetholder.md | 2 +- docs/sdk/models/shared/attempt.md | 14 +- docs/sdk/models/shared/attemptresponse.md | 14 +- docs/sdk/models/shared/balances.md | 2 +- docs/sdk/models/shared/balancescursor.md | 8 +- .../sdk/models/shared/balancescursorcursor.md | 8 +- docs/sdk/models/shared/balancewithassets.md | 2 +- docs/sdk/models/shared/bankaccount.md | 4 +- .../shared/bankaccountrelatedaccounts.md | 2 +- docs/sdk/models/shared/bankaccountresponse.md | 4 +- docs/sdk/models/shared/bankaccountscursor.md | 4 +- .../models/shared/bankaccountscursorcursor.md | 4 +- docs/sdk/models/shared/configresponse.md | 6 +- docs/sdk/models/shared/configsresponse.md | 6 +- .../models/shared/configsresponsecursor.md | 6 +- docs/sdk/models/shared/connector.md | 2 +- .../models/shared/connectorconfigresponse.md | 6 +- .../shared/connectorsconfigsresponse.md | 2 +- .../connectorsconfigsresponseconnector.md | 2 +- .../shared/connectorsconfigsresponsedata.md | 2 +- docs/sdk/models/shared/connectorsresponse.md | 2 +- .../models/shared/connectorsresponsedata.md | 2 +- .../models/shared/createtriggerresponse.md | 2 +- .../sdk/models/shared/createwalletresponse.md | 4 +- .../models/shared/createworkflowresponse.md | 4 +- docs/sdk/models/shared/creditwalletrequest.md | 7 +- docs/sdk/models/shared/cursor.md | 4 +- docs/sdk/models/shared/debitwalletresponse.md | 4 +- docs/sdk/models/shared/expandeddebithold.md | 5 +- docs/sdk/models/shared/getbalanceresponse.md | 2 +- docs/sdk/models/shared/getholdresponse.md | 4 +- docs/sdk/models/shared/getholdsresponse.md | 4 +- .../models/shared/getholdsresponsecursor.md | 4 +- .../models/shared/gettransactionsresponse.md | 4 +- .../shared/gettransactionsresponsecursor.md | 4 +- docs/sdk/models/shared/getwalletresponse.md | 6 +- .../models/shared/getwalletsummaryresponse.md | 10 +- .../getworkflowinstancehistoryresponse.md | 2 +- ...getworkflowinstancehistorystageresponse.md | 33 +- .../shared/getworkflowinstanceresponse.md | 4 +- docs/sdk/models/shared/getworkflowresponse.md | 4 +- docs/sdk/models/shared/hold.md | 4 +- docs/sdk/models/shared/key.md | 2 +- docs/sdk/models/shared/listrunsresponse.md | 4 +- .../shared/listtriggersoccurrencesresponse.md | 2 +- .../sdk/models/shared/listtriggersresponse.md | 2 +- docs/sdk/models/shared/listwalletsresponse.md | 4 +- .../shared/listwalletsresponsecursor.md | 4 +- .../models/shared/listworkflowsresponse.md | 4 +- docs/sdk/models/shared/log.md | 4 +- docs/sdk/models/shared/logscursorresponse.md | 4 +- .../models/shared/logscursorresponsecursor.md | 2 +- docs/sdk/models/shared/monetary.md | 2 +- .../models/shared/orchestrationconnector.md | 2 +- .../orchestrationcreditwalletrequest.md | 7 +- .../orchestrationlistwalletsresponse.md | 4 +- .../orchestrationlistwalletsresponsecursor.md | 4 +- .../sdk/models/shared/orchestrationpayment.md | 12 +- .../shared/orchestrationpaymentadjustment.md | 2 +- .../shared/orchestrationpaymentscheme.md | 2 +- .../shared/orchestrationpaymentstatus.md | 2 +- .../models/shared/orchestrationpaymenttype.md | 2 +- .../models/shared/orchestrationtransaction.md | 4 +- .../shared/orchestrationv2transaction.md | 4 +- docs/sdk/models/shared/orchestrationwallet.md | 4 +- docs/sdk/models/shared/payment.md | 12 +- docs/sdk/models/shared/paymentadjustment.md | 4 +- docs/sdk/models/shared/paymentrequest.md | 6 +- docs/sdk/models/shared/paymentresponse.md | 10 +- docs/sdk/models/shared/paymentsaccount.md | 4 +- .../models/shared/paymentsaccountresponse.md | 4 +- docs/sdk/models/shared/paymentscheme.md | 2 +- docs/sdk/models/shared/paymentscursor.md | 10 +- .../sdk/models/shared/paymentscursorcursor.md | 10 +- docs/sdk/models/shared/paymentstatus.md | 2 +- docs/sdk/models/shared/paymenttype.md | 2 +- docs/sdk/models/shared/readtriggerresponse.md | 2 +- docs/sdk/models/shared/reconciliation.md | 6 +- .../models/shared/reconciliationresponse.md | 6 +- .../shared/reconciliationscursorresponse.md | 6 +- .../reconciliationscursorresponsecursor.md | 6 +- .../reversetransferinitiationrequest.md | 4 +- docs/sdk/models/shared/runworkflowresponse.md | 4 +- docs/sdk/models/shared/scheme.md | 2 +- docs/sdk/models/shared/scriptresponse.md | 4 +- docs/sdk/models/shared/stagestatus.md | 4 +- docs/sdk/models/shared/state.md | 2 +- docs/sdk/models/shared/stats.md | 4 +- docs/sdk/models/shared/statsresponse.md | 4 +- docs/sdk/models/shared/status.md | 2 +- docs/sdk/models/shared/taskbankingcircle.md | 8 +- docs/sdk/models/shared/taskcurrencycloud.md | 6 +- docs/sdk/models/shared/taskdummypay.md | 8 +- docs/sdk/models/shared/taskmangopay.md | 8 +- docs/sdk/models/shared/taskmodulr.md | 8 +- docs/sdk/models/shared/taskmoneycorp.md | 6 +- docs/sdk/models/shared/taskresponse.md | 8 +- docs/sdk/models/shared/taskresponsedata.md | 60 +- docs/sdk/models/shared/taskscursor.md | 8 +- docs/sdk/models/shared/taskscursorcursor.md | 13 +- docs/sdk/models/shared/taskscursordata.md | 64 +- docs/sdk/models/shared/taskstripe.md | 10 +- .../sdk/models/shared/taskstripedescriptor.md | 2 +- docs/sdk/models/shared/taskwise.md | 8 +- docs/sdk/models/shared/transaction.md | 4 +- docs/sdk/models/shared/transactionresponse.md | 4 +- .../shared/transactionscursorresponse.md | 4 +- .../transactionscursorresponsecursor.md | 4 +- .../sdk/models/shared/transactionsresponse.md | 4 +- docs/sdk/models/shared/transferinitiation.md | 12 +- .../shared/transferinitiationadjusments.md | 4 +- .../shared/transferinitiationpayments.md | 4 +- .../shared/transferinitiationrequest.md | 6 +- .../shared/transferinitiationrequesttype.md | 3 +- .../shared/transferinitiationresponse.md | 12 +- .../shared/transferinitiationscursor.md | 15 +- .../shared/transferinitiationscursorcursor.md | 12 +- .../models/shared/transferinitiationstatus.md | 2 +- docs/sdk/models/shared/trigger.md | 2 +- docs/sdk/models/shared/triggeroccurrence.md | 2 +- docs/sdk/models/shared/type.md | 2 +- .../updatetransferinitiationstatusrequest.md | 2 +- .../v2activitycreatetransactionoutput.md | 4 +- .../models/shared/v2activitycreditwallet.md | 7 +- .../shared/v2activitydebitwalletoutput.md | 5 +- .../shared/v2activitygetpaymentoutput.md | 10 +- .../shared/v2activitygetwalletoutput.md | 6 +- docs/sdk/models/shared/v2assetholder.md | 2 +- .../shared/v2bulkelementaddmetadatadata.md | 2 +- .../shared/v2bulkelementdeletemetadatadata.md | 2 +- docs/sdk/models/shared/v2bulkelementresult.md | 8 +- ...lkelementresultcreatetransactionschemas.md | 4 +- ...lkelementresultreverttransactionschemas.md | 4 +- .../v2bulkelementreverttransactiondata.md | 2 +- docs/sdk/models/shared/v2connector.md | 2 +- .../shared/v2createtransactionresponse.md | 4 +- .../models/shared/v2createtriggerresponse.md | 2 +- .../models/shared/v2createworkflowresponse.md | 4 +- .../models/shared/v2creditwalletrequest.md | 7 +- .../models/shared/v2expandedtransaction.md | 4 +- docs/sdk/models/shared/v2getledgerresponse.md | 2 +- .../models/shared/v2gettransactionresponse.md | 4 +- .../v2getworkflowinstancehistoryresponse.md | 2 +- ...getworkflowinstancehistorystageresponse.md | 27 +- .../shared/v2getworkflowinstanceresponse.md | 4 +- .../models/shared/v2getworkflowresponse.md | 4 +- docs/sdk/models/shared/v2hold.md | 5 +- docs/sdk/models/shared/v2ledger.md | 2 +- .../sdk/models/shared/v2ledgerlistresponse.md | 2 +- .../shared/v2ledgerlistresponsecursor.md | 2 +- docs/sdk/models/shared/v2listrunsresponse.md | 4 +- .../models/shared/v2listrunsresponsecursor.md | 4 +- .../v2listtriggersoccurrencesresponse.md | 2 +- ...v2listtriggersoccurrencesresponsecursor.md | 2 +- .../models/shared/v2listtriggersresponse.md | 2 +- .../shared/v2listtriggersresponsecursor.md | 2 +- .../models/shared/v2listwalletsresponse.md | 4 +- .../shared/v2listwalletsresponsecursor.md | 4 +- .../models/shared/v2listworkflowsresponse.md | 4 +- .../shared/v2listworkflowsresponsecursor.md | 4 +- docs/sdk/models/shared/v2log.md | 2 +- .../sdk/models/shared/v2logscursorresponse.md | 4 +- .../shared/v2logscursorresponsecursor.md | 4 +- docs/sdk/models/shared/v2logtype.md | 2 +- docs/sdk/models/shared/v2monetary.md | 2 +- docs/sdk/models/shared/v2payment.md | 12 +- docs/sdk/models/shared/v2paymentadjustment.md | 4 +- docs/sdk/models/shared/v2paymentstatus.md | 2 +- docs/sdk/models/shared/v2paymenttype.md | 2 +- .../models/shared/v2readtriggerresponse.md | 2 +- .../shared/v2reverttransactionresponse.md | 4 +- .../models/shared/v2runworkflowresponse.md | 4 +- docs/sdk/models/shared/v2stagestatus.md | 4 +- docs/sdk/models/shared/v2stats.md | 4 +- docs/sdk/models/shared/v2statsresponse.md | 4 +- docs/sdk/models/shared/v2targetid.md | 2 +- docs/sdk/models/shared/v2targettype.md | 2 +- docs/sdk/models/shared/v2transaction.md | 4 +- .../shared/v2transactionscursorresponse.md | 4 +- .../v2transactionscursorresponsecursor.md | 4 +- docs/sdk/models/shared/v2trigger.md | 2 +- docs/sdk/models/shared/v2triggeroccurrence.md | 2 +- .../sdk/models/shared/v2volumeswithbalance.md | 8 +- .../v2volumeswithbalancecursorresponse.md | 8 +- ...2volumeswithbalancecursorresponsecursor.md | 8 +- docs/sdk/models/shared/v2wallet.md | 4 +- .../sdk/models/shared/v2walletwithbalances.md | 6 +- docs/sdk/models/shared/v2workflow.md | 4 +- docs/sdk/models/shared/v2workflowinstance.md | 4 +- .../shared/v2workflowinstancehistory.md | 2 +- .../shared/v2workflowinstancehistorystage.md | 29 +- .../v2workflowinstancehistorystageinput.md | 7 +- .../v2workflowinstancehistorystageoutput.md | 16 +- docs/sdk/models/shared/wallet.md | 4 +- docs/sdk/models/shared/walletbalances.md | 2 +- docs/sdk/models/shared/walletstransaction.md | 4 +- docs/sdk/models/shared/walletwithbalances.md | 6 +- .../shared/walletwithbalancesbalances.md | 2 +- docs/sdk/models/shared/webhooksconfig.md | 6 +- docs/sdk/models/shared/workflow.md | 4 +- docs/sdk/models/shared/workflowinstance.md | 4 +- .../models/shared/workflowinstancehistory.md | 2 +- .../shared/workflowinstancehistorystage.md | 33 +- .../workflowinstancehistorystageinput.md | 7 +- .../workflowinstancehistorystageoutput.md | 22 +- docs/sdks/auth/README.md | 820 +++- docs/sdks/ledger/README.md | 6 +- docs/sdks/orchestration/README.md | 2932 ++++++++++++- docs/sdks/payments/README.md | 3880 +++++++++++++++- docs/sdks/reconciliation/README.md | 696 ++- docs/sdks/sdk/README.md | 78 + docs/sdks/sdkorchestrationv1/README.md | 1417 ------ docs/sdks/sdkpaymentsv1/README.md | 3882 ----------------- docs/sdks/sdkreconciliationv1/README.md | 696 --- docs/sdks/sdksearchv1/README.md | 196 - docs/sdks/sdkv1/README.md | 1240 ++---- docs/sdks/sdkv2/README.md | 1522 ------- docs/sdks/sdkwalletsv1/README.md | 1425 ------ docs/sdks/sdkwebhooksv1/README.md | 626 --- docs/sdks/search/README.md | 190 +- docs/sdks/v1/README.md | 1505 ++++++- docs/sdks/v2/README.md | 16 +- docs/sdks/wallets/README.md | 6 +- docs/sdks/webhooks/README.md | 626 ++- gen.yaml | 4 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- ...hV1CreateClient.ts => authCreateClient.ts} | 10 +- ...hV1CreateSecret.ts => authCreateSecret.ts} | 10 +- ...hV1DeleteClient.ts => authDeleteClient.ts} | 10 +- ...hV1DeleteSecret.ts => authDeleteSecret.ts} | 10 +- ...1GetServerInfo.ts => authGetServerInfo.ts} | 10 +- ...uthV1ListClients.ts => authListClients.ts} | 10 +- .../{authV1ListUsers.ts => authListUsers.ts} | 10 +- ...{authV1ReadClient.ts => authReadClient.ts} | 10 +- .../{authV1ReadUser.ts => authReadUser.ts} | 10 +- ...hV1UpdateClient.ts => authUpdateClient.ts} | 10 +- ...OIDCWellKnowns.ts => getOIDCWellKnowns.ts} | 10 +- src/funcs/getVersions.ts | 8 +- src/funcs/ledgerV1AddMetadataOnTransaction.ts | 8 +- src/funcs/ledgerV1AddMetadataToAccount.ts | 8 +- src/funcs/ledgerV1CountAccounts.ts | 8 +- src/funcs/ledgerV1CountTransactions.ts | 8 +- src/funcs/ledgerV1CreateTransaction.ts | 8 +- src/funcs/ledgerV1CreateTransactions.ts | 8 +- src/funcs/ledgerV1GetAccount.ts | 8 +- src/funcs/ledgerV1GetBalances.ts | 8 +- src/funcs/ledgerV1GetBalancesAggregated.ts | 8 +- src/funcs/ledgerV1GetInfo.ts | 8 +- src/funcs/ledgerV1GetLedgerInfo.ts | 8 +- src/funcs/ledgerV1GetMapping.ts | 8 +- src/funcs/ledgerV1GetTransaction.ts | 8 +- src/funcs/ledgerV1ListAccounts.ts | 8 +- src/funcs/ledgerV1ListLogs.ts | 8 +- src/funcs/ledgerV1ListTransactions.ts | 8 +- src/funcs/ledgerV1ReadStats.ts | 8 +- src/funcs/ledgerV1RevertTransaction.ts | 8 +- src/funcs/ledgerV1RunScript.ts | 8 +- src/funcs/ledgerV1UpdateMapping.ts | 8 +- src/funcs/ledgerV2AddMetadataOnTransaction.ts | 8 +- src/funcs/ledgerV2AddMetadataToAccount.ts | 8 +- src/funcs/ledgerV2CountAccounts.ts | 8 +- src/funcs/ledgerV2CountTransactions.ts | 8 +- src/funcs/ledgerV2CreateBulk.ts | 13 +- src/funcs/ledgerV2CreateLedger.ts | 8 +- src/funcs/ledgerV2CreateTransaction.ts | 8 +- src/funcs/ledgerV2DeleteAccountMetadata.ts | 8 +- src/funcs/ledgerV2DeleteLedgerMetadata.ts | 8 +- .../ledgerV2DeleteTransactionMetadata.ts | 8 +- src/funcs/ledgerV2ExportLogs.ts | 8 +- src/funcs/ledgerV2GetAccount.ts | 8 +- src/funcs/ledgerV2GetBalancesAggregated.ts | 8 +- src/funcs/ledgerV2GetInfo.ts | 8 +- src/funcs/ledgerV2GetLedger.ts | 8 +- src/funcs/ledgerV2GetLedgerInfo.ts | 8 +- src/funcs/ledgerV2GetTransaction.ts | 8 +- src/funcs/ledgerV2GetVolumesWithBalances.ts | 8 +- src/funcs/ledgerV2ImportLogs.ts | 8 +- src/funcs/ledgerV2ListAccounts.ts | 8 +- src/funcs/ledgerV2ListLedgers.ts | 8 +- src/funcs/ledgerV2ListLogs.ts | 8 +- src/funcs/ledgerV2ListTransactions.ts | 8 +- src/funcs/ledgerV2ReadStats.ts | 8 +- src/funcs/ledgerV2RevertTransaction.ts | 8 +- src/funcs/ledgerV2UpdateLedgerMetadata.ts | 8 +- ...elEvent.ts => orchestrationCancelEvent.ts} | 10 +- ...igger.ts => orchestrationCreateTrigger.ts} | 10 +- ...flow.ts => orchestrationCreateWorkflow.ts} | 10 +- ...igger.ts => orchestrationDeleteTrigger.ts} | 10 +- ...flow.ts => orchestrationDeleteWorkflow.ts} | 10 +- ...nstance.ts => orchestrationGetInstance.ts} | 10 +- ....ts => orchestrationGetInstanceHistory.ts} | 10 +- ...> orchestrationGetInstanceStageHistory.ts} | 10 +- ...orkflow.ts => orchestrationGetWorkflow.ts} | 10 +- ...ances.ts => orchestrationListInstances.ts} | 10 +- ...iggers.ts => orchestrationListTriggers.ts} | 10 +- ...> orchestrationListTriggersOccurrences.ts} | 10 +- ...flows.ts => orchestrationListWorkflows.ts} | 10 +- ...rchestrationOrchestrationgetServerInfo.ts} | 10 +- ...Trigger.ts => orchestrationReadTrigger.ts} | 10 +- ...orkflow.ts => orchestrationRunWorkflow.ts} | 10 +- ...SendEvent.ts => orchestrationSendEvent.ts} | 10 +- ...Trigger.ts => orchestrationTestTrigger.ts} | 10 +- src/funcs/orchestrationV2CancelEvent.ts | 8 +- src/funcs/orchestrationV2CreateTrigger.ts | 8 +- src/funcs/orchestrationV2CreateWorkflow.ts | 8 +- src/funcs/orchestrationV2DeleteTrigger.ts | 8 +- src/funcs/orchestrationV2DeleteWorkflow.ts | 8 +- src/funcs/orchestrationV2GetInstance.ts | 8 +- .../orchestrationV2GetInstanceHistory.ts | 8 +- .../orchestrationV2GetInstanceStageHistory.ts | 8 +- src/funcs/orchestrationV2GetServerInfo.ts | 8 +- src/funcs/orchestrationV2GetWorkflow.ts | 8 +- src/funcs/orchestrationV2ListInstances.ts | 8 +- src/funcs/orchestrationV2ListTriggers.ts | 8 +- .../orchestrationV2ListTriggersOccurrences.ts | 8 +- src/funcs/orchestrationV2ListWorkflows.ts | 8 +- src/funcs/orchestrationV2ReadTrigger.ts | 8 +- src/funcs/orchestrationV2RunWorkflow.ts | 8 +- src/funcs/orchestrationV2SendEvent.ts | 8 +- ...tToPool.ts => paymentsAddAccountToPool.ts} | 10 +- ...nsfer.ts => paymentsConnectorsTransfer.ts} | 10 +- ...ateAccount.ts => paymentsCreateAccount.ts} | 10 +- ...ccount.ts => paymentsCreateBankAccount.ts} | 10 +- ...atePayment.ts => paymentsCreatePayment.ts} | 10 +- ...sV1CreatePool.ts => paymentsCreatePool.ts} | 10 +- ...ts => paymentsCreateTransferInitiation.ts} | 10 +- ...sV1DeletePool.ts => paymentsDeletePool.ts} | 10 +- ...ts => paymentsDeleteTransferInitiation.ts} | 10 +- ...count.ts => paymentsForwardBankAccount.ts} | 10 +- ...ances.ts => paymentsGetAccountBalances.ts} | 10 +- ...nkAccount.ts => paymentsGetBankAccount.ts} | 10 +- ...torTask.ts => paymentsGetConnectorTask.ts} | 10 +- ...askV1.ts => paymentsGetConnectorTaskV1.ts} | 10 +- ...sV1GetPayment.ts => paymentsGetPayment.ts} | 10 +- ...aymentsV1GetPool.ts => paymentsGetPool.ts} | 10 +- ...Balances.ts => paymentsGetPoolBalances.ts} | 10 +- ...on.ts => paymentsGetTransferInitiation.ts} | 10 +- ...nnector.ts => paymentsInstallConnector.ts} | 10 +- ...ectors.ts => paymentsListAllConnectors.ts} | 10 +- ...ccounts.ts => paymentsListBankAccounts.ts} | 10 +- ...paymentsListConfigsAvailableConnectors.ts} | 10 +- ...Tasks.ts => paymentsListConnectorTasks.ts} | 10 +- ...sV1.ts => paymentsListConnectorTasksV1.ts} | 10 +- ...istPayments.ts => paymentsListPayments.ts} | 10 +- ...ntsV1ListPools.ts => paymentsListPools.ts} | 10 +- ....ts => paymentsListTransferInitiations.ts} | 10 +- ...count.ts => paymentsPaymentsgetAccount.ts} | 10 +- ...fo.ts => paymentsPaymentsgetServerInfo.ts} | 10 +- ...nts.ts => paymentsPaymentslistAccounts.ts} | 10 +- ...nfig.ts => paymentsReadConnectorConfig.ts} | 10 +- ...V1.ts => paymentsReadConnectorConfigV1.ts} | 10 +- ...ol.ts => paymentsRemoveAccountFromPool.ts} | 10 +- ...Connector.ts => paymentsResetConnector.ts} | 10 +- ...ectorV1.ts => paymentsResetConnectorV1.ts} | 10 +- ....ts => paymentsRetryTransferInitiation.ts} | 10 +- ...s => paymentsReverseTransferInitiation.ts} | 10 +- ...paymentsUdpateTransferInitiationStatus.ts} | 10 +- ...ector.ts => paymentsUninstallConnector.ts} | 10 +- ...rV1.ts => paymentsUninstallConnectorV1.ts} | 10 +- ...s => paymentsUpdateBankAccountMetadata.ts} | 10 +- ....ts => paymentsUpdateConnectorConfigV1.ts} | 10 +- ...eMetadata.ts => paymentsUpdateMetadata.ts} | 10 +- ...olicy.ts => reconciliationCreatePolicy.ts} | 10 +- ...olicy.ts => reconciliationDeletePolicy.ts} | 10 +- ...etPolicy.ts => reconciliationGetPolicy.ts} | 10 +- ....ts => reconciliationGetReconciliation.ts} | 10 +- ...icies.ts => reconciliationListPolicies.ts} | 10 +- ...s => reconciliationListReconciliations.ts} | 10 +- ...econcile.ts => reconciliationReconcile.ts} | 10 +- ...onciliationReconciliationgetServerInfo.ts} | 10 +- .../{searchV1Search.ts => searchSearch.ts} | 16 +- ...erInfo.ts => searchSearchgetServerInfo.ts} | 12 +- src/funcs/walletsV1ConfirmHold.ts | 8 +- src/funcs/walletsV1CreateBalance.ts | 8 +- src/funcs/walletsV1CreateWallet.ts | 8 +- src/funcs/walletsV1CreditWallet.ts | 8 +- src/funcs/walletsV1DebitWallet.ts | 8 +- src/funcs/walletsV1GetBalance.ts | 8 +- src/funcs/walletsV1GetHold.ts | 8 +- src/funcs/walletsV1GetHolds.ts | 8 +- src/funcs/walletsV1GetTransactions.ts | 8 +- src/funcs/walletsV1GetWallet.ts | 8 +- src/funcs/walletsV1GetWalletSummary.ts | 8 +- src/funcs/walletsV1ListBalances.ts | 8 +- src/funcs/walletsV1ListWallets.ts | 8 +- src/funcs/walletsV1UpdateWallet.ts | 8 +- src/funcs/walletsV1VoidHold.ts | 8 +- src/funcs/walletsV1WalletsgetServerInfo.ts | 8 +- ...ateConfig.ts => webhooksActivateConfig.ts} | 10 +- ...ecret.ts => webhooksChangeConfigSecret.ts} | 10 +- ...eConfig.ts => webhooksDeactivateConfig.ts} | 10 +- ...eleteConfig.ts => webhooksDeleteConfig.ts} | 10 +- ...nyConfigs.ts => webhooksGetManyConfigs.ts} | 10 +- ...nsertConfig.ts => webhooksInsertConfig.ts} | 10 +- ...sV1TestConfig.ts => webhooksTestConfig.ts} | 10 +- src/hooks/hooks.ts | 28 +- src/hooks/types.ts | 7 + src/lib/config.ts | 8 +- src/lib/encodings.ts | 156 +- src/lib/primitives.ts | 76 + src/lib/schemas.ts | 5 + src/lib/sdks.ts | 12 +- src/lib/security.ts | 2 +- src/sdk/auth.ts | 157 +- src/sdk/ledger.ts | 8 +- src/sdk/orchestration.ts | 627 ++- src/sdk/payments.ts | 742 +++- src/sdk/reconciliation.ts | 134 +- src/sdk/sdk.ts | 13 + src/sdk/sdkorchestrationv1.ts | 309 -- src/sdk/sdkpaymentsv1.ts | 745 ---- src/sdk/sdkreconciliationv1.ts | 137 - src/sdk/sdksearchv1.ts | 45 - src/sdk/sdkv1.ts | 268 +- src/sdk/sdkv2.ts | 329 -- src/sdk/sdkwalletsv1.ts | 244 -- src/sdk/sdkwebhooksv1.ts | 147 - src/sdk/search.ts | 38 +- src/sdk/types/operations.ts | 16 +- src/sdk/v1.ts | 281 +- src/sdk/wallets.ts | 8 +- src/sdk/webhooks.ts | 144 +- tsconfig.json | 3 +- 582 files changed, 15766 insertions(+), 15353 deletions(-) delete mode 100644 docs/sdks/sdkorchestrationv1/README.md delete mode 100644 docs/sdks/sdkpaymentsv1/README.md delete mode 100644 docs/sdks/sdkreconciliationv1/README.md delete mode 100644 docs/sdks/sdksearchv1/README.md delete mode 100644 docs/sdks/sdkv2/README.md delete mode 100644 docs/sdks/sdkwalletsv1/README.md delete mode 100644 docs/sdks/sdkwebhooksv1/README.md rename src/funcs/{authV1CreateClient.ts => authCreateClient.ts} (94%) rename src/funcs/{authV1CreateSecret.ts => authCreateSecret.ts} (94%) rename src/funcs/{authV1DeleteClient.ts => authDeleteClient.ts} (94%) rename src/funcs/{authV1DeleteSecret.ts => authDeleteSecret.ts} (94%) rename src/funcs/{authV1GetServerInfo.ts => authGetServerInfo.ts} (93%) rename src/funcs/{authV1ListClients.ts => authListClients.ts} (93%) rename src/funcs/{authV1ListUsers.ts => authListUsers.ts} (93%) rename src/funcs/{authV1ReadClient.ts => authReadClient.ts} (94%) rename src/funcs/{authV1ReadUser.ts => authReadUser.ts} (94%) rename src/funcs/{authV1UpdateClient.ts => authUpdateClient.ts} (94%) rename src/funcs/{authV1GetOIDCWellKnowns.ts => getOIDCWellKnowns.ts} (93%) rename src/funcs/{orchestrationV1CancelEvent.ts => orchestrationCancelEvent.ts} (94%) rename src/funcs/{orchestrationV1CreateTrigger.ts => orchestrationCreateTrigger.ts} (94%) rename src/funcs/{orchestrationV1CreateWorkflow.ts => orchestrationCreateWorkflow.ts} (94%) rename src/funcs/{orchestrationV1DeleteTrigger.ts => orchestrationDeleteTrigger.ts} (94%) rename src/funcs/{orchestrationV1DeleteWorkflow.ts => orchestrationDeleteWorkflow.ts} (94%) rename src/funcs/{orchestrationV1GetInstance.ts => orchestrationGetInstance.ts} (94%) rename src/funcs/{orchestrationV1GetInstanceHistory.ts => orchestrationGetInstanceHistory.ts} (94%) rename src/funcs/{orchestrationV1GetInstanceStageHistory.ts => orchestrationGetInstanceStageHistory.ts} (94%) rename src/funcs/{orchestrationV1GetWorkflow.ts => orchestrationGetWorkflow.ts} (94%) rename src/funcs/{orchestrationV1ListInstances.ts => orchestrationListInstances.ts} (94%) rename src/funcs/{orchestrationV1ListTriggers.ts => orchestrationListTriggers.ts} (94%) rename src/funcs/{orchestrationV1ListTriggersOccurrences.ts => orchestrationListTriggersOccurrences.ts} (94%) rename src/funcs/{orchestrationV1ListWorkflows.ts => orchestrationListWorkflows.ts} (93%) rename src/funcs/{orchestrationV1OrchestrationgetServerInfo.ts => orchestrationOrchestrationgetServerInfo.ts} (92%) rename src/funcs/{orchestrationV1ReadTrigger.ts => orchestrationReadTrigger.ts} (94%) rename src/funcs/{orchestrationV1RunWorkflow.ts => orchestrationRunWorkflow.ts} (94%) rename src/funcs/{orchestrationV1SendEvent.ts => orchestrationSendEvent.ts} (94%) rename src/funcs/{orchestrationV2TestTrigger.ts => orchestrationTestTrigger.ts} (94%) rename src/funcs/{paymentsV1AddAccountToPool.ts => paymentsAddAccountToPool.ts} (94%) rename src/funcs/{paymentsV1ConnectorsTransfer.ts => paymentsConnectorsTransfer.ts} (94%) rename src/funcs/{paymentsV1CreateAccount.ts => paymentsCreateAccount.ts} (94%) rename src/funcs/{paymentsV1CreateBankAccount.ts => paymentsCreateBankAccount.ts} (94%) rename src/funcs/{paymentsV1CreatePayment.ts => paymentsCreatePayment.ts} (94%) rename src/funcs/{paymentsV1CreatePool.ts => paymentsCreatePool.ts} (94%) rename src/funcs/{paymentsV1CreateTransferInitiation.ts => paymentsCreateTransferInitiation.ts} (94%) rename src/funcs/{paymentsV1DeletePool.ts => paymentsDeletePool.ts} (94%) rename src/funcs/{paymentsV1DeleteTransferInitiation.ts => paymentsDeleteTransferInitiation.ts} (94%) rename src/funcs/{paymentsV1ForwardBankAccount.ts => paymentsForwardBankAccount.ts} (94%) rename src/funcs/{paymentsV1GetAccountBalances.ts => paymentsGetAccountBalances.ts} (94%) rename src/funcs/{paymentsV1GetBankAccount.ts => paymentsGetBankAccount.ts} (94%) rename src/funcs/{paymentsV1GetConnectorTask.ts => paymentsGetConnectorTask.ts} (94%) rename src/funcs/{paymentsV1GetConnectorTaskV1.ts => paymentsGetConnectorTaskV1.ts} (94%) rename src/funcs/{paymentsV1GetPayment.ts => paymentsGetPayment.ts} (94%) rename src/funcs/{paymentsV1GetPool.ts => paymentsGetPool.ts} (94%) rename src/funcs/{paymentsV1GetPoolBalances.ts => paymentsGetPoolBalances.ts} (94%) rename src/funcs/{paymentsV1GetTransferInitiation.ts => paymentsGetTransferInitiation.ts} (94%) rename src/funcs/{paymentsV1InstallConnector.ts => paymentsInstallConnector.ts} (94%) rename src/funcs/{paymentsV1ListAllConnectors.ts => paymentsListAllConnectors.ts} (93%) rename src/funcs/{paymentsV1ListBankAccounts.ts => paymentsListBankAccounts.ts} (94%) rename src/funcs/{paymentsV1ListConfigsAvailableConnectors.ts => paymentsListConfigsAvailableConnectors.ts} (93%) rename src/funcs/{paymentsV1ListConnectorTasks.ts => paymentsListConnectorTasks.ts} (94%) rename src/funcs/{paymentsV1ListConnectorTasksV1.ts => paymentsListConnectorTasksV1.ts} (94%) rename src/funcs/{paymentsV1ListPayments.ts => paymentsListPayments.ts} (94%) rename src/funcs/{paymentsV1ListPools.ts => paymentsListPools.ts} (94%) rename src/funcs/{paymentsV1ListTransferInitiations.ts => paymentsListTransferInitiations.ts} (94%) rename src/funcs/{paymentsV1PaymentsgetAccount.ts => paymentsPaymentsgetAccount.ts} (94%) rename src/funcs/{paymentsV1PaymentsgetServerInfo.ts => paymentsPaymentsgetServerInfo.ts} (93%) rename src/funcs/{paymentsV1PaymentslistAccounts.ts => paymentsPaymentslistAccounts.ts} (94%) rename src/funcs/{paymentsV1ReadConnectorConfig.ts => paymentsReadConnectorConfig.ts} (94%) rename src/funcs/{paymentsV1ReadConnectorConfigV1.ts => paymentsReadConnectorConfigV1.ts} (94%) rename src/funcs/{paymentsV1RemoveAccountFromPool.ts => paymentsRemoveAccountFromPool.ts} (94%) rename src/funcs/{paymentsV1ResetConnector.ts => paymentsResetConnector.ts} (94%) rename src/funcs/{paymentsV1ResetConnectorV1.ts => paymentsResetConnectorV1.ts} (94%) rename src/funcs/{paymentsV1RetryTransferInitiation.ts => paymentsRetryTransferInitiation.ts} (94%) rename src/funcs/{paymentsV1ReverseTransferInitiation.ts => paymentsReverseTransferInitiation.ts} (94%) rename src/funcs/{paymentsV1UdpateTransferInitiationStatus.ts => paymentsUdpateTransferInitiationStatus.ts} (94%) rename src/funcs/{paymentsV1UninstallConnector.ts => paymentsUninstallConnector.ts} (94%) rename src/funcs/{paymentsV1UninstallConnectorV1.ts => paymentsUninstallConnectorV1.ts} (94%) rename src/funcs/{paymentsV1UpdateBankAccountMetadata.ts => paymentsUpdateBankAccountMetadata.ts} (94%) rename src/funcs/{paymentsV1UpdateConnectorConfigV1.ts => paymentsUpdateConnectorConfigV1.ts} (94%) rename src/funcs/{paymentsV1UpdateMetadata.ts => paymentsUpdateMetadata.ts} (94%) rename src/funcs/{reconciliationV1CreatePolicy.ts => reconciliationCreatePolicy.ts} (94%) rename src/funcs/{reconciliationV1DeletePolicy.ts => reconciliationDeletePolicy.ts} (94%) rename src/funcs/{reconciliationV1GetPolicy.ts => reconciliationGetPolicy.ts} (94%) rename src/funcs/{reconciliationV1GetReconciliation.ts => reconciliationGetReconciliation.ts} (94%) rename src/funcs/{reconciliationV1ListPolicies.ts => reconciliationListPolicies.ts} (94%) rename src/funcs/{reconciliationV1ListReconciliations.ts => reconciliationListReconciliations.ts} (94%) rename src/funcs/{reconciliationV1Reconcile.ts => reconciliationReconcile.ts} (94%) rename src/funcs/{reconciliationV1ReconciliationgetServerInfo.ts => reconciliationReconciliationgetServerInfo.ts} (92%) rename src/funcs/{searchV1Search.ts => searchSearch.ts} (91%) rename src/funcs/{searchV1SearchgetServerInfo.ts => searchSearchgetServerInfo.ts} (91%) rename src/funcs/{webhooksV1ActivateConfig.ts => webhooksActivateConfig.ts} (94%) rename src/funcs/{webhooksV1ChangeConfigSecret.ts => webhooksChangeConfigSecret.ts} (94%) rename src/funcs/{webhooksV1DeactivateConfig.ts => webhooksDeactivateConfig.ts} (94%) rename src/funcs/{webhooksV1DeleteConfig.ts => webhooksDeleteConfig.ts} (94%) rename src/funcs/{webhooksV1GetManyConfigs.ts => webhooksGetManyConfigs.ts} (94%) rename src/funcs/{webhooksV1InsertConfig.ts => webhooksInsertConfig.ts} (94%) rename src/funcs/{webhooksV1TestConfig.ts => webhooksTestConfig.ts} (94%) delete mode 100644 src/sdk/sdkorchestrationv1.ts delete mode 100644 src/sdk/sdkpaymentsv1.ts delete mode 100644 src/sdk/sdkreconciliationv1.ts delete mode 100644 src/sdk/sdksearchv1.ts delete mode 100644 src/sdk/sdkv2.ts delete mode 100644 src/sdk/sdkwalletsv1.ts delete mode 100644 src/sdk/sdkwebhooksv1.ts diff --git a/.gitignore b/.gitignore index 3390155c..00aed2a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/react-query +/.speakeasy/reports /funcs /core.* /__tests__ diff --git a/.npmignore b/.npmignore index 06cd8abf..abca4290 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,10 @@ **/* +!/FUNCTIONS.md +!/RUNTIMES.md +!/REACT_QUERY.md !/**/*.ts !/**/*.js +!/**/*.json !/**/*.map /.eslintrc.js diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 02dbe1b3..1abd03e4 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: 1cad063828c35998ccfdb3484f3caab0 - docVersion: v2.1.1 - speakeasyVersion: 1.441.1 - generationVersion: 2.461.2 - releaseVersion: 3.3.0 - configChecksum: d24e401f87ab901cffa5338c63b86c93 + docChecksum: d5ddc23c4a57b4b40698bd9a18716aa9 + docVersion: v2.1.2 + speakeasyVersion: 1.476.2 + generationVersion: 2.495.1 + releaseVersion: 3.4.0 + configChecksum: c4361cd24586ef75dcd8a7b4cc20eef2 repoURL: https://github.com/formancehq/formance-sdk-typescript.git repoSubDirectory: . installationURL: https://github.com/formancehq/formance-sdk-typescript @@ -16,16 +16,17 @@ features: additionalDependencies: 0.1.0 bigint: 0.0.2 constsAndDefaults: 0.1.11 - core: 3.18.6 + core: 3.18.17 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 downloadStreams: 0.1.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.1.2 errors: 2.84.0 - globalSecurity: 2.82.11 + globalSecurity: 2.82.12 globalSecurityCallbacks: 0.1.0 globalServerURLs: 2.82.4 + groups: 2.81.2 ignores: 2.81.1 nameOverrides: 2.81.2 nullables: 0.1.0 @@ -33,13 +34,11 @@ features: responseFormat: 0.2.3 retries: 2.83.0 sdkHooks: 0.2.0 - tests: 0.7.0 unions: 2.85.8 generatedFiles: - .eslintrc.cjs - .gitattributes - .npmignore - - CONTRIBUTING.md - FUNCTIONS.md - RUNTIMES.md - USAGE.md @@ -815,14 +814,7 @@ generatedFiles: - docs/sdks/payments/README.md - docs/sdks/reconciliation/README.md - docs/sdks/sdk/README.md - - docs/sdks/sdkorchestrationv1/README.md - - docs/sdks/sdkpaymentsv1/README.md - - docs/sdks/sdkreconciliationv1/README.md - - docs/sdks/sdksearchv1/README.md - docs/sdks/sdkv1/README.md - - docs/sdks/sdkv2/README.md - - docs/sdks/sdkwalletsv1/README.md - - docs/sdks/sdkwebhooksv1/README.md - docs/sdks/search/README.md - docs/sdks/v1/README.md - docs/sdks/v2/README.md @@ -831,17 +823,17 @@ generatedFiles: - jsr.json - package.json - src/core.ts - - src/funcs/authV1CreateClient.ts - - src/funcs/authV1CreateSecret.ts - - src/funcs/authV1DeleteClient.ts - - src/funcs/authV1DeleteSecret.ts - - src/funcs/authV1GetOIDCWellKnowns.ts - - src/funcs/authV1GetServerInfo.ts - - src/funcs/authV1ListClients.ts - - src/funcs/authV1ListUsers.ts - - src/funcs/authV1ReadClient.ts - - src/funcs/authV1ReadUser.ts - - src/funcs/authV1UpdateClient.ts + - src/funcs/authCreateClient.ts + - src/funcs/authCreateSecret.ts + - src/funcs/authDeleteClient.ts + - src/funcs/authDeleteSecret.ts + - src/funcs/authGetServerInfo.ts + - src/funcs/authListClients.ts + - src/funcs/authListUsers.ts + - src/funcs/authReadClient.ts + - src/funcs/authReadUser.ts + - src/funcs/authUpdateClient.ts + - src/funcs/getOIDCWellKnowns.ts - src/funcs/getVersions.ts - src/funcs/ledgerV1AddMetadataOnTransaction.ts - src/funcs/ledgerV1AddMetadataToAccount.ts @@ -889,23 +881,24 @@ generatedFiles: - src/funcs/ledgerV2ReadStats.ts - src/funcs/ledgerV2RevertTransaction.ts - src/funcs/ledgerV2UpdateLedgerMetadata.ts - - src/funcs/orchestrationV1CancelEvent.ts - - src/funcs/orchestrationV1CreateTrigger.ts - - src/funcs/orchestrationV1CreateWorkflow.ts - - src/funcs/orchestrationV1DeleteTrigger.ts - - src/funcs/orchestrationV1DeleteWorkflow.ts - - src/funcs/orchestrationV1GetInstance.ts - - src/funcs/orchestrationV1GetInstanceHistory.ts - - src/funcs/orchestrationV1GetInstanceStageHistory.ts - - src/funcs/orchestrationV1GetWorkflow.ts - - src/funcs/orchestrationV1ListInstances.ts - - src/funcs/orchestrationV1ListTriggers.ts - - src/funcs/orchestrationV1ListTriggersOccurrences.ts - - src/funcs/orchestrationV1ListWorkflows.ts - - src/funcs/orchestrationV1OrchestrationgetServerInfo.ts - - src/funcs/orchestrationV1ReadTrigger.ts - - src/funcs/orchestrationV1RunWorkflow.ts - - src/funcs/orchestrationV1SendEvent.ts + - src/funcs/orchestrationCancelEvent.ts + - src/funcs/orchestrationCreateTrigger.ts + - src/funcs/orchestrationCreateWorkflow.ts + - src/funcs/orchestrationDeleteTrigger.ts + - src/funcs/orchestrationDeleteWorkflow.ts + - src/funcs/orchestrationGetInstance.ts + - src/funcs/orchestrationGetInstanceHistory.ts + - src/funcs/orchestrationGetInstanceStageHistory.ts + - src/funcs/orchestrationGetWorkflow.ts + - src/funcs/orchestrationListInstances.ts + - src/funcs/orchestrationListTriggers.ts + - src/funcs/orchestrationListTriggersOccurrences.ts + - src/funcs/orchestrationListWorkflows.ts + - src/funcs/orchestrationOrchestrationgetServerInfo.ts + - src/funcs/orchestrationReadTrigger.ts + - src/funcs/orchestrationRunWorkflow.ts + - src/funcs/orchestrationSendEvent.ts + - src/funcs/orchestrationTestTrigger.ts - src/funcs/orchestrationV2CancelEvent.ts - src/funcs/orchestrationV2CreateTrigger.ts - src/funcs/orchestrationV2CreateWorkflow.ts @@ -923,60 +916,59 @@ generatedFiles: - src/funcs/orchestrationV2ReadTrigger.ts - src/funcs/orchestrationV2RunWorkflow.ts - src/funcs/orchestrationV2SendEvent.ts - - src/funcs/orchestrationV2TestTrigger.ts - - src/funcs/paymentsV1AddAccountToPool.ts - - src/funcs/paymentsV1ConnectorsTransfer.ts - - src/funcs/paymentsV1CreateAccount.ts - - src/funcs/paymentsV1CreateBankAccount.ts - - src/funcs/paymentsV1CreatePayment.ts - - src/funcs/paymentsV1CreatePool.ts - - src/funcs/paymentsV1CreateTransferInitiation.ts - - src/funcs/paymentsV1DeletePool.ts - - src/funcs/paymentsV1DeleteTransferInitiation.ts - - src/funcs/paymentsV1ForwardBankAccount.ts - - src/funcs/paymentsV1GetAccountBalances.ts - - src/funcs/paymentsV1GetBankAccount.ts - - src/funcs/paymentsV1GetConnectorTask.ts - - src/funcs/paymentsV1GetConnectorTaskV1.ts - - src/funcs/paymentsV1GetPayment.ts - - src/funcs/paymentsV1GetPool.ts - - src/funcs/paymentsV1GetPoolBalances.ts - - src/funcs/paymentsV1GetTransferInitiation.ts - - src/funcs/paymentsV1InstallConnector.ts - - src/funcs/paymentsV1ListAllConnectors.ts - - src/funcs/paymentsV1ListBankAccounts.ts - - src/funcs/paymentsV1ListConfigsAvailableConnectors.ts - - src/funcs/paymentsV1ListConnectorTasks.ts - - src/funcs/paymentsV1ListConnectorTasksV1.ts - - src/funcs/paymentsV1ListPayments.ts - - src/funcs/paymentsV1ListPools.ts - - src/funcs/paymentsV1ListTransferInitiations.ts - - src/funcs/paymentsV1PaymentsgetAccount.ts - - src/funcs/paymentsV1PaymentsgetServerInfo.ts - - src/funcs/paymentsV1PaymentslistAccounts.ts - - src/funcs/paymentsV1ReadConnectorConfig.ts - - src/funcs/paymentsV1ReadConnectorConfigV1.ts - - src/funcs/paymentsV1RemoveAccountFromPool.ts - - src/funcs/paymentsV1ResetConnector.ts - - src/funcs/paymentsV1ResetConnectorV1.ts - - src/funcs/paymentsV1RetryTransferInitiation.ts - - src/funcs/paymentsV1ReverseTransferInitiation.ts - - src/funcs/paymentsV1UdpateTransferInitiationStatus.ts - - src/funcs/paymentsV1UninstallConnector.ts - - src/funcs/paymentsV1UninstallConnectorV1.ts - - src/funcs/paymentsV1UpdateBankAccountMetadata.ts - - src/funcs/paymentsV1UpdateConnectorConfigV1.ts - - src/funcs/paymentsV1UpdateMetadata.ts - - src/funcs/reconciliationV1CreatePolicy.ts - - src/funcs/reconciliationV1DeletePolicy.ts - - src/funcs/reconciliationV1GetPolicy.ts - - src/funcs/reconciliationV1GetReconciliation.ts - - src/funcs/reconciliationV1ListPolicies.ts - - src/funcs/reconciliationV1ListReconciliations.ts - - src/funcs/reconciliationV1Reconcile.ts - - src/funcs/reconciliationV1ReconciliationgetServerInfo.ts - - src/funcs/searchV1Search.ts - - src/funcs/searchV1SearchgetServerInfo.ts + - src/funcs/paymentsAddAccountToPool.ts + - src/funcs/paymentsConnectorsTransfer.ts + - src/funcs/paymentsCreateAccount.ts + - src/funcs/paymentsCreateBankAccount.ts + - src/funcs/paymentsCreatePayment.ts + - src/funcs/paymentsCreatePool.ts + - src/funcs/paymentsCreateTransferInitiation.ts + - src/funcs/paymentsDeletePool.ts + - src/funcs/paymentsDeleteTransferInitiation.ts + - src/funcs/paymentsForwardBankAccount.ts + - src/funcs/paymentsGetAccountBalances.ts + - src/funcs/paymentsGetBankAccount.ts + - src/funcs/paymentsGetConnectorTask.ts + - src/funcs/paymentsGetConnectorTaskV1.ts + - src/funcs/paymentsGetPayment.ts + - src/funcs/paymentsGetPool.ts + - src/funcs/paymentsGetPoolBalances.ts + - src/funcs/paymentsGetTransferInitiation.ts + - src/funcs/paymentsInstallConnector.ts + - src/funcs/paymentsListAllConnectors.ts + - src/funcs/paymentsListBankAccounts.ts + - src/funcs/paymentsListConfigsAvailableConnectors.ts + - src/funcs/paymentsListConnectorTasks.ts + - src/funcs/paymentsListConnectorTasksV1.ts + - src/funcs/paymentsListPayments.ts + - src/funcs/paymentsListPools.ts + - src/funcs/paymentsListTransferInitiations.ts + - src/funcs/paymentsPaymentsgetAccount.ts + - src/funcs/paymentsPaymentsgetServerInfo.ts + - src/funcs/paymentsPaymentslistAccounts.ts + - src/funcs/paymentsReadConnectorConfig.ts + - src/funcs/paymentsReadConnectorConfigV1.ts + - src/funcs/paymentsRemoveAccountFromPool.ts + - src/funcs/paymentsResetConnector.ts + - src/funcs/paymentsResetConnectorV1.ts + - src/funcs/paymentsRetryTransferInitiation.ts + - src/funcs/paymentsReverseTransferInitiation.ts + - src/funcs/paymentsUdpateTransferInitiationStatus.ts + - src/funcs/paymentsUninstallConnector.ts + - src/funcs/paymentsUninstallConnectorV1.ts + - src/funcs/paymentsUpdateBankAccountMetadata.ts + - src/funcs/paymentsUpdateConnectorConfigV1.ts + - src/funcs/paymentsUpdateMetadata.ts + - src/funcs/reconciliationCreatePolicy.ts + - src/funcs/reconciliationDeletePolicy.ts + - src/funcs/reconciliationGetPolicy.ts + - src/funcs/reconciliationGetReconciliation.ts + - src/funcs/reconciliationListPolicies.ts + - src/funcs/reconciliationListReconciliations.ts + - src/funcs/reconciliationReconcile.ts + - src/funcs/reconciliationReconciliationgetServerInfo.ts + - src/funcs/searchSearch.ts + - src/funcs/searchSearchgetServerInfo.ts - src/funcs/walletsV1ConfirmHold.ts - src/funcs/walletsV1CreateBalance.ts - src/funcs/walletsV1CreateWallet.ts @@ -993,13 +985,13 @@ generatedFiles: - src/funcs/walletsV1UpdateWallet.ts - src/funcs/walletsV1VoidHold.ts - src/funcs/walletsV1WalletsgetServerInfo.ts - - src/funcs/webhooksV1ActivateConfig.ts - - src/funcs/webhooksV1ChangeConfigSecret.ts - - src/funcs/webhooksV1DeactivateConfig.ts - - src/funcs/webhooksV1DeleteConfig.ts - - src/funcs/webhooksV1GetManyConfigs.ts - - src/funcs/webhooksV1InsertConfig.ts - - src/funcs/webhooksV1TestConfig.ts + - src/funcs/webhooksActivateConfig.ts + - src/funcs/webhooksChangeConfigSecret.ts + - src/funcs/webhooksDeactivateConfig.ts + - src/funcs/webhooksDeleteConfig.ts + - src/funcs/webhooksGetManyConfigs.ts + - src/funcs/webhooksInsertConfig.ts + - src/funcs/webhooksTestConfig.ts - src/hooks/clientcredentials.ts - src/hooks/hooks.ts - src/hooks/index.ts @@ -1556,14 +1548,7 @@ generatedFiles: - src/sdk/payments.ts - src/sdk/reconciliation.ts - src/sdk/sdk.ts - - src/sdk/sdkorchestrationv1.ts - - src/sdk/sdkpaymentsv1.ts - - src/sdk/sdkreconciliationv1.ts - - src/sdk/sdksearchv1.ts - src/sdk/sdkv1.ts - - src/sdk/sdkv2.ts - - src/sdk/sdkwalletsv1.ts - - src/sdk/sdkwebhooksv1.ts - src/sdk/search.ts - src/sdk/types/blobs.ts - src/sdk/types/constdatetime.ts @@ -1579,48 +1564,64 @@ generatedFiles: - src/sdk/webhooks.ts - tsconfig.json examples: - getOIDCWellKnowns: - speakeasy-default-get-OIDC-well-knowns: {} + getOIDCWellKnowns: {} getVersions: speakeasy-default-get-versions: responses: "200": - application/json: {"env": "", "region": "", "versions": []} + application/json: {"env": "", "region": "", "versions": [{"health": true, "name": "", "version": ""}]} + getServerInfo: + speakeasy-default-get-server-info: + responses: + "200": + application/json: {"version": ""} createClient: - speakeasy-default-create-client: {} + speakeasy-default-create-client: + responses: + "201": + application/json: {} createSecret: speakeasy-default-create-secret: parameters: path: - clientId: "" + clientId: "" + responses: + "200": + application/json: {} deleteClient: speakeasy-default-delete-client: parameters: path: - clientId: "" + clientId: "" deleteSecret: speakeasy-default-delete-secret: parameters: path: - clientId: "" - secretId: "" + clientId: "" + secretId: "" listClients: - speakeasy-default-list-clients: {} + speakeasy-default-list-clients: + responses: + "200": + application/json: {} listUsers: speakeasy-default-list-users: responses: "200": - application/json: {"data": []} + application/json: {"data": [{"email": "user1@orga1.com", "id": "3bb03708-312f-48a0-821a-e765837dc2c4", "subject": "Jane Doe"}, {"email": "user1@orga1.com", "id": "3bb03708-312f-48a0-821a-e765837dc2c4", "subject": "Jane Doe"}]} readClient: speakeasy-default-read-client: parameters: path: - clientId: "" + clientId: "" + responses: + "200": + application/json: {} readUser: speakeasy-default-read-user: parameters: path: - userId: "" + userId: "" responses: "200": application/json: {"data": {"email": "user1@orga1.com", "id": "3bb03708-312f-48a0-821a-e765837dc2c4", "subject": "Jane Doe"}} @@ -1628,17 +1629,20 @@ examples: speakeasy-default-update-client: parameters: path: - clientId: "" + clientId: "" + responses: + "200": + application/json: {} CreateTransactions: speakeasy-default-create-transactions: parameters: path: ledger: "ledger001" requestBody: - application/json: {"transactions": []} + application/json: {"transactions": [{"postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001"}]} responses: "200": - application/json: {"data": []} + application/json: {"data": [{"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2024-03-05T12:58:17.302Z", "txid": 969224}, {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2023-01-13T12:20:33.284Z", "txid": 808159}, {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2025-12-27T01:08:16.828Z", "txid": 117566}]} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} addMetadataOnTransaction: @@ -1656,8 +1660,6 @@ examples: path: ledger: "ledger001" address: "users:001" - requestBody: - application/json: {} responses: default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} @@ -1682,7 +1684,6 @@ examples: account: "users:001" source: "users:001" destination: "users:001" - metadata: "metadata[key]=value1&metadata[a.nested.key]=value2" responses: default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} @@ -1694,10 +1695,10 @@ examples: query: preview: true requestBody: - application/json: {"postings": [], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}} + application/json: {"postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}} responses: "200": - application/json: {"data": []} + application/json: {"data": [{"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2025-10-22T08:35:30.999Z", "txid": 339139}, {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2023-04-14T18:14:42.519Z", "txid": 159068}, {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2025-12-15T14:36:30.627Z", "txid": 992364}]} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} getAccount: @@ -1718,6 +1719,7 @@ examples: ledger: "ledger001" query: address: "users:001" + pageSize: 15 after: "users:003" cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: @@ -1741,7 +1743,7 @@ examples: speakeasy-default-get-info: responses: "200": - application/json: {"data": {"config": {"storage": {"driver": "", "ledgers": []}}, "server": "", "version": ""}} + application/json: {"data": {"config": {"storage": {"driver": "", "ledgers": ["", ""]}}, "server": "", "version": ""}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} getLedgerInfo: @@ -1751,7 +1753,7 @@ examples: ledger: "ledger001" responses: "200": - application/json: {"data": {"name": "ledger001", "storage": {"migrations": []}}} + application/json: {"data": {"name": "ledger001", "storage": {"migrations": [{"name": "migrations:001", "version": 11}]}}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} getMapping: @@ -1772,7 +1774,7 @@ examples: txid: 1234 responses: "200": - application/json: {"data": {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2023-05-17T19:16:55.376Z", "txid": 926212}} + application/json: {"data": {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2024-01-23T03:49:23.782Z", "txid": 921043}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} listAccounts: @@ -1790,7 +1792,7 @@ examples: pagination_token: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"address": "users:001", "metadata": {"admin": true, "a": {"nested": {"key": "value"}}}, "type": "virtual"}, {"address": "users:001", "metadata": {"admin": true, "a": {"nested": {"key": "value"}}}, "type": "virtual"}, {"address": "users:001", "metadata": {"admin": true, "a": {"nested": {"key": "value"}}}, "type": "virtual"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} "404": application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} default: @@ -1806,7 +1808,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"data": {"key": ""}, "date": "2023-01-03T01:52:56.946Z", "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", "id": 1234, "type": "SET_METADATA"}, {"data": {"key": ""}, "date": "2025-08-25T01:03:57.835Z", "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", "id": 1234, "type": "NEW_TRANSACTION"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} listTransactions: @@ -1824,7 +1826,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"postCommitVolumes": {"orders:1": {"USD": {"balance": 90, "input": 100, "output": 10}}, "orders:2": {"USD": {"balance": 90, "input": 100, "output": 10}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 90, "input": 100, "output": 10}}, "orders:2": {"USD": {"balance": 90, "input": 100, "output": 10}}}, "reference": "ref:001", "timestamp": "2023-03-19T19:47:16.768Z", "txid": 533792}, {"postCommitVolumes": {"orders:1": {"USD": {"balance": 90, "input": 100, "output": 10}}, "orders:2": {"USD": {"balance": 90, "input": 100, "output": 10}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 90, "input": 100, "output": 10}}, "orders:2": {"USD": {"balance": 90, "input": 100, "output": 10}}}, "reference": "ref:001", "timestamp": "2025-01-29T15:40:15.458Z", "txid": 711700}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} readStats: @@ -1834,7 +1836,7 @@ examples: ledger: "ledger001" responses: "200": - application/json: {"data": {"accounts": 939446, "transactions": 258177}} + application/json: {"data": {"accounts": 939446, "transactions": 895732}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} revertTransaction: @@ -1846,7 +1848,7 @@ examples: query: {} responses: "201": - application/json: {"data": {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2024-07-14T12:09:08.629Z", "txid": 281842}} + application/json: {"data": {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2024-09-05T21:38:55.965Z", "txid": 107968}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} runScript: @@ -1860,17 +1862,17 @@ examples: application/json: {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "reference": "order_1234", "vars": {"user": "users:042"}} responses: "200": - application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "account had insufficient funds", "transaction": {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2022-02-26T16:55:50.834Z", "txid": 60261}} + application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "account had insufficient funds", "transaction": {"postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "timestamp": "2024-11-04T15:22:00.380Z", "txid": 737293}} updateMapping: speakeasy-default-update-mapping: parameters: path: ledger: "ledger001" requestBody: - application/json: {"contracts": []} + application/json: {"contracts": [{"account": "users:001", "expr": {}}, {"account": "users:001", "expr": {}}]} responses: "200": - application/json: {"data": {"contracts": []}} + application/json: {"data": {"contracts": [{"account": "users:001", "expr": {}}, {"account": "users:001", "expr": {}}]}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "INSUFFICIENT_FUND", "errorMessage": "[INSUFFICIENT_FUND] account had insufficient funds"} v2AddMetadataOnTransaction: @@ -1925,10 +1927,12 @@ examples: path: ledger: "ledger001" requestBody: - application/json: [] + application/json: [{"action": ""}] responses: "200": - application/json: {"data": []} + application/json: {"data": [{"responseType": ""}]} + "400": + application/json: {"data": [{"responseType": ""}, {"errorCode": "", "errorDescription": "", "responseType": ""}]} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2CreateLedger: @@ -1950,10 +1954,10 @@ examples: dryRun: true header: {} requestBody: - application/json: {"metadata": {"admin": "true"}, "postings": [], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}} + application/json: {"metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}} responses: "200": - application/json: {"data": {"id": 816467, "metadata": {"admin": "true"}, "postings": [], "reference": "ref:001", "reverted": true, "timestamp": "2024-11-16T19:32:44.405Z"}} + application/json: {"data": {"id": 31495, "metadata": {"admin": "true"}, "postings": [], "reference": "ref:001", "reverted": false, "timestamp": "2025-09-22T01:21:07.537Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2DeleteAccountMetadata: @@ -1961,7 +1965,7 @@ examples: parameters: path: ledger: "ledger001" - address: "3680 Emile Grove" + address: "96609 Cummings Canyon" key: "foo" responses: default: @@ -1985,6 +1989,11 @@ examples: responses: default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} + v2ExportLogs: + speakeasy-default-v2-export-logs: + parameters: + path: + ledger: "ledger001" v2GetAccount: speakeasy-default-v2-get-account: parameters: @@ -2013,10 +2022,10 @@ examples: responses: "200": application/json: {"server": "", "version": ""} - default: - application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} 5XX: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} + default: + application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2GetLedger: speakeasy-default-v2-get-ledger: parameters: @@ -2024,7 +2033,7 @@ examples: ledger: "ledger001" responses: "200": - application/json: {"data": {"addedAt": "2023-11-18T12:48:23.190Z", "bucket": "", "metadata": {"admin": "true"}, "name": ""}} + application/json: {"data": {"addedAt": "2024-04-15T03:59:26.558Z", "bucket": "", "metadata": {"admin": "true"}, "name": ""}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2GetLedgerInfo: @@ -2034,7 +2043,7 @@ examples: ledger: "ledger001" responses: "200": - application/json: {"data": {"name": "ledger001", "storage": {"migrations": []}}} + application/json: {"data": {"name": "ledger001", "storage": {"migrations": [{"name": "migrations:001", "version": 11}, {"name": "migrations:001", "version": 11}, {"name": "migrations:001", "version": 11}]}}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2GetTransaction: @@ -2046,7 +2055,7 @@ examples: query: {} responses: "200": - application/json: {"data": {"id": 425550, "metadata": {"admin": "true"}, "postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "reverted": true, "timestamp": "2022-09-17T11:37:23.045Z"}} + application/json: {"data": {"id": 546228, "metadata": {"admin": "true"}, "postCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "postings": [], "preCommitVolumes": {"orders:1": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}, "orders:2": {"USD": {"balance": 80, "input": 100, "output": 20}, "EUR": {"balance": 80, "input": 100, "output": 20}}}, "reference": "ref:001", "reverted": true, "timestamp": "2024-01-04T04:51:12.769Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2GetVolumesWithBalances: @@ -2060,7 +2069,15 @@ examples: groupBy: 3 responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"account": "60079609", "asset": "", "balance": 992275, "input": 894289, "output": 625394}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + default: + application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} + v2ImportLogs: + speakeasy-default-v2-import-logs: + parameters: + path: + ledger: "ledger001" + responses: default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2ListAccounts: @@ -2084,7 +2101,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"addedAt": "2025-08-18T14:16:25.795Z", "bucket": "", "metadata": {"admin": "true"}, "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2ListLogs: @@ -2097,7 +2114,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"data": {}, "date": "2024-06-27T07:17:46.078Z", "hash": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", "id": 1234, "type": "SET_METADATA"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2ListTransactions: @@ -2120,7 +2137,7 @@ examples: ledger: "ledger001" responses: "200": - application/json: {"data": {"accounts": 477489, "transactions": 917860}} + application/json: {"data": {"accounts": 144691, "transactions": 882277}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2RevertTransaction: @@ -2132,7 +2149,7 @@ examples: query: {} responses: "201": - application/json: {"data": {"id": 0, "metadata": {"admin": "true"}, "postings": [], "reference": "ref:001", "reverted": false, "timestamp": "2022-12-01T07:12:38.195Z"}} + application/json: {"data": {"id": 614792, "metadata": {"admin": "true"}, "postings": [], "reference": "ref:001", "reverted": true, "timestamp": "2024-12-23T06:12:13.815Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} v2UpdateLedgerMetadata: @@ -2143,10 +2160,10 @@ examples: requestBody: application/json: {"admin": "true"} responses: - default: - application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} 5XX: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} + default: + application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} cancelEvent: "": parameters: @@ -2159,21 +2176,21 @@ examples: speakeasy-default-create-trigger: responses: "201": - application/json: {"data": {"createdAt": "2023-01-13T03:40:57.924Z", "event": "", "id": "", "workflowID": ""}} + application/json: {"data": {"createdAt": "2024-01-13T03:40:57.557Z", "event": "", "id": "", "workflowID": ""}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} createWorkflow: speakeasy-default-create-workflow: responses: "201": - application/json: {"data": {"config": {"stages": []}, "createdAt": "2024-09-23T06:17:11.189Z", "id": "", "updatedAt": "2024-12-01T16:37:43.064Z"}} + application/json: {"data": {"config": {"stages": [{}, {"key": "", "key1": ""}, {}]}, "createdAt": "2025-08-28T15:20:54.999Z", "id": "", "updatedAt": "2024-01-22T19:31:50.523Z"}} default: - application/json: {"errorCode": "VALIDATION", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} deleteTrigger: speakeasy-default-delete-trigger: parameters: path: - triggerID: "" + triggerID: "" responses: default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} @@ -2192,9 +2209,9 @@ examples: instanceID: "xxx" responses: "200": - application/json: {"data": {"createdAt": "2024-12-22T05:06:37.329Z", "id": "", "terminated": false, "updatedAt": "2022-08-04T14:20:35.498Z", "workflowID": ""}} + application/json: {"data": {"createdAt": "2025-12-22T05:06:37.217Z", "id": "", "terminated": true, "updatedAt": "2023-04-26T16:05:05.917Z", "workflowID": ""}} default: - application/json: {"errorCode": "VALIDATION", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} getInstanceHistory: "": parameters: @@ -2213,9 +2230,9 @@ examples: number: 0 responses: "200": - application/json: {"data": []} + application/json: {"data": [{"attempt": 1195, "input": {"CreateTransaction": {"data": {"metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}}}, "CreditWallet": {"data": {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "sources": []}}, "DebitWallet": {"data": {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "pending": true}}, "StripeTransfer": {"amount": 100, "asset": "USD", "destination": "acct_1Gqj58KZcSIg2N2q", "waitingValidation": false}}, "name": "", "output": {"CreateTransaction": {"data": {"id": 789895, "metadata": {"admin": "true"}, "postings": [], "reference": "ref:001", "reverted": true, "timestamp": "2023-08-06T02:20:05.010Z"}}, "GetAccount": {"data": {"address": "users:001", "effectiveVolumes": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}, "metadata": {"admin": "true"}, "volumes": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}}, "GetPayment": {"data": {"adjustments": [{"absolute": false, "amount": 100, "date": "2025-04-08T02:48:47.425Z", "raw": {}, "status": "CANCELLED"}, {"absolute": true, "amount": 100, "date": "2025-11-11T02:51:20.511Z", "raw": {}, "status": "PENDING"}], "asset": "USD", "connectorID": "", "createdAt": "2025-02-01T17:45:57.768Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {}, "raw": {}, "reference": "", "scheme": "google pay", "sourceAccountID": "", "status": "TERMINATED", "type": "PAY-IN"}}, "ListWallets": {"cursor": {"data": [{"createdAt": "2025-12-06T17:39:27.860Z", "id": "ffbd66e8-3ce0-4c96-a10c-8f8e0fc37bf1", "ledger": "", "metadata": {}, "name": ""}, {"createdAt": "2023-10-08T10:30:27.460Z", "id": "cc38d81a-72b4-44c3-9e12-1021e7d24c49", "ledger": "", "metadata": {"key": "", "key1": "", "key2": ""}, "name": ""}, {"createdAt": "2023-08-19T00:05:57.472Z", "id": "52b35c03-d99a-4510-8a1f-81f33c690889", "ledger": "", "metadata": {}, "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}}, "RevertTransaction": {"data": {"id": 619586, "metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "reverted": false, "timestamp": "2023-05-29T15:10:35.259Z"}}}, "startedAt": "2023-07-02T11:58:56.305Z", "terminated": false}, {"attempt": 626222, "input": {"CreateTransaction": {"data": {"metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}}}, "CreditWallet": {"data": {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "sources": []}}, "DebitWallet": {"data": {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "pending": true}}, "StripeTransfer": {"amount": 100, "asset": "USD", "destination": "acct_1Gqj58KZcSIg2N2q", "waitingValidation": false}}, "name": "", "output": {"CreateTransaction": {"data": {"id": 378579, "metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "reverted": false, "timestamp": "2024-04-15T17:34:05.615Z"}}, "GetAccount": {"data": {"address": "users:001", "effectiveVolumes": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}, "metadata": {"admin": "true"}, "volumes": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}}, "GetPayment": {"data": {"adjustments": [{"absolute": true, "amount": 100, "date": "2023-09-29T18:17:48.825Z", "raw": {}, "status": "FAILED"}, {"absolute": false, "amount": 100, "date": "2025-10-19T21:59:00.100Z", "raw": {}, "status": "TERMINATED"}, {"absolute": true, "amount": 100, "date": "2024-08-27T16:14:46.808Z", "raw": {}, "status": "TERMINATED"}], "asset": "USD", "connectorID": "", "createdAt": "2025-01-07T21:12:58.328Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {}, "raw": {}, "reference": "", "scheme": "ach", "sourceAccountID": "", "status": "PENDING", "type": "TRANSFER"}}, "ListWallets": {"cursor": {"data": [{"createdAt": "2025-04-30T04:49:25.662Z", "id": "3b1509a5-fe8d-4e70-9916-180485cfaa61", "ledger": "", "metadata": {"key": ""}, "name": ""}, {"createdAt": "2025-06-23T23:43:36.792Z", "id": "a6d8edb3-a103-4920-bfca-b898a403e10c", "ledger": "", "metadata": {}, "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}}, "RevertTransaction": {"data": {"id": 155282, "metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "reverted": false, "timestamp": "2023-12-07T07:38:05.268Z"}}}, "startedAt": "2023-12-17T14:52:10.553Z", "terminated": true}]} default: - application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} getWorkflow: "": parameters: @@ -2223,7 +2240,7 @@ examples: flowId: "xxx" responses: "200": - application/json: {"data": {"config": {"stages": []}, "createdAt": "2023-06-10T21:32:19.694Z", "id": "", "updatedAt": "2023-11-29T15:42:27.994Z"}} + application/json: {"data": {"config": {"stages": [{}]}, "createdAt": "2025-03-16T03:14:12.617Z", "id": "", "updatedAt": "2024-11-13T22:03:51.333Z"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} listInstances: @@ -2234,26 +2251,26 @@ examples: running: true responses: "200": - application/json: {"data": []} + application/json: {"data": [{"createdAt": "2024-07-17T08:20:08.742Z", "id": "", "terminated": true, "updatedAt": "2023-05-04T22:49:25.313Z", "workflowID": ""}]} default: - application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} listTriggers: speakeasy-default-list-triggers: responses: "200": application/json: {"data": []} default: - application/json: {"errorCode": "VALIDATION", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} listTriggersOccurrences: speakeasy-default-list-triggers-occurrences: parameters: path: - triggerID: "" + triggerID: "" responses: "200": - application/json: {"data": []} + application/json: {"data": [{"date": "2024-04-11T13:42:33.759Z", "event": {"key": "", "key1": ""}, "triggerID": ""}, {"date": "2023-04-01T04:29:12.442Z", "event": {"key": "", "key1": "", "key2": ""}, "triggerID": ""}, {"date": "2024-11-09T03:51:27.854Z", "event": {}, "triggerID": ""}]} default: - application/json: {"errorCode": "INTERNAL", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} listWorkflows: speakeasy-default-list-workflows: responses: @@ -2272,10 +2289,10 @@ examples: speakeasy-default-read-trigger: parameters: path: - triggerID: "" + triggerID: "" responses: "200": - application/json: {"data": {"createdAt": "2023-08-28T14:30:14.785Z", "event": "", "id": "", "workflowID": ""}} + application/json: {"data": {"createdAt": "2024-08-27T14:30:14.944Z", "event": "", "id": "", "workflowID": ""}} default: application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} runWorkflow: @@ -2286,9 +2303,9 @@ examples: query: {} responses: "201": - application/json: {"data": {"createdAt": "2024-11-19T22:37:09.946Z", "id": "", "terminated": true, "updatedAt": "2024-08-17T18:05:13.843Z", "workflowID": ""}} + application/json: {"data": {"createdAt": "2025-11-19T22:37:10.059Z", "id": "", "terminated": false, "updatedAt": "2025-04-08T02:25:10.274Z", "workflowID": ""}} default: - application/json: {"errorCode": "INTERNAL", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} sendEvent: "": parameters: @@ -2301,10 +2318,10 @@ examples: speakeasy-default-test-trigger: parameters: path: - triggerID: "" + triggerID: "" responses: "200": - application/json: {} + application/json: {"data": {}} default: application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2CancelEvent: @@ -2319,21 +2336,21 @@ examples: speakeasy-default-v2-create-trigger: responses: "201": - application/json: {"data": {"createdAt": "2022-11-04T03:41:44.372Z", "event": "", "id": "", "workflowID": ""}} + application/json: {"data": {"createdAt": "2023-11-04T03:41:44.517Z", "event": "", "id": "", "workflowID": ""}} default: - application/json: {"errorCode": "INTERNAL", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2CreateWorkflow: speakeasy-default-v2-create-workflow: responses: "201": - application/json: {"data": {"config": {"stages": []}, "createdAt": "2023-07-25T20:34:34.643Z", "id": "", "updatedAt": "2023-04-16T19:20:26.928Z"}} + application/json: {"data": {"config": {"stages": [{}, {"key": "", "key1": ""}]}, "createdAt": "2023-02-12T15:53:07.805Z", "id": "", "updatedAt": "2023-07-27T16:59:40.630Z"}} default: - application/json: {"errorCode": "VALIDATION", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2DeleteTrigger: speakeasy-default-v2-delete-trigger: parameters: path: - triggerID: "" + triggerID: "" responses: default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} @@ -2352,9 +2369,9 @@ examples: instanceID: "xxx" responses: "200": - application/json: {"data": {"createdAt": "2022-04-08T17:02:59.795Z", "id": "", "terminated": false, "updatedAt": "2022-03-25T15:36:35.638Z", "workflowID": ""}} + application/json: {"data": {"createdAt": "2023-04-08T17:02:59.978Z", "id": "", "terminated": true, "updatedAt": "2024-01-21T13:55:08.573Z", "workflowID": ""}} default: - application/json: {"errorCode": "INTERNAL", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2GetInstanceHistory: "": parameters: @@ -2373,9 +2390,9 @@ examples: number: 0 responses: "200": - application/json: {"data": []} + application/json: {"data": [{"attempt": 841766, "input": {"CreateTransaction": {"data": {"metadata": {"admin": "true"}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "reference": "ref:001", "script": {"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n", "vars": {"user": "users:042"}}}}, "CreditWallet": {"data": {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "sources": []}}, "DebitWallet": {"data": {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "pending": true}}, "StripeTransfer": {"amount": 100, "asset": "USD", "destination": "acct_1Gqj58KZcSIg2N2q", "waitingValidation": false}}, "name": "", "output": {"CreateTransaction": {"data": []}, "GetAccount": {"data": {"address": "users:001", "effectiveVolumes": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}, "metadata": {"admin": "true"}, "volumes": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}}, "GetPayment": {"data": {"adjustments": [{"absolute": true, "amount": 100, "date": "2025-02-15T03:34:37.893Z", "raw": {}, "status": "FAILED"}, {"absolute": false, "amount": 100, "date": "2023-12-11T22:33:57.813Z", "raw": {}, "status": "TERMINATED"}, {"absolute": true, "amount": 100, "date": "2025-10-24T23:24:46.598Z", "raw": {}, "status": "ACTIVE"}], "asset": "USD", "connectorID": "", "createdAt": "2025-08-28T01:33:17.022Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {}, "raw": {}, "reference": "", "scheme": "ach", "sourceAccountID": "", "status": "CANCELLED", "type": "PAY-IN"}}, "ListWallets": {"cursor": {"data": [{"createdAt": "2024-06-11T15:56:41.116Z", "id": "4b14fef9-ea6a-4995-9a1d-56fea045f939", "ledger": "", "metadata": {"key": ""}, "name": ""}, {"createdAt": "2025-01-24T19:07:25.922Z", "id": "530f6213-ce0e-4625-8aef-ef49d934bae2", "ledger": "", "metadata": {"key": "", "key1": ""}, "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}}}, "startedAt": "2024-10-09T00:50:47.718Z", "terminated": false}]} default: - application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} + application/json: {"errorCode": "INTERNAL", "errorMessage": ""} v2GetServerInfo: speakeasy-default-v2-get-server-info: responses: @@ -2390,7 +2407,7 @@ examples: flowId: "xxx" responses: "200": - application/json: {"data": {"config": {"stages": []}, "createdAt": "2024-07-11T21:55:16.068Z", "id": "", "updatedAt": "2024-05-02T05:24:34.577Z"}} + application/json: {"data": {"config": {"stages": [{"key": "", "key1": "", "key2": ""}, {}, {"key": "", "key1": "", "key2": ""}]}, "createdAt": "2023-03-05T08:27:54.243Z", "id": "", "updatedAt": "2023-11-10T19:11:38.261Z"}} default: application/json: {"errorCode": "INTERNAL", "errorMessage": ""} v2ListInstances: @@ -2403,9 +2420,9 @@ examples: running: true responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"createdAt": "2025-02-20T07:16:58.814Z", "id": "", "terminated": true, "updatedAt": "2023-04-08T16:26:11.879Z", "workflowID": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: - application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} v2ListTriggers: "": parameters: @@ -2414,22 +2431,22 @@ examples: pageSize: 100 responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"createdAt": "2024-11-06T20:11:26.440Z", "event": "", "id": "", "workflowID": ""}, {"createdAt": "2024-06-29T18:03:09.712Z", "event": "", "id": "", "workflowID": ""}, {"createdAt": "2023-07-20T09:26:29.123Z", "event": "", "id": "", "workflowID": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "INTERNAL", "errorMessage": ""} v2ListTriggersOccurrences: "": parameters: path: - triggerID: "" + triggerID: "" query: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" pageSize: 100 responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"date": "2023-03-02T19:38:47.199Z", "event": {}, "triggerID": ""}, {"date": "2023-06-13T06:35:59.010Z", "event": {}, "triggerID": ""}, {"date": "2023-10-11T21:30:54.586Z", "event": {"key": "", "key1": "", "key2": ""}, "triggerID": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: - application/json: {"errorCode": "INTERNAL", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2ListWorkflows: "": parameters: @@ -2440,17 +2457,17 @@ examples: "200": application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: - application/json: {"errorCode": "VALIDATION", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2ReadTrigger: speakeasy-default-v2-read-trigger: parameters: path: - triggerID: "" + triggerID: "" responses: "200": - application/json: {"data": {"createdAt": "2024-07-19T18:33:02.586Z", "event": "", "id": "", "workflowID": ""}} + application/json: {"data": {"createdAt": "2025-07-19T18:33:02.672Z", "event": "", "id": "", "workflowID": ""}} default: - application/json: {"errorCode": "INTERNAL", "errorMessage": ""} + application/json: {"errorCode": "NOT_FOUND", "errorMessage": ""} v2RunWorkflow: "": parameters: @@ -2459,9 +2476,9 @@ examples: query: {} responses: "201": - application/json: {"data": {"createdAt": "2022-09-25T14:53:09.533Z", "id": "", "terminated": false, "updatedAt": "2022-01-11T23:11:19.232Z", "workflowID": ""}} + application/json: {"data": {"createdAt": "2023-09-25T14:53:09.271Z", "id": "", "terminated": true, "updatedAt": "2023-04-09T08:35:46.658Z", "workflowID": ""}} default: - application/json: {"errorCode": "VALIDATION", "errorMessage": ""} + application/json: {"errorCode": "INTERNAL", "errorMessage": ""} v2SendEvent: "": parameters: @@ -2476,7 +2493,7 @@ examples: path: poolId: "XXX" requestBody: - application/json: {"accountID": ""} + application/json: {"accountID": ""} responses: default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} @@ -2488,40 +2505,41 @@ examples: requestBody: application/json: {"amount": 100, "asset": "USD", "destination": "acct_1Gqj58KZcSIg2N2q", "source": "acct_1Gqj58KZcSIg2N2q"} responses: + "200": + application/json: {} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} - "200": {} createAccount: speakeasy-default-create-account: requestBody: - application/json: {"connectorID": "", "createdAt": "2024-08-19T02:15:08.668Z", "reference": "", "type": "UNKNOWN"} + application/json: {"connectorID": "", "createdAt": "2025-08-19T02:15:08.152Z", "reference": "", "type": "INTERNAL"} responses: "200": - application/json: {"data": {"accountName": "", "connectorID": "", "createdAt": "2023-02-09T13:16:06.169Z", "defaultAsset": "", "defaultCurrency": "", "id": "", "metadata": {}, "reference": "", "type": "UNKNOWN"}} + application/json: {"data": {"accountName": "", "connectorID": "", "createdAt": "2023-04-28T00:06:23.447Z", "defaultAsset": "", "defaultCurrency": "", "id": "", "metadata": {"key": "", "key1": ""}, "raw": {}, "reference": "", "type": "INTERNAL"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} createBankAccount: speakeasy-default-create-bank-account: requestBody: - application/json: {"connectorID": "", "country": "GB", "name": "My account"} + application/json: {"connectorID": "", "country": "GB", "name": "My account"} responses: "200": - application/json: {"data": {"connectorID": "", "country": "Hungary", "createdAt": "2023-06-29T15:08:48.496Z", "id": "", "name": ""}} + application/json: {"data": {"connectorID": "", "country": "Holy See (Vatican City State)", "createdAt": "2024-08-31T23:24:27.067Z", "id": "", "name": ""}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} createPayment: speakeasy-default-create-payment: requestBody: - application/json: {"amount": 100, "asset": "USD", "connectorID": "", "createdAt": "2024-11-09T01:03:21.153Z", "reference": "", "scheme": "google pay", "status": "DISPUTE_WON", "type": "TRANSFER"} + application/json: {"amount": 100, "asset": "USD", "connectorID": "", "createdAt": "2025-11-09T01:03:21.011Z", "reference": "", "scheme": "molpay", "status": "REFUNDED_FAILURE", "type": "PAYOUT"} responses: "200": - application/json: {"data": {"adjustments": [], "amount": 100, "asset": "USD", "connectorID": "", "createdAt": "2023-09-15T18:36:55.466Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {"key": "", "key1": "", "key2": ""}, "reference": "", "scheme": "sepa debit", "sourceAccountID": "", "status": "EXPIRED", "type": "PAY-IN"}} + application/json: {"data": {"adjustments": [], "amount": 100, "asset": "USD", "connectorID": "", "createdAt": "2023-02-21T01:47:02.496Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {"key": "", "key1": "", "key2": ""}, "raw": {}, "reference": "", "scheme": "cup", "sourceAccountID": "", "status": "OTHER", "type": "PAY-IN"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} createPool: speakeasy-default-create-pool: requestBody: - application/json: {"accountIDs": [], "name": ""} + application/json: {"accountIDs": ["", "", ""], "name": ""} responses: "200": application/json: {"data": {"accounts": [], "id": "", "name": ""}} @@ -2530,10 +2548,10 @@ examples: createTransferInitiation: speakeasy-default-create-transfer-initiation: requestBody: - application/json: {"amount": 256698, "asset": "USD", "description": "Multi-tiered incremental methodology", "destinationAccountID": "", "reference": "XXX", "scheduledAt": "2023-05-04T22:47:54.364Z", "sourceAccountID": "", "type": "TRANSFER", "validated": false} + application/json: {"amount": 256698, "asset": "USD", "description": "worthy pace vague ick liberalize between um", "destinationAccountID": "", "reference": "XXX", "scheduledAt": "2025-05-02T09:50:03.622Z", "sourceAccountID": "", "type": "PAYOUT", "validated": true} responses: "200": - application/json: {"data": {"amount": 127100, "asset": "USD", "connectorID": "", "createdAt": "2024-05-21T00:04:36.032Z", "description": "Centralized multi-state flexibility", "destinationAccountID": "", "error": "", "id": "XXX", "initialAmount": 681211, "reference": "", "scheduledAt": "2022-07-14T06:36:33.091Z", "sourceAccountID": "", "status": "REVERSE_PROCESSING", "type": "TRANSFER"}} + application/json: {"data": {"amount": 422655, "asset": "USD", "connectorID": "", "createdAt": "2023-01-07T23:05:45.713Z", "description": "jut profane apud newsstand printer fondly", "destinationAccountID": "", "error": "", "id": "XXX", "initialAmount": 923751, "reference": "", "scheduledAt": "2023-01-12T11:17:22.320Z", "sourceAccountID": "", "status": "PROCESSED", "type": "PAYOUT"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} deletePool: @@ -2558,10 +2576,10 @@ examples: path: bankAccountId: "XXX" requestBody: - application/json: {"connectorID": ""} + application/json: {"connectorID": ""} responses: "200": - application/json: {"data": {"connectorID": "", "country": "Benin", "createdAt": "2022-08-16T05:17:29.653Z", "id": "", "name": ""}} + application/json: {"data": {"connectorID": "", "country": "Belize", "createdAt": "2023-01-21T13:08:56.229Z", "id": "", "name": ""}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} getAccountBalances: @@ -2575,7 +2593,7 @@ examples: sort: ["date:asc", "status:desc"] responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"accountId": "", "asset": "", "balance": 125462, "createdAt": "2024-01-30T03:48:20.670Z", "currency": "Argentine Peso", "lastUpdatedAt": "2025-07-01T14:03:15.166Z"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} getBankAccount: @@ -2585,7 +2603,7 @@ examples: bankAccountId: "XXX" responses: "200": - application/json: {"data": {"connectorID": "", "country": "Comoros", "createdAt": "2024-05-02T03:08:39.354Z", "id": "", "name": ""}} + application/json: {"data": {"connectorID": "", "country": "Colombia", "createdAt": "2023-03-04T16:16:17.382Z", "id": "", "name": ""}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} getConnectorTask: @@ -2596,7 +2614,7 @@ examples: taskId: "task1" responses: "200": - application/json: {"data": {"connectorID": "", "createdAt": "2022-09-14T18:08:36.551Z", "id": "b8d4a71b-a457-4542-9afd-b17eed3b13ec", "status": "EXPIRED", "updatedAt": "2022-08-01T16:40:57.832Z"}} + application/json: {"data": {"connectorID": "", "createdAt": "2025-02-08T17:39:38.418Z", "descriptor": {}, "id": "8d4a71ba-4575-442a-9fdb-17eed3b13ec7", "state": {}, "status": "CANCELLED", "updatedAt": "2025-04-25T00:27:47.982Z"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} getConnectorTaskV1: @@ -2608,7 +2626,7 @@ examples: taskId: "task1" responses: "200": - application/json: {"data": {"connectorID": "", "createdAt": "2023-05-15T09:04:44.604Z", "id": "2592c3a8-ba28-46c9-923f-e1c798f795cd", "status": "CANCELLED", "updatedAt": "2022-05-07T01:38:27.888Z"}} + application/json: {"data": {"connectorID": "", "createdAt": "2023-06-20T11:48:17.213Z", "descriptor": {}, "id": "592c3a8b-a286-4c92-93fe-1c798f795cd7", "state": {}, "status": "SUCCEEDED", "updatedAt": "2025-11-10T01:58:07.691Z"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} getPayment: @@ -2618,7 +2636,7 @@ examples: paymentId: "XXX" responses: "200": - application/json: {"data": {"adjustments": [], "amount": 100, "asset": "USD", "connectorID": "", "createdAt": "2022-12-09T17:14:16.345Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {}, "reference": "", "scheme": "rtp", "sourceAccountID": "", "status": "PENDING", "type": "PAYOUT"}} + application/json: {"data": {"adjustments": [{"amount": 100, "createdAt": "2025-11-19T01:14:15.129Z", "raw": {}, "reference": "", "status": "EXPIRED"}], "amount": 100, "asset": "USD", "connectorID": "", "createdAt": "2024-02-18T17:18:36.576Z", "destinationAccountID": "", "id": "XXX", "initialAmount": 100, "metadata": {"key": "", "key1": ""}, "raw": {}, "reference": "", "scheme": "unionpay", "sourceAccountID": "", "status": "DISPUTE", "type": "TRANSFER"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} getPool: @@ -2637,7 +2655,7 @@ examples: path: poolId: "XXX" query: - at: "2023-05-05T06:40:23.018Z" + at: "2024-05-04T06:40:23.119Z" responses: "200": application/json: {"data": {"balances": []}} @@ -2650,26 +2668,26 @@ examples: transferId: "XXX" responses: "200": - application/json: {"data": {"amount": 72812, "asset": "USD", "connectorID": "", "createdAt": "2023-10-02T21:37:27.303Z", "description": "Customizable optimal challenge", "destinationAccountID": "", "error": "", "id": "XXX", "initialAmount": 472047, "reference": "", "scheduledAt": "2024-07-15T21:17:19.722Z", "sourceAccountID": "", "status": "PROCESSING", "type": "PAYOUT"}} + application/json: {"data": {"amount": 72812, "asset": "USD", "connectorID": "", "createdAt": "2023-06-13T16:04:12.992Z", "description": "lack sick cheerfully minor", "destinationAccountID": "", "error": "", "id": "XXX", "initialAmount": 849995, "reference": "", "scheduledAt": "2025-01-24T01:47:16.422Z", "sourceAccountID": "", "status": "WAITING_FOR_VALIDATION", "type": "PAYOUT"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} installConnector: speakeasy-default-install-connector: parameters: path: - connector: "ADYEN" + connector: "ATLAR" requestBody: - application/json: {"apiKey": "XXX", "name": "My Stripe Account", "pageSize": 50, "pollingPeriod": "60s"} + application/json: {"apiKey": "XXX", "name": "My Wise Account", "pollingPeriod": "60s"} responses: "201": - application/json: {"data": {"connectorID": ""}} + application/json: {"data": {"connectorID": ""}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listAllConnectors: speakeasy-default-list-all-connectors: responses: "200": - application/json: {"data": []} + application/json: {"data": [{"connectorID": "", "name": "", "provider": "MONEYCORP"}, {"connectorID": "", "name": "", "provider": "CURRENCY-CLOUD"}]} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listBankAccounts: @@ -2681,14 +2699,14 @@ examples: sort: ["date:asc", "status:desc"] responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"connectorID": "", "country": "Bahrain", "createdAt": "2023-02-23T22:10:49.411Z", "id": "", "name": ""}, {"connectorID": "", "country": "Myanmar", "createdAt": "2023-12-30T23:44:22.122Z", "id": "", "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listConfigsAvailableConnectors: speakeasy-default-list-configs-available-connectors: responses: "200": - application/json: {"data": {"connector": {"key": {"dataType": "bit", "required": false}}}} + application/json: {"data": {"connector": {"key": {"dataType": "real", "required": false}}}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listConnectorTasks: @@ -2701,7 +2719,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"connectorID": "", "createdAt": "2024-03-30T15:06:52.730Z", "descriptor": {}, "id": "943abad6-1f7a-4a0d-b991-cf9266dd4814", "state": {}, "status": "REFUNDED_FAILURE", "updatedAt": "2024-10-15T18:08:06.313Z"}, {"connectorID": "", "createdAt": "2023-09-08T19:27:52.424Z", "descriptor": {}, "id": "f678351b-c600-4cf3-beff-e2c5cad006d4", "state": {}, "status": "DISPUTE_LOST", "updatedAt": "2024-02-03T08:52:20.456Z"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listConnectorTasksV1: @@ -2715,7 +2733,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"connectorID": "", "createdAt": "2024-08-30T08:25:15.703Z", "descriptor": {}, "id": "119bf1d7-7f0d-47a9-85f6-d1de55906fa5", "state": {}, "status": "EXPIRED", "updatedAt": "2023-03-08T11:32:23.574Z"}, {"connectorID": "", "createdAt": "2024-12-26T08:45:38.166Z", "descriptor": {}, "id": "636e772b-1d53-4e6e-b1a0-f8d94fbd4d08", "state": {}, "status": "CANCELLED", "updatedAt": "2025-04-25T04:53:52.895Z"}, {"connectorID": "", "createdAt": "2025-04-15T21:11:42.740Z", "descriptor": {}, "id": "3d5edc7f-3fcd-42b1-a430-91094b0590aa", "state": {}, "status": "REFUNDED", "updatedAt": "2023-02-23T06:58:36.788Z"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listPayments: @@ -2739,7 +2757,7 @@ examples: sort: ["date:asc", "status:desc"] responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"accounts": ["", ""], "id": "", "name": ""}, {"accounts": [""], "id": "", "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} listTransferInitiations: @@ -2751,7 +2769,7 @@ examples: sort: ["date:asc", "status:desc"] responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"amount": 27378, "asset": "USD", "connectorID": "", "createdAt": "2024-04-12T17:55:51.446Z", "description": "shovel aw scrutinise delicious a machine provided thongs eek pfft", "destinationAccountID": "", "error": "", "id": "XXX", "initialAmount": 955636, "reference": "", "scheduledAt": "2025-12-22T21:51:13.393Z", "sourceAccountID": "", "status": "ASK_REVERSED", "type": "TRANSFER"}, {"amount": 99452, "asset": "USD", "connectorID": "", "createdAt": "2024-05-14T08:21:14.101Z", "description": "vice programme downchange lucky", "destinationAccountID": "", "error": "", "id": "XXX", "initialAmount": 418039, "reference": "", "scheduledAt": "2024-05-12T21:20:56.584Z", "sourceAccountID": "", "status": "PROCESSED", "type": "TRANSFER"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} paymentsgetAccount: @@ -2761,7 +2779,7 @@ examples: accountId: "XXX" responses: "200": - application/json: {"data": {"accountName": "", "connectorID": "", "createdAt": "2023-11-13T03:25:46.461Z", "defaultAsset": "", "defaultCurrency": "", "id": "", "metadata": {"key": "", "key1": "", "key2": ""}, "reference": "", "type": "UNKNOWN"}} + application/json: {"data": {"accountName": "", "connectorID": "", "createdAt": "2024-11-12T03:25:46.461Z", "defaultAsset": "", "defaultCurrency": "", "id": "", "raw": {}, "reference": "", "type": "UNKNOWN"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} paymentsgetServerInfo: @@ -2790,7 +2808,7 @@ examples: connector: "GENERIC" responses: "200": - application/json: {"data": {"authorizationEndpoint": "XXX", "endpoint": "XXX", "name": "My Banking Circle Account", "password": "XXX", "pollingPeriod": "60s", "userCertificate": "XXX", "userCertificateKey": "XXX", "username": "XXX"}} + application/json: {"data": {"accessKey": "XXX", "baseUrl": "https://api.example.com", "name": "My Atlar Account", "pageSize": 50, "pollingPeriod": "60s", "secret": "XXX", "transferInitiationStatusPollingPeriod": "60s"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} readConnectorConfigV1: @@ -2801,7 +2819,7 @@ examples: connectorId: "XXX" responses: "200": - application/json: {"data": {"apiKey": "XXX", "name": "My Wise Account", "pageSize": 50, "pollingPeriod": "60s"}} + application/json: {"data": {"apiKey": "XXX", "apiSecret": "XXX", "endpoint": "XXX", "name": "My Modulr Account", "pollingPeriod": "120s"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} removeAccountFromPool: @@ -2844,7 +2862,7 @@ examples: path: transferId: "XXX" requestBody: - application/json: {"amount": 327549, "asset": "USD", "description": "Streamlined high-level local area network", "metadata": {"key": "", "key1": "", "key2": ""}, "reference": "XXX"} + application/json: {"amount": 327549, "asset": "USD", "description": "till gosh how proselytise worriedly whoa", "reference": "XXX"} responses: default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} @@ -2881,7 +2899,7 @@ examples: path: bankAccountId: "XXX" requestBody: - application/json: {"metadata": {}} + application/json: {} responses: default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} @@ -2889,10 +2907,10 @@ examples: "": parameters: path: - connector: "STRIPE" + connector: "ADYEN" connectorId: "XXX" requestBody: - application/json: {"apiKey": "XXX", "name": "My Stripe Account", "pageSize": 50, "pollingPeriod": "60s"} + application/json: {"apiKey": "XXX", "name": "My Stripe Account", "pageSize": 10, "pollingPeriod": "120s"} responses: default: application/json: {"errorCode": "VALIDATION", "errorMessage": "[VALIDATION] missing reference"} @@ -2912,7 +2930,7 @@ examples: application/json: {"ledgerName": "default", "ledgerQuery": {"key": ""}, "name": "XXX", "paymentsPoolID": "XXX"} responses: "201": - application/json: {"data": {"createdAt": "2021-01-01T00:00:00.000Z", "id": "XXX", "ledgerName": "default", "ledgerQuery": {"key": "", "key1": ""}, "name": "XXX", "paymentsPoolID": "XXX"}} + application/json: {"data": {"createdAt": "2021-01-01T00:00:00.000Z", "id": "XXX", "ledgerName": "default", "ledgerQuery": {"key": ""}, "name": "XXX", "paymentsPoolID": "XXX"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} deletePolicy: @@ -2940,7 +2958,7 @@ examples: reconciliationID: "XXX" responses: "200": - application/json: {"data": {"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 654743}, "id": "XXX", "ledgerBalances": {}, "paymentsBalances": {}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}} + application/json: {"data": {"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 20102}, "id": "XXX", "ledgerBalances": {"key": 644430}, "paymentsBalances": {"key": 515705, "key1": 559208, "key2": 533533}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} listPolicies: @@ -2951,7 +2969,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"createdAt": "2021-01-01T00:00:00.000Z", "id": "XXX", "ledgerName": "default", "ledgerQuery": {"key": "", "key1": "", "key2": ""}, "name": "XXX", "paymentsPoolID": "XXX"}, {"createdAt": "2021-01-01T00:00:00.000Z", "id": "XXX", "ledgerName": "default", "ledgerQuery": {"key": "", "key1": ""}, "name": "XXX", "paymentsPoolID": "XXX"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} listReconciliations: @@ -2962,7 +2980,7 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 241236}, "id": "XXX", "ledgerBalances": {"key": 129090}, "paymentsBalances": {}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}, {"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 348338, "key1": 435529}, "id": "XXX", "ledgerBalances": {"key": 522670, "key1": 92384}, "paymentsBalances": {"key": 973678}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}, {"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 428459, "key1": 727, "key2": 640782}, "id": "XXX", "ledgerBalances": {}, "paymentsBalances": {"key": 119837}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} reconcile: @@ -2974,7 +2992,7 @@ examples: application/json: {"reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z"} responses: "200": - application/json: {"data": {"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 908695}, "id": "XXX", "ledgerBalances": {"key": 444781, "key1": 968099, "key2": 56433}, "paymentsBalances": {}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}} + application/json: {"data": {"createdAt": "2021-01-01T00:00:00.000Z", "driftBalances": {"key": 971386}, "id": "XXX", "ledgerBalances": {"key": 1060, "key1": 30487, "key2": 427345}, "paymentsBalances": {"key": 17991, "key1": 837229}, "policyID": "XXX", "reconciledAtLedger": "2021-01-01T00:00:00.000Z", "reconciledAtPayments": "2021-01-01T00:00:00.000Z", "status": "COMPLETED"}} default: application/json: {"errorCode": "VALIDATION", "errorMessage": ""} reconciliationgetServerInfo: @@ -3000,7 +3018,7 @@ examples: speakeasy-default-confirm-hold: parameters: path: - hold_id: "" + hold_id: "" header: {} requestBody: application/json: {"amount": 100, "final": true} @@ -3022,7 +3040,7 @@ examples: speakeasy-default-create-wallet: responses: "201": - application/json: {"data": {"createdAt": "2023-08-08T07:13:48.721Z", "id": "52c86df5-feb2-4ab8-acb7-593029eaab9b", "ledger": "", "metadata": {"key": "", "key1": "", "key2": ""}, "name": ""}} + application/json: {"data": {"createdAt": "2024-08-07T07:13:48.961Z", "id": "28d5e2b6-b532-4ea9-ac35-db845f4bcf19", "ledger": "", "metadata": {"key": ""}, "name": ""}} default: application/json: {"errorCode": "HOLD_CLOSED", "errorMessage": ""} creditWallet: @@ -3046,9 +3064,9 @@ examples: application/json: {"amount": {"amount": 100, "asset": "USD/2"}, "metadata": {"key": ""}, "pending": true} responses: "201": - application/json: {"data": {"description": "Ergonomic context-sensitive productivity", "id": "e3fe0331-4c99-4e79-ae47-a2f3f501e73d", "metadata": {}, "walletID": ""}} + application/json: {"data": {"description": "supposing any instead underachieve", "id": "cb202f54-4467-4509-9820-d52190eb2ad6", "metadata": {}, "walletID": ""}} default: - application/json: {"errorCode": "HOLD_CLOSED", "errorMessage": ""} + application/json: {"errorCode": "INTERNAL_ERROR", "errorMessage": ""} getBalance: speakeasy-default-get-balance: parameters: @@ -3057,19 +3075,19 @@ examples: balanceName: "" responses: "200": - application/json: {"data": {"assets": {"key": 191836, "key1": 623534, "key2": 435350}, "name": ""}} + application/json: {"data": {"assets": {"key": 623534, "key1": 686479, "key2": 925894}, "name": ""}} default: application/json: {"errorCode": "INSUFFICIENT_FUND", "errorMessage": ""} getHold: speakeasy-default-get-hold: parameters: path: - holdID: "" + holdID: "" responses: "200": - application/json: {"data": {"description": "Configurable zero tolerance superstructure", "id": "6e42f973-1a23-4fc7-bfce-5629a86b5072", "metadata": {"key": ""}, "originalAmount": 100, "remaining": 10, "walletID": ""}} + application/json: {"data": {"description": "fooey lest vivaciously", "id": "cd413999-17b3-47c4-95d9-940e9d32963a", "metadata": {"key": "", "key1": ""}, "originalAmount": 100, "remaining": 10, "walletID": ""}} default: - application/json: {"errorCode": "HOLD_CLOSED", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} getHolds: "": parameters: @@ -3080,9 +3098,9 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"description": "anti all mmm thorough badly what once self-assured bitterly", "id": "71f718aa-973f-455f-8164-685872daf907", "metadata": {}, "walletID": ""}, {"description": "veg before reservation an", "id": "53a74377-2ea1-48a5-98b0-670a65f47f18", "metadata": {"key": "", "key1": "", "key2": ""}, "walletID": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: - application/json: {"errorCode": "INSUFFICIENT_FUND", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} getTransactions: "": parameters: @@ -3092,9 +3110,9 @@ examples: cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"id": 417503, "metadata": {"key": "", "key1": "", "key2": ""}, "postCommitVolumes": {"key": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}, "postings": [], "preCommitVolumes": {"key": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}, "key1": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}, "reference": "ref:001", "timestamp": "2025-04-16T13:08:57.024Z"}, {"id": 751740, "metadata": {"key": "", "key1": ""}, "postCommitVolumes": {"key": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}, "postings": [{"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}, {"amount": 100, "asset": "COIN", "destination": "users:002", "source": "users:001"}], "preCommitVolumes": {"key": {"USD": {"balance": 90, "input": 100, "output": 10}, "EUR": {"balance": 90, "input": 100, "output": 10}}}, "reference": "ref:001", "timestamp": "2023-04-29T22:11:40.809Z"}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: - application/json: {"errorCode": "INSUFFICIENT_FUND", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} getWallet: speakeasy-default-get-wallet: parameters: @@ -3102,9 +3120,9 @@ examples: id: "" responses: "200": - application/json: {"data": {"balances": {"main": {"assets": {"key": 712763}}}, "createdAt": "2023-09-19T18:18:29.327Z", "id": "c94bdefc-9346-480f-8a91-9139cfb68640", "ledger": "", "metadata": {"key": "", "key1": "", "key2": ""}, "name": ""}} + application/json: {"data": {"balances": {"main": {"assets": {"key": 571864}}}, "createdAt": "2024-11-13T05:25:13.185Z", "id": "bec36009-93cb-484f-9620-8873422591bc", "ledger": "", "metadata": {"key": ""}, "name": ""}} default: - application/json: {"errorCode": "HOLD_CLOSED", "errorMessage": ""} + application/json: {"errorCode": "INSUFFICIENT_FUND", "errorMessage": ""} getWalletSummary: speakeasy-default-get-wallet-summary: parameters: @@ -3112,7 +3130,7 @@ examples: id: "" responses: "200": - application/json: {"availableFunds": {"key": 615155, "key1": 265270}, "balances": [], "expirableFunds": {"key": 425645, "key1": 574283, "key2": 311650}, "expiredFunds": {"key": 2769, "key1": 737742, "key2": 53674}, "holdFunds": {"key": 830082}} + application/json: {"availableFunds": {"key": 265270, "key1": 425645}, "balances": [{"assets": {}, "name": ""}], "expirableFunds": {}, "expiredFunds": {"key": 937378, "key1": 696335, "key2": 846984}, "holdFunds": {"key": 930990, "key1": 132783, "key2": 515347}} default: application/json: {"errorCode": "INSUFFICIENT_FUND", "errorMessage": ""} listBalances: @@ -3122,7 +3140,7 @@ examples: id: "" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"name": ""}, {"name": ""}, {"name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} listWallets: "": parameters: @@ -3134,9 +3152,9 @@ examples: expand: "balances" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} + application/json: {"cursor": {"data": [{"createdAt": "2023-02-28T12:24:12.671Z", "id": "acf390dc-7f51-40b9-8bec-968d375f0c57", "ledger": "", "metadata": {"key": "", "key1": ""}, "name": ""}], "hasMore": false, "next": "", "pageSize": 15, "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="}} default: - application/json: {"errorCode": "INTERNAL_ERROR", "errorMessage": ""} + application/json: {"errorCode": "VALIDATION", "errorMessage": ""} updateWallet: speakeasy-default-update-wallet: parameters: @@ -3150,7 +3168,7 @@ examples: speakeasy-default-void-hold: parameters: path: - hold_id: "" + hold_id: "" header: {} responses: default: @@ -3169,7 +3187,7 @@ examples: id: "4997257d-dfb6-445b-929c-cbe2ab182818" responses: "200": - application/json: {"data": {"active": true, "createdAt": "2024-04-13T00:54:15.008Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "86a164ca-5578-4c31-8bbe-d7a3036b8904", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2022-05-05T09:06:40.232Z"}} + application/json: {"data": {"active": true, "createdAt": "2025-04-13T00:54:15.165Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "614a5830-bda0-4680-b1ea-6090dd8532c6", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2023-07-24T14:37:40.680Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} changeConfigSecret: @@ -3181,7 +3199,7 @@ examples: application/json: {"secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"} responses: "200": - application/json: {"data": {"active": true, "createdAt": "2022-12-07T06:10:52.900Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "d8a42700-0fa2-4c26-8b7f-a17a0cecf878", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2024-02-17T09:48:07.043Z"}} + application/json: {"data": {"active": true, "createdAt": "2023-12-07T06:10:53.379Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "8470f220-7a70-4ef7-9be4-3432827b4f03", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2023-11-27T20:14:58.331Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} deactivateConfig: @@ -3191,7 +3209,7 @@ examples: id: "4997257d-dfb6-445b-929c-cbe2ab182818" responses: "200": - application/json: {"data": {"active": true, "createdAt": "2022-11-29T11:20:56.914Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "d845cef5-5b72-475c-b106-2229b7b1da74", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2024-05-02T19:19:44.391Z"}} + application/json: {"data": {"active": true, "createdAt": "2023-11-29T11:20:57.032Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "85e5b25b-022b-4bd7-8c33-fbf5950d0f8f", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2024-05-26T16:43:50.510Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} deleteConfig: @@ -3210,7 +3228,7 @@ examples: endpoint: "https://example.com" responses: "200": - application/json: {"cursor": {"data": [], "hasMore": false}} + application/json: {"cursor": {"data": [{"active": true, "createdAt": "2023-10-03T21:24:00.401Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "f1f67d72-d5d3-4e22-8f79-851fcbdc0d83", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2023-02-14T18:49:51.264Z"}], "hasMore": false}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} insertConfig: @@ -3219,7 +3237,7 @@ examples: application/json: {"endpoint": "https://example.com", "eventTypes": ["TYPE1"], "name": "customer_payment", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"} responses: "200": - application/json: {"data": {"active": true, "createdAt": "2024-08-30T14:01:19.794Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "a05fe7f5-f67b-4b07-9b5b-ba3484665cb1", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2023-09-02T22:23:51.459Z"}} + application/json: {"data": {"active": true, "createdAt": "2025-08-30T14:01:19.887Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "0f756b09-5b38-465b-b8f2-983f240d4f5c", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2024-08-09T10:29:51.537Z"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} testConfig: @@ -3229,24 +3247,8 @@ examples: id: "4997257d-dfb6-445b-929c-cbe2ab182818" responses: "200": - application/json: {"data": {"config": {"active": true, "createdAt": "2023-05-30T09:53:59.199Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "2846f0d5-34bb-4964-967d-fe71e6ffb881", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2024-12-01T05:22:46.116Z"}, "createdAt": "2024-09-28T21:02:11.496Z", "id": "21fdbd6d-a78d-45b5-9c0e-4a204cb7c2a1", "payload": "{\"data\":\"test\"}", "retryAttempt": 1, "status": "success", "statusCode": 200, "updatedAt": "2024-07-05T23:45:46.439Z", "webhookID": "dec67687-2f74-4eed-b324-86395f8c9408"}} - default: - application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} - getServerInfo: - speakeasy-default-get-server-info: - responses: - "200": - application/json: {"version": ""} - v2ExportLogs: - speakeasy-default-v2-export-logs: - parameters: - path: - ledger: "ledger001" - v2ImportLogs: - speakeasy-default-v2-import-logs: - parameters: - path: - ledger: "ledger001" - responses: + application/json: {"data": {"config": {"active": true, "createdAt": "2024-05-29T09:53:58.891Z", "endpoint": "https://example.com", "eventTypes": ["TYPE1"], "id": "86054b6d-7f7e-4fb8-8f2f-b6a855cea0c7", "secret": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", "updatedAt": "2023-04-25T07:02:46.380Z"}, "createdAt": "2025-06-16T21:37:32.643Z", "id": "c7827ed3-469f-4c48-a7d1-c853b7f1271e", "payload": "{\"data\":\"test\"}", "retryAttempt": 1, "status": "success", "statusCode": 200, "updatedAt": "2024-10-18T10:47:20.940Z", "webhookID": "05f47970-be91-4384-9266-38e01d5768d6"}} default: application/json: {"details": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9", "errorCode": "VALIDATION", "errorMessage": "[VALIDATION] invalid 'cursor' query param"} +examplesVersion: 1.0.0 +generatedTests: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1a205591..489db2e0 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,20 +1,21 @@ -speakeasyVersion: 1.441.1 +speakeasyVersion: 1.476.2 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:25a113054c1e72e39f72b3f651ae9571df6083225130cdf314c099507d9a6d39 - sourceBlobDigest: sha256:3e23c263761e5f072ed5b6c1218d39286188d47c0eca9823a5ecb64be3a02d57 + sourceRevisionDigest: sha256:45a8cb482f02a686c10a11f622c9edc59ad624e23bffe66c1c96053f2891e8e1 + sourceBlobDigest: sha256:089e883311be156b043a5f5f9dbecbd667b328bcf60fdf15945ade2fe43e1233 tags: - latest - - speakeasy-sdk-regen-1732202930 + - speakeasy-sdk-regen-1737418949 + - v2.1.2 targets: formance-sdk-typescript: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:25a113054c1e72e39f72b3f651ae9571df6083225130cdf314c099507d9a6d39 - sourceBlobDigest: sha256:3e23c263761e5f072ed5b6c1218d39286188d47c0eca9823a5ecb64be3a02d57 - codeSamplesNamespace: my-source-code-samples - codeSamplesRevisionDigest: sha256:742392eb0d92e98b50315d6fddf26dfb71a3add09553a08412d18982efc85d10 + sourceRevisionDigest: sha256:45a8cb482f02a686c10a11f622c9edc59ad624e23bffe66c1c96053f2891e8e1 + sourceBlobDigest: sha256:089e883311be156b043a5f5f9dbecbd667b328bcf60fdf15945ade2fe43e1233 + codeSamplesNamespace: my-source-typescript-code-samples + codeSamplesRevisionDigest: sha256:6e9eea6cea19f18dc6f34f23c7b647cf3d4592c79721cc464a89f8ecd0a6e459 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -35,5 +36,5 @@ workflow: token: $NPM_TOKEN codeSamples: registry: - location: registry.speakeasyapi.dev/formance/formance/my-source-code-samples + location: registry.speakeasyapi.dev/formance/formance/my-source-typescript-code-samples blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 460c2059..d73cfd0b 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -17,5 +17,5 @@ targets: token: $NPM_TOKEN codeSamples: registry: - location: registry.speakeasyapi.dev/formance/formance/my-source-code-samples + location: registry.speakeasyapi.dev/formance/formance/my-source-typescript-code-samples blocking: false diff --git a/FUNCTIONS.md b/FUNCTIONS.md index 9857255c..a0844290 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -20,7 +20,7 @@ specific category of applications. ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { getVersions } from "@formance/formance-sdk/funcs/getVersions.js"; +import { getOIDCWellKnowns } from "@formance/formance-sdk/funcs/getOIDCWellKnowns.js"; import { SDKValidationError } from "@formance/formance-sdk/sdk/models/errors/sdkvalidationerror.js"; // Use `SDKCore` for best tree-shaking performance. @@ -33,7 +33,7 @@ const sdk = new SDKCore({ }); async function run() { - const res = await getVersions(sdk); + const res = await getOIDCWellKnowns(sdk); switch (true) { case res.ok: diff --git a/README.md b/README.md index f08b3862..0838314c 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,26 @@ and standard method from web, mobile and desktop applications. ## Table of Contents - -* [SDK Installation](#sdk-installation) -* [Requirements](#requirements) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [Standalone functions](#standalone-functions) -* [Retries](#retries) -* [Error Handling](#error-handling) -* [Server Selection](#server-selection) -* [Custom HTTP Client](#custom-http-client) + +* [@formance/formance-sdk](#formanceformance-sdk) + * [🏗 **Welcome to your new SDK!** 🏗](#welcome-to-your-new-sdk) +* [Introduction](#introduction) * [Authentication](#authentication) -* [Debugging](#debugging) + * [SDK Installation](#sdk-installation) + * [Requirements](#requirements) + * [SDK Example Usage](#sdk-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Authentication](#authentication-1) + * [Standalone functions](#standalone-functions) + * [Retries](#retries) + * [Debugging](#debugging) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) + @@ -103,7 +111,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions(); + const result = await sdk.getOIDCWellKnowns(); // Handle the result console.log(result); @@ -122,46 +130,42 @@ run(); ### [auth](docs/sdks/auth/README.md) - -#### [auth.v1](docs/sdks/v1/README.md) - -* [createClient](docs/sdks/v1/README.md#createclient) - Create client -* [createSecret](docs/sdks/v1/README.md#createsecret) - Add a secret to a client -* [deleteClient](docs/sdks/v1/README.md#deleteclient) - Delete client -* [deleteSecret](docs/sdks/v1/README.md#deletesecret) - Delete a secret from a client -* [getOIDCWellKnowns](docs/sdks/v1/README.md#getoidcwellknowns) - Retrieve OpenID connect well-knowns. -* [getServerInfo](docs/sdks/v1/README.md#getserverinfo) - Get server info -* [listClients](docs/sdks/v1/README.md#listclients) - List clients -* [listUsers](docs/sdks/v1/README.md#listusers) - List users -* [readClient](docs/sdks/v1/README.md#readclient) - Read client -* [readUser](docs/sdks/v1/README.md#readuser) - Read user -* [updateClient](docs/sdks/v1/README.md#updateclient) - Update client +* [getServerInfo](docs/sdks/auth/README.md#getserverinfo) - Get server info +* [createClient](docs/sdks/auth/README.md#createclient) - Create client +* [createSecret](docs/sdks/auth/README.md#createsecret) - Add a secret to a client +* [deleteClient](docs/sdks/auth/README.md#deleteclient) - Delete client +* [deleteSecret](docs/sdks/auth/README.md#deletesecret) - Delete a secret from a client +* [listClients](docs/sdks/auth/README.md#listclients) - List clients +* [listUsers](docs/sdks/auth/README.md#listusers) - List users +* [readClient](docs/sdks/auth/README.md#readclient) - Read client +* [readUser](docs/sdks/auth/README.md#readuser) - Read user +* [updateClient](docs/sdks/auth/README.md#updateclient) - Update client ### [ledger](docs/sdks/ledger/README.md) -#### [ledger.v1](docs/sdks/sdkv1/README.md) - -* [createTransactions](docs/sdks/sdkv1/README.md#createtransactions) - Create a new batch of transactions to a ledger -* [addMetadataOnTransaction](docs/sdks/sdkv1/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID -* [addMetadataToAccount](docs/sdks/sdkv1/README.md#addmetadatatoaccount) - Add metadata to an account -* [countAccounts](docs/sdks/sdkv1/README.md#countaccounts) - Count the accounts from a ledger -* [countTransactions](docs/sdks/sdkv1/README.md#counttransactions) - Count the transactions from a ledger -* [createTransaction](docs/sdks/sdkv1/README.md#createtransaction) - Create a new transaction to a ledger -* [getAccount](docs/sdks/sdkv1/README.md#getaccount) - Get account by its address -* [getBalances](docs/sdks/sdkv1/README.md#getbalances) - Get the balances from a ledger's account -* [getBalancesAggregated](docs/sdks/sdkv1/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts -* [getInfo](docs/sdks/sdkv1/README.md#getinfo) - Show server information -* [getLedgerInfo](docs/sdks/sdkv1/README.md#getledgerinfo) - Get information about a ledger -* [getMapping](docs/sdks/sdkv1/README.md#getmapping) - Get the mapping of a ledger -* [getTransaction](docs/sdks/sdkv1/README.md#gettransaction) - Get transaction from a ledger by its ID -* [listAccounts](docs/sdks/sdkv1/README.md#listaccounts) - List accounts from a ledger -* [listLogs](docs/sdks/sdkv1/README.md#listlogs) - List the logs from a ledger -* [listTransactions](docs/sdks/sdkv1/README.md#listtransactions) - List transactions from a ledger -* [readStats](docs/sdks/sdkv1/README.md#readstats) - Get statistics from a ledger -* [revertTransaction](docs/sdks/sdkv1/README.md#reverttransaction) - Revert a ledger transaction by its ID -* [~~runScript~~](docs/sdks/sdkv1/README.md#runscript) - Execute a Numscript :warning: **Deprecated** -* [updateMapping](docs/sdks/sdkv1/README.md#updatemapping) - Update the mapping of a ledger +#### [ledger.v1](docs/sdks/v1/README.md) + +* [createTransactions](docs/sdks/v1/README.md#createtransactions) - Create a new batch of transactions to a ledger +* [addMetadataOnTransaction](docs/sdks/v1/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID +* [addMetadataToAccount](docs/sdks/v1/README.md#addmetadatatoaccount) - Add metadata to an account +* [countAccounts](docs/sdks/v1/README.md#countaccounts) - Count the accounts from a ledger +* [countTransactions](docs/sdks/v1/README.md#counttransactions) - Count the transactions from a ledger +* [createTransaction](docs/sdks/v1/README.md#createtransaction) - Create a new transaction to a ledger +* [getAccount](docs/sdks/v1/README.md#getaccount) - Get account by its address +* [getBalances](docs/sdks/v1/README.md#getbalances) - Get the balances from a ledger's account +* [getBalancesAggregated](docs/sdks/v1/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts +* [getInfo](docs/sdks/v1/README.md#getinfo) - Show server information +* [getLedgerInfo](docs/sdks/v1/README.md#getledgerinfo) - Get information about a ledger +* [getMapping](docs/sdks/v1/README.md#getmapping) - Get the mapping of a ledger +* [getTransaction](docs/sdks/v1/README.md#gettransaction) - Get transaction from a ledger by its ID +* [listAccounts](docs/sdks/v1/README.md#listaccounts) - List accounts from a ledger +* [listLogs](docs/sdks/v1/README.md#listlogs) - List the logs from a ledger +* [listTransactions](docs/sdks/v1/README.md#listtransactions) - List transactions from a ledger +* [readStats](docs/sdks/v1/README.md#readstats) - Get statistics from a ledger +* [revertTransaction](docs/sdks/v1/README.md#reverttransaction) - Revert a ledger transaction by its ID +* [~~runScript~~](docs/sdks/v1/README.md#runscript) - Execute a Numscript :warning: **Deprecated** +* [updateMapping](docs/sdks/v1/README.md#updatemapping) - Update the mapping of a ledger #### [ledger.v2](docs/sdks/v2/README.md) @@ -194,157 +198,140 @@ run(); ### [orchestration](docs/sdks/orchestration/README.md) - -#### [orchestration.v1](docs/sdks/sdkorchestrationv1/README.md) - -* [cancelEvent](docs/sdks/sdkorchestrationv1/README.md#cancelevent) - Cancel a running workflow -* [createTrigger](docs/sdks/sdkorchestrationv1/README.md#createtrigger) - Create trigger -* [createWorkflow](docs/sdks/sdkorchestrationv1/README.md#createworkflow) - Create workflow -* [deleteTrigger](docs/sdks/sdkorchestrationv1/README.md#deletetrigger) - Delete trigger -* [deleteWorkflow](docs/sdks/sdkorchestrationv1/README.md#deleteworkflow) - Delete a flow by id -* [getInstance](docs/sdks/sdkorchestrationv1/README.md#getinstance) - Get a workflow instance by id -* [getInstanceHistory](docs/sdks/sdkorchestrationv1/README.md#getinstancehistory) - Get a workflow instance history by id -* [getInstanceStageHistory](docs/sdks/sdkorchestrationv1/README.md#getinstancestagehistory) - Get a workflow instance stage history -* [getWorkflow](docs/sdks/sdkorchestrationv1/README.md#getworkflow) - Get a flow by id -* [listInstances](docs/sdks/sdkorchestrationv1/README.md#listinstances) - List instances of a workflow -* [listTriggers](docs/sdks/sdkorchestrationv1/README.md#listtriggers) - List triggers -* [listTriggersOccurrences](docs/sdks/sdkorchestrationv1/README.md#listtriggersoccurrences) - List triggers occurrences -* [listWorkflows](docs/sdks/sdkorchestrationv1/README.md#listworkflows) - List registered workflows -* [orchestrationgetServerInfo](docs/sdks/sdkorchestrationv1/README.md#orchestrationgetserverinfo) - Get server info -* [readTrigger](docs/sdks/sdkorchestrationv1/README.md#readtrigger) - Read trigger -* [runWorkflow](docs/sdks/sdkorchestrationv1/README.md#runworkflow) - Run workflow -* [sendEvent](docs/sdks/sdkorchestrationv1/README.md#sendevent) - Send an event to a running workflow - -#### [orchestration.v2](docs/sdks/sdkv2/README.md) - -* [cancelEvent](docs/sdks/sdkv2/README.md#cancelevent) - Cancel a running workflow -* [createTrigger](docs/sdks/sdkv2/README.md#createtrigger) - Create trigger -* [createWorkflow](docs/sdks/sdkv2/README.md#createworkflow) - Create workflow -* [deleteTrigger](docs/sdks/sdkv2/README.md#deletetrigger) - Delete trigger -* [deleteWorkflow](docs/sdks/sdkv2/README.md#deleteworkflow) - Delete a flow by id -* [getInstance](docs/sdks/sdkv2/README.md#getinstance) - Get a workflow instance by id -* [getInstanceHistory](docs/sdks/sdkv2/README.md#getinstancehistory) - Get a workflow instance history by id -* [getInstanceStageHistory](docs/sdks/sdkv2/README.md#getinstancestagehistory) - Get a workflow instance stage history -* [getServerInfo](docs/sdks/sdkv2/README.md#getserverinfo) - Get server info -* [getWorkflow](docs/sdks/sdkv2/README.md#getworkflow) - Get a flow by id -* [listInstances](docs/sdks/sdkv2/README.md#listinstances) - List instances of a workflow -* [listTriggers](docs/sdks/sdkv2/README.md#listtriggers) - List triggers -* [listTriggersOccurrences](docs/sdks/sdkv2/README.md#listtriggersoccurrences) - List triggers occurrences -* [listWorkflows](docs/sdks/sdkv2/README.md#listworkflows) - List registered workflows -* [readTrigger](docs/sdks/sdkv2/README.md#readtrigger) - Read trigger -* [runWorkflow](docs/sdks/sdkv2/README.md#runworkflow) - Run workflow -* [sendEvent](docs/sdks/sdkv2/README.md#sendevent) - Send an event to a running workflow -* [testTrigger](docs/sdks/sdkv2/README.md#testtrigger) - Test trigger +* [cancelEvent](docs/sdks/orchestration/README.md#cancelevent) - Cancel a running workflow +* [createTrigger](docs/sdks/orchestration/README.md#createtrigger) - Create trigger +* [createWorkflow](docs/sdks/orchestration/README.md#createworkflow) - Create workflow +* [deleteTrigger](docs/sdks/orchestration/README.md#deletetrigger) - Delete trigger +* [deleteWorkflow](docs/sdks/orchestration/README.md#deleteworkflow) - Delete a flow by id +* [getInstance](docs/sdks/orchestration/README.md#getinstance) - Get a workflow instance by id +* [getInstanceHistory](docs/sdks/orchestration/README.md#getinstancehistory) - Get a workflow instance history by id +* [getInstanceStageHistory](docs/sdks/orchestration/README.md#getinstancestagehistory) - Get a workflow instance stage history +* [getWorkflow](docs/sdks/orchestration/README.md#getworkflow) - Get a flow by id +* [listInstances](docs/sdks/orchestration/README.md#listinstances) - List instances of a workflow +* [listTriggers](docs/sdks/orchestration/README.md#listtriggers) - List triggers +* [listTriggersOccurrences](docs/sdks/orchestration/README.md#listtriggersoccurrences) - List triggers occurrences +* [listWorkflows](docs/sdks/orchestration/README.md#listworkflows) - List registered workflows +* [orchestrationgetServerInfo](docs/sdks/orchestration/README.md#orchestrationgetserverinfo) - Get server info +* [readTrigger](docs/sdks/orchestration/README.md#readtrigger) - Read trigger +* [runWorkflow](docs/sdks/orchestration/README.md#runworkflow) - Run workflow +* [sendEvent](docs/sdks/orchestration/README.md#sendevent) - Send an event to a running workflow +* [testTrigger](docs/sdks/orchestration/README.md#testtrigger) - Test trigger +* [v2CancelEvent](docs/sdks/orchestration/README.md#v2cancelevent) - Cancel a running workflow +* [v2CreateTrigger](docs/sdks/orchestration/README.md#v2createtrigger) - Create trigger +* [v2CreateWorkflow](docs/sdks/orchestration/README.md#v2createworkflow) - Create workflow +* [v2DeleteTrigger](docs/sdks/orchestration/README.md#v2deletetrigger) - Delete trigger +* [v2DeleteWorkflow](docs/sdks/orchestration/README.md#v2deleteworkflow) - Delete a flow by id +* [v2GetInstance](docs/sdks/orchestration/README.md#v2getinstance) - Get a workflow instance by id +* [v2GetInstanceHistory](docs/sdks/orchestration/README.md#v2getinstancehistory) - Get a workflow instance history by id +* [v2GetInstanceStageHistory](docs/sdks/orchestration/README.md#v2getinstancestagehistory) - Get a workflow instance stage history +* [v2GetServerInfo](docs/sdks/orchestration/README.md#v2getserverinfo) - Get server info +* [v2GetWorkflow](docs/sdks/orchestration/README.md#v2getworkflow) - Get a flow by id +* [v2ListInstances](docs/sdks/orchestration/README.md#v2listinstances) - List instances of a workflow +* [v2ListTriggers](docs/sdks/orchestration/README.md#v2listtriggers) - List triggers +* [v2ListTriggersOccurrences](docs/sdks/orchestration/README.md#v2listtriggersoccurrences) - List triggers occurrences +* [v2ListWorkflows](docs/sdks/orchestration/README.md#v2listworkflows) - List registered workflows +* [v2ReadTrigger](docs/sdks/orchestration/README.md#v2readtrigger) - Read trigger +* [v2RunWorkflow](docs/sdks/orchestration/README.md#v2runworkflow) - Run workflow +* [v2SendEvent](docs/sdks/orchestration/README.md#v2sendevent) - Send an event to a running workflow ### [payments](docs/sdks/payments/README.md) - -#### [payments.v1](docs/sdks/sdkpaymentsv1/README.md) - -* [addAccountToPool](docs/sdks/sdkpaymentsv1/README.md#addaccounttopool) - Add an account to a pool -* [connectorsTransfer](docs/sdks/sdkpaymentsv1/README.md#connectorstransfer) - Transfer funds between Connector accounts -* [createAccount](docs/sdks/sdkpaymentsv1/README.md#createaccount) - Create an account -* [createBankAccount](docs/sdks/sdkpaymentsv1/README.md#createbankaccount) - Create a BankAccount in Payments and on the PSP -* [createPayment](docs/sdks/sdkpaymentsv1/README.md#createpayment) - Create a payment -* [createPool](docs/sdks/sdkpaymentsv1/README.md#createpool) - Create a Pool -* [createTransferInitiation](docs/sdks/sdkpaymentsv1/README.md#createtransferinitiation) - Create a TransferInitiation -* [deletePool](docs/sdks/sdkpaymentsv1/README.md#deletepool) - Delete a Pool -* [deleteTransferInitiation](docs/sdks/sdkpaymentsv1/README.md#deletetransferinitiation) - Delete a transfer initiation -* [forwardBankAccount](docs/sdks/sdkpaymentsv1/README.md#forwardbankaccount) - Forward a bank account to a connector -* [getAccountBalances](docs/sdks/sdkpaymentsv1/README.md#getaccountbalances) - Get account balances -* [getBankAccount](docs/sdks/sdkpaymentsv1/README.md#getbankaccount) - Get a bank account created by user on Formance -* [~~getConnectorTask~~](docs/sdks/sdkpaymentsv1/README.md#getconnectortask) - Read a specific task of the connector :warning: **Deprecated** -* [getConnectorTaskV1](docs/sdks/sdkpaymentsv1/README.md#getconnectortaskv1) - Read a specific task of the connector -* [getPayment](docs/sdks/sdkpaymentsv1/README.md#getpayment) - Get a payment -* [getPool](docs/sdks/sdkpaymentsv1/README.md#getpool) - Get a Pool -* [getPoolBalances](docs/sdks/sdkpaymentsv1/README.md#getpoolbalances) - Get pool balances -* [getTransferInitiation](docs/sdks/sdkpaymentsv1/README.md#gettransferinitiation) - Get a transfer initiation -* [installConnector](docs/sdks/sdkpaymentsv1/README.md#installconnector) - Install a connector -* [listAllConnectors](docs/sdks/sdkpaymentsv1/README.md#listallconnectors) - List all installed connectors -* [listBankAccounts](docs/sdks/sdkpaymentsv1/README.md#listbankaccounts) - List bank accounts created by user on Formance -* [listConfigsAvailableConnectors](docs/sdks/sdkpaymentsv1/README.md#listconfigsavailableconnectors) - List the configs of each available connector -* [~~listConnectorTasks~~](docs/sdks/sdkpaymentsv1/README.md#listconnectortasks) - List tasks from a connector :warning: **Deprecated** -* [listConnectorTasksV1](docs/sdks/sdkpaymentsv1/README.md#listconnectortasksv1) - List tasks from a connector -* [listPayments](docs/sdks/sdkpaymentsv1/README.md#listpayments) - List payments -* [listPools](docs/sdks/sdkpaymentsv1/README.md#listpools) - List Pools -* [listTransferInitiations](docs/sdks/sdkpaymentsv1/README.md#listtransferinitiations) - List Transfer Initiations -* [paymentsgetAccount](docs/sdks/sdkpaymentsv1/README.md#paymentsgetaccount) - Get an account -* [paymentsgetServerInfo](docs/sdks/sdkpaymentsv1/README.md#paymentsgetserverinfo) - Get server info -* [paymentslistAccounts](docs/sdks/sdkpaymentsv1/README.md#paymentslistaccounts) - List accounts -* [~~readConnectorConfig~~](docs/sdks/sdkpaymentsv1/README.md#readconnectorconfig) - Read the config of a connector :warning: **Deprecated** -* [readConnectorConfigV1](docs/sdks/sdkpaymentsv1/README.md#readconnectorconfigv1) - Read the config of a connector -* [removeAccountFromPool](docs/sdks/sdkpaymentsv1/README.md#removeaccountfrompool) - Remove an account from a pool -* [~~resetConnector~~](docs/sdks/sdkpaymentsv1/README.md#resetconnector) - Reset a connector :warning: **Deprecated** -* [resetConnectorV1](docs/sdks/sdkpaymentsv1/README.md#resetconnectorv1) - Reset a connector -* [retryTransferInitiation](docs/sdks/sdkpaymentsv1/README.md#retrytransferinitiation) - Retry a failed transfer initiation -* [reverseTransferInitiation](docs/sdks/sdkpaymentsv1/README.md#reversetransferinitiation) - Reverse a transfer initiation -* [udpateTransferInitiationStatus](docs/sdks/sdkpaymentsv1/README.md#udpatetransferinitiationstatus) - Update the status of a transfer initiation -* [~~uninstallConnector~~](docs/sdks/sdkpaymentsv1/README.md#uninstallconnector) - Uninstall a connector :warning: **Deprecated** -* [uninstallConnectorV1](docs/sdks/sdkpaymentsv1/README.md#uninstallconnectorv1) - Uninstall a connector -* [updateBankAccountMetadata](docs/sdks/sdkpaymentsv1/README.md#updatebankaccountmetadata) - Update metadata of a bank account -* [updateConnectorConfigV1](docs/sdks/sdkpaymentsv1/README.md#updateconnectorconfigv1) - Update the config of a connector -* [updateMetadata](docs/sdks/sdkpaymentsv1/README.md#updatemetadata) - Update metadata +* [addAccountToPool](docs/sdks/payments/README.md#addaccounttopool) - Add an account to a pool +* [connectorsTransfer](docs/sdks/payments/README.md#connectorstransfer) - Transfer funds between Connector accounts +* [createAccount](docs/sdks/payments/README.md#createaccount) - Create an account +* [createBankAccount](docs/sdks/payments/README.md#createbankaccount) - Create a BankAccount in Payments and on the PSP +* [createPayment](docs/sdks/payments/README.md#createpayment) - Create a payment +* [createPool](docs/sdks/payments/README.md#createpool) - Create a Pool +* [createTransferInitiation](docs/sdks/payments/README.md#createtransferinitiation) - Create a TransferInitiation +* [deletePool](docs/sdks/payments/README.md#deletepool) - Delete a Pool +* [deleteTransferInitiation](docs/sdks/payments/README.md#deletetransferinitiation) - Delete a transfer initiation +* [forwardBankAccount](docs/sdks/payments/README.md#forwardbankaccount) - Forward a bank account to a connector +* [getAccountBalances](docs/sdks/payments/README.md#getaccountbalances) - Get account balances +* [getBankAccount](docs/sdks/payments/README.md#getbankaccount) - Get a bank account created by user on Formance +* [~~getConnectorTask~~](docs/sdks/payments/README.md#getconnectortask) - Read a specific task of the connector :warning: **Deprecated** +* [getConnectorTaskV1](docs/sdks/payments/README.md#getconnectortaskv1) - Read a specific task of the connector +* [getPayment](docs/sdks/payments/README.md#getpayment) - Get a payment +* [getPool](docs/sdks/payments/README.md#getpool) - Get a Pool +* [getPoolBalances](docs/sdks/payments/README.md#getpoolbalances) - Get pool balances +* [getTransferInitiation](docs/sdks/payments/README.md#gettransferinitiation) - Get a transfer initiation +* [installConnector](docs/sdks/payments/README.md#installconnector) - Install a connector +* [listAllConnectors](docs/sdks/payments/README.md#listallconnectors) - List all installed connectors +* [listBankAccounts](docs/sdks/payments/README.md#listbankaccounts) - List bank accounts created by user on Formance +* [listConfigsAvailableConnectors](docs/sdks/payments/README.md#listconfigsavailableconnectors) - List the configs of each available connector +* [~~listConnectorTasks~~](docs/sdks/payments/README.md#listconnectortasks) - List tasks from a connector :warning: **Deprecated** +* [listConnectorTasksV1](docs/sdks/payments/README.md#listconnectortasksv1) - List tasks from a connector +* [listPayments](docs/sdks/payments/README.md#listpayments) - List payments +* [listPools](docs/sdks/payments/README.md#listpools) - List Pools +* [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 +* [~~resetConnector~~](docs/sdks/payments/README.md#resetconnector) - Reset a connector :warning: **Deprecated** +* [resetConnectorV1](docs/sdks/payments/README.md#resetconnectorv1) - Reset a connector +* [retryTransferInitiation](docs/sdks/payments/README.md#retrytransferinitiation) - Retry a failed transfer initiation +* [reverseTransferInitiation](docs/sdks/payments/README.md#reversetransferinitiation) - Reverse a transfer initiation +* [udpateTransferInitiationStatus](docs/sdks/payments/README.md#udpatetransferinitiationstatus) - Update the status of a transfer initiation +* [~~uninstallConnector~~](docs/sdks/payments/README.md#uninstallconnector) - Uninstall a connector :warning: **Deprecated** +* [uninstallConnectorV1](docs/sdks/payments/README.md#uninstallconnectorv1) - Uninstall a connector +* [updateBankAccountMetadata](docs/sdks/payments/README.md#updatebankaccountmetadata) - Update metadata of a bank account +* [updateConnectorConfigV1](docs/sdks/payments/README.md#updateconnectorconfigv1) - Update the config of a connector +* [updateMetadata](docs/sdks/payments/README.md#updatemetadata) - Update metadata ### [reconciliation](docs/sdks/reconciliation/README.md) - -#### [reconciliation.v1](docs/sdks/sdkreconciliationv1/README.md) - -* [createPolicy](docs/sdks/sdkreconciliationv1/README.md#createpolicy) - Create a policy -* [deletePolicy](docs/sdks/sdkreconciliationv1/README.md#deletepolicy) - Delete a policy -* [getPolicy](docs/sdks/sdkreconciliationv1/README.md#getpolicy) - Get a policy -* [getReconciliation](docs/sdks/sdkreconciliationv1/README.md#getreconciliation) - Get a reconciliation -* [listPolicies](docs/sdks/sdkreconciliationv1/README.md#listpolicies) - List policies -* [listReconciliations](docs/sdks/sdkreconciliationv1/README.md#listreconciliations) - List reconciliations -* [reconcile](docs/sdks/sdkreconciliationv1/README.md#reconcile) - Reconcile using a policy -* [reconciliationgetServerInfo](docs/sdks/sdkreconciliationv1/README.md#reconciliationgetserverinfo) - Get server info +* [createPolicy](docs/sdks/reconciliation/README.md#createpolicy) - Create a policy +* [deletePolicy](docs/sdks/reconciliation/README.md#deletepolicy) - Delete a policy +* [getPolicy](docs/sdks/reconciliation/README.md#getpolicy) - Get a policy +* [getReconciliation](docs/sdks/reconciliation/README.md#getreconciliation) - Get a reconciliation +* [listPolicies](docs/sdks/reconciliation/README.md#listpolicies) - List policies +* [listReconciliations](docs/sdks/reconciliation/README.md#listreconciliations) - List reconciliations +* [reconcile](docs/sdks/reconciliation/README.md#reconcile) - Reconcile using a policy +* [reconciliationgetServerInfo](docs/sdks/reconciliation/README.md#reconciliationgetserverinfo) - Get server info ### [SDK](docs/sdks/sdk/README.md) +* [getOIDCWellKnowns](docs/sdks/sdk/README.md#getoidcwellknowns) - Retrieve OpenID connect well-knowns. * [getVersions](docs/sdks/sdk/README.md#getversions) - Show stack version information -### [~~search~~](docs/sdks/search/README.md) - +### [search](docs/sdks/search/README.md) -#### [~~search.v1~~](docs/sdks/sdksearchv1/README.md) - -* [~~search~~](docs/sdks/sdksearchv1/README.md#search) - search.v1 :warning: **Deprecated** -* [~~searchgetServerInfo~~](docs/sdks/sdksearchv1/README.md#searchgetserverinfo) - Get server info :warning: **Deprecated** +* [search](docs/sdks/search/README.md#search) - Search +* [searchgetServerInfo](docs/sdks/search/README.md#searchgetserverinfo) - Get server info ### [wallets](docs/sdks/wallets/README.md) -#### [wallets.v1](docs/sdks/sdkwalletsv1/README.md) - -* [confirmHold](docs/sdks/sdkwalletsv1/README.md#confirmhold) - Confirm a hold -* [createBalance](docs/sdks/sdkwalletsv1/README.md#createbalance) - Create a balance -* [createWallet](docs/sdks/sdkwalletsv1/README.md#createwallet) - Create a new wallet -* [creditWallet](docs/sdks/sdkwalletsv1/README.md#creditwallet) - Credit a wallet -* [debitWallet](docs/sdks/sdkwalletsv1/README.md#debitwallet) - Debit a wallet -* [getBalance](docs/sdks/sdkwalletsv1/README.md#getbalance) - Get detailed balance -* [getHold](docs/sdks/sdkwalletsv1/README.md#gethold) - Get a hold -* [getHolds](docs/sdks/sdkwalletsv1/README.md#getholds) - Get all holds for a wallet -* [getTransactions](docs/sdks/sdkwalletsv1/README.md#gettransactions) -* [getWallet](docs/sdks/sdkwalletsv1/README.md#getwallet) - Get a wallet -* [getWalletSummary](docs/sdks/sdkwalletsv1/README.md#getwalletsummary) - Get wallet summary -* [listBalances](docs/sdks/sdkwalletsv1/README.md#listbalances) - List balances of a wallet -* [listWallets](docs/sdks/sdkwalletsv1/README.md#listwallets) - List all wallets -* [updateWallet](docs/sdks/sdkwalletsv1/README.md#updatewallet) - Update a wallet -* [voidHold](docs/sdks/sdkwalletsv1/README.md#voidhold) - Cancel a hold -* [walletsgetServerInfo](docs/sdks/sdkwalletsv1/README.md#walletsgetserverinfo) - Get server info +#### [wallets.v1](docs/sdks/sdkv1/README.md) + +* [confirmHold](docs/sdks/sdkv1/README.md#confirmhold) - Confirm a hold +* [createBalance](docs/sdks/sdkv1/README.md#createbalance) - Create a balance +* [createWallet](docs/sdks/sdkv1/README.md#createwallet) - Create a new wallet +* [creditWallet](docs/sdks/sdkv1/README.md#creditwallet) - Credit a wallet +* [debitWallet](docs/sdks/sdkv1/README.md#debitwallet) - Debit a wallet +* [getBalance](docs/sdks/sdkv1/README.md#getbalance) - Get detailed balance +* [getHold](docs/sdks/sdkv1/README.md#gethold) - Get a hold +* [getHolds](docs/sdks/sdkv1/README.md#getholds) - Get all holds for a wallet +* [getTransactions](docs/sdks/sdkv1/README.md#gettransactions) +* [getWallet](docs/sdks/sdkv1/README.md#getwallet) - Get a wallet +* [getWalletSummary](docs/sdks/sdkv1/README.md#getwalletsummary) - Get wallet summary +* [listBalances](docs/sdks/sdkv1/README.md#listbalances) - List balances of a wallet +* [listWallets](docs/sdks/sdkv1/README.md#listwallets) - List all wallets +* [updateWallet](docs/sdks/sdkv1/README.md#updatewallet) - Update a wallet +* [voidHold](docs/sdks/sdkv1/README.md#voidhold) - Cancel a hold +* [walletsgetServerInfo](docs/sdks/sdkv1/README.md#walletsgetserverinfo) - Get server info ### [webhooks](docs/sdks/webhooks/README.md) - -#### [webhooks.v1](docs/sdks/sdkwebhooksv1/README.md) - -* [activateConfig](docs/sdks/sdkwebhooksv1/README.md#activateconfig) - Activate one config -* [changeConfigSecret](docs/sdks/sdkwebhooksv1/README.md#changeconfigsecret) - Change the signing secret of a config -* [deactivateConfig](docs/sdks/sdkwebhooksv1/README.md#deactivateconfig) - Deactivate one config -* [deleteConfig](docs/sdks/sdkwebhooksv1/README.md#deleteconfig) - Delete one config -* [getManyConfigs](docs/sdks/sdkwebhooksv1/README.md#getmanyconfigs) - Get many configs -* [insertConfig](docs/sdks/sdkwebhooksv1/README.md#insertconfig) - Insert a new config -* [testConfig](docs/sdks/sdkwebhooksv1/README.md#testconfig) - Test one config +* [activateConfig](docs/sdks/webhooks/README.md#activateconfig) - Activate one config +* [changeConfigSecret](docs/sdks/webhooks/README.md#changeconfigsecret) - Change the signing secret of a config +* [deactivateConfig](docs/sdks/webhooks/README.md#deactivateconfig) - Deactivate one config +* [deleteConfig](docs/sdks/webhooks/README.md#deleteconfig) - Delete one config +* [getManyConfigs](docs/sdks/webhooks/README.md#getmanyconfigs) - Get many configs +* [insertConfig](docs/sdks/webhooks/README.md#insertconfig) - Insert a new config +* [testConfig](docs/sdks/webhooks/README.md#testconfig) - Test one config @@ -352,25 +339,15 @@ run(); ## Error Handling -All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`. - -If a HTTP request fails, an operation my also throw an error from the `sdk/models/errors/httpclienterrors.ts` module: - -| HTTP Client Error | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | -| RequestAbortedError | HTTP request was aborted by the client | -| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | -| ConnectionError | HTTP client was unable to make a request to a server | -| InvalidRequestError | Any input used to create a request is invalid | -| UnexpectedClientError | Unrecognised or unexpected error | - -In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `createTransactions` method may throw the following errors: +Some methods specify known errors which can be thrown. All the known errors are enumerated in the `sdk/models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `createTransactions` method may throw the following errors: | Error Type | Status Code | Content Type | | -------------------- | ----------- | ---------------- | | errors.ErrorResponse | default | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`. + ```typescript import { SDK } from "@formance/formance-sdk"; import { @@ -399,6 +376,18 @@ async function run() { destination: "users:002", source: "users:001", }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, ], reference: "ref:001", }, @@ -411,8 +400,9 @@ async function run() { console.log(result); } catch (err) { switch (true) { + // The server response does not match the expected SDK schema case (err instanceof SDKValidationError): { - // Validation errors can be pretty-printed + // Pretty-print will provide a human-readable multi-line error message console.error(err.pretty()); // Raw value may also be inspected console.error(err.rawValue); @@ -424,6 +414,7 @@ async function run() { return; } default: { + // Other errors such as network errors, see HTTPClientErrors for more details throw err; } } @@ -434,7 +425,17 @@ run(); ``` -Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. +Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging. + +In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `sdk/models/errors/httpclienterrors.ts` module: + +| HTTP Client Error | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | +| RequestAbortedError | HTTP request was aborted by the client | +| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | +| ConnectionError | HTTP client was unable to make a request to a server | +| InvalidRequestError | Any input used to create a request is invalid | +| UnexpectedClientError | Unrecognised or unexpected error | @@ -465,7 +466,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions(); + const result = await sdk.getOIDCWellKnowns(); // Handle the result console.log(result); @@ -490,7 +491,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions(); + const result = await sdk.getOIDCWellKnowns(); // Handle the result console.log(result); @@ -573,7 +574,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions(); + const result = await sdk.getOIDCWellKnowns(); // Handle the result console.log(result); @@ -599,37 +600,37 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions -- [`authV1CreateClient`](docs/sdks/v1/README.md#createclient) - Create client -- [`authV1CreateSecret`](docs/sdks/v1/README.md#createsecret) - Add a secret to a client -- [`authV1DeleteClient`](docs/sdks/v1/README.md#deleteclient) - Delete client -- [`authV1DeleteSecret`](docs/sdks/v1/README.md#deletesecret) - Delete a secret from a client -- [`authV1GetOIDCWellKnowns`](docs/sdks/v1/README.md#getoidcwellknowns) - Retrieve OpenID connect well-knowns. -- [`authV1GetServerInfo`](docs/sdks/v1/README.md#getserverinfo) - Get server info -- [`authV1ListClients`](docs/sdks/v1/README.md#listclients) - List clients -- [`authV1ListUsers`](docs/sdks/v1/README.md#listusers) - List users -- [`authV1ReadClient`](docs/sdks/v1/README.md#readclient) - Read client -- [`authV1ReadUser`](docs/sdks/v1/README.md#readuser) - Read user -- [`authV1UpdateClient`](docs/sdks/v1/README.md#updateclient) - Update client +- [`authCreateClient`](docs/sdks/auth/README.md#createclient) - Create client +- [`authCreateSecret`](docs/sdks/auth/README.md#createsecret) - Add a secret to a client +- [`authDeleteClient`](docs/sdks/auth/README.md#deleteclient) - Delete client +- [`authDeleteSecret`](docs/sdks/auth/README.md#deletesecret) - Delete a secret from a client +- [`authGetServerInfo`](docs/sdks/auth/README.md#getserverinfo) - Get server info +- [`authListClients`](docs/sdks/auth/README.md#listclients) - List clients +- [`authListUsers`](docs/sdks/auth/README.md#listusers) - List users +- [`authReadClient`](docs/sdks/auth/README.md#readclient) - Read client +- [`authReadUser`](docs/sdks/auth/README.md#readuser) - Read user +- [`authUpdateClient`](docs/sdks/auth/README.md#updateclient) - Update client +- [`getOIDCWellKnowns`](docs/sdks/sdk/README.md#getoidcwellknowns) - Retrieve OpenID connect well-knowns. - [`getVersions`](docs/sdks/sdk/README.md#getversions) - Show stack version information -- [`ledgerV1AddMetadataOnTransaction`](docs/sdks/sdkv1/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID -- [`ledgerV1AddMetadataToAccount`](docs/sdks/sdkv1/README.md#addmetadatatoaccount) - Add metadata to an account -- [`ledgerV1CountAccounts`](docs/sdks/sdkv1/README.md#countaccounts) - Count the accounts from a ledger -- [`ledgerV1CountTransactions`](docs/sdks/sdkv1/README.md#counttransactions) - Count the transactions from a ledger -- [`ledgerV1CreateTransaction`](docs/sdks/sdkv1/README.md#createtransaction) - Create a new transaction to a ledger -- [`ledgerV1CreateTransactions`](docs/sdks/sdkv1/README.md#createtransactions) - Create a new batch of transactions to a ledger -- [`ledgerV1GetAccount`](docs/sdks/sdkv1/README.md#getaccount) - Get account by its address -- [`ledgerV1GetBalances`](docs/sdks/sdkv1/README.md#getbalances) - Get the balances from a ledger's account -- [`ledgerV1GetBalancesAggregated`](docs/sdks/sdkv1/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts -- [`ledgerV1GetInfo`](docs/sdks/sdkv1/README.md#getinfo) - Show server information -- [`ledgerV1GetLedgerInfo`](docs/sdks/sdkv1/README.md#getledgerinfo) - Get information about a ledger -- [`ledgerV1GetMapping`](docs/sdks/sdkv1/README.md#getmapping) - Get the mapping of a ledger -- [`ledgerV1GetTransaction`](docs/sdks/sdkv1/README.md#gettransaction) - Get transaction from a ledger by its ID -- [`ledgerV1ListAccounts`](docs/sdks/sdkv1/README.md#listaccounts) - List accounts from a ledger -- [`ledgerV1ListLogs`](docs/sdks/sdkv1/README.md#listlogs) - List the logs from a ledger -- [`ledgerV1ListTransactions`](docs/sdks/sdkv1/README.md#listtransactions) - List transactions from a ledger -- [`ledgerV1ReadStats`](docs/sdks/sdkv1/README.md#readstats) - Get statistics from a ledger -- [`ledgerV1RevertTransaction`](docs/sdks/sdkv1/README.md#reverttransaction) - Revert a ledger transaction by its ID -- [`ledgerV1UpdateMapping`](docs/sdks/sdkv1/README.md#updatemapping) - Update the mapping of a ledger +- [`ledgerV1AddMetadataOnTransaction`](docs/sdks/v1/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID +- [`ledgerV1AddMetadataToAccount`](docs/sdks/v1/README.md#addmetadatatoaccount) - Add metadata to an account +- [`ledgerV1CountAccounts`](docs/sdks/v1/README.md#countaccounts) - Count the accounts from a ledger +- [`ledgerV1CountTransactions`](docs/sdks/v1/README.md#counttransactions) - Count the transactions from a ledger +- [`ledgerV1CreateTransaction`](docs/sdks/v1/README.md#createtransaction) - Create a new transaction to a ledger +- [`ledgerV1CreateTransactions`](docs/sdks/v1/README.md#createtransactions) - Create a new batch of transactions to a ledger +- [`ledgerV1GetAccount`](docs/sdks/v1/README.md#getaccount) - Get account by its address +- [`ledgerV1GetBalances`](docs/sdks/v1/README.md#getbalances) - Get the balances from a ledger's account +- [`ledgerV1GetBalancesAggregated`](docs/sdks/v1/README.md#getbalancesaggregated) - Get the aggregated balances from selected accounts +- [`ledgerV1GetInfo`](docs/sdks/v1/README.md#getinfo) - Show server information +- [`ledgerV1GetLedgerInfo`](docs/sdks/v1/README.md#getledgerinfo) - Get information about a ledger +- [`ledgerV1GetMapping`](docs/sdks/v1/README.md#getmapping) - Get the mapping of a ledger +- [`ledgerV1GetTransaction`](docs/sdks/v1/README.md#gettransaction) - Get transaction from a ledger by its ID +- [`ledgerV1ListAccounts`](docs/sdks/v1/README.md#listaccounts) - List accounts from a ledger +- [`ledgerV1ListLogs`](docs/sdks/v1/README.md#listlogs) - List the logs from a ledger +- [`ledgerV1ListTransactions`](docs/sdks/v1/README.md#listtransactions) - List transactions from a ledger +- [`ledgerV1ReadStats`](docs/sdks/v1/README.md#readstats) - Get statistics from a ledger +- [`ledgerV1RevertTransaction`](docs/sdks/v1/README.md#reverttransaction) - Revert a ledger transaction by its ID +- [`ledgerV1UpdateMapping`](docs/sdks/v1/README.md#updatemapping) - Update the mapping of a ledger - [`ledgerV2AddMetadataOnTransaction`](docs/sdks/v2/README.md#addmetadataontransaction) - Set the metadata of a transaction by its ID - [`ledgerV2AddMetadataToAccount`](docs/sdks/v2/README.md#addmetadatatoaccount) - Add metadata to an account - [`ledgerV2CountAccounts`](docs/sdks/v2/README.md#countaccounts) - Count the accounts from a ledger @@ -656,118 +657,118 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`ledgerV2ReadStats`](docs/sdks/v2/README.md#readstats) - Get statistics from a ledger - [`ledgerV2RevertTransaction`](docs/sdks/v2/README.md#reverttransaction) - Revert a ledger transaction by its ID - [`ledgerV2UpdateLedgerMetadata`](docs/sdks/v2/README.md#updateledgermetadata) - Update ledger metadata -- [`orchestrationV1CancelEvent`](docs/sdks/sdkorchestrationv1/README.md#cancelevent) - Cancel a running workflow -- [`orchestrationV1CreateTrigger`](docs/sdks/sdkorchestrationv1/README.md#createtrigger) - Create trigger -- [`orchestrationV1CreateWorkflow`](docs/sdks/sdkorchestrationv1/README.md#createworkflow) - Create workflow -- [`orchestrationV1DeleteTrigger`](docs/sdks/sdkorchestrationv1/README.md#deletetrigger) - Delete trigger -- [`orchestrationV1DeleteWorkflow`](docs/sdks/sdkorchestrationv1/README.md#deleteworkflow) - Delete a flow by id -- [`orchestrationV1GetInstance`](docs/sdks/sdkorchestrationv1/README.md#getinstance) - Get a workflow instance by id -- [`orchestrationV1GetInstanceHistory`](docs/sdks/sdkorchestrationv1/README.md#getinstancehistory) - Get a workflow instance history by id -- [`orchestrationV1GetInstanceStageHistory`](docs/sdks/sdkorchestrationv1/README.md#getinstancestagehistory) - Get a workflow instance stage history -- [`orchestrationV1GetWorkflow`](docs/sdks/sdkorchestrationv1/README.md#getworkflow) - Get a flow by id -- [`orchestrationV1ListInstances`](docs/sdks/sdkorchestrationv1/README.md#listinstances) - List instances of a workflow -- [`orchestrationV1ListTriggers`](docs/sdks/sdkorchestrationv1/README.md#listtriggers) - List triggers -- [`orchestrationV1ListTriggersOccurrences`](docs/sdks/sdkorchestrationv1/README.md#listtriggersoccurrences) - List triggers occurrences -- [`orchestrationV1ListWorkflows`](docs/sdks/sdkorchestrationv1/README.md#listworkflows) - List registered workflows -- [`orchestrationV1OrchestrationgetServerInfo`](docs/sdks/sdkorchestrationv1/README.md#orchestrationgetserverinfo) - Get server info -- [`orchestrationV1ReadTrigger`](docs/sdks/sdkorchestrationv1/README.md#readtrigger) - Read trigger -- [`orchestrationV1RunWorkflow`](docs/sdks/sdkorchestrationv1/README.md#runworkflow) - Run workflow -- [`orchestrationV1SendEvent`](docs/sdks/sdkorchestrationv1/README.md#sendevent) - Send an event to a running workflow -- [`orchestrationV2CancelEvent`](docs/sdks/sdkv2/README.md#cancelevent) - Cancel a running workflow -- [`orchestrationV2CreateTrigger`](docs/sdks/sdkv2/README.md#createtrigger) - Create trigger -- [`orchestrationV2CreateWorkflow`](docs/sdks/sdkv2/README.md#createworkflow) - Create workflow -- [`orchestrationV2DeleteTrigger`](docs/sdks/sdkv2/README.md#deletetrigger) - Delete trigger -- [`orchestrationV2DeleteWorkflow`](docs/sdks/sdkv2/README.md#deleteworkflow) - Delete a flow by id -- [`orchestrationV2GetInstance`](docs/sdks/sdkv2/README.md#getinstance) - Get a workflow instance by id -- [`orchestrationV2GetInstanceHistory`](docs/sdks/sdkv2/README.md#getinstancehistory) - Get a workflow instance history by id -- [`orchestrationV2GetInstanceStageHistory`](docs/sdks/sdkv2/README.md#getinstancestagehistory) - Get a workflow instance stage history -- [`orchestrationV2GetServerInfo`](docs/sdks/sdkv2/README.md#getserverinfo) - Get server info -- [`orchestrationV2GetWorkflow`](docs/sdks/sdkv2/README.md#getworkflow) - Get a flow by id -- [`orchestrationV2ListInstances`](docs/sdks/sdkv2/README.md#listinstances) - List instances of a workflow -- [`orchestrationV2ListTriggers`](docs/sdks/sdkv2/README.md#listtriggers) - List triggers -- [`orchestrationV2ListTriggersOccurrences`](docs/sdks/sdkv2/README.md#listtriggersoccurrences) - List triggers occurrences -- [`orchestrationV2ListWorkflows`](docs/sdks/sdkv2/README.md#listworkflows) - List registered workflows -- [`orchestrationV2ReadTrigger`](docs/sdks/sdkv2/README.md#readtrigger) - Read trigger -- [`orchestrationV2RunWorkflow`](docs/sdks/sdkv2/README.md#runworkflow) - Run workflow -- [`orchestrationV2SendEvent`](docs/sdks/sdkv2/README.md#sendevent) - Send an event to a running workflow -- [`orchestrationV2TestTrigger`](docs/sdks/sdkv2/README.md#testtrigger) - Test trigger -- [`paymentsV1AddAccountToPool`](docs/sdks/sdkpaymentsv1/README.md#addaccounttopool) - Add an account to a pool -- [`paymentsV1ConnectorsTransfer`](docs/sdks/sdkpaymentsv1/README.md#connectorstransfer) - Transfer funds between Connector accounts -- [`paymentsV1CreateAccount`](docs/sdks/sdkpaymentsv1/README.md#createaccount) - Create an account -- [`paymentsV1CreateBankAccount`](docs/sdks/sdkpaymentsv1/README.md#createbankaccount) - Create a BankAccount in Payments and on the PSP -- [`paymentsV1CreatePayment`](docs/sdks/sdkpaymentsv1/README.md#createpayment) - Create a payment -- [`paymentsV1CreatePool`](docs/sdks/sdkpaymentsv1/README.md#createpool) - Create a Pool -- [`paymentsV1CreateTransferInitiation`](docs/sdks/sdkpaymentsv1/README.md#createtransferinitiation) - Create a TransferInitiation -- [`paymentsV1DeletePool`](docs/sdks/sdkpaymentsv1/README.md#deletepool) - Delete a Pool -- [`paymentsV1DeleteTransferInitiation`](docs/sdks/sdkpaymentsv1/README.md#deletetransferinitiation) - Delete a transfer initiation -- [`paymentsV1ForwardBankAccount`](docs/sdks/sdkpaymentsv1/README.md#forwardbankaccount) - Forward a bank account to a connector -- [`paymentsV1GetAccountBalances`](docs/sdks/sdkpaymentsv1/README.md#getaccountbalances) - Get account balances -- [`paymentsV1GetBankAccount`](docs/sdks/sdkpaymentsv1/README.md#getbankaccount) - Get a bank account created by user on Formance -- [`paymentsV1GetConnectorTaskV1`](docs/sdks/sdkpaymentsv1/README.md#getconnectortaskv1) - Read a specific task of the connector -- [`paymentsV1GetPayment`](docs/sdks/sdkpaymentsv1/README.md#getpayment) - Get a payment -- [`paymentsV1GetPool`](docs/sdks/sdkpaymentsv1/README.md#getpool) - Get a Pool -- [`paymentsV1GetPoolBalances`](docs/sdks/sdkpaymentsv1/README.md#getpoolbalances) - Get pool balances -- [`paymentsV1GetTransferInitiation`](docs/sdks/sdkpaymentsv1/README.md#gettransferinitiation) - Get a transfer initiation -- [`paymentsV1InstallConnector`](docs/sdks/sdkpaymentsv1/README.md#installconnector) - Install a connector -- [`paymentsV1ListAllConnectors`](docs/sdks/sdkpaymentsv1/README.md#listallconnectors) - List all installed connectors -- [`paymentsV1ListBankAccounts`](docs/sdks/sdkpaymentsv1/README.md#listbankaccounts) - List bank accounts created by user on Formance -- [`paymentsV1ListConfigsAvailableConnectors`](docs/sdks/sdkpaymentsv1/README.md#listconfigsavailableconnectors) - List the configs of each available connector -- [`paymentsV1ListConnectorTasksV1`](docs/sdks/sdkpaymentsv1/README.md#listconnectortasksv1) - List tasks from a connector -- [`paymentsV1ListPayments`](docs/sdks/sdkpaymentsv1/README.md#listpayments) - List payments -- [`paymentsV1ListPools`](docs/sdks/sdkpaymentsv1/README.md#listpools) - List Pools -- [`paymentsV1ListTransferInitiations`](docs/sdks/sdkpaymentsv1/README.md#listtransferinitiations) - List Transfer Initiations -- [`paymentsV1PaymentsgetAccount`](docs/sdks/sdkpaymentsv1/README.md#paymentsgetaccount) - Get an account -- [`paymentsV1PaymentsgetServerInfo`](docs/sdks/sdkpaymentsv1/README.md#paymentsgetserverinfo) - Get server info -- [`paymentsV1PaymentslistAccounts`](docs/sdks/sdkpaymentsv1/README.md#paymentslistaccounts) - List accounts -- [`paymentsV1ReadConnectorConfigV1`](docs/sdks/sdkpaymentsv1/README.md#readconnectorconfigv1) - Read the config of a connector -- [`paymentsV1RemoveAccountFromPool`](docs/sdks/sdkpaymentsv1/README.md#removeaccountfrompool) - Remove an account from a pool -- [`paymentsV1ResetConnectorV1`](docs/sdks/sdkpaymentsv1/README.md#resetconnectorv1) - Reset a connector -- [`paymentsV1RetryTransferInitiation`](docs/sdks/sdkpaymentsv1/README.md#retrytransferinitiation) - Retry a failed transfer initiation -- [`paymentsV1ReverseTransferInitiation`](docs/sdks/sdkpaymentsv1/README.md#reversetransferinitiation) - Reverse a transfer initiation -- [`paymentsV1UdpateTransferInitiationStatus`](docs/sdks/sdkpaymentsv1/README.md#udpatetransferinitiationstatus) - Update the status of a transfer initiation -- [`paymentsV1UninstallConnectorV1`](docs/sdks/sdkpaymentsv1/README.md#uninstallconnectorv1) - Uninstall a connector -- [`paymentsV1UpdateBankAccountMetadata`](docs/sdks/sdkpaymentsv1/README.md#updatebankaccountmetadata) - Update metadata of a bank account -- [`paymentsV1UpdateConnectorConfigV1`](docs/sdks/sdkpaymentsv1/README.md#updateconnectorconfigv1) - Update the config of a connector -- [`paymentsV1UpdateMetadata`](docs/sdks/sdkpaymentsv1/README.md#updatemetadata) - Update metadata -- [`reconciliationV1CreatePolicy`](docs/sdks/sdkreconciliationv1/README.md#createpolicy) - Create a policy -- [`reconciliationV1DeletePolicy`](docs/sdks/sdkreconciliationv1/README.md#deletepolicy) - Delete a policy -- [`reconciliationV1GetPolicy`](docs/sdks/sdkreconciliationv1/README.md#getpolicy) - Get a policy -- [`reconciliationV1GetReconciliation`](docs/sdks/sdkreconciliationv1/README.md#getreconciliation) - Get a reconciliation -- [`reconciliationV1ListPolicies`](docs/sdks/sdkreconciliationv1/README.md#listpolicies) - List policies -- [`reconciliationV1ListReconciliations`](docs/sdks/sdkreconciliationv1/README.md#listreconciliations) - List reconciliations -- [`reconciliationV1Reconcile`](docs/sdks/sdkreconciliationv1/README.md#reconcile) - Reconcile using a policy -- [`reconciliationV1ReconciliationgetServerInfo`](docs/sdks/sdkreconciliationv1/README.md#reconciliationgetserverinfo) - Get server info -- [`walletsV1ConfirmHold`](docs/sdks/sdkwalletsv1/README.md#confirmhold) - Confirm a hold -- [`walletsV1CreateBalance`](docs/sdks/sdkwalletsv1/README.md#createbalance) - Create a balance -- [`walletsV1CreateWallet`](docs/sdks/sdkwalletsv1/README.md#createwallet) - Create a new wallet -- [`walletsV1CreditWallet`](docs/sdks/sdkwalletsv1/README.md#creditwallet) - Credit a wallet -- [`walletsV1DebitWallet`](docs/sdks/sdkwalletsv1/README.md#debitwallet) - Debit a wallet -- [`walletsV1GetBalance`](docs/sdks/sdkwalletsv1/README.md#getbalance) - Get detailed balance -- [`walletsV1GetHold`](docs/sdks/sdkwalletsv1/README.md#gethold) - Get a hold -- [`walletsV1GetHolds`](docs/sdks/sdkwalletsv1/README.md#getholds) - Get all holds for a wallet -- [`walletsV1GetTransactions`](docs/sdks/sdkwalletsv1/README.md#gettransactions) -- [`walletsV1GetWallet`](docs/sdks/sdkwalletsv1/README.md#getwallet) - Get a wallet -- [`walletsV1GetWalletSummary`](docs/sdks/sdkwalletsv1/README.md#getwalletsummary) - Get wallet summary -- [`walletsV1ListBalances`](docs/sdks/sdkwalletsv1/README.md#listbalances) - List balances of a wallet -- [`walletsV1ListWallets`](docs/sdks/sdkwalletsv1/README.md#listwallets) - List all wallets -- [`walletsV1UpdateWallet`](docs/sdks/sdkwalletsv1/README.md#updatewallet) - Update a wallet -- [`walletsV1VoidHold`](docs/sdks/sdkwalletsv1/README.md#voidhold) - Cancel a hold -- [`walletsV1WalletsgetServerInfo`](docs/sdks/sdkwalletsv1/README.md#walletsgetserverinfo) - Get server info -- [`webhooksV1ActivateConfig`](docs/sdks/sdkwebhooksv1/README.md#activateconfig) - Activate one config -- [`webhooksV1ChangeConfigSecret`](docs/sdks/sdkwebhooksv1/README.md#changeconfigsecret) - Change the signing secret of a config -- [`webhooksV1DeactivateConfig`](docs/sdks/sdkwebhooksv1/README.md#deactivateconfig) - Deactivate one config -- [`webhooksV1DeleteConfig`](docs/sdks/sdkwebhooksv1/README.md#deleteconfig) - Delete one config -- [`webhooksV1GetManyConfigs`](docs/sdks/sdkwebhooksv1/README.md#getmanyconfigs) - Get many configs -- [`webhooksV1InsertConfig`](docs/sdks/sdkwebhooksv1/README.md#insertconfig) - Insert a new config -- [`webhooksV1TestConfig`](docs/sdks/sdkwebhooksv1/README.md#testconfig) - Test one config -- ~~[`ledgerV1RunScript`](docs/sdks/sdkv1/README.md#runscript)~~ - Execute a Numscript :warning: **Deprecated** -- ~~[`paymentsV1GetConnectorTask`](docs/sdks/sdkpaymentsv1/README.md#getconnectortask)~~ - Read a specific task of the connector :warning: **Deprecated** -- ~~[`paymentsV1ListConnectorTasks`](docs/sdks/sdkpaymentsv1/README.md#listconnectortasks)~~ - List tasks from a connector :warning: **Deprecated** -- ~~[`paymentsV1ReadConnectorConfig`](docs/sdks/sdkpaymentsv1/README.md#readconnectorconfig)~~ - Read the config of a connector :warning: **Deprecated** -- ~~[`paymentsV1ResetConnector`](docs/sdks/sdkpaymentsv1/README.md#resetconnector)~~ - Reset a connector :warning: **Deprecated** -- ~~[`paymentsV1UninstallConnector`](docs/sdks/sdkpaymentsv1/README.md#uninstallconnector)~~ - Uninstall a connector :warning: **Deprecated** -- ~~[`searchV1Search`](docs/sdks/sdksearchv1/README.md#search)~~ - search.v1 :warning: **Deprecated** -- ~~[`searchV1SearchgetServerInfo`](docs/sdks/sdksearchv1/README.md#searchgetserverinfo)~~ - Get server info :warning: **Deprecated** +- [`orchestrationCancelEvent`](docs/sdks/orchestration/README.md#cancelevent) - Cancel a running workflow +- [`orchestrationCreateTrigger`](docs/sdks/orchestration/README.md#createtrigger) - Create trigger +- [`orchestrationCreateWorkflow`](docs/sdks/orchestration/README.md#createworkflow) - Create workflow +- [`orchestrationDeleteTrigger`](docs/sdks/orchestration/README.md#deletetrigger) - Delete trigger +- [`orchestrationDeleteWorkflow`](docs/sdks/orchestration/README.md#deleteworkflow) - Delete a flow by id +- [`orchestrationGetInstance`](docs/sdks/orchestration/README.md#getinstance) - Get a workflow instance by id +- [`orchestrationGetInstanceHistory`](docs/sdks/orchestration/README.md#getinstancehistory) - Get a workflow instance history by id +- [`orchestrationGetInstanceStageHistory`](docs/sdks/orchestration/README.md#getinstancestagehistory) - Get a workflow instance stage history +- [`orchestrationGetWorkflow`](docs/sdks/orchestration/README.md#getworkflow) - Get a flow by id +- [`orchestrationListInstances`](docs/sdks/orchestration/README.md#listinstances) - List instances of a workflow +- [`orchestrationListTriggers`](docs/sdks/orchestration/README.md#listtriggers) - List triggers +- [`orchestrationListTriggersOccurrences`](docs/sdks/orchestration/README.md#listtriggersoccurrences) - List triggers occurrences +- [`orchestrationListWorkflows`](docs/sdks/orchestration/README.md#listworkflows) - List registered workflows +- [`orchestrationOrchestrationgetServerInfo`](docs/sdks/orchestration/README.md#orchestrationgetserverinfo) - Get server info +- [`orchestrationReadTrigger`](docs/sdks/orchestration/README.md#readtrigger) - Read trigger +- [`orchestrationRunWorkflow`](docs/sdks/orchestration/README.md#runworkflow) - Run workflow +- [`orchestrationSendEvent`](docs/sdks/orchestration/README.md#sendevent) - Send an event to a running workflow +- [`orchestrationTestTrigger`](docs/sdks/orchestration/README.md#testtrigger) - Test trigger +- [`orchestrationV2CancelEvent`](docs/sdks/orchestration/README.md#v2cancelevent) - Cancel a running workflow +- [`orchestrationV2CreateTrigger`](docs/sdks/orchestration/README.md#v2createtrigger) - Create trigger +- [`orchestrationV2CreateWorkflow`](docs/sdks/orchestration/README.md#v2createworkflow) - Create workflow +- [`orchestrationV2DeleteTrigger`](docs/sdks/orchestration/README.md#v2deletetrigger) - Delete trigger +- [`orchestrationV2DeleteWorkflow`](docs/sdks/orchestration/README.md#v2deleteworkflow) - Delete a flow by id +- [`orchestrationV2GetInstance`](docs/sdks/orchestration/README.md#v2getinstance) - Get a workflow instance by id +- [`orchestrationV2GetInstanceHistory`](docs/sdks/orchestration/README.md#v2getinstancehistory) - Get a workflow instance history by id +- [`orchestrationV2GetInstanceStageHistory`](docs/sdks/orchestration/README.md#v2getinstancestagehistory) - Get a workflow instance stage history +- [`orchestrationV2GetServerInfo`](docs/sdks/orchestration/README.md#v2getserverinfo) - Get server info +- [`orchestrationV2GetWorkflow`](docs/sdks/orchestration/README.md#v2getworkflow) - Get a flow by id +- [`orchestrationV2ListInstances`](docs/sdks/orchestration/README.md#v2listinstances) - List instances of a workflow +- [`orchestrationV2ListTriggers`](docs/sdks/orchestration/README.md#v2listtriggers) - List triggers +- [`orchestrationV2ListTriggersOccurrences`](docs/sdks/orchestration/README.md#v2listtriggersoccurrences) - List triggers occurrences +- [`orchestrationV2ListWorkflows`](docs/sdks/orchestration/README.md#v2listworkflows) - List registered workflows +- [`orchestrationV2ReadTrigger`](docs/sdks/orchestration/README.md#v2readtrigger) - Read trigger +- [`orchestrationV2RunWorkflow`](docs/sdks/orchestration/README.md#v2runworkflow) - Run workflow +- [`orchestrationV2SendEvent`](docs/sdks/orchestration/README.md#v2sendevent) - Send an event to a running workflow +- [`paymentsAddAccountToPool`](docs/sdks/payments/README.md#addaccounttopool) - Add an account to a pool +- [`paymentsConnectorsTransfer`](docs/sdks/payments/README.md#connectorstransfer) - Transfer funds between Connector accounts +- [`paymentsCreateAccount`](docs/sdks/payments/README.md#createaccount) - Create an account +- [`paymentsCreateBankAccount`](docs/sdks/payments/README.md#createbankaccount) - Create a BankAccount in Payments and on the PSP +- [`paymentsCreatePayment`](docs/sdks/payments/README.md#createpayment) - Create a payment +- [`paymentsCreatePool`](docs/sdks/payments/README.md#createpool) - Create a Pool +- [`paymentsCreateTransferInitiation`](docs/sdks/payments/README.md#createtransferinitiation) - Create a TransferInitiation +- [`paymentsDeletePool`](docs/sdks/payments/README.md#deletepool) - Delete a Pool +- [`paymentsDeleteTransferInitiation`](docs/sdks/payments/README.md#deletetransferinitiation) - Delete a transfer initiation +- [`paymentsForwardBankAccount`](docs/sdks/payments/README.md#forwardbankaccount) - Forward a bank account to a connector +- [`paymentsGetAccountBalances`](docs/sdks/payments/README.md#getaccountbalances) - Get account balances +- [`paymentsGetBankAccount`](docs/sdks/payments/README.md#getbankaccount) - Get a bank account created by user on Formance +- [`paymentsGetConnectorTaskV1`](docs/sdks/payments/README.md#getconnectortaskv1) - Read a specific task of the connector +- [`paymentsGetPayment`](docs/sdks/payments/README.md#getpayment) - Get a payment +- [`paymentsGetPool`](docs/sdks/payments/README.md#getpool) - Get a Pool +- [`paymentsGetPoolBalances`](docs/sdks/payments/README.md#getpoolbalances) - Get pool balances +- [`paymentsGetTransferInitiation`](docs/sdks/payments/README.md#gettransferinitiation) - Get a transfer initiation +- [`paymentsInstallConnector`](docs/sdks/payments/README.md#installconnector) - Install a connector +- [`paymentsListAllConnectors`](docs/sdks/payments/README.md#listallconnectors) - List all installed connectors +- [`paymentsListBankAccounts`](docs/sdks/payments/README.md#listbankaccounts) - List bank accounts created by user on Formance +- [`paymentsListConfigsAvailableConnectors`](docs/sdks/payments/README.md#listconfigsavailableconnectors) - List the configs of each available connector +- [`paymentsListConnectorTasksV1`](docs/sdks/payments/README.md#listconnectortasksv1) - List tasks from a connector +- [`paymentsListPayments`](docs/sdks/payments/README.md#listpayments) - List payments +- [`paymentsListPools`](docs/sdks/payments/README.md#listpools) - List Pools +- [`paymentsListTransferInitiations`](docs/sdks/payments/README.md#listtransferinitiations) - List Transfer Initiations +- [`paymentsPaymentsgetAccount`](docs/sdks/payments/README.md#paymentsgetaccount) - Get an account +- [`paymentsPaymentsgetServerInfo`](docs/sdks/payments/README.md#paymentsgetserverinfo) - Get server info +- [`paymentsPaymentslistAccounts`](docs/sdks/payments/README.md#paymentslistaccounts) - List accounts +- [`paymentsReadConnectorConfigV1`](docs/sdks/payments/README.md#readconnectorconfigv1) - Read the config of a connector +- [`paymentsRemoveAccountFromPool`](docs/sdks/payments/README.md#removeaccountfrompool) - Remove an account from a pool +- [`paymentsResetConnectorV1`](docs/sdks/payments/README.md#resetconnectorv1) - Reset a connector +- [`paymentsRetryTransferInitiation`](docs/sdks/payments/README.md#retrytransferinitiation) - Retry a failed transfer initiation +- [`paymentsReverseTransferInitiation`](docs/sdks/payments/README.md#reversetransferinitiation) - Reverse a transfer initiation +- [`paymentsUdpateTransferInitiationStatus`](docs/sdks/payments/README.md#udpatetransferinitiationstatus) - Update the status of a transfer initiation +- [`paymentsUninstallConnectorV1`](docs/sdks/payments/README.md#uninstallconnectorv1) - Uninstall a connector +- [`paymentsUpdateBankAccountMetadata`](docs/sdks/payments/README.md#updatebankaccountmetadata) - Update metadata of a bank account +- [`paymentsUpdateConnectorConfigV1`](docs/sdks/payments/README.md#updateconnectorconfigv1) - Update the config of a connector +- [`paymentsUpdateMetadata`](docs/sdks/payments/README.md#updatemetadata) - Update metadata +- [`reconciliationCreatePolicy`](docs/sdks/reconciliation/README.md#createpolicy) - Create a policy +- [`reconciliationDeletePolicy`](docs/sdks/reconciliation/README.md#deletepolicy) - Delete a policy +- [`reconciliationGetPolicy`](docs/sdks/reconciliation/README.md#getpolicy) - Get a policy +- [`reconciliationGetReconciliation`](docs/sdks/reconciliation/README.md#getreconciliation) - Get a reconciliation +- [`reconciliationListPolicies`](docs/sdks/reconciliation/README.md#listpolicies) - List policies +- [`reconciliationListReconciliations`](docs/sdks/reconciliation/README.md#listreconciliations) - List reconciliations +- [`reconciliationReconcile`](docs/sdks/reconciliation/README.md#reconcile) - Reconcile using a policy +- [`reconciliationReconciliationgetServerInfo`](docs/sdks/reconciliation/README.md#reconciliationgetserverinfo) - Get server info +- [`searchSearch`](docs/sdks/search/README.md#search) - Search +- [`searchSearchgetServerInfo`](docs/sdks/search/README.md#searchgetserverinfo) - Get server info +- [`walletsV1ConfirmHold`](docs/sdks/sdkv1/README.md#confirmhold) - Confirm a hold +- [`walletsV1CreateBalance`](docs/sdks/sdkv1/README.md#createbalance) - Create a balance +- [`walletsV1CreateWallet`](docs/sdks/sdkv1/README.md#createwallet) - Create a new wallet +- [`walletsV1CreditWallet`](docs/sdks/sdkv1/README.md#creditwallet) - Credit a wallet +- [`walletsV1DebitWallet`](docs/sdks/sdkv1/README.md#debitwallet) - Debit a wallet +- [`walletsV1GetBalance`](docs/sdks/sdkv1/README.md#getbalance) - Get detailed balance +- [`walletsV1GetHold`](docs/sdks/sdkv1/README.md#gethold) - Get a hold +- [`walletsV1GetHolds`](docs/sdks/sdkv1/README.md#getholds) - Get all holds for a wallet +- [`walletsV1GetTransactions`](docs/sdks/sdkv1/README.md#gettransactions) +- [`walletsV1GetWallet`](docs/sdks/sdkv1/README.md#getwallet) - Get a wallet +- [`walletsV1GetWalletSummary`](docs/sdks/sdkv1/README.md#getwalletsummary) - Get wallet summary +- [`walletsV1ListBalances`](docs/sdks/sdkv1/README.md#listbalances) - List balances of a wallet +- [`walletsV1ListWallets`](docs/sdks/sdkv1/README.md#listwallets) - List all wallets +- [`walletsV1UpdateWallet`](docs/sdks/sdkv1/README.md#updatewallet) - Update a wallet +- [`walletsV1VoidHold`](docs/sdks/sdkv1/README.md#voidhold) - Cancel a hold +- [`walletsV1WalletsgetServerInfo`](docs/sdks/sdkv1/README.md#walletsgetserverinfo) - Get server info +- [`webhooksActivateConfig`](docs/sdks/webhooks/README.md#activateconfig) - Activate one config +- [`webhooksChangeConfigSecret`](docs/sdks/webhooks/README.md#changeconfigsecret) - Change the signing secret of a config +- [`webhooksDeactivateConfig`](docs/sdks/webhooks/README.md#deactivateconfig) - Deactivate one config +- [`webhooksDeleteConfig`](docs/sdks/webhooks/README.md#deleteconfig) - Delete one config +- [`webhooksGetManyConfigs`](docs/sdks/webhooks/README.md#getmanyconfigs) - Get many configs +- [`webhooksInsertConfig`](docs/sdks/webhooks/README.md#insertconfig) - Insert a new config +- [`webhooksTestConfig`](docs/sdks/webhooks/README.md#testconfig) - Test one config +- ~~[`ledgerV1RunScript`](docs/sdks/v1/README.md#runscript)~~ - Execute a Numscript :warning: **Deprecated** +- ~~[`paymentsGetConnectorTask`](docs/sdks/payments/README.md#getconnectortask)~~ - Read a specific task of the connector :warning: **Deprecated** +- ~~[`paymentsListConnectorTasks`](docs/sdks/payments/README.md#listconnectortasks)~~ - List tasks from a connector :warning: **Deprecated** +- ~~[`paymentsReadConnectorConfig`](docs/sdks/payments/README.md#readconnectorconfig)~~ - Read the config of a connector :warning: **Deprecated** +- ~~[`paymentsResetConnector`](docs/sdks/payments/README.md#resetconnector)~~ - Reset a connector :warning: **Deprecated** +- ~~[`paymentsUninstallConnector`](docs/sdks/payments/README.md#uninstallconnector)~~ - Uninstall a connector :warning: **Deprecated** @@ -789,7 +790,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions({ + const result = await sdk.getOIDCWellKnowns({ retries: { strategy: "backoff", backoff: { @@ -832,7 +833,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions(); + const result = await sdk.getOIDCWellKnowns(); // Handle the result console.log(result); diff --git a/RELEASES.md b/RELEASES.md index 4ecc4e90..ad365b9b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -236,4 +236,14 @@ Based on: ### Generated - [typescript v3.3.0] . ### Releases -- [NPM v3.3.0] https://www.npmjs.com/package/@formance/formance-sdk/v/3.3.0 - . \ No newline at end of file +- [NPM v3.3.0] https://www.npmjs.com/package/@formance/formance-sdk/v/3.3.0 - . + +## 2025-01-28 00:22:49 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.476.2 (2.495.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v3.4.0] . +### Releases +- [NPM v3.4.0] https://www.npmjs.com/package/@formance/formance-sdk/v/3.4.0 - . \ No newline at end of file diff --git a/RUNTIMES.md b/RUNTIMES.md index d08a0c07..db7ea942 100644 --- a/RUNTIMES.md +++ b/RUNTIMES.md @@ -1,6 +1,6 @@ # Supported JavaScript runtimes -This SDK is intended to be used in JavaScript runtimes that support the following features: +This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: * [Web Fetch API][web-fetch] * [Web Streams API][web-streams] and in particular `ReadableStream` @@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are: - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming]) [deno-file-streaming]: https://github.com/denoland/deno/issues/11018 + +## Recommended TypeScript compiler options + +The following `tsconfig.json` options are recommended for projects using this +SDK in order to get static type support for features like async iterables, +streams and `fetch`-related APIs ([`for await...of`][for-await-of], +[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and +so on): + +[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of +[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal +[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request +[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response + +```jsonc +{ + "compilerOptions": { + "target": "es2020", // or higher + "lib": ["es2020", "dom", "dom.iterable"], + } +} +``` + +While `target` can be set to older ECMAScript versions, it may result in extra, +unnecessary compatibility code being generated if you are not targeting old +runtimes. \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 7bda20ed..5df609c4 100644 --- a/USAGE.md +++ b/USAGE.md @@ -10,7 +10,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.getVersions(); + const result = await sdk.getOIDCWellKnowns(); // Handle the result console.log(result); diff --git a/docs/sdk/models/errors/errorcode.md b/docs/sdk/models/errors/errorcode.md index 55afa8d8..9fb563d7 100644 --- a/docs/sdk/models/errors/errorcode.md +++ b/docs/sdk/models/errors/errorcode.md @@ -5,7 +5,7 @@ ```typescript import { ErrorCode } from "@formance/formance-sdk/sdk/models/errors"; -let value: ErrorCode = ErrorCode.Validation; +let value: ErrorCode = ErrorCode.NotFound; ``` ## Values diff --git a/docs/sdk/models/errors/schemaswalletserrorresponseerrorcode.md b/docs/sdk/models/errors/schemaswalletserrorresponseerrorcode.md index ebca6480..20783604 100644 --- a/docs/sdk/models/errors/schemaswalletserrorresponseerrorcode.md +++ b/docs/sdk/models/errors/schemaswalletserrorresponseerrorcode.md @@ -6,7 +6,7 @@ import { SchemasWalletsErrorResponseErrorCode } from "@formance/formance-sdk/sdk/models/errors"; let value: SchemasWalletsErrorResponseErrorCode = - SchemasWalletsErrorResponseErrorCode.InsufficientFund; + SchemasWalletsErrorResponseErrorCode.Validation; ``` ## Values diff --git a/docs/sdk/models/operations/activateconfigresponse.md b/docs/sdk/models/operations/activateconfigresponse.md index a0c27d3a..4c5005c1 100644 --- a/docs/sdk/models/operations/activateconfigresponse.md +++ b/docs/sdk/models/operations/activateconfigresponse.md @@ -9,19 +9,19 @@ let value: ActivateConfigResponse = { configResponse: { data: { active: true, - createdAt: new Date("2022-04-30T08:36:14.207Z"), + createdAt: new Date("2025-06-01T13:39:37.646Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "4fa86c2f-d90b-4e85-a1ce-1c0f984e4dfc", + id: "b8e7dd3c-0538-4b18-9f3a-907b0e803f91", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-03-14T10:01:02.770Z"), + updatedAt: new Date("2024-05-15T13:07:55.829Z"), }, }, contentType: "", - statusCode: 303, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/addaccounttopoolresponse.md b/docs/sdk/models/operations/addaccounttopoolresponse.md index 8fe8f9da..f3f0785d 100644 --- a/docs/sdk/models/operations/addaccounttopoolresponse.md +++ b/docs/sdk/models/operations/addaccounttopoolresponse.md @@ -7,7 +7,7 @@ import { AddAccountToPoolResponse } from "@formance/formance-sdk/sdk/models/oper let value: AddAccountToPoolResponse = { contentType: "", - statusCode: 408, + statusCode: 306, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/changeconfigsecretresponse.md b/docs/sdk/models/operations/changeconfigsecretresponse.md index f8837a9a..aa5a4608 100644 --- a/docs/sdk/models/operations/changeconfigsecretresponse.md +++ b/docs/sdk/models/operations/changeconfigsecretresponse.md @@ -9,19 +9,19 @@ let value: ChangeConfigSecretResponse = { configResponse: { data: { active: true, - createdAt: new Date("2022-08-11T06:20:49.442Z"), + createdAt: new Date("2024-06-20T10:43:11.807Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "6527480e-d8df-41af-9f92-903f5a4fb5c1", + id: "39c39afc-d72f-4271-bffb-5442825ab06a", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-08-31T10:55:17.874Z"), + updatedAt: new Date("2024-06-04T22:56:35.057Z"), }, }, contentType: "", - statusCode: 402, + statusCode: 502, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/confirmholdresponse.md b/docs/sdk/models/operations/confirmholdresponse.md index 31f237af..b0affe44 100644 --- a/docs/sdk/models/operations/confirmholdresponse.md +++ b/docs/sdk/models/operations/confirmholdresponse.md @@ -7,7 +7,7 @@ import { ConfirmHoldResponse } from "@formance/formance-sdk/sdk/models/operation let value: ConfirmHoldResponse = { contentType: "", - statusCode: 411, + statusCode: 505, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/connectorstransferrequest.md b/docs/sdk/models/operations/connectorstransferrequest.md index 059d0202..9f1795ae 100644 --- a/docs/sdk/models/operations/connectorstransferrequest.md +++ b/docs/sdk/models/operations/connectorstransferrequest.md @@ -13,7 +13,7 @@ let value: ConnectorsTransferRequest = { destination: "acct_1Gqj58KZcSIg2N2q", source: "acct_1Gqj58KZcSIg2N2q", }, - connector: Connector.CurrencyCloud, + connector: Connector.Moneycorp, }; ``` diff --git a/docs/sdk/models/operations/connectorstransferresponse.md b/docs/sdk/models/operations/connectorstransferresponse.md index 6b74a7d2..cc16844b 100644 --- a/docs/sdk/models/operations/connectorstransferresponse.md +++ b/docs/sdk/models/operations/connectorstransferresponse.md @@ -7,7 +7,7 @@ import { ConnectorsTransferResponse } from "@formance/formance-sdk/sdk/models/op let value: ConnectorsTransferResponse = { contentType: "", - statusCode: 103, + statusCode: 203, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createaccountresponse.md b/docs/sdk/models/operations/createaccountresponse.md index fb89ced1..9d8fba79 100644 --- a/docs/sdk/models/operations/createaccountresponse.md +++ b/docs/sdk/models/operations/createaccountresponse.md @@ -7,7 +7,7 @@ import { CreateAccountResponse } from "@formance/formance-sdk/sdk/models/operati let value: CreateAccountResponse = { contentType: "", - statusCode: 102, + statusCode: 103, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createbalanceresponse.md b/docs/sdk/models/operations/createbalanceresponse.md index 61a20ada..6cc59a2e 100644 --- a/docs/sdk/models/operations/createbalanceresponse.md +++ b/docs/sdk/models/operations/createbalanceresponse.md @@ -7,7 +7,7 @@ import { CreateBalanceResponse } from "@formance/formance-sdk/sdk/models/operati let value: CreateBalanceResponse = { contentType: "", - statusCode: 205, + statusCode: 303, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createbankaccountresponse.md b/docs/sdk/models/operations/createbankaccountresponse.md index 4daf693b..14d15b37 100644 --- a/docs/sdk/models/operations/createbankaccountresponse.md +++ b/docs/sdk/models/operations/createbankaccountresponse.md @@ -7,7 +7,7 @@ import { CreateBankAccountResponse } from "@formance/formance-sdk/sdk/models/ope let value: CreateBankAccountResponse = { contentType: "", - statusCode: 424, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createclientresponse.md b/docs/sdk/models/operations/createclientresponse.md index d1b07edf..77c8c94e 100644 --- a/docs/sdk/models/operations/createclientresponse.md +++ b/docs/sdk/models/operations/createclientresponse.md @@ -7,7 +7,7 @@ import { CreateClientResponse } from "@formance/formance-sdk/sdk/models/operatio let value: CreateClientResponse = { contentType: "", - statusCode: 415, + statusCode: 308, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createpaymentresponse.md b/docs/sdk/models/operations/createpaymentresponse.md index 1f92f315..c1ecf52e 100644 --- a/docs/sdk/models/operations/createpaymentresponse.md +++ b/docs/sdk/models/operations/createpaymentresponse.md @@ -13,16 +13,16 @@ let value: CreatePaymentResponse = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2022-10-12T07:51:04.077Z"), + createdAt: new Date("2025-05-03T10:48:13.302Z"), raw: {}, reference: "", - status: PaymentStatus.Expired, + status: PaymentStatus.DisputeWon, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2023-10-07T00:13:14.895Z"), + createdAt: new Date("2023-10-12T07:51:04.077Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -31,13 +31,13 @@ let value: CreatePaymentResponse = { }, raw: {}, reference: "", - scheme: PaymentScheme.Discover, + scheme: PaymentScheme.Unionpay, sourceAccountID: "", - status: PaymentStatus.Expired, - type: PaymentType.PayIn, + status: PaymentStatus.RefundedFailure, + type: PaymentType.Payout, }, }, - statusCode: 300, + statusCode: 201, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createpolicyresponse.md b/docs/sdk/models/operations/createpolicyresponse.md index 28299029..5473fc0f 100644 --- a/docs/sdk/models/operations/createpolicyresponse.md +++ b/docs/sdk/models/operations/createpolicyresponse.md @@ -19,7 +19,7 @@ let value: CreatePolicyResponse = { paymentsPoolID: "XXX", }, }, - statusCode: 306, + statusCode: 203, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createpoolresponse.md b/docs/sdk/models/operations/createpoolresponse.md index f3578622..70463a00 100644 --- a/docs/sdk/models/operations/createpoolresponse.md +++ b/docs/sdk/models/operations/createpoolresponse.md @@ -7,7 +7,7 @@ import { CreatePoolResponse } from "@formance/formance-sdk/sdk/models/operations let value: CreatePoolResponse = { contentType: "", - statusCode: 402, + statusCode: 300, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createsecretresponse.md b/docs/sdk/models/operations/createsecretresponse.md index 5416e3f0..aea453ec 100644 --- a/docs/sdk/models/operations/createsecretresponse.md +++ b/docs/sdk/models/operations/createsecretresponse.md @@ -7,7 +7,7 @@ import { CreateSecretResponse } from "@formance/formance-sdk/sdk/models/operatio let value: CreateSecretResponse = { contentType: "", - statusCode: 305, + statusCode: 504, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/createtransactionresponse.md b/docs/sdk/models/operations/createtransactionresponse.md index fc41fcad..9e64f9dd 100644 --- a/docs/sdk/models/operations/createtransactionresponse.md +++ b/docs/sdk/models/operations/createtransactionresponse.md @@ -55,7 +55,7 @@ let value: CreateTransactionResponse = { }, }, reference: "ref:001", - timestamp: new Date("2024-10-31T08:20:58.047Z"), + timestamp: new Date("2025-10-31T08:20:58.047Z"), txid: BigInt("681820"), }, ], diff --git a/docs/sdk/models/operations/createtransactionsresponse.md b/docs/sdk/models/operations/createtransactionsresponse.md index 880567f4..9eb8de18 100644 --- a/docs/sdk/models/operations/createtransactionsresponse.md +++ b/docs/sdk/models/operations/createtransactionsresponse.md @@ -55,7 +55,7 @@ let value: CreateTransactionsResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-06-07T02:45:53.539Z"), + timestamp: new Date("2023-06-07T02:45:53.539Z"), txid: BigInt("944669"), }, ], diff --git a/docs/sdk/models/operations/createtransferinitiationresponse.md b/docs/sdk/models/operations/createtransferinitiationresponse.md index 58f98ae7..378765d1 100644 --- a/docs/sdk/models/operations/createtransferinitiationresponse.md +++ b/docs/sdk/models/operations/createtransferinitiationresponse.md @@ -8,27 +8,26 @@ import { TransferInitiationStatus, TransferInitiationType } from "@formance/form let value: CreateTransferInitiationResponse = { contentType: "", - statusCode: 302, + statusCode: 402, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), transferInitiationResponse: { data: { - amount: BigInt("577543"), + amount: BigInt("518835"), asset: "USD", connectorID: "", - createdAt: new Date("2024-11-17T12:56:04.551Z"), - description: - "continually suffice good-natured jell untrue disk finally helplessly", + createdAt: new Date("2023-12-03T06:19:58.290Z"), + description: "pleasure provided rotating than optimistic as by", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("232744"), + initialAmount: BigInt("16328"), reference: "", - scheduledAt: new Date("2023-11-05T10:52:46.701Z"), + scheduledAt: new Date("2023-07-23T00:21:03.899Z"), sourceAccountID: "", - status: TransferInitiationStatus.WaitingForValidation, - type: TransferInitiationType.Transfer, + status: TransferInitiationStatus.Rejected, + type: TransferInitiationType.Payout, }, }, }; diff --git a/docs/sdk/models/operations/createwalletresponse.md b/docs/sdk/models/operations/createwalletresponse.md index b4171a1b..61eb723a 100644 --- a/docs/sdk/models/operations/createwalletresponse.md +++ b/docs/sdk/models/operations/createwalletresponse.md @@ -7,7 +7,7 @@ import { CreateWalletResponse } from "@formance/formance-sdk/sdk/models/operatio let value: CreateWalletResponse = { contentType: "", - statusCode: 508, + statusCode: 511, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/creditwalletrequest.md b/docs/sdk/models/operations/creditwalletrequest.md index 45d9d991..62643985 100644 --- a/docs/sdk/models/operations/creditwalletrequest.md +++ b/docs/sdk/models/operations/creditwalletrequest.md @@ -14,12 +14,7 @@ let value: CreditWalletRequest = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, id: "", }; diff --git a/docs/sdk/models/operations/creditwalletresponse.md b/docs/sdk/models/operations/creditwalletresponse.md index 1a8eef7c..4bacf6dd 100644 --- a/docs/sdk/models/operations/creditwalletresponse.md +++ b/docs/sdk/models/operations/creditwalletresponse.md @@ -7,7 +7,7 @@ import { CreditWalletResponse } from "@formance/formance-sdk/sdk/models/operatio let value: CreditWalletResponse = { contentType: "", - statusCode: 429, + statusCode: 504, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deactivateconfigresponse.md b/docs/sdk/models/operations/deactivateconfigresponse.md index 9905b799..93de460b 100644 --- a/docs/sdk/models/operations/deactivateconfigresponse.md +++ b/docs/sdk/models/operations/deactivateconfigresponse.md @@ -9,19 +9,19 @@ let value: DeactivateConfigResponse = { configResponse: { data: { active: true, - createdAt: new Date("2023-03-12T03:22:02.972Z"), + createdAt: new Date("2023-01-15T19:19:58.868Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "485b0a34-cf5d-41ac-926e-1096ce4679fb", + id: "74d34cb8-b600-4810-8fd2-0f42b14fa86c", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-10-17T02:08:42.808Z"), + updatedAt: new Date("2025-11-26T04:51:12.762Z"), }, }, contentType: "", - statusCode: 501, + statusCode: 506, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/debitwalletresponse.md b/docs/sdk/models/operations/debitwalletresponse.md index daee5a27..55344bac 100644 --- a/docs/sdk/models/operations/debitwalletresponse.md +++ b/docs/sdk/models/operations/debitwalletresponse.md @@ -7,7 +7,7 @@ import { DebitWalletResponse } from "@formance/formance-sdk/sdk/models/operation let value: DebitWalletResponse = { contentType: "", - statusCode: 405, + statusCode: 508, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deleteclientresponse.md b/docs/sdk/models/operations/deleteclientresponse.md index 6cb376dc..aa654ebc 100644 --- a/docs/sdk/models/operations/deleteclientresponse.md +++ b/docs/sdk/models/operations/deleteclientresponse.md @@ -7,7 +7,7 @@ import { DeleteClientResponse } from "@formance/formance-sdk/sdk/models/operatio let value: DeleteClientResponse = { contentType: "", - statusCode: 308, + statusCode: 415, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deleteconfigresponse.md b/docs/sdk/models/operations/deleteconfigresponse.md index 421f131e..109baaa6 100644 --- a/docs/sdk/models/operations/deleteconfigresponse.md +++ b/docs/sdk/models/operations/deleteconfigresponse.md @@ -7,7 +7,7 @@ import { DeleteConfigResponse } from "@formance/formance-sdk/sdk/models/operatio let value: DeleteConfigResponse = { contentType: "", - statusCode: 429, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deletepolicyresponse.md b/docs/sdk/models/operations/deletepolicyresponse.md index cd11a1dd..cd85dad5 100644 --- a/docs/sdk/models/operations/deletepolicyresponse.md +++ b/docs/sdk/models/operations/deletepolicyresponse.md @@ -7,7 +7,7 @@ import { DeletePolicyResponse } from "@formance/formance-sdk/sdk/models/operatio let value: DeletePolicyResponse = { contentType: "", - statusCode: 304, + statusCode: 204, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deletepoolresponse.md b/docs/sdk/models/operations/deletepoolresponse.md index fa584c2e..a681d00e 100644 --- a/docs/sdk/models/operations/deletepoolresponse.md +++ b/docs/sdk/models/operations/deletepoolresponse.md @@ -7,7 +7,7 @@ import { DeletePoolResponse } from "@formance/formance-sdk/sdk/models/operations let value: DeletePoolResponse = { contentType: "", - statusCode: 300, + statusCode: 103, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deletesecretresponse.md b/docs/sdk/models/operations/deletesecretresponse.md index 27ae2c8a..2194050b 100644 --- a/docs/sdk/models/operations/deletesecretresponse.md +++ b/docs/sdk/models/operations/deletesecretresponse.md @@ -7,7 +7,7 @@ import { DeleteSecretResponse } from "@formance/formance-sdk/sdk/models/operatio let value: DeleteSecretResponse = { contentType: "", - statusCode: 504, + statusCode: 308, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/deletetransferinitiationresponse.md b/docs/sdk/models/operations/deletetransferinitiationresponse.md index 49bf4559..2acd7413 100644 --- a/docs/sdk/models/operations/deletetransferinitiationresponse.md +++ b/docs/sdk/models/operations/deletetransferinitiationresponse.md @@ -7,7 +7,7 @@ import { DeleteTransferInitiationResponse } from "@formance/formance-sdk/sdk/mod let value: DeleteTransferInitiationResponse = { contentType: "", - statusCode: 202, + statusCode: 504, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/forwardbankaccountresponse.md b/docs/sdk/models/operations/forwardbankaccountresponse.md index 35fa9e6a..ee974c50 100644 --- a/docs/sdk/models/operations/forwardbankaccountresponse.md +++ b/docs/sdk/models/operations/forwardbankaccountresponse.md @@ -7,7 +7,7 @@ import { ForwardBankAccountResponse } from "@formance/formance-sdk/sdk/models/op let value: ForwardBankAccountResponse = { contentType: "", - statusCode: 201, + statusCode: 202, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getaccountbalancesresponse.md b/docs/sdk/models/operations/getaccountbalancesresponse.md index 33e3029c..8acbf794 100644 --- a/docs/sdk/models/operations/getaccountbalancesresponse.md +++ b/docs/sdk/models/operations/getaccountbalancesresponse.md @@ -12,10 +12,10 @@ let value: GetAccountBalancesResponse = { { accountId: "", asset: "", - balance: BigInt("12036"), - createdAt: new Date("2022-05-07T13:41:56.227Z"), - currency: "Cordoba Oro", - lastUpdatedAt: new Date("2024-12-03T18:50:07.520Z"), + balance: BigInt("614465"), + createdAt: new Date("2023-02-06T05:59:38.595Z"), + currency: "Lek", + lastUpdatedAt: new Date("2024-04-14T23:02:33.664Z"), }, ], hasMore: false, @@ -25,7 +25,7 @@ let value: GetAccountBalancesResponse = { }, }, contentType: "", - statusCode: 504, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getbalanceresponse.md b/docs/sdk/models/operations/getbalanceresponse.md index 676c79c8..08bbb0a9 100644 --- a/docs/sdk/models/operations/getbalanceresponse.md +++ b/docs/sdk/models/operations/getbalanceresponse.md @@ -7,7 +7,7 @@ import { GetBalanceResponse } from "@formance/formance-sdk/sdk/models/operations let value: GetBalanceResponse = { contentType: "", - statusCode: 301, + statusCode: 407, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getbankaccountresponse.md b/docs/sdk/models/operations/getbankaccountresponse.md index c9114554..35ec2a15 100644 --- a/docs/sdk/models/operations/getbankaccountresponse.md +++ b/docs/sdk/models/operations/getbankaccountresponse.md @@ -7,7 +7,7 @@ import { GetBankAccountResponse } from "@formance/formance-sdk/sdk/models/operat let value: GetBankAccountResponse = { contentType: "", - statusCode: 102, + statusCode: 202, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getconnectortaskrequest.md b/docs/sdk/models/operations/getconnectortaskrequest.md index d873546b..4be6563e 100644 --- a/docs/sdk/models/operations/getconnectortaskrequest.md +++ b/docs/sdk/models/operations/getconnectortaskrequest.md @@ -7,7 +7,7 @@ import { GetConnectorTaskRequest } from "@formance/formance-sdk/sdk/models/opera import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: GetConnectorTaskRequest = { - connector: Connector.BankingCircle, + connector: Connector.DummyPay, taskId: "task1", }; ``` diff --git a/docs/sdk/models/operations/getconnectortaskresponse.md b/docs/sdk/models/operations/getconnectortaskresponse.md index 9e279f0f..14db1b09 100644 --- a/docs/sdk/models/operations/getconnectortaskresponse.md +++ b/docs/sdk/models/operations/getconnectortaskresponse.md @@ -7,7 +7,7 @@ import { GetConnectorTaskResponse } from "@formance/formance-sdk/sdk/models/oper let value: GetConnectorTaskResponse = { contentType: "", - statusCode: 500, + statusCode: 100, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getconnectortaskv1request.md b/docs/sdk/models/operations/getconnectortaskv1request.md index be237807..b77d45e1 100644 --- a/docs/sdk/models/operations/getconnectortaskv1request.md +++ b/docs/sdk/models/operations/getconnectortaskv1request.md @@ -7,7 +7,7 @@ import { GetConnectorTaskV1Request } from "@formance/formance-sdk/sdk/models/ope import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: GetConnectorTaskV1Request = { - connector: Connector.Atlar, + connector: Connector.Mangopay, connectorId: "XXX", taskId: "task1", }; diff --git a/docs/sdk/models/operations/getconnectortaskv1response.md b/docs/sdk/models/operations/getconnectortaskv1response.md index 5339c61f..ae044716 100644 --- a/docs/sdk/models/operations/getconnectortaskv1response.md +++ b/docs/sdk/models/operations/getconnectortaskv1response.md @@ -7,7 +7,7 @@ import { GetConnectorTaskV1Response } from "@formance/formance-sdk/sdk/models/op let value: GetConnectorTaskV1Response = { contentType: "", - statusCode: 202, + statusCode: 511, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getholdresponse.md b/docs/sdk/models/operations/getholdresponse.md index fc0a9338..2e3d80d4 100644 --- a/docs/sdk/models/operations/getholdresponse.md +++ b/docs/sdk/models/operations/getholdresponse.md @@ -9,8 +9,8 @@ let value: GetHoldResponse = { contentType: "", getHoldResponse: { data: { - description: "crazy ferret shabby shocked pluck", - id: "7da66c53-0ee1-4521-be0f-1d955c5a87e8", + description: "tepid gratefully whoa antelope", + id: "a66cbf5e-c594-4d13-826b-870613e3dc29", metadata: { "key": "", }, @@ -19,7 +19,7 @@ let value: GetHoldResponse = { walletID: "", }, }, - statusCode: 401, + statusCode: 418, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getholdsresponse.md b/docs/sdk/models/operations/getholdsresponse.md index 49eddb7a..e7936fd0 100644 --- a/docs/sdk/models/operations/getholdsresponse.md +++ b/docs/sdk/models/operations/getholdsresponse.md @@ -12,8 +12,8 @@ let value: GetHoldsResponse = { data: [ { description: - "uh-huh bathrobe submissive meh nor mmm elevator utter heavily", - id: "38b18f3a-907b-40e8-a03f-914706739c39", + "contravene jaggedly programme ecliptic make woot saw husband powerless", + id: "66c530ee-1521-4e0f-b1d9-55c5a87e8db0", metadata: { "key": "", }, @@ -26,7 +26,7 @@ let value: GetHoldsResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 508, + statusCode: 226, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getinstancestagehistoryresponse.md b/docs/sdk/models/operations/getinstancestagehistoryresponse.md index f1c9b6af..9e8acf59 100644 --- a/docs/sdk/models/operations/getinstancestagehistoryresponse.md +++ b/docs/sdk/models/operations/getinstancestagehistoryresponse.md @@ -51,12 +51,7 @@ let value: GetInstanceStageHistoryResponse = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { @@ -83,7 +78,7 @@ let value: GetInstanceStageHistoryResponse = { output: { createTransaction: { data: { - id: BigInt("31838"), + id: BigInt("704415"), metadata: { "admin": "true", }, @@ -97,7 +92,7 @@ let value: GetInstanceStageHistoryResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-06-30T12:06:54.333Z"), + timestamp: new Date("2023-02-04T21:29:28.328Z"), }, }, getAccount: { @@ -138,23 +133,23 @@ let value: GetInstanceStageHistoryResponse = { { absolute: false, amount: BigInt("100"), - date: new Date("2023-11-13T03:22:04.343Z"), + date: new Date("2023-06-30T12:06:54.333Z"), raw: {}, status: OrchestrationPaymentStatus.Failed, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2022-09-18T17:31:57.984Z"), + createdAt: new Date("2024-09-24T15:25:14.861Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: OrchestrationPaymentScheme.Unknown, + scheme: OrchestrationPaymentScheme.Discover, sourceAccountID: "", - status: OrchestrationPaymentStatus.Failed, + status: OrchestrationPaymentStatus.Cancelled, type: OrchestrationPaymentType.Transfer, }, }, @@ -162,8 +157,8 @@ let value: GetInstanceStageHistoryResponse = { cursor: { data: [ { - createdAt: new Date("2023-10-09T12:59:31.265Z"), - id: "b4632fb7-3406-44b6-a201-a78ef3a40c56", + createdAt: new Date("2024-08-10T01:17:06.903Z"), + id: "9b4632fb-7340-464b-9620-1a78ef3a40c5", ledger: "", metadata: { "key": "", @@ -179,7 +174,7 @@ let value: GetInstanceStageHistoryResponse = { }, revertTransaction: { data: { - id: BigInt("831049"), + id: BigInt("588317"), metadata: { "admin": "true", }, @@ -193,16 +188,16 @@ let value: GetInstanceStageHistoryResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-11-21T08:44:18.290Z"), + timestamp: new Date("2025-06-29T19:53:54.840Z"), }, }, }, - startedAt: new Date("2024-08-14T10:12:10.228Z"), + startedAt: new Date("2024-11-20T08:44:18.290Z"), terminated: false, }, ], }, - statusCode: 207, + statusCode: 503, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getmanyconfigsresponse.md b/docs/sdk/models/operations/getmanyconfigsresponse.md index 63cb079f..7ec1f7d7 100644 --- a/docs/sdk/models/operations/getmanyconfigsresponse.md +++ b/docs/sdk/models/operations/getmanyconfigsresponse.md @@ -11,22 +11,22 @@ let value: GetManyConfigsResponse = { data: [ { active: true, - createdAt: new Date("2023-12-30T11:21:48.918Z"), + createdAt: new Date("2025-09-27T23:01:52.690Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "635baedd-e456-48a4-8064-feda58d1c0dc", + id: "851ce1c0-f984-4e4d-bfc8-17736527480e", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2023-11-19T08:50:07.276Z"), + updatedAt: new Date("2024-08-28T15:05:57.733Z"), }, ], hasMore: false, }, }, contentType: "", - statusCode: 301, + statusCode: 511, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getoidcwellknownsresponse.md b/docs/sdk/models/operations/getoidcwellknownsresponse.md index 4e9c87bc..bff56960 100644 --- a/docs/sdk/models/operations/getoidcwellknownsresponse.md +++ b/docs/sdk/models/operations/getoidcwellknownsresponse.md @@ -7,7 +7,7 @@ import { GetOIDCWellKnownsResponse } from "@formance/formance-sdk/sdk/models/ope let value: GetOIDCWellKnownsResponse = { contentType: "", - statusCode: 415, + statusCode: 306, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getpaymentresponse.md b/docs/sdk/models/operations/getpaymentresponse.md index 7b9c3912..085f8def 100644 --- a/docs/sdk/models/operations/getpaymentresponse.md +++ b/docs/sdk/models/operations/getpaymentresponse.md @@ -13,16 +13,16 @@ let value: GetPaymentResponse = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2023-12-28T02:31:12.899Z"), + createdAt: new Date("2024-03-24T07:45:32.129Z"), raw: {}, reference: "", - status: PaymentStatus.Cancelled, + status: PaymentStatus.Succeeded, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2023-12-31T18:45:29.622Z"), + createdAt: new Date("2024-12-01T01:59:21.357Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -31,13 +31,13 @@ let value: GetPaymentResponse = { }, raw: {}, reference: "", - scheme: PaymentScheme.SepaCredit, + scheme: PaymentScheme.SepaDebit, sourceAccountID: "", - status: PaymentStatus.Expired, - type: PaymentType.Transfer, + status: PaymentStatus.Other, + type: PaymentType.PayIn, }, }, - statusCode: 207, + statusCode: 408, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getpolicyresponse.md b/docs/sdk/models/operations/getpolicyresponse.md index 6ae3f6c7..868e4f7d 100644 --- a/docs/sdk/models/operations/getpolicyresponse.md +++ b/docs/sdk/models/operations/getpolicyresponse.md @@ -19,7 +19,7 @@ let value: GetPolicyResponse = { paymentsPoolID: "XXX", }, }, - statusCode: 101, + statusCode: 408, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getpoolbalancesrequest.md b/docs/sdk/models/operations/getpoolbalancesrequest.md index b62e0e39..f70fdb19 100644 --- a/docs/sdk/models/operations/getpoolbalancesrequest.md +++ b/docs/sdk/models/operations/getpoolbalancesrequest.md @@ -6,7 +6,7 @@ import { GetPoolBalancesRequest } from "@formance/formance-sdk/sdk/models/operations"; let value: GetPoolBalancesRequest = { - at: new Date("2024-06-27T04:59:29.330Z"), + at: new Date("2023-09-27T16:26:45.665Z"), poolId: "XXX", }; ``` diff --git a/docs/sdk/models/operations/getpoolbalancesresponse.md b/docs/sdk/models/operations/getpoolbalancesresponse.md index f3624e71..f76e90c1 100644 --- a/docs/sdk/models/operations/getpoolbalancesresponse.md +++ b/docs/sdk/models/operations/getpoolbalancesresponse.md @@ -17,7 +17,7 @@ let value: GetPoolBalancesResponse = { ], }, }, - statusCode: 500, + statusCode: 415, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getpoolresponse.md b/docs/sdk/models/operations/getpoolresponse.md index 388b3d2c..74ea621b 100644 --- a/docs/sdk/models/operations/getpoolresponse.md +++ b/docs/sdk/models/operations/getpoolresponse.md @@ -7,7 +7,7 @@ import { GetPoolResponse } from "@formance/formance-sdk/sdk/models/operations"; let value: GetPoolResponse = { contentType: "", - statusCode: 303, + statusCode: 206, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getreconciliationresponse.md b/docs/sdk/models/operations/getreconciliationresponse.md index c3263a21..a51191e8 100644 --- a/docs/sdk/models/operations/getreconciliationresponse.md +++ b/docs/sdk/models/operations/getreconciliationresponse.md @@ -11,14 +11,14 @@ let value: GetReconciliationResponse = { data: { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("63553"), + "key": BigInt("524380"), }, id: "XXX", ledgerBalances: { - "key": BigInt("208253"), + "key": BigInt("117380"), }, paymentsBalances: { - "key": BigInt("932394"), + "key": BigInt("159845"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), @@ -26,7 +26,7 @@ let value: GetReconciliationResponse = { status: "COMPLETED", }, }, - statusCode: 208, + statusCode: 103, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getserverinforesponse.md b/docs/sdk/models/operations/getserverinforesponse.md index ce738945..3e439902 100644 --- a/docs/sdk/models/operations/getserverinforesponse.md +++ b/docs/sdk/models/operations/getserverinforesponse.md @@ -7,7 +7,7 @@ import { GetServerInfoResponse } from "@formance/formance-sdk/sdk/models/operati let value: GetServerInfoResponse = { contentType: "", - statusCode: 308, + statusCode: 305, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/gettransactionresponse.md b/docs/sdk/models/operations/gettransactionresponse.md index 731d1a90..2860fa44 100644 --- a/docs/sdk/models/operations/gettransactionresponse.md +++ b/docs/sdk/models/operations/gettransactionresponse.md @@ -54,7 +54,7 @@ let value: GetTransactionResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-08-17T22:17:39.092Z"), + timestamp: new Date("2023-08-17T22:17:39.092Z"), txid: BigInt("161309"), }, }, diff --git a/docs/sdk/models/operations/gettransactionsresponse.md b/docs/sdk/models/operations/gettransactionsresponse.md index 5c3a1d9a..963ccbf3 100644 --- a/docs/sdk/models/operations/gettransactionsresponse.md +++ b/docs/sdk/models/operations/gettransactionsresponse.md @@ -11,7 +11,7 @@ let value: GetTransactionsResponse = { cursor: { data: [ { - id: 848346, + id: 42924, metadata: { "key": "", }, @@ -52,7 +52,7 @@ let value: GetTransactionsResponse = { }, }, reference: "ref:001", - timestamp: new Date("2023-06-22T12:00:18.977Z"), + timestamp: new Date("2024-01-01T01:07:36.461Z"), }, ], hasMore: false, @@ -61,7 +61,7 @@ let value: GetTransactionsResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 103, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/gettransferinitiationresponse.md b/docs/sdk/models/operations/gettransferinitiationresponse.md index 2695ecc9..7e155d8a 100644 --- a/docs/sdk/models/operations/gettransferinitiationresponse.md +++ b/docs/sdk/models/operations/gettransferinitiationresponse.md @@ -8,27 +8,26 @@ import { TransferInitiationStatus, TransferInitiationType } from "@formance/form let value: GetTransferInitiationResponse = { contentType: "", - statusCode: 203, + statusCode: 304, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), transferInitiationResponse: { data: { - amount: BigInt("814967"), + amount: BigInt("287051"), asset: "USD", connectorID: "", - createdAt: new Date("2024-12-16T02:21:59.446Z"), - description: - "furthermore jaggedly hence runny knavishly egg keenly grave incidentally righteously", + createdAt: new Date("2025-02-13T09:44:27.866Z"), + description: "thoroughly boo dress gratefully wasteful however", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("879235"), + initialAmount: BigInt("152354"), reference: "", - scheduledAt: new Date("2023-08-19T20:54:27.100Z"), + scheduledAt: new Date("2024-04-02T13:33:41.769Z"), sourceAccountID: "", - status: TransferInitiationStatus.Failed, - type: TransferInitiationType.Transfer, + status: TransferInitiationStatus.Processing, + type: TransferInitiationType.Payout, }, }, }; diff --git a/docs/sdk/models/operations/getversionsresponse.md b/docs/sdk/models/operations/getversionsresponse.md index b80108cd..ba7e139b 100644 --- a/docs/sdk/models/operations/getversionsresponse.md +++ b/docs/sdk/models/operations/getversionsresponse.md @@ -7,7 +7,7 @@ import { GetVersionsResponse } from "@formance/formance-sdk/sdk/models/operation let value: GetVersionsResponse = { contentType: "", - statusCode: 306, + statusCode: 415, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getwalletresponse.md b/docs/sdk/models/operations/getwalletresponse.md index e648e2f9..3fc62839 100644 --- a/docs/sdk/models/operations/getwalletresponse.md +++ b/docs/sdk/models/operations/getwalletresponse.md @@ -7,7 +7,7 @@ import { GetWalletResponse } from "@formance/formance-sdk/sdk/models/operations" let value: GetWalletResponse = { contentType: "", - statusCode: 101, + statusCode: 503, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getwalletsummaryresponse.md b/docs/sdk/models/operations/getwalletsummaryresponse.md index 4b9eb345..1e37d4be 100644 --- a/docs/sdk/models/operations/getwalletsummaryresponse.md +++ b/docs/sdk/models/operations/getwalletsummaryresponse.md @@ -7,7 +7,7 @@ import { GetWalletSummaryResponse } from "@formance/formance-sdk/sdk/models/oper let value: GetWalletSummaryResponse = { contentType: "", - statusCode: 103, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/getworkflowresponse.md b/docs/sdk/models/operations/getworkflowresponse.md index 48c69ab0..0791e070 100644 --- a/docs/sdk/models/operations/getworkflowresponse.md +++ b/docs/sdk/models/operations/getworkflowresponse.md @@ -7,7 +7,7 @@ import { GetWorkflowResponse } from "@formance/formance-sdk/sdk/models/operation let value: GetWorkflowResponse = { contentType: "", - statusCode: 103, + statusCode: 405, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/insertconfigresponse.md b/docs/sdk/models/operations/insertconfigresponse.md index 4fafdabb..464fd37a 100644 --- a/docs/sdk/models/operations/insertconfigresponse.md +++ b/docs/sdk/models/operations/insertconfigresponse.md @@ -9,19 +9,19 @@ let value: InsertConfigResponse = { configResponse: { data: { active: true, - createdAt: new Date("2022-06-12T14:57:34.476Z"), + createdAt: new Date("2023-05-02T03:10:42.322Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "c9fff1f3-7c39-4211-b506-a61142f2c998", + id: "aff92903-f5a4-4fb5-bc16-3a16485b0a34", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2023-02-03T18:34:22.670Z"), + updatedAt: new Date("2025-11-13T07:16:15.727Z"), }, }, contentType: "", - statusCode: 416, + statusCode: 208, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/installconnectorrequest.md b/docs/sdk/models/operations/installconnectorrequest.md index a5faaa4e..b64a5751 100644 --- a/docs/sdk/models/operations/installconnectorrequest.md +++ b/docs/sdk/models/operations/installconnectorrequest.md @@ -9,12 +9,12 @@ import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: InstallConnectorRequest = { connectorConfig: { apiKey: "XXX", - clientID: "XXX", endpoint: "XXX", - name: "My Moneycorp Account", + loginID: "XXX", + name: "My CurrencyCloud Account", pollingPeriod: "60s", }, - connector: Connector.Stripe, + connector: Connector.Adyen, }; ``` diff --git a/docs/sdk/models/operations/installconnectorresponse.md b/docs/sdk/models/operations/installconnectorresponse.md index 00aa27cc..8be4db5e 100644 --- a/docs/sdk/models/operations/installconnectorresponse.md +++ b/docs/sdk/models/operations/installconnectorresponse.md @@ -7,7 +7,7 @@ import { InstallConnectorResponse } from "@formance/formance-sdk/sdk/models/oper let value: InstallConnectorResponse = { contentType: "", - statusCode: 205, + statusCode: 506, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listallconnectorsresponse.md b/docs/sdk/models/operations/listallconnectorsresponse.md index 6e005b2e..1a33b713 100644 --- a/docs/sdk/models/operations/listallconnectorsresponse.md +++ b/docs/sdk/models/operations/listallconnectorsresponse.md @@ -7,7 +7,7 @@ import { ListAllConnectorsResponse } from "@formance/formance-sdk/sdk/models/ope let value: ListAllConnectorsResponse = { contentType: "", - statusCode: 500, + statusCode: 205, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listbalancesresponse.md b/docs/sdk/models/operations/listbalancesresponse.md index 75349a45..b2ecd052 100644 --- a/docs/sdk/models/operations/listbalancesresponse.md +++ b/docs/sdk/models/operations/listbalancesresponse.md @@ -20,7 +20,7 @@ let value: ListBalancesResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 507, + statusCode: 501, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listbankaccountsresponse.md b/docs/sdk/models/operations/listbankaccountsresponse.md index 8050c7e5..df271c52 100644 --- a/docs/sdk/models/operations/listbankaccountsresponse.md +++ b/docs/sdk/models/operations/listbankaccountsresponse.md @@ -11,8 +11,8 @@ let value: ListBankAccountsResponse = { data: [ { connectorID: "", - country: "Hungary", - createdAt: new Date("2022-01-27T15:32:03.858Z"), + country: "Tokelau", + createdAt: new Date("2024-03-21T18:42:50.144Z"), id: "", name: "", }, @@ -24,7 +24,7 @@ let value: ListBankAccountsResponse = { }, }, contentType: "", - statusCode: 206, + statusCode: 302, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listconfigsavailableconnectorsresponse.md b/docs/sdk/models/operations/listconfigsavailableconnectorsresponse.md index 38997d72..0f93e632 100644 --- a/docs/sdk/models/operations/listconfigsavailableconnectorsresponse.md +++ b/docs/sdk/models/operations/listconfigsavailableconnectorsresponse.md @@ -7,7 +7,7 @@ import { ListConfigsAvailableConnectorsResponse } from "@formance/formance-sdk/s let value: ListConfigsAvailableConnectorsResponse = { contentType: "", - statusCode: 202, + statusCode: 303, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listconnectortasksrequest.md b/docs/sdk/models/operations/listconnectortasksrequest.md index 01c1f6e8..a7756c7e 100644 --- a/docs/sdk/models/operations/listconnectortasksrequest.md +++ b/docs/sdk/models/operations/listconnectortasksrequest.md @@ -7,7 +7,7 @@ import { ListConnectorTasksRequest } from "@formance/formance-sdk/sdk/models/ope import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: ListConnectorTasksRequest = { - connector: Connector.DummyPay, + connector: Connector.Wise, cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", pageSize: 100, }; diff --git a/docs/sdk/models/operations/listconnectortasksresponse.md b/docs/sdk/models/operations/listconnectortasksresponse.md index b99d892f..8c7e2d79 100644 --- a/docs/sdk/models/operations/listconnectortasksresponse.md +++ b/docs/sdk/models/operations/listconnectortasksresponse.md @@ -8,7 +8,7 @@ import { PaymentStatus } from "@formance/formance-sdk/sdk/models/shared"; let value: ListConnectorTasksResponse = { contentType: "", - statusCode: 306, + statusCode: 302, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), @@ -17,12 +17,12 @@ let value: ListConnectorTasksResponse = { data: [ { connectorID: "", - createdAt: new Date("2024-11-05T22:50:25.041Z"), + createdAt: new Date("2024-07-29T08:49:21.047Z"), descriptor: {}, - id: "0a99f0bd-85c1-478b-b136-9e92fd8e8edf", + id: "c5ed0471-5ba9-4b35-9ae8-40b058e16059", state: {}, - status: PaymentStatus.Pending, - updatedAt: new Date("2022-07-11T13:12:10.070Z"), + status: PaymentStatus.Cancelled, + updatedAt: new Date("2023-05-07T19:27:28.258Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/operations/listconnectortasksv1request.md b/docs/sdk/models/operations/listconnectortasksv1request.md index 5fc861ca..3fb8a272 100644 --- a/docs/sdk/models/operations/listconnectortasksv1request.md +++ b/docs/sdk/models/operations/listconnectortasksv1request.md @@ -7,7 +7,7 @@ import { ListConnectorTasksV1Request } from "@formance/formance-sdk/sdk/models/o import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: ListConnectorTasksV1Request = { - connector: Connector.CurrencyCloud, + connector: Connector.Mangopay, connectorId: "XXX", cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", pageSize: 100, diff --git a/docs/sdk/models/operations/listconnectortasksv1response.md b/docs/sdk/models/operations/listconnectortasksv1response.md index bd4a4e9b..4c42e159 100644 --- a/docs/sdk/models/operations/listconnectortasksv1response.md +++ b/docs/sdk/models/operations/listconnectortasksv1response.md @@ -8,7 +8,7 @@ import { PaymentStatus } from "@formance/formance-sdk/sdk/models/shared"; let value: ListConnectorTasksV1Response = { contentType: "", - statusCode: 503, + statusCode: 421, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), @@ -17,12 +17,12 @@ let value: ListConnectorTasksV1Response = { data: [ { connectorID: "", - createdAt: new Date("2024-08-29T09:21:28.573Z"), + createdAt: new Date("2023-01-03T23:06:19.217Z"), descriptor: {}, - id: "7e2a71b3-000e-4bea-a84f-576f25a19743", + id: "a99f0bd8-5c17-48b1-8369-e92fd8e8edfe", state: {}, - status: PaymentStatus.Expired, - updatedAt: new Date("2023-05-16T08:17:57.191Z"), + status: PaymentStatus.Succeeded, + updatedAt: new Date("2024-03-02T11:47:54.767Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/operations/listinstancesresponse.md b/docs/sdk/models/operations/listinstancesresponse.md index 550ff74b..256ca756 100644 --- a/docs/sdk/models/operations/listinstancesresponse.md +++ b/docs/sdk/models/operations/listinstancesresponse.md @@ -7,7 +7,7 @@ import { ListInstancesResponse } from "@formance/formance-sdk/sdk/models/operati let value: ListInstancesResponse = { contentType: "", - statusCode: 406, + statusCode: 507, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listlogsresponse.md b/docs/sdk/models/operations/listlogsresponse.md index eb6829f7..46517555 100644 --- a/docs/sdk/models/operations/listlogsresponse.md +++ b/docs/sdk/models/operations/listlogsresponse.md @@ -15,7 +15,7 @@ let value: ListLogsResponse = { data: { "key": "", }, - date: new Date("2023-05-27T01:50:18.849Z"), + date: new Date("2024-05-26T01:50:18.849Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: 1234, diff --git a/docs/sdk/models/operations/listpaymentsresponse.md b/docs/sdk/models/operations/listpaymentsresponse.md index f1cf72c1..c47386e0 100644 --- a/docs/sdk/models/operations/listpaymentsresponse.md +++ b/docs/sdk/models/operations/listpaymentsresponse.md @@ -15,16 +15,16 @@ let value: ListPaymentsResponse = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2023-01-05T21:00:18.180Z"), + createdAt: new Date("2025-11-09T13:09:41.435Z"), raw: {}, reference: "", - status: PaymentStatus.Other, + status: PaymentStatus.Failed, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2022-05-27T05:59:26.925Z"), + createdAt: new Date("2023-06-25T20:56:27.257Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -33,10 +33,10 @@ let value: ListPaymentsResponse = { }, raw: {}, reference: "", - scheme: PaymentScheme.Visa, + scheme: PaymentScheme.AchDebit, sourceAccountID: "", - status: PaymentStatus.Failed, - type: PaymentType.Transfer, + status: PaymentStatus.Expired, + type: PaymentType.Other, }, ], hasMore: false, @@ -45,7 +45,7 @@ let value: ListPaymentsResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 411, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listpoliciesresponse.md b/docs/sdk/models/operations/listpoliciesresponse.md index 89e6eeda..94529df8 100644 --- a/docs/sdk/models/operations/listpoliciesresponse.md +++ b/docs/sdk/models/operations/listpoliciesresponse.md @@ -27,7 +27,7 @@ let value: ListPoliciesResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 501, + statusCode: 100, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listpoolsresponse.md b/docs/sdk/models/operations/listpoolsresponse.md index 47110fce..acfc73d6 100644 --- a/docs/sdk/models/operations/listpoolsresponse.md +++ b/docs/sdk/models/operations/listpoolsresponse.md @@ -24,7 +24,7 @@ let value: ListPoolsResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 503, + statusCode: 300, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listreconciliationsresponse.md b/docs/sdk/models/operations/listreconciliationsresponse.md index 4e65abc5..9d95d4c8 100644 --- a/docs/sdk/models/operations/listreconciliationsresponse.md +++ b/docs/sdk/models/operations/listreconciliationsresponse.md @@ -13,14 +13,14 @@ let value: ListReconciliationsResponse = { { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("605712"), + "key": BigInt("612867"), }, id: "XXX", ledgerBalances: { - "key": BigInt("115661"), + "key": BigInt("81369"), }, paymentsBalances: { - "key": BigInt("727888"), + "key": BigInt("881897"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), @@ -34,7 +34,7 @@ let value: ListReconciliationsResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 425, + statusCode: 451, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listtransactionsresponse.md b/docs/sdk/models/operations/listtransactionsresponse.md index 909f0101..bcd3e4f8 100644 --- a/docs/sdk/models/operations/listtransactionsresponse.md +++ b/docs/sdk/models/operations/listtransactionsresponse.md @@ -56,7 +56,7 @@ let value: ListTransactionsResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-08-04T10:54:08.790Z"), + timestamp: new Date("2023-08-04T10:54:08.790Z"), txid: BigInt("368725"), }, ], diff --git a/docs/sdk/models/operations/listtransferinitiationsresponse.md b/docs/sdk/models/operations/listtransferinitiationsresponse.md index 67c5273b..6a7c45fd 100644 --- a/docs/sdk/models/operations/listtransferinitiationsresponse.md +++ b/docs/sdk/models/operations/listtransferinitiationsresponse.md @@ -8,7 +8,7 @@ import { TransferInitiationStatus, TransferInitiationType } from "@formance/form let value: ListTransferInitiationsResponse = { contentType: "", - statusCode: 418, + statusCode: 407, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), @@ -16,21 +16,20 @@ let value: ListTransferInitiationsResponse = { cursor: { data: [ { - amount: BigInt("813054"), + amount: BigInt("39615"), asset: "USD", connectorID: "", - createdAt: new Date("2024-12-05T22:38:23.466Z"), - description: - "industrialize when till even woot foot whereas besides vice fuel", + createdAt: new Date("2023-03-07T16:46:29.356Z"), + description: "um platypus fund", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("190567"), + initialAmount: BigInt("456520"), reference: "", - scheduledAt: new Date("2022-01-21T23:00:31.300Z"), + scheduledAt: new Date("2024-01-05T21:00:18.180Z"), sourceAccountID: "", - status: TransferInitiationStatus.AskRetried, - type: TransferInitiationType.Payout, + status: TransferInitiationStatus.Reversed, + type: TransferInitiationType.Transfer, }, ], hasMore: false, diff --git a/docs/sdk/models/operations/listtriggersoccurrencesresponse.md b/docs/sdk/models/operations/listtriggersoccurrencesresponse.md index 683b05b0..c42bb776 100644 --- a/docs/sdk/models/operations/listtriggersoccurrencesresponse.md +++ b/docs/sdk/models/operations/listtriggersoccurrencesresponse.md @@ -7,7 +7,7 @@ import { ListTriggersOccurrencesResponse } from "@formance/formance-sdk/sdk/mode let value: ListTriggersOccurrencesResponse = { contentType: "", - statusCode: 202, + statusCode: 407, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listtriggersresponse.md b/docs/sdk/models/operations/listtriggersresponse.md index 1465b9b6..69a88126 100644 --- a/docs/sdk/models/operations/listtriggersresponse.md +++ b/docs/sdk/models/operations/listtriggersresponse.md @@ -7,7 +7,7 @@ import { ListTriggersResponse } from "@formance/formance-sdk/sdk/models/operatio let value: ListTriggersResponse = { contentType: "", - statusCode: 508, + statusCode: 226, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listwalletsresponse.md b/docs/sdk/models/operations/listwalletsresponse.md index 9e94c504..a3a7d8fc 100644 --- a/docs/sdk/models/operations/listwalletsresponse.md +++ b/docs/sdk/models/operations/listwalletsresponse.md @@ -11,8 +11,8 @@ let value: ListWalletsResponse = { cursor: { data: [ { - createdAt: new Date("2023-01-19T14:12:42.332Z"), - id: "442825ab-06ad-47f4-8074-d34cb8b60081", + createdAt: new Date("2023-09-07T04:32:30.698Z"), + id: "1b64b5bd-3f24-4257-b8de-3917557b1eb2", ledger: "", metadata: { "key": "", @@ -26,7 +26,7 @@ let value: ListWalletsResponse = { previous: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", }, }, - statusCode: 510, + statusCode: 308, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/listworkflowsresponse.md b/docs/sdk/models/operations/listworkflowsresponse.md index 5698ef31..f09b4834 100644 --- a/docs/sdk/models/operations/listworkflowsresponse.md +++ b/docs/sdk/models/operations/listworkflowsresponse.md @@ -7,7 +7,7 @@ import { ListWorkflowsResponse } from "@formance/formance-sdk/sdk/models/operati let value: ListWorkflowsResponse = { contentType: "", - statusCode: 300, + statusCode: 205, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/orchestrationgetserverinforesponse.md b/docs/sdk/models/operations/orchestrationgetserverinforesponse.md index e2b9fbc8..b7453cc5 100644 --- a/docs/sdk/models/operations/orchestrationgetserverinforesponse.md +++ b/docs/sdk/models/operations/orchestrationgetserverinforesponse.md @@ -7,7 +7,7 @@ import { OrchestrationgetServerInfoResponse } from "@formance/formance-sdk/sdk/m let value: OrchestrationgetServerInfoResponse = { contentType: "", - statusCode: 204, + statusCode: 100, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/paymentsgetaccountresponse.md b/docs/sdk/models/operations/paymentsgetaccountresponse.md index edfb6a23..871a0067 100644 --- a/docs/sdk/models/operations/paymentsgetaccountresponse.md +++ b/docs/sdk/models/operations/paymentsgetaccountresponse.md @@ -7,7 +7,7 @@ import { PaymentsgetAccountResponse } from "@formance/formance-sdk/sdk/models/op let value: PaymentsgetAccountResponse = { contentType: "", - statusCode: 202, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/paymentsgetserverinforesponse.md b/docs/sdk/models/operations/paymentsgetserverinforesponse.md index ec6e8317..39d1d6aa 100644 --- a/docs/sdk/models/operations/paymentsgetserverinforesponse.md +++ b/docs/sdk/models/operations/paymentsgetserverinforesponse.md @@ -7,7 +7,7 @@ import { PaymentsgetServerInfoResponse } from "@formance/formance-sdk/sdk/models let value: PaymentsgetServerInfoResponse = { contentType: "", - statusCode: 100, + statusCode: 305, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/paymentslistaccountsresponse.md b/docs/sdk/models/operations/paymentslistaccountsresponse.md index f0ca5f4f..b2e2f5c7 100644 --- a/docs/sdk/models/operations/paymentslistaccountsresponse.md +++ b/docs/sdk/models/operations/paymentslistaccountsresponse.md @@ -13,7 +13,7 @@ let value: PaymentslistAccountsResponse = { { accountName: "", connectorID: "", - createdAt: new Date("2022-08-31T15:36:43.644Z"), + createdAt: new Date("2024-03-11T09:26:29.319Z"), defaultAsset: "", defaultCurrency: "", id: "", @@ -22,7 +22,7 @@ let value: PaymentslistAccountsResponse = { }, raw: {}, reference: "", - type: AccountType.Unknown, + type: AccountType.External, }, ], hasMore: false, @@ -32,7 +32,7 @@ let value: PaymentslistAccountsResponse = { }, }, contentType: "", - statusCode: 200, + statusCode: 207, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/readconnectorconfigrequest.md b/docs/sdk/models/operations/readconnectorconfigrequest.md index 7af36a78..52ba3fd6 100644 --- a/docs/sdk/models/operations/readconnectorconfigrequest.md +++ b/docs/sdk/models/operations/readconnectorconfigrequest.md @@ -7,7 +7,7 @@ import { ReadConnectorConfigRequest } from "@formance/formance-sdk/sdk/models/op import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: ReadConnectorConfigRequest = { - connector: Connector.Stripe, + connector: Connector.Moneycorp, }; ``` diff --git a/docs/sdk/models/operations/readconnectorconfigresponse.md b/docs/sdk/models/operations/readconnectorconfigresponse.md index c4504ccd..dba91eb2 100644 --- a/docs/sdk/models/operations/readconnectorconfigresponse.md +++ b/docs/sdk/models/operations/readconnectorconfigresponse.md @@ -8,15 +8,17 @@ import { ReadConnectorConfigResponse } from "@formance/formance-sdk/sdk/models/o let value: ReadConnectorConfigResponse = { connectorConfigResponse: { data: { - apiKey: "XXX", - hmacKey: "XXX", - liveEndpointPrefix: "XXX", - name: "My Adyen Account", + accessKey: "XXX", + baseUrl: "https://api.example.com", + name: "My Atlar Account", + pageSize: 50, pollingPeriod: "60s", + secret: "XXX", + transferInitiationStatusPollingPeriod: "60s", }, }, contentType: "", - statusCode: 102, + statusCode: 510, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/readconnectorconfigv1response.md b/docs/sdk/models/operations/readconnectorconfigv1response.md index 775d2407..77d3fdb7 100644 --- a/docs/sdk/models/operations/readconnectorconfigv1response.md +++ b/docs/sdk/models/operations/readconnectorconfigv1response.md @@ -8,18 +8,15 @@ import { ReadConnectorConfigV1Response } from "@formance/formance-sdk/sdk/models let value: ReadConnectorConfigV1Response = { connectorConfigResponse: { data: { - authorizationEndpoint: "XXX", + apiKey: "XXX", + clientID: "XXX", endpoint: "XXX", - name: "My Banking Circle Account", - password: "XXX", + name: "My Moneycorp Account", pollingPeriod: "60s", - userCertificate: "XXX", - userCertificateKey: "XXX", - username: "XXX", }, }, contentType: "", - statusCode: 100, + statusCode: 201, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/readtriggerresponse.md b/docs/sdk/models/operations/readtriggerresponse.md index 664449d2..deafa5d2 100644 --- a/docs/sdk/models/operations/readtriggerresponse.md +++ b/docs/sdk/models/operations/readtriggerresponse.md @@ -7,7 +7,7 @@ import { ReadTriggerResponse } from "@formance/formance-sdk/sdk/models/operation let value: ReadTriggerResponse = { contentType: "", - statusCode: 204, + statusCode: 303, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/reconcileresponse.md b/docs/sdk/models/operations/reconcileresponse.md index a208327d..a157b751 100644 --- a/docs/sdk/models/operations/reconcileresponse.md +++ b/docs/sdk/models/operations/reconcileresponse.md @@ -11,14 +11,14 @@ let value: ReconcileResponse = { data: { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("479385"), + "key": BigInt("507636"), }, id: "XXX", ledgerBalances: { - "key": BigInt("914864"), + "key": BigInt("300403"), }, paymentsBalances: { - "key": BigInt("49348"), + "key": BigInt("549501"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), @@ -26,7 +26,7 @@ let value: ReconcileResponse = { status: "COMPLETED", }, }, - statusCode: 207, + statusCode: 505, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/reconciliationgetserverinforesponse.md b/docs/sdk/models/operations/reconciliationgetserverinforesponse.md index 02164328..b4799e89 100644 --- a/docs/sdk/models/operations/reconciliationgetserverinforesponse.md +++ b/docs/sdk/models/operations/reconciliationgetserverinforesponse.md @@ -7,7 +7,7 @@ import { ReconciliationgetServerInfoResponse } from "@formance/formance-sdk/sdk/ let value: ReconciliationgetServerInfoResponse = { contentType: "", - statusCode: 301, + statusCode: 208, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/removeaccountfrompoolresponse.md b/docs/sdk/models/operations/removeaccountfrompoolresponse.md index 1e8a4cf0..136f84c8 100644 --- a/docs/sdk/models/operations/removeaccountfrompoolresponse.md +++ b/docs/sdk/models/operations/removeaccountfrompoolresponse.md @@ -7,7 +7,7 @@ import { RemoveAccountFromPoolResponse } from "@formance/formance-sdk/sdk/models let value: RemoveAccountFromPoolResponse = { contentType: "", - statusCode: 304, + statusCode: 100, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/resetconnectorrequest.md b/docs/sdk/models/operations/resetconnectorrequest.md index f73ebd5b..93ebe768 100644 --- a/docs/sdk/models/operations/resetconnectorrequest.md +++ b/docs/sdk/models/operations/resetconnectorrequest.md @@ -7,7 +7,7 @@ import { ResetConnectorRequest } from "@formance/formance-sdk/sdk/models/operati import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: ResetConnectorRequest = { - connector: Connector.Modulr, + connector: Connector.CurrencyCloud, }; ``` diff --git a/docs/sdk/models/operations/resetconnectorresponse.md b/docs/sdk/models/operations/resetconnectorresponse.md index bf7ee1d2..15e963d7 100644 --- a/docs/sdk/models/operations/resetconnectorresponse.md +++ b/docs/sdk/models/operations/resetconnectorresponse.md @@ -7,7 +7,7 @@ import { ResetConnectorResponse } from "@formance/formance-sdk/sdk/models/operat let value: ResetConnectorResponse = { contentType: "", - statusCode: 423, + statusCode: 306, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/resetconnectorv1response.md b/docs/sdk/models/operations/resetconnectorv1response.md index 9601d001..c82aada7 100644 --- a/docs/sdk/models/operations/resetconnectorv1response.md +++ b/docs/sdk/models/operations/resetconnectorv1response.md @@ -7,7 +7,7 @@ import { ResetConnectorV1Response } from "@formance/formance-sdk/sdk/models/oper let value: ResetConnectorV1Response = { contentType: "", - statusCode: 103, + statusCode: 100, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/retrytransferinitiationresponse.md b/docs/sdk/models/operations/retrytransferinitiationresponse.md index e2b30fc1..9d10ed7c 100644 --- a/docs/sdk/models/operations/retrytransferinitiationresponse.md +++ b/docs/sdk/models/operations/retrytransferinitiationresponse.md @@ -7,7 +7,7 @@ import { RetryTransferInitiationResponse } from "@formance/formance-sdk/sdk/mode let value: RetryTransferInitiationResponse = { contentType: "", - statusCode: 208, + statusCode: 306, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/reversetransferinitiationrequest.md b/docs/sdk/models/operations/reversetransferinitiationrequest.md index 61bd123b..9aa6d264 100644 --- a/docs/sdk/models/operations/reversetransferinitiationrequest.md +++ b/docs/sdk/models/operations/reversetransferinitiationrequest.md @@ -7,10 +7,10 @@ import { ReverseTransferInitiationRequest } from "@formance/formance-sdk/sdk/mod let value: ReverseTransferInitiationRequest = { reverseTransferInitiationRequest: { - amount: BigInt("690785"), + amount: BigInt("848151"), asset: "USD", description: - "kielbasa with vibration swanling drat squiggly inventory sit since dilate", + "hmph backburn amid productive quit ride unnaturally aboard dead midst", metadata: { "key": "", }, diff --git a/docs/sdk/models/operations/reversetransferinitiationresponse.md b/docs/sdk/models/operations/reversetransferinitiationresponse.md index 604ab883..d8fd6771 100644 --- a/docs/sdk/models/operations/reversetransferinitiationresponse.md +++ b/docs/sdk/models/operations/reversetransferinitiationresponse.md @@ -7,7 +7,7 @@ import { ReverseTransferInitiationResponse } from "@formance/formance-sdk/sdk/mo let value: ReverseTransferInitiationResponse = { contentType: "", - statusCode: 204, + statusCode: 413, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/reverttransactionresponse.md b/docs/sdk/models/operations/reverttransactionresponse.md index fc903286..b1814558 100644 --- a/docs/sdk/models/operations/reverttransactionresponse.md +++ b/docs/sdk/models/operations/reverttransactionresponse.md @@ -54,7 +54,7 @@ let value: RevertTransactionResponse = { }, }, reference: "ref:001", - timestamp: new Date("2024-12-06T04:47:23.164Z"), + timestamp: new Date("2025-12-06T04:47:23.164Z"), txid: BigInt("468651"), }, }, diff --git a/docs/sdk/models/operations/runscriptresponse.md b/docs/sdk/models/operations/runscriptresponse.md index 9b78cb8c..bc0c73b2 100644 --- a/docs/sdk/models/operations/runscriptresponse.md +++ b/docs/sdk/models/operations/runscriptresponse.md @@ -55,7 +55,7 @@ let value: RunScriptResponse = { }, }, reference: "ref:001", - timestamp: new Date("2024-12-06T12:43:25.190Z"), + timestamp: new Date("2025-12-06T12:43:25.190Z"), txid: BigInt("604846"), }, }, diff --git a/docs/sdk/models/operations/runworkflowresponse.md b/docs/sdk/models/operations/runworkflowresponse.md index 7d330852..ff975b36 100644 --- a/docs/sdk/models/operations/runworkflowresponse.md +++ b/docs/sdk/models/operations/runworkflowresponse.md @@ -7,7 +7,7 @@ import { RunWorkflowResponse } from "@formance/formance-sdk/sdk/models/operation let value: RunWorkflowResponse = { contentType: "", - statusCode: 205, + statusCode: 302, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/searchgetserverinforesponse.md b/docs/sdk/models/operations/searchgetserverinforesponse.md index 1fe06737..76114630 100644 --- a/docs/sdk/models/operations/searchgetserverinforesponse.md +++ b/docs/sdk/models/operations/searchgetserverinforesponse.md @@ -7,7 +7,7 @@ import { SearchgetServerInfoResponse } from "@formance/formance-sdk/sdk/models/o let value: SearchgetServerInfoResponse = { contentType: "", - statusCode: 307, + statusCode: 203, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/searchresponse.md b/docs/sdk/models/operations/searchresponse.md index 66b611f8..74f06d85 100644 --- a/docs/sdk/models/operations/searchresponse.md +++ b/docs/sdk/models/operations/searchresponse.md @@ -17,7 +17,7 @@ let value: SearchResponse = { }, }, }, - statusCode: 103, + statusCode: 200, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/sendeventresponse.md b/docs/sdk/models/operations/sendeventresponse.md index 17b85eb7..c796db75 100644 --- a/docs/sdk/models/operations/sendeventresponse.md +++ b/docs/sdk/models/operations/sendeventresponse.md @@ -7,7 +7,7 @@ import { SendEventResponse } from "@formance/formance-sdk/sdk/models/operations" let value: SendEventResponse = { contentType: "", - statusCode: 501, + statusCode: 307, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/testconfigresponse.md b/docs/sdk/models/operations/testconfigresponse.md index 882523cc..569e7dd3 100644 --- a/docs/sdk/models/operations/testconfigresponse.md +++ b/docs/sdk/models/operations/testconfigresponse.md @@ -10,28 +10,28 @@ let value: TestConfigResponse = { data: { config: { active: true, - createdAt: new Date("2023-03-10T14:44:52.776Z"), + createdAt: new Date("2023-04-24T23:22:30.007Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "f916cbe4-c79f-4fd5-8ea6-0c8cbc4c87a0", + id: "ac26e109-6ce4-4679-bfb6-4f2bea635bae", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-11-17T05:26:00.288Z"), + updatedAt: new Date("2025-06-13T12:01:45.796Z"), }, - createdAt: new Date("2024-12-13T08:34:18.669Z"), - id: "25055fd6-0da2-4f1d-b46c-af91ecb062db", + createdAt: new Date("2025-09-25T22:48:13.771Z"), + id: "4568a406-4fed-4a58-bd1c-0dc0a822c9ff", payload: "{\"data\":\"test\"}", retryAttempt: 1, status: "success", statusCode: 200, - updatedAt: new Date("2024-11-25T08:47:29.806Z"), - webhookID: "cf9005dd-f10e-448f-96a6-c83448bfbc25", + updatedAt: new Date("2023-05-11T00:03:45.342Z"), + webhookID: "f37c3921-1506-4a61-a142-f2c998f5c86f", }, }, contentType: "", - statusCode: 408, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/testtriggerresponse.md b/docs/sdk/models/operations/testtriggerresponse.md index 611fb0c6..b35c6235 100644 --- a/docs/sdk/models/operations/testtriggerresponse.md +++ b/docs/sdk/models/operations/testtriggerresponse.md @@ -7,7 +7,7 @@ import { TestTriggerResponse } from "@formance/formance-sdk/sdk/models/operation let value: TestTriggerResponse = { contentType: "", - statusCode: 306, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/udpatetransferinitiationstatusresponse.md b/docs/sdk/models/operations/udpatetransferinitiationstatusresponse.md index 7ef048c8..4a4adc2a 100644 --- a/docs/sdk/models/operations/udpatetransferinitiationstatusresponse.md +++ b/docs/sdk/models/operations/udpatetransferinitiationstatusresponse.md @@ -7,7 +7,7 @@ import { UdpateTransferInitiationStatusResponse } from "@formance/formance-sdk/s let value: UdpateTransferInitiationStatusResponse = { contentType: "", - statusCode: 411, + statusCode: 101, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/uninstallconnectorrequest.md b/docs/sdk/models/operations/uninstallconnectorrequest.md index ab96c4fc..69c10d6d 100644 --- a/docs/sdk/models/operations/uninstallconnectorrequest.md +++ b/docs/sdk/models/operations/uninstallconnectorrequest.md @@ -7,7 +7,7 @@ import { UninstallConnectorRequest } from "@formance/formance-sdk/sdk/models/ope import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: UninstallConnectorRequest = { - connector: Connector.CurrencyCloud, + connector: Connector.BankingCircle, }; ``` diff --git a/docs/sdk/models/operations/uninstallconnectorresponse.md b/docs/sdk/models/operations/uninstallconnectorresponse.md index c9cbc180..cb646882 100644 --- a/docs/sdk/models/operations/uninstallconnectorresponse.md +++ b/docs/sdk/models/operations/uninstallconnectorresponse.md @@ -7,7 +7,7 @@ import { UninstallConnectorResponse } from "@formance/formance-sdk/sdk/models/op let value: UninstallConnectorResponse = { contentType: "", - statusCode: 507, + statusCode: 207, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/uninstallconnectorv1request.md b/docs/sdk/models/operations/uninstallconnectorv1request.md index 4f9ad2d7..d695bb77 100644 --- a/docs/sdk/models/operations/uninstallconnectorv1request.md +++ b/docs/sdk/models/operations/uninstallconnectorv1request.md @@ -7,7 +7,7 @@ import { UninstallConnectorV1Request } from "@formance/formance-sdk/sdk/models/o import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: UninstallConnectorV1Request = { - connector: Connector.Generic, + connector: Connector.Atlar, connectorId: "XXX", }; ``` diff --git a/docs/sdk/models/operations/uninstallconnectorv1response.md b/docs/sdk/models/operations/uninstallconnectorv1response.md index e5e93fdf..fc461d1e 100644 --- a/docs/sdk/models/operations/uninstallconnectorv1response.md +++ b/docs/sdk/models/operations/uninstallconnectorv1response.md @@ -7,7 +7,7 @@ import { UninstallConnectorV1Response } from "@formance/formance-sdk/sdk/models/ let value: UninstallConnectorV1Response = { contentType: "", - statusCode: 208, + statusCode: 500, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/updatebankaccountmetadataresponse.md b/docs/sdk/models/operations/updatebankaccountmetadataresponse.md index 2d0f48ba..7e5199c9 100644 --- a/docs/sdk/models/operations/updatebankaccountmetadataresponse.md +++ b/docs/sdk/models/operations/updatebankaccountmetadataresponse.md @@ -7,7 +7,7 @@ import { UpdateBankAccountMetadataResponse } from "@formance/formance-sdk/sdk/mo let value: UpdateBankAccountMetadataResponse = { contentType: "", - statusCode: 410, + statusCode: 504, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/updateconnectorconfigv1request.md b/docs/sdk/models/operations/updateconnectorconfigv1request.md index c068c9f2..4da8b7c5 100644 --- a/docs/sdk/models/operations/updateconnectorconfigv1request.md +++ b/docs/sdk/models/operations/updateconnectorconfigv1request.md @@ -9,12 +9,12 @@ import { Connector } from "@formance/formance-sdk/sdk/models/shared"; let value: UpdateConnectorConfigV1Request = { connectorConfig: { apiKey: "XXX", - clientID: "XXX", - endpoint: "XXX", - name: "My MangoPay Account", + hmacKey: "XXX", + liveEndpointPrefix: "XXX", + name: "My Adyen Account", pollingPeriod: "60s", }, - connector: Connector.Modulr, + connector: Connector.Moneycorp, connectorId: "XXX", }; ``` diff --git a/docs/sdk/models/operations/updateconnectorconfigv1response.md b/docs/sdk/models/operations/updateconnectorconfigv1response.md index 01e45348..fa0348c0 100644 --- a/docs/sdk/models/operations/updateconnectorconfigv1response.md +++ b/docs/sdk/models/operations/updateconnectorconfigv1response.md @@ -7,7 +7,7 @@ import { UpdateConnectorConfigV1Response } from "@formance/formance-sdk/sdk/mode let value: UpdateConnectorConfigV1Response = { contentType: "", - statusCode: 501, + statusCode: 508, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/updatemetadataresponse.md b/docs/sdk/models/operations/updatemetadataresponse.md index 2a4e022d..76a8b04b 100644 --- a/docs/sdk/models/operations/updatemetadataresponse.md +++ b/docs/sdk/models/operations/updatemetadataresponse.md @@ -7,7 +7,7 @@ import { UpdateMetadataResponse } from "@formance/formance-sdk/sdk/models/operat let value: UpdateMetadataResponse = { contentType: "", - statusCode: 201, + statusCode: 205, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/updatewalletresponse.md b/docs/sdk/models/operations/updatewalletresponse.md index d61a59b1..48f20094 100644 --- a/docs/sdk/models/operations/updatewalletresponse.md +++ b/docs/sdk/models/operations/updatewalletresponse.md @@ -7,7 +7,7 @@ import { UpdateWalletResponse } from "@formance/formance-sdk/sdk/models/operatio let value: UpdateWalletResponse = { contentType: "", - statusCode: 100, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2canceleventresponse.md b/docs/sdk/models/operations/v2canceleventresponse.md index d9e06585..4c9f257b 100644 --- a/docs/sdk/models/operations/v2canceleventresponse.md +++ b/docs/sdk/models/operations/v2canceleventresponse.md @@ -7,7 +7,7 @@ import { V2CancelEventResponse } from "@formance/formance-sdk/sdk/models/operati let value: V2CancelEventResponse = { contentType: "", - statusCode: 301, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2createbulkresponse.md b/docs/sdk/models/operations/v2createbulkresponse.md index 53dfdd19..be4e9d52 100644 --- a/docs/sdk/models/operations/v2createbulkresponse.md +++ b/docs/sdk/models/operations/v2createbulkresponse.md @@ -29,7 +29,7 @@ let value: V2CreateBulkResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2024-01-02T11:33:45.485Z"), + timestamp: new Date("2025-01-01T11:33:45.485Z"), }, responseType: "", }, diff --git a/docs/sdk/models/operations/v2createtransactionresponse.md b/docs/sdk/models/operations/v2createtransactionresponse.md index 7d4e1399..86fc621a 100644 --- a/docs/sdk/models/operations/v2createtransactionresponse.md +++ b/docs/sdk/models/operations/v2createtransactionresponse.md @@ -27,7 +27,7 @@ let value: V2CreateTransactionResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-01-23T00:54:32.021Z"), + timestamp: new Date("2023-01-23T00:54:32.021Z"), }, }, }; diff --git a/docs/sdk/models/operations/v2createtriggerresponse.md b/docs/sdk/models/operations/v2createtriggerresponse.md index dc05258f..6a695f83 100644 --- a/docs/sdk/models/operations/v2createtriggerresponse.md +++ b/docs/sdk/models/operations/v2createtriggerresponse.md @@ -7,7 +7,7 @@ import { V2CreateTriggerResponse } from "@formance/formance-sdk/sdk/models/opera let value: V2CreateTriggerResponse = { contentType: "", - statusCode: 411, + statusCode: 205, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2createworkflowresponse.md b/docs/sdk/models/operations/v2createworkflowresponse.md index 392aa92a..38b4f83b 100644 --- a/docs/sdk/models/operations/v2createworkflowresponse.md +++ b/docs/sdk/models/operations/v2createworkflowresponse.md @@ -7,7 +7,7 @@ import { V2CreateWorkflowResponse } from "@formance/formance-sdk/sdk/models/oper let value: V2CreateWorkflowResponse = { contentType: "", - statusCode: 301, + statusCode: 100, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2deletetriggerresponse.md b/docs/sdk/models/operations/v2deletetriggerresponse.md index 0d417d52..436b3e08 100644 --- a/docs/sdk/models/operations/v2deletetriggerresponse.md +++ b/docs/sdk/models/operations/v2deletetriggerresponse.md @@ -7,7 +7,7 @@ import { V2DeleteTriggerResponse } from "@formance/formance-sdk/sdk/models/opera let value: V2DeleteTriggerResponse = { contentType: "", - statusCode: 101, + statusCode: 303, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2deleteworkflowresponse.md b/docs/sdk/models/operations/v2deleteworkflowresponse.md index 9fa3f7c0..08022fc1 100644 --- a/docs/sdk/models/operations/v2deleteworkflowresponse.md +++ b/docs/sdk/models/operations/v2deleteworkflowresponse.md @@ -7,7 +7,7 @@ import { V2DeleteWorkflowResponse } from "@formance/formance-sdk/sdk/models/oper let value: V2DeleteWorkflowResponse = { contentType: "", - statusCode: 226, + statusCode: 508, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2getinstancehistoryresponse.md b/docs/sdk/models/operations/v2getinstancehistoryresponse.md index 9654565f..8a9d3920 100644 --- a/docs/sdk/models/operations/v2getinstancehistoryresponse.md +++ b/docs/sdk/models/operations/v2getinstancehistoryresponse.md @@ -7,7 +7,7 @@ import { V2GetInstanceHistoryResponse } from "@formance/formance-sdk/sdk/models/ let value: V2GetInstanceHistoryResponse = { contentType: "", - statusCode: 500, + statusCode: 102, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2getinstanceresponse.md b/docs/sdk/models/operations/v2getinstanceresponse.md index 07e334d4..9f5805c8 100644 --- a/docs/sdk/models/operations/v2getinstanceresponse.md +++ b/docs/sdk/models/operations/v2getinstanceresponse.md @@ -7,7 +7,7 @@ import { V2GetInstanceResponse } from "@formance/formance-sdk/sdk/models/operati let value: V2GetInstanceResponse = { contentType: "", - statusCode: 423, + statusCode: 429, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/v2getinstancestagehistoryresponse.md b/docs/sdk/models/operations/v2getinstancestagehistoryresponse.md index 38702098..dac9cd75 100644 --- a/docs/sdk/models/operations/v2getinstancestagehistoryresponse.md +++ b/docs/sdk/models/operations/v2getinstancestagehistoryresponse.md @@ -8,14 +8,14 @@ import { Scheme, V2PaymentStatus, V2PaymentType } from "@formance/formance-sdk/s let value: V2GetInstanceStageHistoryResponse = { contentType: "", - statusCode: 305, + statusCode: 308, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), v2GetWorkflowInstanceHistoryStageResponse: { data: [ { - attempt: 961937, + attempt: 292147, input: { createTransaction: { data: { @@ -55,12 +55,7 @@ let value: V2GetInstanceStageHistoryResponse = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { @@ -100,7 +95,7 @@ let value: V2GetInstanceStageHistoryResponse = { }, ], reference: "ref:001", - timestamp: new Date("2022-09-21T22:45:36.817Z"), + timestamp: new Date("2023-09-21T22:45:36.817Z"), txid: BigInt("100294"), }, ], @@ -143,14 +138,14 @@ let value: V2GetInstanceStageHistoryResponse = { { absolute: false, amount: BigInt("100"), - date: new Date("2022-01-19T00:09:53.916Z"), + date: new Date("2023-01-19T00:09:53.916Z"), raw: {}, status: V2PaymentStatus.Cancelled, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2024-01-05T05:29:05.430Z"), + createdAt: new Date("2025-01-04T05:29:05.430Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -167,7 +162,7 @@ let value: V2GetInstanceStageHistoryResponse = { cursor: { data: [ { - createdAt: new Date("2022-03-12T02:16:45.552Z"), + createdAt: new Date("2023-03-12T02:16:45.552Z"), id: "7fe5f3ff-cad4-4d90-b52f-77a52d3831df", ledger: "", metadata: { @@ -183,7 +178,7 @@ let value: V2GetInstanceStageHistoryResponse = { }, }, }, - startedAt: new Date("2024-09-20T14:02:09.066Z"), + startedAt: new Date("2025-09-20T14:02:09.066Z"), terminated: false, }, ], diff --git a/docs/sdk/models/operations/v2getledgerresponse.md b/docs/sdk/models/operations/v2getledgerresponse.md index 91344608..9509d395 100644 --- a/docs/sdk/models/operations/v2getledgerresponse.md +++ b/docs/sdk/models/operations/v2getledgerresponse.md @@ -13,7 +13,7 @@ let value: V2GetLedgerResponse = { }), v2GetLedgerResponse: { data: { - addedAt: new Date("2024-03-05T21:05:18.875Z"), + addedAt: new Date("2025-03-05T21:05:18.875Z"), bucket: "", metadata: { "admin": "true", diff --git a/docs/sdk/models/operations/v2gettransactionresponse.md b/docs/sdk/models/operations/v2gettransactionresponse.md index cd8efb57..80a97c4f 100644 --- a/docs/sdk/models/operations/v2gettransactionresponse.md +++ b/docs/sdk/models/operations/v2gettransactionresponse.md @@ -59,7 +59,7 @@ let value: V2GetTransactionResponse = { }, reference: "ref:001", reverted: false, - timestamp: new Date("2022-01-22T00:51:28.398Z"), + timestamp: new Date("2023-01-22T00:51:28.398Z"), }, }, }; diff --git a/docs/sdk/models/operations/v2listinstancesresponse.md b/docs/sdk/models/operations/v2listinstancesresponse.md index 6c8653a8..d86281d8 100644 --- a/docs/sdk/models/operations/v2listinstancesresponse.md +++ b/docs/sdk/models/operations/v2listinstancesresponse.md @@ -15,10 +15,10 @@ let value: V2ListInstancesResponse = { cursor: { data: [ { - createdAt: new Date("2022-02-28T13:20:54.923Z"), + createdAt: new Date("2023-02-28T13:20:54.923Z"), id: "", terminated: false, - updatedAt: new Date("2024-03-06T06:02:02.963Z"), + updatedAt: new Date("2025-03-06T06:02:02.963Z"), workflowID: "", }, ], diff --git a/docs/sdk/models/operations/v2listledgersresponse.md b/docs/sdk/models/operations/v2listledgersresponse.md index c288afa8..0d9b78a8 100644 --- a/docs/sdk/models/operations/v2listledgersresponse.md +++ b/docs/sdk/models/operations/v2listledgersresponse.md @@ -15,7 +15,7 @@ let value: V2ListLedgersResponse = { cursor: { data: [ { - addedAt: new Date("2022-04-20T20:22:04.958Z"), + addedAt: new Date("2023-04-20T20:22:04.958Z"), bucket: "", metadata: { "admin": "true", diff --git a/docs/sdk/models/operations/v2listlogsresponse.md b/docs/sdk/models/operations/v2listlogsresponse.md index ddd0569f..bc826fc2 100644 --- a/docs/sdk/models/operations/v2listlogsresponse.md +++ b/docs/sdk/models/operations/v2listlogsresponse.md @@ -19,7 +19,7 @@ let value: V2ListLogsResponse = { data: { "key": "", }, - date: new Date("2024-12-30T17:40:17.979Z"), + date: new Date("2025-12-30T17:40:17.979Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: BigInt("1234"), diff --git a/docs/sdk/models/operations/v2listtransactionsresponse.md b/docs/sdk/models/operations/v2listtransactionsresponse.md index 626f7079..4c41d4a2 100644 --- a/docs/sdk/models/operations/v2listtransactionsresponse.md +++ b/docs/sdk/models/operations/v2listtransactionsresponse.md @@ -61,7 +61,7 @@ let value: V2ListTransactionsResponse = { }, reference: "ref:001", reverted: false, - timestamp: new Date("2022-05-16T16:57:38.984Z"), + timestamp: new Date("2023-05-16T16:57:38.984Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/operations/v2listtriggersoccurrencesresponse.md b/docs/sdk/models/operations/v2listtriggersoccurrencesresponse.md index 61fa7e8d..af48bef8 100644 --- a/docs/sdk/models/operations/v2listtriggersoccurrencesresponse.md +++ b/docs/sdk/models/operations/v2listtriggersoccurrencesresponse.md @@ -15,7 +15,7 @@ let value: V2ListTriggersOccurrencesResponse = { cursor: { data: [ { - date: new Date("2024-01-07T13:32:43.889Z"), + date: new Date("2025-01-06T13:32:43.889Z"), event: { "key": "", }, diff --git a/docs/sdk/models/operations/v2listtriggersresponse.md b/docs/sdk/models/operations/v2listtriggersresponse.md index 7382ae66..e45f3775 100644 --- a/docs/sdk/models/operations/v2listtriggersresponse.md +++ b/docs/sdk/models/operations/v2listtriggersresponse.md @@ -15,7 +15,7 @@ let value: V2ListTriggersResponse = { cursor: { data: [ { - createdAt: new Date("2022-06-11T01:17:04.418Z"), + createdAt: new Date("2023-06-11T01:17:04.418Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/operations/v2listworkflowsresponse.md b/docs/sdk/models/operations/v2listworkflowsresponse.md index 83c44e8c..45698cd4 100644 --- a/docs/sdk/models/operations/v2listworkflowsresponse.md +++ b/docs/sdk/models/operations/v2listworkflowsresponse.md @@ -22,9 +22,9 @@ let value: V2ListWorkflowsResponse = { }, ], }, - createdAt: new Date("2023-09-03T21:01:43.273Z"), + createdAt: new Date("2024-09-02T21:01:43.273Z"), id: "", - updatedAt: new Date("2024-08-01T03:56:17.075Z"), + updatedAt: new Date("2025-08-01T03:56:17.075Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/operations/v2reverttransactionresponse.md b/docs/sdk/models/operations/v2reverttransactionresponse.md index 04602767..9d856ffa 100644 --- a/docs/sdk/models/operations/v2reverttransactionresponse.md +++ b/docs/sdk/models/operations/v2reverttransactionresponse.md @@ -27,7 +27,7 @@ let value: V2RevertTransactionResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2024-02-04T09:09:59.216Z"), + timestamp: new Date("2025-02-03T09:09:59.216Z"), }, }, }; diff --git a/docs/sdk/models/operations/voidholdresponse.md b/docs/sdk/models/operations/voidholdresponse.md index 7448bca8..242b8974 100644 --- a/docs/sdk/models/operations/voidholdresponse.md +++ b/docs/sdk/models/operations/voidholdresponse.md @@ -7,7 +7,7 @@ import { VoidHoldResponse } from "@formance/formance-sdk/sdk/models/operations"; let value: VoidHoldResponse = { contentType: "", - statusCode: 503, + statusCode: 203, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/operations/walletsgetserverinforesponse.md b/docs/sdk/models/operations/walletsgetserverinforesponse.md index fcc309e5..c11ec607 100644 --- a/docs/sdk/models/operations/walletsgetserverinforesponse.md +++ b/docs/sdk/models/operations/walletsgetserverinforesponse.md @@ -7,7 +7,7 @@ import { WalletsgetServerInfoResponse } from "@formance/formance-sdk/sdk/models/ let value: WalletsgetServerInfoResponse = { contentType: "", - statusCode: 102, + statusCode: 308, rawResponse: new Response("{\"message\": \"hello world\"}", { headers: { "Content-Type": "application/json" }, }), diff --git a/docs/sdk/models/shared/accountbalance.md b/docs/sdk/models/shared/accountbalance.md index e26242f4..b8e6243b 100644 --- a/docs/sdk/models/shared/accountbalance.md +++ b/docs/sdk/models/shared/accountbalance.md @@ -8,10 +8,10 @@ import { AccountBalance } from "@formance/formance-sdk/sdk/models/shared"; let value: AccountBalance = { accountId: "", asset: "", - balance: BigInt("738403"), - createdAt: new Date("2023-10-07T16:03:34.360Z"), - currency: "Namibia Dollar", - lastUpdatedAt: new Date("2023-07-02T09:50:06.034Z"), + balance: BigInt("498639"), + createdAt: new Date("2024-10-09T23:27:30.195Z"), + currency: "Saudi Riyal", + lastUpdatedAt: new Date("2025-07-16T16:23:37.743Z"), }; ``` diff --git a/docs/sdk/models/shared/accountrequest.md b/docs/sdk/models/shared/accountrequest.md index 8af99eb4..a4045497 100644 --- a/docs/sdk/models/shared/accountrequest.md +++ b/docs/sdk/models/shared/accountrequest.md @@ -7,7 +7,7 @@ import { AccountRequest, AccountType } from "@formance/formance-sdk/sdk/models/s let value: AccountRequest = { connectorID: "", - createdAt: new Date("2024-09-10T06:31:30.041Z"), + createdAt: new Date("2023-06-05T11:40:35.040Z"), reference: "", type: AccountType.Internal, }; diff --git a/docs/sdk/models/shared/accountscursor.md b/docs/sdk/models/shared/accountscursor.md index 2613f0f5..03f7c33d 100644 --- a/docs/sdk/models/shared/accountscursor.md +++ b/docs/sdk/models/shared/accountscursor.md @@ -13,7 +13,7 @@ let value: AccountsCursor = { { accountName: "", connectorID: "", - createdAt: new Date("2023-01-06T13:27:24.144Z"), + createdAt: new Date("2023-08-30T14:51:06.235Z"), defaultAsset: "", defaultCurrency: "", id: "", @@ -22,7 +22,7 @@ let value: AccountsCursor = { }, raw: {}, reference: "", - type: AccountType.Internal, + type: AccountType.Unknown, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/accounttype.md b/docs/sdk/models/shared/accounttype.md index 96bccfd3..a8a38926 100644 --- a/docs/sdk/models/shared/accounttype.md +++ b/docs/sdk/models/shared/accounttype.md @@ -5,7 +5,7 @@ ```typescript import { AccountType } from "@formance/formance-sdk/sdk/models/shared"; -let value: AccountType = AccountType.External; +let value: AccountType = AccountType.Unknown; ``` ## Values diff --git a/docs/sdk/models/shared/activitycreatetransactionoutput.md b/docs/sdk/models/shared/activitycreatetransactionoutput.md index b5126e64..a47b6d01 100644 --- a/docs/sdk/models/shared/activitycreatetransactionoutput.md +++ b/docs/sdk/models/shared/activitycreatetransactionoutput.md @@ -7,7 +7,7 @@ import { ActivityCreateTransactionOutput } from "@formance/formance-sdk/sdk/mode let value: ActivityCreateTransactionOutput = { data: { - id: BigInt("644397"), + id: BigInt("599581"), metadata: { "admin": "true", }, @@ -21,7 +21,7 @@ let value: ActivityCreateTransactionOutput = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-03-08T04:13:18.822Z"), + timestamp: new Date("2024-04-16T11:28:38.206Z"), }, }; ``` diff --git a/docs/sdk/models/shared/activitycreditwallet.md b/docs/sdk/models/shared/activitycreditwallet.md index afb3375b..0e527e1a 100644 --- a/docs/sdk/models/shared/activitycreditwallet.md +++ b/docs/sdk/models/shared/activitycreditwallet.md @@ -14,12 +14,7 @@ let value: ActivityCreditWallet = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }; ``` diff --git a/docs/sdk/models/shared/activitydebitwalletoutput.md b/docs/sdk/models/shared/activitydebitwalletoutput.md index c0510262..a0f76f50 100644 --- a/docs/sdk/models/shared/activitydebitwalletoutput.md +++ b/docs/sdk/models/shared/activitydebitwalletoutput.md @@ -7,8 +7,8 @@ import { ActivityDebitWalletOutput } from "@formance/formance-sdk/sdk/models/sha let value: ActivityDebitWalletOutput = { data: { - description: "midst yuck onset eek oof if deserted meh failing", - id: "e269f2e1-7735-47df-b8d9-53680293d511", + description: "spew ick fondly aside cake uh-huh while instead", + id: "b525ef3c-4e2a-41fb-bd97-987c22651dc8", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/activitygetpaymentoutput.md b/docs/sdk/models/shared/activitygetpaymentoutput.md index ea6ed3a2..b21ba8b2 100644 --- a/docs/sdk/models/shared/activitygetpaymentoutput.md +++ b/docs/sdk/models/shared/activitygetpaymentoutput.md @@ -16,24 +16,24 @@ let value: ActivityGetPaymentOutput = { { absolute: false, amount: BigInt("100"), - date: new Date("2023-05-30T10:41:09.880Z"), + date: new Date("2023-08-31T18:04:39.587Z"), raw: {}, - status: OrchestrationPaymentStatus.Succeeded, + status: OrchestrationPaymentStatus.Pending, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2022-07-15T07:23:52.507Z"), + createdAt: new Date("2024-04-17T15:48:23.052Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: OrchestrationPaymentScheme.Diners, + scheme: OrchestrationPaymentScheme.A2a, sourceAccountID: "", - status: OrchestrationPaymentStatus.Terminated, - type: OrchestrationPaymentType.Payout, + status: OrchestrationPaymentStatus.Succeeded, + type: OrchestrationPaymentType.Other, }, }; ``` diff --git a/docs/sdk/models/shared/activitygetwalletoutput.md b/docs/sdk/models/shared/activitygetwalletoutput.md index 97617aff..ab125543 100644 --- a/docs/sdk/models/shared/activitygetwalletoutput.md +++ b/docs/sdk/models/shared/activitygetwalletoutput.md @@ -10,12 +10,12 @@ let value: ActivityGetWalletOutput = { balances: { main: { assets: { - "key": BigInt("310195"), + "key": BigInt("827314"), }, }, }, - createdAt: new Date("2023-07-19T21:57:06.884Z"), - id: "634f450d-234e-43cc-9e13-b34227156061", + createdAt: new Date("2025-01-20T05:02:59.164Z"), + id: "6669ee02-1358-4abe-9fad-c4e0047a1ac2", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/activityreverttransactionoutput.md b/docs/sdk/models/shared/activityreverttransactionoutput.md index a8006cc4..486eb20f 100644 --- a/docs/sdk/models/shared/activityreverttransactionoutput.md +++ b/docs/sdk/models/shared/activityreverttransactionoutput.md @@ -7,7 +7,7 @@ import { ActivityRevertTransactionOutput } from "@formance/formance-sdk/sdk/mode let value: ActivityRevertTransactionOutput = { data: { - id: BigInt("990652"), + id: BigInt("588662"), metadata: { "admin": "true", }, @@ -21,7 +21,7 @@ let value: ActivityRevertTransactionOutput = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-08-06T23:39:39.226Z"), + timestamp: new Date("2023-02-19T21:06:49.752Z"), }, }; ``` diff --git a/docs/sdk/models/shared/assetholder.md b/docs/sdk/models/shared/assetholder.md index 3a79cacc..029b8cdc 100644 --- a/docs/sdk/models/shared/assetholder.md +++ b/docs/sdk/models/shared/assetholder.md @@ -7,7 +7,7 @@ import { AssetHolder } from "@formance/formance-sdk/sdk/models/shared"; let value: AssetHolder = { assets: { - "key": BigInt("528742"), + "key": BigInt("614346"), }, }; ``` diff --git a/docs/sdk/models/shared/attempt.md b/docs/sdk/models/shared/attempt.md index d9f30f4c..deb7ce24 100644 --- a/docs/sdk/models/shared/attempt.md +++ b/docs/sdk/models/shared/attempt.md @@ -8,24 +8,24 @@ import { Attempt } from "@formance/formance-sdk/sdk/models/shared"; let value: Attempt = { config: { active: true, - createdAt: new Date("2022-11-14T11:47:11.710Z"), + createdAt: new Date("2023-05-12T10:34:30.520Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "b97ace7a-6e76-4f05-9d75-96545ef1baa0", + id: "825d98f6-e965-4e94-b833-2bc56c0548e0", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2024-03-28T17:29:23.622Z"), + updatedAt: new Date("2024-09-02T14:41:23.294Z"), }, - createdAt: new Date("2023-06-28T09:42:10.187Z"), - id: "08dee873-dcd3-41be-8e8a-148e790f7258", + createdAt: new Date("2024-10-06T01:59:27.014Z"), + id: "f24379b0-6e7d-414b-997a-ce7a6e76f05d", payload: "{\"data\":\"test\"}", retryAttempt: 1, status: "success", statusCode: 200, - updatedAt: new Date("2022-08-04T12:35:53.060Z"), - webhookID: "ed14a40b-3542-422f-abf9-5277c83d2805", + updatedAt: new Date("2024-01-17T19:57:19.728Z"), + webhookID: "96545ef1-baa0-44b7-b08d-ee873dcd31be", }; ``` diff --git a/docs/sdk/models/shared/attemptresponse.md b/docs/sdk/models/shared/attemptresponse.md index 96baf419..f8a436fc 100644 --- a/docs/sdk/models/shared/attemptresponse.md +++ b/docs/sdk/models/shared/attemptresponse.md @@ -9,24 +9,24 @@ let value: AttemptResponse = { data: { config: { active: true, - createdAt: new Date("2023-07-27T18:43:26.946Z"), + createdAt: new Date("2023-08-23T07:02:23.610Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "a9bc0f62-ec69-4366-8c6c-c67803dc1a08", + id: "ea442c74-fc9c-41a5-9bfc-9b740a27ae93", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2024-07-24T09:12:37.931Z"), + updatedAt: new Date("2025-01-01T17:04:41.851Z"), }, - createdAt: new Date("2023-11-05T20:05:58.553Z"), - id: "1aeb1a9a-c453-4761-a318-25d98f6e965e", + createdAt: new Date("2023-08-03T01:37:55.590Z"), + id: "bc8d38eb-c395-4a8a-99bc-0f62ec69366c", payload: "{\"data\":\"test\"}", retryAttempt: 1, status: "success", statusCode: 200, - updatedAt: new Date("2022-10-03T21:04:24.953Z"), - webhookID: "8332bc56-c054-48e0-8d89-f24379b06e7d", + updatedAt: new Date("2025-04-07T08:08:03.743Z"), + webhookID: "c67803dc-1a08-42d9-81ae-b1a9ac453761", }, }; ``` diff --git a/docs/sdk/models/shared/balances.md b/docs/sdk/models/shared/balances.md index 39989f11..0816f22c 100644 --- a/docs/sdk/models/shared/balances.md +++ b/docs/sdk/models/shared/balances.md @@ -8,7 +8,7 @@ import { Balances } from "@formance/formance-sdk/sdk/models/shared"; let value: Balances = { main: { assets: { - "key": BigInt("530199"), + "key": BigInt("708360"), }, }, }; diff --git a/docs/sdk/models/shared/balancescursor.md b/docs/sdk/models/shared/balancescursor.md index 42d65989..97c682fe 100644 --- a/docs/sdk/models/shared/balancescursor.md +++ b/docs/sdk/models/shared/balancescursor.md @@ -13,10 +13,10 @@ let value: BalancesCursor = { { accountId: "", asset: "", - balance: BigInt("775959"), - createdAt: new Date("2022-03-25T10:55:20.447Z"), - currency: "Canadian Dollar", - lastUpdatedAt: new Date("2023-12-30T22:18:25.349Z"), + balance: BigInt("817249"), + createdAt: new Date("2024-11-07T11:49:37.012Z"), + currency: "Venezuelan bolívar", + lastUpdatedAt: new Date("2025-06-10T16:27:09.195Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/balancescursorcursor.md b/docs/sdk/models/shared/balancescursorcursor.md index cccf7254..7bbc7f99 100644 --- a/docs/sdk/models/shared/balancescursorcursor.md +++ b/docs/sdk/models/shared/balancescursorcursor.md @@ -10,10 +10,10 @@ let value: BalancesCursorCursor = { { accountId: "", asset: "", - balance: BigInt("5938"), - createdAt: new Date("2023-04-22T08:34:26.118Z"), - currency: "Guyana Dollar", - lastUpdatedAt: new Date("2023-10-30T15:27:04.484Z"), + balance: BigInt("448282"), + createdAt: new Date("2023-01-16T17:26:23.935Z"), + currency: "Naira", + lastUpdatedAt: new Date("2025-12-27T10:18:44.676Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/balancewithassets.md b/docs/sdk/models/shared/balancewithassets.md index 170dfa92..b8bbf656 100644 --- a/docs/sdk/models/shared/balancewithassets.md +++ b/docs/sdk/models/shared/balancewithassets.md @@ -7,7 +7,7 @@ import { BalanceWithAssets } from "@formance/formance-sdk/sdk/models/shared"; let value: BalanceWithAssets = { assets: { - "key": BigInt("174915"), + "key": BigInt("449647"), }, name: "", }; diff --git a/docs/sdk/models/shared/bankaccount.md b/docs/sdk/models/shared/bankaccount.md index fc59751c..f8d5facd 100644 --- a/docs/sdk/models/shared/bankaccount.md +++ b/docs/sdk/models/shared/bankaccount.md @@ -7,8 +7,8 @@ import { BankAccount } from "@formance/formance-sdk/sdk/models/shared"; let value: BankAccount = { connectorID: "", - country: "Argentina", - createdAt: new Date("2024-05-27T15:12:15.895Z"), + country: "Egypt", + createdAt: new Date("2024-06-01T18:46:06.050Z"), id: "", name: "", }; diff --git a/docs/sdk/models/shared/bankaccountrelatedaccounts.md b/docs/sdk/models/shared/bankaccountrelatedaccounts.md index ad9ac0fe..b2c9903d 100644 --- a/docs/sdk/models/shared/bankaccountrelatedaccounts.md +++ b/docs/sdk/models/shared/bankaccountrelatedaccounts.md @@ -8,7 +8,7 @@ import { BankAccountRelatedAccounts } from "@formance/formance-sdk/sdk/models/sh let value: BankAccountRelatedAccounts = { accountID: "", connectorID: "", - createdAt: new Date("2023-02-18T15:55:24.931Z"), + createdAt: new Date("2025-06-08T06:31:25.831Z"), id: "", provider: "", }; diff --git a/docs/sdk/models/shared/bankaccountresponse.md b/docs/sdk/models/shared/bankaccountresponse.md index 306f3266..628655d2 100644 --- a/docs/sdk/models/shared/bankaccountresponse.md +++ b/docs/sdk/models/shared/bankaccountresponse.md @@ -10,8 +10,8 @@ import { BankAccountResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: BankAccountResponse = { data: { connectorID: "", - country: "Montserrat", - createdAt: new Date("2024-02-01T07:02:42.733Z"), + country: "Guyana", + createdAt: new Date("2025-11-04T06:00:17.772Z"), id: "", name: "", }, diff --git a/docs/sdk/models/shared/bankaccountscursor.md b/docs/sdk/models/shared/bankaccountscursor.md index 2c7056a2..12026cf8 100644 --- a/docs/sdk/models/shared/bankaccountscursor.md +++ b/docs/sdk/models/shared/bankaccountscursor.md @@ -12,8 +12,8 @@ let value: BankAccountsCursor = { data: [ { connectorID: "", - country: "Japan", - createdAt: new Date("2024-12-09T17:05:31.658Z"), + country: "Malta", + createdAt: new Date("2025-06-10T15:27:10.584Z"), id: "", name: "", }, diff --git a/docs/sdk/models/shared/bankaccountscursorcursor.md b/docs/sdk/models/shared/bankaccountscursorcursor.md index 13624d48..ed0276a6 100644 --- a/docs/sdk/models/shared/bankaccountscursorcursor.md +++ b/docs/sdk/models/shared/bankaccountscursorcursor.md @@ -9,8 +9,8 @@ let value: BankAccountsCursorCursor = { data: [ { connectorID: "", - country: "Canada", - createdAt: new Date("2024-11-22T15:42:40.032Z"), + country: "Uzbekistan", + createdAt: new Date("2024-10-11T16:46:55.679Z"), id: "", name: "", }, diff --git a/docs/sdk/models/shared/configresponse.md b/docs/sdk/models/shared/configresponse.md index 734296b6..046be7cc 100644 --- a/docs/sdk/models/shared/configresponse.md +++ b/docs/sdk/models/shared/configresponse.md @@ -8,15 +8,15 @@ import { ConfigResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: ConfigResponse = { data: { active: true, - createdAt: new Date("2024-06-21T01:49:46.650Z"), + createdAt: new Date("2023-03-21T09:16:05.859Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "3b0ea642-96be-44a6-8095-071a88eeb940", + id: "0560d7fe-8a54-4281-b75c-6e3e9184ba16", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-12-18T01:01:09.930Z"), + updatedAt: new Date("2024-03-22T23:28:52.372Z"), }, }; ``` diff --git a/docs/sdk/models/shared/configsresponse.md b/docs/sdk/models/shared/configsresponse.md index e02d2864..bbddc6ad 100644 --- a/docs/sdk/models/shared/configsresponse.md +++ b/docs/sdk/models/shared/configsresponse.md @@ -10,15 +10,15 @@ let value: ConfigsResponse = { data: [ { active: true, - createdAt: new Date("2024-01-07T16:35:45.521Z"), + createdAt: new Date("2023-01-16T01:27:31.910Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "5bfc9b74-0a27-4ae9-937a-3bc8d38ebc39", + id: "9801d712-950a-4012-82c1-272b7e0d2e58", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2023-12-24T04:08:16.291Z"), + updatedAt: new Date("2025-03-10T03:16:11.634Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/configsresponsecursor.md b/docs/sdk/models/shared/configsresponsecursor.md index 7bed423e..f57f9886 100644 --- a/docs/sdk/models/shared/configsresponsecursor.md +++ b/docs/sdk/models/shared/configsresponsecursor.md @@ -9,15 +9,15 @@ let value: ConfigsResponseCursor = { data: [ { active: true, - createdAt: new Date("2022-05-01T20:48:13.554Z"), + createdAt: new Date("2023-01-16T01:02:59.626Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "22c1272b-7e0d-42e5-b80b-3ea442c74fc9", + id: "71a88eeb-9401-4539-b86c-bb806770a408", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-05-12T15:48:49.943Z"), + updatedAt: new Date("2023-02-02T06:23:49.969Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/connector.md b/docs/sdk/models/shared/connector.md index cadb4fca..7133beb9 100644 --- a/docs/sdk/models/shared/connector.md +++ b/docs/sdk/models/shared/connector.md @@ -5,7 +5,7 @@ ```typescript import { Connector } from "@formance/formance-sdk/sdk/models/shared"; -let value: Connector = Connector.Mangopay; +let value: Connector = Connector.BankingCircle; ``` ## Values diff --git a/docs/sdk/models/shared/connectorconfigresponse.md b/docs/sdk/models/shared/connectorconfigresponse.md index d21efb61..5e891b29 100644 --- a/docs/sdk/models/shared/connectorconfigresponse.md +++ b/docs/sdk/models/shared/connectorconfigresponse.md @@ -9,9 +9,9 @@ import { ConnectorConfigResponse } from "@formance/formance-sdk/sdk/models/share let value: ConnectorConfigResponse = { data: { - directory: "/tmp/dummypay", - filePollingPeriod: "60s", - name: "My DummyPay Account", + apiKey: "XXX", + name: "My Wise Account", + pollingPeriod: "60s", }, }; ``` diff --git a/docs/sdk/models/shared/connectorsconfigsresponse.md b/docs/sdk/models/shared/connectorsconfigsresponse.md index 074fc3ea..adc818ca 100644 --- a/docs/sdk/models/shared/connectorsconfigsresponse.md +++ b/docs/sdk/models/shared/connectorsconfigsresponse.md @@ -11,7 +11,7 @@ let value: ConnectorsConfigsResponse = { data: { connector: { key: { - dataType: "bigint", + dataType: "text", required: false, }, }, diff --git a/docs/sdk/models/shared/connectorsconfigsresponseconnector.md b/docs/sdk/models/shared/connectorsconfigsresponseconnector.md index ae6e519b..ce305a5b 100644 --- a/docs/sdk/models/shared/connectorsconfigsresponseconnector.md +++ b/docs/sdk/models/shared/connectorsconfigsresponseconnector.md @@ -7,7 +7,7 @@ import { ConnectorsConfigsResponseConnector } from "@formance/formance-sdk/sdk/m let value: ConnectorsConfigsResponseConnector = { key: { - dataType: "geometry", + dataType: "bigint", required: false, }, }; diff --git a/docs/sdk/models/shared/connectorsconfigsresponsedata.md b/docs/sdk/models/shared/connectorsconfigsresponsedata.md index 79509425..dbe48ee8 100644 --- a/docs/sdk/models/shared/connectorsconfigsresponsedata.md +++ b/docs/sdk/models/shared/connectorsconfigsresponsedata.md @@ -8,7 +8,7 @@ import { ConnectorsConfigsResponseData } from "@formance/formance-sdk/sdk/models let value: ConnectorsConfigsResponseData = { connector: { key: { - dataType: "blob", + dataType: "varchar", required: false, }, }, diff --git a/docs/sdk/models/shared/connectorsresponse.md b/docs/sdk/models/shared/connectorsresponse.md index 19735a37..05d0c668 100644 --- a/docs/sdk/models/shared/connectorsresponse.md +++ b/docs/sdk/models/shared/connectorsresponse.md @@ -12,7 +12,7 @@ let value: ConnectorsResponse = { { connectorID: "", name: "", - provider: Connector.Moneycorp, + provider: Connector.DummyPay, }, ], }; diff --git a/docs/sdk/models/shared/connectorsresponsedata.md b/docs/sdk/models/shared/connectorsresponsedata.md index ec68c571..70187bcc 100644 --- a/docs/sdk/models/shared/connectorsresponsedata.md +++ b/docs/sdk/models/shared/connectorsresponsedata.md @@ -8,7 +8,7 @@ import { Connector, ConnectorsResponseData } from "@formance/formance-sdk/sdk/mo let value: ConnectorsResponseData = { connectorID: "", name: "", - provider: Connector.Mangopay, + provider: Connector.Stripe, }; ``` diff --git a/docs/sdk/models/shared/createtriggerresponse.md b/docs/sdk/models/shared/createtriggerresponse.md index 2c50e4c8..8f73a982 100644 --- a/docs/sdk/models/shared/createtriggerresponse.md +++ b/docs/sdk/models/shared/createtriggerresponse.md @@ -7,7 +7,7 @@ import { CreateTriggerResponse } from "@formance/formance-sdk/sdk/models/shared" let value: CreateTriggerResponse = { data: { - createdAt: new Date("2023-10-28T20:52:23.318Z"), + createdAt: new Date("2023-11-11T17:15:53.855Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/createwalletresponse.md b/docs/sdk/models/shared/createwalletresponse.md index 1314c182..cffc948a 100644 --- a/docs/sdk/models/shared/createwalletresponse.md +++ b/docs/sdk/models/shared/createwalletresponse.md @@ -7,8 +7,8 @@ import { CreateWalletResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: CreateWalletResponse = { data: { - createdAt: new Date("2022-06-19T23:57:47.817Z"), - id: "9bf462ed-c083-41c3-b883-700e6e764149", + createdAt: new Date("2023-08-05T11:41:51.964Z"), + id: "8ab28638-483e-4591-8a4f-693dc3e0c7d7", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/createworkflowresponse.md b/docs/sdk/models/shared/createworkflowresponse.md index d79fce5a..d777435b 100644 --- a/docs/sdk/models/shared/createworkflowresponse.md +++ b/docs/sdk/models/shared/createworkflowresponse.md @@ -14,9 +14,9 @@ let value: CreateWorkflowResponse = { }, ], }, - createdAt: new Date("2023-08-13T14:07:32.789Z"), + createdAt: new Date("2024-08-18T12:20:52.263Z"), id: "", - updatedAt: new Date("2024-10-24T16:17:24.086Z"), + updatedAt: new Date("2025-03-21T15:17:35.920Z"), }, }; ``` diff --git a/docs/sdk/models/shared/creditwalletrequest.md b/docs/sdk/models/shared/creditwalletrequest.md index 574d2f56..b1ca4c3b 100644 --- a/docs/sdk/models/shared/creditwalletrequest.md +++ b/docs/sdk/models/shared/creditwalletrequest.md @@ -13,12 +13,7 @@ let value: CreditWalletRequest = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }; ``` diff --git a/docs/sdk/models/shared/cursor.md b/docs/sdk/models/shared/cursor.md index cbacd930..4c2d0ca9 100644 --- a/docs/sdk/models/shared/cursor.md +++ b/docs/sdk/models/shared/cursor.md @@ -10,7 +10,7 @@ let value: Cursor = { { accountName: "", connectorID: "", - createdAt: new Date("2022-08-08T07:40:34.349Z"), + createdAt: new Date("2024-03-04T01:53:51.635Z"), defaultAsset: "", defaultCurrency: "", id: "", @@ -19,7 +19,7 @@ let value: Cursor = { }, raw: {}, reference: "", - type: AccountType.External, + type: AccountType.Unknown, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/debitwalletresponse.md b/docs/sdk/models/shared/debitwalletresponse.md index d4d78198..ab8faf96 100644 --- a/docs/sdk/models/shared/debitwalletresponse.md +++ b/docs/sdk/models/shared/debitwalletresponse.md @@ -7,8 +7,8 @@ import { DebitWalletResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: DebitWalletResponse = { data: { - description: "sans beside finally before", - id: "58b7d606-15fd-4366-bc00-1a6d47b85282", + description: "judgementally furthermore meh", + id: "00e6e764-149c-48c2-a9e3-3bc35a697cdd", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/expandeddebithold.md b/docs/sdk/models/shared/expandeddebithold.md index 8c7378bb..69abb206 100644 --- a/docs/sdk/models/shared/expandeddebithold.md +++ b/docs/sdk/models/shared/expandeddebithold.md @@ -6,8 +6,9 @@ import { ExpandedDebitHold } from "@formance/formance-sdk/sdk/models/shared"; let value: ExpandedDebitHold = { - description: "shanghai gah punctually midst gee supposing", - id: "365a6138-c091-49d3-b7c2-2ebbd878b612", + description: + "censor needy boohoo yak mmm best-seller instead sonar availability", + id: "618af33f-d9d3-4dd3-a8ea-a84f74b95431", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/getbalanceresponse.md b/docs/sdk/models/shared/getbalanceresponse.md index 8fde00b0..4231647c 100644 --- a/docs/sdk/models/shared/getbalanceresponse.md +++ b/docs/sdk/models/shared/getbalanceresponse.md @@ -8,7 +8,7 @@ import { GetBalanceResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: GetBalanceResponse = { data: { assets: { - "key": BigInt("539891"), + "key": BigInt("612584"), }, name: "", }, diff --git a/docs/sdk/models/shared/getholdresponse.md b/docs/sdk/models/shared/getholdresponse.md index f974515d..e0471320 100644 --- a/docs/sdk/models/shared/getholdresponse.md +++ b/docs/sdk/models/shared/getholdresponse.md @@ -7,8 +7,8 @@ import { GetHoldResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: GetHoldResponse = { data: { - description: "before inside anticodon digitize tribe glider weakly atop", - id: "8eaa84f7-4b95-4431-ba83-00b3402d3f24", + description: "apud but boo", + id: "5a9174a2-a74b-4320-bd78-1158b7d60615", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/getholdsresponse.md b/docs/sdk/models/shared/getholdsresponse.md index d0a1bfb3..47a7fd95 100644 --- a/docs/sdk/models/shared/getholdsresponse.md +++ b/docs/sdk/models/shared/getholdsresponse.md @@ -9,8 +9,8 @@ let value: GetHoldsResponse = { cursor: { data: [ { - description: "huzzah crazy between um atop", - id: "2e5766ce-af39-4abc-b5e2-4794e71df589", + description: "volleyball fast pish except entire queasily reasoning", + id: "63d61b49-9f34-4eb7-ab66-284a6dc29b81", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/getholdsresponsecursor.md b/docs/sdk/models/shared/getholdsresponsecursor.md index c373ebf3..c7a7a3ad 100644 --- a/docs/sdk/models/shared/getholdsresponsecursor.md +++ b/docs/sdk/models/shared/getholdsresponsecursor.md @@ -8,8 +8,8 @@ import { GetHoldsResponseCursor } from "@formance/formance-sdk/sdk/models/shared let value: GetHoldsResponseCursor = { data: [ { - description: "unethically farmer or", - id: "db87e31a-b944-4947-8583-3b63d61b499f", + description: "adjourn suitcase blowgun really arid because consequently", + id: "9fa1d619-365a-4613-b8c0-919d37c22ebb", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/gettransactionsresponse.md b/docs/sdk/models/shared/gettransactionsresponse.md index a2056d8b..baf26d93 100644 --- a/docs/sdk/models/shared/gettransactionsresponse.md +++ b/docs/sdk/models/shared/gettransactionsresponse.md @@ -9,7 +9,7 @@ let value: GetTransactionsResponse = { cursor: { data: [ { - id: 721610, + id: 582536, metadata: { "key": "", }, @@ -50,7 +50,7 @@ let value: GetTransactionsResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-02-08T06:32:17.533Z"), + timestamp: new Date("2023-12-23T01:26:30.649Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/gettransactionsresponsecursor.md b/docs/sdk/models/shared/gettransactionsresponsecursor.md index 9dcecf8c..2247b8e8 100644 --- a/docs/sdk/models/shared/gettransactionsresponsecursor.md +++ b/docs/sdk/models/shared/gettransactionsresponsecursor.md @@ -8,7 +8,7 @@ import { GetTransactionsResponseCursor } from "@formance/formance-sdk/sdk/models let value: GetTransactionsResponseCursor = { data: [ { - id: 151838, + id: 432899, metadata: { "key": "", }, @@ -49,7 +49,7 @@ let value: GetTransactionsResponseCursor = { }, }, reference: "ref:001", - timestamp: new Date("2024-07-11T00:20:48.841Z"), + timestamp: new Date("2023-12-24T00:38:40.863Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/getwalletresponse.md b/docs/sdk/models/shared/getwalletresponse.md index 1c76f5d0..12f0bdeb 100644 --- a/docs/sdk/models/shared/getwalletresponse.md +++ b/docs/sdk/models/shared/getwalletresponse.md @@ -10,12 +10,12 @@ let value: GetWalletResponse = { balances: { main: { assets: { - "key": BigInt("496440"), + "key": BigInt("213371"), }, }, }, - createdAt: new Date("2023-10-19T22:57:45.544Z"), - id: "ae4d7acb-cace-4e5f-9097-3818d25a5657", + createdAt: new Date("2025-06-01T14:18:08.175Z"), + id: "f7c2cf84-2e57-466c-beaf-39abc5e24794", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/getwalletsummaryresponse.md b/docs/sdk/models/shared/getwalletsummaryresponse.md index 9357fa9b..913599b5 100644 --- a/docs/sdk/models/shared/getwalletsummaryresponse.md +++ b/docs/sdk/models/shared/getwalletsummaryresponse.md @@ -7,24 +7,24 @@ import { GetWalletSummaryResponse } from "@formance/formance-sdk/sdk/models/shar let value: GetWalletSummaryResponse = { availableFunds: { - "key": BigInt("144248"), + "key": BigInt("451847"), }, balances: [ { assets: { - "key": BigInt("198812"), + "key": BigInt("100337"), }, name: "", }, ], expirableFunds: { - "key": BigInt("79246"), + "key": BigInt("819052"), }, expiredFunds: { - "key": BigInt("467657"), + "key": BigInt("965454"), }, holdFunds: { - "key": BigInt("845404"), + "key": BigInt("346327"), }, }; ``` diff --git a/docs/sdk/models/shared/getworkflowinstancehistoryresponse.md b/docs/sdk/models/shared/getworkflowinstancehistoryresponse.md index 5c13cc52..5ee99cc7 100644 --- a/docs/sdk/models/shared/getworkflowinstancehistoryresponse.md +++ b/docs/sdk/models/shared/getworkflowinstancehistoryresponse.md @@ -10,7 +10,7 @@ let value: GetWorkflowInstanceHistoryResponse = { { input: {}, name: "", - startedAt: new Date("2024-01-06T23:51:52.329Z"), + startedAt: new Date("2025-04-08T21:22:45.615Z"), terminated: false, }, ], diff --git a/docs/sdk/models/shared/getworkflowinstancehistorystageresponse.md b/docs/sdk/models/shared/getworkflowinstancehistorystageresponse.md index c1e2477a..3466d2f3 100644 --- a/docs/sdk/models/shared/getworkflowinstancehistorystageresponse.md +++ b/docs/sdk/models/shared/getworkflowinstancehistorystageresponse.md @@ -13,7 +13,7 @@ import { let value: GetWorkflowInstanceHistoryStageResponse = { data: [ { - attempt: 442873, + attempt: 274295, input: { createTransaction: { data: { @@ -53,12 +53,7 @@ let value: GetWorkflowInstanceHistoryStageResponse = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { @@ -85,7 +80,7 @@ let value: GetWorkflowInstanceHistoryStageResponse = { output: { createTransaction: { data: { - id: BigInt("321473"), + id: BigInt("701841"), metadata: { "admin": "true", }, @@ -99,7 +94,7 @@ let value: GetWorkflowInstanceHistoryStageResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-06-04T16:57:26.286Z"), + timestamp: new Date("2023-02-03T02:11:26.549Z"), }, }, getAccount: { @@ -140,23 +135,23 @@ let value: GetWorkflowInstanceHistoryStageResponse = { { absolute: false, amount: BigInt("100"), - date: new Date("2023-07-19T04:26:02.056Z"), + date: new Date("2025-08-15T03:47:39.234Z"), raw: {}, - status: OrchestrationPaymentStatus.Pending, + status: OrchestrationPaymentStatus.Terminated, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2024-02-21T07:55:08.869Z"), + createdAt: new Date("2024-07-04T14:57:11.531Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: OrchestrationPaymentScheme.Ach, + scheme: OrchestrationPaymentScheme.Sepa, sourceAccountID: "", - status: OrchestrationPaymentStatus.Pending, + status: OrchestrationPaymentStatus.Failed, type: OrchestrationPaymentType.Payout, }, }, @@ -164,8 +159,8 @@ let value: GetWorkflowInstanceHistoryStageResponse = { cursor: { data: [ { - createdAt: new Date("2022-02-11T16:43:38.291Z"), - id: "faf8c556-a5ef-4031-a037-d37eac8f9036", + createdAt: new Date("2023-04-21T19:31:53.154Z"), + id: "5285ff99-fec5-4537-afe1-0e83aa140323", ledger: "", metadata: { "key": "", @@ -181,7 +176,7 @@ let value: GetWorkflowInstanceHistoryStageResponse = { }, revertTransaction: { data: { - id: BigInt("771931"), + id: BigInt("49499"), metadata: { "admin": "true", }, @@ -195,11 +190,11 @@ let value: GetWorkflowInstanceHistoryStageResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-03-29T17:49:02.841Z"), + timestamp: new Date("2023-04-22T15:11:01.678Z"), }, }, }, - startedAt: new Date("2024-02-18T05:22:25.159Z"), + startedAt: new Date("2023-05-28T01:18:12.153Z"), terminated: false, }, ], diff --git a/docs/sdk/models/shared/getworkflowinstanceresponse.md b/docs/sdk/models/shared/getworkflowinstanceresponse.md index 7944fbcd..965f4cce 100644 --- a/docs/sdk/models/shared/getworkflowinstanceresponse.md +++ b/docs/sdk/models/shared/getworkflowinstanceresponse.md @@ -7,10 +7,10 @@ import { GetWorkflowInstanceResponse } from "@formance/formance-sdk/sdk/models/s let value: GetWorkflowInstanceResponse = { data: { - createdAt: new Date("2024-09-15T17:39:34.108Z"), + createdAt: new Date("2025-05-19T10:28:52.033Z"), id: "", terminated: false, - updatedAt: new Date("2023-05-18T18:14:48.703Z"), + updatedAt: new Date("2024-12-24T07:51:55.110Z"), workflowID: "", }, }; diff --git a/docs/sdk/models/shared/getworkflowresponse.md b/docs/sdk/models/shared/getworkflowresponse.md index d4e60225..5f7a0188 100644 --- a/docs/sdk/models/shared/getworkflowresponse.md +++ b/docs/sdk/models/shared/getworkflowresponse.md @@ -14,9 +14,9 @@ let value: GetWorkflowResponse = { }, ], }, - createdAt: new Date("2024-03-10T15:41:52.150Z"), + createdAt: new Date("2025-09-23T08:46:33.172Z"), id: "", - updatedAt: new Date("2023-10-30T13:36:21.210Z"), + updatedAt: new Date("2023-07-25T08:20:28.144Z"), }, }; ``` diff --git a/docs/sdk/models/shared/hold.md b/docs/sdk/models/shared/hold.md index b52c1b61..5f8ade0f 100644 --- a/docs/sdk/models/shared/hold.md +++ b/docs/sdk/models/shared/hold.md @@ -6,8 +6,8 @@ import { Hold } from "@formance/formance-sdk/sdk/models/shared"; let value: Hold = { - description: "vacation separately utter", - id: "9eb18445-59a4-4209-920e-81df7016e2d0", + description: "spring midst yuck", + id: "5808db9f-fd97-409f-9d52-cbfd817584dd", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/key.md b/docs/sdk/models/shared/key.md index 4d0e9de6..50d84822 100644 --- a/docs/sdk/models/shared/key.md +++ b/docs/sdk/models/shared/key.md @@ -6,7 +6,7 @@ import { Key } from "@formance/formance-sdk/sdk/models/shared"; let value: Key = { - dataType: "boolean", + dataType: "bigint", required: false, }; ``` diff --git a/docs/sdk/models/shared/listrunsresponse.md b/docs/sdk/models/shared/listrunsresponse.md index d3f7d94a..1b5c3477 100644 --- a/docs/sdk/models/shared/listrunsresponse.md +++ b/docs/sdk/models/shared/listrunsresponse.md @@ -8,10 +8,10 @@ import { ListRunsResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: ListRunsResponse = { data: [ { - createdAt: new Date("2022-07-22T21:18:05.375Z"), + createdAt: new Date("2025-02-03T17:02:52.370Z"), id: "", terminated: false, - updatedAt: new Date("2022-01-07T19:10:28.633Z"), + updatedAt: new Date("2025-11-29T12:45:09.445Z"), workflowID: "", }, ], diff --git a/docs/sdk/models/shared/listtriggersoccurrencesresponse.md b/docs/sdk/models/shared/listtriggersoccurrencesresponse.md index 7a967127..0572fb14 100644 --- a/docs/sdk/models/shared/listtriggersoccurrencesresponse.md +++ b/docs/sdk/models/shared/listtriggersoccurrencesresponse.md @@ -8,7 +8,7 @@ import { ListTriggersOccurrencesResponse } from "@formance/formance-sdk/sdk/mode let value: ListTriggersOccurrencesResponse = { data: [ { - date: new Date("2023-08-07T04:09:31.431Z"), + date: new Date("2023-08-10T08:31:29.759Z"), event: { "key": "", }, diff --git a/docs/sdk/models/shared/listtriggersresponse.md b/docs/sdk/models/shared/listtriggersresponse.md index bf009a17..b3e2cb19 100644 --- a/docs/sdk/models/shared/listtriggersresponse.md +++ b/docs/sdk/models/shared/listtriggersresponse.md @@ -8,7 +8,7 @@ import { ListTriggersResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: ListTriggersResponse = { data: [ { - createdAt: new Date("2022-01-11T04:13:05.469Z"), + createdAt: new Date("2023-07-12T02:26:50.159Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/listwalletsresponse.md b/docs/sdk/models/shared/listwalletsresponse.md index 81a1787b..fa691f43 100644 --- a/docs/sdk/models/shared/listwalletsresponse.md +++ b/docs/sdk/models/shared/listwalletsresponse.md @@ -9,8 +9,8 @@ let value: ListWalletsResponse = { cursor: { data: [ { - createdAt: new Date("2022-03-31T12:16:51.444Z"), - id: "75c6e3e9-184b-4a16-9e6b-1d8f8cfb9506", + createdAt: new Date("2024-08-29T20:53:49.925Z"), + id: "d25a5657-5231-47d1-aa6d-5b68cf2820bf", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/listwalletsresponsecursor.md b/docs/sdk/models/shared/listwalletsresponsecursor.md index de1511c2..bb39b02a 100644 --- a/docs/sdk/models/shared/listwalletsresponsecursor.md +++ b/docs/sdk/models/shared/listwalletsresponsecursor.md @@ -8,8 +8,8 @@ import { ListWalletsResponseCursor } from "@formance/formance-sdk/sdk/models/sha let value: ListWalletsResponseCursor = { data: [ { - createdAt: new Date("2022-04-10T05:51:20.510Z"), - id: "a6d5b68c-f282-40bf-a910-560d7fe8a542", + createdAt: new Date("2024-08-30T21:20:41.456Z"), + id: "9c2db090-79ae-44d7-8acb-cacee5f09738", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/listworkflowsresponse.md b/docs/sdk/models/shared/listworkflowsresponse.md index a0e926b7..6354e52c 100644 --- a/docs/sdk/models/shared/listworkflowsresponse.md +++ b/docs/sdk/models/shared/listworkflowsresponse.md @@ -15,9 +15,9 @@ let value: ListWorkflowsResponse = { }, ], }, - createdAt: new Date("2023-12-08T03:37:51.949Z"), + createdAt: new Date("2025-05-03T22:51:53.391Z"), id: "", - updatedAt: new Date("2024-02-22T20:56:35.365Z"), + updatedAt: new Date("2024-06-21T15:24:08.414Z"), }, ], }; diff --git a/docs/sdk/models/shared/log.md b/docs/sdk/models/shared/log.md index 363ac0ca..9e698821 100644 --- a/docs/sdk/models/shared/log.md +++ b/docs/sdk/models/shared/log.md @@ -9,10 +9,10 @@ let value: Log = { data: { "key": "", }, - date: new Date("2023-08-24T21:19:59.665Z"), + date: new Date("2024-11-30T21:58:32.911Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: 1234, - type: Type.SetMetadata, + type: Type.NewTransaction, }; ``` diff --git a/docs/sdk/models/shared/logscursorresponse.md b/docs/sdk/models/shared/logscursorresponse.md index b9015325..a6ae0a92 100644 --- a/docs/sdk/models/shared/logscursorresponse.md +++ b/docs/sdk/models/shared/logscursorresponse.md @@ -12,11 +12,11 @@ let value: LogsCursorResponse = { data: { "key": "", }, - date: new Date("2024-02-15T22:46:04.284Z"), + date: new Date("2025-08-02T07:17:19.375Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: 1234, - type: Type.SetMetadata, + type: Type.NewTransaction, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/logscursorresponsecursor.md b/docs/sdk/models/shared/logscursorresponsecursor.md index 2e9fae80..2dabbf2c 100644 --- a/docs/sdk/models/shared/logscursorresponsecursor.md +++ b/docs/sdk/models/shared/logscursorresponsecursor.md @@ -11,7 +11,7 @@ let value: LogsCursorResponseCursor = { data: { "key": "", }, - date: new Date("2024-04-20T04:24:39.583Z"), + date: new Date("2025-11-12T17:32:52.430Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: 1234, type: Type.SetMetadata, diff --git a/docs/sdk/models/shared/monetary.md b/docs/sdk/models/shared/monetary.md index 81b8fb70..7d255ea6 100644 --- a/docs/sdk/models/shared/monetary.md +++ b/docs/sdk/models/shared/monetary.md @@ -6,7 +6,7 @@ import { Monetary } from "@formance/formance-sdk/sdk/models/shared"; let value: Monetary = { - amount: BigInt("642804"), + amount: BigInt("219860"), asset: "", }; ``` diff --git a/docs/sdk/models/shared/orchestrationconnector.md b/docs/sdk/models/shared/orchestrationconnector.md index 4aad8b51..c13dfef4 100644 --- a/docs/sdk/models/shared/orchestrationconnector.md +++ b/docs/sdk/models/shared/orchestrationconnector.md @@ -5,7 +5,7 @@ ```typescript import { OrchestrationConnector } from "@formance/formance-sdk/sdk/models/shared"; -let value: OrchestrationConnector = OrchestrationConnector.DummyPay; +let value: OrchestrationConnector = OrchestrationConnector.Moneycorp; ``` ## Values diff --git a/docs/sdk/models/shared/orchestrationcreditwalletrequest.md b/docs/sdk/models/shared/orchestrationcreditwalletrequest.md index 0b1ba97c..e5701169 100644 --- a/docs/sdk/models/shared/orchestrationcreditwalletrequest.md +++ b/docs/sdk/models/shared/orchestrationcreditwalletrequest.md @@ -13,12 +13,7 @@ let value: OrchestrationCreditWalletRequest = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }; ``` diff --git a/docs/sdk/models/shared/orchestrationlistwalletsresponse.md b/docs/sdk/models/shared/orchestrationlistwalletsresponse.md index 84774a24..58a56d45 100644 --- a/docs/sdk/models/shared/orchestrationlistwalletsresponse.md +++ b/docs/sdk/models/shared/orchestrationlistwalletsresponse.md @@ -9,8 +9,8 @@ let value: OrchestrationListWalletsResponse = { cursor: { data: [ { - createdAt: new Date("2022-07-23T02:28:15.732Z"), - id: "687cfc1c-1323-48a7-bf3c-d8796866b12d", + createdAt: new Date("2023-11-23T21:03:26.961Z"), + id: "d95dcfd6-2d05-4efa-9b08-8513569b5500", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/orchestrationlistwalletsresponsecursor.md b/docs/sdk/models/shared/orchestrationlistwalletsresponsecursor.md index d0044eb2..186cff82 100644 --- a/docs/sdk/models/shared/orchestrationlistwalletsresponsecursor.md +++ b/docs/sdk/models/shared/orchestrationlistwalletsresponsecursor.md @@ -8,8 +8,8 @@ import { OrchestrationListWalletsResponseCursor } from "@formance/formance-sdk/s let value: OrchestrationListWalletsResponseCursor = { data: [ { - createdAt: new Date("2023-12-15T09:38:31.047Z"), - id: "da6669ee-0213-458a-bbef-adc4e0047a1a", + createdAt: new Date("2024-10-20T23:59:41.091Z"), + id: "c6bc5fae-8bce-4286-9e1f-e17bbec47b23", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/orchestrationpayment.md b/docs/sdk/models/shared/orchestrationpayment.md index f9c254fa..6824fadb 100644 --- a/docs/sdk/models/shared/orchestrationpayment.md +++ b/docs/sdk/models/shared/orchestrationpayment.md @@ -15,24 +15,24 @@ let value: OrchestrationPayment = { { absolute: false, amount: BigInt("100"), - date: new Date("2024-04-25T16:14:24.819Z"), + date: new Date("2024-01-07T15:32:38.599Z"), raw: {}, - status: OrchestrationPaymentStatus.Failed, + status: OrchestrationPaymentStatus.Active, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2024-12-09T08:09:09.462Z"), + createdAt: new Date("2025-05-30T01:27:51.669Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: OrchestrationPaymentScheme.Mastercard, + scheme: OrchestrationPaymentScheme.AchDebit, sourceAccountID: "", - status: OrchestrationPaymentStatus.Succeeded, - type: OrchestrationPaymentType.Payout, + status: OrchestrationPaymentStatus.Failed, + type: OrchestrationPaymentType.Other, }; ``` diff --git a/docs/sdk/models/shared/orchestrationpaymentadjustment.md b/docs/sdk/models/shared/orchestrationpaymentadjustment.md index ca9866c8..2232f058 100644 --- a/docs/sdk/models/shared/orchestrationpaymentadjustment.md +++ b/docs/sdk/models/shared/orchestrationpaymentadjustment.md @@ -8,7 +8,7 @@ import { OrchestrationPaymentAdjustment, OrchestrationPaymentStatus } from "@for let value: OrchestrationPaymentAdjustment = { absolute: false, amount: BigInt("100"), - date: new Date("2024-05-14T18:51:09.710Z"), + date: new Date("2023-05-08T15:26:57.975Z"), raw: {}, status: OrchestrationPaymentStatus.Pending, }; diff --git a/docs/sdk/models/shared/orchestrationpaymentscheme.md b/docs/sdk/models/shared/orchestrationpaymentscheme.md index 93b419d1..3e95ef92 100644 --- a/docs/sdk/models/shared/orchestrationpaymentscheme.md +++ b/docs/sdk/models/shared/orchestrationpaymentscheme.md @@ -5,7 +5,7 @@ ```typescript import { OrchestrationPaymentScheme } from "@formance/formance-sdk/sdk/models/shared"; -let value: OrchestrationPaymentScheme = OrchestrationPaymentScheme.Mastercard; +let value: OrchestrationPaymentScheme = OrchestrationPaymentScheme.Visa; ``` ## Values diff --git a/docs/sdk/models/shared/orchestrationpaymentstatus.md b/docs/sdk/models/shared/orchestrationpaymentstatus.md index e02ab6a7..cc43bc18 100644 --- a/docs/sdk/models/shared/orchestrationpaymentstatus.md +++ b/docs/sdk/models/shared/orchestrationpaymentstatus.md @@ -5,7 +5,7 @@ ```typescript import { OrchestrationPaymentStatus } from "@formance/formance-sdk/sdk/models/shared"; -let value: OrchestrationPaymentStatus = OrchestrationPaymentStatus.Terminated; +let value: OrchestrationPaymentStatus = OrchestrationPaymentStatus.Pending; ``` ## Values diff --git a/docs/sdk/models/shared/orchestrationpaymenttype.md b/docs/sdk/models/shared/orchestrationpaymenttype.md index 56d1d906..989e0f22 100644 --- a/docs/sdk/models/shared/orchestrationpaymenttype.md +++ b/docs/sdk/models/shared/orchestrationpaymenttype.md @@ -5,7 +5,7 @@ ```typescript import { OrchestrationPaymentType } from "@formance/formance-sdk/sdk/models/shared"; -let value: OrchestrationPaymentType = OrchestrationPaymentType.Other; +let value: OrchestrationPaymentType = OrchestrationPaymentType.PayIn; ``` ## Values diff --git a/docs/sdk/models/shared/orchestrationtransaction.md b/docs/sdk/models/shared/orchestrationtransaction.md index d62ba16c..009edb59 100644 --- a/docs/sdk/models/shared/orchestrationtransaction.md +++ b/docs/sdk/models/shared/orchestrationtransaction.md @@ -6,7 +6,7 @@ import { OrchestrationTransaction } from "@formance/formance-sdk/sdk/models/shared"; let value: OrchestrationTransaction = { - id: BigInt("656839"), + id: BigInt("197982"), metadata: { "admin": "true", }, @@ -20,7 +20,7 @@ let value: OrchestrationTransaction = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-04-27T17:15:09.840Z"), + timestamp: new Date("2024-03-19T15:09:55.930Z"), }; ``` diff --git a/docs/sdk/models/shared/orchestrationv2transaction.md b/docs/sdk/models/shared/orchestrationv2transaction.md index c9c361a6..842dae7d 100644 --- a/docs/sdk/models/shared/orchestrationv2transaction.md +++ b/docs/sdk/models/shared/orchestrationv2transaction.md @@ -18,8 +18,8 @@ let value: OrchestrationV2Transaction = { }, ], reference: "ref:001", - timestamp: new Date("2022-03-28T08:49:02.228Z"), - txid: BigInt("748656"), + timestamp: new Date("2024-05-08T01:09:28.036Z"), + txid: BigInt("227129"), }; ``` diff --git a/docs/sdk/models/shared/orchestrationwallet.md b/docs/sdk/models/shared/orchestrationwallet.md index c32f4549..5aacda79 100644 --- a/docs/sdk/models/shared/orchestrationwallet.md +++ b/docs/sdk/models/shared/orchestrationwallet.md @@ -6,8 +6,8 @@ import { OrchestrationWallet } from "@formance/formance-sdk/sdk/models/shared"; let value: OrchestrationWallet = { - createdAt: new Date("2022-11-05T11:21:31.834Z"), - id: "6ed9306a-dd03-453c-8c8f-2e12b196becd", + createdAt: new Date("2025-03-22T07:24:15.908Z"), + id: "accdbfe9-90f2-4bd5-a31b-7be2e64ff3a1", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/payment.md b/docs/sdk/models/shared/payment.md index b347e283..44e5b176 100644 --- a/docs/sdk/models/shared/payment.md +++ b/docs/sdk/models/shared/payment.md @@ -9,16 +9,16 @@ let value: Payment = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2024-07-22T01:12:42.157Z"), + createdAt: new Date("2024-04-22T16:22:02.173Z"), raw: {}, reference: "", - status: PaymentStatus.Cancelled, + status: PaymentStatus.DisputeWon, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2024-04-10T23:15:28.772Z"), + createdAt: new Date("2024-07-31T03:16:20.550Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -27,10 +27,10 @@ let value: Payment = { }, raw: {}, reference: "", - scheme: PaymentScheme.GooglePay, + scheme: PaymentScheme.AchDebit, sourceAccountID: "", - status: PaymentStatus.Other, - type: PaymentType.Payout, + status: PaymentStatus.DisputeLost, + type: PaymentType.PayIn, }; ``` diff --git a/docs/sdk/models/shared/paymentadjustment.md b/docs/sdk/models/shared/paymentadjustment.md index 5c38d2c9..c2f4120d 100644 --- a/docs/sdk/models/shared/paymentadjustment.md +++ b/docs/sdk/models/shared/paymentadjustment.md @@ -7,10 +7,10 @@ import { PaymentAdjustment, PaymentStatus } from "@formance/formance-sdk/sdk/mod let value: PaymentAdjustment = { amount: BigInt("100"), - createdAt: new Date("2024-04-09T11:43:44.154Z"), + createdAt: new Date("2023-01-26T11:12:58.424Z"), raw: {}, reference: "", - status: PaymentStatus.DisputeWon, + status: PaymentStatus.Refunded, }; ``` diff --git a/docs/sdk/models/shared/paymentrequest.md b/docs/sdk/models/shared/paymentrequest.md index 9d43ffa4..be676f6f 100644 --- a/docs/sdk/models/shared/paymentrequest.md +++ b/docs/sdk/models/shared/paymentrequest.md @@ -9,10 +9,10 @@ let value: PaymentRequest = { amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2024-01-04T23:23:29.876Z"), + createdAt: new Date("2023-08-13T10:34:08.199Z"), reference: "", - scheme: PaymentScheme.Diners, - status: PaymentStatus.DisputeLost, + scheme: PaymentScheme.Other, + status: PaymentStatus.RefundedFailure, type: PaymentType.Other, }; ``` diff --git a/docs/sdk/models/shared/paymentresponse.md b/docs/sdk/models/shared/paymentresponse.md index 7c34948c..608bf0a7 100644 --- a/docs/sdk/models/shared/paymentresponse.md +++ b/docs/sdk/models/shared/paymentresponse.md @@ -12,16 +12,16 @@ let value: PaymentResponse = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2024-01-05T13:57:54.417Z"), + createdAt: new Date("2025-06-12T22:00:17.977Z"), raw: {}, reference: "", - status: PaymentStatus.Refunded, + status: PaymentStatus.DisputeWon, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2024-02-09T18:19:43.714Z"), + createdAt: new Date("2023-11-12T11:10:45.405Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -30,10 +30,10 @@ let value: PaymentResponse = { }, raw: {}, reference: "", - scheme: PaymentScheme.Dragonpay, + scheme: PaymentScheme.SepaDebit, sourceAccountID: "", status: PaymentStatus.Cancelled, - type: PaymentType.Transfer, + type: PaymentType.PayIn, }, }; ``` diff --git a/docs/sdk/models/shared/paymentsaccount.md b/docs/sdk/models/shared/paymentsaccount.md index 6640d9b7..69e6e5e6 100644 --- a/docs/sdk/models/shared/paymentsaccount.md +++ b/docs/sdk/models/shared/paymentsaccount.md @@ -8,7 +8,7 @@ import { AccountType, PaymentsAccount } from "@formance/formance-sdk/sdk/models/ let value: PaymentsAccount = { accountName: "", connectorID: "", - createdAt: new Date("2023-04-10T05:03:15.773Z"), + createdAt: new Date("2024-05-24T01:57:15.304Z"), defaultAsset: "", defaultCurrency: "", id: "", @@ -17,7 +17,7 @@ let value: PaymentsAccount = { }, raw: {}, reference: "", - type: AccountType.Internal, + type: AccountType.Unknown, }; ``` diff --git a/docs/sdk/models/shared/paymentsaccountresponse.md b/docs/sdk/models/shared/paymentsaccountresponse.md index 2d0c4616..ba9013b6 100644 --- a/docs/sdk/models/shared/paymentsaccountresponse.md +++ b/docs/sdk/models/shared/paymentsaccountresponse.md @@ -11,7 +11,7 @@ let value: PaymentsAccountResponse = { data: { accountName: "", connectorID: "", - createdAt: new Date("2023-07-15T06:41:15.268Z"), + createdAt: new Date("2025-05-01T19:16:39.101Z"), defaultAsset: "", defaultCurrency: "", id: "", @@ -20,7 +20,7 @@ let value: PaymentsAccountResponse = { }, raw: {}, reference: "", - type: AccountType.External, + type: AccountType.Unknown, }, }; ``` diff --git a/docs/sdk/models/shared/paymentscheme.md b/docs/sdk/models/shared/paymentscheme.md index 3322b276..a488ae2f 100644 --- a/docs/sdk/models/shared/paymentscheme.md +++ b/docs/sdk/models/shared/paymentscheme.md @@ -5,7 +5,7 @@ ```typescript import { PaymentScheme } from "@formance/formance-sdk/sdk/models/shared"; -let value: PaymentScheme = PaymentScheme.Discover; +let value: PaymentScheme = PaymentScheme.Rtp; ``` ## Values diff --git a/docs/sdk/models/shared/paymentscursor.md b/docs/sdk/models/shared/paymentscursor.md index 32b03b6f..14299835 100644 --- a/docs/sdk/models/shared/paymentscursor.md +++ b/docs/sdk/models/shared/paymentscursor.md @@ -14,16 +14,16 @@ let value: PaymentsCursor = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2024-06-28T14:08:46.947Z"), + createdAt: new Date("2024-12-24T23:57:09.287Z"), raw: {}, reference: "", - status: PaymentStatus.Dispute, + status: PaymentStatus.RefundedFailure, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2024-04-23T20:01:53.080Z"), + createdAt: new Date("2025-02-19T13:19:29.819Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -32,9 +32,9 @@ let value: PaymentsCursor = { }, raw: {}, reference: "", - scheme: PaymentScheme.SepaDebit, + scheme: PaymentScheme.Visa, sourceAccountID: "", - status: PaymentStatus.Other, + status: PaymentStatus.Expired, type: PaymentType.PayIn, }, ], diff --git a/docs/sdk/models/shared/paymentscursorcursor.md b/docs/sdk/models/shared/paymentscursorcursor.md index 4eec6daa..572745a9 100644 --- a/docs/sdk/models/shared/paymentscursorcursor.md +++ b/docs/sdk/models/shared/paymentscursorcursor.md @@ -11,16 +11,16 @@ let value: PaymentsCursorCursor = { adjustments: [ { amount: BigInt("100"), - createdAt: new Date("2024-05-04T05:05:58.982Z"), + createdAt: new Date("2025-06-15T14:10:54.332Z"), raw: {}, reference: "", - status: PaymentStatus.DisputeWon, + status: PaymentStatus.Dispute, }, ], amount: BigInt("100"), asset: "USD", connectorID: "", - createdAt: new Date("2024-12-05T11:32:24.689Z"), + createdAt: new Date("2024-05-21T03:29:50.109Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -31,8 +31,8 @@ let value: PaymentsCursorCursor = { reference: "", scheme: PaymentScheme.Alipay, sourceAccountID: "", - status: PaymentStatus.Expired, - type: PaymentType.PayIn, + status: PaymentStatus.DisputeWon, + type: PaymentType.Transfer, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/paymentstatus.md b/docs/sdk/models/shared/paymentstatus.md index 67f031e7..40a0b710 100644 --- a/docs/sdk/models/shared/paymentstatus.md +++ b/docs/sdk/models/shared/paymentstatus.md @@ -5,7 +5,7 @@ ```typescript import { PaymentStatus } from "@formance/formance-sdk/sdk/models/shared"; -let value: PaymentStatus = PaymentStatus.Failed; +let value: PaymentStatus = PaymentStatus.RefundedFailure; ``` ## Values diff --git a/docs/sdk/models/shared/paymenttype.md b/docs/sdk/models/shared/paymenttype.md index dee5f540..1e9a70d0 100644 --- a/docs/sdk/models/shared/paymenttype.md +++ b/docs/sdk/models/shared/paymenttype.md @@ -5,7 +5,7 @@ ```typescript import { PaymentType } from "@formance/formance-sdk/sdk/models/shared"; -let value: PaymentType = PaymentType.PayIn; +let value: PaymentType = PaymentType.Transfer; ``` ## Values diff --git a/docs/sdk/models/shared/readtriggerresponse.md b/docs/sdk/models/shared/readtriggerresponse.md index 33430ff9..ef829495 100644 --- a/docs/sdk/models/shared/readtriggerresponse.md +++ b/docs/sdk/models/shared/readtriggerresponse.md @@ -7,7 +7,7 @@ import { ReadTriggerResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: ReadTriggerResponse = { data: { - createdAt: new Date("2023-06-26T06:38:15.965Z"), + createdAt: new Date("2024-10-30T05:11:34.005Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/reconciliation.md b/docs/sdk/models/shared/reconciliation.md index 52dce45b..b11b9b05 100644 --- a/docs/sdk/models/shared/reconciliation.md +++ b/docs/sdk/models/shared/reconciliation.md @@ -8,14 +8,14 @@ import { Reconciliation } from "@formance/formance-sdk/sdk/models/shared"; let value: Reconciliation = { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("192649"), + "key": BigInt("952411"), }, id: "XXX", ledgerBalances: { - "key": BigInt("419683"), + "key": BigInt("228618"), }, paymentsBalances: { - "key": BigInt("653492"), + "key": BigInt("837202"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), diff --git a/docs/sdk/models/shared/reconciliationresponse.md b/docs/sdk/models/shared/reconciliationresponse.md index a613b22b..f4a9c805 100644 --- a/docs/sdk/models/shared/reconciliationresponse.md +++ b/docs/sdk/models/shared/reconciliationresponse.md @@ -11,14 +11,14 @@ let value: ReconciliationResponse = { data: { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("676140"), + "key": BigInt("335086"), }, id: "XXX", ledgerBalances: { - "key": BigInt("278231"), + "key": BigInt("324600"), }, paymentsBalances: { - "key": BigInt("406914"), + "key": BigInt("995733"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), diff --git a/docs/sdk/models/shared/reconciliationscursorresponse.md b/docs/sdk/models/shared/reconciliationscursorresponse.md index 0dcf3a1c..ea08f0f1 100644 --- a/docs/sdk/models/shared/reconciliationscursorresponse.md +++ b/docs/sdk/models/shared/reconciliationscursorresponse.md @@ -13,14 +13,14 @@ let value: ReconciliationsCursorResponse = { { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("416367"), + "key": BigInt("904920"), }, id: "XXX", ledgerBalances: { - "key": BigInt("105549"), + "key": BigInt("573674"), }, paymentsBalances: { - "key": BigInt("477074"), + "key": BigInt("294151"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), diff --git a/docs/sdk/models/shared/reconciliationscursorresponsecursor.md b/docs/sdk/models/shared/reconciliationscursorresponsecursor.md index 33192e58..28794d4a 100644 --- a/docs/sdk/models/shared/reconciliationscursorresponsecursor.md +++ b/docs/sdk/models/shared/reconciliationscursorresponsecursor.md @@ -10,14 +10,14 @@ let value: ReconciliationsCursorResponseCursor = { { createdAt: new Date("2021-01-01T00:00:00.000Z"), driftBalances: { - "key": BigInt("944689"), + "key": BigInt("342458"), }, id: "XXX", ledgerBalances: { - "key": BigInt("663457"), + "key": BigInt("979244"), }, paymentsBalances: { - "key": BigInt("525160"), + "key": BigInt("849818"), }, policyID: "XXX", reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), diff --git a/docs/sdk/models/shared/reversetransferinitiationrequest.md b/docs/sdk/models/shared/reversetransferinitiationrequest.md index 2cdad3ec..9c1b6384 100644 --- a/docs/sdk/models/shared/reversetransferinitiationrequest.md +++ b/docs/sdk/models/shared/reversetransferinitiationrequest.md @@ -6,9 +6,9 @@ import { ReverseTransferInitiationRequest } from "@formance/formance-sdk/sdk/models/shared"; let value: ReverseTransferInitiationRequest = { - amount: BigInt("630017"), + amount: BigInt("350222"), asset: "USD", - description: "developmental baseboard basket out and", + description: "defiantly rightfully behind tuxedo", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/runworkflowresponse.md b/docs/sdk/models/shared/runworkflowresponse.md index acba3a48..72a345db 100644 --- a/docs/sdk/models/shared/runworkflowresponse.md +++ b/docs/sdk/models/shared/runworkflowresponse.md @@ -7,10 +7,10 @@ import { RunWorkflowResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: RunWorkflowResponse = { data: { - createdAt: new Date("2023-09-30T18:00:24.289Z"), + createdAt: new Date("2023-08-22T02:23:53.093Z"), id: "", terminated: false, - updatedAt: new Date("2022-05-19T11:58:16.990Z"), + updatedAt: new Date("2024-06-06T08:51:38.406Z"), workflowID: "", }, }; diff --git a/docs/sdk/models/shared/scheme.md b/docs/sdk/models/shared/scheme.md index 6bfecaad..d1cb0f85 100644 --- a/docs/sdk/models/shared/scheme.md +++ b/docs/sdk/models/shared/scheme.md @@ -5,7 +5,7 @@ ```typescript import { Scheme } from "@formance/formance-sdk/sdk/models/shared"; -let value: Scheme = Scheme.Jcb; +let value: Scheme = Scheme.AchDebit; ``` ## Values diff --git a/docs/sdk/models/shared/scriptresponse.md b/docs/sdk/models/shared/scriptresponse.md index a8d7f3ab..94263e41 100644 --- a/docs/sdk/models/shared/scriptresponse.md +++ b/docs/sdk/models/shared/scriptresponse.md @@ -52,8 +52,8 @@ let value: ScriptResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-02-10T05:07:51.800Z"), - txid: BigInt("147400"), + timestamp: new Date("2024-08-24T12:51:13.766Z"), + txid: BigInt("473326"), }, }; ``` diff --git a/docs/sdk/models/shared/stagestatus.md b/docs/sdk/models/shared/stagestatus.md index c5838279..7d10bc96 100644 --- a/docs/sdk/models/shared/stagestatus.md +++ b/docs/sdk/models/shared/stagestatus.md @@ -7,8 +7,8 @@ import { StageStatus } from "@formance/formance-sdk/sdk/models/shared"; let value: StageStatus = { instanceID: "", - stage: 6778.95, - startedAt: new Date("2022-12-17T12:54:38.255Z"), + stage: 9440.33, + startedAt: new Date("2023-02-10T05:07:51.800Z"), }; ``` diff --git a/docs/sdk/models/shared/state.md b/docs/sdk/models/shared/state.md index 01ed3204..7321c54e 100644 --- a/docs/sdk/models/shared/state.md +++ b/docs/sdk/models/shared/state.md @@ -5,7 +5,7 @@ ```typescript import { State } from "@formance/formance-sdk/sdk/models/shared"; -let value: State = State.ToDo; +let value: State = State.Done; ``` ## Values diff --git a/docs/sdk/models/shared/stats.md b/docs/sdk/models/shared/stats.md index 3b0b4e9f..eb63131c 100644 --- a/docs/sdk/models/shared/stats.md +++ b/docs/sdk/models/shared/stats.md @@ -6,8 +6,8 @@ import { Stats } from "@formance/formance-sdk/sdk/models/shared"; let value: Stats = { - accounts: 774880, - transactions: 944033, + accounts: 300651, + transactions: 800799, }; ``` diff --git a/docs/sdk/models/shared/statsresponse.md b/docs/sdk/models/shared/statsresponse.md index d5c6590d..1352f27d 100644 --- a/docs/sdk/models/shared/statsresponse.md +++ b/docs/sdk/models/shared/statsresponse.md @@ -7,8 +7,8 @@ import { StatsResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: StatsResponse = { data: { - accounts: 659971, - transactions: 580238, + accounts: 748023, + transactions: 793568, }, }; ``` diff --git a/docs/sdk/models/shared/status.md b/docs/sdk/models/shared/status.md index 2779ac9e..7ea05192 100644 --- a/docs/sdk/models/shared/status.md +++ b/docs/sdk/models/shared/status.md @@ -5,7 +5,7 @@ ```typescript import { Status } from "@formance/formance-sdk/sdk/models/shared"; -let value: Status = Status.Rejected; +let value: Status = Status.Processed; ``` ## Values diff --git a/docs/sdk/models/shared/taskbankingcircle.md b/docs/sdk/models/shared/taskbankingcircle.md index 3735d8ee..1d30c8dd 100644 --- a/docs/sdk/models/shared/taskbankingcircle.md +++ b/docs/sdk/models/shared/taskbankingcircle.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskBankingCircle } from "@formance/formance-sdk/sdk/mod let value: TaskBankingCircle = { connectorID: "", - createdAt: new Date("2024-02-07T04:30:16.073Z"), + createdAt: new Date("2025-03-30T02:29:26.135Z"), descriptor: {}, - id: "946a2668-85c1-406e-a42e-25b436ce02f9", + id: "d2caef11-c23e-4f5d-8d99-949326b9fa22", state: {}, - status: PaymentStatus.DisputeWon, - updatedAt: new Date("2022-02-13T14:27:35.536Z"), + status: PaymentStatus.Cancelled, + updatedAt: new Date("2024-10-17T08:30:01.769Z"), }; ``` diff --git a/docs/sdk/models/shared/taskcurrencycloud.md b/docs/sdk/models/shared/taskcurrencycloud.md index 48deda1d..d768c798 100644 --- a/docs/sdk/models/shared/taskcurrencycloud.md +++ b/docs/sdk/models/shared/taskcurrencycloud.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskCurrencyCloud } from "@formance/formance-sdk/sdk/mod let value: TaskCurrencyCloud = { connectorID: "", - createdAt: new Date("2023-06-08T00:51:36.478Z"), + createdAt: new Date("2024-06-24T07:10:39.639Z"), descriptor: {}, - id: "99f24b3d-5209-4d4e-ac09-93570226bd2c", + id: "b1329304-a95d-4448-a772-846bec69b652", state: {}, status: PaymentStatus.DisputeLost, - updatedAt: new Date("2024-11-27T19:05:06.518Z"), + updatedAt: new Date("2023-12-13T23:26:10.852Z"), }; ``` diff --git a/docs/sdk/models/shared/taskdummypay.md b/docs/sdk/models/shared/taskdummypay.md index dc0317b1..94bd25d9 100644 --- a/docs/sdk/models/shared/taskdummypay.md +++ b/docs/sdk/models/shared/taskdummypay.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskDummyPay } from "@formance/formance-sdk/sdk/models/s let value: TaskDummyPay = { connectorID: "", - createdAt: new Date("2022-05-17T09:48:42.675Z"), + createdAt: new Date("2025-05-08T17:23:17.763Z"), descriptor: {}, - id: "1c23ef5d-d999-4493-b26b-9fa22139de68", + id: "9c6b6187-4e60-466d-9c3d-3510ae7dcafc", state: {}, - status: PaymentStatus.Failed, - updatedAt: new Date("2023-10-15T20:28:38.974Z"), + status: PaymentStatus.DisputeWon, + updatedAt: new Date("2025-01-29T03:46:18.998Z"), }; ``` diff --git a/docs/sdk/models/shared/taskmangopay.md b/docs/sdk/models/shared/taskmangopay.md index 2bf8e73d..9fa3304a 100644 --- a/docs/sdk/models/shared/taskmangopay.md +++ b/docs/sdk/models/shared/taskmangopay.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskMangoPay } from "@formance/formance-sdk/sdk/models/s let value: TaskMangoPay = { connectorID: "", - createdAt: new Date("2022-01-16T03:56:55.503Z"), + createdAt: new Date("2025-07-07T18:17:14.780Z"), descriptor: {}, - id: "fdb27ee0-c0f6-4f54-95b3-d9ff2f00ff27", + id: "e68c4927-2766-4324-a3bb-91910539ebcf", state: {}, - status: PaymentStatus.DisputeLost, - updatedAt: new Date("2023-11-20T04:44:06.594Z"), + status: PaymentStatus.RefundedFailure, + updatedAt: new Date("2024-10-21T15:32:06.862Z"), }; ``` diff --git a/docs/sdk/models/shared/taskmodulr.md b/docs/sdk/models/shared/taskmodulr.md index 121557a7..8a41f79f 100644 --- a/docs/sdk/models/shared/taskmodulr.md +++ b/docs/sdk/models/shared/taskmodulr.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskModulr } from "@formance/formance-sdk/sdk/models/sha let value: TaskModulr = { connectorID: "", - createdAt: new Date("2022-07-10T19:03:58.934Z"), + createdAt: new Date("2024-03-13T20:59:08.982Z"), descriptor: {}, - id: "72766324-3bb9-4191-9053-9ebcfa99d6ca", + id: "13c3fb79-9f24-4b3d-8520-9d4ec0993570", state: {}, - status: PaymentStatus.Pending, - updatedAt: new Date("2022-08-19T01:44:07.509Z"), + status: PaymentStatus.Succeeded, + updatedAt: new Date("2024-02-20T15:25:02.227Z"), }; ``` diff --git a/docs/sdk/models/shared/taskmoneycorp.md b/docs/sdk/models/shared/taskmoneycorp.md index 3875f787..ac584280 100644 --- a/docs/sdk/models/shared/taskmoneycorp.md +++ b/docs/sdk/models/shared/taskmoneycorp.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskMoneycorp } from "@formance/formance-sdk/sdk/models/ let value: TaskMoneycorp = { connectorID: "", - createdAt: new Date("2024-04-28T22:11:42.800Z"), + createdAt: new Date("2025-08-06T22:08:29.288Z"), descriptor: {}, - id: "7abb0150-66e9-4be7-a04d-e54e5a418e93", + id: "6ca403b9-46a2-4668-985c-106e42e25b43", state: {}, status: PaymentStatus.DisputeWon, - updatedAt: new Date("2022-12-18T13:17:08.954Z"), + updatedAt: new Date("2025-09-25T10:30:22.038Z"), }; ``` diff --git a/docs/sdk/models/shared/taskresponse.md b/docs/sdk/models/shared/taskresponse.md index ebcda964..586a706a 100644 --- a/docs/sdk/models/shared/taskresponse.md +++ b/docs/sdk/models/shared/taskresponse.md @@ -10,12 +10,12 @@ import { PaymentStatus, TaskResponse } from "@formance/formance-sdk/sdk/models/s let value: TaskResponse = { data: { connectorID: "", - createdAt: new Date("2022-01-29T05:00:23.216Z"), + createdAt: new Date("2025-03-24T12:42:40.886Z"), descriptor: {}, - id: "c8174e4f-85db-46ac-add2-d0391946518f", + id: "020d92cf-ee09-4495-8277-f04dadac73c9", state: {}, - status: PaymentStatus.Failed, - updatedAt: new Date("2024-11-13T22:33:54.853Z"), + status: PaymentStatus.DisputeWon, + updatedAt: new Date("2025-11-16T14:38:37.631Z"), }, }; ``` diff --git a/docs/sdk/models/shared/taskresponsedata.md b/docs/sdk/models/shared/taskresponsedata.md index d13be573..9a6a9aa1 100644 --- a/docs/sdk/models/shared/taskresponsedata.md +++ b/docs/sdk/models/shared/taskresponsedata.md @@ -8,15 +8,15 @@ ```typescript const value: shared.TaskStripe = { connectorID: "", - createdAt: new Date("2022-05-30T09:02:00.896Z"), + createdAt: new Date("2023-03-05T18:16:19.517Z"), descriptor: { - account: "66559101", + account: "74675140", name: "", }, - id: "3993777c-7c28-4d27-892c-1f7516a14da3", + id: "bfc69484-b4fa-410f-a353-ea885963a5c6", state: {}, - status: PaymentStatus.DisputeLost, - updatedAt: new Date("2022-11-11T13:46:47.648Z"), + status: PaymentStatus.DisputeWon, + updatedAt: new Date("2024-05-05T20:59:07.282Z"), }; ``` @@ -25,12 +25,12 @@ const value: shared.TaskStripe = { ```typescript const value: shared.TaskWise = { connectorID: "", - createdAt: new Date("2022-07-16T17:34:20.793Z"), + createdAt: new Date("2025-11-24T23:28:50.658Z"), descriptor: {}, - id: "f4176e21-1e72-4983-a953-843e24643c51", + id: "cdf69baf-44ec-439b-b569-7c0659c12ab9", state: {}, - status: PaymentStatus.Succeeded, - updatedAt: new Date("2023-01-27T20:11:44.715Z"), + status: PaymentStatus.Refunded, + updatedAt: new Date("2023-05-30T09:02:00.896Z"), }; ``` @@ -39,12 +39,12 @@ const value: shared.TaskWise = { ```typescript const value: shared.TaskCurrencyCloud = { connectorID: "", - createdAt: new Date("2024-08-24T11:34:16.158Z"), + createdAt: new Date("2025-01-22T04:12:00.187Z"), descriptor: {}, - id: "5a82ad1c-bd14-4b0b-9d76-402fd4f542ef", + id: "998f2123-9937-477c-97c2-8d2792c1f751", state: {}, status: PaymentStatus.Dispute, - updatedAt: new Date("2023-01-03T11:49:15.210Z"), + updatedAt: new Date("2023-04-14T13:23:36.206Z"), }; ``` @@ -53,12 +53,12 @@ const value: shared.TaskCurrencyCloud = { ```typescript const value: shared.TaskDummyPay = { connectorID: "", - createdAt: new Date("2022-04-26T01:40:35.064Z"), + createdAt: new Date("2023-12-02T16:06:08.205Z"), descriptor: {}, - id: "681d739c-5b6f-4c50-9a31-ef4427dbd3be", + id: "da32e42f-4176-4e21-91e7-2983953843e2", state: {}, - status: PaymentStatus.Dispute, - updatedAt: new Date("2023-03-16T02:53:33.205Z"), + status: PaymentStatus.Expired, + updatedAt: new Date("2023-10-27T21:46:55.611Z"), }; ``` @@ -67,12 +67,12 @@ const value: shared.TaskDummyPay = { ```typescript const value: shared.TaskModulr = { connectorID: "", - createdAt: new Date("2022-11-15T02:07:18.027Z"), + createdAt: new Date("2023-08-19T22:31:57.872Z"), descriptor: {}, - id: "f5167cfd-e7b4-415b-94dc-35d355c0196a", + id: "c51825e5-a82a-4d1c-9bd1-4b0bd76402fd", state: {}, status: PaymentStatus.Other, - updatedAt: new Date("2024-04-13T23:48:55.441Z"), + updatedAt: new Date("2024-02-08T00:18:45.540Z"), }; ``` @@ -81,12 +81,12 @@ const value: shared.TaskModulr = { ```typescript const value: shared.TaskBankingCircle = { connectorID: "", - createdAt: new Date("2022-03-16T05:59:47.707Z"), + createdAt: new Date("2023-11-23T03:41:08.511Z"), descriptor: {}, - id: "cffb194f-b9b7-45e5-806c-af1e57613b02", + id: "2ef5b516-81d7-439c-95b6-fc50a31ef442", state: {}, status: PaymentStatus.DisputeLost, - updatedAt: new Date("2023-11-08T14:06:44.172Z"), + updatedAt: new Date("2025-02-07T20:24:45.233Z"), }; ``` @@ -95,12 +95,12 @@ const value: shared.TaskBankingCircle = { ```typescript const value: shared.TaskMangoPay = { connectorID: "", - createdAt: new Date("2022-07-06T05:48:12.702Z"), + createdAt: new Date("2025-07-16T13:54:19.093Z"), descriptor: {}, - id: "cfee0949-5277-4f04-adad-ac73c92cf541", + id: "3be4b64f-5167-4cfd-9e7b-415b4dc35d35", state: {}, - status: PaymentStatus.Other, - updatedAt: new Date("2022-05-30T01:09:06.183Z"), + status: PaymentStatus.DisputeWon, + updatedAt: new Date("2023-02-10T14:02:38.783Z"), }; ``` @@ -109,12 +109,12 @@ const value: shared.TaskMangoPay = { ```typescript const value: shared.TaskMoneycorp = { connectorID: "", - createdAt: new Date("2023-06-16T17:38:20.192Z"), + createdAt: new Date("2023-03-22T20:53:34.094Z"), descriptor: {}, - id: "10ad5e13-e890-420e-a2d5-c54147d7f806", + id: "96a4ec1c-ffb1-494f-9b9b-75e506caf1e5", state: {}, - status: PaymentStatus.Cancelled, - updatedAt: new Date("2024-02-05T16:45:44.018Z"), + status: PaymentStatus.Expired, + updatedAt: new Date("2023-05-08T15:09:38.886Z"), }; ``` diff --git a/docs/sdk/models/shared/taskscursor.md b/docs/sdk/models/shared/taskscursor.md index 0b32b698..f96e2ece 100644 --- a/docs/sdk/models/shared/taskscursor.md +++ b/docs/sdk/models/shared/taskscursor.md @@ -12,12 +12,12 @@ let value: TasksCursor = { data: [ { connectorID: "", - createdAt: new Date("2022-08-22T14:52:03.725Z"), + createdAt: new Date("2023-10-02T02:39:34.529Z"), descriptor: {}, - id: "7d4a715d-fd25-4d8c-8c15-7fe6168e44a8", + id: "fc4941da-926e-4203-94ca-009a293561ff", state: {}, - status: PaymentStatus.Succeeded, - updatedAt: new Date("2023-06-21T11:44:04.584Z"), + status: PaymentStatus.Cancelled, + updatedAt: new Date("2025-11-16T14:52:05.958Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/taskscursorcursor.md b/docs/sdk/models/shared/taskscursorcursor.md index 0c3dd660..b349759e 100644 --- a/docs/sdk/models/shared/taskscursorcursor.md +++ b/docs/sdk/models/shared/taskscursorcursor.md @@ -9,12 +9,15 @@ let value: TasksCursorCursor = { data: [ { connectorID: "", - createdAt: new Date("2022-10-10T04:23:53.662Z"), - descriptor: {}, - id: "fdb76c8a-9b16-4233-880f-80a41d310ba0", + createdAt: new Date("2024-09-07T20:31:08.350Z"), + descriptor: { + account: "34411018", + name: "", + }, + id: "06c13ba9-2c22-4c55-a455-b35ce918a5dc", state: {}, - status: PaymentStatus.Dispute, - updatedAt: new Date("2022-06-16T17:54:46.951Z"), + status: PaymentStatus.Succeeded, + updatedAt: new Date("2025-02-03T07:55:19.464Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/taskscursordata.md b/docs/sdk/models/shared/taskscursordata.md index 6f55e4ae..8f87dc32 100644 --- a/docs/sdk/models/shared/taskscursordata.md +++ b/docs/sdk/models/shared/taskscursordata.md @@ -8,15 +8,15 @@ ```typescript const value: shared.TaskStripe = { connectorID: "", - createdAt: new Date("2022-09-18T17:04:06.742Z"), + createdAt: new Date("2025-03-30T03:07:49.376Z"), descriptor: { - account: "44864963", + account: "14990709", name: "", }, - id: "b7ee584a-fd51-4f64-957f-f45802e016b4", + id: "6f545b3d-9ff2-4f00-8ff2-77dac7abb015", state: {}, - status: PaymentStatus.Failed, - updatedAt: new Date("2024-08-14T08:55:15.893Z"), + status: PaymentStatus.Expired, + updatedAt: new Date("2024-03-02T23:09:58.976Z"), }; ``` @@ -25,12 +25,12 @@ const value: shared.TaskStripe = { ```typescript const value: shared.TaskWise = { connectorID: "", - createdAt: new Date("2022-09-05T19:16:17.163Z"), + createdAt: new Date("2025-10-05T13:49:22.673Z"), descriptor: {}, - id: "8fb5cf5b-1e15-484a-88b5-8ccb8a17d9f4", + id: "9be704de-54e5-4a41-88e9-3ac58a2f7f37", state: {}, - status: PaymentStatus.RefundedFailure, - updatedAt: new Date("2022-04-10T15:42:56.368Z"), + status: PaymentStatus.Pending, + updatedAt: new Date("2023-09-18T17:04:06.742Z"), }; ``` @@ -39,12 +39,12 @@ const value: shared.TaskWise = { ```typescript const value: shared.TaskCurrencyCloud = { connectorID: "", - createdAt: new Date("2024-05-07T05:17:18.959Z"), + createdAt: new Date("2024-03-17T21:26:22.971Z"), descriptor: {}, - id: "48cc7f74-4b66-404d-acb0-047e649ebd22", + id: "6ea6f95b-7ee5-484a-8fd5-1f6457ff4580", state: {}, - status: PaymentStatus.Dispute, - updatedAt: new Date("2024-11-12T16:00:20.228Z"), + status: PaymentStatus.Other, + updatedAt: new Date("2023-02-02T06:15:52.112Z"), }; ``` @@ -53,12 +53,12 @@ const value: shared.TaskCurrencyCloud = { ```typescript const value: shared.TaskDummyPay = { connectorID: "", - createdAt: new Date("2023-02-12T04:50:27.888Z"), + createdAt: new Date("2023-04-21T16:04:48.222Z"), descriptor: {}, - id: "58a9b6d2-5c5a-4424-ae73-50c390d204e4", + id: "6b444d38-fb5c-4f5b-a1e1-584a8b58ccb8", state: {}, - status: PaymentStatus.Expired, - updatedAt: new Date("2022-11-19T11:55:56.968Z"), + status: PaymentStatus.Pending, + updatedAt: new Date("2024-05-31T13:31:39.531Z"), }; ``` @@ -67,12 +67,12 @@ const value: shared.TaskDummyPay = { ```typescript const value: shared.TaskModulr = { connectorID: "", - createdAt: new Date("2024-10-13T09:06:30.714Z"), + createdAt: new Date("2025-07-31T17:12:52.676Z"), descriptor: {}, - id: "cc8d7773-e433-4dc6-80f2-dcfc5363bda2", + id: "9f41a1c4-8cc7-4f74-94b6-604dcb0047e6", state: {}, status: PaymentStatus.RefundedFailure, - updatedAt: new Date("2023-05-23T02:09:12.082Z"), + updatedAt: new Date("2025-09-29T12:07:07.880Z"), }; ``` @@ -81,12 +81,12 @@ const value: shared.TaskModulr = { ```typescript const value: shared.TaskBankingCircle = { connectorID: "", - createdAt: new Date("2022-08-07T21:00:43.658Z"), + createdAt: new Date("2025-03-20T13:09:09.599Z"), descriptor: {}, - id: "58a7f0ae-33c7-4f9e-902a-6d6b91bb1857", + id: "d228bf55-8a9b-46d2-85c5-a424e7350c39", state: {}, - status: PaymentStatus.Succeeded, - updatedAt: new Date("2022-06-23T04:38:11.873Z"), + status: PaymentStatus.DisputeLost, + updatedAt: new Date("2023-07-25T10:32:48.478Z"), }; ``` @@ -95,12 +95,12 @@ const value: shared.TaskBankingCircle = { ```typescript const value: shared.TaskMangoPay = { connectorID: "", - createdAt: new Date("2022-04-06T03:24:49.820Z"), + createdAt: new Date("2023-01-06T05:25:38.671Z"), descriptor: {}, - id: "3d06c13b-a92c-422c-b554-55b35ce918a5", + id: "4e4864ec-c8d7-4773-8e43-3dc60f2dcfc5", state: {}, - status: PaymentStatus.DisputeWon, - updatedAt: new Date("2023-09-23T12:52:03.409Z"), + status: PaymentStatus.Expired, + updatedAt: new Date("2023-08-11T14:00:17.759Z"), }; ``` @@ -109,12 +109,12 @@ const value: shared.TaskMangoPay = { ```typescript const value: shared.TaskMoneycorp = { connectorID: "", - createdAt: new Date("2022-06-08T22:29:24.231Z"), + createdAt: new Date("2025-02-27T15:41:38.993Z"), descriptor: {}, - id: "be4fc494-1da9-426e-8203-4ca009a29356", + id: "da209735-8a7f-40ae-833c-7f9e02a6d6b9", state: {}, - status: PaymentStatus.Other, - updatedAt: new Date("2024-12-03T05:54:00.678Z"), + status: PaymentStatus.Dispute, + updatedAt: new Date("2025-02-13T04:24:13.906Z"), }; ``` diff --git a/docs/sdk/models/shared/taskstripe.md b/docs/sdk/models/shared/taskstripe.md index 265fa32c..d8f46a88 100644 --- a/docs/sdk/models/shared/taskstripe.md +++ b/docs/sdk/models/shared/taskstripe.md @@ -7,15 +7,15 @@ import { PaymentStatus, TaskStripe } from "@formance/formance-sdk/sdk/models/sha let value: TaskStripe = { connectorID: "", - createdAt: new Date("2024-09-18T19:37:34.618Z"), + createdAt: new Date("2023-02-07T09:13:36.865Z"), descriptor: { - account: "46021610", + account: "68381295", name: "", }, - id: "4a95d448-7728-446b-aec6-9b652bd5c9c6", + id: "9020e2d5-c541-447d-b7f8-06b3b80c8174", state: {}, - status: PaymentStatus.Expired, - updatedAt: new Date("2022-04-08T06:41:24.174Z"), + status: PaymentStatus.Failed, + updatedAt: new Date("2025-10-29T02:08:12.174Z"), }; ``` diff --git a/docs/sdk/models/shared/taskstripedescriptor.md b/docs/sdk/models/shared/taskstripedescriptor.md index 917e89e7..1be6d232 100644 --- a/docs/sdk/models/shared/taskstripedescriptor.md +++ b/docs/sdk/models/shared/taskstripedescriptor.md @@ -6,7 +6,7 @@ import { TaskStripeDescriptor } from "@formance/formance-sdk/sdk/models/shared"; let value: TaskStripeDescriptor = { - account: "36699108", + account: "32069140", name: "", }; ``` diff --git a/docs/sdk/models/shared/taskwise.md b/docs/sdk/models/shared/taskwise.md index 111e25fb..a331c122 100644 --- a/docs/sdk/models/shared/taskwise.md +++ b/docs/sdk/models/shared/taskwise.md @@ -7,12 +7,12 @@ import { PaymentStatus, TaskWise } from "@formance/formance-sdk/sdk/models/share let value: TaskWise = { connectorID: "", - createdAt: new Date("2023-08-27T10:25:40.305Z"), + createdAt: new Date("2024-08-21T13:28:33.020Z"), descriptor: {}, - id: "74e6066d-c3d3-4510-8ae7-dcafc4cb613c", + id: "5db6acdd-2d03-4919-8465-18f94f6bafe2", state: {}, - status: PaymentStatus.Other, - updatedAt: new Date("2024-01-31T14:39:50.524Z"), + status: PaymentStatus.DisputeWon, + updatedAt: new Date("2025-09-18T19:37:34.618Z"), }; ``` diff --git a/docs/sdk/models/shared/transaction.md b/docs/sdk/models/shared/transaction.md index 73a16093..a012d54a 100644 --- a/docs/sdk/models/shared/transaction.md +++ b/docs/sdk/models/shared/transaction.md @@ -47,8 +47,8 @@ let value: Transaction = { }, }, reference: "ref:001", - timestamp: new Date("2024-06-07T02:11:09.431Z"), - txid: BigInt("577590"), + timestamp: new Date("2025-10-01T07:24:57.730Z"), + txid: BigInt("259377"), }; ``` diff --git a/docs/sdk/models/shared/transactionresponse.md b/docs/sdk/models/shared/transactionresponse.md index ecefabb7..b646cf8c 100644 --- a/docs/sdk/models/shared/transactionresponse.md +++ b/docs/sdk/models/shared/transactionresponse.md @@ -48,8 +48,8 @@ let value: TransactionResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-03-27T18:11:07.462Z"), - txid: BigInt("371287"), + timestamp: new Date("2024-05-19T00:33:26.839Z"), + txid: BigInt("573610"), }, }; ``` diff --git a/docs/sdk/models/shared/transactionscursorresponse.md b/docs/sdk/models/shared/transactionscursorresponse.md index a805c63f..ff03d2cc 100644 --- a/docs/sdk/models/shared/transactionscursorresponse.md +++ b/docs/sdk/models/shared/transactionscursorresponse.md @@ -50,8 +50,8 @@ let value: TransactionsCursorResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-11-01T16:14:51.028Z"), - txid: BigInt("793282"), + timestamp: new Date("2024-07-04T07:23:06.703Z"), + txid: BigInt("786189"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/transactionscursorresponsecursor.md b/docs/sdk/models/shared/transactionscursorresponsecursor.md index 9aedc580..c6cd1a6d 100644 --- a/docs/sdk/models/shared/transactionscursorresponsecursor.md +++ b/docs/sdk/models/shared/transactionscursorresponsecursor.md @@ -49,8 +49,8 @@ let value: TransactionsCursorResponseCursor = { }, }, reference: "ref:001", - timestamp: new Date("2024-03-21T15:17:35.920Z"), - txid: BigInt("956871"), + timestamp: new Date("2023-02-09T04:10:31.873Z"), + txid: BigInt("770128"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/transactionsresponse.md b/docs/sdk/models/shared/transactionsresponse.md index 617aad22..9294a7f7 100644 --- a/docs/sdk/models/shared/transactionsresponse.md +++ b/docs/sdk/models/shared/transactionsresponse.md @@ -49,8 +49,8 @@ let value: TransactionsResponse = { }, }, reference: "ref:001", - timestamp: new Date("2022-11-29T09:47:26.523Z"), - txid: BigInt("355889"), + timestamp: new Date("2025-05-06T14:43:32.754Z"), + txid: BigInt("693747"), }, ], }; diff --git a/docs/sdk/models/shared/transferinitiation.md b/docs/sdk/models/shared/transferinitiation.md index 64f47966..467f4fdd 100644 --- a/docs/sdk/models/shared/transferinitiation.md +++ b/docs/sdk/models/shared/transferinitiation.md @@ -6,20 +6,20 @@ import { TransferInitiation, TransferInitiationStatus, TransferInitiationType } from "@formance/formance-sdk/sdk/models/shared"; let value: TransferInitiation = { - amount: BigInt("944260"), + amount: BigInt("26389"), asset: "USD", connectorID: "", - createdAt: new Date("2022-06-03T03:27:42.862Z"), + createdAt: new Date("2025-11-09T12:17:45.431Z"), description: - "the keenly loftily seafood jive boo singe that condense playfully", + "jiggle keenly only self-confidence reluctantly conceal toward happily elementary summer", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("304200"), + initialAmount: BigInt("993406"), reference: "", - scheduledAt: new Date("2023-08-16T23:39:48.423Z"), + scheduledAt: new Date("2025-04-17T04:37:18.826Z"), sourceAccountID: "", - status: TransferInitiationStatus.Failed, + status: TransferInitiationStatus.Validated, type: TransferInitiationType.Payout, }; ``` diff --git a/docs/sdk/models/shared/transferinitiationadjusments.md b/docs/sdk/models/shared/transferinitiationadjusments.md index 59faf5bf..009b0453 100644 --- a/docs/sdk/models/shared/transferinitiationadjusments.md +++ b/docs/sdk/models/shared/transferinitiationadjusments.md @@ -7,9 +7,9 @@ import { TransferInitiationAdjusments, TransferInitiationStatus } from "@formanc let value: TransferInitiationAdjusments = { adjustmentID: "", - createdAt: new Date("2022-03-17T09:07:57.019Z"), + createdAt: new Date("2023-07-15T03:50:42.259Z"), error: "", - status: TransferInitiationStatus.WaitingForValidation, + status: TransferInitiationStatus.Reversed, }; ``` diff --git a/docs/sdk/models/shared/transferinitiationpayments.md b/docs/sdk/models/shared/transferinitiationpayments.md index e4c2960c..9a8c58e2 100644 --- a/docs/sdk/models/shared/transferinitiationpayments.md +++ b/docs/sdk/models/shared/transferinitiationpayments.md @@ -6,10 +6,10 @@ import { TransferInitiationPayments, TransferInitiationStatus } from "@formance/formance-sdk/sdk/models/shared"; let value: TransferInitiationPayments = { - createdAt: new Date("2024-11-22T13:35:32.460Z"), + createdAt: new Date("2025-01-18T20:45:08.638Z"), error: "", paymentID: "", - status: TransferInitiationStatus.AskReversed, + status: TransferInitiationStatus.AskRetried, }; ``` diff --git a/docs/sdk/models/shared/transferinitiationrequest.md b/docs/sdk/models/shared/transferinitiationrequest.md index ab30bb37..095c9af5 100644 --- a/docs/sdk/models/shared/transferinitiationrequest.md +++ b/docs/sdk/models/shared/transferinitiationrequest.md @@ -6,12 +6,12 @@ import { TransferInitiationRequest, TransferInitiationRequestType } from "@formance/formance-sdk/sdk/models/shared"; let value: TransferInitiationRequest = { - amount: BigInt("220505"), + amount: BigInt("615424"), asset: "USD", - description: "obesity lamp ill-fated vastly yippee", + description: "toward ha heroine suffice the keenly loftily seafood jive boo", destinationAccountID: "", reference: "XXX", - scheduledAt: new Date("2023-05-27T22:49:24.592Z"), + scheduledAt: new Date("2024-05-13T13:48:07.162Z"), sourceAccountID: "", type: TransferInitiationRequestType.Payout, validated: false, diff --git a/docs/sdk/models/shared/transferinitiationrequesttype.md b/docs/sdk/models/shared/transferinitiationrequesttype.md index 19c0cdd8..26ed2842 100644 --- a/docs/sdk/models/shared/transferinitiationrequesttype.md +++ b/docs/sdk/models/shared/transferinitiationrequesttype.md @@ -5,7 +5,8 @@ ```typescript import { TransferInitiationRequestType } from "@formance/formance-sdk/sdk/models/shared"; -let value: TransferInitiationRequestType = TransferInitiationRequestType.Payout; +let value: TransferInitiationRequestType = + TransferInitiationRequestType.Transfer; ``` ## Values diff --git a/docs/sdk/models/shared/transferinitiationresponse.md b/docs/sdk/models/shared/transferinitiationresponse.md index 7324a2ca..129c1f6c 100644 --- a/docs/sdk/models/shared/transferinitiationresponse.md +++ b/docs/sdk/models/shared/transferinitiationresponse.md @@ -9,19 +9,19 @@ import { TransferInitiationResponse, TransferInitiationStatus, TransferInitiatio let value: TransferInitiationResponse = { data: { - amount: BigInt("531606"), + amount: BigInt("774866"), asset: "USD", connectorID: "", - createdAt: new Date("2023-12-13T17:06:01.103Z"), - description: "gah newsstand truly queasily switch adjourn because", + createdAt: new Date("2023-02-03T04:42:22.826Z"), + description: "why absentmindedly vaguely roughly broadcast under", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("421111"), + initialAmount: BigInt("253916"), reference: "", - scheduledAt: new Date("2022-10-14T07:06:11.995Z"), + scheduledAt: new Date("2023-03-28T08:49:02.228Z"), sourceAccountID: "", - status: TransferInitiationStatus.Rejected, + status: TransferInitiationStatus.ReverseProcessing, type: TransferInitiationType.Transfer, }, }; diff --git a/docs/sdk/models/shared/transferinitiationscursor.md b/docs/sdk/models/shared/transferinitiationscursor.md index bd4655af..c78554c1 100644 --- a/docs/sdk/models/shared/transferinitiationscursor.md +++ b/docs/sdk/models/shared/transferinitiationscursor.md @@ -11,21 +11,20 @@ let value: TransferInitiationsCursor = { cursor: { data: [ { - amount: BigInt("620421"), + amount: BigInt("778832"), asset: "USD", connectorID: "", - createdAt: new Date("2023-08-08T15:17:18.675Z"), - description: - "helpfully chasuble defiantly rightfully behind tuxedo enchanting free humidity", + createdAt: new Date("2025-12-05T11:32:24.689Z"), + description: "verbally furthermore yet minority persecute hoick", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("208224"), + initialAmount: BigInt("209210"), reference: "", - scheduledAt: new Date("2023-08-30T01:07:14.865Z"), + scheduledAt: new Date("2023-12-19T18:58:02.170Z"), sourceAccountID: "", - status: TransferInitiationStatus.Failed, - type: TransferInitiationType.Payout, + status: TransferInitiationStatus.WaitingForValidation, + type: TransferInitiationType.Transfer, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/transferinitiationscursorcursor.md b/docs/sdk/models/shared/transferinitiationscursorcursor.md index f9ab9a74..d8a39fe9 100644 --- a/docs/sdk/models/shared/transferinitiationscursorcursor.md +++ b/docs/sdk/models/shared/transferinitiationscursorcursor.md @@ -12,19 +12,19 @@ import { let value: TransferInitiationsCursorCursor = { data: [ { - amount: BigInt("115281"), + amount: BigInt("242044"), asset: "USD", connectorID: "", - createdAt: new Date("2023-02-17T02:45:35.925Z"), - description: "dishearten until duh", + createdAt: new Date("2023-08-09T02:28:54.372Z"), + description: "cheerfully yuck statement oof scruple carelessly memorise", destinationAccountID: "", error: "", id: "XXX", - initialAmount: BigInt("632532"), + initialAmount: BigInt("195869"), reference: "", - scheduledAt: new Date("2024-01-08T01:33:43.602Z"), + scheduledAt: new Date("2023-06-08T14:54:19.992Z"), sourceAccountID: "", - status: TransferInitiationStatus.AskReversed, + status: TransferInitiationStatus.Validated, type: TransferInitiationType.Payout, }, ], diff --git a/docs/sdk/models/shared/transferinitiationstatus.md b/docs/sdk/models/shared/transferinitiationstatus.md index 1e72929c..fdc115c8 100644 --- a/docs/sdk/models/shared/transferinitiationstatus.md +++ b/docs/sdk/models/shared/transferinitiationstatus.md @@ -5,7 +5,7 @@ ```typescript import { TransferInitiationStatus } from "@formance/formance-sdk/sdk/models/shared"; -let value: TransferInitiationStatus = TransferInitiationStatus.Failed; +let value: TransferInitiationStatus = TransferInitiationStatus.Processing; ``` ## Values diff --git a/docs/sdk/models/shared/trigger.md b/docs/sdk/models/shared/trigger.md index c80c04aa..719338dd 100644 --- a/docs/sdk/models/shared/trigger.md +++ b/docs/sdk/models/shared/trigger.md @@ -6,7 +6,7 @@ import { Trigger } from "@formance/formance-sdk/sdk/models/shared"; let value: Trigger = { - createdAt: new Date("2023-08-01T03:15:58.659Z"), + createdAt: new Date("2024-08-23T21:19:59.665Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/triggeroccurrence.md b/docs/sdk/models/shared/triggeroccurrence.md index 87f80fe3..d03412f6 100644 --- a/docs/sdk/models/shared/triggeroccurrence.md +++ b/docs/sdk/models/shared/triggeroccurrence.md @@ -6,7 +6,7 @@ import { TriggerOccurrence } from "@formance/formance-sdk/sdk/models/shared"; let value: TriggerOccurrence = { - date: new Date("2024-10-30T06:52:10.521Z"), + date: new Date("2025-01-30T07:41:55.322Z"), event: { "key": "", }, diff --git a/docs/sdk/models/shared/type.md b/docs/sdk/models/shared/type.md index 61ab8829..01135629 100644 --- a/docs/sdk/models/shared/type.md +++ b/docs/sdk/models/shared/type.md @@ -5,7 +5,7 @@ ```typescript import { Type } from "@formance/formance-sdk/sdk/models/shared"; -let value: Type = Type.NewTransaction; +let value: Type = Type.SetMetadata; ``` ## Values diff --git a/docs/sdk/models/shared/updatetransferinitiationstatusrequest.md b/docs/sdk/models/shared/updatetransferinitiationstatusrequest.md index e7efa25c..e890c37c 100644 --- a/docs/sdk/models/shared/updatetransferinitiationstatusrequest.md +++ b/docs/sdk/models/shared/updatetransferinitiationstatusrequest.md @@ -6,7 +6,7 @@ import { Status, UpdateTransferInitiationStatusRequest } from "@formance/formance-sdk/sdk/models/shared"; let value: UpdateTransferInitiationStatusRequest = { - status: Status.Failed, + status: Status.Validated, }; ``` diff --git a/docs/sdk/models/shared/v2activitycreatetransactionoutput.md b/docs/sdk/models/shared/v2activitycreatetransactionoutput.md index 97519bc0..b89c8319 100644 --- a/docs/sdk/models/shared/v2activitycreatetransactionoutput.md +++ b/docs/sdk/models/shared/v2activitycreatetransactionoutput.md @@ -20,8 +20,8 @@ let value: V2ActivityCreateTransactionOutput = { }, ], reference: "ref:001", - timestamp: new Date("2024-08-18T09:11:38.486Z"), - txid: BigInt("253916"), + timestamp: new Date("2025-10-10T09:16:42.423Z"), + txid: BigInt("974788"), }, ], }; diff --git a/docs/sdk/models/shared/v2activitycreditwallet.md b/docs/sdk/models/shared/v2activitycreditwallet.md index fe9e41ef..2e6c76b2 100644 --- a/docs/sdk/models/shared/v2activitycreditwallet.md +++ b/docs/sdk/models/shared/v2activitycreditwallet.md @@ -14,12 +14,7 @@ let value: V2ActivityCreditWallet = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }; ``` diff --git a/docs/sdk/models/shared/v2activitydebitwalletoutput.md b/docs/sdk/models/shared/v2activitydebitwalletoutput.md index d550463d..dfa02e50 100644 --- a/docs/sdk/models/shared/v2activitydebitwalletoutput.md +++ b/docs/sdk/models/shared/v2activitydebitwalletoutput.md @@ -7,8 +7,9 @@ import { V2ActivityDebitWalletOutput } from "@formance/formance-sdk/sdk/models/s let value: V2ActivityDebitWalletOutput = { data: { - description: "unselfish meh strange vaguely athwart yearningly", - id: "d8648e48-353f-49b1-95e1-2a9de2460137", + description: + "terrorise categorise putrid solidly wasteful axe accredit zowie hence accept", + id: "45cf6afb-a15e-43db-9588-b82c6f4459e2", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/v2activitygetpaymentoutput.md b/docs/sdk/models/shared/v2activitygetpaymentoutput.md index 3f837d30..afcfcd38 100644 --- a/docs/sdk/models/shared/v2activitygetpaymentoutput.md +++ b/docs/sdk/models/shared/v2activitygetpaymentoutput.md @@ -11,24 +11,24 @@ let value: V2ActivityGetPaymentOutput = { { absolute: false, amount: BigInt("100"), - date: new Date("2024-02-22T14:28:14.746Z"), + date: new Date("2023-02-06T14:44:43.529Z"), raw: {}, status: V2PaymentStatus.Failed, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2022-05-26T20:25:51.045Z"), + createdAt: new Date("2023-12-08T08:21:53.641Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: Scheme.AchDebit, + scheme: Scheme.Discover, sourceAccountID: "", - status: V2PaymentStatus.Terminated, - type: V2PaymentType.Other, + status: V2PaymentStatus.Active, + type: V2PaymentType.Payout, }, }; ``` diff --git a/docs/sdk/models/shared/v2activitygetwalletoutput.md b/docs/sdk/models/shared/v2activitygetwalletoutput.md index d236e590..cbd1feab 100644 --- a/docs/sdk/models/shared/v2activitygetwalletoutput.md +++ b/docs/sdk/models/shared/v2activitygetwalletoutput.md @@ -10,12 +10,12 @@ let value: V2ActivityGetWalletOutput = { balances: { main: { assets: { - "key": BigInt("650200"), + "key": BigInt("295307"), }, }, }, - createdAt: new Date("2023-07-09T11:24:13.011Z"), - id: "7e011c5a-968a-4f99-81f8-c0644c970ff3", + createdAt: new Date("2025-02-12T00:23:21.664Z"), + id: "5635f439-47d3-4698-9fab-f650232c8ad3", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/v2assetholder.md b/docs/sdk/models/shared/v2assetholder.md index bf9d9b7a..4511cbdf 100644 --- a/docs/sdk/models/shared/v2assetholder.md +++ b/docs/sdk/models/shared/v2assetholder.md @@ -7,7 +7,7 @@ import { V2AssetHolder } from "@formance/formance-sdk/sdk/models/shared"; let value: V2AssetHolder = { assets: { - "key": BigInt("542807"), + "key": BigInt("7281"), }, }; ``` diff --git a/docs/sdk/models/shared/v2bulkelementaddmetadatadata.md b/docs/sdk/models/shared/v2bulkelementaddmetadatadata.md index 1faa16a5..092cfcd8 100644 --- a/docs/sdk/models/shared/v2bulkelementaddmetadatadata.md +++ b/docs/sdk/models/shared/v2bulkelementaddmetadatadata.md @@ -9,7 +9,7 @@ let value: V2BulkElementAddMetadataData = { metadata: { "key": "", }, - targetId: BigInt("344856"), + targetId: BigInt("382764"), targetType: V2TargetType.Transaction, }; ``` diff --git a/docs/sdk/models/shared/v2bulkelementdeletemetadatadata.md b/docs/sdk/models/shared/v2bulkelementdeletemetadatadata.md index 063a0a72..49c044ef 100644 --- a/docs/sdk/models/shared/v2bulkelementdeletemetadatadata.md +++ b/docs/sdk/models/shared/v2bulkelementdeletemetadatadata.md @@ -7,7 +7,7 @@ import { V2BulkElementDeleteMetadataData, V2TargetType } from "@formance/formanc let value: V2BulkElementDeleteMetadataData = { key: "", - targetId: "", + targetId: BigInt("100233"), targetType: V2TargetType.Account, }; ``` diff --git a/docs/sdk/models/shared/v2bulkelementresult.md b/docs/sdk/models/shared/v2bulkelementresult.md index cd58fa64..91f91205 100644 --- a/docs/sdk/models/shared/v2bulkelementresult.md +++ b/docs/sdk/models/shared/v2bulkelementresult.md @@ -16,7 +16,7 @@ const value: shared.Schemas = { ```typescript const value: shared.V2BulkElementResultCreateTransactionSchemas = { data: { - id: BigInt("701841"), + id: BigInt("139745"), metadata: { "admin": "true", }, @@ -30,7 +30,7 @@ const value: shared.V2BulkElementResultCreateTransactionSchemas = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-02-03T02:11:26.549Z"), + timestamp: new Date("2023-12-29T08:00:18.342Z"), }, responseType: "", }; @@ -59,7 +59,7 @@ const value: shared.V2BulkElementResultErrorSchemas = { ```typescript const value: shared.V2BulkElementResultRevertTransactionSchemas = { data: { - id: BigInt("873320"), + id: BigInt("51053"), metadata: { "admin": "true", }, @@ -73,7 +73,7 @@ const value: shared.V2BulkElementResultRevertTransactionSchemas = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-05-03T03:34:27.990Z"), + timestamp: new Date("2023-12-30T01:41:47.858Z"), }, responseType: "", }; diff --git a/docs/sdk/models/shared/v2bulkelementresultcreatetransactionschemas.md b/docs/sdk/models/shared/v2bulkelementresultcreatetransactionschemas.md index 47cf6f6e..45e66ec8 100644 --- a/docs/sdk/models/shared/v2bulkelementresultcreatetransactionschemas.md +++ b/docs/sdk/models/shared/v2bulkelementresultcreatetransactionschemas.md @@ -7,7 +7,7 @@ import { V2BulkElementResultCreateTransactionSchemas } from "@formance/formance- let value: V2BulkElementResultCreateTransactionSchemas = { data: { - id: BigInt("219860"), + id: BigInt("292177"), metadata: { "admin": "true", }, @@ -21,7 +21,7 @@ let value: V2BulkElementResultCreateTransactionSchemas = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-10-28T15:04:27.098Z"), + timestamp: new Date("2025-12-13T08:34:18.669Z"), }, responseType: "", }; diff --git a/docs/sdk/models/shared/v2bulkelementresultreverttransactionschemas.md b/docs/sdk/models/shared/v2bulkelementresultreverttransactionschemas.md index 8ff6e36c..794a90bb 100644 --- a/docs/sdk/models/shared/v2bulkelementresultreverttransactionschemas.md +++ b/docs/sdk/models/shared/v2bulkelementresultreverttransactionschemas.md @@ -7,7 +7,7 @@ import { V2BulkElementResultRevertTransactionSchemas } from "@formance/formance- let value: V2BulkElementResultRevertTransactionSchemas = { data: { - id: BigInt("83791"), + id: BigInt("21358"), metadata: { "admin": "true", }, @@ -21,7 +21,7 @@ let value: V2BulkElementResultRevertTransactionSchemas = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-07-20T16:07:04.167Z"), + timestamp: new Date("2023-04-23T03:20:29.490Z"), }, responseType: "", }; diff --git a/docs/sdk/models/shared/v2bulkelementreverttransactiondata.md b/docs/sdk/models/shared/v2bulkelementreverttransactiondata.md index 91961a82..b76baa27 100644 --- a/docs/sdk/models/shared/v2bulkelementreverttransactiondata.md +++ b/docs/sdk/models/shared/v2bulkelementreverttransactiondata.md @@ -6,7 +6,7 @@ import { V2BulkElementRevertTransactionData } from "@formance/formance-sdk/sdk/models/shared"; let value: V2BulkElementRevertTransactionData = { - id: BigInt("556133"), + id: BigInt("152364"), }; ``` diff --git a/docs/sdk/models/shared/v2connector.md b/docs/sdk/models/shared/v2connector.md index 95b0af69..b7ea69fb 100644 --- a/docs/sdk/models/shared/v2connector.md +++ b/docs/sdk/models/shared/v2connector.md @@ -5,7 +5,7 @@ ```typescript import { V2Connector } from "@formance/formance-sdk/sdk/models/shared"; -let value: V2Connector = V2Connector.Modulr; +let value: V2Connector = V2Connector.Stripe; ``` ## Values diff --git a/docs/sdk/models/shared/v2createtransactionresponse.md b/docs/sdk/models/shared/v2createtransactionresponse.md index 176cbc23..3084d883 100644 --- a/docs/sdk/models/shared/v2createtransactionresponse.md +++ b/docs/sdk/models/shared/v2createtransactionresponse.md @@ -7,7 +7,7 @@ import { V2CreateTransactionResponse } from "@formance/formance-sdk/sdk/models/s let value: V2CreateTransactionResponse = { data: { - id: BigInt("965735"), + id: BigInt("294266"), metadata: { "admin": "true", }, @@ -21,7 +21,7 @@ let value: V2CreateTransactionResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-11-11T15:47:28.185Z"), + timestamp: new Date("2024-04-22T03:32:15.282Z"), }, }; ``` diff --git a/docs/sdk/models/shared/v2createtriggerresponse.md b/docs/sdk/models/shared/v2createtriggerresponse.md index 3b3387bd..9b569880 100644 --- a/docs/sdk/models/shared/v2createtriggerresponse.md +++ b/docs/sdk/models/shared/v2createtriggerresponse.md @@ -7,7 +7,7 @@ import { V2CreateTriggerResponse } from "@formance/formance-sdk/sdk/models/share let value: V2CreateTriggerResponse = { data: { - createdAt: new Date("2024-08-18T23:53:22.557Z"), + createdAt: new Date("2023-05-03T19:56:19.516Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/v2createworkflowresponse.md b/docs/sdk/models/shared/v2createworkflowresponse.md index 5f7294c6..ca5af57b 100644 --- a/docs/sdk/models/shared/v2createworkflowresponse.md +++ b/docs/sdk/models/shared/v2createworkflowresponse.md @@ -14,9 +14,9 @@ let value: V2CreateWorkflowResponse = { }, ], }, - createdAt: new Date("2024-12-30T00:37:30.921Z"), + createdAt: new Date("2023-11-09T02:50:43.300Z"), id: "", - updatedAt: new Date("2022-11-23T07:18:15.885Z"), + updatedAt: new Date("2024-05-02T07:25:31.700Z"), }, }; ``` diff --git a/docs/sdk/models/shared/v2creditwalletrequest.md b/docs/sdk/models/shared/v2creditwalletrequest.md index 70a5b790..073580fa 100644 --- a/docs/sdk/models/shared/v2creditwalletrequest.md +++ b/docs/sdk/models/shared/v2creditwalletrequest.md @@ -13,12 +13,7 @@ let value: V2CreditWalletRequest = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }; ``` diff --git a/docs/sdk/models/shared/v2expandedtransaction.md b/docs/sdk/models/shared/v2expandedtransaction.md index 3a14b4bd..f407a082 100644 --- a/docs/sdk/models/shared/v2expandedtransaction.md +++ b/docs/sdk/models/shared/v2expandedtransaction.md @@ -6,7 +6,7 @@ import { V2ExpandedTransaction } from "@formance/formance-sdk/sdk/models/shared"; let value: V2ExpandedTransaction = { - id: BigInt("365539"), + id: BigInt("884361"), metadata: { "admin": "true", }, @@ -52,7 +52,7 @@ let value: V2ExpandedTransaction = { }, reference: "ref:001", reverted: false, - timestamp: new Date("2022-08-09T14:07:15.623Z"), + timestamp: new Date("2025-04-22T23:52:00.946Z"), }; ``` diff --git a/docs/sdk/models/shared/v2getledgerresponse.md b/docs/sdk/models/shared/v2getledgerresponse.md index e257b6ab..e374c51e 100644 --- a/docs/sdk/models/shared/v2getledgerresponse.md +++ b/docs/sdk/models/shared/v2getledgerresponse.md @@ -7,7 +7,7 @@ import { V2GetLedgerResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: V2GetLedgerResponse = { data: { - addedAt: new Date("2023-11-08T18:38:53.264Z"), + addedAt: new Date("2025-05-21T19:41:18.529Z"), bucket: "", metadata: { "admin": "true", diff --git a/docs/sdk/models/shared/v2gettransactionresponse.md b/docs/sdk/models/shared/v2gettransactionresponse.md index fa5b5d8b..ca64f80b 100644 --- a/docs/sdk/models/shared/v2gettransactionresponse.md +++ b/docs/sdk/models/shared/v2gettransactionresponse.md @@ -7,7 +7,7 @@ import { V2GetTransactionResponse } from "@formance/formance-sdk/sdk/models/shar let value: V2GetTransactionResponse = { data: { - id: BigInt("765070"), + id: BigInt("621140"), metadata: { "admin": "true", }, @@ -53,7 +53,7 @@ let value: V2GetTransactionResponse = { }, reference: "ref:001", reverted: false, - timestamp: new Date("2022-12-10T16:41:14.824Z"), + timestamp: new Date("2023-04-18T04:47:54.555Z"), }, }; ``` diff --git a/docs/sdk/models/shared/v2getworkflowinstancehistoryresponse.md b/docs/sdk/models/shared/v2getworkflowinstancehistoryresponse.md index 7edc90bf..faa72a18 100644 --- a/docs/sdk/models/shared/v2getworkflowinstancehistoryresponse.md +++ b/docs/sdk/models/shared/v2getworkflowinstancehistoryresponse.md @@ -10,7 +10,7 @@ let value: V2GetWorkflowInstanceHistoryResponse = { { input: {}, name: "", - startedAt: new Date("2024-11-21T23:06:53.071Z"), + startedAt: new Date("2024-05-13T05:31:54.723Z"), terminated: false, }, ], diff --git a/docs/sdk/models/shared/v2getworkflowinstancehistorystageresponse.md b/docs/sdk/models/shared/v2getworkflowinstancehistorystageresponse.md index 6993a72c..84c34ad2 100644 --- a/docs/sdk/models/shared/v2getworkflowinstancehistorystageresponse.md +++ b/docs/sdk/models/shared/v2getworkflowinstancehistorystageresponse.md @@ -13,7 +13,7 @@ import { let value: V2GetWorkflowInstanceHistoryStageResponse = { data: [ { - attempt: 460803, + attempt: 865212, input: { createTransaction: { data: { @@ -53,12 +53,7 @@ let value: V2GetWorkflowInstanceHistoryStageResponse = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { @@ -98,8 +93,8 @@ let value: V2GetWorkflowInstanceHistoryStageResponse = { }, ], reference: "ref:001", - timestamp: new Date("2022-01-06T05:55:38.572Z"), - txid: BigInt("553766"), + timestamp: new Date("2025-11-12T18:00:26.208Z"), + txid: BigInt("518926"), }, ], }, @@ -141,14 +136,14 @@ let value: V2GetWorkflowInstanceHistoryStageResponse = { { absolute: false, amount: BigInt("100"), - date: new Date("2022-05-05T19:52:13.918Z"), + date: new Date("2025-08-11T15:06:17.582Z"), raw: {}, - status: V2PaymentStatus.Succeeded, + status: V2PaymentStatus.Failed, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2024-02-05T03:15:11.328Z"), + createdAt: new Date("2024-01-18T14:23:36.397Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), @@ -157,7 +152,7 @@ let value: V2GetWorkflowInstanceHistoryStageResponse = { reference: "", scheme: Scheme.Diners, sourceAccountID: "", - status: V2PaymentStatus.Cancelled, + status: V2PaymentStatus.Terminated, type: V2PaymentType.Transfer, }, }, @@ -165,8 +160,8 @@ let value: V2GetWorkflowInstanceHistoryStageResponse = { cursor: { data: [ { - createdAt: new Date("2022-11-23T13:48:35.382Z"), - id: "bb5659e2-e0a6-4cb7-8a8c-784949226642", + createdAt: new Date("2023-02-18T17:02:19.985Z"), + id: "293d511e-12d4-4ad9-afb1-8bc0bdb878be", ledger: "", metadata: { "key": "", @@ -181,7 +176,7 @@ let value: V2GetWorkflowInstanceHistoryStageResponse = { }, }, }, - startedAt: new Date("2022-01-28T15:41:52.745Z"), + startedAt: new Date("2025-08-31T01:35:36.933Z"), terminated: false, }, ], diff --git a/docs/sdk/models/shared/v2getworkflowinstanceresponse.md b/docs/sdk/models/shared/v2getworkflowinstanceresponse.md index d78c97ba..ac2416ed 100644 --- a/docs/sdk/models/shared/v2getworkflowinstanceresponse.md +++ b/docs/sdk/models/shared/v2getworkflowinstanceresponse.md @@ -7,10 +7,10 @@ import { V2GetWorkflowInstanceResponse } from "@formance/formance-sdk/sdk/models let value: V2GetWorkflowInstanceResponse = { data: { - createdAt: new Date("2024-11-22T18:34:24.377Z"), + createdAt: new Date("2024-03-15T22:06:59.181Z"), id: "", terminated: false, - updatedAt: new Date("2024-05-05T20:24:14.028Z"), + updatedAt: new Date("2024-11-05T16:40:09.305Z"), workflowID: "", }, }; diff --git a/docs/sdk/models/shared/v2getworkflowresponse.md b/docs/sdk/models/shared/v2getworkflowresponse.md index 8ba9e317..69d19e43 100644 --- a/docs/sdk/models/shared/v2getworkflowresponse.md +++ b/docs/sdk/models/shared/v2getworkflowresponse.md @@ -14,9 +14,9 @@ let value: V2GetWorkflowResponse = { }, ], }, - createdAt: new Date("2024-11-09T12:17:45.431Z"), + createdAt: new Date("2023-11-16T15:59:09.505Z"), id: "", - updatedAt: new Date("2024-08-19T20:52:25.676Z"), + updatedAt: new Date("2025-04-30T20:40:52.185Z"), }, }; ``` diff --git a/docs/sdk/models/shared/v2hold.md b/docs/sdk/models/shared/v2hold.md index 3aae4489..fcb22414 100644 --- a/docs/sdk/models/shared/v2hold.md +++ b/docs/sdk/models/shared/v2hold.md @@ -6,9 +6,8 @@ import { V2Hold } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Hold = { - description: - "phew founder yahoo coaxingly gah finally painfully politely boohoo delirious", - id: "c070cf0e-c5e4-461a-907a-d2cb89196d59", + description: "stiff unto excepting insidious please once louse", + id: "648e4835-3f9b-415e-912a-9de24601374e", metadata: { "key": "", }, diff --git a/docs/sdk/models/shared/v2ledger.md b/docs/sdk/models/shared/v2ledger.md index 3b602cd7..50e361be 100644 --- a/docs/sdk/models/shared/v2ledger.md +++ b/docs/sdk/models/shared/v2ledger.md @@ -6,7 +6,7 @@ import { V2Ledger } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Ledger = { - addedAt: new Date("2024-12-15T23:23:51.945Z"), + addedAt: new Date("2025-01-12T13:10:47.266Z"), bucket: "", metadata: { "admin": "true", diff --git a/docs/sdk/models/shared/v2ledgerlistresponse.md b/docs/sdk/models/shared/v2ledgerlistresponse.md index 0d577dd3..2eb27641 100644 --- a/docs/sdk/models/shared/v2ledgerlistresponse.md +++ b/docs/sdk/models/shared/v2ledgerlistresponse.md @@ -9,7 +9,7 @@ let value: V2LedgerListResponse = { cursor: { data: [ { - addedAt: new Date("2024-10-21T22:27:43.595Z"), + addedAt: new Date("2025-01-30T17:16:27.531Z"), bucket: "", metadata: { "admin": "true", diff --git a/docs/sdk/models/shared/v2ledgerlistresponsecursor.md b/docs/sdk/models/shared/v2ledgerlistresponsecursor.md index 76755f15..8a07bed8 100644 --- a/docs/sdk/models/shared/v2ledgerlistresponsecursor.md +++ b/docs/sdk/models/shared/v2ledgerlistresponsecursor.md @@ -8,7 +8,7 @@ import { V2LedgerListResponseCursor } from "@formance/formance-sdk/sdk/models/sh let value: V2LedgerListResponseCursor = { data: [ { - addedAt: new Date("2023-05-21T07:27:53.872Z"), + addedAt: new Date("2025-11-06T09:51:30.567Z"), bucket: "", metadata: { "admin": "true", diff --git a/docs/sdk/models/shared/v2listrunsresponse.md b/docs/sdk/models/shared/v2listrunsresponse.md index 79883137..db2d8c50 100644 --- a/docs/sdk/models/shared/v2listrunsresponse.md +++ b/docs/sdk/models/shared/v2listrunsresponse.md @@ -9,10 +9,10 @@ let value: V2ListRunsResponse = { cursor: { data: [ { - createdAt: new Date("2023-02-19T06:17:35.418Z"), + createdAt: new Date("2024-06-08T12:27:33.773Z"), id: "", terminated: false, - updatedAt: new Date("2024-12-08T18:15:50.864Z"), + updatedAt: new Date("2024-09-22T07:43:22.108Z"), workflowID: "", }, ], diff --git a/docs/sdk/models/shared/v2listrunsresponsecursor.md b/docs/sdk/models/shared/v2listrunsresponsecursor.md index 4b156527..8dd8b643 100644 --- a/docs/sdk/models/shared/v2listrunsresponsecursor.md +++ b/docs/sdk/models/shared/v2listrunsresponsecursor.md @@ -8,10 +8,10 @@ import { V2ListRunsResponseCursor } from "@formance/formance-sdk/sdk/models/shar let value: V2ListRunsResponseCursor = { data: [ { - createdAt: new Date("2023-11-15T18:13:16.525Z"), + createdAt: new Date("2023-10-27T14:11:26.569Z"), id: "", terminated: false, - updatedAt: new Date("2022-01-19T15:57:10.680Z"), + updatedAt: new Date("2024-02-22T02:51:06.328Z"), workflowID: "", }, ], diff --git a/docs/sdk/models/shared/v2listtriggersoccurrencesresponse.md b/docs/sdk/models/shared/v2listtriggersoccurrencesresponse.md index c01d4018..0ae85f7f 100644 --- a/docs/sdk/models/shared/v2listtriggersoccurrencesresponse.md +++ b/docs/sdk/models/shared/v2listtriggersoccurrencesresponse.md @@ -9,7 +9,7 @@ let value: V2ListTriggersOccurrencesResponse = { cursor: { data: [ { - date: new Date("2024-11-25T13:04:10.611Z"), + date: new Date("2023-10-16T03:05:22.272Z"), event: { "key": "", }, diff --git a/docs/sdk/models/shared/v2listtriggersoccurrencesresponsecursor.md b/docs/sdk/models/shared/v2listtriggersoccurrencesresponsecursor.md index a36df9d6..6ad1d2b6 100644 --- a/docs/sdk/models/shared/v2listtriggersoccurrencesresponsecursor.md +++ b/docs/sdk/models/shared/v2listtriggersoccurrencesresponsecursor.md @@ -8,7 +8,7 @@ import { V2ListTriggersOccurrencesResponseCursor } from "@formance/formance-sdk/ let value: V2ListTriggersOccurrencesResponseCursor = { data: [ { - date: new Date("2023-05-20T19:32:12.756Z"), + date: new Date("2024-01-23T08:27:25.525Z"), event: { "key": "", }, diff --git a/docs/sdk/models/shared/v2listtriggersresponse.md b/docs/sdk/models/shared/v2listtriggersresponse.md index 7bd599e6..a9237ca6 100644 --- a/docs/sdk/models/shared/v2listtriggersresponse.md +++ b/docs/sdk/models/shared/v2listtriggersresponse.md @@ -9,7 +9,7 @@ let value: V2ListTriggersResponse = { cursor: { data: [ { - createdAt: new Date("2022-06-26T10:37:28.934Z"), + createdAt: new Date("2023-09-12T12:02:43.439Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/v2listtriggersresponsecursor.md b/docs/sdk/models/shared/v2listtriggersresponsecursor.md index 8c66e246..5bae0bb9 100644 --- a/docs/sdk/models/shared/v2listtriggersresponsecursor.md +++ b/docs/sdk/models/shared/v2listtriggersresponsecursor.md @@ -8,7 +8,7 @@ import { V2ListTriggersResponseCursor } from "@formance/formance-sdk/sdk/models/ let value: V2ListTriggersResponseCursor = { data: [ { - createdAt: new Date("2024-01-17T17:42:49.523Z"), + createdAt: new Date("2025-12-27T17:25:33.535Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/v2listwalletsresponse.md b/docs/sdk/models/shared/v2listwalletsresponse.md index 23a9709c..fe7335fd 100644 --- a/docs/sdk/models/shared/v2listwalletsresponse.md +++ b/docs/sdk/models/shared/v2listwalletsresponse.md @@ -9,8 +9,8 @@ let value: V2ListWalletsResponse = { cursor: { data: [ { - createdAt: new Date("2022-04-22T19:31:18.310Z"), - id: "cbe31b32-5d80-47a8-a93d-8bf6e0094345", + createdAt: new Date("2024-09-24T22:27:35.031Z"), + id: "d540d69f-02cc-4c8f-b691-6b3fa4c1f0e4", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/v2listwalletsresponsecursor.md b/docs/sdk/models/shared/v2listwalletsresponsecursor.md index 742adf9e..44cd8435 100644 --- a/docs/sdk/models/shared/v2listwalletsresponsecursor.md +++ b/docs/sdk/models/shared/v2listwalletsresponsecursor.md @@ -8,8 +8,8 @@ import { V2ListWalletsResponseCursor } from "@formance/formance-sdk/sdk/models/s let value: V2ListWalletsResponseCursor = { data: [ { - createdAt: new Date("2023-06-03T19:56:17.254Z"), - id: "d3698fab-f650-4232-9c8a-d35b606e65fa", + createdAt: new Date("2025-08-17T05:15:01.934Z"), + id: "0a6cb7a8-c784-4949-9226-6420047b7e02", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/v2listworkflowsresponse.md b/docs/sdk/models/shared/v2listworkflowsresponse.md index 58f1a7f7..45763991 100644 --- a/docs/sdk/models/shared/v2listworkflowsresponse.md +++ b/docs/sdk/models/shared/v2listworkflowsresponse.md @@ -16,9 +16,9 @@ let value: V2ListWorkflowsResponse = { }, ], }, - createdAt: new Date("2022-10-25T06:04:46.666Z"), + createdAt: new Date("2025-08-31T02:24:06.436Z"), id: "", - updatedAt: new Date("2022-04-19T08:02:38.105Z"), + updatedAt: new Date("2023-11-24T06:06:26.488Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2listworkflowsresponsecursor.md b/docs/sdk/models/shared/v2listworkflowsresponsecursor.md index d9094450..b4bbbca9 100644 --- a/docs/sdk/models/shared/v2listworkflowsresponsecursor.md +++ b/docs/sdk/models/shared/v2listworkflowsresponsecursor.md @@ -15,9 +15,9 @@ let value: V2ListWorkflowsResponseCursor = { }, ], }, - createdAt: new Date("2022-01-27T23:27:37.963Z"), + createdAt: new Date("2023-04-21T11:33:43.244Z"), id: "", - updatedAt: new Date("2023-11-11T06:29:05.657Z"), + updatedAt: new Date("2024-01-30T08:26:10.023Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2log.md b/docs/sdk/models/shared/v2log.md index c6f11c44..609cde36 100644 --- a/docs/sdk/models/shared/v2log.md +++ b/docs/sdk/models/shared/v2log.md @@ -9,7 +9,7 @@ let value: V2Log = { data: { "key": "", }, - date: new Date("2024-02-12T00:34:41.133Z"), + date: new Date("2023-11-21T07:08:33.168Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: BigInt("1234"), type: V2LogType.NewTransaction, diff --git a/docs/sdk/models/shared/v2logscursorresponse.md b/docs/sdk/models/shared/v2logscursorresponse.md index 61a2c496..20c96186 100644 --- a/docs/sdk/models/shared/v2logscursorresponse.md +++ b/docs/sdk/models/shared/v2logscursorresponse.md @@ -12,11 +12,11 @@ let value: V2LogsCursorResponse = { data: { "key": "", }, - date: new Date("2023-06-21T16:40:18.965Z"), + date: new Date("2024-02-14T23:20:35.837Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: BigInt("1234"), - type: V2LogType.NewTransaction, + type: V2LogType.SetMetadata, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2logscursorresponsecursor.md b/docs/sdk/models/shared/v2logscursorresponsecursor.md index f6649dde..f6e010a7 100644 --- a/docs/sdk/models/shared/v2logscursorresponsecursor.md +++ b/docs/sdk/models/shared/v2logscursorresponsecursor.md @@ -11,10 +11,10 @@ let value: V2LogsCursorResponseCursor = { data: { "key": "", }, - date: new Date("2024-08-27T16:51:13.989Z"), + date: new Date("2025-05-06T04:29:47.644Z"), hash: "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e", id: BigInt("1234"), - type: V2LogType.RevertedTransaction, + type: V2LogType.NewTransaction, }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2logtype.md b/docs/sdk/models/shared/v2logtype.md index 2732bedf..37d0675e 100644 --- a/docs/sdk/models/shared/v2logtype.md +++ b/docs/sdk/models/shared/v2logtype.md @@ -5,7 +5,7 @@ ```typescript import { V2LogType } from "@formance/formance-sdk/sdk/models/shared"; -let value: V2LogType = V2LogType.SetMetadata; +let value: V2LogType = V2LogType.RevertedTransaction; ``` ## Values diff --git a/docs/sdk/models/shared/v2monetary.md b/docs/sdk/models/shared/v2monetary.md index 9dc4b4f2..b85e0617 100644 --- a/docs/sdk/models/shared/v2monetary.md +++ b/docs/sdk/models/shared/v2monetary.md @@ -6,7 +6,7 @@ import { V2Monetary } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Monetary = { - amount: BigInt("75610"), + amount: BigInt("454165"), asset: "", }; ``` diff --git a/docs/sdk/models/shared/v2payment.md b/docs/sdk/models/shared/v2payment.md index 45551658..027f2c7b 100644 --- a/docs/sdk/models/shared/v2payment.md +++ b/docs/sdk/models/shared/v2payment.md @@ -10,24 +10,24 @@ let value: V2Payment = { { absolute: false, amount: BigInt("100"), - date: new Date("2023-01-01T12:34:42.729Z"), + date: new Date("2025-05-14T18:48:08.000Z"), raw: {}, - status: V2PaymentStatus.Failed, + status: V2PaymentStatus.Succeeded, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2024-09-07T18:39:13.127Z"), + createdAt: new Date("2025-07-12T20:33:30.741Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: Scheme.Diners, + scheme: Scheme.SepaDebit, sourceAccountID: "", - status: V2PaymentStatus.Active, - type: V2PaymentType.Transfer, + status: V2PaymentStatus.Terminated, + type: V2PaymentType.Other, }; ``` diff --git a/docs/sdk/models/shared/v2paymentadjustment.md b/docs/sdk/models/shared/v2paymentadjustment.md index eb3cfce6..bae79eea 100644 --- a/docs/sdk/models/shared/v2paymentadjustment.md +++ b/docs/sdk/models/shared/v2paymentadjustment.md @@ -8,9 +8,9 @@ import { V2PaymentAdjustment, V2PaymentStatus } from "@formance/formance-sdk/sdk let value: V2PaymentAdjustment = { absolute: false, amount: BigInt("100"), - date: new Date("2024-06-18T12:35:38.509Z"), + date: new Date("2024-08-17T05:41:08.306Z"), raw: {}, - status: V2PaymentStatus.Cancelled, + status: V2PaymentStatus.Terminated, }; ``` diff --git a/docs/sdk/models/shared/v2paymentstatus.md b/docs/sdk/models/shared/v2paymentstatus.md index 3fa55518..b8d35d0e 100644 --- a/docs/sdk/models/shared/v2paymentstatus.md +++ b/docs/sdk/models/shared/v2paymentstatus.md @@ -5,7 +5,7 @@ ```typescript import { V2PaymentStatus } from "@formance/formance-sdk/sdk/models/shared"; -let value: V2PaymentStatus = V2PaymentStatus.Terminated; +let value: V2PaymentStatus = V2PaymentStatus.Failed; ``` ## Values diff --git a/docs/sdk/models/shared/v2paymenttype.md b/docs/sdk/models/shared/v2paymenttype.md index 5dc03146..33109b51 100644 --- a/docs/sdk/models/shared/v2paymenttype.md +++ b/docs/sdk/models/shared/v2paymenttype.md @@ -5,7 +5,7 @@ ```typescript import { V2PaymentType } from "@formance/formance-sdk/sdk/models/shared"; -let value: V2PaymentType = V2PaymentType.Payout; +let value: V2PaymentType = V2PaymentType.Transfer; ``` ## Values diff --git a/docs/sdk/models/shared/v2readtriggerresponse.md b/docs/sdk/models/shared/v2readtriggerresponse.md index 6602a64a..7b26e46e 100644 --- a/docs/sdk/models/shared/v2readtriggerresponse.md +++ b/docs/sdk/models/shared/v2readtriggerresponse.md @@ -7,7 +7,7 @@ import { V2ReadTriggerResponse } from "@formance/formance-sdk/sdk/models/shared" let value: V2ReadTriggerResponse = { data: { - createdAt: new Date("2023-03-18T14:06:13.429Z"), + createdAt: new Date("2024-02-12T15:22:20.817Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/v2reverttransactionresponse.md b/docs/sdk/models/shared/v2reverttransactionresponse.md index f0dbd08e..cff24857 100644 --- a/docs/sdk/models/shared/v2reverttransactionresponse.md +++ b/docs/sdk/models/shared/v2reverttransactionresponse.md @@ -7,7 +7,7 @@ import { V2RevertTransactionResponse } from "@formance/formance-sdk/sdk/models/s let value: V2RevertTransactionResponse = { data: { - id: BigInt("916419"), + id: BigInt("707983"), metadata: { "admin": "true", }, @@ -21,7 +21,7 @@ let value: V2RevertTransactionResponse = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2022-10-25T14:52:48.050Z"), + timestamp: new Date("2025-04-20T20:41:36.879Z"), }, }; ``` diff --git a/docs/sdk/models/shared/v2runworkflowresponse.md b/docs/sdk/models/shared/v2runworkflowresponse.md index 821daa2f..cad91b50 100644 --- a/docs/sdk/models/shared/v2runworkflowresponse.md +++ b/docs/sdk/models/shared/v2runworkflowresponse.md @@ -7,10 +7,10 @@ import { V2RunWorkflowResponse } from "@formance/formance-sdk/sdk/models/shared" let value: V2RunWorkflowResponse = { data: { - createdAt: new Date("2023-09-05T03:23:29.598Z"), + createdAt: new Date("2025-11-01T03:26:54.317Z"), id: "", terminated: false, - updatedAt: new Date("2022-01-19T16:14:20.571Z"), + updatedAt: new Date("2025-03-09T07:16:52.030Z"), workflowID: "", }, }; diff --git a/docs/sdk/models/shared/v2stagestatus.md b/docs/sdk/models/shared/v2stagestatus.md index c0380bd3..ea45bb9a 100644 --- a/docs/sdk/models/shared/v2stagestatus.md +++ b/docs/sdk/models/shared/v2stagestatus.md @@ -7,8 +7,8 @@ import { V2StageStatus } from "@formance/formance-sdk/sdk/models/shared"; let value: V2StageStatus = { instanceID: "", - stage: 4137.68, - startedAt: new Date("2022-06-16T00:41:16.617Z"), + stage: 9178.77, + startedAt: new Date("2023-03-30T20:02:19.882Z"), }; ``` diff --git a/docs/sdk/models/shared/v2stats.md b/docs/sdk/models/shared/v2stats.md index f6fc6704..42268abb 100644 --- a/docs/sdk/models/shared/v2stats.md +++ b/docs/sdk/models/shared/v2stats.md @@ -6,8 +6,8 @@ import { V2Stats } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Stats = { - accounts: 483459, - transactions: BigInt("881189"), + accounts: 766591, + transactions: BigInt("688684"), }; ``` diff --git a/docs/sdk/models/shared/v2statsresponse.md b/docs/sdk/models/shared/v2statsresponse.md index 24c0e261..04cfd2db 100644 --- a/docs/sdk/models/shared/v2statsresponse.md +++ b/docs/sdk/models/shared/v2statsresponse.md @@ -7,8 +7,8 @@ import { V2StatsResponse } from "@formance/formance-sdk/sdk/models/shared"; let value: V2StatsResponse = { data: { - accounts: 792499, - transactions: BigInt("835646"), + accounts: 78246, + transactions: BigInt("371287"), }, }; ``` diff --git a/docs/sdk/models/shared/v2targetid.md b/docs/sdk/models/shared/v2targetid.md index 5f44b350..c3d700ac 100644 --- a/docs/sdk/models/shared/v2targetid.md +++ b/docs/sdk/models/shared/v2targetid.md @@ -12,6 +12,6 @@ const value: string = ""; ### `BigInt` ```typescript -const value: BigInt = BigInt("168142"); +const value: BigInt = BigInt("660536"); ``` diff --git a/docs/sdk/models/shared/v2targettype.md b/docs/sdk/models/shared/v2targettype.md index ef8f90f9..c7fa2275 100644 --- a/docs/sdk/models/shared/v2targettype.md +++ b/docs/sdk/models/shared/v2targettype.md @@ -5,7 +5,7 @@ ```typescript import { V2TargetType } from "@formance/formance-sdk/sdk/models/shared"; -let value: V2TargetType = V2TargetType.Transaction; +let value: V2TargetType = V2TargetType.Account; ``` ## Values diff --git a/docs/sdk/models/shared/v2transaction.md b/docs/sdk/models/shared/v2transaction.md index fd42fda5..597a33a1 100644 --- a/docs/sdk/models/shared/v2transaction.md +++ b/docs/sdk/models/shared/v2transaction.md @@ -6,7 +6,7 @@ import { V2Transaction } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Transaction = { - id: BigInt("502393"), + id: BigInt("320326"), metadata: { "admin": "true", }, @@ -20,7 +20,7 @@ let value: V2Transaction = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-08-15T21:25:17.893Z"), + timestamp: new Date("2025-11-03T16:48:56.969Z"), }; ``` diff --git a/docs/sdk/models/shared/v2transactionscursorresponse.md b/docs/sdk/models/shared/v2transactionscursorresponse.md index 04164083..f1898abe 100644 --- a/docs/sdk/models/shared/v2transactionscursorresponse.md +++ b/docs/sdk/models/shared/v2transactionscursorresponse.md @@ -9,7 +9,7 @@ let value: V2TransactionsCursorResponse = { cursor: { data: [ { - id: BigInt("709051"), + id: BigInt("577590"), metadata: { "admin": "true", }, @@ -55,7 +55,7 @@ let value: V2TransactionsCursorResponse = { }, reference: "ref:001", reverted: false, - timestamp: new Date("2023-11-06T08:13:52.054Z"), + timestamp: new Date("2023-03-24T12:05:36.847Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2transactionscursorresponsecursor.md b/docs/sdk/models/shared/v2transactionscursorresponsecursor.md index f4f49c13..6d09e331 100644 --- a/docs/sdk/models/shared/v2transactionscursorresponsecursor.md +++ b/docs/sdk/models/shared/v2transactionscursorresponsecursor.md @@ -8,7 +8,7 @@ import { V2TransactionsCursorResponseCursor } from "@formance/formance-sdk/sdk/m let value: V2TransactionsCursorResponseCursor = { data: [ { - id: BigInt("103988"), + id: BigInt("355889"), metadata: { "admin": "true", }, @@ -54,7 +54,7 @@ let value: V2TransactionsCursorResponseCursor = { }, reference: "ref:001", reverted: false, - timestamp: new Date("2024-09-22T01:21:39.695Z"), + timestamp: new Date("2025-06-07T02:11:09.431Z"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2trigger.md b/docs/sdk/models/shared/v2trigger.md index b922d950..cafcd4d6 100644 --- a/docs/sdk/models/shared/v2trigger.md +++ b/docs/sdk/models/shared/v2trigger.md @@ -6,7 +6,7 @@ import { V2Trigger } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Trigger = { - createdAt: new Date("2024-04-13T19:53:21.496Z"), + createdAt: new Date("2023-12-19T06:40:56.361Z"), event: "", id: "", workflowID: "", diff --git a/docs/sdk/models/shared/v2triggeroccurrence.md b/docs/sdk/models/shared/v2triggeroccurrence.md index f4ff96b5..cafd825f 100644 --- a/docs/sdk/models/shared/v2triggeroccurrence.md +++ b/docs/sdk/models/shared/v2triggeroccurrence.md @@ -6,7 +6,7 @@ import { V2TriggerOccurrence } from "@formance/formance-sdk/sdk/models/shared"; let value: V2TriggerOccurrence = { - date: new Date("2023-08-10T00:57:49.752Z"), + date: new Date("2024-01-31T18:43:40.215Z"), event: { "key": "", }, diff --git a/docs/sdk/models/shared/v2volumeswithbalance.md b/docs/sdk/models/shared/v2volumeswithbalance.md index 70d506a4..0f64111e 100644 --- a/docs/sdk/models/shared/v2volumeswithbalance.md +++ b/docs/sdk/models/shared/v2volumeswithbalance.md @@ -6,11 +6,11 @@ import { V2VolumesWithBalance } from "@formance/formance-sdk/sdk/models/shared"; let value: V2VolumesWithBalance = { - account: "27959314", + account: "94647522", asset: "", - balance: BigInt("296128"), - input: BigInt("493407"), - output: BigInt("657044"), + balance: BigInt("258059"), + input: BigInt("532320"), + output: BigInt("703189"), }; ``` diff --git a/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md b/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md index 2865b377..ebbe141b 100644 --- a/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md +++ b/docs/sdk/models/shared/v2volumeswithbalancecursorresponse.md @@ -9,11 +9,11 @@ let value: V2VolumesWithBalanceCursorResponse = { cursor: { data: [ { - account: "20211601", + account: "00388900", asset: "", - balance: BigInt("134173"), - input: BigInt("316541"), - output: BigInt("298750"), + balance: BigInt("913284"), + input: BigInt("305047"), + output: BigInt("557987"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md b/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md index 3924e1f7..b094cdb0 100644 --- a/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md +++ b/docs/sdk/models/shared/v2volumeswithbalancecursorresponsecursor.md @@ -8,11 +8,11 @@ import { V2VolumesWithBalanceCursorResponseCursor } from "@formance/formance-sdk let value: V2VolumesWithBalanceCursorResponseCursor = { data: [ { - account: "49910852", + account: "70318789", asset: "", - balance: BigInt("673653"), - input: BigInt("644223"), - output: BigInt("122085"), + balance: BigInt("774748"), + input: BigInt("994234"), + output: BigInt("614770"), }, ], hasMore: false, diff --git a/docs/sdk/models/shared/v2wallet.md b/docs/sdk/models/shared/v2wallet.md index dd520155..1a85758b 100644 --- a/docs/sdk/models/shared/v2wallet.md +++ b/docs/sdk/models/shared/v2wallet.md @@ -6,8 +6,8 @@ import { V2Wallet } from "@formance/formance-sdk/sdk/models/shared"; let value: V2Wallet = { - createdAt: new Date("2023-09-16T20:07:51.073Z"), - id: "cdd66ea1-85f0-49b4-bfde-094da818af9f", + createdAt: new Date("2023-01-01T01:56:18.923Z"), + id: "4b81669a-d762-4cb6-b8a2-0597bd72d9bb", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/v2walletwithbalances.md b/docs/sdk/models/shared/v2walletwithbalances.md index 5c871664..17c94651 100644 --- a/docs/sdk/models/shared/v2walletwithbalances.md +++ b/docs/sdk/models/shared/v2walletwithbalances.md @@ -9,12 +9,12 @@ let value: V2WalletWithBalances = { balances: { main: { assets: { - "key": BigInt("951411"), + "key": BigInt("392759"), }, }, }, - createdAt: new Date("2024-09-24T19:03:08.378Z"), - id: "945e7234-17ea-4104-a5cf-6afba15e3db5", + createdAt: new Date("2023-02-02T01:56:34.110Z"), + id: "6e65fa51-cbe3-41b3-b25d-807a893d8bf6", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/v2workflow.md b/docs/sdk/models/shared/v2workflow.md index 547394f1..fe815a50 100644 --- a/docs/sdk/models/shared/v2workflow.md +++ b/docs/sdk/models/shared/v2workflow.md @@ -13,9 +13,9 @@ let value: V2Workflow = { }, ], }, - createdAt: new Date("2022-09-06T19:28:31.689Z"), + createdAt: new Date("2025-10-16T10:02:37.797Z"), id: "", - updatedAt: new Date("2022-05-18T04:15:08.103Z"), + updatedAt: new Date("2023-07-18T16:03:52.506Z"), }; ``` diff --git a/docs/sdk/models/shared/v2workflowinstance.md b/docs/sdk/models/shared/v2workflowinstance.md index b1b56a33..f5fce5d9 100644 --- a/docs/sdk/models/shared/v2workflowinstance.md +++ b/docs/sdk/models/shared/v2workflowinstance.md @@ -6,10 +6,10 @@ import { V2WorkflowInstance } from "@formance/formance-sdk/sdk/models/shared"; let value: V2WorkflowInstance = { - createdAt: new Date("2022-07-02T07:00:09.501Z"), + createdAt: new Date("2025-11-03T10:14:15.332Z"), id: "", terminated: false, - updatedAt: new Date("2023-08-29T17:51:53.770Z"), + updatedAt: new Date("2023-05-26T22:19:48.108Z"), workflowID: "", }; ``` diff --git a/docs/sdk/models/shared/v2workflowinstancehistory.md b/docs/sdk/models/shared/v2workflowinstancehistory.md index 5d3dd16a..8448c89b 100644 --- a/docs/sdk/models/shared/v2workflowinstancehistory.md +++ b/docs/sdk/models/shared/v2workflowinstancehistory.md @@ -8,7 +8,7 @@ import { V2WorkflowInstanceHistory } from "@formance/formance-sdk/sdk/models/sha let value: V2WorkflowInstanceHistory = { input: {}, name: "", - startedAt: new Date("2024-10-28T19:37:08.863Z"), + startedAt: new Date("2024-01-16T19:34:44.796Z"), terminated: false, }; ``` diff --git a/docs/sdk/models/shared/v2workflowinstancehistorystage.md b/docs/sdk/models/shared/v2workflowinstancehistorystage.md index 4b0a44c8..5aae8db0 100644 --- a/docs/sdk/models/shared/v2workflowinstancehistorystage.md +++ b/docs/sdk/models/shared/v2workflowinstancehistorystage.md @@ -6,7 +6,7 @@ import { Scheme, V2PaymentStatus, V2PaymentType, V2WorkflowInstanceHistoryStage } from "@formance/formance-sdk/sdk/models/shared"; let value: V2WorkflowInstanceHistoryStage = { - attempt: 271550, + attempt: 701257, input: { createTransaction: { data: { @@ -46,12 +46,7 @@ let value: V2WorkflowInstanceHistoryStage = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { @@ -91,8 +86,8 @@ let value: V2WorkflowInstanceHistoryStage = { }, ], reference: "ref:001", - timestamp: new Date("2024-03-06T23:06:11.778Z"), - txid: BigInt("474872"), + timestamp: new Date("2023-03-16T21:31:12.259Z"), + txid: BigInt("500828"), }, ], }, @@ -134,32 +129,32 @@ let value: V2WorkflowInstanceHistoryStage = { { absolute: false, amount: BigInt("100"), - date: new Date("2024-09-17T20:09:09.916Z"), + date: new Date("2023-11-10T23:44:12.862Z"), raw: {}, - status: V2PaymentStatus.Pending, + status: V2PaymentStatus.Active, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2022-07-18T00:05:49.160Z"), + createdAt: new Date("2024-01-26T02:19:05.906Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: Scheme.Unionpay, + scheme: Scheme.Jcb, sourceAccountID: "", status: V2PaymentStatus.Failed, - type: V2PaymentType.Other, + type: V2PaymentType.Transfer, }, }, listWallets: { cursor: { data: [ { - createdAt: new Date("2023-01-19T19:42:43.719Z"), - id: "40d69f02-ccc8-4f69-916b-3fa4c1f0e4c0", + createdAt: new Date("2023-10-22T13:11:01.959Z"), + id: "20920e81-df70-416e-b2d0-7a09f2b92008", ledger: "", metadata: { "key": "", @@ -174,7 +169,7 @@ let value: V2WorkflowInstanceHistoryStage = { }, }, }, - startedAt: new Date("2024-04-01T00:20:32.487Z"), + startedAt: new Date("2024-12-07T03:37:51.949Z"), terminated: false, }; ``` diff --git a/docs/sdk/models/shared/v2workflowinstancehistorystageinput.md b/docs/sdk/models/shared/v2workflowinstancehistorystageinput.md index 5f3cc452..25ec1756 100644 --- a/docs/sdk/models/shared/v2workflowinstancehistorystageinput.md +++ b/docs/sdk/models/shared/v2workflowinstancehistorystageinput.md @@ -44,12 +44,7 @@ let value: V2WorkflowInstanceHistoryStageInput = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { diff --git a/docs/sdk/models/shared/v2workflowinstancehistorystageoutput.md b/docs/sdk/models/shared/v2workflowinstancehistorystageoutput.md index b1e2c37c..e989e999 100644 --- a/docs/sdk/models/shared/v2workflowinstancehistorystageoutput.md +++ b/docs/sdk/models/shared/v2workflowinstancehistorystageoutput.md @@ -21,8 +21,8 @@ let value: V2WorkflowInstanceHistoryStageOutput = { }, ], reference: "ref:001", - timestamp: new Date("2023-08-07T10:34:04.832Z"), - txid: BigInt("114952"), + timestamp: new Date("2025-02-21T20:56:35.365Z"), + txid: BigInt("493865"), }, ], }, @@ -64,21 +64,21 @@ let value: V2WorkflowInstanceHistoryStageOutput = { { absolute: false, amount: BigInt("100"), - date: new Date("2023-03-08T10:02:12.604Z"), + date: new Date("2024-09-29T18:00:24.289Z"), raw: {}, - status: V2PaymentStatus.Terminated, + status: V2PaymentStatus.Pending, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2023-09-15T16:56:22.815Z"), + createdAt: new Date("2025-08-18T23:53:22.557Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: Scheme.A2a, + scheme: Scheme.AchDebit, sourceAccountID: "", status: V2PaymentStatus.Cancelled, type: V2PaymentType.Payout, @@ -88,8 +88,8 @@ let value: V2WorkflowInstanceHistoryStageOutput = { cursor: { data: [ { - createdAt: new Date("2023-03-06T15:44:21.307Z"), - id: "2cb68a20-597b-4d72-9d9b-bf4b5635f439", + createdAt: new Date("2023-09-06T19:28:31.689Z"), + id: "2fc28622-f4f1-4720-881b-b2fb4bb5659e", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/wallet.md b/docs/sdk/models/shared/wallet.md index e13d6489..53078c3e 100644 --- a/docs/sdk/models/shared/wallet.md +++ b/docs/sdk/models/shared/wallet.md @@ -6,8 +6,8 @@ import { Wallet } from "@formance/formance-sdk/sdk/models/shared"; let value: Wallet = { - createdAt: new Date("2024-04-11T01:09:42.166Z"), - id: "29e33bc3-5a69-47cd-9d99-70417d9a342d", + createdAt: new Date("2025-12-25T20:02:08.349Z"), + id: "52c0140f-b8ca-423d-9576-0b8a4636afa8", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/walletbalances.md b/docs/sdk/models/shared/walletbalances.md index 4fc2288b..6ec01ffc 100644 --- a/docs/sdk/models/shared/walletbalances.md +++ b/docs/sdk/models/shared/walletbalances.md @@ -8,7 +8,7 @@ import { WalletBalances } from "@formance/formance-sdk/sdk/models/shared"; let value: WalletBalances = { main: { assets: { - "key": BigInt("540826"), + "key": BigInt("226545"), }, }, }; diff --git a/docs/sdk/models/shared/walletstransaction.md b/docs/sdk/models/shared/walletstransaction.md index 17ea7f9d..1e9f5818 100644 --- a/docs/sdk/models/shared/walletstransaction.md +++ b/docs/sdk/models/shared/walletstransaction.md @@ -6,7 +6,7 @@ import { WalletsTransaction } from "@formance/formance-sdk/sdk/models/shared"; let value: WalletsTransaction = { - id: 566915, + id: 235556, metadata: { "key": "", }, @@ -47,7 +47,7 @@ let value: WalletsTransaction = { }, }, reference: "ref:001", - timestamp: new Date("2022-01-31T17:24:00.756Z"), + timestamp: new Date("2025-03-17T13:08:49.732Z"), }; ``` diff --git a/docs/sdk/models/shared/walletwithbalances.md b/docs/sdk/models/shared/walletwithbalances.md index 937f7598..96952d3d 100644 --- a/docs/sdk/models/shared/walletwithbalances.md +++ b/docs/sdk/models/shared/walletwithbalances.md @@ -9,12 +9,12 @@ let value: WalletWithBalances = { balances: { main: { assets: { - "key": BigInt("818422"), + "key": BigInt("451807"), }, }, }, - createdAt: new Date("2022-03-30T04:07:03.909Z"), - id: "9d3cec10-3496-4b52-a5ef-3c4e2a1fbd97", + createdAt: new Date("2025-05-26T14:43:35.408Z"), + id: "fc1c1323-8a7f-43cd-b879-6866b12dc46e", ledger: "", metadata: { "key": "", diff --git a/docs/sdk/models/shared/walletwithbalancesbalances.md b/docs/sdk/models/shared/walletwithbalancesbalances.md index 16dffcc5..1126bce8 100644 --- a/docs/sdk/models/shared/walletwithbalancesbalances.md +++ b/docs/sdk/models/shared/walletwithbalancesbalances.md @@ -8,7 +8,7 @@ import { WalletWithBalancesBalances } from "@formance/formance-sdk/sdk/models/sh let value: WalletWithBalancesBalances = { main: { assets: { - "key": BigInt("825739"), + "key": BigInt("519985"), }, }, }; diff --git a/docs/sdk/models/shared/webhooksconfig.md b/docs/sdk/models/shared/webhooksconfig.md index ce2c7502..7e267286 100644 --- a/docs/sdk/models/shared/webhooksconfig.md +++ b/docs/sdk/models/shared/webhooksconfig.md @@ -7,15 +7,15 @@ import { WebhooksConfig } from "@formance/formance-sdk/sdk/models/shared"; let value: WebhooksConfig = { active: true, - createdAt: new Date("2022-08-04T14:43:45.331Z"), + createdAt: new Date("2025-03-26T00:27:29.858Z"), endpoint: "https://example.com", eventTypes: [ "TYPE1", "TYPE2", ], - id: "986cbb80-6770-4a40-a8e0-09801d712950", + id: "1d8f8cfb-9506-46d3-ab0e-a64296be4a60", secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - updatedAt: new Date("2022-02-05T11:00:40.920Z"), + updatedAt: new Date("2024-02-03T14:49:56.249Z"), }; ``` diff --git a/docs/sdk/models/shared/workflow.md b/docs/sdk/models/shared/workflow.md index e52601ee..803b7fbc 100644 --- a/docs/sdk/models/shared/workflow.md +++ b/docs/sdk/models/shared/workflow.md @@ -13,9 +13,9 @@ let value: Workflow = { }, ], }, - createdAt: new Date("2022-12-01T11:41:01.088Z"), + createdAt: new Date("2025-11-14T17:31:24.420Z"), id: "", - updatedAt: new Date("2024-12-13T20:14:50.509Z"), + updatedAt: new Date("2023-11-01T16:14:51.028Z"), }; ``` diff --git a/docs/sdk/models/shared/workflowinstance.md b/docs/sdk/models/shared/workflowinstance.md index 927ea6c4..f55051e0 100644 --- a/docs/sdk/models/shared/workflowinstance.md +++ b/docs/sdk/models/shared/workflowinstance.md @@ -6,10 +6,10 @@ import { WorkflowInstance } from "@formance/formance-sdk/sdk/models/shared"; let value: WorkflowInstance = { - createdAt: new Date("2024-06-14T22:17:26.327Z"), + createdAt: new Date("2024-09-27T22:34:37.039Z"), id: "", terminated: false, - updatedAt: new Date("2024-04-22T21:00:43.699Z"), + updatedAt: new Date("2025-04-29T06:26:15.778Z"), workflowID: "", }; ``` diff --git a/docs/sdk/models/shared/workflowinstancehistory.md b/docs/sdk/models/shared/workflowinstancehistory.md index a2a766af..34acb77f 100644 --- a/docs/sdk/models/shared/workflowinstancehistory.md +++ b/docs/sdk/models/shared/workflowinstancehistory.md @@ -8,7 +8,7 @@ import { WorkflowInstanceHistory } from "@formance/formance-sdk/sdk/models/share let value: WorkflowInstanceHistory = { input: {}, name: "", - startedAt: new Date("2022-01-18T19:30:48.072Z"), + startedAt: new Date("2024-07-19T16:07:04.167Z"), terminated: false, }; ``` diff --git a/docs/sdk/models/shared/workflowinstancehistorystage.md b/docs/sdk/models/shared/workflowinstancehistorystage.md index d40bc4f7..7a6d3f59 100644 --- a/docs/sdk/models/shared/workflowinstancehistorystage.md +++ b/docs/sdk/models/shared/workflowinstancehistorystage.md @@ -11,7 +11,7 @@ import { } from "@formance/formance-sdk/sdk/models/shared"; let value: WorkflowInstanceHistoryStage = { - attempt: 789870, + attempt: 316541, input: { createTransaction: { data: { @@ -51,12 +51,7 @@ let value: WorkflowInstanceHistoryStage = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { @@ -83,7 +78,7 @@ let value: WorkflowInstanceHistoryStage = { output: { createTransaction: { data: { - id: BigInt("979271"), + id: BigInt("298750"), metadata: { "admin": "true", }, @@ -97,7 +92,7 @@ let value: WorkflowInstanceHistoryStage = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-12-14T00:33:52.023Z"), + timestamp: new Date("2023-10-07T13:11:52.112Z"), }, }, getAccount: { @@ -138,23 +133,23 @@ let value: WorkflowInstanceHistoryStage = { { absolute: false, amount: BigInt("100"), - date: new Date("2024-08-23T13:46:22.768Z"), + date: new Date("2025-04-02T14:06:58.075Z"), raw: {}, - status: OrchestrationPaymentStatus.Failed, + status: OrchestrationPaymentStatus.Cancelled, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2024-03-23T19:07:41.270Z"), + createdAt: new Date("2024-08-08T05:45:19.091Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: OrchestrationPaymentScheme.AchDebit, + scheme: OrchestrationPaymentScheme.Unknown, sourceAccountID: "", - status: OrchestrationPaymentStatus.Cancelled, + status: OrchestrationPaymentStatus.Terminated, type: OrchestrationPaymentType.PayIn, }, }, @@ -162,8 +157,8 @@ let value: WorkflowInstanceHistoryStage = { cursor: { data: [ { - createdAt: new Date("2023-09-04T21:05:13.882Z"), - id: "6e1fe17b-bec4-47b2-b374-d95dcfd62d05", + createdAt: new Date("2024-03-24T00:23:12.517Z"), + id: "47a7eeb7-26b4-41eb-b9cd-7ee4988f4fe7", ledger: "", metadata: { "key": "", @@ -179,7 +174,7 @@ let value: WorkflowInstanceHistoryStage = { }, revertTransaction: { data: { - id: BigInt("960767"), + id: BigInt("769047"), metadata: { "admin": "true", }, @@ -193,11 +188,11 @@ let value: WorkflowInstanceHistoryStage = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-12-04T01:24:39.845Z"), + timestamp: new Date("2025-01-12T23:20:57.411Z"), }, }, }, - startedAt: new Date("2024-01-25T18:12:19.188Z"), + startedAt: new Date("2023-12-17T12:54:38.255Z"), terminated: false, }; ``` diff --git a/docs/sdk/models/shared/workflowinstancehistorystageinput.md b/docs/sdk/models/shared/workflowinstancehistorystageinput.md index 9b3aae5f..245875ca 100644 --- a/docs/sdk/models/shared/workflowinstancehistorystageinput.md +++ b/docs/sdk/models/shared/workflowinstancehistorystageinput.md @@ -44,12 +44,7 @@ let value: WorkflowInstanceHistoryStageInput = { metadata: { "key": "", }, - sources: [ - { - identifier: "", - type: "", - }, - ], + sources: [], }, }, debitWallet: { diff --git a/docs/sdk/models/shared/workflowinstancehistorystageoutput.md b/docs/sdk/models/shared/workflowinstancehistorystageoutput.md index be195a55..d9a3cc93 100644 --- a/docs/sdk/models/shared/workflowinstancehistorystageoutput.md +++ b/docs/sdk/models/shared/workflowinstancehistorystageoutput.md @@ -13,7 +13,7 @@ import { let value: WorkflowInstanceHistoryStageOutput = { createTransaction: { data: { - id: BigInt("42454"), + id: BigInt("196451"), metadata: { "admin": "true", }, @@ -27,7 +27,7 @@ let value: WorkflowInstanceHistoryStageOutput = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2023-07-18T20:53:27.211Z"), + timestamp: new Date("2025-01-05T23:51:52.329Z"), }, }, getAccount: { @@ -68,23 +68,23 @@ let value: WorkflowInstanceHistoryStageOutput = { { absolute: false, amount: BigInt("100"), - date: new Date("2023-08-23T08:49:14.071Z"), + date: new Date("2025-07-12T21:34:10.519Z"), raw: {}, - status: OrchestrationPaymentStatus.Terminated, + status: OrchestrationPaymentStatus.Pending, }, ], asset: "USD", connectorID: "", - createdAt: new Date("2022-03-17T04:22:16.108Z"), + createdAt: new Date("2024-12-05T12:17:59.943Z"), destinationAccountID: "", id: "XXX", initialAmount: BigInt("100"), metadata: {}, raw: {}, reference: "", - scheme: OrchestrationPaymentScheme.Discover, + scheme: OrchestrationPaymentScheme.SepaDebit, sourceAccountID: "", - status: OrchestrationPaymentStatus.Terminated, + status: OrchestrationPaymentStatus.Cancelled, type: OrchestrationPaymentType.Payout, }, }, @@ -92,8 +92,8 @@ let value: WorkflowInstanceHistoryStageOutput = { cursor: { data: [ { - createdAt: new Date("2023-10-10T15:44:11.718Z"), - id: "b55004ba-ccdb-4fe9-990f-2bd531b7be2e", + createdAt: new Date("2024-06-03T16:57:26.286Z"), + id: "82bd040f-af8c-4556-ba5e-f031037d37ea", ledger: "", metadata: { "key": "", @@ -109,7 +109,7 @@ let value: WorkflowInstanceHistoryStageOutput = { }, revertTransaction: { data: { - id: BigInt("305267"), + id: BigInt("550994"), metadata: { "admin": "true", }, @@ -123,7 +123,7 @@ let value: WorkflowInstanceHistoryStageOutput = { ], reference: "ref:001", reverted: false, - timestamp: new Date("2024-10-30T14:18:34.931Z"), + timestamp: new Date("2025-12-10T14:11:23.041Z"), }, }, }; diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index cbf19bfe..6c7668ba 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -1,2 +1,820 @@ # Auth -(*auth*) \ No newline at end of file +(*auth*) + +## Overview + +### Available Operations + +* [getServerInfo](#getserverinfo) - Get server info +* [createClient](#createclient) - Create client +* [createSecret](#createsecret) - Add a secret to a client +* [deleteClient](#deleteclient) - Delete client +* [deleteSecret](#deletesecret) - Delete a secret from a client +* [listClients](#listclients) - List clients +* [listUsers](#listusers) - List users +* [readClient](#readclient) - Read client +* [readUser](#readuser) - Read user +* [updateClient](#updateclient) - Update client + +## getServerInfo + +Get server info + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.getServerInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authGetServerInfo } from "@formance/formance-sdk/funcs/authGetServerInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authGetServerInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetServerInfoResponse](../../sdk/models/operations/getserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createClient + +Create client + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.createClient(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authCreateClient } from "@formance/formance-sdk/funcs/authCreateClient.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authCreateClient(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.CreateClientRequest](../../sdk/models/shared/createclientrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateClientResponse](../../sdk/models/operations/createclientresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createSecret + +Add a secret to a client + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.createSecret({ + clientId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authCreateSecret } from "@formance/formance-sdk/funcs/authCreateSecret.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authCreateSecret(sdk, { + clientId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateSecretRequest](../../sdk/models/operations/createsecretrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateSecretResponse](../../sdk/models/operations/createsecretresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteClient + +Delete client + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.deleteClient({ + clientId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authDeleteClient } from "@formance/formance-sdk/funcs/authDeleteClient.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authDeleteClient(sdk, { + clientId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteClientRequest](../../sdk/models/operations/deleteclientrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeleteClientResponse](../../sdk/models/operations/deleteclientresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteSecret + +Delete a secret from a client + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.deleteSecret({ + clientId: "", + secretId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authDeleteSecret } from "@formance/formance-sdk/funcs/authDeleteSecret.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authDeleteSecret(sdk, { + clientId: "", + secretId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteSecretRequest](../../sdk/models/operations/deletesecretrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeleteSecretResponse](../../sdk/models/operations/deletesecretresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listClients + +List clients + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.listClients(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authListClients } from "@formance/formance-sdk/funcs/authListClients.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authListClients(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListClientsResponse](../../sdk/models/operations/listclientsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listUsers + +List users + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.listUsers(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authListUsers } from "@formance/formance-sdk/funcs/authListUsers.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authListUsers(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListUsersResponse](../../sdk/models/operations/listusersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## readClient + +Read client + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.readClient({ + clientId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authReadClient } from "@formance/formance-sdk/funcs/authReadClient.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authReadClient(sdk, { + clientId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReadClientRequest](../../sdk/models/operations/readclientrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReadClientResponse](../../sdk/models/operations/readclientresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## readUser + +Read user + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.readUser({ + userId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authReadUser } from "@formance/formance-sdk/funcs/authReadUser.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authReadUser(sdk, { + userId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReadUserRequest](../../sdk/models/operations/readuserrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReadUserResponse](../../sdk/models/operations/readuserresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateClient + +Update client + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.auth.updateClient({ + clientId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { authUpdateClient } from "@formance/formance-sdk/funcs/authUpdateClient.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await authUpdateClient(sdk, { + clientId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateClientRequest](../../sdk/models/operations/updateclientrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UpdateClientResponse](../../sdk/models/operations/updateclientresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ledger/README.md b/docs/sdks/ledger/README.md index 3bc4e26d..d012def5 100644 --- a/docs/sdks/ledger/README.md +++ b/docs/sdks/ledger/README.md @@ -1,2 +1,6 @@ # Ledger -(*ledger*) \ No newline at end of file +(*ledger*) + +## Overview + +### Available Operations diff --git a/docs/sdks/orchestration/README.md b/docs/sdks/orchestration/README.md index c891d0e7..7735275a 100644 --- a/docs/sdks/orchestration/README.md +++ b/docs/sdks/orchestration/README.md @@ -1,2 +1,2932 @@ # Orchestration -(*orchestration*) \ No newline at end of file +(*orchestration*) + +## Overview + +### Available Operations + +* [cancelEvent](#cancelevent) - Cancel a running workflow +* [createTrigger](#createtrigger) - Create trigger +* [createWorkflow](#createworkflow) - Create workflow +* [deleteTrigger](#deletetrigger) - Delete trigger +* [deleteWorkflow](#deleteworkflow) - Delete a flow by id +* [getInstance](#getinstance) - Get a workflow instance by id +* [getInstanceHistory](#getinstancehistory) - Get a workflow instance history by id +* [getInstanceStageHistory](#getinstancestagehistory) - Get a workflow instance stage history +* [getWorkflow](#getworkflow) - Get a flow by id +* [listInstances](#listinstances) - List instances of a workflow +* [listTriggers](#listtriggers) - List triggers +* [listTriggersOccurrences](#listtriggersoccurrences) - List triggers occurrences +* [listWorkflows](#listworkflows) - List registered workflows +* [orchestrationgetServerInfo](#orchestrationgetserverinfo) - Get server info +* [readTrigger](#readtrigger) - Read trigger +* [runWorkflow](#runworkflow) - Run workflow +* [sendEvent](#sendevent) - Send an event to a running workflow +* [testTrigger](#testtrigger) - Test trigger +* [v2CancelEvent](#v2cancelevent) - Cancel a running workflow +* [v2CreateTrigger](#v2createtrigger) - Create trigger +* [v2CreateWorkflow](#v2createworkflow) - Create workflow +* [v2DeleteTrigger](#v2deletetrigger) - Delete trigger +* [v2DeleteWorkflow](#v2deleteworkflow) - Delete a flow by id +* [v2GetInstance](#v2getinstance) - Get a workflow instance by id +* [v2GetInstanceHistory](#v2getinstancehistory) - Get a workflow instance history by id +* [v2GetInstanceStageHistory](#v2getinstancestagehistory) - Get a workflow instance stage history +* [v2GetServerInfo](#v2getserverinfo) - Get server info +* [v2GetWorkflow](#v2getworkflow) - Get a flow by id +* [v2ListInstances](#v2listinstances) - List instances of a workflow +* [v2ListTriggers](#v2listtriggers) - List triggers +* [v2ListTriggersOccurrences](#v2listtriggersoccurrences) - List triggers occurrences +* [v2ListWorkflows](#v2listworkflows) - List registered workflows +* [v2ReadTrigger](#v2readtrigger) - Read trigger +* [v2RunWorkflow](#v2runworkflow) - Run workflow +* [v2SendEvent](#v2sendevent) - Send an event to a running workflow + +## cancelEvent + +Cancel a running workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.cancelEvent({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationCancelEvent } from "@formance/formance-sdk/funcs/orchestrationCancelEvent.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationCancelEvent(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CancelEventRequest](../../sdk/models/operations/canceleventrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CancelEventResponse](../../sdk/models/operations/canceleventresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createTrigger + +Create trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.createTrigger(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationCreateTrigger } from "@formance/formance-sdk/funcs/orchestrationCreateTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationCreateTrigger(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.TriggerData](../../sdk/models/shared/triggerdata.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateTriggerResponse](../../sdk/models/operations/createtriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createWorkflow + +Create a workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.createWorkflow(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationCreateWorkflow } from "@formance/formance-sdk/funcs/orchestrationCreateWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationCreateWorkflow(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.CreateWorkflowRequest](../../sdk/models/shared/createworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateWorkflowResponse](../../sdk/models/operations/createworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteTrigger + +Read trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.deleteTrigger({ + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationDeleteTrigger } from "@formance/formance-sdk/funcs/orchestrationDeleteTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationDeleteTrigger(sdk, { + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteTriggerRequest](../../sdk/models/operations/deletetriggerrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeleteTriggerResponse](../../sdk/models/operations/deletetriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteWorkflow + +Delete a flow by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.deleteWorkflow({ + flowId: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationDeleteWorkflow } from "@formance/formance-sdk/funcs/orchestrationDeleteWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationDeleteWorkflow(sdk, { + flowId: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteWorkflowRequest](../../sdk/models/operations/deleteworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeleteWorkflowResponse](../../sdk/models/operations/deleteworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getInstance + +Get a workflow instance by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.getInstance({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationGetInstance } from "@formance/formance-sdk/funcs/orchestrationGetInstance.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationGetInstance(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetInstanceRequest](../../sdk/models/operations/getinstancerequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetInstanceResponse](../../sdk/models/operations/getinstanceresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getInstanceHistory + +Get a workflow instance history by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.getInstanceHistory({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationGetInstanceHistory } from "@formance/formance-sdk/funcs/orchestrationGetInstanceHistory.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationGetInstanceHistory(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetInstanceHistoryRequest](../../sdk/models/operations/getinstancehistoryrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetInstanceHistoryResponse](../../sdk/models/operations/getinstancehistoryresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getInstanceStageHistory + +Get a workflow instance stage history + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.getInstanceStageHistory({ + instanceID: "xxx", + number: 0, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationGetInstanceStageHistory } from "@formance/formance-sdk/funcs/orchestrationGetInstanceStageHistory.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationGetInstanceStageHistory(sdk, { + instanceID: "xxx", + number: 0, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetInstanceStageHistoryRequest](../../sdk/models/operations/getinstancestagehistoryrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetInstanceStageHistoryResponse](../../sdk/models/operations/getinstancestagehistoryresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getWorkflow + +Get a flow by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.getWorkflow({ + flowId: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationGetWorkflow } from "@formance/formance-sdk/funcs/orchestrationGetWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationGetWorkflow(sdk, { + flowId: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetWorkflowRequest](../../sdk/models/operations/getworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetWorkflowResponse](../../sdk/models/operations/getworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listInstances + +List instances of a workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.listInstances({ + running: true, + workflowID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationListInstances } from "@formance/formance-sdk/funcs/orchestrationListInstances.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationListInstances(sdk, { + running: true, + workflowID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListInstancesRequest](../../sdk/models/operations/listinstancesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListInstancesResponse](../../sdk/models/operations/listinstancesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listTriggers + +List triggers + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.listTriggers({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationListTriggers } from "@formance/formance-sdk/funcs/orchestrationListTriggers.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationListTriggers(sdk, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTriggersRequest](../../sdk/models/operations/listtriggersrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListTriggersResponse](../../sdk/models/operations/listtriggersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listTriggersOccurrences + +List triggers occurrences + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.listTriggersOccurrences({ + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationListTriggersOccurrences } from "@formance/formance-sdk/funcs/orchestrationListTriggersOccurrences.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationListTriggersOccurrences(sdk, { + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTriggersOccurrencesRequest](../../sdk/models/operations/listtriggersoccurrencesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListTriggersOccurrencesResponse](../../sdk/models/operations/listtriggersoccurrencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listWorkflows + +List registered workflows + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.listWorkflows(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationListWorkflows } from "@formance/formance-sdk/funcs/orchestrationListWorkflows.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationListWorkflows(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListWorkflowsResponse](../../sdk/models/operations/listworkflowsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## orchestrationgetServerInfo + +Get server info + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.orchestrationgetServerInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationOrchestrationgetServerInfo } from "@formance/formance-sdk/funcs/orchestrationOrchestrationgetServerInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationOrchestrationgetServerInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.OrchestrationgetServerInfoResponse](../../sdk/models/operations/orchestrationgetserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## readTrigger + +Read trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.readTrigger({ + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationReadTrigger } from "@formance/formance-sdk/funcs/orchestrationReadTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationReadTrigger(sdk, { + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReadTriggerRequest](../../sdk/models/operations/readtriggerrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReadTriggerResponse](../../sdk/models/operations/readtriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## runWorkflow + +Run workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.runWorkflow({ + workflowID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationRunWorkflow } from "@formance/formance-sdk/funcs/orchestrationRunWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationRunWorkflow(sdk, { + workflowID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RunWorkflowRequest](../../sdk/models/operations/runworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.RunWorkflowResponse](../../sdk/models/operations/runworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## sendEvent + +Send an event to a running workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.sendEvent({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationSendEvent } from "@formance/formance-sdk/funcs/orchestrationSendEvent.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationSendEvent(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SendEventRequest](../../sdk/models/operations/sendeventrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.SendEventResponse](../../sdk/models/operations/sendeventresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorT | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## testTrigger + +Test trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.testTrigger({ + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationTestTrigger } from "@formance/formance-sdk/funcs/orchestrationTestTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationTestTrigger(sdk, { + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TestTriggerRequest](../../sdk/models/operations/testtriggerrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.TestTriggerResponse](../../sdk/models/operations/testtriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2CancelEvent + +Cancel a running workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2CancelEvent({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2CancelEvent } from "@formance/formance-sdk/funcs/orchestrationV2CancelEvent.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2CancelEvent(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2CancelEventRequest](../../sdk/models/operations/v2canceleventrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2CancelEventResponse](../../sdk/models/operations/v2canceleventresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2CreateTrigger + +Create trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2CreateTrigger(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2CreateTrigger } from "@formance/formance-sdk/funcs/orchestrationV2CreateTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2CreateTrigger(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.V2TriggerData](../../sdk/models/shared/v2triggerdata.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2CreateTriggerResponse](../../sdk/models/operations/v2createtriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2CreateWorkflow + +Create a workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2CreateWorkflow(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2CreateWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2CreateWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2CreateWorkflow(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.V2CreateWorkflowRequest](../../sdk/models/shared/v2createworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2CreateWorkflowResponse](../../sdk/models/operations/v2createworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2DeleteTrigger + +Read trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2DeleteTrigger({ + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2DeleteTrigger } from "@formance/formance-sdk/funcs/orchestrationV2DeleteTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2DeleteTrigger(sdk, { + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2DeleteTriggerRequest](../../sdk/models/operations/v2deletetriggerrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2DeleteTriggerResponse](../../sdk/models/operations/v2deletetriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2DeleteWorkflow + +Delete a flow by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2DeleteWorkflow({ + flowId: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2DeleteWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2DeleteWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2DeleteWorkflow(sdk, { + flowId: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2DeleteWorkflowRequest](../../sdk/models/operations/v2deleteworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2DeleteWorkflowResponse](../../sdk/models/operations/v2deleteworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2GetInstance + +Get a workflow instance by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2GetInstance({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2GetInstance } from "@formance/formance-sdk/funcs/orchestrationV2GetInstance.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2GetInstance(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2GetInstanceRequest](../../sdk/models/operations/v2getinstancerequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2GetInstanceResponse](../../sdk/models/operations/v2getinstanceresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2GetInstanceHistory + +Get a workflow instance history by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2GetInstanceHistory({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2GetInstanceHistory } from "@formance/formance-sdk/funcs/orchestrationV2GetInstanceHistory.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2GetInstanceHistory(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2GetInstanceHistoryRequest](../../sdk/models/operations/v2getinstancehistoryrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2GetInstanceHistoryResponse](../../sdk/models/operations/v2getinstancehistoryresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2GetInstanceStageHistory + +Get a workflow instance stage history + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2GetInstanceStageHistory({ + instanceID: "xxx", + number: 0, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2GetInstanceStageHistory } from "@formance/formance-sdk/funcs/orchestrationV2GetInstanceStageHistory.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2GetInstanceStageHistory(sdk, { + instanceID: "xxx", + number: 0, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2GetInstanceStageHistoryRequest](../../sdk/models/operations/v2getinstancestagehistoryrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2GetInstanceStageHistoryResponse](../../sdk/models/operations/v2getinstancestagehistoryresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2GetServerInfo + +Get server info + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2GetServerInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2GetServerInfo } from "@formance/formance-sdk/funcs/orchestrationV2GetServerInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2GetServerInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2GetServerInfoResponse](../../sdk/models/operations/v2getserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2GetWorkflow + +Get a flow by id + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2GetWorkflow({ + flowId: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2GetWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2GetWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2GetWorkflow(sdk, { + flowId: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2GetWorkflowRequest](../../sdk/models/operations/v2getworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2GetWorkflowResponse](../../sdk/models/operations/v2getworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2ListInstances + +List instances of a workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2ListInstances({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + running: true, + workflowID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2ListInstances } from "@formance/formance-sdk/funcs/orchestrationV2ListInstances.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2ListInstances(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + running: true, + workflowID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListInstancesRequest](../../sdk/models/operations/v2listinstancesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2ListInstancesResponse](../../sdk/models/operations/v2listinstancesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2ListTriggers + +List triggers + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2ListTriggers({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2ListTriggers } from "@formance/formance-sdk/funcs/orchestrationV2ListTriggers.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2ListTriggers(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListTriggersRequest](../../sdk/models/operations/v2listtriggersrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2ListTriggersResponse](../../sdk/models/operations/v2listtriggersresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2ListTriggersOccurrences + +List triggers occurrences + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2ListTriggersOccurrences({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2ListTriggersOccurrences } from "@formance/formance-sdk/funcs/orchestrationV2ListTriggersOccurrences.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2ListTriggersOccurrences(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListTriggersOccurrencesRequest](../../sdk/models/operations/v2listtriggersoccurrencesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2ListTriggersOccurrencesResponse](../../sdk/models/operations/v2listtriggersoccurrencesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2ListWorkflows + +List registered workflows + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2ListWorkflows({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2ListWorkflows } from "@formance/formance-sdk/funcs/orchestrationV2ListWorkflows.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2ListWorkflows(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ListWorkflowsRequest](../../sdk/models/operations/v2listworkflowsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2ListWorkflowsResponse](../../sdk/models/operations/v2listworkflowsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2ReadTrigger + +Read trigger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2ReadTrigger({ + triggerID: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2ReadTrigger } from "@formance/formance-sdk/funcs/orchestrationV2ReadTrigger.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2ReadTrigger(sdk, { + triggerID: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2ReadTriggerRequest](../../sdk/models/operations/v2readtriggerrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2ReadTriggerResponse](../../sdk/models/operations/v2readtriggerresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2RunWorkflow + +Run workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2RunWorkflow({ + workflowID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2RunWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2RunWorkflow.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2RunWorkflow(sdk, { + workflowID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2RunWorkflowRequest](../../sdk/models/operations/v2runworkflowrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2RunWorkflowResponse](../../sdk/models/operations/v2runworkflowresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## v2SendEvent + +Send an event to a running workflow + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.orchestration.v2SendEvent({ + instanceID: "xxx", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { orchestrationV2SendEvent } from "@formance/formance-sdk/funcs/orchestrationV2SendEvent.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await orchestrationV2SendEvent(sdk, { + instanceID: "xxx", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.V2SendEventRequest](../../sdk/models/operations/v2sendeventrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.V2SendEventResponse](../../sdk/models/operations/v2sendeventresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.V2Error | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index b5bccd69..b7ee66c8 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -1,2 +1,3880 @@ # Payments -(*payments*) \ No newline at end of file +(*payments*) + +## Overview + +### Available Operations + +* [addAccountToPool](#addaccounttopool) - Add an account to a pool +* [connectorsTransfer](#connectorstransfer) - Transfer funds between Connector accounts +* [createAccount](#createaccount) - Create an account +* [createBankAccount](#createbankaccount) - Create a BankAccount in Payments and on the PSP +* [createPayment](#createpayment) - Create a payment +* [createPool](#createpool) - Create a Pool +* [createTransferInitiation](#createtransferinitiation) - Create a TransferInitiation +* [deletePool](#deletepool) - Delete a Pool +* [deleteTransferInitiation](#deletetransferinitiation) - Delete a transfer initiation +* [forwardBankAccount](#forwardbankaccount) - Forward a bank account to a connector +* [getAccountBalances](#getaccountbalances) - Get account balances +* [getBankAccount](#getbankaccount) - Get a bank account created by user on Formance +* [~~getConnectorTask~~](#getconnectortask) - Read a specific task of the connector :warning: **Deprecated** +* [getConnectorTaskV1](#getconnectortaskv1) - Read a specific task of the connector +* [getPayment](#getpayment) - Get a payment +* [getPool](#getpool) - Get a Pool +* [getPoolBalances](#getpoolbalances) - Get pool balances +* [getTransferInitiation](#gettransferinitiation) - Get a transfer initiation +* [installConnector](#installconnector) - Install a connector +* [listAllConnectors](#listallconnectors) - List all installed connectors +* [listBankAccounts](#listbankaccounts) - List bank accounts created by user on Formance +* [listConfigsAvailableConnectors](#listconfigsavailableconnectors) - List the configs of each available connector +* [~~listConnectorTasks~~](#listconnectortasks) - List tasks from a connector :warning: **Deprecated** +* [listConnectorTasksV1](#listconnectortasksv1) - List tasks from a connector +* [listPayments](#listpayments) - List payments +* [listPools](#listpools) - List Pools +* [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 +* [~~resetConnector~~](#resetconnector) - Reset a connector :warning: **Deprecated** +* [resetConnectorV1](#resetconnectorv1) - Reset a connector +* [retryTransferInitiation](#retrytransferinitiation) - Retry a failed transfer initiation +* [reverseTransferInitiation](#reversetransferinitiation) - Reverse a transfer initiation +* [udpateTransferInitiationStatus](#udpatetransferinitiationstatus) - Update the status of a transfer initiation +* [~~uninstallConnector~~](#uninstallconnector) - Uninstall a connector :warning: **Deprecated** +* [uninstallConnectorV1](#uninstallconnectorv1) - Uninstall a connector +* [updateBankAccountMetadata](#updatebankaccountmetadata) - Update metadata of a bank account +* [updateConnectorConfigV1](#updateconnectorconfigv1) - Update the config of a connector +* [updateMetadata](#updatemetadata) - Update metadata + +## addAccountToPool + +Add an account to a pool + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.addAccountToPool({ + addAccountToPoolRequest: { + accountID: "", + }, + poolId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsAddAccountToPool } from "@formance/formance-sdk/funcs/paymentsAddAccountToPool.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsAddAccountToPool(sdk, { + addAccountToPoolRequest: { + accountID: "", + }, + poolId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddAccountToPoolRequest](../../sdk/models/operations/addaccounttopoolrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.AddAccountToPoolResponse](../../sdk/models/operations/addaccounttopoolresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## connectorsTransfer + +Execute a transfer between two accounts. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.connectorsTransfer({ + transferRequest: { + amount: BigInt("100"), + asset: "USD", + destination: "acct_1Gqj58KZcSIg2N2q", + source: "acct_1Gqj58KZcSIg2N2q", + }, + connector: Connector.BankingCircle, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsConnectorsTransfer } from "@formance/formance-sdk/funcs/paymentsConnectorsTransfer.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsConnectorsTransfer(sdk, { + transferRequest: { + amount: BigInt("100"), + asset: "USD", + destination: "acct_1Gqj58KZcSIg2N2q", + source: "acct_1Gqj58KZcSIg2N2q", + }, + connector: Connector.BankingCircle, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ConnectorsTransferRequest](../../sdk/models/operations/connectorstransferrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ConnectorsTransferResponse](../../sdk/models/operations/connectorstransferresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createAccount + +Create an account + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { AccountType } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.createAccount({ + connectorID: "", + createdAt: new Date("2025-08-19T02:15:08.152Z"), + reference: "", + type: AccountType.Internal, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsCreateAccount } from "@formance/formance-sdk/funcs/paymentsCreateAccount.js"; +import { AccountType } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsCreateAccount(sdk, { + connectorID: "", + createdAt: new Date("2025-08-19T02:15:08.152Z"), + reference: "", + type: AccountType.Internal, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.AccountRequest](../../sdk/models/shared/accountrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateAccountResponse](../../sdk/models/operations/createaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createBankAccount + +Create a bank account in Payments and on the PSP. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.createBankAccount({ + connectorID: "", + country: "GB", + name: "My account", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsCreateBankAccount } from "@formance/formance-sdk/funcs/paymentsCreateBankAccount.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsCreateBankAccount(sdk, { + connectorID: "", + country: "GB", + name: "My account", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.BankAccountRequest](../../sdk/models/shared/bankaccountrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateBankAccountResponse](../../sdk/models/operations/createbankaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createPayment + +Create a payment + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { PaymentScheme, PaymentStatus, PaymentType } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.createPayment({ + amount: BigInt("100"), + asset: "USD", + connectorID: "", + createdAt: new Date("2025-11-09T01:03:21.011Z"), + reference: "", + scheme: PaymentScheme.Molpay, + status: PaymentStatus.RefundedFailure, + type: PaymentType.Payout, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsCreatePayment } from "@formance/formance-sdk/funcs/paymentsCreatePayment.js"; +import { PaymentScheme, PaymentStatus, PaymentType } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsCreatePayment(sdk, { + amount: BigInt("100"), + asset: "USD", + connectorID: "", + createdAt: new Date("2025-11-09T01:03:21.011Z"), + reference: "", + scheme: PaymentScheme.Molpay, + status: PaymentStatus.RefundedFailure, + type: PaymentType.Payout, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.PaymentRequest](../../sdk/models/shared/paymentrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreatePaymentResponse](../../sdk/models/operations/createpaymentresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createPool + +Create a Pool + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.createPool({ + accountIDs: [ + "", + "", + "", + ], + name: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsCreatePool } from "@formance/formance-sdk/funcs/paymentsCreatePool.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsCreatePool(sdk, { + accountIDs: [ + "", + "", + "", + ], + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.PoolRequest](../../sdk/models/shared/poolrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreatePoolResponse](../../sdk/models/operations/createpoolresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createTransferInitiation + +Create a transfer initiation + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { TransferInitiationRequestType } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.createTransferInitiation({ + amount: BigInt("256698"), + asset: "USD", + description: "worthy pace vague ick liberalize between um", + destinationAccountID: "", + reference: "XXX", + scheduledAt: new Date("2025-05-02T09:50:03.622Z"), + sourceAccountID: "", + type: TransferInitiationRequestType.Payout, + validated: true, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsCreateTransferInitiation } from "@formance/formance-sdk/funcs/paymentsCreateTransferInitiation.js"; +import { TransferInitiationRequestType } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsCreateTransferInitiation(sdk, { + amount: BigInt("256698"), + asset: "USD", + description: "worthy pace vague ick liberalize between um", + destinationAccountID: "", + reference: "XXX", + scheduledAt: new Date("2025-05-02T09:50:03.622Z"), + sourceAccountID: "", + type: TransferInitiationRequestType.Payout, + validated: true, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.TransferInitiationRequest](../../sdk/models/shared/transferinitiationrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateTransferInitiationResponse](../../sdk/models/operations/createtransferinitiationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deletePool + +Delete a pool by its id. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.deletePool({ + poolId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsDeletePool } from "@formance/formance-sdk/funcs/paymentsDeletePool.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsDeletePool(sdk, { + poolId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePoolRequest](../../sdk/models/operations/deletepoolrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeletePoolResponse](../../sdk/models/operations/deletepoolresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteTransferInitiation + +Delete a transfer initiation by its id. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.deleteTransferInitiation({ + transferId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsDeleteTransferInitiation } from "@formance/formance-sdk/funcs/paymentsDeleteTransferInitiation.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsDeleteTransferInitiation(sdk, { + transferId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteTransferInitiationRequest](../../sdk/models/operations/deletetransferinitiationrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeleteTransferInitiationResponse](../../sdk/models/operations/deletetransferinitiationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## forwardBankAccount + +Forward a bank account to a connector + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.forwardBankAccount({ + forwardBankAccountRequest: { + connectorID: "", + }, + bankAccountId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsForwardBankAccount } from "@formance/formance-sdk/funcs/paymentsForwardBankAccount.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsForwardBankAccount(sdk, { + forwardBankAccountRequest: { + connectorID: "", + }, + bankAccountId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ForwardBankAccountRequest](../../sdk/models/operations/forwardbankaccountrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ForwardBankAccountResponse](../../sdk/models/operations/forwardbankaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAccountBalances + +Get account balances + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getAccountBalances({ + accountId: "XXX", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetAccountBalances } from "@formance/formance-sdk/funcs/paymentsGetAccountBalances.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetAccountBalances(sdk, { + accountId: "XXX", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountBalancesRequest](../../sdk/models/operations/getaccountbalancesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetAccountBalancesResponse](../../sdk/models/operations/getaccountbalancesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getBankAccount + +Get a bank account created by user on Formance + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getBankAccount({ + bankAccountId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetBankAccount } from "@formance/formance-sdk/funcs/paymentsGetBankAccount.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetBankAccount(sdk, { + bankAccountId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankAccountRequest](../../sdk/models/operations/getbankaccountrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetBankAccountResponse](../../sdk/models/operations/getbankaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~getConnectorTask~~ + +Get a specific task associated to the connector. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getConnectorTask({ + connector: Connector.Adyen, + taskId: "task1", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetConnectorTask } from "@formance/formance-sdk/funcs/paymentsGetConnectorTask.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetConnectorTask(sdk, { + connector: Connector.Adyen, + taskId: "task1", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetConnectorTaskRequest](../../sdk/models/operations/getconnectortaskrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetConnectorTaskResponse](../../sdk/models/operations/getconnectortaskresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getConnectorTaskV1 + +Get a specific task associated to the connector. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getConnectorTaskV1({ + connector: Connector.BankingCircle, + connectorId: "XXX", + taskId: "task1", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetConnectorTaskV1 } from "@formance/formance-sdk/funcs/paymentsGetConnectorTaskV1.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetConnectorTaskV1(sdk, { + connector: Connector.BankingCircle, + connectorId: "XXX", + taskId: "task1", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetConnectorTaskV1Request](../../sdk/models/operations/getconnectortaskv1request.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetConnectorTaskV1Response](../../sdk/models/operations/getconnectortaskv1response.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPayment + +Get a payment + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getPayment({ + paymentId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetPayment } from "@formance/formance-sdk/funcs/paymentsGetPayment.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetPayment(sdk, { + paymentId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPaymentRequest](../../sdk/models/operations/getpaymentrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetPaymentResponse](../../sdk/models/operations/getpaymentresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPool + +Get a Pool + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getPool({ + poolId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetPool } from "@formance/formance-sdk/funcs/paymentsGetPool.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetPool(sdk, { + poolId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPoolRequest](../../sdk/models/operations/getpoolrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetPoolResponse](../../sdk/models/operations/getpoolresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPoolBalances + +Get pool balances + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getPoolBalances({ + at: new Date("2024-05-04T06:40:23.119Z"), + poolId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetPoolBalances } from "@formance/formance-sdk/funcs/paymentsGetPoolBalances.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetPoolBalances(sdk, { + at: new Date("2024-05-04T06:40:23.119Z"), + poolId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPoolBalancesRequest](../../sdk/models/operations/getpoolbalancesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetPoolBalancesResponse](../../sdk/models/operations/getpoolbalancesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getTransferInitiation + +Get a transfer initiation + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.getTransferInitiation({ + transferId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsGetTransferInitiation } from "@formance/formance-sdk/funcs/paymentsGetTransferInitiation.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsGetTransferInitiation(sdk, { + transferId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTransferInitiationRequest](../../sdk/models/operations/gettransferinitiationrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetTransferInitiationResponse](../../sdk/models/operations/gettransferinitiationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## installConnector + +Install a connector by its name and config. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.installConnector({ + connectorConfig: { + apiKey: "XXX", + name: "My Wise Account", + pollingPeriod: "60s", + }, + connector: Connector.Atlar, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsInstallConnector } from "@formance/formance-sdk/funcs/paymentsInstallConnector.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsInstallConnector(sdk, { + connectorConfig: { + apiKey: "XXX", + name: "My Wise Account", + pollingPeriod: "60s", + }, + connector: Connector.Atlar, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.InstallConnectorRequest](../../sdk/models/operations/installconnectorrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.InstallConnectorResponse](../../sdk/models/operations/installconnectorresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listAllConnectors + +List all installed connectors. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listAllConnectors(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListAllConnectors } from "@formance/formance-sdk/funcs/paymentsListAllConnectors.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListAllConnectors(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListAllConnectorsResponse](../../sdk/models/operations/listallconnectorsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listBankAccounts + +List all bank accounts created by user on Formance. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listBankAccounts({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListBankAccounts } from "@formance/formance-sdk/funcs/paymentsListBankAccounts.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListBankAccounts(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBankAccountsRequest](../../sdk/models/operations/listbankaccountsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListBankAccountsResponse](../../sdk/models/operations/listbankaccountsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listConfigsAvailableConnectors + +List the configs of each available connector. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listConfigsAvailableConnectors(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListConfigsAvailableConnectors } from "@formance/formance-sdk/funcs/paymentsListConfigsAvailableConnectors.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListConfigsAvailableConnectors(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListConfigsAvailableConnectorsResponse](../../sdk/models/operations/listconfigsavailableconnectorsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~listConnectorTasks~~ + +List all tasks associated with this connector. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listConnectorTasks({ + connector: Connector.Modulr, + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListConnectorTasks } from "@formance/formance-sdk/funcs/paymentsListConnectorTasks.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListConnectorTasks(sdk, { + connector: Connector.Modulr, + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListConnectorTasksRequest](../../sdk/models/operations/listconnectortasksrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListConnectorTasksResponse](../../sdk/models/operations/listconnectortasksresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listConnectorTasksV1 + +List all tasks associated with this connector. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listConnectorTasksV1({ + connector: Connector.BankingCircle, + connectorId: "XXX", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListConnectorTasksV1 } from "@formance/formance-sdk/funcs/paymentsListConnectorTasksV1.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListConnectorTasksV1(sdk, { + connector: Connector.BankingCircle, + connectorId: "XXX", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListConnectorTasksV1Request](../../sdk/models/operations/listconnectortasksv1request.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListConnectorTasksV1Response](../../sdk/models/operations/listconnectortasksv1response.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listPayments + +List payments + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listPayments({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListPayments } from "@formance/formance-sdk/funcs/paymentsListPayments.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListPayments(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPaymentsRequest](../../sdk/models/operations/listpaymentsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListPaymentsResponse](../../sdk/models/operations/listpaymentsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listPools + +List Pools + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listPools({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListPools } from "@formance/formance-sdk/funcs/paymentsListPools.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListPools(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPoolsRequest](../../sdk/models/operations/listpoolsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListPoolsResponse](../../sdk/models/operations/listpoolsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listTransferInitiations + +List Transfer Initiations + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.listTransferInitiations({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsListTransferInitiations } from "@formance/formance-sdk/funcs/paymentsListTransferInitiations.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsListTransferInitiations(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTransferInitiationsRequest](../../sdk/models/operations/listtransferinitiationsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListTransferInitiationsResponse](../../sdk/models/operations/listtransferinitiationsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## paymentsgetAccount + +Get an account + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.paymentsgetAccount({ + accountId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsPaymentsgetAccount } from "@formance/formance-sdk/funcs/paymentsPaymentsgetAccount.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsPaymentsgetAccount(sdk, { + accountId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PaymentsgetAccountRequest](../../sdk/models/operations/paymentsgetaccountrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.PaymentsgetAccountResponse](../../sdk/models/operations/paymentsgetaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## paymentsgetServerInfo + +Get server info + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.paymentsgetServerInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsPaymentsgetServerInfo } from "@formance/formance-sdk/funcs/paymentsPaymentsgetServerInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsPaymentsgetServerInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.PaymentsgetServerInfoResponse](../../sdk/models/operations/paymentsgetserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## paymentslistAccounts + +List accounts + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.paymentslistAccounts({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsPaymentslistAccounts } from "@formance/formance-sdk/funcs/paymentsPaymentslistAccounts.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsPaymentslistAccounts(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + sort: [ + "date:asc", + "status:desc", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // 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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.PaymentslistAccountsResponse](../../sdk/models/operations/paymentslistaccountsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~readConnectorConfig~~ + +Read connector config + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.readConnectorConfig({ + connector: Connector.Generic, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsReadConnectorConfig } from "@formance/formance-sdk/funcs/paymentsReadConnectorConfig.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsReadConnectorConfig(sdk, { + connector: Connector.Generic, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReadConnectorConfigRequest](../../sdk/models/operations/readconnectorconfigrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReadConnectorConfigResponse](../../sdk/models/operations/readconnectorconfigresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## readConnectorConfigV1 + +Read connector config + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.readConnectorConfigV1({ + connector: Connector.CurrencyCloud, + connectorId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsReadConnectorConfigV1 } from "@formance/formance-sdk/funcs/paymentsReadConnectorConfigV1.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsReadConnectorConfigV1(sdk, { + connector: Connector.CurrencyCloud, + connectorId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReadConnectorConfigV1Request](../../sdk/models/operations/readconnectorconfigv1request.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReadConnectorConfigV1Response](../../sdk/models/operations/readconnectorconfigv1response.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## removeAccountFromPool + +Remove an account from a pool by its id. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.removeAccountFromPool({ + accountId: "XXX", + poolId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsRemoveAccountFromPool } from "@formance/formance-sdk/funcs/paymentsRemoveAccountFromPool.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsRemoveAccountFromPool(sdk, { + accountId: "XXX", + poolId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RemoveAccountFromPoolRequest](../../sdk/models/operations/removeaccountfrompoolrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.RemoveAccountFromPoolResponse](../../sdk/models/operations/removeaccountfrompoolresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~resetConnector~~ + +Reset a connector by its name. +It will remove the connector and ALL PAYMENTS generated with it. + + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.resetConnector({ + connector: Connector.Atlar, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsResetConnector } from "@formance/formance-sdk/funcs/paymentsResetConnector.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsResetConnector(sdk, { + connector: Connector.Atlar, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ResetConnectorRequest](../../sdk/models/operations/resetconnectorrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ResetConnectorResponse](../../sdk/models/operations/resetconnectorresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## resetConnectorV1 + +Reset a connector by its name. +It will remove the connector and ALL PAYMENTS generated with it. + + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.resetConnectorV1({ + connector: Connector.Generic, + connectorId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsResetConnectorV1 } from "@formance/formance-sdk/funcs/paymentsResetConnectorV1.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsResetConnectorV1(sdk, { + connector: Connector.Generic, + connectorId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ResetConnectorV1Request](../../sdk/models/operations/resetconnectorv1request.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ResetConnectorV1Response](../../sdk/models/operations/resetconnectorv1response.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## retryTransferInitiation + +Retry a failed transfer initiation + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.retryTransferInitiation({ + transferId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsRetryTransferInitiation } from "@formance/formance-sdk/funcs/paymentsRetryTransferInitiation.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsRetryTransferInitiation(sdk, { + transferId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RetryTransferInitiationRequest](../../sdk/models/operations/retrytransferinitiationrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.RetryTransferInitiationResponse](../../sdk/models/operations/retrytransferinitiationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## reverseTransferInitiation + +Reverse transfer initiation + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.reverseTransferInitiation({ + reverseTransferInitiationRequest: { + amount: BigInt("327549"), + asset: "USD", + description: "till gosh how proselytise worriedly whoa", + metadata: { + "key": "", + }, + reference: "XXX", + }, + transferId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsReverseTransferInitiation } from "@formance/formance-sdk/funcs/paymentsReverseTransferInitiation.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsReverseTransferInitiation(sdk, { + reverseTransferInitiationRequest: { + amount: BigInt("327549"), + asset: "USD", + description: "till gosh how proselytise worriedly whoa", + metadata: { + "key": "", + }, + reference: "XXX", + }, + transferId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReverseTransferInitiationRequest](../../sdk/models/operations/reversetransferinitiationrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReverseTransferInitiationResponse](../../sdk/models/operations/reversetransferinitiationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## udpateTransferInitiationStatus + +Update a transfer initiation status + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Status } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.udpateTransferInitiationStatus({ + updateTransferInitiationStatusRequest: { + status: Status.Validated, + }, + transferId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsUdpateTransferInitiationStatus } from "@formance/formance-sdk/funcs/paymentsUdpateTransferInitiationStatus.js"; +import { Status } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsUdpateTransferInitiationStatus(sdk, { + updateTransferInitiationStatusRequest: { + status: Status.Validated, + }, + transferId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UdpateTransferInitiationStatusRequest](../../sdk/models/operations/udpatetransferinitiationstatusrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UdpateTransferInitiationStatusResponse](../../sdk/models/operations/udpatetransferinitiationstatusresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~uninstallConnector~~ + +Uninstall a connector by its name. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.uninstallConnector({ + connector: Connector.Modulr, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsUninstallConnector } from "@formance/formance-sdk/funcs/paymentsUninstallConnector.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsUninstallConnector(sdk, { + connector: Connector.Modulr, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UninstallConnectorRequest](../../sdk/models/operations/uninstallconnectorrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UninstallConnectorResponse](../../sdk/models/operations/uninstallconnectorresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## uninstallConnectorV1 + +Uninstall a connector by its name. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.uninstallConnectorV1({ + connector: Connector.Generic, + connectorId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsUninstallConnectorV1 } from "@formance/formance-sdk/funcs/paymentsUninstallConnectorV1.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsUninstallConnectorV1(sdk, { + connector: Connector.Generic, + connectorId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UninstallConnectorV1Request](../../sdk/models/operations/uninstallconnectorv1request.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UninstallConnectorV1Response](../../sdk/models/operations/uninstallconnectorv1response.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateBankAccountMetadata + +Update metadata of a bank account + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.updateBankAccountMetadata({ + updateBankAccountMetadataRequest: { + metadata: { + "key": "", + }, + }, + bankAccountId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsUpdateBankAccountMetadata } from "@formance/formance-sdk/funcs/paymentsUpdateBankAccountMetadata.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsUpdateBankAccountMetadata(sdk, { + updateBankAccountMetadataRequest: { + metadata: { + "key": "", + }, + }, + bankAccountId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateBankAccountMetadataRequest](../../sdk/models/operations/updatebankaccountmetadatarequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UpdateBankAccountMetadataResponse](../../sdk/models/operations/updatebankaccountmetadataresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateConnectorConfigV1 + +Update connector config + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.updateConnectorConfigV1({ + connectorConfig: { + apiKey: "XXX", + name: "My Stripe Account", + pageSize: 10, + pollingPeriod: "120s", + }, + connector: Connector.Adyen, + connectorId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsUpdateConnectorConfigV1 } from "@formance/formance-sdk/funcs/paymentsUpdateConnectorConfigV1.js"; +import { Connector } from "@formance/formance-sdk/sdk/models/shared"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsUpdateConnectorConfigV1(sdk, { + connectorConfig: { + apiKey: "XXX", + name: "My Stripe Account", + pageSize: 10, + pollingPeriod: "120s", + }, + connector: Connector.Adyen, + connectorId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateConnectorConfigV1Request](../../sdk/models/operations/updateconnectorconfigv1request.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UpdateConnectorConfigV1Response](../../sdk/models/operations/updateconnectorconfigv1response.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## updateMetadata + +Update metadata + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.payments.updateMetadata({ + requestBody: { + "key": "", + "key1": "", + }, + paymentId: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { paymentsUpdateMetadata } from "@formance/formance-sdk/funcs/paymentsUpdateMetadata.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await paymentsUpdateMetadata(sdk, { + requestBody: { + "key": "", + "key1": "", + }, + paymentId: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateMetadataRequest](../../sdk/models/operations/updatemetadatarequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.UpdateMetadataResponse](../../sdk/models/operations/updatemetadataresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.PaymentsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/reconciliation/README.md b/docs/sdks/reconciliation/README.md index 126c1fc1..b95ec3f8 100644 --- a/docs/sdks/reconciliation/README.md +++ b/docs/sdks/reconciliation/README.md @@ -1,2 +1,696 @@ # Reconciliation -(*reconciliation*) \ No newline at end of file +(*reconciliation*) + +## Overview + +### Available Operations + +* [createPolicy](#createpolicy) - Create a policy +* [deletePolicy](#deletepolicy) - Delete a policy +* [getPolicy](#getpolicy) - Get a policy +* [getReconciliation](#getreconciliation) - Get a reconciliation +* [listPolicies](#listpolicies) - List policies +* [listReconciliations](#listreconciliations) - List reconciliations +* [reconcile](#reconcile) - Reconcile using a policy +* [reconciliationgetServerInfo](#reconciliationgetserverinfo) - Get server info + +## createPolicy + +Create a policy + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.createPolicy({ + ledgerName: "default", + ledgerQuery: { + "key": "", + }, + name: "XXX", + paymentsPoolID: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationCreatePolicy } from "@formance/formance-sdk/funcs/reconciliationCreatePolicy.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationCreatePolicy(sdk, { + ledgerName: "default", + ledgerQuery: { + "key": "", + }, + name: "XXX", + paymentsPoolID: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.PolicyRequest](../../sdk/models/shared/policyrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreatePolicyResponse](../../sdk/models/operations/createpolicyresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deletePolicy + +Delete a policy by its id. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.deletePolicy({ + policyID: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationDeletePolicy } from "@formance/formance-sdk/funcs/reconciliationDeletePolicy.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationDeletePolicy(sdk, { + policyID: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePolicyRequest](../../sdk/models/operations/deletepolicyrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeletePolicyResponse](../../sdk/models/operations/deletepolicyresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getPolicy + +Get a policy + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.getPolicy({ + policyID: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationGetPolicy } from "@formance/formance-sdk/funcs/reconciliationGetPolicy.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationGetPolicy(sdk, { + policyID: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPolicyRequest](../../sdk/models/operations/getpolicyrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetPolicyResponse](../../sdk/models/operations/getpolicyresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getReconciliation + +Get a reconciliation + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.getReconciliation({ + reconciliationID: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationGetReconciliation } from "@formance/formance-sdk/funcs/reconciliationGetReconciliation.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationGetReconciliation(sdk, { + reconciliationID: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetReconciliationRequest](../../sdk/models/operations/getreconciliationrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetReconciliationResponse](../../sdk/models/operations/getreconciliationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listPolicies + +List policies + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.listPolicies({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationListPolicies } from "@formance/formance-sdk/funcs/reconciliationListPolicies.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationListPolicies(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPoliciesRequest](../../sdk/models/operations/listpoliciesrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListPoliciesResponse](../../sdk/models/operations/listpoliciesresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## listReconciliations + +List reconciliations + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.listReconciliations({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationListReconciliations } from "@formance/formance-sdk/funcs/reconciliationListReconciliations.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationListReconciliations(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListReconciliationsRequest](../../sdk/models/operations/listreconciliationsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ListReconciliationsResponse](../../sdk/models/operations/listreconciliationsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## reconcile + +Reconcile using a policy + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.reconcile({ + reconciliationRequest: { + reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), + reconciledAtPayments: new Date("2021-01-01T00:00:00.000Z"), + }, + policyID: "XXX", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationReconcile } from "@formance/formance-sdk/funcs/reconciliationReconcile.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationReconcile(sdk, { + reconciliationRequest: { + reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), + reconciledAtPayments: new Date("2021-01-01T00:00:00.000Z"), + }, + policyID: "XXX", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReconcileRequest](../../sdk/models/operations/reconcilerequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReconcileResponse](../../sdk/models/operations/reconcileresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## reconciliationgetServerInfo + +Get server info + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.reconciliation.reconciliationgetServerInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { reconciliationReconciliationgetServerInfo } from "@formance/formance-sdk/funcs/reconciliationReconciliationgetServerInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await reconciliationReconciliationgetServerInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReconciliationgetServerInfoResponse](../../sdk/models/operations/reconciliationgetserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.ReconciliationErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdk/README.md b/docs/sdks/sdk/README.md index 59fc75a9..fba5c5e3 100644 --- a/docs/sdks/sdk/README.md +++ b/docs/sdks/sdk/README.md @@ -17,8 +17,86 @@ and standard method from web, mobile and desktop applications. ### Available Operations +* [getOIDCWellKnowns](#getoidcwellknowns) - Retrieve OpenID connect well-knowns. * [getVersions](#getversions) - Show stack version information +## getOIDCWellKnowns + +Retrieve OpenID connect well-knowns. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.getOIDCWellKnowns(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { getOIDCWellKnowns } from "@formance/formance-sdk/funcs/getOIDCWellKnowns.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await getOIDCWellKnowns(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetOIDCWellKnownsResponse](../../sdk/models/operations/getoidcwellknownsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## getVersions Show stack version information diff --git a/docs/sdks/sdkorchestrationv1/README.md b/docs/sdks/sdkorchestrationv1/README.md deleted file mode 100644 index 3c82cda8..00000000 --- a/docs/sdks/sdkorchestrationv1/README.md +++ /dev/null @@ -1,1417 +0,0 @@ -# SDKOrchestrationV1 -(*orchestration.v1*) - -## Overview - -### Available Operations - -* [cancelEvent](#cancelevent) - Cancel a running workflow -* [createTrigger](#createtrigger) - Create trigger -* [createWorkflow](#createworkflow) - Create workflow -* [deleteTrigger](#deletetrigger) - Delete trigger -* [deleteWorkflow](#deleteworkflow) - Delete a flow by id -* [getInstance](#getinstance) - Get a workflow instance by id -* [getInstanceHistory](#getinstancehistory) - Get a workflow instance history by id -* [getInstanceStageHistory](#getinstancestagehistory) - Get a workflow instance stage history -* [getWorkflow](#getworkflow) - Get a flow by id -* [listInstances](#listinstances) - List instances of a workflow -* [listTriggers](#listtriggers) - List triggers -* [listTriggersOccurrences](#listtriggersoccurrences) - List triggers occurrences -* [listWorkflows](#listworkflows) - List registered workflows -* [orchestrationgetServerInfo](#orchestrationgetserverinfo) - Get server info -* [readTrigger](#readtrigger) - Read trigger -* [runWorkflow](#runworkflow) - Run workflow -* [sendEvent](#sendevent) - Send an event to a running workflow - -## cancelEvent - -Cancel a running workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.cancelEvent({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1CancelEvent } from "@formance/formance-sdk/funcs/orchestrationV1CancelEvent.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1CancelEvent(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CancelEventRequest](../../sdk/models/operations/canceleventrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CancelEventResponse](../../sdk/models/operations/canceleventresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createTrigger - -Create trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.createTrigger(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1CreateTrigger } from "@formance/formance-sdk/funcs/orchestrationV1CreateTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1CreateTrigger(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.TriggerData](../../sdk/models/shared/triggerdata.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateTriggerResponse](../../sdk/models/operations/createtriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createWorkflow - -Create a workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.createWorkflow(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1CreateWorkflow } from "@formance/formance-sdk/funcs/orchestrationV1CreateWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1CreateWorkflow(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.CreateWorkflowRequest](../../sdk/models/shared/createworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateWorkflowResponse](../../sdk/models/operations/createworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteTrigger - -Read trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.deleteTrigger({ - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1DeleteTrigger } from "@formance/formance-sdk/funcs/orchestrationV1DeleteTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1DeleteTrigger(sdk, { - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTriggerRequest](../../sdk/models/operations/deletetriggerrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeleteTriggerResponse](../../sdk/models/operations/deletetriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteWorkflow - -Delete a flow by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.deleteWorkflow({ - flowId: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1DeleteWorkflow } from "@formance/formance-sdk/funcs/orchestrationV1DeleteWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1DeleteWorkflow(sdk, { - flowId: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteWorkflowRequest](../../sdk/models/operations/deleteworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeleteWorkflowResponse](../../sdk/models/operations/deleteworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInstance - -Get a workflow instance by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.getInstance({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1GetInstance } from "@formance/formance-sdk/funcs/orchestrationV1GetInstance.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1GetInstance(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetInstanceRequest](../../sdk/models/operations/getinstancerequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetInstanceResponse](../../sdk/models/operations/getinstanceresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInstanceHistory - -Get a workflow instance history by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.getInstanceHistory({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1GetInstanceHistory } from "@formance/formance-sdk/funcs/orchestrationV1GetInstanceHistory.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1GetInstanceHistory(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetInstanceHistoryRequest](../../sdk/models/operations/getinstancehistoryrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetInstanceHistoryResponse](../../sdk/models/operations/getinstancehistoryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInstanceStageHistory - -Get a workflow instance stage history - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.getInstanceStageHistory({ - instanceID: "xxx", - number: 0, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1GetInstanceStageHistory } from "@formance/formance-sdk/funcs/orchestrationV1GetInstanceStageHistory.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1GetInstanceStageHistory(sdk, { - instanceID: "xxx", - number: 0, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetInstanceStageHistoryRequest](../../sdk/models/operations/getinstancestagehistoryrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetInstanceStageHistoryResponse](../../sdk/models/operations/getinstancestagehistoryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getWorkflow - -Get a flow by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.getWorkflow({ - flowId: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1GetWorkflow } from "@formance/formance-sdk/funcs/orchestrationV1GetWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1GetWorkflow(sdk, { - flowId: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetWorkflowRequest](../../sdk/models/operations/getworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetWorkflowResponse](../../sdk/models/operations/getworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listInstances - -List instances of a workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.listInstances({ - running: true, - workflowID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1ListInstances } from "@formance/formance-sdk/funcs/orchestrationV1ListInstances.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1ListInstances(sdk, { - running: true, - workflowID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListInstancesRequest](../../sdk/models/operations/listinstancesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListInstancesResponse](../../sdk/models/operations/listinstancesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listTriggers - -List triggers - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.listTriggers({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1ListTriggers } from "@formance/formance-sdk/funcs/orchestrationV1ListTriggers.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1ListTriggers(sdk, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTriggersRequest](../../sdk/models/operations/listtriggersrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListTriggersResponse](../../sdk/models/operations/listtriggersresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listTriggersOccurrences - -List triggers occurrences - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.listTriggersOccurrences({ - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1ListTriggersOccurrences } from "@formance/formance-sdk/funcs/orchestrationV1ListTriggersOccurrences.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1ListTriggersOccurrences(sdk, { - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTriggersOccurrencesRequest](../../sdk/models/operations/listtriggersoccurrencesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListTriggersOccurrencesResponse](../../sdk/models/operations/listtriggersoccurrencesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listWorkflows - -List registered workflows - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.listWorkflows(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1ListWorkflows } from "@formance/formance-sdk/funcs/orchestrationV1ListWorkflows.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1ListWorkflows(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListWorkflowsResponse](../../sdk/models/operations/listworkflowsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## orchestrationgetServerInfo - -Get server info - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.orchestrationgetServerInfo(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1OrchestrationgetServerInfo } from "@formance/formance-sdk/funcs/orchestrationV1OrchestrationgetServerInfo.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1OrchestrationgetServerInfo(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.OrchestrationgetServerInfoResponse](../../sdk/models/operations/orchestrationgetserverinforesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## readTrigger - -Read trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.readTrigger({ - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1ReadTrigger } from "@formance/formance-sdk/funcs/orchestrationV1ReadTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1ReadTrigger(sdk, { - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReadTriggerRequest](../../sdk/models/operations/readtriggerrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ReadTriggerResponse](../../sdk/models/operations/readtriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## runWorkflow - -Run workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.runWorkflow({ - workflowID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1RunWorkflow } from "@formance/formance-sdk/funcs/orchestrationV1RunWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1RunWorkflow(sdk, { - workflowID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RunWorkflowRequest](../../sdk/models/operations/runworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.RunWorkflowResponse](../../sdk/models/operations/runworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## sendEvent - -Send an event to a running workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v1.sendEvent({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV1SendEvent } from "@formance/formance-sdk/funcs/orchestrationV1SendEvent.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV1SendEvent(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SendEventRequest](../../sdk/models/operations/sendeventrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.SendEventResponse](../../sdk/models/operations/sendeventresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.ErrorT | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdkpaymentsv1/README.md b/docs/sdks/sdkpaymentsv1/README.md deleted file mode 100644 index d3bdab68..00000000 --- a/docs/sdks/sdkpaymentsv1/README.md +++ /dev/null @@ -1,3882 +0,0 @@ -# SDKPaymentsV1 -(*payments.v1*) - -## Overview - -### Available Operations - -* [addAccountToPool](#addaccounttopool) - Add an account to a pool -* [connectorsTransfer](#connectorstransfer) - Transfer funds between Connector accounts -* [createAccount](#createaccount) - Create an account -* [createBankAccount](#createbankaccount) - Create a BankAccount in Payments and on the PSP -* [createPayment](#createpayment) - Create a payment -* [createPool](#createpool) - Create a Pool -* [createTransferInitiation](#createtransferinitiation) - Create a TransferInitiation -* [deletePool](#deletepool) - Delete a Pool -* [deleteTransferInitiation](#deletetransferinitiation) - Delete a transfer initiation -* [forwardBankAccount](#forwardbankaccount) - Forward a bank account to a connector -* [getAccountBalances](#getaccountbalances) - Get account balances -* [getBankAccount](#getbankaccount) - Get a bank account created by user on Formance -* [~~getConnectorTask~~](#getconnectortask) - Read a specific task of the connector :warning: **Deprecated** -* [getConnectorTaskV1](#getconnectortaskv1) - Read a specific task of the connector -* [getPayment](#getpayment) - Get a payment -* [getPool](#getpool) - Get a Pool -* [getPoolBalances](#getpoolbalances) - Get pool balances -* [getTransferInitiation](#gettransferinitiation) - Get a transfer initiation -* [installConnector](#installconnector) - Install a connector -* [listAllConnectors](#listallconnectors) - List all installed connectors -* [listBankAccounts](#listbankaccounts) - List bank accounts created by user on Formance -* [listConfigsAvailableConnectors](#listconfigsavailableconnectors) - List the configs of each available connector -* [~~listConnectorTasks~~](#listconnectortasks) - List tasks from a connector :warning: **Deprecated** -* [listConnectorTasksV1](#listconnectortasksv1) - List tasks from a connector -* [listPayments](#listpayments) - List payments -* [listPools](#listpools) - List Pools -* [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 -* [~~resetConnector~~](#resetconnector) - Reset a connector :warning: **Deprecated** -* [resetConnectorV1](#resetconnectorv1) - Reset a connector -* [retryTransferInitiation](#retrytransferinitiation) - Retry a failed transfer initiation -* [reverseTransferInitiation](#reversetransferinitiation) - Reverse a transfer initiation -* [udpateTransferInitiationStatus](#udpatetransferinitiationstatus) - Update the status of a transfer initiation -* [~~uninstallConnector~~](#uninstallconnector) - Uninstall a connector :warning: **Deprecated** -* [uninstallConnectorV1](#uninstallconnectorv1) - Uninstall a connector -* [updateBankAccountMetadata](#updatebankaccountmetadata) - Update metadata of a bank account -* [updateConnectorConfigV1](#updateconnectorconfigv1) - Update the config of a connector -* [updateMetadata](#updatemetadata) - Update metadata - -## addAccountToPool - -Add an account to a pool - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.addAccountToPool({ - addAccountToPoolRequest: { - accountID: "", - }, - poolId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1AddAccountToPool } from "@formance/formance-sdk/funcs/paymentsV1AddAccountToPool.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1AddAccountToPool(sdk, { - addAccountToPoolRequest: { - accountID: "", - }, - poolId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.AddAccountToPoolRequest](../../sdk/models/operations/addaccounttopoolrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.AddAccountToPoolResponse](../../sdk/models/operations/addaccounttopoolresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## connectorsTransfer - -Execute a transfer between two accounts. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.connectorsTransfer({ - transferRequest: { - amount: BigInt("100"), - asset: "USD", - destination: "acct_1Gqj58KZcSIg2N2q", - source: "acct_1Gqj58KZcSIg2N2q", - }, - connector: Connector.BankingCircle, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ConnectorsTransfer } from "@formance/formance-sdk/funcs/paymentsV1ConnectorsTransfer.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ConnectorsTransfer(sdk, { - transferRequest: { - amount: BigInt("100"), - asset: "USD", - destination: "acct_1Gqj58KZcSIg2N2q", - source: "acct_1Gqj58KZcSIg2N2q", - }, - connector: Connector.BankingCircle, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ConnectorsTransferRequest](../../sdk/models/operations/connectorstransferrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ConnectorsTransferResponse](../../sdk/models/operations/connectorstransferresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createAccount - -Create an account - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { AccountType } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.createAccount({ - connectorID: "", - createdAt: new Date("2024-08-19T02:15:08.668Z"), - reference: "", - type: AccountType.Unknown, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1CreateAccount } from "@formance/formance-sdk/funcs/paymentsV1CreateAccount.js"; -import { AccountType } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1CreateAccount(sdk, { - connectorID: "", - createdAt: new Date("2024-08-19T02:15:08.668Z"), - reference: "", - type: AccountType.Unknown, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.AccountRequest](../../sdk/models/shared/accountrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateAccountResponse](../../sdk/models/operations/createaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createBankAccount - -Create a bank account in Payments and on the PSP. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.createBankAccount({ - connectorID: "", - country: "GB", - name: "My account", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1CreateBankAccount } from "@formance/formance-sdk/funcs/paymentsV1CreateBankAccount.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1CreateBankAccount(sdk, { - connectorID: "", - country: "GB", - name: "My account", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.BankAccountRequest](../../sdk/models/shared/bankaccountrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateBankAccountResponse](../../sdk/models/operations/createbankaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createPayment - -Create a payment - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { PaymentScheme, PaymentStatus, PaymentType } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.createPayment({ - amount: BigInt("100"), - asset: "USD", - connectorID: "", - createdAt: new Date("2024-11-09T01:03:21.153Z"), - reference: "", - scheme: PaymentScheme.GooglePay, - status: PaymentStatus.DisputeWon, - type: PaymentType.Transfer, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1CreatePayment } from "@formance/formance-sdk/funcs/paymentsV1CreatePayment.js"; -import { PaymentScheme, PaymentStatus, PaymentType } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1CreatePayment(sdk, { - amount: BigInt("100"), - asset: "USD", - connectorID: "", - createdAt: new Date("2024-11-09T01:03:21.153Z"), - reference: "", - scheme: PaymentScheme.GooglePay, - status: PaymentStatus.DisputeWon, - type: PaymentType.Transfer, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.PaymentRequest](../../sdk/models/shared/paymentrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreatePaymentResponse](../../sdk/models/operations/createpaymentresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createPool - -Create a Pool - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.createPool({ - accountIDs: [ - "", - ], - name: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1CreatePool } from "@formance/formance-sdk/funcs/paymentsV1CreatePool.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1CreatePool(sdk, { - accountIDs: [ - "", - ], - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.PoolRequest](../../sdk/models/shared/poolrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreatePoolResponse](../../sdk/models/operations/createpoolresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createTransferInitiation - -Create a transfer initiation - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { TransferInitiationRequestType } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.createTransferInitiation({ - amount: BigInt("256698"), - asset: "USD", - description: "Multi-tiered incremental methodology", - destinationAccountID: "", - reference: "XXX", - scheduledAt: new Date("2023-05-04T22:47:54.364Z"), - sourceAccountID: "", - type: TransferInitiationRequestType.Transfer, - validated: false, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1CreateTransferInitiation } from "@formance/formance-sdk/funcs/paymentsV1CreateTransferInitiation.js"; -import { TransferInitiationRequestType } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1CreateTransferInitiation(sdk, { - amount: BigInt("256698"), - asset: "USD", - description: "Multi-tiered incremental methodology", - destinationAccountID: "", - reference: "XXX", - scheduledAt: new Date("2023-05-04T22:47:54.364Z"), - sourceAccountID: "", - type: TransferInitiationRequestType.Transfer, - validated: false, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.TransferInitiationRequest](../../sdk/models/shared/transferinitiationrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateTransferInitiationResponse](../../sdk/models/operations/createtransferinitiationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deletePool - -Delete a pool by its id. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.deletePool({ - poolId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1DeletePool } from "@formance/formance-sdk/funcs/paymentsV1DeletePool.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1DeletePool(sdk, { - poolId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeletePoolRequest](../../sdk/models/operations/deletepoolrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeletePoolResponse](../../sdk/models/operations/deletepoolresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteTransferInitiation - -Delete a transfer initiation by its id. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.deleteTransferInitiation({ - transferId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1DeleteTransferInitiation } from "@formance/formance-sdk/funcs/paymentsV1DeleteTransferInitiation.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1DeleteTransferInitiation(sdk, { - transferId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTransferInitiationRequest](../../sdk/models/operations/deletetransferinitiationrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeleteTransferInitiationResponse](../../sdk/models/operations/deletetransferinitiationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## forwardBankAccount - -Forward a bank account to a connector - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.forwardBankAccount({ - forwardBankAccountRequest: { - connectorID: "", - }, - bankAccountId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ForwardBankAccount } from "@formance/formance-sdk/funcs/paymentsV1ForwardBankAccount.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ForwardBankAccount(sdk, { - forwardBankAccountRequest: { - connectorID: "", - }, - bankAccountId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ForwardBankAccountRequest](../../sdk/models/operations/forwardbankaccountrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ForwardBankAccountResponse](../../sdk/models/operations/forwardbankaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getAccountBalances - -Get account balances - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getAccountBalances({ - accountId: "XXX", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetAccountBalances } from "@formance/formance-sdk/funcs/paymentsV1GetAccountBalances.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetAccountBalances(sdk, { - accountId: "XXX", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountBalancesRequest](../../sdk/models/operations/getaccountbalancesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetAccountBalancesResponse](../../sdk/models/operations/getaccountbalancesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getBankAccount - -Get a bank account created by user on Formance - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getBankAccount({ - bankAccountId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetBankAccount } from "@formance/formance-sdk/funcs/paymentsV1GetBankAccount.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetBankAccount(sdk, { - bankAccountId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBankAccountRequest](../../sdk/models/operations/getbankaccountrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetBankAccountResponse](../../sdk/models/operations/getbankaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~getConnectorTask~~ - -Get a specific task associated to the connector. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getConnectorTask({ - connector: Connector.Adyen, - taskId: "task1", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetConnectorTask } from "@formance/formance-sdk/funcs/paymentsV1GetConnectorTask.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetConnectorTask(sdk, { - connector: Connector.Adyen, - taskId: "task1", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetConnectorTaskRequest](../../sdk/models/operations/getconnectortaskrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetConnectorTaskResponse](../../sdk/models/operations/getconnectortaskresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getConnectorTaskV1 - -Get a specific task associated to the connector. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getConnectorTaskV1({ - connector: Connector.BankingCircle, - connectorId: "XXX", - taskId: "task1", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetConnectorTaskV1 } from "@formance/formance-sdk/funcs/paymentsV1GetConnectorTaskV1.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetConnectorTaskV1(sdk, { - connector: Connector.BankingCircle, - connectorId: "XXX", - taskId: "task1", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetConnectorTaskV1Request](../../sdk/models/operations/getconnectortaskv1request.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetConnectorTaskV1Response](../../sdk/models/operations/getconnectortaskv1response.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPayment - -Get a payment - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getPayment({ - paymentId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetPayment } from "@formance/formance-sdk/funcs/paymentsV1GetPayment.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetPayment(sdk, { - paymentId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPaymentRequest](../../sdk/models/operations/getpaymentrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetPaymentResponse](../../sdk/models/operations/getpaymentresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPool - -Get a Pool - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getPool({ - poolId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetPool } from "@formance/formance-sdk/funcs/paymentsV1GetPool.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetPool(sdk, { - poolId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPoolRequest](../../sdk/models/operations/getpoolrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetPoolResponse](../../sdk/models/operations/getpoolresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPoolBalances - -Get pool balances - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getPoolBalances({ - at: new Date("2023-05-05T06:40:23.018Z"), - poolId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetPoolBalances } from "@formance/formance-sdk/funcs/paymentsV1GetPoolBalances.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetPoolBalances(sdk, { - at: new Date("2023-05-05T06:40:23.018Z"), - poolId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPoolBalancesRequest](../../sdk/models/operations/getpoolbalancesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetPoolBalancesResponse](../../sdk/models/operations/getpoolbalancesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getTransferInitiation - -Get a transfer initiation - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.getTransferInitiation({ - transferId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1GetTransferInitiation } from "@formance/formance-sdk/funcs/paymentsV1GetTransferInitiation.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1GetTransferInitiation(sdk, { - transferId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTransferInitiationRequest](../../sdk/models/operations/gettransferinitiationrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetTransferInitiationResponse](../../sdk/models/operations/gettransferinitiationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## installConnector - -Install a connector by its name and config. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.installConnector({ - connectorConfig: { - apiKey: "XXX", - name: "My Stripe Account", - pageSize: 50, - pollingPeriod: "60s", - }, - connector: Connector.Adyen, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1InstallConnector } from "@formance/formance-sdk/funcs/paymentsV1InstallConnector.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1InstallConnector(sdk, { - connectorConfig: { - apiKey: "XXX", - name: "My Stripe Account", - pageSize: 50, - pollingPeriod: "60s", - }, - connector: Connector.Adyen, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.InstallConnectorRequest](../../sdk/models/operations/installconnectorrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.InstallConnectorResponse](../../sdk/models/operations/installconnectorresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listAllConnectors - -List all installed connectors. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listAllConnectors(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListAllConnectors } from "@formance/formance-sdk/funcs/paymentsV1ListAllConnectors.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListAllConnectors(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListAllConnectorsResponse](../../sdk/models/operations/listallconnectorsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listBankAccounts - -List all bank accounts created by user on Formance. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listBankAccounts({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListBankAccounts } from "@formance/formance-sdk/funcs/paymentsV1ListBankAccounts.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListBankAccounts(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListBankAccountsRequest](../../sdk/models/operations/listbankaccountsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListBankAccountsResponse](../../sdk/models/operations/listbankaccountsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listConfigsAvailableConnectors - -List the configs of each available connector. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listConfigsAvailableConnectors(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListConfigsAvailableConnectors } from "@formance/formance-sdk/funcs/paymentsV1ListConfigsAvailableConnectors.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListConfigsAvailableConnectors(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListConfigsAvailableConnectorsResponse](../../sdk/models/operations/listconfigsavailableconnectorsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~listConnectorTasks~~ - -List all tasks associated with this connector. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listConnectorTasks({ - connector: Connector.Modulr, - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListConnectorTasks } from "@formance/formance-sdk/funcs/paymentsV1ListConnectorTasks.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListConnectorTasks(sdk, { - connector: Connector.Modulr, - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConnectorTasksRequest](../../sdk/models/operations/listconnectortasksrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListConnectorTasksResponse](../../sdk/models/operations/listconnectortasksresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listConnectorTasksV1 - -List all tasks associated with this connector. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listConnectorTasksV1({ - connector: Connector.BankingCircle, - connectorId: "XXX", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListConnectorTasksV1 } from "@formance/formance-sdk/funcs/paymentsV1ListConnectorTasksV1.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListConnectorTasksV1(sdk, { - connector: Connector.BankingCircle, - connectorId: "XXX", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConnectorTasksV1Request](../../sdk/models/operations/listconnectortasksv1request.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListConnectorTasksV1Response](../../sdk/models/operations/listconnectortasksv1response.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listPayments - -List payments - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listPayments({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListPayments } from "@formance/formance-sdk/funcs/paymentsV1ListPayments.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListPayments(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListPaymentsRequest](../../sdk/models/operations/listpaymentsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListPaymentsResponse](../../sdk/models/operations/listpaymentsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listPools - -List Pools - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listPools({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListPools } from "@formance/formance-sdk/funcs/paymentsV1ListPools.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListPools(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListPoolsRequest](../../sdk/models/operations/listpoolsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListPoolsResponse](../../sdk/models/operations/listpoolsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listTransferInitiations - -List Transfer Initiations - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.listTransferInitiations({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ListTransferInitiations } from "@formance/formance-sdk/funcs/paymentsV1ListTransferInitiations.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ListTransferInitiations(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTransferInitiationsRequest](../../sdk/models/operations/listtransferinitiationsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListTransferInitiationsResponse](../../sdk/models/operations/listtransferinitiationsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## paymentsgetAccount - -Get an account - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.paymentsgetAccount({ - accountId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1PaymentsgetAccount } from "@formance/formance-sdk/funcs/paymentsV1PaymentsgetAccount.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1PaymentsgetAccount(sdk, { - accountId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.PaymentsgetAccountRequest](../../sdk/models/operations/paymentsgetaccountrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.PaymentsgetAccountResponse](../../sdk/models/operations/paymentsgetaccountresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## paymentsgetServerInfo - -Get server info - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.paymentsgetServerInfo(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1PaymentsgetServerInfo } from "@formance/formance-sdk/funcs/paymentsV1PaymentsgetServerInfo.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1PaymentsgetServerInfo(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.PaymentsgetServerInfoResponse](../../sdk/models/operations/paymentsgetserverinforesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## paymentslistAccounts - -List accounts - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.paymentslistAccounts({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1PaymentslistAccounts } from "@formance/formance-sdk/funcs/paymentsV1PaymentslistAccounts.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1PaymentslistAccounts(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - sort: [ - "date:asc", - "status:desc", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // 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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.PaymentslistAccountsResponse](../../sdk/models/operations/paymentslistaccountsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~readConnectorConfig~~ - -Read connector config - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.readConnectorConfig({ - connector: Connector.Generic, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ReadConnectorConfig } from "@formance/formance-sdk/funcs/paymentsV1ReadConnectorConfig.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ReadConnectorConfig(sdk, { - connector: Connector.Generic, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReadConnectorConfigRequest](../../sdk/models/operations/readconnectorconfigrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ReadConnectorConfigResponse](../../sdk/models/operations/readconnectorconfigresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## readConnectorConfigV1 - -Read connector config - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.readConnectorConfigV1({ - connector: Connector.CurrencyCloud, - connectorId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ReadConnectorConfigV1 } from "@formance/formance-sdk/funcs/paymentsV1ReadConnectorConfigV1.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ReadConnectorConfigV1(sdk, { - connector: Connector.CurrencyCloud, - connectorId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReadConnectorConfigV1Request](../../sdk/models/operations/readconnectorconfigv1request.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ReadConnectorConfigV1Response](../../sdk/models/operations/readconnectorconfigv1response.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## removeAccountFromPool - -Remove an account from a pool by its id. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.removeAccountFromPool({ - accountId: "XXX", - poolId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1RemoveAccountFromPool } from "@formance/formance-sdk/funcs/paymentsV1RemoveAccountFromPool.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1RemoveAccountFromPool(sdk, { - accountId: "XXX", - poolId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RemoveAccountFromPoolRequest](../../sdk/models/operations/removeaccountfrompoolrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.RemoveAccountFromPoolResponse](../../sdk/models/operations/removeaccountfrompoolresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~resetConnector~~ - -Reset a connector by its name. -It will remove the connector and ALL PAYMENTS generated with it. - - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.resetConnector({ - connector: Connector.Atlar, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ResetConnector } from "@formance/formance-sdk/funcs/paymentsV1ResetConnector.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ResetConnector(sdk, { - connector: Connector.Atlar, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ResetConnectorRequest](../../sdk/models/operations/resetconnectorrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ResetConnectorResponse](../../sdk/models/operations/resetconnectorresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## resetConnectorV1 - -Reset a connector by its name. -It will remove the connector and ALL PAYMENTS generated with it. - - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.resetConnectorV1({ - connector: Connector.Generic, - connectorId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ResetConnectorV1 } from "@formance/formance-sdk/funcs/paymentsV1ResetConnectorV1.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ResetConnectorV1(sdk, { - connector: Connector.Generic, - connectorId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ResetConnectorV1Request](../../sdk/models/operations/resetconnectorv1request.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ResetConnectorV1Response](../../sdk/models/operations/resetconnectorv1response.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## retryTransferInitiation - -Retry a failed transfer initiation - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.retryTransferInitiation({ - transferId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1RetryTransferInitiation } from "@formance/formance-sdk/funcs/paymentsV1RetryTransferInitiation.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1RetryTransferInitiation(sdk, { - transferId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RetryTransferInitiationRequest](../../sdk/models/operations/retrytransferinitiationrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.RetryTransferInitiationResponse](../../sdk/models/operations/retrytransferinitiationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## reverseTransferInitiation - -Reverse transfer initiation - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.reverseTransferInitiation({ - reverseTransferInitiationRequest: { - amount: BigInt("327549"), - asset: "USD", - description: "Streamlined high-level local area network", - metadata: { - "key": "", - "key1": "", - "key2": "", - }, - reference: "XXX", - }, - transferId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1ReverseTransferInitiation } from "@formance/formance-sdk/funcs/paymentsV1ReverseTransferInitiation.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1ReverseTransferInitiation(sdk, { - reverseTransferInitiationRequest: { - amount: BigInt("327549"), - asset: "USD", - description: "Streamlined high-level local area network", - metadata: { - "key": "", - "key1": "", - "key2": "", - }, - reference: "XXX", - }, - transferId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReverseTransferInitiationRequest](../../sdk/models/operations/reversetransferinitiationrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ReverseTransferInitiationResponse](../../sdk/models/operations/reversetransferinitiationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## udpateTransferInitiationStatus - -Update a transfer initiation status - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Status } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.udpateTransferInitiationStatus({ - updateTransferInitiationStatusRequest: { - status: Status.Validated, - }, - transferId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1UdpateTransferInitiationStatus } from "@formance/formance-sdk/funcs/paymentsV1UdpateTransferInitiationStatus.js"; -import { Status } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1UdpateTransferInitiationStatus(sdk, { - updateTransferInitiationStatusRequest: { - status: Status.Validated, - }, - transferId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UdpateTransferInitiationStatusRequest](../../sdk/models/operations/udpatetransferinitiationstatusrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UdpateTransferInitiationStatusResponse](../../sdk/models/operations/udpatetransferinitiationstatusresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~uninstallConnector~~ - -Uninstall a connector by its name. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.uninstallConnector({ - connector: Connector.Modulr, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1UninstallConnector } from "@formance/formance-sdk/funcs/paymentsV1UninstallConnector.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1UninstallConnector(sdk, { - connector: Connector.Modulr, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UninstallConnectorRequest](../../sdk/models/operations/uninstallconnectorrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UninstallConnectorResponse](../../sdk/models/operations/uninstallconnectorresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## uninstallConnectorV1 - -Uninstall a connector by its name. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.uninstallConnectorV1({ - connector: Connector.Generic, - connectorId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1UninstallConnectorV1 } from "@formance/formance-sdk/funcs/paymentsV1UninstallConnectorV1.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1UninstallConnectorV1(sdk, { - connector: Connector.Generic, - connectorId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UninstallConnectorV1Request](../../sdk/models/operations/uninstallconnectorv1request.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UninstallConnectorV1Response](../../sdk/models/operations/uninstallconnectorv1response.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updateBankAccountMetadata - -Update metadata of a bank account - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.updateBankAccountMetadata({ - updateBankAccountMetadataRequest: { - metadata: { - - }, - }, - bankAccountId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1UpdateBankAccountMetadata } from "@formance/formance-sdk/funcs/paymentsV1UpdateBankAccountMetadata.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1UpdateBankAccountMetadata(sdk, { - updateBankAccountMetadataRequest: { - metadata: { - - }, - }, - bankAccountId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateBankAccountMetadataRequest](../../sdk/models/operations/updatebankaccountmetadatarequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UpdateBankAccountMetadataResponse](../../sdk/models/operations/updatebankaccountmetadataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updateConnectorConfigV1 - -Update connector config - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.updateConnectorConfigV1({ - connectorConfig: { - apiKey: "XXX", - name: "My Stripe Account", - pageSize: 50, - pollingPeriod: "60s", - }, - connector: Connector.Stripe, - connectorId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1UpdateConnectorConfigV1 } from "@formance/formance-sdk/funcs/paymentsV1UpdateConnectorConfigV1.js"; -import { Connector } from "@formance/formance-sdk/sdk/models/shared"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1UpdateConnectorConfigV1(sdk, { - connectorConfig: { - apiKey: "XXX", - name: "My Stripe Account", - pageSize: 50, - pollingPeriod: "60s", - }, - connector: Connector.Stripe, - connectorId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateConnectorConfigV1Request](../../sdk/models/operations/updateconnectorconfigv1request.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UpdateConnectorConfigV1Response](../../sdk/models/operations/updateconnectorconfigv1response.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updateMetadata - -Update metadata - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.payments.v1.updateMetadata({ - requestBody: { - "key": "", - "key1": "", - }, - paymentId: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { paymentsV1UpdateMetadata } from "@formance/formance-sdk/funcs/paymentsV1UpdateMetadata.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await paymentsV1UpdateMetadata(sdk, { - requestBody: { - "key": "", - "key1": "", - }, - paymentId: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateMetadataRequest](../../sdk/models/operations/updatemetadatarequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UpdateMetadataResponse](../../sdk/models/operations/updatemetadataresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.PaymentsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdkreconciliationv1/README.md b/docs/sdks/sdkreconciliationv1/README.md deleted file mode 100644 index 97cd8f87..00000000 --- a/docs/sdks/sdkreconciliationv1/README.md +++ /dev/null @@ -1,696 +0,0 @@ -# SDKReconciliationV1 -(*reconciliation.v1*) - -## Overview - -### Available Operations - -* [createPolicy](#createpolicy) - Create a policy -* [deletePolicy](#deletepolicy) - Delete a policy -* [getPolicy](#getpolicy) - Get a policy -* [getReconciliation](#getreconciliation) - Get a reconciliation -* [listPolicies](#listpolicies) - List policies -* [listReconciliations](#listreconciliations) - List reconciliations -* [reconcile](#reconcile) - Reconcile using a policy -* [reconciliationgetServerInfo](#reconciliationgetserverinfo) - Get server info - -## createPolicy - -Create a policy - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.createPolicy({ - ledgerName: "default", - ledgerQuery: { - "key": "", - }, - name: "XXX", - paymentsPoolID: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1CreatePolicy } from "@formance/formance-sdk/funcs/reconciliationV1CreatePolicy.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1CreatePolicy(sdk, { - ledgerName: "default", - ledgerQuery: { - "key": "", - }, - name: "XXX", - paymentsPoolID: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.PolicyRequest](../../sdk/models/shared/policyrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreatePolicyResponse](../../sdk/models/operations/createpolicyresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deletePolicy - -Delete a policy by its id. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.deletePolicy({ - policyID: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1DeletePolicy } from "@formance/formance-sdk/funcs/reconciliationV1DeletePolicy.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1DeletePolicy(sdk, { - policyID: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeletePolicyRequest](../../sdk/models/operations/deletepolicyrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeletePolicyResponse](../../sdk/models/operations/deletepolicyresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getPolicy - -Get a policy - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.getPolicy({ - policyID: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1GetPolicy } from "@formance/formance-sdk/funcs/reconciliationV1GetPolicy.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1GetPolicy(sdk, { - policyID: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPolicyRequest](../../sdk/models/operations/getpolicyrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetPolicyResponse](../../sdk/models/operations/getpolicyresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getReconciliation - -Get a reconciliation - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.getReconciliation({ - reconciliationID: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1GetReconciliation } from "@formance/formance-sdk/funcs/reconciliationV1GetReconciliation.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1GetReconciliation(sdk, { - reconciliationID: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetReconciliationRequest](../../sdk/models/operations/getreconciliationrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetReconciliationResponse](../../sdk/models/operations/getreconciliationresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listPolicies - -List policies - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.listPolicies({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1ListPolicies } from "@formance/formance-sdk/funcs/reconciliationV1ListPolicies.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1ListPolicies(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListPoliciesRequest](../../sdk/models/operations/listpoliciesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListPoliciesResponse](../../sdk/models/operations/listpoliciesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listReconciliations - -List reconciliations - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.listReconciliations({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1ListReconciliations } from "@formance/formance-sdk/funcs/reconciliationV1ListReconciliations.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1ListReconciliations(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListReconciliationsRequest](../../sdk/models/operations/listreconciliationsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListReconciliationsResponse](../../sdk/models/operations/listreconciliationsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## reconcile - -Reconcile using a policy - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.reconcile({ - reconciliationRequest: { - reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), - reconciledAtPayments: new Date("2021-01-01T00:00:00.000Z"), - }, - policyID: "XXX", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1Reconcile } from "@formance/formance-sdk/funcs/reconciliationV1Reconcile.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1Reconcile(sdk, { - reconciliationRequest: { - reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"), - reconciledAtPayments: new Date("2021-01-01T00:00:00.000Z"), - }, - policyID: "XXX", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReconcileRequest](../../sdk/models/operations/reconcilerequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ReconcileResponse](../../sdk/models/operations/reconcileresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## reconciliationgetServerInfo - -Get server info - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.reconciliation.v1.reconciliationgetServerInfo(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { reconciliationV1ReconciliationgetServerInfo } from "@formance/formance-sdk/funcs/reconciliationV1ReconciliationgetServerInfo.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await reconciliationV1ReconciliationgetServerInfo(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ReconciliationgetServerInfoResponse](../../sdk/models/operations/reconciliationgetserverinforesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.ReconciliationErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdksearchv1/README.md b/docs/sdks/sdksearchv1/README.md deleted file mode 100644 index dcee4bf4..00000000 --- a/docs/sdks/sdksearchv1/README.md +++ /dev/null @@ -1,196 +0,0 @@ -# SDKSearchV1 -(*search.v1*) - -## Overview - -### Available Operations - -* [~~search~~](#search) - search.v1 :warning: **Deprecated** -* [~~searchgetServerInfo~~](#searchgetserverinfo) - Get server info :warning: **Deprecated** - -## ~~search~~ - -Elasticsearch.v1 query engine - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.search.v1.search({ - after: [ - "users:002", - ], - cursor: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", - ledgers: [ - "quickstart", - ], - policy: "OR", - raw: {}, - sort: "id:asc", - terms: [ - "destination=central_bank1", - ], - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { searchV1Search } from "@formance/formance-sdk/funcs/searchV1Search.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await searchV1Search(sdk, { - after: [ - "users:002", - ], - cursor: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", - ledgers: [ - "quickstart", - ], - policy: "OR", - raw: {}, - sort: "id:asc", - terms: [ - "destination=central_bank1", - ], - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.Query](../../sdk/models/shared/query.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.SearchResponse](../../sdk/models/operations/searchresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~searchgetServerInfo~~ - -Get server info - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.search.v1.searchgetServerInfo(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { searchV1SearchgetServerInfo } from "@formance/formance-sdk/funcs/searchV1SearchgetServerInfo.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await searchV1SearchgetServerInfo(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.SearchgetServerInfoResponse](../../sdk/models/operations/searchgetserverinforesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdkv1/README.md b/docs/sdks/sdkv1/README.md index 601b2b35..85a168f3 100644 --- a/docs/sdks/sdkv1/README.md +++ b/docs/sdks/sdkv1/README.md @@ -1,34 +1,30 @@ # Sdkv1 -(*ledger.v1*) +(*wallets.v1*) ## Overview ### Available Operations -* [createTransactions](#createtransactions) - Create a new batch of transactions to a ledger -* [addMetadataOnTransaction](#addmetadataontransaction) - Set the metadata of a transaction by its ID -* [addMetadataToAccount](#addmetadatatoaccount) - Add metadata to an account -* [countAccounts](#countaccounts) - Count the accounts from a ledger -* [countTransactions](#counttransactions) - Count the transactions from a ledger -* [createTransaction](#createtransaction) - Create a new transaction to a ledger -* [getAccount](#getaccount) - Get account by its address -* [getBalances](#getbalances) - Get the balances from a ledger's account -* [getBalancesAggregated](#getbalancesaggregated) - Get the aggregated balances from selected accounts -* [getInfo](#getinfo) - Show server information -* [getLedgerInfo](#getledgerinfo) - Get information about a ledger -* [getMapping](#getmapping) - Get the mapping of a ledger -* [getTransaction](#gettransaction) - Get transaction from a ledger by its ID -* [listAccounts](#listaccounts) - List accounts from a ledger -* [listLogs](#listlogs) - List the logs from a ledger -* [listTransactions](#listtransactions) - List transactions from a ledger -* [readStats](#readstats) - Get statistics from a ledger -* [revertTransaction](#reverttransaction) - Revert a ledger transaction by its ID -* [~~runScript~~](#runscript) - Execute a Numscript :warning: **Deprecated** -* [updateMapping](#updatemapping) - Update the mapping of a ledger - -## createTransactions - -Create a new batch of transactions to a ledger +* [confirmHold](#confirmhold) - Confirm a hold +* [createBalance](#createbalance) - Create a balance +* [createWallet](#createwallet) - Create a new wallet +* [creditWallet](#creditwallet) - Credit a wallet +* [debitWallet](#debitwallet) - Debit a wallet +* [getBalance](#getbalance) - Get detailed balance +* [getHold](#gethold) - Get a hold +* [getHolds](#getholds) - Get all holds for a wallet +* [getTransactions](#gettransactions) +* [getWallet](#getwallet) - Get a wallet +* [getWalletSummary](#getwalletsummary) - Get wallet summary +* [listBalances](#listbalances) - List balances of a wallet +* [listWallets](#listwallets) - List all wallets +* [updateWallet](#updatewallet) - Update a wallet +* [voidHold](#voidhold) - Cancel a hold +* [walletsgetServerInfo](#walletsgetserverinfo) - Get server info + +## confirmHold + +Confirm a hold ### Example Usage @@ -43,23 +39,12 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.createTransactions({ - transactions: { - transactions: [ - { - postings: [ - { - amount: BigInt("100"), - asset: "COIN", - destination: "users:002", - source: "users:001", - }, - ], - reference: "ref:001", - }, - ], + const result = await sdk.wallets.v1.confirmHold({ + confirmHoldRequest: { + amount: BigInt("100"), + final: true, }, - ledger: "ledger001", + holdId: "", }); // Handle the result @@ -75,7 +60,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1CreateTransactions } from "@formance/formance-sdk/funcs/ledgerV1CreateTransactions.js"; +import { walletsV1ConfirmHold } from "@formance/formance-sdk/funcs/walletsV1ConfirmHold.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -87,23 +72,12 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1CreateTransactions(sdk, { - transactions: { - transactions: [ - { - postings: [ - { - amount: BigInt("100"), - asset: "COIN", - destination: "users:002", - source: "users:001", - }, - ], - reference: "ref:001", - }, - ], + const res = await walletsV1ConfirmHold(sdk, { + confirmHoldRequest: { + amount: BigInt("100"), + final: true, }, - ledger: "ledger001", + holdId: "", }); if (!res.ok) { @@ -123,25 +97,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTransactionsRequest](../../sdk/models/operations/createtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ConfirmHoldRequest](../../sdk/models/operations/confirmholdrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.CreateTransactionsResponse](../../sdk/models/operations/createtransactionsresponse.md)\>** +**Promise\<[operations.ConfirmHoldResponse](../../sdk/models/operations/confirmholdresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## addMetadataOnTransaction +## createBalance -Set the metadata of a transaction by its ID +Create a balance ### Example Usage @@ -156,9 +130,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.addMetadataOnTransaction({ - ledger: "ledger001", - txid: BigInt("1234"), + const result = await sdk.wallets.v1.createBalance({ + id: "", }); // Handle the result @@ -174,7 +147,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1AddMetadataOnTransaction } from "@formance/formance-sdk/funcs/ledgerV1AddMetadataOnTransaction.js"; +import { walletsV1CreateBalance } from "@formance/formance-sdk/funcs/walletsV1CreateBalance.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -186,9 +159,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1AddMetadataOnTransaction(sdk, { - ledger: "ledger001", - txid: BigInt("1234"), + const res = await walletsV1CreateBalance(sdk, { + id: "", }); if (!res.ok) { @@ -208,25 +180,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.AddMetadataOnTransactionRequest](../../sdk/models/operations/addmetadataontransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateBalanceRequest](../../sdk/models/operations/createbalancerequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.AddMetadataOnTransactionResponse](../../sdk/models/operations/addmetadataontransactionresponse.md)\>** +**Promise\<[operations.CreateBalanceResponse](../../sdk/models/operations/createbalanceresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## addMetadataToAccount +## createWallet -Add metadata to an account +Create a new wallet ### Example Usage @@ -241,13 +213,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.addMetadataToAccount({ - requestBody: { - - }, - address: "users:001", - ledger: "ledger001", - }); + const result = await sdk.wallets.v1.createWallet({}); // Handle the result console.log(result); @@ -262,7 +228,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1AddMetadataToAccount } from "@formance/formance-sdk/funcs/ledgerV1AddMetadataToAccount.js"; +import { walletsV1CreateWallet } from "@formance/formance-sdk/funcs/walletsV1CreateWallet.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -274,13 +240,7 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1AddMetadataToAccount(sdk, { - requestBody: { - - }, - address: "users:001", - ledger: "ledger001", - }); + const res = await walletsV1CreateWallet(sdk, {}); if (!res.ok) { throw res.error; @@ -299,25 +259,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.AddMetadataToAccountRequest](../../sdk/models/operations/addmetadatatoaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateWalletRequest](../../sdk/models/operations/createwalletrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.AddMetadataToAccountResponse](../../sdk/models/operations/addmetadatatoaccountresponse.md)\>** +**Promise\<[operations.CreateWalletResponse](../../sdk/models/operations/createwalletresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## countAccounts +## creditWallet -Count the accounts from a ledger +Credit a wallet ### Example Usage @@ -332,202 +292,20 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.countAccounts({ - address: "users:.+", - ledger: "ledger001", - metadata: { - "0": "m", - "1": "e", - "2": "t", - "3": "a", - "4": "d", - "5": "a", - "6": "t", - "7": "a", - "8": "[", - "9": "k", - "10": "e", - "11": "y", - "12": "]", - "13": "=", - "14": "v", - "15": "a", - "16": "l", - "17": "u", - "18": "e", - "19": "1", - "20": "&", - "21": "m", - "22": "e", - "23": "t", - "24": "a", - "25": "d", - "26": "a", - "27": "t", - "28": "a", - "29": "[", - "30": "a", - "31": ".", - "32": "n", - "33": "e", - "34": "s", - "35": "t", - "36": "e", - "37": "d", - "38": ".", - "39": "k", - "40": "e", - "41": "y", - "42": "]", - "43": "=", - "44": "v", - "45": "a", - "46": "l", - "47": "u", - "48": "e", - "49": "2", - }, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1CountAccounts } from "@formance/formance-sdk/funcs/ledgerV1CountAccounts.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); + const result = await sdk.wallets.v1.creditWallet({ + creditWalletRequest: { + amount: { + amount: BigInt("100"), + asset: "USD/2", + }, + metadata: { + "key": "", + }, + sources: [ -async function run() { - const res = await ledgerV1CountAccounts(sdk, { - address: "users:.+", - ledger: "ledger001", - metadata: { - "0": "m", - "1": "e", - "2": "t", - "3": "a", - "4": "d", - "5": "a", - "6": "t", - "7": "a", - "8": "[", - "9": "k", - "10": "e", - "11": "y", - "12": "]", - "13": "=", - "14": "v", - "15": "a", - "16": "l", - "17": "u", - "18": "e", - "19": "1", - "20": "&", - "21": "m", - "22": "e", - "23": "t", - "24": "a", - "25": "d", - "26": "a", - "27": "t", - "28": "a", - "29": "[", - "30": "a", - "31": ".", - "32": "n", - "33": "e", - "34": "s", - "35": "t", - "36": "e", - "37": "d", - "38": ".", - "39": "k", - "40": "e", - "41": "y", - "42": "]", - "43": "=", - "44": "v", - "45": "a", - "46": "l", - "47": "u", - "48": "e", - "49": "2", + ], }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CountAccountsRequest](../../sdk/models/operations/countaccountsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CountAccountsResponse](../../sdk/models/operations/countaccountsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## countTransactions - -Count the transactions from a ledger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.ledger.v1.countTransactions({ - account: "users:001", - destination: "users:001", - ledger: "ledger001", - metadata: {}, - reference: "ref:001", - source: "users:001", + id: "", }); // Handle the result @@ -543,7 +321,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1CountTransactions } from "@formance/formance-sdk/funcs/ledgerV1CountTransactions.js"; +import { walletsV1CreditWallet } from "@formance/formance-sdk/funcs/walletsV1CreditWallet.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -555,13 +333,20 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1CountTransactions(sdk, { - account: "users:001", - destination: "users:001", - ledger: "ledger001", - metadata: {}, - reference: "ref:001", - source: "users:001", + const res = await walletsV1CreditWallet(sdk, { + creditWalletRequest: { + amount: { + amount: BigInt("100"), + asset: "USD/2", + }, + metadata: { + "key": "", + }, + sources: [ + + ], + }, + id: "", }); if (!res.ok) { @@ -581,25 +366,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CountTransactionsRequest](../../sdk/models/operations/counttransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreditWalletRequest](../../sdk/models/operations/creditwalletrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.CountTransactionsResponse](../../sdk/models/operations/counttransactionsresponse.md)\>** +**Promise\<[operations.CreditWalletResponse](../../sdk/models/operations/creditwalletresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## createTransaction +## debitWallet -Create a new transaction to a ledger +Debit a wallet ### Example Usage @@ -614,33 +399,18 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.createTransaction({ - postTransaction: { - postings: [ - { - amount: BigInt("100"), - asset: "COIN", - destination: "users:002", - source: "users:001", - }, - ], - reference: "ref:001", - script: { - plain: "vars {\n" + - "account $user\n" + - "}\n" + - "send [COIN 10] (\n" + - " source = @world\n" + - " destination = $user\n" + - ")\n" + - "", - vars: { - "user": "users:042", - }, + const result = await sdk.wallets.v1.debitWallet({ + debitWalletRequest: { + amount: { + amount: BigInt("100"), + asset: "USD/2", + }, + metadata: { + "key": "", }, + pending: true, }, - ledger: "ledger001", - preview: true, + id: "", }); // Handle the result @@ -656,7 +426,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1CreateTransaction } from "@formance/formance-sdk/funcs/ledgerV1CreateTransaction.js"; +import { walletsV1DebitWallet } from "@formance/formance-sdk/funcs/walletsV1DebitWallet.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -668,33 +438,18 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1CreateTransaction(sdk, { - postTransaction: { - postings: [ - { - amount: BigInt("100"), - asset: "COIN", - destination: "users:002", - source: "users:001", - }, - ], - reference: "ref:001", - script: { - plain: "vars {\n" + - "account $user\n" + - "}\n" + - "send [COIN 10] (\n" + - " source = @world\n" + - " destination = $user\n" + - ")\n" + - "", - vars: { - "user": "users:042", - }, + const res = await walletsV1DebitWallet(sdk, { + debitWalletRequest: { + amount: { + amount: BigInt("100"), + asset: "USD/2", + }, + metadata: { + "key": "", }, + pending: true, }, - ledger: "ledger001", - preview: true, + id: "", }); if (!res.ok) { @@ -714,25 +469,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTransactionRequest](../../sdk/models/operations/createtransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DebitWalletRequest](../../sdk/models/operations/debitwalletrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.CreateTransactionResponse](../../sdk/models/operations/createtransactionresponse.md)\>** +**Promise\<[operations.DebitWalletResponse](../../sdk/models/operations/debitwalletresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getAccount +## getBalance -Get account by its address +Get detailed balance ### Example Usage @@ -747,9 +502,9 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getAccount({ - address: "users:001", - ledger: "ledger001", + const result = await sdk.wallets.v1.getBalance({ + balanceName: "", + id: "", }); // Handle the result @@ -765,7 +520,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetAccount } from "@formance/formance-sdk/funcs/ledgerV1GetAccount.js"; +import { walletsV1GetBalance } from "@formance/formance-sdk/funcs/walletsV1GetBalance.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -777,9 +532,9 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetAccount(sdk, { - address: "users:001", - ledger: "ledger001", + const res = await walletsV1GetBalance(sdk, { + balanceName: "", + id: "", }); if (!res.ok) { @@ -799,25 +554,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAccountRequest](../../sdk/models/operations/getaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetBalanceRequest](../../sdk/models/operations/getbalancerequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetAccountResponse](../../sdk/models/operations/getaccountresponse.md)\>** +**Promise\<[operations.GetBalanceResponse](../../sdk/models/operations/getbalanceresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getBalances +## getHold -Get the balances from a ledger's account +Get a hold ### Example Usage @@ -832,11 +587,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getBalances({ - address: "users:001", - after: "users:003", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - ledger: "ledger001", + const result = await sdk.wallets.v1.getHold({ + holdID: "", }); // Handle the result @@ -852,7 +604,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetBalances } from "@formance/formance-sdk/funcs/ledgerV1GetBalances.js"; +import { walletsV1GetHold } from "@formance/formance-sdk/funcs/walletsV1GetHold.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -864,11 +616,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetBalances(sdk, { - address: "users:001", - after: "users:003", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - ledger: "ledger001", + const res = await walletsV1GetHold(sdk, { + holdID: "", }); if (!res.ok) { @@ -888,25 +637,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBalancesRequest](../../sdk/models/operations/getbalancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetHoldRequest](../../sdk/models/operations/getholdrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetBalancesResponse](../../sdk/models/operations/getbalancesresponse.md)\>** +**Promise\<[operations.GetHoldResponse](../../sdk/models/operations/getholdresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getBalancesAggregated +## getHolds -Get the aggregated balances from selected accounts +Get all holds for a wallet ### Example Usage @@ -921,9 +670,13 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getBalancesAggregated({ - address: "users:001", - ledger: "ledger001", + const result = await sdk.wallets.v1.getHolds({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + metadata: { + "admin": "true", + }, + pageSize: 100, + walletID: "wallet1", }); // Handle the result @@ -939,7 +692,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetBalancesAggregated } from "@formance/formance-sdk/funcs/ledgerV1GetBalancesAggregated.js"; +import { walletsV1GetHolds } from "@formance/formance-sdk/funcs/walletsV1GetHolds.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -951,9 +704,13 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetBalancesAggregated(sdk, { - address: "users:001", - ledger: "ledger001", + const res = await walletsV1GetHolds(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + metadata: { + "admin": "true", + }, + pageSize: 100, + walletID: "wallet1", }); if (!res.ok) { @@ -973,25 +730,23 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBalancesAggregatedRequest](../../sdk/models/operations/getbalancesaggregatedrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetHoldsRequest](../../sdk/models/operations/getholdsrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetBalancesAggregatedResponse](../../sdk/models/operations/getbalancesaggregatedresponse.md)\>** +**Promise\<[operations.GetHoldsResponse](../../sdk/models/operations/getholdsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInfo +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -Show server information +## getTransactions ### Example Usage @@ -1006,7 +761,11 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getInfo(); + const result = await sdk.wallets.v1.getTransactions({ + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + walletID: "wallet1", + }); // Handle the result console.log(result); @@ -1021,7 +780,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetInfo } from "@formance/formance-sdk/funcs/ledgerV1GetInfo.js"; +import { walletsV1GetTransactions } from "@formance/formance-sdk/funcs/walletsV1GetTransactions.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1033,7 +792,11 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetInfo(sdk); + const res = await walletsV1GetTransactions(sdk, { + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + pageSize: 100, + walletID: "wallet1", + }); if (!res.ok) { throw res.error; @@ -1052,24 +815,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTransactionsRequest](../../sdk/models/operations/gettransactionsrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetInfoResponse](../../sdk/models/operations/getinforesponse.md)\>** +**Promise\<[operations.GetTransactionsResponse](../../sdk/models/operations/gettransactionsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getLedgerInfo +## getWallet -Get information about a ledger +Get a wallet ### Example Usage @@ -1084,8 +848,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getLedgerInfo({ - ledger: "ledger001", + const result = await sdk.wallets.v1.getWallet({ + id: "", }); // Handle the result @@ -1101,7 +865,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetLedgerInfo } from "@formance/formance-sdk/funcs/ledgerV1GetLedgerInfo.js"; +import { walletsV1GetWallet } from "@formance/formance-sdk/funcs/walletsV1GetWallet.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1113,8 +877,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetLedgerInfo(sdk, { - ledger: "ledger001", + const res = await walletsV1GetWallet(sdk, { + id: "", }); if (!res.ok) { @@ -1134,25 +898,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetLedgerInfoRequest](../../sdk/models/operations/getledgerinforequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetWalletRequest](../../sdk/models/operations/getwalletrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetLedgerInfoResponse](../../sdk/models/operations/getledgerinforesponse.md)\>** +**Promise\<[operations.GetWalletResponse](../../sdk/models/operations/getwalletresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getMapping +## getWalletSummary -Get the mapping of a ledger +Get wallet summary ### Example Usage @@ -1167,8 +931,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getMapping({ - ledger: "ledger001", + const result = await sdk.wallets.v1.getWalletSummary({ + id: "", }); // Handle the result @@ -1184,7 +948,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetMapping } from "@formance/formance-sdk/funcs/ledgerV1GetMapping.js"; +import { walletsV1GetWalletSummary } from "@formance/formance-sdk/funcs/walletsV1GetWalletSummary.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1196,8 +960,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetMapping(sdk, { - ledger: "ledger001", + const res = await walletsV1GetWalletSummary(sdk, { + id: "", }); if (!res.ok) { @@ -1217,25 +981,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetMappingRequest](../../sdk/models/operations/getmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetWalletSummaryRequest](../../sdk/models/operations/getwalletsummaryrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetMappingResponse](../../sdk/models/operations/getmappingresponse.md)\>** +**Promise\<[operations.GetWalletSummaryResponse](../../sdk/models/operations/getwalletsummaryresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getTransaction +## listBalances -Get transaction from a ledger by its ID +List balances of a wallet ### Example Usage @@ -1250,9 +1014,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.getTransaction({ - ledger: "ledger001", - txid: BigInt("1234"), + const result = await sdk.wallets.v1.listBalances({ + id: "", }); // Handle the result @@ -1268,7 +1031,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1GetTransaction } from "@formance/formance-sdk/funcs/ledgerV1GetTransaction.js"; +import { walletsV1ListBalances } from "@formance/formance-sdk/funcs/walletsV1ListBalances.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1280,9 +1043,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1GetTransaction(sdk, { - ledger: "ledger001", - txid: BigInt("1234"), + const res = await walletsV1ListBalances(sdk, { + id: "", }); if (!res.ok) { @@ -1302,25 +1064,24 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTransactionRequest](../../sdk/models/operations/gettransactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListBalancesRequest](../../sdk/models/operations/listbalancesrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetTransactionResponse](../../sdk/models/operations/gettransactionresponse.md)\>** +**Promise\<[operations.ListBalancesResponse](../../sdk/models/operations/listbalancesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | -## listAccounts +## listWallets -List accounts from a ledger, sorted by address in descending order. +List all wallets ### Example Usage @@ -1335,66 +1096,14 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.listAccounts({ - address: "users:.+", - after: "users:003", - balance: 2400, + const result = await sdk.wallets.v1.listWallets({ cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - ledger: "ledger001", + expand: "balances", metadata: { - "0": "m", - "1": "e", - "2": "t", - "3": "a", - "4": "d", - "5": "a", - "6": "t", - "7": "a", - "8": "[", - "9": "k", - "10": "e", - "11": "y", - "12": "]", - "13": "=", - "14": "v", - "15": "a", - "16": "l", - "17": "u", - "18": "e", - "19": "1", - "20": "&", - "21": "m", - "22": "e", - "23": "t", - "24": "a", - "25": "d", - "26": "a", - "27": "t", - "28": "a", - "29": "[", - "30": "a", - "31": ".", - "32": "n", - "33": "e", - "34": "s", - "35": "t", - "36": "e", - "37": "d", - "38": ".", - "39": "k", - "40": "e", - "41": "y", - "42": "]", - "43": "=", - "44": "v", - "45": "a", - "46": "l", - "47": "u", - "48": "e", - "49": "2", + "admin": "true", }, + name: "wallet1", pageSize: 100, - paginationToken: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", }); // Handle the result @@ -1410,7 +1119,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1ListAccounts } from "@formance/formance-sdk/funcs/ledgerV1ListAccounts.js"; +import { walletsV1ListWallets } from "@formance/formance-sdk/funcs/walletsV1ListWallets.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1422,154 +1131,13 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1ListAccounts(sdk, { - address: "users:.+", - after: "users:003", - balance: 2400, + const res = await walletsV1ListWallets(sdk, { cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - ledger: "ledger001", + expand: "balances", metadata: { - "0": "m", - "1": "e", - "2": "t", - "3": "a", - "4": "d", - "5": "a", - "6": "t", - "7": "a", - "8": "[", - "9": "k", - "10": "e", - "11": "y", - "12": "]", - "13": "=", - "14": "v", - "15": "a", - "16": "l", - "17": "u", - "18": "e", - "19": "1", - "20": "&", - "21": "m", - "22": "e", - "23": "t", - "24": "a", - "25": "d", - "26": "a", - "27": "t", - "28": "a", - "29": "[", - "30": "a", - "31": ".", - "32": "n", - "33": "e", - "34": "s", - "35": "t", - "36": "e", - "37": "d", - "38": ".", - "39": "k", - "40": "e", - "41": "y", - "42": "]", - "43": "=", - "44": "v", - "45": "a", - "46": "l", - "47": "u", - "48": "e", - "49": "2", + "admin": "true", }, - pageSize: 100, - paginationToken: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAccountsRequest](../../sdk/models/operations/listaccountsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListAccountsResponse](../../sdk/models/operations/listaccountsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listLogs - -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({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.ledger.v1.listLogs({ - after: "1234", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - ledger: "ledger001", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1ListLogs } from "@formance/formance-sdk/funcs/ledgerV1ListLogs.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await ledgerV1ListLogs(sdk, { - after: "1234", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - ledger: "ledger001", + name: "wallet1", pageSize: 100, }); @@ -1590,25 +1158,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListLogsRequest](../../sdk/models/operations/listlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListWalletsRequest](../../sdk/models/operations/listwalletsrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListLogsResponse](../../sdk/models/operations/listlogsresponse.md)\>** +**Promise\<[operations.ListWalletsResponse](../../sdk/models/operations/listwalletsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## listTransactions +## updateWallet -List transactions from a ledger, sorted by txid in descending order. +Update a wallet ### Example Usage @@ -1623,15 +1191,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.listTransactions({ - account: "users:001", - after: "1234", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - destination: "users:001", - ledger: "ledger001", - pageSize: 100, - reference: "ref:001", - source: "users:001", + const result = await sdk.wallets.v1.updateWallet({ + id: "", }); // Handle the result @@ -1647,7 +1208,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1ListTransactions } from "@formance/formance-sdk/funcs/ledgerV1ListTransactions.js"; +import { walletsV1UpdateWallet } from "@formance/formance-sdk/funcs/walletsV1UpdateWallet.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1659,15 +1220,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1ListTransactions(sdk, { - account: "users:001", - after: "1234", - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - destination: "users:001", - ledger: "ledger001", - pageSize: 100, - reference: "ref:001", - source: "users:001", + const res = await walletsV1UpdateWallet(sdk, { + id: "", }); if (!res.ok) { @@ -1687,26 +1241,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTransactionsRequest](../../sdk/models/operations/listtransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateWalletRequest](../../sdk/models/operations/updatewalletrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListTransactionsResponse](../../sdk/models/operations/listtransactionsresponse.md)\>** +**Promise\<[operations.UpdateWalletResponse](../../sdk/models/operations/updatewalletresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## readStats - -Get statistics from a ledger. (aggregate metrics on accounts and transactions) +## voidHold +Cancel a hold ### Example Usage @@ -1721,8 +1274,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.readStats({ - ledger: "ledger001", + const result = await sdk.wallets.v1.voidHold({ + holdId: "", }); // Handle the result @@ -1738,7 +1291,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1ReadStats } from "@formance/formance-sdk/funcs/ledgerV1ReadStats.js"; +import { walletsV1VoidHold } from "@formance/formance-sdk/funcs/walletsV1VoidHold.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1750,8 +1303,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1ReadStats(sdk, { - ledger: "ledger001", + const res = await walletsV1VoidHold(sdk, { + holdId: "", }); if (!res.ok) { @@ -1771,25 +1324,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReadStatsRequest](../../sdk/models/operations/readstatsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.VoidHoldRequest](../../sdk/models/operations/voidholdrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ReadStatsResponse](../../sdk/models/operations/readstatsresponse.md)\>** +**Promise\<[operations.VoidHoldResponse](../../sdk/models/operations/voidholdresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## revertTransaction +## walletsgetServerInfo -Revert a ledger transaction by its ID +Get server info ### Example Usage @@ -1804,10 +1357,7 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.ledger.v1.revertTransaction({ - ledger: "ledger001", - txid: BigInt("1234"), - }); + const result = await sdk.wallets.v1.walletsgetServerInfo(); // Handle the result console.log(result); @@ -1822,7 +1372,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1RevertTransaction } from "@formance/formance-sdk/funcs/ledgerV1RevertTransaction.js"; +import { walletsV1WalletsgetServerInfo } from "@formance/formance-sdk/funcs/walletsV1WalletsgetServerInfo.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -1834,224 +1384,7 @@ const sdk = new SDKCore({ }); async function run() { - const res = await ledgerV1RevertTransaction(sdk, { - ledger: "ledger001", - txid: BigInt("1234"), - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RevertTransactionRequest](../../sdk/models/operations/reverttransactionrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.RevertTransactionResponse](../../sdk/models/operations/reverttransactionresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## ~~runScript~~ - -This route is deprecated, and has been merged into `POST /{ledger}/transactions`. - - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.ledger.v1.runScript({ - script: { - plain: "vars {\n" + - "account $user\n" + - "}\n" + - "send [COIN 10] (\n" + - " source = @world\n" + - " destination = $user\n" + - ")\n" + - "", - reference: "order_1234", - vars: { - "user": "users:042", - }, - }, - ledger: "ledger001", - preview: true, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1RunScript } from "@formance/formance-sdk/funcs/ledgerV1RunScript.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await ledgerV1RunScript(sdk, { - script: { - plain: "vars {\n" + - "account $user\n" + - "}\n" + - "send [COIN 10] (\n" + - " source = @world\n" + - " destination = $user\n" + - ")\n" + - "", - reference: "order_1234", - vars: { - "user": "users:042", - }, - }, - ledger: "ledger001", - preview: true, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RunScriptRequest](../../sdk/models/operations/runscriptrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.RunScriptResponse](../../sdk/models/operations/runscriptresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updateMapping - -Update the mapping of a ledger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.ledger.v1.updateMapping({ - mapping: { - contracts: [ - { - account: "users:001", - expr: {}, - }, - ], - }, - ledger: "ledger001", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { ledgerV1UpdateMapping } from "@formance/formance-sdk/funcs/ledgerV1UpdateMapping.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await ledgerV1UpdateMapping(sdk, { - mapping: { - contracts: [ - { - account: "users:001", - expr: {}, - }, - ], - }, - ledger: "ledger001", - }); + const res = await walletsV1WalletsgetServerInfo(sdk); if (!res.ok) { throw res.error; @@ -2070,18 +1403,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateMappingRequest](../../sdk/models/operations/updatemappingrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.UpdateMappingResponse](../../sdk/models/operations/updatemappingresponse.md)\>** +**Promise\<[operations.WalletsgetServerInfoResponse](../../sdk/models/operations/walletsgetserverinforesponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.WalletsErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdkv2/README.md b/docs/sdks/sdkv2/README.md deleted file mode 100644 index 3ea2eb06..00000000 --- a/docs/sdks/sdkv2/README.md +++ /dev/null @@ -1,1522 +0,0 @@ -# Sdkv2 -(*orchestration.v2*) - -## Overview - -### Available Operations - -* [cancelEvent](#cancelevent) - Cancel a running workflow -* [createTrigger](#createtrigger) - Create trigger -* [createWorkflow](#createworkflow) - Create workflow -* [deleteTrigger](#deletetrigger) - Delete trigger -* [deleteWorkflow](#deleteworkflow) - Delete a flow by id -* [getInstance](#getinstance) - Get a workflow instance by id -* [getInstanceHistory](#getinstancehistory) - Get a workflow instance history by id -* [getInstanceStageHistory](#getinstancestagehistory) - Get a workflow instance stage history -* [getServerInfo](#getserverinfo) - Get server info -* [getWorkflow](#getworkflow) - Get a flow by id -* [listInstances](#listinstances) - List instances of a workflow -* [listTriggers](#listtriggers) - List triggers -* [listTriggersOccurrences](#listtriggersoccurrences) - List triggers occurrences -* [listWorkflows](#listworkflows) - List registered workflows -* [readTrigger](#readtrigger) - Read trigger -* [runWorkflow](#runworkflow) - Run workflow -* [sendEvent](#sendevent) - Send an event to a running workflow -* [testTrigger](#testtrigger) - Test trigger - -## cancelEvent - -Cancel a running workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.cancelEvent({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2CancelEvent } from "@formance/formance-sdk/funcs/orchestrationV2CancelEvent.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2CancelEvent(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2CancelEventRequest](../../sdk/models/operations/v2canceleventrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2CancelEventResponse](../../sdk/models/operations/v2canceleventresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createTrigger - -Create trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.createTrigger(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2CreateTrigger } from "@formance/formance-sdk/funcs/orchestrationV2CreateTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2CreateTrigger(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.V2TriggerData](../../sdk/models/shared/v2triggerdata.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2CreateTriggerResponse](../../sdk/models/operations/v2createtriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createWorkflow - -Create a workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.createWorkflow(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2CreateWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2CreateWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2CreateWorkflow(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.V2CreateWorkflowRequest](../../sdk/models/shared/v2createworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2CreateWorkflowResponse](../../sdk/models/operations/v2createworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteTrigger - -Read trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.deleteTrigger({ - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2DeleteTrigger } from "@formance/formance-sdk/funcs/orchestrationV2DeleteTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2DeleteTrigger(sdk, { - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2DeleteTriggerRequest](../../sdk/models/operations/v2deletetriggerrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2DeleteTriggerResponse](../../sdk/models/operations/v2deletetriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteWorkflow - -Delete a flow by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.deleteWorkflow({ - flowId: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2DeleteWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2DeleteWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2DeleteWorkflow(sdk, { - flowId: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2DeleteWorkflowRequest](../../sdk/models/operations/v2deleteworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2DeleteWorkflowResponse](../../sdk/models/operations/v2deleteworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInstance - -Get a workflow instance by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.getInstance({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2GetInstance } from "@formance/formance-sdk/funcs/orchestrationV2GetInstance.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2GetInstance(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2GetInstanceRequest](../../sdk/models/operations/v2getinstancerequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2GetInstanceResponse](../../sdk/models/operations/v2getinstanceresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInstanceHistory - -Get a workflow instance history by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.getInstanceHistory({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2GetInstanceHistory } from "@formance/formance-sdk/funcs/orchestrationV2GetInstanceHistory.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2GetInstanceHistory(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2GetInstanceHistoryRequest](../../sdk/models/operations/v2getinstancehistoryrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2GetInstanceHistoryResponse](../../sdk/models/operations/v2getinstancehistoryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getInstanceStageHistory - -Get a workflow instance stage history - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.getInstanceStageHistory({ - instanceID: "xxx", - number: 0, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2GetInstanceStageHistory } from "@formance/formance-sdk/funcs/orchestrationV2GetInstanceStageHistory.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2GetInstanceStageHistory(sdk, { - instanceID: "xxx", - number: 0, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2GetInstanceStageHistoryRequest](../../sdk/models/operations/v2getinstancestagehistoryrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2GetInstanceStageHistoryResponse](../../sdk/models/operations/v2getinstancestagehistoryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getServerInfo - -Get server info - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.getServerInfo(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2GetServerInfo } from "@formance/formance-sdk/funcs/orchestrationV2GetServerInfo.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2GetServerInfo(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2GetServerInfoResponse](../../sdk/models/operations/v2getserverinforesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getWorkflow - -Get a flow by id - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.getWorkflow({ - flowId: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2GetWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2GetWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2GetWorkflow(sdk, { - flowId: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2GetWorkflowRequest](../../sdk/models/operations/v2getworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2GetWorkflowResponse](../../sdk/models/operations/v2getworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listInstances - -List instances of a workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.listInstances({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - running: true, - workflowID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2ListInstances } from "@formance/formance-sdk/funcs/orchestrationV2ListInstances.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2ListInstances(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - running: true, - workflowID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2ListInstancesRequest](../../sdk/models/operations/v2listinstancesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2ListInstancesResponse](../../sdk/models/operations/v2listinstancesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listTriggers - -List triggers - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.listTriggers({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2ListTriggers } from "@formance/formance-sdk/funcs/orchestrationV2ListTriggers.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2ListTriggers(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2ListTriggersRequest](../../sdk/models/operations/v2listtriggersrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2ListTriggersResponse](../../sdk/models/operations/v2listtriggersresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listTriggersOccurrences - -List triggers occurrences - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.listTriggersOccurrences({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2ListTriggersOccurrences } from "@formance/formance-sdk/funcs/orchestrationV2ListTriggersOccurrences.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2ListTriggersOccurrences(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2ListTriggersOccurrencesRequest](../../sdk/models/operations/v2listtriggersoccurrencesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2ListTriggersOccurrencesResponse](../../sdk/models/operations/v2listtriggersoccurrencesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listWorkflows - -List registered workflows - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.listWorkflows({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2ListWorkflows } from "@formance/formance-sdk/funcs/orchestrationV2ListWorkflows.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2ListWorkflows(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2ListWorkflowsRequest](../../sdk/models/operations/v2listworkflowsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2ListWorkflowsResponse](../../sdk/models/operations/v2listworkflowsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## readTrigger - -Read trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.readTrigger({ - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2ReadTrigger } from "@formance/formance-sdk/funcs/orchestrationV2ReadTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2ReadTrigger(sdk, { - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2ReadTriggerRequest](../../sdk/models/operations/v2readtriggerrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2ReadTriggerResponse](../../sdk/models/operations/v2readtriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## runWorkflow - -Run workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.runWorkflow({ - workflowID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2RunWorkflow } from "@formance/formance-sdk/funcs/orchestrationV2RunWorkflow.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2RunWorkflow(sdk, { - workflowID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2RunWorkflowRequest](../../sdk/models/operations/v2runworkflowrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2RunWorkflowResponse](../../sdk/models/operations/v2runworkflowresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## sendEvent - -Send an event to a running workflow - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.sendEvent({ - instanceID: "xxx", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2SendEvent } from "@formance/formance-sdk/funcs/orchestrationV2SendEvent.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2SendEvent(sdk, { - instanceID: "xxx", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.V2SendEventRequest](../../sdk/models/operations/v2sendeventrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.V2SendEventResponse](../../sdk/models/operations/v2sendeventresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## testTrigger - -Test trigger - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.orchestration.v2.testTrigger({ - triggerID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { orchestrationV2TestTrigger } from "@formance/formance-sdk/funcs/orchestrationV2TestTrigger.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await orchestrationV2TestTrigger(sdk, { - triggerID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.TestTriggerRequest](../../sdk/models/operations/testtriggerrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.TestTriggerResponse](../../sdk/models/operations/testtriggerresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.V2Error | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdkwalletsv1/README.md b/docs/sdks/sdkwalletsv1/README.md deleted file mode 100644 index 8c6ba456..00000000 --- a/docs/sdks/sdkwalletsv1/README.md +++ /dev/null @@ -1,1425 +0,0 @@ -# SDKWalletsV1 -(*wallets.v1*) - -## Overview - -### Available Operations - -* [confirmHold](#confirmhold) - Confirm a hold -* [createBalance](#createbalance) - Create a balance -* [createWallet](#createwallet) - Create a new wallet -* [creditWallet](#creditwallet) - Credit a wallet -* [debitWallet](#debitwallet) - Debit a wallet -* [getBalance](#getbalance) - Get detailed balance -* [getHold](#gethold) - Get a hold -* [getHolds](#getholds) - Get all holds for a wallet -* [getTransactions](#gettransactions) -* [getWallet](#getwallet) - Get a wallet -* [getWalletSummary](#getwalletsummary) - Get wallet summary -* [listBalances](#listbalances) - List balances of a wallet -* [listWallets](#listwallets) - List all wallets -* [updateWallet](#updatewallet) - Update a wallet -* [voidHold](#voidhold) - Cancel a hold -* [walletsgetServerInfo](#walletsgetserverinfo) - Get server info - -## confirmHold - -Confirm a hold - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.confirmHold({ - confirmHoldRequest: { - amount: BigInt("100"), - final: true, - }, - holdId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1ConfirmHold } from "@formance/formance-sdk/funcs/walletsV1ConfirmHold.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1ConfirmHold(sdk, { - confirmHoldRequest: { - amount: BigInt("100"), - final: true, - }, - holdId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ConfirmHoldRequest](../../sdk/models/operations/confirmholdrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ConfirmHoldResponse](../../sdk/models/operations/confirmholdresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createBalance - -Create a balance - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.createBalance({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1CreateBalance } from "@formance/formance-sdk/funcs/walletsV1CreateBalance.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1CreateBalance(sdk, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateBalanceRequest](../../sdk/models/operations/createbalancerequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateBalanceResponse](../../sdk/models/operations/createbalanceresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## createWallet - -Create a new wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.createWallet({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1CreateWallet } from "@formance/formance-sdk/funcs/walletsV1CreateWallet.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1CreateWallet(sdk, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateWalletRequest](../../sdk/models/operations/createwalletrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreateWalletResponse](../../sdk/models/operations/createwalletresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## creditWallet - -Credit a wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.creditWallet({ - creditWalletRequest: { - amount: { - amount: BigInt("100"), - asset: "USD/2", - }, - metadata: { - "key": "", - }, - sources: [ - { - identifier: "", - type: "", - }, - ], - }, - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1CreditWallet } from "@formance/formance-sdk/funcs/walletsV1CreditWallet.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1CreditWallet(sdk, { - creditWalletRequest: { - amount: { - amount: BigInt("100"), - asset: "USD/2", - }, - metadata: { - "key": "", - }, - sources: [ - { - identifier: "", - type: "", - }, - ], - }, - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreditWalletRequest](../../sdk/models/operations/creditwalletrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.CreditWalletResponse](../../sdk/models/operations/creditwalletresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## debitWallet - -Debit a wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.debitWallet({ - debitWalletRequest: { - amount: { - amount: BigInt("100"), - asset: "USD/2", - }, - metadata: { - "key": "", - }, - pending: true, - }, - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1DebitWallet } from "@formance/formance-sdk/funcs/walletsV1DebitWallet.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1DebitWallet(sdk, { - debitWalletRequest: { - amount: { - amount: BigInt("100"), - asset: "USD/2", - }, - metadata: { - "key": "", - }, - pending: true, - }, - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DebitWalletRequest](../../sdk/models/operations/debitwalletrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DebitWalletResponse](../../sdk/models/operations/debitwalletresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getBalance - -Get detailed balance - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.getBalance({ - balanceName: "", - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1GetBalance } from "@formance/formance-sdk/funcs/walletsV1GetBalance.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1GetBalance(sdk, { - balanceName: "", - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetBalanceRequest](../../sdk/models/operations/getbalancerequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetBalanceResponse](../../sdk/models/operations/getbalanceresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getHold - -Get a hold - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.getHold({ - holdID: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1GetHold } from "@formance/formance-sdk/funcs/walletsV1GetHold.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1GetHold(sdk, { - holdID: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetHoldRequest](../../sdk/models/operations/getholdrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetHoldResponse](../../sdk/models/operations/getholdresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getHolds - -Get all holds for a wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.getHolds({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - metadata: { - "admin": "true", - }, - pageSize: 100, - walletID: "wallet1", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1GetHolds } from "@formance/formance-sdk/funcs/walletsV1GetHolds.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1GetHolds(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - metadata: { - "admin": "true", - }, - pageSize: 100, - walletID: "wallet1", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetHoldsRequest](../../sdk/models/operations/getholdsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetHoldsResponse](../../sdk/models/operations/getholdsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getTransactions - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.getTransactions({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - walletID: "wallet1", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1GetTransactions } from "@formance/formance-sdk/funcs/walletsV1GetTransactions.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1GetTransactions(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - pageSize: 100, - walletID: "wallet1", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTransactionsRequest](../../sdk/models/operations/gettransactionsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetTransactionsResponse](../../sdk/models/operations/gettransactionsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getWallet - -Get a wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.getWallet({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1GetWallet } from "@formance/formance-sdk/funcs/walletsV1GetWallet.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1GetWallet(sdk, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetWalletRequest](../../sdk/models/operations/getwalletrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetWalletResponse](../../sdk/models/operations/getwalletresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getWalletSummary - -Get wallet summary - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.getWalletSummary({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1GetWalletSummary } from "@formance/formance-sdk/funcs/walletsV1GetWalletSummary.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1GetWalletSummary(sdk, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetWalletSummaryRequest](../../sdk/models/operations/getwalletsummaryrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetWalletSummaryResponse](../../sdk/models/operations/getwalletsummaryresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listBalances - -List balances of a wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.listBalances({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1ListBalances } from "@formance/formance-sdk/funcs/walletsV1ListBalances.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1ListBalances(sdk, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListBalancesRequest](../../sdk/models/operations/listbalancesrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListBalancesResponse](../../sdk/models/operations/listbalancesresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## listWallets - -List all wallets - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.listWallets({ - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - expand: "balances", - metadata: { - "admin": "true", - }, - name: "wallet1", - pageSize: 100, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1ListWallets } from "@formance/formance-sdk/funcs/walletsV1ListWallets.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1ListWallets(sdk, { - cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", - expand: "balances", - metadata: { - "admin": "true", - }, - name: "wallet1", - pageSize: 100, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListWalletsRequest](../../sdk/models/operations/listwalletsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ListWalletsResponse](../../sdk/models/operations/listwalletsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## updateWallet - -Update a wallet - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.updateWallet({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1UpdateWallet } from "@formance/formance-sdk/funcs/walletsV1UpdateWallet.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1UpdateWallet(sdk, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateWalletRequest](../../sdk/models/operations/updatewalletrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.UpdateWalletResponse](../../sdk/models/operations/updatewalletresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## voidHold - -Cancel a hold - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.voidHold({ - holdId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1VoidHold } from "@formance/formance-sdk/funcs/walletsV1VoidHold.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1VoidHold(sdk, { - holdId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.VoidHoldRequest](../../sdk/models/operations/voidholdrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.VoidHoldResponse](../../sdk/models/operations/voidholdresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## walletsgetServerInfo - -Get server info - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.wallets.v1.walletsgetServerInfo(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { walletsV1WalletsgetServerInfo } from "@formance/formance-sdk/funcs/walletsV1WalletsgetServerInfo.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await walletsV1WalletsgetServerInfo(sdk); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.WalletsgetServerInfoResponse](../../sdk/models/operations/walletsgetserverinforesponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| errors.WalletsErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sdkwebhooksv1/README.md b/docs/sdks/sdkwebhooksv1/README.md deleted file mode 100644 index e4fc2848..00000000 --- a/docs/sdks/sdkwebhooksv1/README.md +++ /dev/null @@ -1,626 +0,0 @@ -# SDKWebhooksV1 -(*webhooks.v1*) - -## Overview - -### Available Operations - -* [activateConfig](#activateconfig) - Activate one config -* [changeConfigSecret](#changeconfigsecret) - Change the signing secret of a config -* [deactivateConfig](#deactivateconfig) - Deactivate one config -* [deleteConfig](#deleteconfig) - Delete one config -* [getManyConfigs](#getmanyconfigs) - Get many configs -* [insertConfig](#insertconfig) - Insert a new config -* [testConfig](#testconfig) - Test one config - -## activateConfig - -Activate a webhooks config by ID, to start receiving webhooks to its endpoint. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.activateConfig({ - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1ActivateConfig } from "@formance/formance-sdk/funcs/webhooksV1ActivateConfig.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1ActivateConfig(sdk, { - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ActivateConfigRequest](../../sdk/models/operations/activateconfigrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ActivateConfigResponse](../../sdk/models/operations/activateconfigresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## changeConfigSecret - -Change the signing secret of the endpoint of a webhooks config. - -If not passed or empty, a secret is automatically generated. -The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) - - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.changeConfigSecret({ - configChangeSecret: { - secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - }, - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1ChangeConfigSecret } from "@formance/formance-sdk/funcs/webhooksV1ChangeConfigSecret.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1ChangeConfigSecret(sdk, { - configChangeSecret: { - secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - }, - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ChangeConfigSecretRequest](../../sdk/models/operations/changeconfigsecretrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.ChangeConfigSecretResponse](../../sdk/models/operations/changeconfigsecretresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deactivateConfig - -Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.deactivateConfig({ - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1DeactivateConfig } from "@formance/formance-sdk/funcs/webhooksV1DeactivateConfig.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1DeactivateConfig(sdk, { - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeactivateConfigRequest](../../sdk/models/operations/deactivateconfigrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeactivateConfigResponse](../../sdk/models/operations/deactivateconfigresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## deleteConfig - -Delete a webhooks config by ID. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.deleteConfig({ - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1DeleteConfig } from "@formance/formance-sdk/funcs/webhooksV1DeleteConfig.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1DeleteConfig(sdk, { - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteConfigRequest](../../sdk/models/operations/deleteconfigrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.DeleteConfigResponse](../../sdk/models/operations/deleteconfigresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## getManyConfigs - -Sorted by updated date descending - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.getManyConfigs({ - endpoint: "https://example.com", - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1GetManyConfigs } from "@formance/formance-sdk/funcs/webhooksV1GetManyConfigs.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1GetManyConfigs(sdk, { - endpoint: "https://example.com", - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetManyConfigsRequest](../../sdk/models/operations/getmanyconfigsrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.GetManyConfigsResponse](../../sdk/models/operations/getmanyconfigsresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## insertConfig - -Insert a new webhooks config. - -The endpoint should be a valid https URL and be unique. - -The secret is the endpoint's verification secret. -If not passed or empty, a secret is automatically generated. -The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) - -All eventTypes are converted to lower-case when inserted. - - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.insertConfig({ - endpoint: "https://example.com", - eventTypes: [ - "TYPE1", - ], - name: "customer_payment", - secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1InsertConfig } from "@formance/formance-sdk/funcs/webhooksV1InsertConfig.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1InsertConfig(sdk, { - endpoint: "https://example.com", - eventTypes: [ - "TYPE1", - ], - name: "customer_payment", - secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.ConfigUser](../../sdk/models/shared/configuser.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.InsertConfigResponse](../../sdk/models/operations/insertconfigresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## testConfig - -Test a config by sending a webhook to its endpoint. - -### Example Usage - -```typescript -import { SDK } from "@formance/formance-sdk"; - -const sdk = new SDK({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const result = await sdk.webhooks.v1.testConfig({ - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { SDKCore } from "@formance/formance-sdk/core.js"; -import { webhooksV1TestConfig } from "@formance/formance-sdk/funcs/webhooksV1TestConfig.js"; - -// Use `SDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const sdk = new SDKCore({ - security: { - clientID: "", - clientSecret: "", - }, -}); - -async function run() { - const res = await webhooksV1TestConfig(sdk, { - id: "4997257d-dfb6-445b-929c-cbe2ab182818", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.TestConfigRequest](../../sdk/models/operations/testconfigrequest.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. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[operations.TestConfigResponse](../../sdk/models/operations/testconfigresponse.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.WebhooksErrorResponse | default | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 546f4e93..62b84d29 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -1,2 +1,190 @@ # Search -(*search*) \ No newline at end of file +(*search*) + +## Overview + +### Available Operations + +* [search](#search) - Search +* [searchgetServerInfo](#searchgetserverinfo) - Get server info + +## search + +ElasticSearch query engine + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.search.search({ + after: [ + "users:002", + ], + cursor: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", + ledgers: [ + "quickstart", + ], + policy: "OR", + sort: "id:asc", + terms: [ + "destination=central_bank1", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { searchSearch } from "@formance/formance-sdk/funcs/searchSearch.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await searchSearch(sdk, { + after: [ + "users:002", + ], + cursor: "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=", + ledgers: [ + "quickstart", + ], + policy: "OR", + sort: "id:asc", + terms: [ + "destination=central_bank1", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.Query](../../sdk/models/shared/query.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.SearchResponse](../../sdk/models/operations/searchresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## searchgetServerInfo + +Get server info + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.search.searchgetServerInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { searchSearchgetServerInfo } from "@formance/formance-sdk/funcs/searchSearchgetServerInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await searchSearchgetServerInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.SearchgetServerInfoResponse](../../sdk/models/operations/searchgetserverinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/v1/README.md b/docs/sdks/v1/README.md index ecc3fd83..4dcb2806 100644 --- a/docs/sdks/v1/README.md +++ b/docs/sdks/v1/README.md @@ -1,25 +1,786 @@ # V1 -(*auth.v1*) +(*ledger.v1*) ## Overview ### Available Operations -* [createClient](#createclient) - Create client -* [createSecret](#createsecret) - Add a secret to a client -* [deleteClient](#deleteclient) - Delete client -* [deleteSecret](#deletesecret) - Delete a secret from a client -* [getOIDCWellKnowns](#getoidcwellknowns) - Retrieve OpenID connect well-knowns. -* [getServerInfo](#getserverinfo) - Get server info -* [listClients](#listclients) - List clients -* [listUsers](#listusers) - List users -* [readClient](#readclient) - Read client -* [readUser](#readuser) - Read user -* [updateClient](#updateclient) - Update client +* [createTransactions](#createtransactions) - Create a new batch of transactions to a ledger +* [addMetadataOnTransaction](#addmetadataontransaction) - Set the metadata of a transaction by its ID +* [addMetadataToAccount](#addmetadatatoaccount) - Add metadata to an account +* [countAccounts](#countaccounts) - Count the accounts from a ledger +* [countTransactions](#counttransactions) - Count the transactions from a ledger +* [createTransaction](#createtransaction) - Create a new transaction to a ledger +* [getAccount](#getaccount) - Get account by its address +* [getBalances](#getbalances) - Get the balances from a ledger's account +* [getBalancesAggregated](#getbalancesaggregated) - Get the aggregated balances from selected accounts +* [getInfo](#getinfo) - Show server information +* [getLedgerInfo](#getledgerinfo) - Get information about a ledger +* [getMapping](#getmapping) - Get the mapping of a ledger +* [getTransaction](#gettransaction) - Get transaction from a ledger by its ID +* [listAccounts](#listaccounts) - List accounts from a ledger +* [listLogs](#listlogs) - List the logs from a ledger +* [listTransactions](#listtransactions) - List transactions from a ledger +* [readStats](#readstats) - Get statistics from a ledger +* [revertTransaction](#reverttransaction) - Revert a ledger transaction by its ID +* [~~runScript~~](#runscript) - Execute a Numscript :warning: **Deprecated** +* [updateMapping](#updatemapping) - Update the mapping of a ledger + +## createTransactions + +Create a new batch of transactions to a ledger -## createClient +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.createTransactions({ + transactions: { + transactions: [ + { + postings: [ + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + ], + reference: "ref:001", + }, + ], + }, + ledger: "ledger001", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1CreateTransactions } from "@formance/formance-sdk/funcs/ledgerV1CreateTransactions.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1CreateTransactions(sdk, { + transactions: { + transactions: [ + { + postings: [ + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + ], + reference: "ref:001", + }, + ], + }, + ledger: "ledger001", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateTransactionsRequest](../../sdk/models/operations/createtransactionsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateTransactionsResponse](../../sdk/models/operations/createtransactionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addMetadataOnTransaction + +Set the metadata of a transaction by its ID + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.addMetadataOnTransaction({ + ledger: "ledger001", + txid: BigInt("1234"), + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1AddMetadataOnTransaction } from "@formance/formance-sdk/funcs/ledgerV1AddMetadataOnTransaction.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1AddMetadataOnTransaction(sdk, { + ledger: "ledger001", + txid: BigInt("1234"), + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddMetadataOnTransactionRequest](../../sdk/models/operations/addmetadataontransactionrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.AddMetadataOnTransactionResponse](../../sdk/models/operations/addmetadataontransactionresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## addMetadataToAccount + +Add metadata to an account + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.addMetadataToAccount({ + requestBody: { + "key": "", + }, + address: "users:001", + ledger: "ledger001", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1AddMetadataToAccount } from "@formance/formance-sdk/funcs/ledgerV1AddMetadataToAccount.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1AddMetadataToAccount(sdk, { + requestBody: { + "key": "", + }, + address: "users:001", + ledger: "ledger001", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.AddMetadataToAccountRequest](../../sdk/models/operations/addmetadatatoaccountrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.AddMetadataToAccountResponse](../../sdk/models/operations/addmetadatatoaccountresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## countAccounts + +Count the accounts from a ledger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.countAccounts({ + address: "users:.+", + ledger: "ledger001", + metadata: { + "0": "m", + "1": "e", + "2": "t", + "3": "a", + "4": "d", + "5": "a", + "6": "t", + "7": "a", + "8": "[", + "9": "k", + "10": "e", + "11": "y", + "12": "]", + "13": "=", + "14": "v", + "15": "a", + "16": "l", + "17": "u", + "18": "e", + "19": "1", + "20": "&", + "21": "m", + "22": "e", + "23": "t", + "24": "a", + "25": "d", + "26": "a", + "27": "t", + "28": "a", + "29": "[", + "30": "a", + "31": ".", + "32": "n", + "33": "e", + "34": "s", + "35": "t", + "36": "e", + "37": "d", + "38": ".", + "39": "k", + "40": "e", + "41": "y", + "42": "]", + "43": "=", + "44": "v", + "45": "a", + "46": "l", + "47": "u", + "48": "e", + "49": "2", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1CountAccounts } from "@formance/formance-sdk/funcs/ledgerV1CountAccounts.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1CountAccounts(sdk, { + address: "users:.+", + ledger: "ledger001", + metadata: { + "0": "m", + "1": "e", + "2": "t", + "3": "a", + "4": "d", + "5": "a", + "6": "t", + "7": "a", + "8": "[", + "9": "k", + "10": "e", + "11": "y", + "12": "]", + "13": "=", + "14": "v", + "15": "a", + "16": "l", + "17": "u", + "18": "e", + "19": "1", + "20": "&", + "21": "m", + "22": "e", + "23": "t", + "24": "a", + "25": "d", + "26": "a", + "27": "t", + "28": "a", + "29": "[", + "30": "a", + "31": ".", + "32": "n", + "33": "e", + "34": "s", + "35": "t", + "36": "e", + "37": "d", + "38": ".", + "39": "k", + "40": "e", + "41": "y", + "42": "]", + "43": "=", + "44": "v", + "45": "a", + "46": "l", + "47": "u", + "48": "e", + "49": "2", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CountAccountsRequest](../../sdk/models/operations/countaccountsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CountAccountsResponse](../../sdk/models/operations/countaccountsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## countTransactions + +Count the transactions from a ledger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.countTransactions({ + account: "users:001", + destination: "users:001", + ledger: "ledger001", + metadata: {}, + reference: "ref:001", + source: "users:001", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1CountTransactions } from "@formance/formance-sdk/funcs/ledgerV1CountTransactions.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1CountTransactions(sdk, { + account: "users:001", + destination: "users:001", + ledger: "ledger001", + metadata: {}, + reference: "ref:001", + source: "users:001", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CountTransactionsRequest](../../sdk/models/operations/counttransactionsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CountTransactionsResponse](../../sdk/models/operations/counttransactionsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## createTransaction + +Create a new transaction to a ledger + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.createTransaction({ + postTransaction: { + postings: [ + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + ], + reference: "ref:001", + script: { + plain: "vars {\n" + + "account $user\n" + + "}\n" + + "send [COIN 10] (\n" + + " source = @world\n" + + " destination = $user\n" + + ")\n" + + "", + vars: { + "user": "users:042", + }, + }, + }, + ledger: "ledger001", + preview: true, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1CreateTransaction } from "@formance/formance-sdk/funcs/ledgerV1CreateTransaction.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1CreateTransaction(sdk, { + postTransaction: { + postings: [ + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, + ], + reference: "ref:001", + script: { + plain: "vars {\n" + + "account $user\n" + + "}\n" + + "send [COIN 10] (\n" + + " source = @world\n" + + " destination = $user\n" + + ")\n" + + "", + vars: { + "user": "users:042", + }, + }, + }, + ledger: "ledger001", + preview: true, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateTransactionRequest](../../sdk/models/operations/createtransactionrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateTransactionResponse](../../sdk/models/operations/createtransactionresponse.md)\>** + +### Errors -Create client +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getAccount + +Get account by its address ### Example Usage @@ -34,7 +795,10 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.createClient(); + const result = await sdk.ledger.v1.getAccount({ + address: "users:001", + ledger: "ledger001", + }); // Handle the result console.log(result); @@ -49,7 +813,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1CreateClient } from "@formance/formance-sdk/funcs/authV1CreateClient.js"; +import { ledgerV1GetAccount } from "@formance/formance-sdk/funcs/ledgerV1GetAccount.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -61,7 +825,10 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1CreateClient(sdk); + const res = await ledgerV1GetAccount(sdk, { + address: "users:001", + ledger: "ledger001", + }); if (!res.ok) { throw res.error; @@ -80,24 +847,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [shared.CreateClientRequest](../../sdk/models/shared/createclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetAccountRequest](../../sdk/models/operations/getaccountrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.CreateClientResponse](../../sdk/models/operations/createclientresponse.md)\>** +**Promise\<[operations.GetAccountResponse](../../sdk/models/operations/getaccountresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## createSecret +## getBalances -Add a secret to a client +Get the balances from a ledger's account ### Example Usage @@ -112,8 +880,12 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.createSecret({ - clientId: "", + const result = await sdk.ledger.v1.getBalances({ + address: "users:001", + after: "users:003", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + pageSize: 15, }); // Handle the result @@ -129,7 +901,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1CreateSecret } from "@formance/formance-sdk/funcs/authV1CreateSecret.js"; +import { ledgerV1GetBalances } from "@formance/formance-sdk/funcs/ledgerV1GetBalances.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -141,8 +913,12 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1CreateSecret(sdk, { - clientId: "", + const res = await ledgerV1GetBalances(sdk, { + address: "users:001", + after: "users:003", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + pageSize: 15, }); if (!res.ok) { @@ -162,24 +938,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateSecretRequest](../../sdk/models/operations/createsecretrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetBalancesRequest](../../sdk/models/operations/getbalancesrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.CreateSecretResponse](../../sdk/models/operations/createsecretresponse.md)\>** +**Promise\<[operations.GetBalancesResponse](../../sdk/models/operations/getbalancesresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## deleteClient +## getBalancesAggregated -Delete client +Get the aggregated balances from selected accounts ### Example Usage @@ -194,8 +971,9 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.deleteClient({ - clientId: "", + const result = await sdk.ledger.v1.getBalancesAggregated({ + address: "users:001", + ledger: "ledger001", }); // Handle the result @@ -211,7 +989,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1DeleteClient } from "@formance/formance-sdk/funcs/authV1DeleteClient.js"; +import { ledgerV1GetBalancesAggregated } from "@formance/formance-sdk/funcs/ledgerV1GetBalancesAggregated.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -223,8 +1001,9 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1DeleteClient(sdk, { - clientId: "", + const res = await ledgerV1GetBalancesAggregated(sdk, { + address: "users:001", + ledger: "ledger001", }); if (!res.ok) { @@ -244,24 +1023,103 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteClientRequest](../../sdk/models/operations/deleteclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetBalancesAggregatedRequest](../../sdk/models/operations/getbalancesaggregatedrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.DeleteClientResponse](../../sdk/models/operations/deleteclientresponse.md)\>** +**Promise\<[operations.GetBalancesAggregatedResponse](../../sdk/models/operations/getbalancesaggregatedresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getInfo + +Show server information + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.getInfo(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1GetInfo } from "@formance/formance-sdk/funcs/ledgerV1GetInfo.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1GetInfo(sdk); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; -## deleteSecret + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response -Delete a secret from a client +**Promise\<[operations.GetInfoResponse](../../sdk/models/operations/getinforesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getLedgerInfo + +Get information about a ledger ### Example Usage @@ -276,9 +1134,8 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.deleteSecret({ - clientId: "", - secretId: "", + const result = await sdk.ledger.v1.getLedgerInfo({ + ledger: "ledger001", }); // Handle the result @@ -294,7 +1151,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1DeleteSecret } from "@formance/formance-sdk/funcs/authV1DeleteSecret.js"; +import { ledgerV1GetLedgerInfo } from "@formance/formance-sdk/funcs/ledgerV1GetLedgerInfo.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -306,9 +1163,8 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1DeleteSecret(sdk, { - clientId: "", - secretId: "", + const res = await ledgerV1GetLedgerInfo(sdk, { + ledger: "ledger001", }); if (!res.ok) { @@ -328,24 +1184,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteSecretRequest](../../sdk/models/operations/deletesecretrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetLedgerInfoRequest](../../sdk/models/operations/getledgerinforequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.DeleteSecretResponse](../../sdk/models/operations/deletesecretresponse.md)\>** +**Promise\<[operations.GetLedgerInfoResponse](../../sdk/models/operations/getledgerinforesponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getOIDCWellKnowns +## getMapping -Retrieve OpenID connect well-knowns. +Get the mapping of a ledger ### Example Usage @@ -360,7 +1217,9 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.getOIDCWellKnowns(); + const result = await sdk.ledger.v1.getMapping({ + ledger: "ledger001", + }); // Handle the result console.log(result); @@ -375,7 +1234,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1GetOIDCWellKnowns } from "@formance/formance-sdk/funcs/authV1GetOIDCWellKnowns.js"; +import { ledgerV1GetMapping } from "@formance/formance-sdk/funcs/ledgerV1GetMapping.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -387,7 +1246,9 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1GetOIDCWellKnowns(sdk); + const res = await ledgerV1GetMapping(sdk, { + ledger: "ledger001", + }); if (!res.ok) { throw res.error; @@ -406,23 +1267,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMappingRequest](../../sdk/models/operations/getmappingrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetOIDCWellKnownsResponse](../../sdk/models/operations/getoidcwellknownsresponse.md)\>** +**Promise\<[operations.GetMappingResponse](../../sdk/models/operations/getmappingresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## getServerInfo +## getTransaction -Get server info +Get transaction from a ledger by its ID ### Example Usage @@ -437,7 +1300,10 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.getServerInfo(); + const result = await sdk.ledger.v1.getTransaction({ + ledger: "ledger001", + txid: BigInt("1234"), + }); // Handle the result console.log(result); @@ -452,7 +1318,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1GetServerInfo } from "@formance/formance-sdk/funcs/authV1GetServerInfo.js"; +import { ledgerV1GetTransaction } from "@formance/formance-sdk/funcs/ledgerV1GetTransaction.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -464,7 +1330,10 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1GetServerInfo(sdk); + const res = await ledgerV1GetTransaction(sdk, { + ledger: "ledger001", + txid: BigInt("1234"), + }); if (!res.ok) { throw res.error; @@ -483,23 +1352,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTransactionRequest](../../sdk/models/operations/gettransactionrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.GetServerInfoResponse](../../sdk/models/operations/getserverinforesponse.md)\>** +**Promise\<[operations.GetTransactionResponse](../../sdk/models/operations/gettransactionresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## listClients +## listAccounts -List clients +List accounts from a ledger, sorted by address in descending order. ### Example Usage @@ -514,7 +1385,67 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.listClients(); + const result = await sdk.ledger.v1.listAccounts({ + address: "users:.+", + after: "users:003", + balance: 2400, + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + metadata: { + "0": "m", + "1": "e", + "2": "t", + "3": "a", + "4": "d", + "5": "a", + "6": "t", + "7": "a", + "8": "[", + "9": "k", + "10": "e", + "11": "y", + "12": "]", + "13": "=", + "14": "v", + "15": "a", + "16": "l", + "17": "u", + "18": "e", + "19": "1", + "20": "&", + "21": "m", + "22": "e", + "23": "t", + "24": "a", + "25": "d", + "26": "a", + "27": "t", + "28": "a", + "29": "[", + "30": "a", + "31": ".", + "32": "n", + "33": "e", + "34": "s", + "35": "t", + "36": "e", + "37": "d", + "38": ".", + "39": "k", + "40": "e", + "41": "y", + "42": "]", + "43": "=", + "44": "v", + "45": "a", + "46": "l", + "47": "u", + "48": "e", + "49": "2", + }, + pageSize: 100, + paginationToken: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + }); // Handle the result console.log(result); @@ -529,7 +1460,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1ListClients } from "@formance/formance-sdk/funcs/authV1ListClients.js"; +import { ledgerV1ListAccounts } from "@formance/formance-sdk/funcs/ledgerV1ListAccounts.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -541,7 +1472,67 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1ListClients(sdk); + const res = await ledgerV1ListAccounts(sdk, { + address: "users:.+", + after: "users:003", + balance: 2400, + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + metadata: { + "0": "m", + "1": "e", + "2": "t", + "3": "a", + "4": "d", + "5": "a", + "6": "t", + "7": "a", + "8": "[", + "9": "k", + "10": "e", + "11": "y", + "12": "]", + "13": "=", + "14": "v", + "15": "a", + "16": "l", + "17": "u", + "18": "e", + "19": "1", + "20": "&", + "21": "m", + "22": "e", + "23": "t", + "24": "a", + "25": "d", + "26": "a", + "27": "t", + "28": "a", + "29": "[", + "30": "a", + "31": ".", + "32": "n", + "33": "e", + "34": "s", + "35": "t", + "36": "e", + "37": "d", + "38": ".", + "39": "k", + "40": "e", + "41": "y", + "42": "]", + "43": "=", + "44": "v", + "45": "a", + "46": "l", + "47": "u", + "48": "e", + "49": "2", + }, + pageSize: 100, + paginationToken: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + }); if (!res.ok) { throw res.error; @@ -560,23 +1551,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountsRequest](../../sdk/models/operations/listaccountsrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListClientsResponse](../../sdk/models/operations/listclientsresponse.md)\>** +**Promise\<[operations.ListAccountsResponse](../../sdk/models/operations/listaccountsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## listUsers +## listLogs -List users +List the logs from a ledger, sorted by ID in descending order. ### Example Usage @@ -591,7 +1584,12 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.listUsers(); + const result = await sdk.ledger.v1.listLogs({ + after: "1234", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + pageSize: 100, + }); // Handle the result console.log(result); @@ -606,7 +1604,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1ListUsers } from "@formance/formance-sdk/funcs/authV1ListUsers.js"; +import { ledgerV1ListLogs } from "@formance/formance-sdk/funcs/ledgerV1ListLogs.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -618,7 +1616,12 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1ListUsers(sdk); + const res = await ledgerV1ListLogs(sdk, { + after: "1234", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + ledger: "ledger001", + pageSize: 100, + }); if (!res.ok) { throw res.error; @@ -637,23 +1640,25 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListLogsRequest](../../sdk/models/operations/listlogsrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ListUsersResponse](../../sdk/models/operations/listusersresponse.md)\>** +**Promise\<[operations.ListLogsResponse](../../sdk/models/operations/listlogsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## readClient +## listTransactions -Read client +List transactions from a ledger, sorted by txid in descending order. ### Example Usage @@ -668,8 +1673,15 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.readClient({ - clientId: "", + const result = await sdk.ledger.v1.listTransactions({ + account: "users:001", + after: "1234", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + destination: "users:001", + ledger: "ledger001", + pageSize: 100, + reference: "ref:001", + source: "users:001", }); // Handle the result @@ -685,7 +1697,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1ReadClient } from "@formance/formance-sdk/funcs/authV1ReadClient.js"; +import { ledgerV1ListTransactions } from "@formance/formance-sdk/funcs/ledgerV1ListTransactions.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -697,8 +1709,15 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1ReadClient(sdk, { - clientId: "", + const res = await ledgerV1ListTransactions(sdk, { + account: "users:001", + after: "1234", + cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==", + destination: "users:001", + ledger: "ledger001", + pageSize: 100, + reference: "ref:001", + source: "users:001", }); if (!res.ok) { @@ -718,24 +1737,197 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReadClientRequest](../../sdk/models/operations/readclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListTransactionsRequest](../../sdk/models/operations/listtransactionsrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ReadClientResponse](../../sdk/models/operations/readclientresponse.md)\>** +**Promise\<[operations.ListTransactionsResponse](../../sdk/models/operations/listtransactionsresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## readStats + +Get statistics from a ledger. (aggregate metrics on accounts and transactions) + + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.readStats({ + ledger: "ledger001", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1ReadStats } from "@formance/formance-sdk/funcs/ledgerV1ReadStats.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1ReadStats(sdk, { + ledger: "ledger001", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReadStatsRequest](../../sdk/models/operations/readstatsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ReadStatsResponse](../../sdk/models/operations/readstatsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## revertTransaction + +Revert a ledger transaction by its ID + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.ledger.v1.revertTransaction({ + ledger: "ledger001", + txid: BigInt("1234"), + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { ledgerV1RevertTransaction } from "@formance/formance-sdk/funcs/ledgerV1RevertTransaction.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await ledgerV1RevertTransaction(sdk, { + ledger: "ledger001", + txid: BigInt("1234"), + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters -## readUser +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RevertTransactionRequest](../../sdk/models/operations/reverttransactionrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.RevertTransactionResponse](../../sdk/models/operations/reverttransactionresponse.md)\>** -Read user +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~runScript~~ + +This route is deprecated, and has been merged into `POST /{ledger}/transactions`. + + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ### Example Usage @@ -750,8 +1942,23 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.readUser({ - userId: "", + const result = await sdk.ledger.v1.runScript({ + script: { + plain: "vars {\n" + + "account $user\n" + + "}\n" + + "send [COIN 10] (\n" + + " source = @world\n" + + " destination = $user\n" + + ")\n" + + "", + reference: "order_1234", + vars: { + "user": "users:042", + }, + }, + ledger: "ledger001", + preview: true, }); // Handle the result @@ -767,7 +1974,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1ReadUser } from "@formance/formance-sdk/funcs/authV1ReadUser.js"; +import { ledgerV1RunScript } from "@formance/formance-sdk/funcs/ledgerV1RunScript.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -779,8 +1986,23 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1ReadUser(sdk, { - userId: "", + const res = await ledgerV1RunScript(sdk, { + script: { + plain: "vars {\n" + + "account $user\n" + + "}\n" + + "send [COIN 10] (\n" + + " source = @world\n" + + " destination = $user\n" + + ")\n" + + "", + reference: "order_1234", + vars: { + "user": "users:042", + }, + }, + ledger: "ledger001", + preview: true, }); if (!res.ok) { @@ -800,14 +2022,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReadUserRequest](../../sdk/models/operations/readuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.RunScriptRequest](../../sdk/models/operations/runscriptrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.ReadUserResponse](../../sdk/models/operations/readuserresponse.md)\>** +**Promise\<[operations.RunScriptResponse](../../sdk/models/operations/runscriptresponse.md)\>** ### Errors @@ -815,9 +2037,9 @@ run(); | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | -## updateClient +## updateMapping -Update client +Update the mapping of a ledger ### Example Usage @@ -832,8 +2054,20 @@ const sdk = new SDK({ }); async function run() { - const result = await sdk.auth.v1.updateClient({ - clientId: "", + const result = await sdk.ledger.v1.updateMapping({ + mapping: { + contracts: [ + { + account: "users:001", + expr: {}, + }, + { + account: "users:001", + expr: {}, + }, + ], + }, + ledger: "ledger001", }); // Handle the result @@ -849,7 +2083,7 @@ The standalone function version of this method: ```typescript import { SDKCore } from "@formance/formance-sdk/core.js"; -import { authV1UpdateClient } from "@formance/formance-sdk/funcs/authV1UpdateClient.js"; +import { ledgerV1UpdateMapping } from "@formance/formance-sdk/funcs/ledgerV1UpdateMapping.js"; // Use `SDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -861,8 +2095,20 @@ const sdk = new SDKCore({ }); async function run() { - const res = await authV1UpdateClient(sdk, { - clientId: "", + const res = await ledgerV1UpdateMapping(sdk, { + mapping: { + contracts: [ + { + account: "users:001", + expr: {}, + }, + { + account: "users:001", + expr: {}, + }, + ], + }, + ledger: "ledger001", }); if (!res.ok) { @@ -882,17 +2128,18 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateClientRequest](../../sdk/models/operations/updateclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateMappingRequest](../../sdk/models/operations/updatemappingrequest.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. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[operations.UpdateClientResponse](../../sdk/models/operations/updateclientresponse.md)\>** +**Promise\<[operations.UpdateMappingResponse](../../sdk/models/operations/updatemappingresponse.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/v2/README.md b/docs/sdks/v2/README.md index c27513c7..5e68be87 100644 --- a/docs/sdks/v2/README.md +++ b/docs/sdks/v2/README.md @@ -626,6 +626,12 @@ async function run() { destination: "users:002", source: "users:001", }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, ], reference: "ref:001", script: { @@ -683,6 +689,12 @@ async function run() { destination: "users:002", source: "users:001", }, + { + amount: BigInt("100"), + asset: "COIN", + destination: "users:002", + source: "users:001", + }, ], reference: "ref:001", script: { @@ -754,7 +766,7 @@ const sdk = new SDK({ async function run() { const result = await sdk.ledger.v2.deleteAccountMetadata({ - address: "3680 Emile Grove", + address: "96609 Cummings Canyon", key: "foo", ledger: "ledger001", }); @@ -785,7 +797,7 @@ const sdk = new SDKCore({ async function run() { const res = await ledgerV2DeleteAccountMetadata(sdk, { - address: "3680 Emile Grove", + address: "96609 Cummings Canyon", key: "foo", ledger: "ledger001", }); diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md index 4d16ed6e..10a0e518 100644 --- a/docs/sdks/wallets/README.md +++ b/docs/sdks/wallets/README.md @@ -1,2 +1,6 @@ # Wallets -(*wallets*) \ No newline at end of file +(*wallets*) + +## Overview + +### Available Operations diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 6e764362..130d50b3 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -1,2 +1,626 @@ # Webhooks -(*webhooks*) \ No newline at end of file +(*webhooks*) + +## Overview + +### Available Operations + +* [activateConfig](#activateconfig) - Activate one config +* [changeConfigSecret](#changeconfigsecret) - Change the signing secret of a config +* [deactivateConfig](#deactivateconfig) - Deactivate one config +* [deleteConfig](#deleteconfig) - Delete one config +* [getManyConfigs](#getmanyconfigs) - Get many configs +* [insertConfig](#insertconfig) - Insert a new config +* [testConfig](#testconfig) - Test one config + +## activateConfig + +Activate a webhooks config by ID, to start receiving webhooks to its endpoint. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.activateConfig({ + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksActivateConfig } from "@formance/formance-sdk/funcs/webhooksActivateConfig.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksActivateConfig(sdk, { + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ActivateConfigRequest](../../sdk/models/operations/activateconfigrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ActivateConfigResponse](../../sdk/models/operations/activateconfigresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## changeConfigSecret + +Change the signing secret of the endpoint of a webhooks config. + +If not passed or empty, a secret is automatically generated. +The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.changeConfigSecret({ + configChangeSecret: { + secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", + }, + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksChangeConfigSecret } from "@formance/formance-sdk/funcs/webhooksChangeConfigSecret.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksChangeConfigSecret(sdk, { + configChangeSecret: { + secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", + }, + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ChangeConfigSecretRequest](../../sdk/models/operations/changeconfigsecretrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ChangeConfigSecretResponse](../../sdk/models/operations/changeconfigsecretresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivateConfig + +Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.deactivateConfig({ + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksDeactivateConfig } from "@formance/formance-sdk/funcs/webhooksDeactivateConfig.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksDeactivateConfig(sdk, { + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeactivateConfigRequest](../../sdk/models/operations/deactivateconfigrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeactivateConfigResponse](../../sdk/models/operations/deactivateconfigresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deleteConfig + +Delete a webhooks config by ID. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.deleteConfig({ + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksDeleteConfig } from "@formance/formance-sdk/funcs/webhooksDeleteConfig.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksDeleteConfig(sdk, { + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteConfigRequest](../../sdk/models/operations/deleteconfigrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DeleteConfigResponse](../../sdk/models/operations/deleteconfigresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## getManyConfigs + +Sorted by updated date descending + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.getManyConfigs({ + endpoint: "https://example.com", + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksGetManyConfigs } from "@formance/formance-sdk/funcs/webhooksGetManyConfigs.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksGetManyConfigs(sdk, { + endpoint: "https://example.com", + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetManyConfigsRequest](../../sdk/models/operations/getmanyconfigsrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.GetManyConfigsResponse](../../sdk/models/operations/getmanyconfigsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## insertConfig + +Insert a new webhooks config. + +The endpoint should be a valid https URL and be unique. + +The secret is the endpoint's verification secret. +If not passed or empty, a secret is automatically generated. +The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + +All eventTypes are converted to lower-case when inserted. + + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.insertConfig({ + endpoint: "https://example.com", + eventTypes: [ + "TYPE1", + ], + name: "customer_payment", + secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksInsertConfig } from "@formance/formance-sdk/funcs/webhooksInsertConfig.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksInsertConfig(sdk, { + endpoint: "https://example.com", + eventTypes: [ + "TYPE1", + ], + name: "customer_payment", + secret: "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.ConfigUser](../../sdk/models/shared/configuser.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.InsertConfigResponse](../../sdk/models/operations/insertconfigresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## testConfig + +Test a config by sending a webhook to its endpoint. + +### Example Usage + +```typescript +import { SDK } from "@formance/formance-sdk"; + +const sdk = new SDK({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const result = await sdk.webhooks.testConfig({ + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { SDKCore } from "@formance/formance-sdk/core.js"; +import { webhooksTestConfig } from "@formance/formance-sdk/funcs/webhooksTestConfig.js"; + +// Use `SDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const sdk = new SDKCore({ + security: { + clientID: "", + clientSecret: "", + }, +}); + +async function run() { + const res = await webhooksTestConfig(sdk, { + id: "4997257d-dfb6-445b-929c-cbe2ab182818", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.TestConfigRequest](../../sdk/models/operations/testconfigrequest.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. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.TestConfigResponse](../../sdk/models/operations/testconfigresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.WebhooksErrorResponse | default | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index d14898e5..5be2836c 100755 --- a/gen.yaml +++ b/gen.yaml @@ -13,7 +13,7 @@ generation: comments: {} telemetryEnabled: false typescript: - version: 3.3.0 + version: 3.4.0 additionalDependencies: dependencies: {} devDependencies: {} @@ -22,6 +22,8 @@ typescript: author: Formance clientServerStatusCodesAsErrors: false defaultErrorName: SDKError + enableCustomCodeRegions: false + enableReactQuery: false enumFormat: enum flattenGlobalSecurity: true flatteningOrder: body-first diff --git a/jsr.json b/jsr.json index 433b60eb..4b3bdd16 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@formance/formance-sdk", - "version": "3.3.0", + "version": "3.4.0", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index c6ec5a14..53ce36de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@formance/formance-sdk", - "version": "3.3.0", + "version": "3.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@formance/formance-sdk", - "version": "3.3.0", + "version": "3.4.0", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 01786775..683d11a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@formance/formance-sdk", - "version": "3.3.0", + "version": "3.4.0", "author": "Formance", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/authV1CreateClient.ts b/src/funcs/authCreateClient.ts similarity index 94% rename from src/funcs/authV1CreateClient.ts rename to src/funcs/authCreateClient.ts index f16f1731..446eb1d7 100644 --- a/src/funcs/authV1CreateClient.ts +++ b/src/funcs/authCreateClient.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Create client */ -export async function authV1CreateClient( +export async function authCreateClient( client: SDKCore, request?: shared.CreateClientRequest | undefined, options?: RequestOptions, @@ -57,17 +58,17 @@ export async function authV1CreateClient( const path = pathToFunc("/api/auth/clients")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createClient", - oAuth2Scopes: ["auth:read", "auth:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -81,6 +82,7 @@ export async function authV1CreateClient( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1CreateSecret.ts b/src/funcs/authCreateSecret.ts similarity index 94% rename from src/funcs/authV1CreateSecret.ts rename to src/funcs/authCreateSecret.ts index 785f4861..07503943 100644 --- a/src/funcs/authV1CreateSecret.ts +++ b/src/funcs/authCreateSecret.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -24,7 +25,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Add a secret to a client */ -export async function authV1CreateSecret( +export async function authCreateSecret( client: SDKCore, request: operations.CreateSecretRequest, options?: RequestOptions, @@ -62,17 +63,17 @@ export async function authV1CreateSecret( const path = pathToFunc("/api/auth/clients/{clientId}/secrets")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createSecret", - oAuth2Scopes: ["auth:read", "auth:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function authV1CreateSecret( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1DeleteClient.ts b/src/funcs/authDeleteClient.ts similarity index 94% rename from src/funcs/authV1DeleteClient.ts rename to src/funcs/authDeleteClient.ts index 7a5f4151..4c91b9da 100644 --- a/src/funcs/authV1DeleteClient.ts +++ b/src/funcs/authDeleteClient.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -24,7 +25,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Delete client */ -export async function authV1DeleteClient( +export async function authDeleteClient( client: SDKCore, request: operations.DeleteClientRequest, options?: RequestOptions, @@ -60,16 +61,16 @@ export async function authV1DeleteClient( const path = pathToFunc("/api/auth/clients/{clientId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "*/*", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deleteClient", - oAuth2Scopes: ["auth:read", "auth:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function authV1DeleteClient( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1DeleteSecret.ts b/src/funcs/authDeleteSecret.ts similarity index 94% rename from src/funcs/authV1DeleteSecret.ts rename to src/funcs/authDeleteSecret.ts index 035dfe5a..51ebf506 100644 --- a/src/funcs/authV1DeleteSecret.ts +++ b/src/funcs/authDeleteSecret.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -24,7 +25,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Delete a secret from a client */ -export async function authV1DeleteSecret( +export async function authDeleteSecret( client: SDKCore, request: operations.DeleteSecretRequest, options?: RequestOptions, @@ -66,16 +67,16 @@ export async function authV1DeleteSecret( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "*/*", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deleteSecret", - oAuth2Scopes: ["auth:read", "auth:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -89,6 +90,7 @@ export async function authV1DeleteSecret( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1GetServerInfo.ts b/src/funcs/authGetServerInfo.ts similarity index 93% rename from src/funcs/authV1GetServerInfo.ts rename to src/funcs/authGetServerInfo.ts index 09a7563d..5ac6fec3 100644 --- a/src/funcs/authV1GetServerInfo.ts +++ b/src/funcs/authGetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -22,7 +23,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get server info */ -export async function authV1GetServerInfo( +export async function authGetServerInfo( client: SDKCore, options?: RequestOptions, ): Promise< @@ -39,16 +40,16 @@ export async function authV1GetServerInfo( > { const path = pathToFunc("/api/auth/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getServerInfo", - oAuth2Scopes: ["auth:read", "auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -62,6 +63,7 @@ export async function authV1GetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/authV1ListClients.ts b/src/funcs/authListClients.ts similarity index 93% rename from src/funcs/authV1ListClients.ts rename to src/funcs/authListClients.ts index 568384df..225a479e 100644 --- a/src/funcs/authV1ListClients.ts +++ b/src/funcs/authListClients.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -22,7 +23,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List clients */ -export async function authV1ListClients( +export async function authListClients( client: SDKCore, options?: RequestOptions, ): Promise< @@ -39,16 +40,16 @@ export async function authV1ListClients( > { const path = pathToFunc("/api/auth/clients")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listClients", - oAuth2Scopes: ["auth:read", "auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -62,6 +63,7 @@ export async function authV1ListClients( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/authV1ListUsers.ts b/src/funcs/authListUsers.ts similarity index 93% rename from src/funcs/authV1ListUsers.ts rename to src/funcs/authListUsers.ts index 62d4fe4c..87baabb1 100644 --- a/src/funcs/authV1ListUsers.ts +++ b/src/funcs/authListUsers.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List users */ -export async function authV1ListUsers( +export async function authListUsers( client: SDKCore, options?: RequestOptions, ): Promise< @@ -42,16 +43,16 @@ export async function authV1ListUsers( > { const path = pathToFunc("/api/auth/users")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listUsers", - oAuth2Scopes: ["auth:read", "auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -65,6 +66,7 @@ export async function authV1ListUsers( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/authV1ReadClient.ts b/src/funcs/authReadClient.ts similarity index 94% rename from src/funcs/authV1ReadClient.ts rename to src/funcs/authReadClient.ts index 180843ac..9e6c3d90 100644 --- a/src/funcs/authV1ReadClient.ts +++ b/src/funcs/authReadClient.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -24,7 +25,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Read client */ -export async function authV1ReadClient( +export async function authReadClient( client: SDKCore, request: operations.ReadClientRequest, options?: RequestOptions, @@ -60,16 +61,16 @@ export async function authV1ReadClient( const path = pathToFunc("/api/auth/clients/{clientId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "readClient", - oAuth2Scopes: ["auth:read", "auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function authV1ReadClient( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1ReadUser.ts b/src/funcs/authReadUser.ts similarity index 94% rename from src/funcs/authV1ReadUser.ts rename to src/funcs/authReadUser.ts index d6648da7..feb24143 100644 --- a/src/funcs/authV1ReadUser.ts +++ b/src/funcs/authReadUser.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -27,7 +28,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Read user */ -export async function authV1ReadUser( +export async function authReadUser( client: SDKCore, request: operations.ReadUserRequest, options?: RequestOptions, @@ -63,16 +64,16 @@ export async function authV1ReadUser( const path = pathToFunc("/api/auth/users/{userId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "readUser", - oAuth2Scopes: ["auth:read", "auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function authV1ReadUser( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1UpdateClient.ts b/src/funcs/authUpdateClient.ts similarity index 94% rename from src/funcs/authV1UpdateClient.ts rename to src/funcs/authUpdateClient.ts index bbde5179..587e0af6 100644 --- a/src/funcs/authV1UpdateClient.ts +++ b/src/funcs/authUpdateClient.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -24,7 +25,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Update client */ -export async function authV1UpdateClient( +export async function authUpdateClient( client: SDKCore, request: operations.UpdateClientRequest, options?: RequestOptions, @@ -62,17 +63,17 @@ export async function authV1UpdateClient( const path = pathToFunc("/api/auth/clients/{clientId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "updateClient", - oAuth2Scopes: ["auth:read", "auth:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function authV1UpdateClient( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/authV1GetOIDCWellKnowns.ts b/src/funcs/getOIDCWellKnowns.ts similarity index 93% rename from src/funcs/authV1GetOIDCWellKnowns.ts rename to src/funcs/getOIDCWellKnowns.ts index 7c710bd6..52204d04 100644 --- a/src/funcs/authV1GetOIDCWellKnowns.ts +++ b/src/funcs/getOIDCWellKnowns.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -22,7 +23,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Retrieve OpenID connect well-knowns. */ -export async function authV1GetOIDCWellKnowns( +export async function getOIDCWellKnowns( client: SDKCore, options?: RequestOptions, ): Promise< @@ -39,16 +40,16 @@ export async function authV1GetOIDCWellKnowns( > { const path = pathToFunc("/api/auth/.well-known/openid-configuration")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "*/*", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getOIDCWellKnowns", - oAuth2Scopes: ["auth:read", "auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -62,6 +63,7 @@ export async function authV1GetOIDCWellKnowns( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/getVersions.ts b/src/funcs/getVersions.ts index 7e68e701..36e612dc 100644 --- a/src/funcs/getVersions.ts +++ b/src/funcs/getVersions.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -39,16 +40,16 @@ export async function getVersions( > { const path = pathToFunc("/versions")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getVersions", - oAuth2Scopes: ["auth:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -62,6 +63,7 @@ export async function getVersions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/ledgerV1AddMetadataOnTransaction.ts b/src/funcs/ledgerV1AddMetadataOnTransaction.ts index 476a7a86..95cbdf6c 100644 --- a/src/funcs/ledgerV1AddMetadataOnTransaction.ts +++ b/src/funcs/ledgerV1AddMetadataOnTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -69,17 +70,17 @@ export async function ledgerV1AddMetadataOnTransaction( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "addMetadataOnTransaction", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function ledgerV1AddMetadataOnTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1AddMetadataToAccount.ts b/src/funcs/ledgerV1AddMetadataToAccount.ts index 84f76c94..550ceefe 100644 --- a/src/funcs/ledgerV1AddMetadataToAccount.ts +++ b/src/funcs/ledgerV1AddMetadataToAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -69,17 +70,17 @@ export async function ledgerV1AddMetadataToAccount( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "addMetadataToAccount", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function ledgerV1AddMetadataToAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1CountAccounts.ts b/src/funcs/ledgerV1CountAccounts.ts index 8fc11af1..a5b0b82e 100644 --- a/src/funcs/ledgerV1CountAccounts.ts +++ b/src/funcs/ledgerV1CountAccounts.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,16 +77,16 @@ export async function ledgerV1CountAccounts( }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "countAccounts", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -99,6 +100,7 @@ export async function ledgerV1CountAccounts( const requestRes = client._createRequest(context, { security: requestSecurity, method: "HEAD", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1CountTransactions.ts b/src/funcs/ledgerV1CountTransactions.ts index b306d21a..4ae49eeb 100644 --- a/src/funcs/ledgerV1CountTransactions.ts +++ b/src/funcs/ledgerV1CountTransactions.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,16 +82,16 @@ export async function ledgerV1CountTransactions( }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "countTransactions", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -104,6 +105,7 @@ export async function ledgerV1CountTransactions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "HEAD", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1CreateTransaction.ts b/src/funcs/ledgerV1CreateTransaction.ts index d0584a49..cd698ed1 100644 --- a/src/funcs/ledgerV1CreateTransaction.ts +++ b/src/funcs/ledgerV1CreateTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -66,17 +67,17 @@ export async function ledgerV1CreateTransaction( "preview": payload.preview, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createTransaction", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function ledgerV1CreateTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1CreateTransactions.ts b/src/funcs/ledgerV1CreateTransactions.ts index 7e2619f4..98a4c34f 100644 --- a/src/funcs/ledgerV1CreateTransactions.ts +++ b/src/funcs/ledgerV1CreateTransactions.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,17 +65,17 @@ export async function ledgerV1CreateTransactions( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "CreateTransactions", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function ledgerV1CreateTransactions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1GetAccount.ts b/src/funcs/ledgerV1GetAccount.ts index 6ef74552..2fa7c495 100644 --- a/src/funcs/ledgerV1GetAccount.ts +++ b/src/funcs/ledgerV1GetAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -68,16 +69,16 @@ export async function ledgerV1GetAccount( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getAccount", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function ledgerV1GetAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1GetBalances.ts b/src/funcs/ledgerV1GetBalances.ts index 0e67abdc..b144c552 100644 --- a/src/funcs/ledgerV1GetBalances.ts +++ b/src/funcs/ledgerV1GetBalances.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -69,16 +70,16 @@ export async function ledgerV1GetBalances( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getBalances", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -92,6 +93,7 @@ export async function ledgerV1GetBalances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1GetBalancesAggregated.ts b/src/funcs/ledgerV1GetBalancesAggregated.ts index 5fbee180..000da334 100644 --- a/src/funcs/ledgerV1GetBalancesAggregated.ts +++ b/src/funcs/ledgerV1GetBalancesAggregated.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -70,16 +71,16 @@ export async function ledgerV1GetBalancesAggregated( "useInsertionDate": payload.useInsertionDate, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getBalancesAggregated", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function ledgerV1GetBalancesAggregated( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1GetInfo.ts b/src/funcs/ledgerV1GetInfo.ts index b19997ad..6c4868cf 100644 --- a/src/funcs/ledgerV1GetInfo.ts +++ b/src/funcs/ledgerV1GetInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -41,16 +42,16 @@ export async function ledgerV1GetInfo( > { const path = pathToFunc("/api/ledger/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getInfo", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function ledgerV1GetInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/ledgerV1GetLedgerInfo.ts b/src/funcs/ledgerV1GetLedgerInfo.ts index 7d6dd42e..2520ff4b 100644 --- a/src/funcs/ledgerV1GetLedgerInfo.ts +++ b/src/funcs/ledgerV1GetLedgerInfo.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function ledgerV1GetLedgerInfo( const path = pathToFunc("/api/ledger/{ledger}/_info")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getLedgerInfo", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function ledgerV1GetLedgerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1GetMapping.ts b/src/funcs/ledgerV1GetMapping.ts index 2609c38b..4ddeeb25 100644 --- a/src/funcs/ledgerV1GetMapping.ts +++ b/src/funcs/ledgerV1GetMapping.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function ledgerV1GetMapping( const path = pathToFunc("/api/ledger/{ledger}/mapping")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getMapping", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function ledgerV1GetMapping( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1GetTransaction.ts b/src/funcs/ledgerV1GetTransaction.ts index 2676ba88..6d7e84af 100644 --- a/src/funcs/ledgerV1GetTransaction.ts +++ b/src/funcs/ledgerV1GetTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -68,16 +69,16 @@ export async function ledgerV1GetTransaction( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getTransaction", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function ledgerV1GetTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1ListAccounts.ts b/src/funcs/ledgerV1ListAccounts.ts index 6c48fcf6..5bc2154a 100644 --- a/src/funcs/ledgerV1ListAccounts.ts +++ b/src/funcs/ledgerV1ListAccounts.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -84,16 +85,16 @@ export async function ledgerV1ListAccounts( }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listAccounts", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -107,6 +108,7 @@ export async function ledgerV1ListAccounts( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1ListLogs.ts b/src/funcs/ledgerV1ListLogs.ts index 8647a7a5..bcaf7c2d 100644 --- a/src/funcs/ledgerV1ListLogs.ts +++ b/src/funcs/ledgerV1ListLogs.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -73,16 +74,16 @@ export async function ledgerV1ListLogs( "startTime": payload.startTime, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listLogs", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function ledgerV1ListLogs( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1ListTransactions.ts b/src/funcs/ledgerV1ListTransactions.ts index 39afc979..eb1224ad 100644 --- a/src/funcs/ledgerV1ListTransactions.ts +++ b/src/funcs/ledgerV1ListTransactions.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -87,16 +88,16 @@ export async function ledgerV1ListTransactions( }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listTransactions", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -110,6 +111,7 @@ export async function ledgerV1ListTransactions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1ReadStats.ts b/src/funcs/ledgerV1ReadStats.ts index c3f8f0c1..67079ca9 100644 --- a/src/funcs/ledgerV1ReadStats.ts +++ b/src/funcs/ledgerV1ReadStats.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -65,16 +66,16 @@ export async function ledgerV1ReadStats( const path = pathToFunc("/api/ledger/{ledger}/stats")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "readStats", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function ledgerV1ReadStats( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV1RevertTransaction.ts b/src/funcs/ledgerV1RevertTransaction.ts index 0ecfe8c4..de5c47b5 100644 --- a/src/funcs/ledgerV1RevertTransaction.ts +++ b/src/funcs/ledgerV1RevertTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -72,16 +73,16 @@ export async function ledgerV1RevertTransaction( "disableChecks": payload.disableChecks, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "revertTransaction", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function ledgerV1RevertTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1RunScript.ts b/src/funcs/ledgerV1RunScript.ts index 536dcce2..7af8c0ba 100644 --- a/src/funcs/ledgerV1RunScript.ts +++ b/src/funcs/ledgerV1RunScript.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -69,17 +70,17 @@ export async function ledgerV1RunScript( "preview": payload.preview, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "runScript", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function ledgerV1RunScript( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV1UpdateMapping.ts b/src/funcs/ledgerV1UpdateMapping.ts index 990547f3..96d4e3c9 100644 --- a/src/funcs/ledgerV1UpdateMapping.ts +++ b/src/funcs/ledgerV1UpdateMapping.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,17 +63,17 @@ export async function ledgerV1UpdateMapping( const path = pathToFunc("/api/ledger/{ledger}/mapping")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "updateMapping", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function ledgerV1UpdateMapping( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2AddMetadataOnTransaction.ts b/src/funcs/ledgerV2AddMetadataOnTransaction.ts index 7e8e802c..3cb95e3c 100644 --- a/src/funcs/ledgerV2AddMetadataOnTransaction.ts +++ b/src/funcs/ledgerV2AddMetadataOnTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -73,7 +74,7 @@ export async function ledgerV2AddMetadataOnTransaction( "dryRun": payload.dryRun, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -81,14 +82,14 @@ export async function ledgerV2AddMetadataOnTransaction( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2AddMetadataOnTransaction", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -102,6 +103,7 @@ export async function ledgerV2AddMetadataOnTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2AddMetadataToAccount.ts b/src/funcs/ledgerV2AddMetadataToAccount.ts index f0895589..7c366dd7 100644 --- a/src/funcs/ledgerV2AddMetadataToAccount.ts +++ b/src/funcs/ledgerV2AddMetadataToAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -73,7 +74,7 @@ export async function ledgerV2AddMetadataToAccount( "dryRun": payload.dryRun, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -81,14 +82,14 @@ export async function ledgerV2AddMetadataToAccount( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2AddMetadataToAccount", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -102,6 +103,7 @@ export async function ledgerV2AddMetadataToAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2CountAccounts.ts b/src/funcs/ledgerV2CountAccounts.ts index 5513d27b..6dc90b60 100644 --- a/src/funcs/ledgerV2CountAccounts.ts +++ b/src/funcs/ledgerV2CountAccounts.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,16 +77,16 @@ export async function ledgerV2CountAccounts( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CountAccounts", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -99,6 +100,7 @@ export async function ledgerV2CountAccounts( const requestRes = client._createRequest(context, { security: requestSecurity, method: "HEAD", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2CountTransactions.ts b/src/funcs/ledgerV2CountTransactions.ts index 102892b6..a77c1322 100644 --- a/src/funcs/ledgerV2CountTransactions.ts +++ b/src/funcs/ledgerV2CountTransactions.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -77,16 +78,16 @@ export async function ledgerV2CountTransactions( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CountTransactions", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -100,6 +101,7 @@ export async function ledgerV2CountTransactions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "HEAD", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2CreateBulk.ts b/src/funcs/ledgerV2CreateBulk.ts index 30f8d426..f62d367c 100644 --- a/src/funcs/ledgerV2CreateBulk.ts +++ b/src/funcs/ledgerV2CreateBulk.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,17 +63,17 @@ export async function ledgerV2CreateBulk( const path = pathToFunc("/api/ledger/v2/{ledger}/_bulk")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CreateBulk", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function ledgerV2CreateBulk( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, @@ -126,7 +128,10 @@ export async function ledgerV2CreateBulk( | RequestTimeoutError | ConnectionError >( - M.json([200, 400], operations.V2CreateBulkResponse$inboundSchema, { + M.json(200, operations.V2CreateBulkResponse$inboundSchema, { + key: "V2BulkResponse", + }), + M.json(400, operations.V2CreateBulkResponse$inboundSchema, { key: "V2BulkResponse", }), M.jsonErr("default", errors.V2ErrorResponse$inboundSchema), diff --git a/src/funcs/ledgerV2CreateLedger.ts b/src/funcs/ledgerV2CreateLedger.ts index ec73cf28..db929b0e 100644 --- a/src/funcs/ledgerV2CreateLedger.ts +++ b/src/funcs/ledgerV2CreateLedger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,17 +65,17 @@ export async function ledgerV2CreateLedger( const path = pathToFunc("/api/ledger/v2/{ledger}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CreateLedger", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function ledgerV2CreateLedger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2CreateTransaction.ts b/src/funcs/ledgerV2CreateTransaction.ts index 76bde1f8..db1a589c 100644 --- a/src/funcs/ledgerV2CreateTransaction.ts +++ b/src/funcs/ledgerV2CreateTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,7 +68,7 @@ export async function ledgerV2CreateTransaction( "dryRun": payload.dryRun, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -75,14 +76,14 @@ export async function ledgerV2CreateTransaction( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CreateTransaction", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function ledgerV2CreateTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2DeleteAccountMetadata.ts b/src/funcs/ledgerV2DeleteAccountMetadata.ts index c9a947c0..f4b8e9b0 100644 --- a/src/funcs/ledgerV2DeleteAccountMetadata.ts +++ b/src/funcs/ledgerV2DeleteAccountMetadata.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,16 +77,16 @@ export async function ledgerV2DeleteAccountMetadata( "/api/ledger/v2/{ledger}/accounts/{address}/metadata/{key}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2DeleteAccountMetadata", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -99,6 +100,7 @@ export async function ledgerV2DeleteAccountMetadata( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2DeleteLedgerMetadata.ts b/src/funcs/ledgerV2DeleteLedgerMetadata.ts index b0358c92..a4dd1fb8 100644 --- a/src/funcs/ledgerV2DeleteLedgerMetadata.ts +++ b/src/funcs/ledgerV2DeleteLedgerMetadata.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function ledgerV2DeleteLedgerMetadata( const path = pathToFunc("/api/ledger/v2/{ledger}/metadata/{key}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2DeleteLedgerMetadata", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function ledgerV2DeleteLedgerMetadata( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2DeleteTransactionMetadata.ts b/src/funcs/ledgerV2DeleteTransactionMetadata.ts index c1e58711..546526b1 100644 --- a/src/funcs/ledgerV2DeleteTransactionMetadata.ts +++ b/src/funcs/ledgerV2DeleteTransactionMetadata.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -76,16 +77,16 @@ export async function ledgerV2DeleteTransactionMetadata( "/api/ledger/v2/{ledger}/transactions/{id}/metadata/{key}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2DeleteTransactionMetadata", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -99,6 +100,7 @@ export async function ledgerV2DeleteTransactionMetadata( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2ExportLogs.ts b/src/funcs/ledgerV2ExportLogs.ts index 1e6de6df..f57f91a7 100644 --- a/src/funcs/ledgerV2ExportLogs.ts +++ b/src/funcs/ledgerV2ExportLogs.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -60,16 +61,16 @@ export async function ledgerV2ExportLogs( const path = pathToFunc("/api/ledger/v2/{ledger}/logs/export")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "*/*", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ExportLogs", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function ledgerV2ExportLogs( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2GetAccount.ts b/src/funcs/ledgerV2GetAccount.ts index f250517f..2886b372 100644 --- a/src/funcs/ledgerV2GetAccount.ts +++ b/src/funcs/ledgerV2GetAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -73,16 +74,16 @@ export async function ledgerV2GetAccount( "pit": payload.pit, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetAccount", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function ledgerV2GetAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2GetBalancesAggregated.ts b/src/funcs/ledgerV2GetBalancesAggregated.ts index 9a88388b..4c974f6c 100644 --- a/src/funcs/ledgerV2GetBalancesAggregated.ts +++ b/src/funcs/ledgerV2GetBalancesAggregated.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -80,16 +81,16 @@ export async function ledgerV2GetBalancesAggregated( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetBalancesAggregated", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -103,6 +104,7 @@ export async function ledgerV2GetBalancesAggregated( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2GetInfo.ts b/src/funcs/ledgerV2GetInfo.ts index adf88471..514dcb57 100644 --- a/src/funcs/ledgerV2GetInfo.ts +++ b/src/funcs/ledgerV2GetInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -41,16 +42,16 @@ export async function ledgerV2GetInfo( > { const path = pathToFunc("/api/ledger/v2/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetInfo", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function ledgerV2GetInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/ledgerV2GetLedger.ts b/src/funcs/ledgerV2GetLedger.ts index 5f56f5b9..105d331a 100644 --- a/src/funcs/ledgerV2GetLedger.ts +++ b/src/funcs/ledgerV2GetLedger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function ledgerV2GetLedger( const path = pathToFunc("/api/ledger/v2/{ledger}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetLedger", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function ledgerV2GetLedger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2GetLedgerInfo.ts b/src/funcs/ledgerV2GetLedgerInfo.ts index c4f10fb1..0d6195da 100644 --- a/src/funcs/ledgerV2GetLedgerInfo.ts +++ b/src/funcs/ledgerV2GetLedgerInfo.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function ledgerV2GetLedgerInfo( const path = pathToFunc("/api/ledger/v2/{ledger}/_info")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetLedgerInfo", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function ledgerV2GetLedgerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2GetTransaction.ts b/src/funcs/ledgerV2GetTransaction.ts index 6ed1cb50..e1af067e 100644 --- a/src/funcs/ledgerV2GetTransaction.ts +++ b/src/funcs/ledgerV2GetTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -73,16 +74,16 @@ export async function ledgerV2GetTransaction( "pit": payload.pit, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetTransaction", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function ledgerV2GetTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2GetVolumesWithBalances.ts b/src/funcs/ledgerV2GetVolumesWithBalances.ts index 9ab5c816..870714aa 100644 --- a/src/funcs/ledgerV2GetVolumesWithBalances.ts +++ b/src/funcs/ledgerV2GetVolumesWithBalances.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,16 +83,16 @@ export async function ledgerV2GetVolumesWithBalances( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetVolumesWithBalances", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -105,6 +106,7 @@ export async function ledgerV2GetVolumesWithBalances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2ImportLogs.ts b/src/funcs/ledgerV2ImportLogs.ts index 285501d5..fe6a6708 100644 --- a/src/funcs/ledgerV2ImportLogs.ts +++ b/src/funcs/ledgerV2ImportLogs.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -59,17 +60,17 @@ export async function ledgerV2ImportLogs( const path = pathToFunc("/api/ledger/v2/{ledger}/logs/import")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/octet-stream", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ImportLogs", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function ledgerV2ImportLogs( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2ListAccounts.ts b/src/funcs/ledgerV2ListAccounts.ts index bfe3c7f1..3cd9d7b5 100644 --- a/src/funcs/ledgerV2ListAccounts.ts +++ b/src/funcs/ledgerV2ListAccounts.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -82,16 +83,16 @@ export async function ledgerV2ListAccounts( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListAccounts", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -105,6 +106,7 @@ export async function ledgerV2ListAccounts( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2ListLedgers.ts b/src/funcs/ledgerV2ListLedgers.ts index 98b6d244..a984a3e3 100644 --- a/src/funcs/ledgerV2ListLedgers.ts +++ b/src/funcs/ledgerV2ListLedgers.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -60,16 +61,16 @@ export async function ledgerV2ListLedgers( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListLedgers", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function ledgerV2ListLedgers( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2ListLogs.ts b/src/funcs/ledgerV2ListLogs.ts index f0642ef8..f1ff5fdc 100644 --- a/src/funcs/ledgerV2ListLogs.ts +++ b/src/funcs/ledgerV2ListLogs.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -81,16 +82,16 @@ export async function ledgerV2ListLogs( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListLogs", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -104,6 +105,7 @@ export async function ledgerV2ListLogs( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2ListTransactions.ts b/src/funcs/ledgerV2ListTransactions.ts index 30889976..12af5054 100644 --- a/src/funcs/ledgerV2ListTransactions.ts +++ b/src/funcs/ledgerV2ListTransactions.ts @@ -10,6 +10,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -84,16 +85,16 @@ export async function ledgerV2ListTransactions( }, { explode: false }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListTransactions", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -107,6 +108,7 @@ export async function ledgerV2ListTransactions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2ReadStats.ts b/src/funcs/ledgerV2ReadStats.ts index 6ebbd5d3..6dcb6bc8 100644 --- a/src/funcs/ledgerV2ReadStats.ts +++ b/src/funcs/ledgerV2ReadStats.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -65,16 +66,16 @@ export async function ledgerV2ReadStats( const path = pathToFunc("/api/ledger/v2/{ledger}/stats")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ReadStats", - oAuth2Scopes: ["auth:read", "ledger:read"], + oAuth2Scopes: ["ledger:read", "ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function ledgerV2ReadStats( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/ledgerV2RevertTransaction.ts b/src/funcs/ledgerV2RevertTransaction.ts index 648cc981..1842fc0d 100644 --- a/src/funcs/ledgerV2RevertTransaction.ts +++ b/src/funcs/ledgerV2RevertTransaction.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -74,16 +75,16 @@ export async function ledgerV2RevertTransaction( "force": payload.force, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2RevertTransaction", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -97,6 +98,7 @@ export async function ledgerV2RevertTransaction( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/ledgerV2UpdateLedgerMetadata.ts b/src/funcs/ledgerV2UpdateLedgerMetadata.ts index 1af8d2bf..2855c373 100644 --- a/src/funcs/ledgerV2UpdateLedgerMetadata.ts +++ b/src/funcs/ledgerV2UpdateLedgerMetadata.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -63,17 +64,17 @@ export async function ledgerV2UpdateLedgerMetadata( const path = pathToFunc("/api/ledger/v2/{ledger}/metadata")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2UpdateLedgerMetadata", - oAuth2Scopes: ["auth:read", "ledger:write"], + oAuth2Scopes: ["ledger:read", "ledger:write"], resolvedSecurity: requestSecurity, @@ -87,6 +88,7 @@ export async function ledgerV2UpdateLedgerMetadata( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1CancelEvent.ts b/src/funcs/orchestrationCancelEvent.ts similarity index 94% rename from src/funcs/orchestrationV1CancelEvent.ts rename to src/funcs/orchestrationCancelEvent.ts index 37d46186..fbbdfde3 100644 --- a/src/funcs/orchestrationV1CancelEvent.ts +++ b/src/funcs/orchestrationCancelEvent.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Cancel a running workflow */ -export async function orchestrationV1CancelEvent( +export async function orchestrationCancelEvent( client: SDKCore, request: operations.CancelEventRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function orchestrationV1CancelEvent( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "cancelEvent", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV1CancelEvent( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1CreateTrigger.ts b/src/funcs/orchestrationCreateTrigger.ts similarity index 94% rename from src/funcs/orchestrationV1CreateTrigger.ts rename to src/funcs/orchestrationCreateTrigger.ts index 8689ebe5..2d83be03 100644 --- a/src/funcs/orchestrationV1CreateTrigger.ts +++ b/src/funcs/orchestrationCreateTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create trigger */ -export async function orchestrationV1CreateTrigger( +export async function orchestrationCreateTrigger( client: SDKCore, request?: shared.TriggerData | undefined, options?: RequestOptions, @@ -61,17 +62,17 @@ export async function orchestrationV1CreateTrigger( const path = pathToFunc("/api/orchestration/triggers")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createTrigger", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function orchestrationV1CreateTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1CreateWorkflow.ts b/src/funcs/orchestrationCreateWorkflow.ts similarity index 94% rename from src/funcs/orchestrationV1CreateWorkflow.ts rename to src/funcs/orchestrationCreateWorkflow.ts index a1d5b7a9..e881842c 100644 --- a/src/funcs/orchestrationV1CreateWorkflow.ts +++ b/src/funcs/orchestrationCreateWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create a workflow */ -export async function orchestrationV1CreateWorkflow( +export async function orchestrationCreateWorkflow( client: SDKCore, request?: shared.CreateWorkflowRequest | undefined, options?: RequestOptions, @@ -62,17 +63,17 @@ export async function orchestrationV1CreateWorkflow( const path = pathToFunc("/api/orchestration/workflows")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function orchestrationV1CreateWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1DeleteTrigger.ts b/src/funcs/orchestrationDeleteTrigger.ts similarity index 94% rename from src/funcs/orchestrationV1DeleteTrigger.ts rename to src/funcs/orchestrationDeleteTrigger.ts index 275b108b..52472a53 100644 --- a/src/funcs/orchestrationV1DeleteTrigger.ts +++ b/src/funcs/orchestrationDeleteTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Read trigger */ -export async function orchestrationV1DeleteTrigger( +export async function orchestrationDeleteTrigger( client: SDKCore, request: operations.DeleteTriggerRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function orchestrationV1DeleteTrigger( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deleteTrigger", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV1DeleteTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1DeleteWorkflow.ts b/src/funcs/orchestrationDeleteWorkflow.ts similarity index 94% rename from src/funcs/orchestrationV1DeleteWorkflow.ts rename to src/funcs/orchestrationDeleteWorkflow.ts index f3b899bf..d0962b74 100644 --- a/src/funcs/orchestrationV1DeleteWorkflow.ts +++ b/src/funcs/orchestrationDeleteWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Delete a flow by id */ -export async function orchestrationV1DeleteWorkflow( +export async function orchestrationDeleteWorkflow( client: SDKCore, request: operations.DeleteWorkflowRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function orchestrationV1DeleteWorkflow( const path = pathToFunc("/api/orchestration/workflows/{flowId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deleteWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function orchestrationV1DeleteWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1GetInstance.ts b/src/funcs/orchestrationGetInstance.ts similarity index 94% rename from src/funcs/orchestrationV1GetInstance.ts rename to src/funcs/orchestrationGetInstance.ts index aa47bf3c..bf09427b 100644 --- a/src/funcs/orchestrationV1GetInstance.ts +++ b/src/funcs/orchestrationGetInstance.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get a workflow instance by id */ -export async function orchestrationV1GetInstance( +export async function orchestrationGetInstance( client: SDKCore, request: operations.GetInstanceRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function orchestrationV1GetInstance( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getInstance", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV1GetInstance( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1GetInstanceHistory.ts b/src/funcs/orchestrationGetInstanceHistory.ts similarity index 94% rename from src/funcs/orchestrationV1GetInstanceHistory.ts rename to src/funcs/orchestrationGetInstanceHistory.ts index e9deb788..daea9447 100644 --- a/src/funcs/orchestrationV1GetInstanceHistory.ts +++ b/src/funcs/orchestrationGetInstanceHistory.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get a workflow instance history by id */ -export async function orchestrationV1GetInstanceHistory( +export async function orchestrationGetInstanceHistory( client: SDKCore, request: operations.GetInstanceHistoryRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function orchestrationV1GetInstanceHistory( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getInstanceHistory", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV1GetInstanceHistory( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1GetInstanceStageHistory.ts b/src/funcs/orchestrationGetInstanceStageHistory.ts similarity index 94% rename from src/funcs/orchestrationV1GetInstanceStageHistory.ts rename to src/funcs/orchestrationGetInstanceStageHistory.ts index e10030a5..694601c4 100644 --- a/src/funcs/orchestrationV1GetInstanceStageHistory.ts +++ b/src/funcs/orchestrationGetInstanceStageHistory.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get a workflow instance stage history */ -export async function orchestrationV1GetInstanceStageHistory( +export async function orchestrationGetInstanceStageHistory( client: SDKCore, request: operations.GetInstanceStageHistoryRequest, options?: RequestOptions, @@ -72,16 +73,16 @@ export async function orchestrationV1GetInstanceStageHistory( "/api/orchestration/instances/{instanceID}/stages/{number}/history", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getInstanceStageHistory", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function orchestrationV1GetInstanceStageHistory( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1GetWorkflow.ts b/src/funcs/orchestrationGetWorkflow.ts similarity index 94% rename from src/funcs/orchestrationV1GetWorkflow.ts rename to src/funcs/orchestrationGetWorkflow.ts index 0fdbb8e3..4b8da5e8 100644 --- a/src/funcs/orchestrationV1GetWorkflow.ts +++ b/src/funcs/orchestrationGetWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get a flow by id */ -export async function orchestrationV1GetWorkflow( +export async function orchestrationGetWorkflow( client: SDKCore, request: operations.GetWorkflowRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function orchestrationV1GetWorkflow( const path = pathToFunc("/api/orchestration/workflows/{flowId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function orchestrationV1GetWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1ListInstances.ts b/src/funcs/orchestrationListInstances.ts similarity index 94% rename from src/funcs/orchestrationV1ListInstances.ts rename to src/funcs/orchestrationListInstances.ts index bd6a2097..90e3a3a8 100644 --- a/src/funcs/orchestrationV1ListInstances.ts +++ b/src/funcs/orchestrationListInstances.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List instances of a workflow */ -export async function orchestrationV1ListInstances( +export async function orchestrationListInstances( client: SDKCore, request: operations.ListInstancesRequest, options?: RequestOptions, @@ -63,16 +64,16 @@ export async function orchestrationV1ListInstances( "workflowID": payload.workflowID, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listInstances", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function orchestrationV1ListInstances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV1ListTriggers.ts b/src/funcs/orchestrationListTriggers.ts similarity index 94% rename from src/funcs/orchestrationV1ListTriggers.ts rename to src/funcs/orchestrationListTriggers.ts index ab1c8c73..dc0afc22 100644 --- a/src/funcs/orchestrationV1ListTriggers.ts +++ b/src/funcs/orchestrationListTriggers.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List triggers */ -export async function orchestrationV1ListTriggers( +export async function orchestrationListTriggers( client: SDKCore, request: operations.ListTriggersRequest, options?: RequestOptions, @@ -62,16 +63,16 @@ export async function orchestrationV1ListTriggers( "name": payload.name, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listTriggers", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function orchestrationV1ListTriggers( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV1ListTriggersOccurrences.ts b/src/funcs/orchestrationListTriggersOccurrences.ts similarity index 94% rename from src/funcs/orchestrationV1ListTriggersOccurrences.ts rename to src/funcs/orchestrationListTriggersOccurrences.ts index 70cb8d91..2200935b 100644 --- a/src/funcs/orchestrationV1ListTriggersOccurrences.ts +++ b/src/funcs/orchestrationListTriggersOccurrences.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List triggers occurrences */ -export async function orchestrationV1ListTriggersOccurrences( +export async function orchestrationListTriggersOccurrences( client: SDKCore, request: operations.ListTriggersOccurrencesRequest, options?: RequestOptions, @@ -68,16 +69,16 @@ export async function orchestrationV1ListTriggersOccurrences( "/api/orchestration/triggers/{triggerID}/occurrences", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listTriggersOccurrences", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function orchestrationV1ListTriggersOccurrences( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1ListWorkflows.ts b/src/funcs/orchestrationListWorkflows.ts similarity index 93% rename from src/funcs/orchestrationV1ListWorkflows.ts rename to src/funcs/orchestrationListWorkflows.ts index 298d507d..92f58f6e 100644 --- a/src/funcs/orchestrationV1ListWorkflows.ts +++ b/src/funcs/orchestrationListWorkflows.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -26,7 +27,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List registered workflows */ -export async function orchestrationV1ListWorkflows( +export async function orchestrationListWorkflows( client: SDKCore, options?: RequestOptions, ): Promise< @@ -44,16 +45,16 @@ export async function orchestrationV1ListWorkflows( > { const path = pathToFunc("/api/orchestration/workflows")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listWorkflows", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -67,6 +68,7 @@ export async function orchestrationV1ListWorkflows( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/orchestrationV1OrchestrationgetServerInfo.ts b/src/funcs/orchestrationOrchestrationgetServerInfo.ts similarity index 92% rename from src/funcs/orchestrationV1OrchestrationgetServerInfo.ts rename to src/funcs/orchestrationOrchestrationgetServerInfo.ts index bc289ba9..23a000c2 100644 --- a/src/funcs/orchestrationV1OrchestrationgetServerInfo.ts +++ b/src/funcs/orchestrationOrchestrationgetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -23,7 +24,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get server info */ -export async function orchestrationV1OrchestrationgetServerInfo( +export async function orchestrationOrchestrationgetServerInfo( client: SDKCore, options?: RequestOptions, ): Promise< @@ -41,16 +42,16 @@ export async function orchestrationV1OrchestrationgetServerInfo( > { const path = pathToFunc("/api/orchestration/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "orchestrationgetServerInfo", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function orchestrationV1OrchestrationgetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/orchestrationV1ReadTrigger.ts b/src/funcs/orchestrationReadTrigger.ts similarity index 94% rename from src/funcs/orchestrationV1ReadTrigger.ts rename to src/funcs/orchestrationReadTrigger.ts index ac2259e9..101dd20d 100644 --- a/src/funcs/orchestrationV1ReadTrigger.ts +++ b/src/funcs/orchestrationReadTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Read trigger */ -export async function orchestrationV1ReadTrigger( +export async function orchestrationReadTrigger( client: SDKCore, request: operations.ReadTriggerRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function orchestrationV1ReadTrigger( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "readTrigger", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV1ReadTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV1RunWorkflow.ts b/src/funcs/orchestrationRunWorkflow.ts similarity index 94% rename from src/funcs/orchestrationV1RunWorkflow.ts rename to src/funcs/orchestrationRunWorkflow.ts index 1c054626..1eb0d475 100644 --- a/src/funcs/orchestrationV1RunWorkflow.ts +++ b/src/funcs/orchestrationRunWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Run workflow */ -export async function orchestrationV1RunWorkflow( +export async function orchestrationRunWorkflow( client: SDKCore, request: operations.RunWorkflowRequest, options?: RequestOptions, @@ -71,17 +72,17 @@ export async function orchestrationV1RunWorkflow( "wait": payload.wait, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "runWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function orchestrationV1RunWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV1SendEvent.ts b/src/funcs/orchestrationSendEvent.ts similarity index 94% rename from src/funcs/orchestrationV1SendEvent.ts rename to src/funcs/orchestrationSendEvent.ts index df890c43..fc856f03 100644 --- a/src/funcs/orchestrationV1SendEvent.ts +++ b/src/funcs/orchestrationSendEvent.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Send an event to a running workflow */ -export async function orchestrationV1SendEvent( +export async function orchestrationSendEvent( client: SDKCore, request: operations.SendEventRequest, options?: RequestOptions, @@ -67,17 +68,17 @@ export async function orchestrationV1SendEvent( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "sendEvent", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function orchestrationV1SendEvent( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2TestTrigger.ts b/src/funcs/orchestrationTestTrigger.ts similarity index 94% rename from src/funcs/orchestrationV2TestTrigger.ts rename to src/funcs/orchestrationTestTrigger.ts index 18ef9775..e1974ea1 100644 --- a/src/funcs/orchestrationV2TestTrigger.ts +++ b/src/funcs/orchestrationTestTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Test trigger */ -export async function orchestrationV2TestTrigger( +export async function orchestrationTestTrigger( client: SDKCore, request: operations.TestTriggerRequest, options?: RequestOptions, @@ -67,17 +68,17 @@ export async function orchestrationV2TestTrigger( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "testTrigger", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function orchestrationV2TestTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2CancelEvent.ts b/src/funcs/orchestrationV2CancelEvent.ts index 86fbd8ca..5e43b921 100644 --- a/src/funcs/orchestrationV2CancelEvent.ts +++ b/src/funcs/orchestrationV2CancelEvent.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function orchestrationV2CancelEvent( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CancelEvent", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV2CancelEvent( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2CreateTrigger.ts b/src/funcs/orchestrationV2CreateTrigger.ts index b0aae84b..f5e0c1b8 100644 --- a/src/funcs/orchestrationV2CreateTrigger.ts +++ b/src/funcs/orchestrationV2CreateTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -61,17 +62,17 @@ export async function orchestrationV2CreateTrigger( const path = pathToFunc("/api/orchestration/v2/triggers")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CreateTrigger", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function orchestrationV2CreateTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2CreateWorkflow.ts b/src/funcs/orchestrationV2CreateWorkflow.ts index fac83c2a..04e88637 100644 --- a/src/funcs/orchestrationV2CreateWorkflow.ts +++ b/src/funcs/orchestrationV2CreateWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,17 +63,17 @@ export async function orchestrationV2CreateWorkflow( const path = pathToFunc("/api/orchestration/v2/workflows")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2CreateWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function orchestrationV2CreateWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2DeleteTrigger.ts b/src/funcs/orchestrationV2DeleteTrigger.ts index 8b4e869b..8f52f99d 100644 --- a/src/funcs/orchestrationV2DeleteTrigger.ts +++ b/src/funcs/orchestrationV2DeleteTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function orchestrationV2DeleteTrigger( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2DeleteTrigger", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV2DeleteTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2DeleteWorkflow.ts b/src/funcs/orchestrationV2DeleteWorkflow.ts index be409cac..c3e206a7 100644 --- a/src/funcs/orchestrationV2DeleteWorkflow.ts +++ b/src/funcs/orchestrationV2DeleteWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function orchestrationV2DeleteWorkflow( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2DeleteWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV2DeleteWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2GetInstance.ts b/src/funcs/orchestrationV2GetInstance.ts index f118984c..6eb15291 100644 --- a/src/funcs/orchestrationV2GetInstance.ts +++ b/src/funcs/orchestrationV2GetInstance.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function orchestrationV2GetInstance( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetInstance", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV2GetInstance( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2GetInstanceHistory.ts b/src/funcs/orchestrationV2GetInstanceHistory.ts index 1425f138..21e9dd65 100644 --- a/src/funcs/orchestrationV2GetInstanceHistory.ts +++ b/src/funcs/orchestrationV2GetInstanceHistory.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -68,16 +69,16 @@ export async function orchestrationV2GetInstanceHistory( "/api/orchestration/v2/instances/{instanceID}/history", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetInstanceHistory", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function orchestrationV2GetInstanceHistory( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2GetInstanceStageHistory.ts b/src/funcs/orchestrationV2GetInstanceStageHistory.ts index 61cf40fe..54fc2985 100644 --- a/src/funcs/orchestrationV2GetInstanceStageHistory.ts +++ b/src/funcs/orchestrationV2GetInstanceStageHistory.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -72,16 +73,16 @@ export async function orchestrationV2GetInstanceStageHistory( "/api/orchestration/v2/instances/{instanceID}/stages/{number}/history", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetInstanceStageHistory", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function orchestrationV2GetInstanceStageHistory( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2GetServerInfo.ts b/src/funcs/orchestrationV2GetServerInfo.ts index e872a37c..d084f6c4 100644 --- a/src/funcs/orchestrationV2GetServerInfo.ts +++ b/src/funcs/orchestrationV2GetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -41,16 +42,16 @@ export async function orchestrationV2GetServerInfo( > { const path = pathToFunc("/api/orchestration/v2/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetServerInfo", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function orchestrationV2GetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/orchestrationV2GetWorkflow.ts b/src/funcs/orchestrationV2GetWorkflow.ts index 269843f5..42235190 100644 --- a/src/funcs/orchestrationV2GetWorkflow.ts +++ b/src/funcs/orchestrationV2GetWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function orchestrationV2GetWorkflow( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2GetWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV2GetWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2ListInstances.ts b/src/funcs/orchestrationV2ListInstances.ts index 72b85250..d65c1fb7 100644 --- a/src/funcs/orchestrationV2ListInstances.ts +++ b/src/funcs/orchestrationV2ListInstances.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -65,16 +66,16 @@ export async function orchestrationV2ListInstances( "workflowID": payload.workflowID, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListInstances", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function orchestrationV2ListInstances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV2ListTriggers.ts b/src/funcs/orchestrationV2ListTriggers.ts index 4cf2df14..c1b14c16 100644 --- a/src/funcs/orchestrationV2ListTriggers.ts +++ b/src/funcs/orchestrationV2ListTriggers.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,16 +65,16 @@ export async function orchestrationV2ListTriggers( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListTriggers", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -87,6 +88,7 @@ export async function orchestrationV2ListTriggers( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV2ListTriggersOccurrences.ts b/src/funcs/orchestrationV2ListTriggersOccurrences.ts index a5938bb4..4758b2a8 100644 --- a/src/funcs/orchestrationV2ListTriggersOccurrences.ts +++ b/src/funcs/orchestrationV2ListTriggersOccurrences.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -73,16 +74,16 @@ export async function orchestrationV2ListTriggersOccurrences( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListTriggersOccurrences", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function orchestrationV2ListTriggersOccurrences( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV2ListWorkflows.ts b/src/funcs/orchestrationV2ListWorkflows.ts index aa243dff..6141eb10 100644 --- a/src/funcs/orchestrationV2ListWorkflows.ts +++ b/src/funcs/orchestrationV2ListWorkflows.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -63,16 +64,16 @@ export async function orchestrationV2ListWorkflows( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ListWorkflows", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function orchestrationV2ListWorkflows( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV2ReadTrigger.ts b/src/funcs/orchestrationV2ReadTrigger.ts index 7196df19..28d3714b 100644 --- a/src/funcs/orchestrationV2ReadTrigger.ts +++ b/src/funcs/orchestrationV2ReadTrigger.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,16 +68,16 @@ export async function orchestrationV2ReadTrigger( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2ReadTrigger", - oAuth2Scopes: ["auth:read", "orchestration:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function orchestrationV2ReadTrigger( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/orchestrationV2RunWorkflow.ts b/src/funcs/orchestrationV2RunWorkflow.ts index 55374f42..eae0acea 100644 --- a/src/funcs/orchestrationV2RunWorkflow.ts +++ b/src/funcs/orchestrationV2RunWorkflow.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -71,17 +72,17 @@ export async function orchestrationV2RunWorkflow( "wait": payload.wait, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2RunWorkflow", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function orchestrationV2RunWorkflow( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/orchestrationV2SendEvent.ts b/src/funcs/orchestrationV2SendEvent.ts index ff90d044..0f9fa1d9 100644 --- a/src/funcs/orchestrationV2SendEvent.ts +++ b/src/funcs/orchestrationV2SendEvent.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -67,17 +68,17 @@ export async function orchestrationV2SendEvent( "/api/orchestration/v2/instances/{instanceID}/events", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "v2SendEvent", - oAuth2Scopes: ["auth:read", "orchestration:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function orchestrationV2SendEvent( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1AddAccountToPool.ts b/src/funcs/paymentsAddAccountToPool.ts similarity index 94% rename from src/funcs/paymentsV1AddAccountToPool.ts rename to src/funcs/paymentsAddAccountToPool.ts index 49b7acbb..5e47b25e 100644 --- a/src/funcs/paymentsV1AddAccountToPool.ts +++ b/src/funcs/paymentsAddAccountToPool.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Add an account to a pool */ -export async function paymentsV1AddAccountToPool( +export async function paymentsAddAccountToPool( client: SDKCore, request: operations.AddAccountToPoolRequest, options?: RequestOptions, @@ -67,17 +68,17 @@ export async function paymentsV1AddAccountToPool( const path = pathToFunc("/api/payments/pools/{poolId}/accounts")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "addAccountToPool", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function paymentsV1AddAccountToPool( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ConnectorsTransfer.ts b/src/funcs/paymentsConnectorsTransfer.ts similarity index 94% rename from src/funcs/paymentsV1ConnectorsTransfer.ts rename to src/funcs/paymentsConnectorsTransfer.ts index b8d49510..cab58f82 100644 --- a/src/funcs/paymentsV1ConnectorsTransfer.ts +++ b/src/funcs/paymentsConnectorsTransfer.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Execute a transfer between two accounts. */ -export async function paymentsV1ConnectorsTransfer( +export async function paymentsConnectorsTransfer( client: SDKCore, request: operations.ConnectorsTransferRequest, options?: RequestOptions, @@ -67,17 +68,17 @@ export async function paymentsV1ConnectorsTransfer( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "connectorsTransfer", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function paymentsV1ConnectorsTransfer( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1CreateAccount.ts b/src/funcs/paymentsCreateAccount.ts similarity index 94% rename from src/funcs/paymentsV1CreateAccount.ts rename to src/funcs/paymentsCreateAccount.ts index 02a14f1a..d473389b 100644 --- a/src/funcs/paymentsV1CreateAccount.ts +++ b/src/funcs/paymentsCreateAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create an account */ -export async function paymentsV1CreateAccount( +export async function paymentsCreateAccount( client: SDKCore, request: shared.AccountRequest, options?: RequestOptions, @@ -59,17 +60,17 @@ export async function paymentsV1CreateAccount( const path = pathToFunc("/api/payments/accounts")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createAccount", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function paymentsV1CreateAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1CreateBankAccount.ts b/src/funcs/paymentsCreateBankAccount.ts similarity index 94% rename from src/funcs/paymentsV1CreateBankAccount.ts rename to src/funcs/paymentsCreateBankAccount.ts index c57fec4a..608a2b25 100644 --- a/src/funcs/paymentsV1CreateBankAccount.ts +++ b/src/funcs/paymentsCreateBankAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create a bank account in Payments and on the PSP. */ -export async function paymentsV1CreateBankAccount( +export async function paymentsCreateBankAccount( client: SDKCore, request: shared.BankAccountRequest, options?: RequestOptions, @@ -59,17 +60,17 @@ export async function paymentsV1CreateBankAccount( const path = pathToFunc("/api/payments/bank-accounts")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createBankAccount", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function paymentsV1CreateBankAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1CreatePayment.ts b/src/funcs/paymentsCreatePayment.ts similarity index 94% rename from src/funcs/paymentsV1CreatePayment.ts rename to src/funcs/paymentsCreatePayment.ts index 862c6523..e38c2cab 100644 --- a/src/funcs/paymentsV1CreatePayment.ts +++ b/src/funcs/paymentsCreatePayment.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create a payment */ -export async function paymentsV1CreatePayment( +export async function paymentsCreatePayment( client: SDKCore, request: shared.PaymentRequest, options?: RequestOptions, @@ -59,17 +60,17 @@ export async function paymentsV1CreatePayment( const path = pathToFunc("/api/payments/payments")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createPayment", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function paymentsV1CreatePayment( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1CreatePool.ts b/src/funcs/paymentsCreatePool.ts similarity index 94% rename from src/funcs/paymentsV1CreatePool.ts rename to src/funcs/paymentsCreatePool.ts index 25a08b03..6d412110 100644 --- a/src/funcs/paymentsV1CreatePool.ts +++ b/src/funcs/paymentsCreatePool.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create a Pool */ -export async function paymentsV1CreatePool( +export async function paymentsCreatePool( client: SDKCore, request: shared.PoolRequest, options?: RequestOptions, @@ -59,17 +60,17 @@ export async function paymentsV1CreatePool( const path = pathToFunc("/api/payments/pools")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createPool", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function paymentsV1CreatePool( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1CreateTransferInitiation.ts b/src/funcs/paymentsCreateTransferInitiation.ts similarity index 94% rename from src/funcs/paymentsV1CreateTransferInitiation.ts rename to src/funcs/paymentsCreateTransferInitiation.ts index 6e037891..d971101e 100644 --- a/src/funcs/paymentsV1CreateTransferInitiation.ts +++ b/src/funcs/paymentsCreateTransferInitiation.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create a transfer initiation */ -export async function paymentsV1CreateTransferInitiation( +export async function paymentsCreateTransferInitiation( client: SDKCore, request: shared.TransferInitiationRequest, options?: RequestOptions, @@ -59,17 +60,17 @@ export async function paymentsV1CreateTransferInitiation( const path = pathToFunc("/api/payments/transfer-initiations")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createTransferInitiation", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function paymentsV1CreateTransferInitiation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1DeletePool.ts b/src/funcs/paymentsDeletePool.ts similarity index 94% rename from src/funcs/paymentsV1DeletePool.ts rename to src/funcs/paymentsDeletePool.ts index 7ee21def..7cb6fb17 100644 --- a/src/funcs/paymentsV1DeletePool.ts +++ b/src/funcs/paymentsDeletePool.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Delete a pool by its id. */ -export async function paymentsV1DeletePool( +export async function paymentsDeletePool( client: SDKCore, request: operations.DeletePoolRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function paymentsV1DeletePool( const path = pathToFunc("/api/payments/pools/{poolId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deletePool", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function paymentsV1DeletePool( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1DeleteTransferInitiation.ts b/src/funcs/paymentsDeleteTransferInitiation.ts similarity index 94% rename from src/funcs/paymentsV1DeleteTransferInitiation.ts rename to src/funcs/paymentsDeleteTransferInitiation.ts index a51fc6e9..5f25e194 100644 --- a/src/funcs/paymentsV1DeleteTransferInitiation.ts +++ b/src/funcs/paymentsDeleteTransferInitiation.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Delete a transfer initiation by its id. */ -export async function paymentsV1DeleteTransferInitiation( +export async function paymentsDeleteTransferInitiation( client: SDKCore, request: operations.DeleteTransferInitiationRequest, options?: RequestOptions, @@ -68,16 +69,16 @@ export async function paymentsV1DeleteTransferInitiation( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deleteTransferInitiation", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function paymentsV1DeleteTransferInitiation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ForwardBankAccount.ts b/src/funcs/paymentsForwardBankAccount.ts similarity index 94% rename from src/funcs/paymentsV1ForwardBankAccount.ts rename to src/funcs/paymentsForwardBankAccount.ts index 4902ef3b..ab8f847c 100644 --- a/src/funcs/paymentsV1ForwardBankAccount.ts +++ b/src/funcs/paymentsForwardBankAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Forward a bank account to a connector */ -export async function paymentsV1ForwardBankAccount( +export async function paymentsForwardBankAccount( client: SDKCore, request: operations.ForwardBankAccountRequest, options?: RequestOptions, @@ -66,17 +67,17 @@ export async function paymentsV1ForwardBankAccount( "/api/payments/bank-accounts/{bankAccountId}/forward", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "forwardBankAccount", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function paymentsV1ForwardBankAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1GetAccountBalances.ts b/src/funcs/paymentsGetAccountBalances.ts similarity index 94% rename from src/funcs/paymentsV1GetAccountBalances.ts rename to src/funcs/paymentsGetAccountBalances.ts index c8f844c7..93c3d018 100644 --- a/src/funcs/paymentsV1GetAccountBalances.ts +++ b/src/funcs/paymentsGetAccountBalances.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get account balances */ -export async function paymentsV1GetAccountBalances( +export async function paymentsGetAccountBalances( client: SDKCore, request: operations.GetAccountBalancesRequest, options?: RequestOptions, @@ -74,16 +75,16 @@ export async function paymentsV1GetAccountBalances( "to": payload.to, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getAccountBalances", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -97,6 +98,7 @@ export async function paymentsV1GetAccountBalances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1GetBankAccount.ts b/src/funcs/paymentsGetBankAccount.ts similarity index 94% rename from src/funcs/paymentsV1GetBankAccount.ts rename to src/funcs/paymentsGetBankAccount.ts index 8fb65d69..624d27e9 100644 --- a/src/funcs/paymentsV1GetBankAccount.ts +++ b/src/funcs/paymentsGetBankAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get a bank account created by user on Formance */ -export async function paymentsV1GetBankAccount( +export async function paymentsGetBankAccount( client: SDKCore, request: operations.GetBankAccountRequest, options?: RequestOptions, @@ -64,16 +65,16 @@ export async function paymentsV1GetBankAccount( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getBankAccount", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -87,6 +88,7 @@ export async function paymentsV1GetBankAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1GetConnectorTask.ts b/src/funcs/paymentsGetConnectorTask.ts similarity index 94% rename from src/funcs/paymentsV1GetConnectorTask.ts rename to src/funcs/paymentsGetConnectorTask.ts index eac0515f..24baba70 100644 --- a/src/funcs/paymentsV1GetConnectorTask.ts +++ b/src/funcs/paymentsGetConnectorTask.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -30,7 +31,7 @@ import { Result } from "../sdk/types/fp.js"; * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ -export async function paymentsV1GetConnectorTask( +export async function paymentsGetConnectorTask( client: SDKCore, request: operations.GetConnectorTaskRequest, options?: RequestOptions, @@ -73,16 +74,16 @@ export async function paymentsV1GetConnectorTask( "/api/payments/connectors/{connector}/tasks/{taskId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getConnectorTask", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function paymentsV1GetConnectorTask( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1GetConnectorTaskV1.ts b/src/funcs/paymentsGetConnectorTaskV1.ts similarity index 94% rename from src/funcs/paymentsV1GetConnectorTaskV1.ts rename to src/funcs/paymentsGetConnectorTaskV1.ts index ad9f83a5..fe44024e 100644 --- a/src/funcs/paymentsV1GetConnectorTaskV1.ts +++ b/src/funcs/paymentsGetConnectorTaskV1.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get a specific task associated to the connector. */ -export async function paymentsV1GetConnectorTaskV1( +export async function paymentsGetConnectorTaskV1( client: SDKCore, request: operations.GetConnectorTaskV1Request, options?: RequestOptions, @@ -75,16 +76,16 @@ export async function paymentsV1GetConnectorTaskV1( "/api/payments/connectors/{connector}/{connectorId}/tasks/{taskId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getConnectorTaskV1", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -98,6 +99,7 @@ export async function paymentsV1GetConnectorTaskV1( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1GetPayment.ts b/src/funcs/paymentsGetPayment.ts similarity index 94% rename from src/funcs/paymentsV1GetPayment.ts rename to src/funcs/paymentsGetPayment.ts index 71dc4497..4c0652b4 100644 --- a/src/funcs/paymentsV1GetPayment.ts +++ b/src/funcs/paymentsGetPayment.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get a payment */ -export async function paymentsV1GetPayment( +export async function paymentsGetPayment( client: SDKCore, request: operations.GetPaymentRequest, options?: RequestOptions, @@ -62,16 +63,16 @@ export async function paymentsV1GetPayment( const path = pathToFunc("/api/payments/payments/{paymentId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getPayment", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function paymentsV1GetPayment( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1GetPool.ts b/src/funcs/paymentsGetPool.ts similarity index 94% rename from src/funcs/paymentsV1GetPool.ts rename to src/funcs/paymentsGetPool.ts index ba0fcb82..4daacd9f 100644 --- a/src/funcs/paymentsV1GetPool.ts +++ b/src/funcs/paymentsGetPool.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get a Pool */ -export async function paymentsV1GetPool( +export async function paymentsGetPool( client: SDKCore, request: operations.GetPoolRequest, options?: RequestOptions, @@ -62,16 +63,16 @@ export async function paymentsV1GetPool( const path = pathToFunc("/api/payments/pools/{poolId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getPool", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function paymentsV1GetPool( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1GetPoolBalances.ts b/src/funcs/paymentsGetPoolBalances.ts similarity index 94% rename from src/funcs/paymentsV1GetPoolBalances.ts rename to src/funcs/paymentsGetPoolBalances.ts index c7ac3c52..44ab7f2d 100644 --- a/src/funcs/paymentsV1GetPoolBalances.ts +++ b/src/funcs/paymentsGetPoolBalances.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get pool balances */ -export async function paymentsV1GetPoolBalances( +export async function paymentsGetPoolBalances( client: SDKCore, request: operations.GetPoolBalancesRequest, options?: RequestOptions, @@ -66,16 +67,16 @@ export async function paymentsV1GetPoolBalances( "at": payload.at, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getPoolBalances", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -89,6 +90,7 @@ export async function paymentsV1GetPoolBalances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1GetTransferInitiation.ts b/src/funcs/paymentsGetTransferInitiation.ts similarity index 94% rename from src/funcs/paymentsV1GetTransferInitiation.ts rename to src/funcs/paymentsGetTransferInitiation.ts index 1a41d397..ec9119cc 100644 --- a/src/funcs/paymentsV1GetTransferInitiation.ts +++ b/src/funcs/paymentsGetTransferInitiation.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get a transfer initiation */ -export async function paymentsV1GetTransferInitiation( +export async function paymentsGetTransferInitiation( client: SDKCore, request: operations.GetTransferInitiationRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function paymentsV1GetTransferInitiation( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getTransferInitiation", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function paymentsV1GetTransferInitiation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1InstallConnector.ts b/src/funcs/paymentsInstallConnector.ts similarity index 94% rename from src/funcs/paymentsV1InstallConnector.ts rename to src/funcs/paymentsInstallConnector.ts index 9f5cb666..da84daf7 100644 --- a/src/funcs/paymentsV1InstallConnector.ts +++ b/src/funcs/paymentsInstallConnector.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Install a connector by its name and config. */ -export async function paymentsV1InstallConnector( +export async function paymentsInstallConnector( client: SDKCore, request: operations.InstallConnectorRequest, options?: RequestOptions, @@ -65,17 +66,17 @@ export async function paymentsV1InstallConnector( const path = pathToFunc("/api/payments/connectors/{connector}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "installConnector", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -89,6 +90,7 @@ export async function paymentsV1InstallConnector( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ListAllConnectors.ts b/src/funcs/paymentsListAllConnectors.ts similarity index 93% rename from src/funcs/paymentsV1ListAllConnectors.ts rename to src/funcs/paymentsListAllConnectors.ts index 1133c64d..3d12697a 100644 --- a/src/funcs/paymentsV1ListAllConnectors.ts +++ b/src/funcs/paymentsListAllConnectors.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -26,7 +27,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List all installed connectors. */ -export async function paymentsV1ListAllConnectors( +export async function paymentsListAllConnectors( client: SDKCore, options?: RequestOptions, ): Promise< @@ -44,16 +45,16 @@ export async function paymentsV1ListAllConnectors( > { const path = pathToFunc("/api/payments/connectors")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listAllConnectors", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -67,6 +68,7 @@ export async function paymentsV1ListAllConnectors( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/paymentsV1ListBankAccounts.ts b/src/funcs/paymentsListBankAccounts.ts similarity index 94% rename from src/funcs/paymentsV1ListBankAccounts.ts rename to src/funcs/paymentsListBankAccounts.ts index cf9cecf0..04532374 100644 --- a/src/funcs/paymentsV1ListBankAccounts.ts +++ b/src/funcs/paymentsListBankAccounts.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List all bank accounts created by user on Formance. */ -export async function paymentsV1ListBankAccounts( +export async function paymentsListBankAccounts( client: SDKCore, request: operations.ListBankAccountsRequest, options?: RequestOptions, @@ -64,16 +65,16 @@ export async function paymentsV1ListBankAccounts( "sort": payload.sort, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listBankAccounts", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -87,6 +88,7 @@ export async function paymentsV1ListBankAccounts( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1ListConfigsAvailableConnectors.ts b/src/funcs/paymentsListConfigsAvailableConnectors.ts similarity index 93% rename from src/funcs/paymentsV1ListConfigsAvailableConnectors.ts rename to src/funcs/paymentsListConfigsAvailableConnectors.ts index edb51f3f..b7debb85 100644 --- a/src/funcs/paymentsV1ListConfigsAvailableConnectors.ts +++ b/src/funcs/paymentsListConfigsAvailableConnectors.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -26,7 +27,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List the configs of each available connector. */ -export async function paymentsV1ListConfigsAvailableConnectors( +export async function paymentsListConfigsAvailableConnectors( client: SDKCore, options?: RequestOptions, ): Promise< @@ -44,16 +45,16 @@ export async function paymentsV1ListConfigsAvailableConnectors( > { const path = pathToFunc("/api/payments/connectors/configs")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listConfigsAvailableConnectors", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -67,6 +68,7 @@ export async function paymentsV1ListConfigsAvailableConnectors( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/paymentsV1ListConnectorTasks.ts b/src/funcs/paymentsListConnectorTasks.ts similarity index 94% rename from src/funcs/paymentsV1ListConnectorTasks.ts rename to src/funcs/paymentsListConnectorTasks.ts index 39862bf7..c5a2b794 100644 --- a/src/funcs/paymentsV1ListConnectorTasks.ts +++ b/src/funcs/paymentsListConnectorTasks.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -30,7 +31,7 @@ import { Result } from "../sdk/types/fp.js"; * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ -export async function paymentsV1ListConnectorTasks( +export async function paymentsListConnectorTasks( client: SDKCore, request: operations.ListConnectorTasksRequest, options?: RequestOptions, @@ -74,16 +75,16 @@ export async function paymentsV1ListConnectorTasks( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listConnectorTasks", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -97,6 +98,7 @@ export async function paymentsV1ListConnectorTasks( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1ListConnectorTasksV1.ts b/src/funcs/paymentsListConnectorTasksV1.ts similarity index 94% rename from src/funcs/paymentsV1ListConnectorTasksV1.ts rename to src/funcs/paymentsListConnectorTasksV1.ts index 8f372b18..ab7b8494 100644 --- a/src/funcs/paymentsV1ListConnectorTasksV1.ts +++ b/src/funcs/paymentsListConnectorTasksV1.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List all tasks associated with this connector. */ -export async function paymentsV1ListConnectorTasksV1( +export async function paymentsListConnectorTasksV1( client: SDKCore, request: operations.ListConnectorTasksV1Request, options?: RequestOptions, @@ -77,16 +78,16 @@ export async function paymentsV1ListConnectorTasksV1( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listConnectorTasksV1", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -100,6 +101,7 @@ export async function paymentsV1ListConnectorTasksV1( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1ListPayments.ts b/src/funcs/paymentsListPayments.ts similarity index 94% rename from src/funcs/paymentsV1ListPayments.ts rename to src/funcs/paymentsListPayments.ts index 8ddccbb3..26c78b6b 100644 --- a/src/funcs/paymentsV1ListPayments.ts +++ b/src/funcs/paymentsListPayments.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List payments */ -export async function paymentsV1ListPayments( +export async function paymentsListPayments( client: SDKCore, request: operations.ListPaymentsRequest, options?: RequestOptions, @@ -62,16 +63,16 @@ export async function paymentsV1ListPayments( "sort": payload.sort, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listPayments", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function paymentsV1ListPayments( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1ListPools.ts b/src/funcs/paymentsListPools.ts similarity index 94% rename from src/funcs/paymentsV1ListPools.ts rename to src/funcs/paymentsListPools.ts index 3b0d7b7c..262b89bb 100644 --- a/src/funcs/paymentsV1ListPools.ts +++ b/src/funcs/paymentsListPools.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List Pools */ -export async function paymentsV1ListPools( +export async function paymentsListPools( client: SDKCore, request: operations.ListPoolsRequest, options?: RequestOptions, @@ -62,16 +63,16 @@ export async function paymentsV1ListPools( "sort": payload.sort, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listPools", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function paymentsV1ListPools( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1ListTransferInitiations.ts b/src/funcs/paymentsListTransferInitiations.ts similarity index 94% rename from src/funcs/paymentsV1ListTransferInitiations.ts rename to src/funcs/paymentsListTransferInitiations.ts index fb5c214a..781814a4 100644 --- a/src/funcs/paymentsV1ListTransferInitiations.ts +++ b/src/funcs/paymentsListTransferInitiations.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List Transfer Initiations */ -export async function paymentsV1ListTransferInitiations( +export async function paymentsListTransferInitiations( client: SDKCore, request: operations.ListTransferInitiationsRequest, options?: RequestOptions, @@ -63,16 +64,16 @@ export async function paymentsV1ListTransferInitiations( "sort": payload.sort, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listTransferInitiations", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function paymentsV1ListTransferInitiations( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1PaymentsgetAccount.ts b/src/funcs/paymentsPaymentsgetAccount.ts similarity index 94% rename from src/funcs/paymentsV1PaymentsgetAccount.ts rename to src/funcs/paymentsPaymentsgetAccount.ts index 215cca39..1c419e6f 100644 --- a/src/funcs/paymentsV1PaymentsgetAccount.ts +++ b/src/funcs/paymentsPaymentsgetAccount.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get an account */ -export async function paymentsV1PaymentsgetAccount( +export async function paymentsPaymentsgetAccount( client: SDKCore, request: operations.PaymentsgetAccountRequest, options?: RequestOptions, @@ -62,16 +63,16 @@ export async function paymentsV1PaymentsgetAccount( const path = pathToFunc("/api/payments/accounts/{accountId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "paymentsgetAccount", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function paymentsV1PaymentsgetAccount( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1PaymentsgetServerInfo.ts b/src/funcs/paymentsPaymentsgetServerInfo.ts similarity index 93% rename from src/funcs/paymentsV1PaymentsgetServerInfo.ts rename to src/funcs/paymentsPaymentsgetServerInfo.ts index 36a0fb2b..f849b539 100644 --- a/src/funcs/paymentsV1PaymentsgetServerInfo.ts +++ b/src/funcs/paymentsPaymentsgetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -23,7 +24,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get server info */ -export async function paymentsV1PaymentsgetServerInfo( +export async function paymentsPaymentsgetServerInfo( client: SDKCore, options?: RequestOptions, ): Promise< @@ -41,16 +42,16 @@ export async function paymentsV1PaymentsgetServerInfo( > { const path = pathToFunc("/api/payments/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "paymentsgetServerInfo", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function paymentsV1PaymentsgetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/paymentsV1PaymentslistAccounts.ts b/src/funcs/paymentsPaymentslistAccounts.ts similarity index 94% rename from src/funcs/paymentsV1PaymentslistAccounts.ts rename to src/funcs/paymentsPaymentslistAccounts.ts index e78b380b..bc8072a7 100644 --- a/src/funcs/paymentsV1PaymentslistAccounts.ts +++ b/src/funcs/paymentsPaymentslistAccounts.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List accounts */ -export async function paymentsV1PaymentslistAccounts( +export async function paymentsPaymentslistAccounts( client: SDKCore, request: operations.PaymentslistAccountsRequest, options?: RequestOptions, @@ -63,16 +64,16 @@ export async function paymentsV1PaymentslistAccounts( "sort": payload.sort, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "paymentslistAccounts", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function paymentsV1PaymentslistAccounts( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/paymentsV1ReadConnectorConfig.ts b/src/funcs/paymentsReadConnectorConfig.ts similarity index 94% rename from src/funcs/paymentsV1ReadConnectorConfig.ts rename to src/funcs/paymentsReadConnectorConfig.ts index 3dfc84af..3a71e446 100644 --- a/src/funcs/paymentsV1ReadConnectorConfig.ts +++ b/src/funcs/paymentsReadConnectorConfig.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -30,7 +31,7 @@ import { Result } from "../sdk/types/fp.js"; * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ -export async function paymentsV1ReadConnectorConfig( +export async function paymentsReadConnectorConfig( client: SDKCore, request: operations.ReadConnectorConfigRequest, options?: RequestOptions, @@ -70,16 +71,16 @@ export async function paymentsV1ReadConnectorConfig( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "readConnectorConfig", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function paymentsV1ReadConnectorConfig( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ReadConnectorConfigV1.ts b/src/funcs/paymentsReadConnectorConfigV1.ts similarity index 94% rename from src/funcs/paymentsV1ReadConnectorConfigV1.ts rename to src/funcs/paymentsReadConnectorConfigV1.ts index b7221996..4dc75791 100644 --- a/src/funcs/paymentsV1ReadConnectorConfigV1.ts +++ b/src/funcs/paymentsReadConnectorConfigV1.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Read connector config */ -export async function paymentsV1ReadConnectorConfigV1( +export async function paymentsReadConnectorConfigV1( client: SDKCore, request: operations.ReadConnectorConfigV1Request, options?: RequestOptions, @@ -72,16 +73,16 @@ export async function paymentsV1ReadConnectorConfigV1( "/api/payments/connectors/{connector}/{connectorId}/config", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "readConnectorConfigV1", - oAuth2Scopes: ["auth:read", "payments:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function paymentsV1ReadConnectorConfigV1( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1RemoveAccountFromPool.ts b/src/funcs/paymentsRemoveAccountFromPool.ts similarity index 94% rename from src/funcs/paymentsV1RemoveAccountFromPool.ts rename to src/funcs/paymentsRemoveAccountFromPool.ts index 4a5bc919..6c77b9e3 100644 --- a/src/funcs/paymentsV1RemoveAccountFromPool.ts +++ b/src/funcs/paymentsRemoveAccountFromPool.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Remove an account from a pool by its id. */ -export async function paymentsV1RemoveAccountFromPool( +export async function paymentsRemoveAccountFromPool( client: SDKCore, request: operations.RemoveAccountFromPoolRequest, options?: RequestOptions, @@ -72,16 +73,16 @@ export async function paymentsV1RemoveAccountFromPool( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "removeAccountFromPool", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function paymentsV1RemoveAccountFromPool( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ResetConnector.ts b/src/funcs/paymentsResetConnector.ts similarity index 94% rename from src/funcs/paymentsV1ResetConnector.ts rename to src/funcs/paymentsResetConnector.ts index 3bc25468..704c0483 100644 --- a/src/funcs/paymentsV1ResetConnector.ts +++ b/src/funcs/paymentsResetConnector.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -31,7 +32,7 @@ import { Result } from "../sdk/types/fp.js"; * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ -export async function paymentsV1ResetConnector( +export async function paymentsResetConnector( client: SDKCore, request: operations.ResetConnectorRequest, options?: RequestOptions, @@ -70,16 +71,16 @@ export async function paymentsV1ResetConnector( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "resetConnector", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function paymentsV1ResetConnector( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ResetConnectorV1.ts b/src/funcs/paymentsResetConnectorV1.ts similarity index 94% rename from src/funcs/paymentsV1ResetConnectorV1.ts rename to src/funcs/paymentsResetConnectorV1.ts index a6c6cf94..4ec8f9f0 100644 --- a/src/funcs/paymentsV1ResetConnectorV1.ts +++ b/src/funcs/paymentsResetConnectorV1.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * Reset a connector by its name. * It will remove the connector and ALL PAYMENTS generated with it. */ -export async function paymentsV1ResetConnectorV1( +export async function paymentsResetConnectorV1( client: SDKCore, request: operations.ResetConnectorV1Request, options?: RequestOptions, @@ -72,16 +73,16 @@ export async function paymentsV1ResetConnectorV1( "/api/payments/connectors/{connector}/{connectorId}/reset", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "resetConnectorV1", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function paymentsV1ResetConnectorV1( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1RetryTransferInitiation.ts b/src/funcs/paymentsRetryTransferInitiation.ts similarity index 94% rename from src/funcs/paymentsV1RetryTransferInitiation.ts rename to src/funcs/paymentsRetryTransferInitiation.ts index f3ae6b39..8e215f87 100644 --- a/src/funcs/paymentsV1RetryTransferInitiation.ts +++ b/src/funcs/paymentsRetryTransferInitiation.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Retry a failed transfer initiation */ -export async function paymentsV1RetryTransferInitiation( +export async function paymentsRetryTransferInitiation( client: SDKCore, request: operations.RetryTransferInitiationRequest, options?: RequestOptions, @@ -68,16 +69,16 @@ export async function paymentsV1RetryTransferInitiation( "/api/payments/transfer-initiations/{transferId}/retry", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "retryTransferInitiation", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function paymentsV1RetryTransferInitiation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1ReverseTransferInitiation.ts b/src/funcs/paymentsReverseTransferInitiation.ts similarity index 94% rename from src/funcs/paymentsV1ReverseTransferInitiation.ts rename to src/funcs/paymentsReverseTransferInitiation.ts index d94a85e5..638f5536 100644 --- a/src/funcs/paymentsV1ReverseTransferInitiation.ts +++ b/src/funcs/paymentsReverseTransferInitiation.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Reverse transfer initiation */ -export async function paymentsV1ReverseTransferInitiation( +export async function paymentsReverseTransferInitiation( client: SDKCore, request: operations.ReverseTransferInitiationRequest, options?: RequestOptions, @@ -70,17 +71,17 @@ export async function paymentsV1ReverseTransferInitiation( "/api/payments/transfer-initiations/{transferId}/reverse", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "reverseTransferInitiation", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -94,6 +95,7 @@ export async function paymentsV1ReverseTransferInitiation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1UdpateTransferInitiationStatus.ts b/src/funcs/paymentsUdpateTransferInitiationStatus.ts similarity index 94% rename from src/funcs/paymentsV1UdpateTransferInitiationStatus.ts rename to src/funcs/paymentsUdpateTransferInitiationStatus.ts index bf387cfc..61f0fa21 100644 --- a/src/funcs/paymentsV1UdpateTransferInitiationStatus.ts +++ b/src/funcs/paymentsUdpateTransferInitiationStatus.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Update a transfer initiation status */ -export async function paymentsV1UdpateTransferInitiationStatus( +export async function paymentsUdpateTransferInitiationStatus( client: SDKCore, request: operations.UdpateTransferInitiationStatusRequest, options?: RequestOptions, @@ -74,17 +75,17 @@ export async function paymentsV1UdpateTransferInitiationStatus( "/api/payments/transfer-initiations/{transferId}/status", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "udpateTransferInitiationStatus", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -98,6 +99,7 @@ export async function paymentsV1UdpateTransferInitiationStatus( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1UninstallConnector.ts b/src/funcs/paymentsUninstallConnector.ts similarity index 94% rename from src/funcs/paymentsV1UninstallConnector.ts rename to src/funcs/paymentsUninstallConnector.ts index 3ed2885d..c1755e4c 100644 --- a/src/funcs/paymentsV1UninstallConnector.ts +++ b/src/funcs/paymentsUninstallConnector.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -30,7 +31,7 @@ import { Result } from "../sdk/types/fp.js"; * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ -export async function paymentsV1UninstallConnector( +export async function paymentsUninstallConnector( client: SDKCore, request: operations.UninstallConnectorRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function paymentsV1UninstallConnector( const path = pathToFunc("/api/payments/connectors/{connector}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "uninstallConnector", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function paymentsV1UninstallConnector( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1UninstallConnectorV1.ts b/src/funcs/paymentsUninstallConnectorV1.ts similarity index 94% rename from src/funcs/paymentsV1UninstallConnectorV1.ts rename to src/funcs/paymentsUninstallConnectorV1.ts index c23d3908..a25b78b6 100644 --- a/src/funcs/paymentsV1UninstallConnectorV1.ts +++ b/src/funcs/paymentsUninstallConnectorV1.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Uninstall a connector by its name. */ -export async function paymentsV1UninstallConnectorV1( +export async function paymentsUninstallConnectorV1( client: SDKCore, request: operations.UninstallConnectorV1Request, options?: RequestOptions, @@ -72,16 +73,16 @@ export async function paymentsV1UninstallConnectorV1( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "uninstallConnectorV1", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -95,6 +96,7 @@ export async function paymentsV1UninstallConnectorV1( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1UpdateBankAccountMetadata.ts b/src/funcs/paymentsUpdateBankAccountMetadata.ts similarity index 94% rename from src/funcs/paymentsV1UpdateBankAccountMetadata.ts rename to src/funcs/paymentsUpdateBankAccountMetadata.ts index 13d2c695..45b8733c 100644 --- a/src/funcs/paymentsV1UpdateBankAccountMetadata.ts +++ b/src/funcs/paymentsUpdateBankAccountMetadata.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Update metadata of a bank account */ -export async function paymentsV1UpdateBankAccountMetadata( +export async function paymentsUpdateBankAccountMetadata( client: SDKCore, request: operations.UpdateBankAccountMetadataRequest, options?: RequestOptions, @@ -67,17 +68,17 @@ export async function paymentsV1UpdateBankAccountMetadata( "/api/payments/bank-accounts/{bankAccountId}/metadata", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "updateBankAccountMetadata", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function paymentsV1UpdateBankAccountMetadata( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PATCH", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1UpdateConnectorConfigV1.ts b/src/funcs/paymentsUpdateConnectorConfigV1.ts similarity index 94% rename from src/funcs/paymentsV1UpdateConnectorConfigV1.ts rename to src/funcs/paymentsUpdateConnectorConfigV1.ts index ea48aa12..cd8f945d 100644 --- a/src/funcs/paymentsV1UpdateConnectorConfigV1.ts +++ b/src/funcs/paymentsUpdateConnectorConfigV1.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Update connector config */ -export async function paymentsV1UpdateConnectorConfigV1( +export async function paymentsUpdateConnectorConfigV1( client: SDKCore, request: operations.UpdateConnectorConfigV1Request, options?: RequestOptions, @@ -72,17 +73,17 @@ export async function paymentsV1UpdateConnectorConfigV1( "/api/payments/connectors/{connector}/{connectorId}/config", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "updateConnectorConfigV1", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function paymentsV1UpdateConnectorConfigV1( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/paymentsV1UpdateMetadata.ts b/src/funcs/paymentsUpdateMetadata.ts similarity index 94% rename from src/funcs/paymentsV1UpdateMetadata.ts rename to src/funcs/paymentsUpdateMetadata.ts index 9f06f4e7..7b8bf44d 100644 --- a/src/funcs/paymentsV1UpdateMetadata.ts +++ b/src/funcs/paymentsUpdateMetadata.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Update metadata */ -export async function paymentsV1UpdateMetadata( +export async function paymentsUpdateMetadata( client: SDKCore, request: operations.UpdateMetadataRequest, options?: RequestOptions, @@ -64,17 +65,17 @@ export async function paymentsV1UpdateMetadata( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "updateMetadata", - oAuth2Scopes: ["auth:read", "payments:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function paymentsV1UpdateMetadata( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PATCH", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/reconciliationV1CreatePolicy.ts b/src/funcs/reconciliationCreatePolicy.ts similarity index 94% rename from src/funcs/reconciliationV1CreatePolicy.ts rename to src/funcs/reconciliationCreatePolicy.ts index b801fa69..d8e7db22 100644 --- a/src/funcs/reconciliationV1CreatePolicy.ts +++ b/src/funcs/reconciliationCreatePolicy.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -29,7 +30,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Create a policy */ -export async function reconciliationV1CreatePolicy( +export async function reconciliationCreatePolicy( client: SDKCore, request: shared.PolicyRequest, options?: RequestOptions, @@ -59,17 +60,17 @@ export async function reconciliationV1CreatePolicy( const path = pathToFunc("/api/reconciliation/policies")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createPolicy", - oAuth2Scopes: ["auth:read", "reconciliation:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function reconciliationV1CreatePolicy( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/reconciliationV1DeletePolicy.ts b/src/funcs/reconciliationDeletePolicy.ts similarity index 94% rename from src/funcs/reconciliationV1DeletePolicy.ts rename to src/funcs/reconciliationDeletePolicy.ts index 28646bf0..edbb5f6f 100644 --- a/src/funcs/reconciliationV1DeletePolicy.ts +++ b/src/funcs/reconciliationDeletePolicy.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Delete a policy by its id. */ -export async function reconciliationV1DeletePolicy( +export async function reconciliationDeletePolicy( client: SDKCore, request: operations.DeletePolicyRequest, options?: RequestOptions, @@ -67,16 +68,16 @@ export async function reconciliationV1DeletePolicy( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deletePolicy", - oAuth2Scopes: ["auth:read", "reconciliation:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function reconciliationV1DeletePolicy( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/reconciliationV1GetPolicy.ts b/src/funcs/reconciliationGetPolicy.ts similarity index 94% rename from src/funcs/reconciliationV1GetPolicy.ts rename to src/funcs/reconciliationGetPolicy.ts index b5250184..b4b2e144 100644 --- a/src/funcs/reconciliationV1GetPolicy.ts +++ b/src/funcs/reconciliationGetPolicy.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get a policy */ -export async function reconciliationV1GetPolicy( +export async function reconciliationGetPolicy( client: SDKCore, request: operations.GetPolicyRequest, options?: RequestOptions, @@ -64,16 +65,16 @@ export async function reconciliationV1GetPolicy( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getPolicy", - oAuth2Scopes: ["auth:read", "reconciliation:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -87,6 +88,7 @@ export async function reconciliationV1GetPolicy( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/reconciliationV1GetReconciliation.ts b/src/funcs/reconciliationGetReconciliation.ts similarity index 94% rename from src/funcs/reconciliationV1GetReconciliation.ts rename to src/funcs/reconciliationGetReconciliation.ts index 1a5b8b86..ec1d788c 100644 --- a/src/funcs/reconciliationV1GetReconciliation.ts +++ b/src/funcs/reconciliationGetReconciliation.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get a reconciliation */ -export async function reconciliationV1GetReconciliation( +export async function reconciliationGetReconciliation( client: SDKCore, request: operations.GetReconciliationRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function reconciliationV1GetReconciliation( "/api/reconciliation/reconciliations/{reconciliationID}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getReconciliation", - oAuth2Scopes: ["auth:read", "reconciliation:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function reconciliationV1GetReconciliation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/reconciliationV1ListPolicies.ts b/src/funcs/reconciliationListPolicies.ts similarity index 94% rename from src/funcs/reconciliationV1ListPolicies.ts rename to src/funcs/reconciliationListPolicies.ts index 5dded622..9e2c2893 100644 --- a/src/funcs/reconciliationV1ListPolicies.ts +++ b/src/funcs/reconciliationListPolicies.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List policies */ -export async function reconciliationV1ListPolicies( +export async function reconciliationListPolicies( client: SDKCore, request: operations.ListPoliciesRequest, options?: RequestOptions, @@ -60,16 +61,16 @@ export async function reconciliationV1ListPolicies( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listPolicies", - oAuth2Scopes: ["auth:read", "reconciliation:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function reconciliationV1ListPolicies( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/reconciliationV1ListReconciliations.ts b/src/funcs/reconciliationListReconciliations.ts similarity index 94% rename from src/funcs/reconciliationV1ListReconciliations.ts rename to src/funcs/reconciliationListReconciliations.ts index 669e0565..872d3804 100644 --- a/src/funcs/reconciliationV1ListReconciliations.ts +++ b/src/funcs/reconciliationListReconciliations.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -25,7 +26,7 @@ import { Result } from "../sdk/types/fp.js"; /** * List reconciliations */ -export async function reconciliationV1ListReconciliations( +export async function reconciliationListReconciliations( client: SDKCore, request: operations.ListReconciliationsRequest, options?: RequestOptions, @@ -61,16 +62,16 @@ export async function reconciliationV1ListReconciliations( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listReconciliations", - oAuth2Scopes: ["auth:read", "reconciliation:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -84,6 +85,7 @@ export async function reconciliationV1ListReconciliations( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/reconciliationV1Reconcile.ts b/src/funcs/reconciliationReconcile.ts similarity index 94% rename from src/funcs/reconciliationV1Reconcile.ts rename to src/funcs/reconciliationReconcile.ts index dab00cd0..07a2e8a2 100644 --- a/src/funcs/reconciliationV1Reconcile.ts +++ b/src/funcs/reconciliationReconcile.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Reconcile using a policy */ -export async function reconciliationV1Reconcile( +export async function reconciliationReconcile( client: SDKCore, request: operations.ReconcileRequest, options?: RequestOptions, @@ -69,17 +70,17 @@ export async function reconciliationV1Reconcile( "/api/reconciliation/policies/{policyID}/reconciliation", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "reconcile", - oAuth2Scopes: ["auth:read", "reconciliation:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function reconciliationV1Reconcile( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/reconciliationV1ReconciliationgetServerInfo.ts b/src/funcs/reconciliationReconciliationgetServerInfo.ts similarity index 92% rename from src/funcs/reconciliationV1ReconciliationgetServerInfo.ts rename to src/funcs/reconciliationReconciliationgetServerInfo.ts index 67d39217..abecacda 100644 --- a/src/funcs/reconciliationV1ReconciliationgetServerInfo.ts +++ b/src/funcs/reconciliationReconciliationgetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -23,7 +24,7 @@ import { Result } from "../sdk/types/fp.js"; /** * Get server info */ -export async function reconciliationV1ReconciliationgetServerInfo( +export async function reconciliationReconciliationgetServerInfo( client: SDKCore, options?: RequestOptions, ): Promise< @@ -41,16 +42,16 @@ export async function reconciliationV1ReconciliationgetServerInfo( > { const path = pathToFunc("/api/reconciliation/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "reconciliationgetServerInfo", - oAuth2Scopes: ["auth:read", "reconciliation:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function reconciliationV1ReconciliationgetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/searchV1Search.ts b/src/funcs/searchSearch.ts similarity index 91% rename from src/funcs/searchV1Search.ts rename to src/funcs/searchSearch.ts index 543f2916..dc92ca38 100644 --- a/src/funcs/searchV1Search.ts +++ b/src/funcs/searchSearch.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -23,14 +24,12 @@ import * as shared from "../sdk/models/shared/index.js"; import { Result } from "../sdk/types/fp.js"; /** - * search.v1 + * Search * * @remarks - * Elasticsearch.v1 query engine - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + * ElasticSearch query engine */ -export async function searchV1Search( +export async function searchSearch( client: SDKCore, request: shared.Query, options?: RequestOptions, @@ -59,17 +58,17 @@ export async function searchV1Search( const path = pathToFunc("/api/search/")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "search", - oAuth2Scopes: ["auth:read", "search:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -83,6 +82,7 @@ export async function searchV1Search( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/searchV1SearchgetServerInfo.ts b/src/funcs/searchSearchgetServerInfo.ts similarity index 91% rename from src/funcs/searchV1SearchgetServerInfo.ts rename to src/funcs/searchSearchgetServerInfo.ts index ee53a2eb..bf0ecd84 100644 --- a/src/funcs/searchV1SearchgetServerInfo.ts +++ b/src/funcs/searchSearchgetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -21,10 +22,8 @@ import { Result } from "../sdk/types/fp.js"; /** * Get server info - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ -export async function searchV1SearchgetServerInfo( +export async function searchSearchgetServerInfo( client: SDKCore, options?: RequestOptions, ): Promise< @@ -41,16 +40,16 @@ export async function searchV1SearchgetServerInfo( > { const path = pathToFunc("/api/search/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "searchgetServerInfo", - oAuth2Scopes: ["auth:read", "search:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -64,6 +63,7 @@ export async function searchV1SearchgetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/walletsV1ConfirmHold.ts b/src/funcs/walletsV1ConfirmHold.ts index eaaf7146..e1a099d5 100644 --- a/src/funcs/walletsV1ConfirmHold.ts +++ b/src/funcs/walletsV1ConfirmHold.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,7 +65,7 @@ export async function walletsV1ConfirmHold( const path = pathToFunc("/api/wallets/holds/{hold_id}/confirm")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -72,14 +73,14 @@ export async function walletsV1ConfirmHold( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "confirmHold", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function walletsV1ConfirmHold( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1CreateBalance.ts b/src/funcs/walletsV1CreateBalance.ts index 7877e3de..82b51ef7 100644 --- a/src/funcs/walletsV1CreateBalance.ts +++ b/src/funcs/walletsV1CreateBalance.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,7 +65,7 @@ export async function walletsV1CreateBalance( const path = pathToFunc("/api/wallets/wallets/{id}/balances")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -72,14 +73,14 @@ export async function walletsV1CreateBalance( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createBalance", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function walletsV1CreateBalance( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1CreateWallet.ts b/src/funcs/walletsV1CreateWallet.ts index 265ed179..b3c10601 100644 --- a/src/funcs/walletsV1CreateWallet.ts +++ b/src/funcs/walletsV1CreateWallet.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -57,7 +58,7 @@ export async function walletsV1CreateWallet( const path = pathToFunc("/api/wallets/wallets")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -65,14 +66,14 @@ export async function walletsV1CreateWallet( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "createWallet", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function walletsV1CreateWallet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1CreditWallet.ts b/src/funcs/walletsV1CreditWallet.ts index 6cf04d17..7dfa2dc3 100644 --- a/src/funcs/walletsV1CreditWallet.ts +++ b/src/funcs/walletsV1CreditWallet.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,7 +65,7 @@ export async function walletsV1CreditWallet( const path = pathToFunc("/api/wallets/wallets/{id}/credit")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -72,14 +73,14 @@ export async function walletsV1CreditWallet( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "creditWallet", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function walletsV1CreditWallet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1DebitWallet.ts b/src/funcs/walletsV1DebitWallet.ts index 482e352f..4a460210 100644 --- a/src/funcs/walletsV1DebitWallet.ts +++ b/src/funcs/walletsV1DebitWallet.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -64,7 +65,7 @@ export async function walletsV1DebitWallet( const path = pathToFunc("/api/wallets/wallets/{id}/debit")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -72,14 +73,14 @@ export async function walletsV1DebitWallet( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "debitWallet", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function walletsV1DebitWallet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1GetBalance.ts b/src/funcs/walletsV1GetBalance.ts index 0887daa2..02d0dcf4 100644 --- a/src/funcs/walletsV1GetBalance.ts +++ b/src/funcs/walletsV1GetBalance.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -68,16 +69,16 @@ export async function walletsV1GetBalance( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getBalance", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function walletsV1GetBalance( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1GetHold.ts b/src/funcs/walletsV1GetHold.ts index dc9037f2..df8e5144 100644 --- a/src/funcs/walletsV1GetHold.ts +++ b/src/funcs/walletsV1GetHold.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function walletsV1GetHold( const path = pathToFunc("/api/wallets/holds/{holdID}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getHold", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function walletsV1GetHold( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1GetHolds.ts b/src/funcs/walletsV1GetHolds.ts index 3f6db386..5b9b6078 100644 --- a/src/funcs/walletsV1GetHolds.ts +++ b/src/funcs/walletsV1GetHolds.ts @@ -9,6 +9,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -70,16 +71,16 @@ export async function walletsV1GetHolds( }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getHolds", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -93,6 +94,7 @@ export async function walletsV1GetHolds( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/walletsV1GetTransactions.ts b/src/funcs/walletsV1GetTransactions.ts index 56082164..8dbce817 100644 --- a/src/funcs/walletsV1GetTransactions.ts +++ b/src/funcs/walletsV1GetTransactions.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -58,16 +59,16 @@ export async function walletsV1GetTransactions( "walletID": payload.walletID, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getTransactions", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -81,6 +82,7 @@ export async function walletsV1GetTransactions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/walletsV1GetWallet.ts b/src/funcs/walletsV1GetWallet.ts index 29a11422..501e8672 100644 --- a/src/funcs/walletsV1GetWallet.ts +++ b/src/funcs/walletsV1GetWallet.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function walletsV1GetWallet( const path = pathToFunc("/api/wallets/wallets/{id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getWallet", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function walletsV1GetWallet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1GetWalletSummary.ts b/src/funcs/walletsV1GetWalletSummary.ts index 03857a51..f991fb4e 100644 --- a/src/funcs/walletsV1GetWalletSummary.ts +++ b/src/funcs/walletsV1GetWalletSummary.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,16 +63,16 @@ export async function walletsV1GetWalletSummary( const path = pathToFunc("/api/wallets/wallets/{id}/summary")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getWalletSummary", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -85,6 +86,7 @@ export async function walletsV1GetWalletSummary( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1ListBalances.ts b/src/funcs/walletsV1ListBalances.ts index e94f1ec5..c8526401 100644 --- a/src/funcs/walletsV1ListBalances.ts +++ b/src/funcs/walletsV1ListBalances.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -60,16 +61,16 @@ export async function walletsV1ListBalances( const path = pathToFunc("/api/wallets/wallets/{id}/balances")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listBalances", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -83,6 +84,7 @@ export async function walletsV1ListBalances( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1ListWallets.ts b/src/funcs/walletsV1ListWallets.ts index dac10d5c..9893615e 100644 --- a/src/funcs/walletsV1ListWallets.ts +++ b/src/funcs/walletsV1ListWallets.ts @@ -9,6 +9,7 @@ import { queryJoin, } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -71,16 +72,16 @@ export async function walletsV1ListWallets( }), ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "listWallets", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -94,6 +95,7 @@ export async function walletsV1ListWallets( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/walletsV1UpdateWallet.ts b/src/funcs/walletsV1UpdateWallet.ts index 337cb0d5..68827474 100644 --- a/src/funcs/walletsV1UpdateWallet.ts +++ b/src/funcs/walletsV1UpdateWallet.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,7 +63,7 @@ export async function walletsV1UpdateWallet( const path = pathToFunc("/api/wallets/wallets/{id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": encodeSimple( @@ -70,14 +71,14 @@ export async function walletsV1UpdateWallet( payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "updateWallet", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function walletsV1UpdateWallet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PATCH", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1VoidHold.ts b/src/funcs/walletsV1VoidHold.ts index 88b9fa37..59bd7ec0 100644 --- a/src/funcs/walletsV1VoidHold.ts +++ b/src/funcs/walletsV1VoidHold.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -62,21 +63,21 @@ export async function walletsV1VoidHold( const path = pathToFunc("/api/wallets/holds/{hold_id}/void")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", "Idempotency-Key": encodeSimple( "Idempotency-Key", payload["Idempotency-Key"], { explode: false, charEncoding: "none" }, ), - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "voidHold", - oAuth2Scopes: ["auth:read", "wallets:write"], + oAuth2Scopes: ["ledger:read", "wallets:write"], resolvedSecurity: requestSecurity, @@ -90,6 +91,7 @@ export async function walletsV1VoidHold( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/walletsV1WalletsgetServerInfo.ts b/src/funcs/walletsV1WalletsgetServerInfo.ts index 7ac11650..cde4faba 100644 --- a/src/funcs/walletsV1WalletsgetServerInfo.ts +++ b/src/funcs/walletsV1WalletsgetServerInfo.ts @@ -4,6 +4,7 @@ import { SDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -41,16 +42,16 @@ export async function walletsV1WalletsgetServerInfo( > { const path = pathToFunc("/api/wallets/_info")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "walletsgetServerInfo", - oAuth2Scopes: ["auth:read", "wallets:read"], + oAuth2Scopes: ["ledger:read", "wallets:read"], resolvedSecurity: requestSecurity, @@ -64,6 +65,7 @@ export async function walletsV1WalletsgetServerInfo( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, diff --git a/src/funcs/webhooksV1ActivateConfig.ts b/src/funcs/webhooksActivateConfig.ts similarity index 94% rename from src/funcs/webhooksV1ActivateConfig.ts rename to src/funcs/webhooksActivateConfig.ts index 8fe84ccd..ab563ff4 100644 --- a/src/funcs/webhooksV1ActivateConfig.ts +++ b/src/funcs/webhooksActivateConfig.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Activate a webhooks config by ID, to start receiving webhooks to its endpoint. */ -export async function webhooksV1ActivateConfig( +export async function webhooksActivateConfig( client: SDKCore, request: operations.ActivateConfigRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function webhooksV1ActivateConfig( const path = pathToFunc("/api/webhooks/configs/{id}/activate")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "activateConfig", - oAuth2Scopes: ["auth:read", "webhooks:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function webhooksV1ActivateConfig( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/webhooksV1ChangeConfigSecret.ts b/src/funcs/webhooksChangeConfigSecret.ts similarity index 94% rename from src/funcs/webhooksV1ChangeConfigSecret.ts rename to src/funcs/webhooksChangeConfigSecret.ts index be566a83..1b1b9cbe 100644 --- a/src/funcs/webhooksV1ChangeConfigSecret.ts +++ b/src/funcs/webhooksChangeConfigSecret.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -31,7 +32,7 @@ import { Result } from "../sdk/types/fp.js"; * If not passed or empty, a secret is automatically generated. * The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) */ -export async function webhooksV1ChangeConfigSecret( +export async function webhooksChangeConfigSecret( client: SDKCore, request: operations.ChangeConfigSecretRequest, options?: RequestOptions, @@ -72,17 +73,17 @@ export async function webhooksV1ChangeConfigSecret( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "changeConfigSecret", - oAuth2Scopes: ["auth:read", "webhooks:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -96,6 +97,7 @@ export async function webhooksV1ChangeConfigSecret( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/webhooksV1DeactivateConfig.ts b/src/funcs/webhooksDeactivateConfig.ts similarity index 94% rename from src/funcs/webhooksV1DeactivateConfig.ts rename to src/funcs/webhooksDeactivateConfig.ts index 2e78d6b0..6cb74a9d 100644 --- a/src/funcs/webhooksV1DeactivateConfig.ts +++ b/src/funcs/webhooksDeactivateConfig.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. */ -export async function webhooksV1DeactivateConfig( +export async function webhooksDeactivateConfig( client: SDKCore, request: operations.DeactivateConfigRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function webhooksV1DeactivateConfig( const path = pathToFunc("/api/webhooks/configs/{id}/deactivate")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deactivateConfig", - oAuth2Scopes: ["auth:read", "webhooks:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function webhooksV1DeactivateConfig( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/webhooksV1DeleteConfig.ts b/src/funcs/webhooksDeleteConfig.ts similarity index 94% rename from src/funcs/webhooksV1DeleteConfig.ts rename to src/funcs/webhooksDeleteConfig.ts index 9cd32029..418c2e60 100644 --- a/src/funcs/webhooksV1DeleteConfig.ts +++ b/src/funcs/webhooksDeleteConfig.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Delete a webhooks config by ID. */ -export async function webhooksV1DeleteConfig( +export async function webhooksDeleteConfig( client: SDKCore, request: operations.DeleteConfigRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function webhooksV1DeleteConfig( const path = pathToFunc("/api/webhooks/configs/{id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "deleteConfig", - oAuth2Scopes: ["auth:read", "webhooks:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function webhooksV1DeleteConfig( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/webhooksV1GetManyConfigs.ts b/src/funcs/webhooksGetManyConfigs.ts similarity index 94% rename from src/funcs/webhooksV1GetManyConfigs.ts rename to src/funcs/webhooksGetManyConfigs.ts index f53a1bdb..7355432a 100644 --- a/src/funcs/webhooksV1GetManyConfigs.ts +++ b/src/funcs/webhooksGetManyConfigs.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Sorted by updated date descending */ -export async function webhooksV1GetManyConfigs( +export async function webhooksGetManyConfigs( client: SDKCore, request: operations.GetManyConfigsRequest, options?: RequestOptions, @@ -63,16 +64,16 @@ export async function webhooksV1GetManyConfigs( "id": payload.id, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "getManyConfigs", - oAuth2Scopes: ["auth:read", "webhooks:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -86,6 +87,7 @@ export async function webhooksV1GetManyConfigs( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, diff --git a/src/funcs/webhooksV1InsertConfig.ts b/src/funcs/webhooksInsertConfig.ts similarity index 94% rename from src/funcs/webhooksV1InsertConfig.ts rename to src/funcs/webhooksInsertConfig.ts index f0050c68..5db320db 100644 --- a/src/funcs/webhooksV1InsertConfig.ts +++ b/src/funcs/webhooksInsertConfig.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -37,7 +38,7 @@ import { Result } from "../sdk/types/fp.js"; * * All eventTypes are converted to lower-case when inserted. */ -export async function webhooksV1InsertConfig( +export async function webhooksInsertConfig( client: SDKCore, request: shared.ConfigUser, options?: RequestOptions, @@ -67,17 +68,17 @@ export async function webhooksV1InsertConfig( const path = pathToFunc("/api/webhooks/configs")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "insertConfig", - oAuth2Scopes: ["auth:read", "webhooks:write"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -91,6 +92,7 @@ export async function webhooksV1InsertConfig( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/funcs/webhooksV1TestConfig.ts b/src/funcs/webhooksTestConfig.ts similarity index 94% rename from src/funcs/webhooksV1TestConfig.ts rename to src/funcs/webhooksTestConfig.ts index 1349e52a..e2ee286f 100644 --- a/src/funcs/webhooksV1TestConfig.ts +++ b/src/funcs/webhooksTestConfig.ts @@ -5,6 +5,7 @@ import { SDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -28,7 +29,7 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Test a config by sending a webhook to its endpoint. */ -export async function webhooksV1TestConfig( +export async function webhooksTestConfig( client: SDKCore, request: operations.TestConfigRequest, options?: RequestOptions, @@ -65,16 +66,16 @@ export async function webhooksV1TestConfig( const path = pathToFunc("/api/webhooks/configs/{id}/test")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const securityInput = await extractSecurity(client._options.security); const requestSecurity = resolveGlobalSecurity(securityInput); const context = { operationID: "testConfig", - oAuth2Scopes: ["auth:read", "webhooks:read"], + oAuth2Scopes: ["ledger:read"], resolvedSecurity: requestSecurity, @@ -88,6 +89,7 @@ export async function webhooksV1TestConfig( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index f6061c5c..d4b6c62b 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -13,6 +13,7 @@ import { BeforeCreateRequestHook, BeforeRequestContext, BeforeRequestHook, + Hook, Hooks, SDKInitHook, SDKInitOptions, @@ -28,14 +29,27 @@ export class SDKHooks implements Hooks { afterErrorHooks: AfterErrorHook[] = []; constructor() { - [ + const presetHooks: Array = [ new ClientCredentialsHook(), - ].forEach(hook => { - this.registerSDKInitHook(hook); - this.registerBeforeRequestHook(hook); - this.registerAfterErrorHook(hook); - }); - + ]; + + for (const hook of presetHooks) { + if ("sdkInit" in hook) { + this.registerSDKInitHook(hook); + } + if ("beforeCreateRequest" in hook) { + this.registerBeforeCreateRequestHook(hook); + } + if ("beforeRequest" in hook) { + this.registerBeforeRequestHook(hook); + } + if ("afterSuccess" in hook) { + this.registerAfterSuccessHook(hook); + } + if ("afterError" in hook) { + this.registerAfterErrorHook(hook); + } + } initHooks(this); } diff --git a/src/hooks/types.ts b/src/hooks/types.ts index df5237dc..8a27c659 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -100,3 +100,10 @@ export interface Hooks { /** Registers a hook to be used by the SDK for the after error event. */ registerAfterErrorHook(hook: AfterErrorHook): void; } + +export type Hook = + | SDKInitHook + | BeforeCreateRequestHook + | BeforeRequestHook + | AfterSuccessHook + | AfterErrorHook; diff --git a/src/lib/config.ts b/src/lib/config.ts index 5446097c..fd1d24b7 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -94,9 +94,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", - openapiDocVersion: "v2.1.1", - sdkVersion: "3.3.0", - genVersion: "2.461.2", + openapiDocVersion: "v2.1.2", + sdkVersion: "3.4.0", + genVersion: "2.495.1", userAgent: - "speakeasy-sdk/typescript 3.3.0 2.461.2 v2.1.1 @formance/formance-sdk", + "speakeasy-sdk/typescript 3.4.0 2.495.1 v2.1.2 @formance/formance-sdk", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 44fa7284..25c9dcba 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -16,12 +16,16 @@ export function encodeMatrix( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -29,21 +33,25 @@ export function encodeMatrix( pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + const keyPrefix = encodeString(pk); tmp = `${keyPrefix}=${encValue}`; // trim trailing '=' if value was empty @@ -66,36 +74,40 @@ export function encodeLabel( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let encValue = ""; + let encValue: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `.${encodeString(k)}.${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; encValue = `${k}${encodeValue(pv)}`; } - out += `.${encValue}`; + out += encValue == null ? "" : `.${encValue}`; }); return out; @@ -105,7 +117,7 @@ type FormEncoder = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) => string; +) => string | undefined; function formEncoder(sep: string): FormEncoder { return ( @@ -118,6 +130,10 @@ function formEncoder(sep: string): FormEncoder { ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -128,20 +144,24 @@ function formEncoder(sep: string): FormEncoder { pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); } else if (isPlainObject(pv)) { encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; - }).join(encodedSep); + })?.join(encodedSep); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + tmp = `${encodeString(pk)}=${encValue}`; // If we end up with the nothing then skip forward @@ -180,7 +200,7 @@ export function encodeBodyForm( let tmp = ""; let encValue = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { encValue = JSON.stringify(pv, jsonReplacer); @@ -207,14 +227,14 @@ export function encodeDeepObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } if (!isPlainObject(value)) { throw new EncodingError( - `Value of parameter '${key}' which uses deepObject encoding must be an object`, + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, ); } @@ -225,9 +245,9 @@ export function encodeDeepObjectObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } let out = ""; @@ -241,7 +261,7 @@ export function encodeDeepObjectObject( } Object.entries(value).forEach(([ck, cv]) => { - if (cv === undefined) { + if (cv == null) { return; } @@ -250,19 +270,17 @@ export function encodeDeepObjectObject( if (isPlainObject(cv)) { const objOut = encodeDeepObjectObject(pk, cv, options); - out += `&${objOut}`; + out += objOut == null ? "" : `&${objOut}`; return; } const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; - let encoded = ""; - - encoded = mapDefined(pairs, (v) => { + const encoded = mapDefined(pairs, (v) => { return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; - }).join("&"); + })?.join("&"); - out += `&${encoded}`; + out += encoded == null ? "" : `&${encoded}`; }); return out.slice(1); @@ -272,9 +290,9 @@ export function encodeJSON( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (typeof value === "undefined") { - return ""; + return; } const encodeString = (v: string) => { @@ -290,40 +308,39 @@ export const encodeSimple = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string => { +): string | undefined => { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let tmp = ""; + let tmp: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - tmp = tmp.slice(1); + }); + tmp = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; tmp = `${k}${encodeValue(pv)}`; } - // If we end up with the nothing then skip forward - if (!tmp) { - return; - } - - out += `,${tmp}`; + out += tmp ? `,${tmp}` : ""; }); return out.slice(1); @@ -341,9 +358,7 @@ function explode(key: string, value: unknown): [string, unknown][] { } function serializeValue(value: unknown): string { - if (value === null) { - return "null"; - } else if (typeof value === "undefined") { + if (value == null) { return ""; } else if (value instanceof Date) { return value.toISOString(); @@ -364,14 +379,14 @@ function jsonReplacer(_: string, value: unknown): unknown { } } -function mapDefined(inp: T[], mapper: (v: T) => R): R[] { - return inp.reduce((acc, v) => { - if (v === undefined) { +function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { + const res = inp.reduce((acc, v) => { + if (v == null) { return acc; } const m = mapper(v); - if (m === undefined) { + if (m == null) { return acc; } @@ -379,30 +394,32 @@ function mapDefined(inp: T[], mapper: (v: T) => R): R[] { return acc; }, []); + + return res.length ? res : null; } function mapDefinedEntries( inp: Iterable<[K, V]>, mapper: (v: [K, V]) => R, -): R[] { +): R[] | null { const acc: R[] = []; for (const [k, v] of inp) { - if (v === undefined) { + if (v == null) { continue; } const m = mapper([k, v]); - if (m === undefined) { + if (m == null) { continue; } acc.push(m); } - return acc; + return acc.length ? acc : null; } -export function queryJoin(...args: string[]): string { +export function queryJoin(...args: (string | undefined)[]): string { return args.filter(Boolean).join("&"); } @@ -415,7 +432,7 @@ type QueryEncoder = ( key: string, value: unknown, options?: QueryEncoderOptions, -) => string; +) => string | undefined; type BulkQueryEncoder = ( values: Record, @@ -447,3 +464,20 @@ export const encodeFormQuery = queryEncoder(encodeForm); export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); + +export function appendForm( + fd: FormData, + key: string, + value: unknown, + fileName?: string, +): void { + if (value == null) { + return; + } else if (value instanceof Blob && fileName) { + fd.append(key, value, fileName); + } else if (value instanceof Blob) { + fd.append(key, value); + } else { + fd.append(key, String(value)); + } +} diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts index 48b28674..ce50b98a 100644 --- a/src/lib/primitives.ts +++ b/src/lib/primitives.ts @@ -58,3 +58,79 @@ export function remap< return out; } + +export function combineSignals( + ...signals: Array +): AbortSignal | null { + const filtered: AbortSignal[] = []; + for (const signal of signals) { + if (signal) { + filtered.push(signal); + } + } + + switch (filtered.length) { + case 0: + case 1: + return filtered[0] || null; + default: + if ("any" in AbortSignal && typeof AbortSignal.any === "function") { + return AbortSignal.any(filtered); + } + return abortSignalAny(filtered); + } +} + +export function abortSignalAny(signals: AbortSignal[]): AbortSignal { + const controller = new AbortController(); + const result = controller.signal; + if (!signals.length) { + return controller.signal; + } + + if (signals.length === 1) { + return signals[0] || controller.signal; + } + + for (const signal of signals) { + if (signal.aborted) { + return signal; + } + } + + function abort(this: AbortSignal) { + controller.abort(this.reason); + clean(); + } + + const signalRefs: WeakRef[] = []; + function clean() { + for (const signalRef of signalRefs) { + const signal = signalRef.deref(); + if (signal) { + signal.removeEventListener("abort", abort); + } + } + } + + for (const signal of signals) { + signalRefs.push(new WeakRef(signal)); + signal.addEventListener("abort", abort); + } + + return result; +} + +export function compactMap( + values: Record, +): Record { + const out: Record = {}; + + for (const [k, v] of Object.entries(values)) { + if (typeof v !== "undefined") { + out[k] = v; + } + } + + return out; +} diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index a2ad30da..6bfea6f6 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -57,6 +57,7 @@ export function collectExtraKeys< >( obj: ZodObject, extrasKey: K, + optional: boolean, ): ZodEffects< typeof obj, & output> @@ -81,6 +82,10 @@ export function collectExtraKeys< delete val[key]; } + if (optional && Object.keys(extras).length === 0) { + return val; + } + return { ...val, [extrasKey]: extras }; }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 14e2d937..8bfac635 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -41,6 +41,10 @@ export type RequestOptions = { * Specifies the status codes which should be retried using the given retry policy. */ retryCodes?: string[]; + /** + * Overrides the base server URL that will be used by an operation. + */ + serverURL?: string | URL; /** * Sets various request options on the `fetch` call made by an SDK method. * @@ -52,7 +56,7 @@ export type RequestOptions = { type RequestConfig = { method: string; path: string; - baseURL?: string | URL; + baseURL?: string | URL | undefined; query?: string; body?: RequestInit["body"]; headers?: HeadersInit; @@ -119,6 +123,7 @@ export class ClientSDK { const inputURL = new URL(path, reqURL); if (path) { + reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/"; reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); } @@ -126,7 +131,10 @@ export class ClientSDK { const secQuery: string[] = []; for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } } if (secQuery.length) { finalQuery += `&${secQuery.join("&")}`; diff --git a/src/lib/security.ts b/src/lib/security.ts index 33a2b61c..d3c9c327 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -115,7 +115,7 @@ export function resolveSecurity( ...options: SecurityInput[][] ): SecurityState | null { const state: SecurityState = { - basic: { username: "", password: "" }, + basic: {}, headers: {}, queryParams: {}, cookies: {}, diff --git a/src/sdk/auth.ts b/src/sdk/auth.ts index e698ed34..614afa9a 100644 --- a/src/sdk/auth.ts +++ b/src/sdk/auth.ts @@ -2,12 +2,159 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClientSDK } from "../lib/sdks.js"; -import { V1 } from "./v1.js"; +import { authCreateClient } from "../funcs/authCreateClient.js"; +import { authCreateSecret } from "../funcs/authCreateSecret.js"; +import { authDeleteClient } from "../funcs/authDeleteClient.js"; +import { authDeleteSecret } from "../funcs/authDeleteSecret.js"; +import { authGetServerInfo } from "../funcs/authGetServerInfo.js"; +import { authListClients } from "../funcs/authListClients.js"; +import { authListUsers } from "../funcs/authListUsers.js"; +import { authReadClient } from "../funcs/authReadClient.js"; +import { authReadUser } from "../funcs/authReadUser.js"; +import { authUpdateClient } from "../funcs/authUpdateClient.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; export class Auth extends ClientSDK { - private _v1?: V1; - get v1(): V1 { - return (this._v1 ??= new V1(this._options)); + /** + * Get server info + */ + async getServerInfo( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authGetServerInfo( + this, + options, + )); + } + + /** + * Create client + */ + async createClient( + request?: shared.CreateClientRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authCreateClient( + this, + request, + options, + )); + } + + /** + * Add a secret to a client + */ + async createSecret( + request: operations.CreateSecretRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authCreateSecret( + this, + request, + options, + )); + } + + /** + * Delete client + */ + async deleteClient( + request: operations.DeleteClientRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authDeleteClient( + this, + request, + options, + )); + } + + /** + * Delete a secret from a client + */ + async deleteSecret( + request: operations.DeleteSecretRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authDeleteSecret( + this, + request, + options, + )); + } + + /** + * List clients + */ + async listClients( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authListClients( + this, + options, + )); + } + + /** + * List users + * + * @remarks + * List users + */ + async listUsers( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authListUsers( + this, + options, + )); + } + + /** + * Read client + */ + async readClient( + request: operations.ReadClientRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authReadClient( + this, + request, + options, + )); + } + + /** + * Read user + * + * @remarks + * Read user + */ + async readUser( + request: operations.ReadUserRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authReadUser( + this, + request, + options, + )); + } + + /** + * Update client + */ + async updateClient( + request: operations.UpdateClientRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authUpdateClient( + this, + request, + options, + )); } } diff --git a/src/sdk/ledger.ts b/src/sdk/ledger.ts index 0e181a51..dbbe6d35 100644 --- a/src/sdk/ledger.ts +++ b/src/sdk/ledger.ts @@ -3,13 +3,13 @@ */ import { ClientSDK } from "../lib/sdks.js"; -import { Sdkv1 } from "./sdkv1.js"; +import { V1 } from "./v1.js"; import { V2 } from "./v2.js"; export class Ledger extends ClientSDK { - private _v1?: Sdkv1; - get v1(): Sdkv1 { - return (this._v1 ??= new Sdkv1(this._options)); + private _v1?: V1; + get v1(): V1 { + return (this._v1 ??= new V1(this._options)); } private _v2?: V2; diff --git a/src/sdk/orchestration.ts b/src/sdk/orchestration.ts index e1b43f58..27d9a020 100644 --- a/src/sdk/orchestration.ts +++ b/src/sdk/orchestration.ts @@ -2,18 +2,627 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClientSDK } from "../lib/sdks.js"; -import { SDKOrchestrationV1 } from "./sdkorchestrationv1.js"; -import { Sdkv2 } from "./sdkv2.js"; +import { orchestrationCancelEvent } from "../funcs/orchestrationCancelEvent.js"; +import { orchestrationCreateTrigger } from "../funcs/orchestrationCreateTrigger.js"; +import { orchestrationCreateWorkflow } from "../funcs/orchestrationCreateWorkflow.js"; +import { orchestrationDeleteTrigger } from "../funcs/orchestrationDeleteTrigger.js"; +import { orchestrationDeleteWorkflow } from "../funcs/orchestrationDeleteWorkflow.js"; +import { orchestrationGetInstance } from "../funcs/orchestrationGetInstance.js"; +import { orchestrationGetInstanceHistory } from "../funcs/orchestrationGetInstanceHistory.js"; +import { orchestrationGetInstanceStageHistory } from "../funcs/orchestrationGetInstanceStageHistory.js"; +import { orchestrationGetWorkflow } from "../funcs/orchestrationGetWorkflow.js"; +import { orchestrationListInstances } from "../funcs/orchestrationListInstances.js"; +import { orchestrationListTriggers } from "../funcs/orchestrationListTriggers.js"; +import { orchestrationListTriggersOccurrences } from "../funcs/orchestrationListTriggersOccurrences.js"; +import { orchestrationListWorkflows } from "../funcs/orchestrationListWorkflows.js"; +import { orchestrationOrchestrationgetServerInfo } from "../funcs/orchestrationOrchestrationgetServerInfo.js"; +import { orchestrationReadTrigger } from "../funcs/orchestrationReadTrigger.js"; +import { orchestrationRunWorkflow } from "../funcs/orchestrationRunWorkflow.js"; +import { orchestrationSendEvent } from "../funcs/orchestrationSendEvent.js"; +import { orchestrationTestTrigger } from "../funcs/orchestrationTestTrigger.js"; +import { orchestrationV2CancelEvent } from "../funcs/orchestrationV2CancelEvent.js"; +import { orchestrationV2CreateTrigger } from "../funcs/orchestrationV2CreateTrigger.js"; +import { orchestrationV2CreateWorkflow } from "../funcs/orchestrationV2CreateWorkflow.js"; +import { orchestrationV2DeleteTrigger } from "../funcs/orchestrationV2DeleteTrigger.js"; +import { orchestrationV2DeleteWorkflow } from "../funcs/orchestrationV2DeleteWorkflow.js"; +import { orchestrationV2GetInstance } from "../funcs/orchestrationV2GetInstance.js"; +import { orchestrationV2GetInstanceHistory } from "../funcs/orchestrationV2GetInstanceHistory.js"; +import { orchestrationV2GetInstanceStageHistory } from "../funcs/orchestrationV2GetInstanceStageHistory.js"; +import { orchestrationV2GetServerInfo } from "../funcs/orchestrationV2GetServerInfo.js"; +import { orchestrationV2GetWorkflow } from "../funcs/orchestrationV2GetWorkflow.js"; +import { orchestrationV2ListInstances } from "../funcs/orchestrationV2ListInstances.js"; +import { orchestrationV2ListTriggers } from "../funcs/orchestrationV2ListTriggers.js"; +import { orchestrationV2ListTriggersOccurrences } from "../funcs/orchestrationV2ListTriggersOccurrences.js"; +import { orchestrationV2ListWorkflows } from "../funcs/orchestrationV2ListWorkflows.js"; +import { orchestrationV2ReadTrigger } from "../funcs/orchestrationV2ReadTrigger.js"; +import { orchestrationV2RunWorkflow } from "../funcs/orchestrationV2RunWorkflow.js"; +import { orchestrationV2SendEvent } from "../funcs/orchestrationV2SendEvent.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; export class Orchestration extends ClientSDK { - private _v1?: SDKOrchestrationV1; - get v1(): SDKOrchestrationV1 { - return (this._v1 ??= new SDKOrchestrationV1(this._options)); + /** + * Cancel a running workflow + * + * @remarks + * Cancel a running workflow + */ + async cancelEvent( + request: operations.CancelEventRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationCancelEvent( + this, + request, + options, + )); } - private _v2?: Sdkv2; - get v2(): Sdkv2 { - return (this._v2 ??= new Sdkv2(this._options)); + /** + * Create trigger + * + * @remarks + * Create trigger + */ + async createTrigger( + request?: shared.TriggerData | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationCreateTrigger( + this, + request, + options, + )); + } + + /** + * Create workflow + * + * @remarks + * Create a workflow + */ + async createWorkflow( + request?: shared.CreateWorkflowRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationCreateWorkflow( + this, + request, + options, + )); + } + + /** + * Delete trigger + * + * @remarks + * Read trigger + */ + async deleteTrigger( + request: operations.DeleteTriggerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationDeleteTrigger( + this, + request, + options, + )); + } + + /** + * Delete a flow by id + * + * @remarks + * Delete a flow by id + */ + async deleteWorkflow( + request: operations.DeleteWorkflowRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationDeleteWorkflow( + this, + request, + options, + )); + } + + /** + * Get a workflow instance by id + * + * @remarks + * Get a workflow instance by id + */ + async getInstance( + request: operations.GetInstanceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationGetInstance( + this, + request, + options, + )); + } + + /** + * Get a workflow instance history by id + * + * @remarks + * Get a workflow instance history by id + */ + async getInstanceHistory( + request: operations.GetInstanceHistoryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationGetInstanceHistory( + this, + request, + options, + )); + } + + /** + * Get a workflow instance stage history + * + * @remarks + * Get a workflow instance stage history + */ + async getInstanceStageHistory( + request: operations.GetInstanceStageHistoryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationGetInstanceStageHistory( + this, + request, + options, + )); + } + + /** + * Get a flow by id + * + * @remarks + * Get a flow by id + */ + async getWorkflow( + request: operations.GetWorkflowRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationGetWorkflow( + this, + request, + options, + )); + } + + /** + * List instances of a workflow + * + * @remarks + * List instances of a workflow + */ + async listInstances( + request: operations.ListInstancesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationListInstances( + this, + request, + options, + )); + } + + /** + * List triggers + * + * @remarks + * List triggers + */ + async listTriggers( + request: operations.ListTriggersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationListTriggers( + this, + request, + options, + )); + } + + /** + * List triggers occurrences + * + * @remarks + * List triggers occurrences + */ + async listTriggersOccurrences( + request: operations.ListTriggersOccurrencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationListTriggersOccurrences( + this, + request, + options, + )); + } + + /** + * List registered workflows + * + * @remarks + * List registered workflows + */ + async listWorkflows( + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationListWorkflows( + this, + options, + )); + } + + /** + * Get server info + */ + async orchestrationgetServerInfo( + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationOrchestrationgetServerInfo( + this, + options, + )); + } + + /** + * Read trigger + * + * @remarks + * Read trigger + */ + async readTrigger( + request: operations.ReadTriggerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationReadTrigger( + this, + request, + options, + )); + } + + /** + * Run workflow + * + * @remarks + * Run workflow + */ + async runWorkflow( + request: operations.RunWorkflowRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationRunWorkflow( + this, + request, + options, + )); + } + + /** + * Send an event to a running workflow + * + * @remarks + * Send an event to a running workflow + */ + async sendEvent( + request: operations.SendEventRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationSendEvent( + this, + request, + options, + )); + } + + /** + * Test trigger + * + * @remarks + * Test trigger + */ + async testTrigger( + request: operations.TestTriggerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationTestTrigger( + this, + request, + options, + )); + } + + /** + * Cancel a running workflow + * + * @remarks + * Cancel a running workflow + */ + async v2CancelEvent( + request: operations.V2CancelEventRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2CancelEvent( + this, + request, + options, + )); + } + + /** + * Create trigger + * + * @remarks + * Create trigger + */ + async v2CreateTrigger( + request?: shared.V2TriggerData | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2CreateTrigger( + this, + request, + options, + )); + } + + /** + * Create workflow + * + * @remarks + * Create a workflow + */ + async v2CreateWorkflow( + request?: shared.V2CreateWorkflowRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2CreateWorkflow( + this, + request, + options, + )); + } + + /** + * Delete trigger + * + * @remarks + * Read trigger + */ + async v2DeleteTrigger( + request: operations.V2DeleteTriggerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2DeleteTrigger( + this, + request, + options, + )); + } + + /** + * Delete a flow by id + * + * @remarks + * Delete a flow by id + */ + async v2DeleteWorkflow( + request: operations.V2DeleteWorkflowRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2DeleteWorkflow( + this, + request, + options, + )); + } + + /** + * Get a workflow instance by id + * + * @remarks + * Get a workflow instance by id + */ + async v2GetInstance( + request: operations.V2GetInstanceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2GetInstance( + this, + request, + options, + )); + } + + /** + * Get a workflow instance history by id + * + * @remarks + * Get a workflow instance history by id + */ + async v2GetInstanceHistory( + request: operations.V2GetInstanceHistoryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2GetInstanceHistory( + this, + request, + options, + )); + } + + /** + * Get a workflow instance stage history + * + * @remarks + * Get a workflow instance stage history + */ + async v2GetInstanceStageHistory( + request: operations.V2GetInstanceStageHistoryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2GetInstanceStageHistory( + this, + request, + options, + )); + } + + /** + * Get server info + */ + async v2GetServerInfo( + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2GetServerInfo( + this, + options, + )); + } + + /** + * Get a flow by id + * + * @remarks + * Get a flow by id + */ + async v2GetWorkflow( + request: operations.V2GetWorkflowRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2GetWorkflow( + this, + request, + options, + )); + } + + /** + * List instances of a workflow + * + * @remarks + * List instances of a workflow + */ + async v2ListInstances( + request: operations.V2ListInstancesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2ListInstances( + this, + request, + options, + )); + } + + /** + * List triggers + * + * @remarks + * List triggers + */ + async v2ListTriggers( + request: operations.V2ListTriggersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2ListTriggers( + this, + request, + options, + )); + } + + /** + * List triggers occurrences + * + * @remarks + * List triggers occurrences + */ + async v2ListTriggersOccurrences( + request: operations.V2ListTriggersOccurrencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2ListTriggersOccurrences( + this, + request, + options, + )); + } + + /** + * List registered workflows + * + * @remarks + * List registered workflows + */ + async v2ListWorkflows( + request: operations.V2ListWorkflowsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2ListWorkflows( + this, + request, + options, + )); + } + + /** + * Read trigger + * + * @remarks + * Read trigger + */ + async v2ReadTrigger( + request: operations.V2ReadTriggerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2ReadTrigger( + this, + request, + options, + )); + } + + /** + * Run workflow + * + * @remarks + * Run workflow + */ + async v2RunWorkflow( + request: operations.V2RunWorkflowRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2RunWorkflow( + this, + request, + options, + )); + } + + /** + * Send an event to a running workflow + * + * @remarks + * Send an event to a running workflow + */ + async v2SendEvent( + request: operations.V2SendEventRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(orchestrationV2SendEvent( + this, + request, + options, + )); } } diff --git a/src/sdk/payments.ts b/src/sdk/payments.ts index ba43ce42..93a6fd80 100644 --- a/src/sdk/payments.ts +++ b/src/sdk/payments.ts @@ -2,12 +2,744 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClientSDK } from "../lib/sdks.js"; -import { SDKPaymentsV1 } from "./sdkpaymentsv1.js"; +import { paymentsAddAccountToPool } from "../funcs/paymentsAddAccountToPool.js"; +import { paymentsConnectorsTransfer } from "../funcs/paymentsConnectorsTransfer.js"; +import { paymentsCreateAccount } from "../funcs/paymentsCreateAccount.js"; +import { paymentsCreateBankAccount } from "../funcs/paymentsCreateBankAccount.js"; +import { paymentsCreatePayment } from "../funcs/paymentsCreatePayment.js"; +import { paymentsCreatePool } from "../funcs/paymentsCreatePool.js"; +import { paymentsCreateTransferInitiation } from "../funcs/paymentsCreateTransferInitiation.js"; +import { paymentsDeletePool } from "../funcs/paymentsDeletePool.js"; +import { paymentsDeleteTransferInitiation } from "../funcs/paymentsDeleteTransferInitiation.js"; +import { paymentsForwardBankAccount } from "../funcs/paymentsForwardBankAccount.js"; +import { paymentsGetAccountBalances } from "../funcs/paymentsGetAccountBalances.js"; +import { paymentsGetBankAccount } from "../funcs/paymentsGetBankAccount.js"; +import { paymentsGetConnectorTask } from "../funcs/paymentsGetConnectorTask.js"; +import { paymentsGetConnectorTaskV1 } from "../funcs/paymentsGetConnectorTaskV1.js"; +import { paymentsGetPayment } from "../funcs/paymentsGetPayment.js"; +import { paymentsGetPool } from "../funcs/paymentsGetPool.js"; +import { paymentsGetPoolBalances } from "../funcs/paymentsGetPoolBalances.js"; +import { paymentsGetTransferInitiation } from "../funcs/paymentsGetTransferInitiation.js"; +import { paymentsInstallConnector } from "../funcs/paymentsInstallConnector.js"; +import { paymentsListAllConnectors } from "../funcs/paymentsListAllConnectors.js"; +import { paymentsListBankAccounts } from "../funcs/paymentsListBankAccounts.js"; +import { paymentsListConfigsAvailableConnectors } from "../funcs/paymentsListConfigsAvailableConnectors.js"; +import { paymentsListConnectorTasks } from "../funcs/paymentsListConnectorTasks.js"; +import { paymentsListConnectorTasksV1 } from "../funcs/paymentsListConnectorTasksV1.js"; +import { paymentsListPayments } from "../funcs/paymentsListPayments.js"; +import { paymentsListPools } from "../funcs/paymentsListPools.js"; +import { paymentsListTransferInitiations } from "../funcs/paymentsListTransferInitiations.js"; +import { paymentsPaymentsgetAccount } from "../funcs/paymentsPaymentsgetAccount.js"; +import { paymentsPaymentsgetServerInfo } from "../funcs/paymentsPaymentsgetServerInfo.js"; +import { paymentsPaymentslistAccounts } from "../funcs/paymentsPaymentslistAccounts.js"; +import { paymentsReadConnectorConfig } from "../funcs/paymentsReadConnectorConfig.js"; +import { paymentsReadConnectorConfigV1 } from "../funcs/paymentsReadConnectorConfigV1.js"; +import { paymentsRemoveAccountFromPool } from "../funcs/paymentsRemoveAccountFromPool.js"; +import { paymentsResetConnector } from "../funcs/paymentsResetConnector.js"; +import { paymentsResetConnectorV1 } from "../funcs/paymentsResetConnectorV1.js"; +import { paymentsRetryTransferInitiation } from "../funcs/paymentsRetryTransferInitiation.js"; +import { paymentsReverseTransferInitiation } from "../funcs/paymentsReverseTransferInitiation.js"; +import { paymentsUdpateTransferInitiationStatus } from "../funcs/paymentsUdpateTransferInitiationStatus.js"; +import { paymentsUninstallConnector } from "../funcs/paymentsUninstallConnector.js"; +import { paymentsUninstallConnectorV1 } from "../funcs/paymentsUninstallConnectorV1.js"; +import { paymentsUpdateBankAccountMetadata } from "../funcs/paymentsUpdateBankAccountMetadata.js"; +import { paymentsUpdateConnectorConfigV1 } from "../funcs/paymentsUpdateConnectorConfigV1.js"; +import { paymentsUpdateMetadata } from "../funcs/paymentsUpdateMetadata.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; export class Payments extends ClientSDK { - private _v1?: SDKPaymentsV1; - get v1(): SDKPaymentsV1 { - return (this._v1 ??= new SDKPaymentsV1(this._options)); + /** + * Add an account to a pool + * + * @remarks + * Add an account to a pool + */ + async addAccountToPool( + request: operations.AddAccountToPoolRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsAddAccountToPool( + this, + request, + options, + )); + } + + /** + * Transfer funds between Connector accounts + * + * @remarks + * Execute a transfer between two accounts. + */ + async connectorsTransfer( + request: operations.ConnectorsTransferRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsConnectorsTransfer( + this, + request, + options, + )); + } + + /** + * Create an account + * + * @remarks + * Create an account + */ + async createAccount( + request: shared.AccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsCreateAccount( + this, + request, + options, + )); + } + + /** + * Create a BankAccount in Payments and on the PSP + * + * @remarks + * Create a bank account in Payments and on the PSP. + */ + async createBankAccount( + request: shared.BankAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsCreateBankAccount( + this, + request, + options, + )); + } + + /** + * Create a payment + * + * @remarks + * Create a payment + */ + async createPayment( + request: shared.PaymentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsCreatePayment( + this, + request, + options, + )); + } + + /** + * Create a Pool + * + * @remarks + * Create a Pool + */ + async createPool( + request: shared.PoolRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsCreatePool( + this, + request, + options, + )); + } + + /** + * Create a TransferInitiation + * + * @remarks + * Create a transfer initiation + */ + async createTransferInitiation( + request: shared.TransferInitiationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsCreateTransferInitiation( + this, + request, + options, + )); + } + + /** + * Delete a Pool + * + * @remarks + * Delete a pool by its id. + */ + async deletePool( + request: operations.DeletePoolRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsDeletePool( + this, + request, + options, + )); + } + + /** + * Delete a transfer initiation + * + * @remarks + * Delete a transfer initiation by its id. + */ + async deleteTransferInitiation( + request: operations.DeleteTransferInitiationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsDeleteTransferInitiation( + this, + request, + options, + )); + } + + /** + * Forward a bank account to a connector + */ + async forwardBankAccount( + request: operations.ForwardBankAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsForwardBankAccount( + this, + request, + options, + )); + } + + /** + * Get account balances + */ + async getAccountBalances( + request: operations.GetAccountBalancesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetAccountBalances( + this, + request, + options, + )); + } + + /** + * Get a bank account created by user on Formance + */ + async getBankAccount( + request: operations.GetBankAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetBankAccount( + this, + request, + options, + )); + } + + /** + * Read a specific task of the connector + * + * @remarks + * Get a specific task associated to the connector. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + async getConnectorTask( + request: operations.GetConnectorTaskRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetConnectorTask( + this, + request, + options, + )); + } + + /** + * Read a specific task of the connector + * + * @remarks + * Get a specific task associated to the connector. + */ + async getConnectorTaskV1( + request: operations.GetConnectorTaskV1Request, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetConnectorTaskV1( + this, + request, + options, + )); + } + + /** + * Get a payment + */ + async getPayment( + request: operations.GetPaymentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetPayment( + this, + request, + options, + )); + } + + /** + * Get a Pool + */ + async getPool( + request: operations.GetPoolRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetPool( + this, + request, + options, + )); + } + + /** + * Get pool balances + */ + async getPoolBalances( + request: operations.GetPoolBalancesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetPoolBalances( + this, + request, + options, + )); + } + + /** + * Get a transfer initiation + */ + async getTransferInitiation( + request: operations.GetTransferInitiationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsGetTransferInitiation( + this, + request, + options, + )); + } + + /** + * Install a connector + * + * @remarks + * Install a connector by its name and config. + */ + async installConnector( + request: operations.InstallConnectorRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsInstallConnector( + this, + request, + options, + )); + } + + /** + * List all installed connectors + * + * @remarks + * List all installed connectors. + */ + async listAllConnectors( + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListAllConnectors( + this, + options, + )); + } + + /** + * List bank accounts created by user on Formance + * + * @remarks + * List all bank accounts created by user on Formance. + */ + async listBankAccounts( + request: operations.ListBankAccountsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListBankAccounts( + this, + request, + options, + )); + } + + /** + * List the configs of each available connector + * + * @remarks + * List the configs of each available connector. + */ + async listConfigsAvailableConnectors( + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListConfigsAvailableConnectors( + this, + options, + )); + } + + /** + * List tasks from a connector + * + * @remarks + * List all tasks associated with this connector. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + async listConnectorTasks( + request: operations.ListConnectorTasksRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListConnectorTasks( + this, + request, + options, + )); + } + + /** + * List tasks from a connector + * + * @remarks + * List all tasks associated with this connector. + */ + async listConnectorTasksV1( + request: operations.ListConnectorTasksV1Request, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListConnectorTasksV1( + this, + request, + options, + )); + } + + /** + * List payments + */ + async listPayments( + request: operations.ListPaymentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListPayments( + this, + request, + options, + )); + } + + /** + * List Pools + */ + async listPools( + request: operations.ListPoolsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListPools( + this, + request, + options, + )); + } + + /** + * List Transfer Initiations + */ + async listTransferInitiations( + request: operations.ListTransferInitiationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsListTransferInitiations( + this, + request, + options, + )); + } + + /** + * Get an account + */ + async paymentsgetAccount( + request: operations.PaymentsgetAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsPaymentsgetAccount( + this, + request, + options, + )); + } + + /** + * Get server info + */ + async paymentsgetServerInfo( + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsPaymentsgetServerInfo( + this, + options, + )); + } + + /** + * List accounts + */ + async paymentslistAccounts( + request: operations.PaymentslistAccountsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsPaymentslistAccounts( + this, + request, + options, + )); + } + + /** + * Read the config of a connector + * + * @remarks + * Read connector config + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + async readConnectorConfig( + request: operations.ReadConnectorConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsReadConnectorConfig( + this, + request, + options, + )); + } + + /** + * Read the config of a connector + * + * @remarks + * Read connector config + */ + async readConnectorConfigV1( + request: operations.ReadConnectorConfigV1Request, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsReadConnectorConfigV1( + this, + request, + options, + )); + } + + /** + * Remove an account from a pool + * + * @remarks + * Remove an account from a pool by its id. + */ + async removeAccountFromPool( + request: operations.RemoveAccountFromPoolRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsRemoveAccountFromPool( + this, + request, + options, + )); + } + + /** + * Reset a connector + * + * @remarks + * Reset a connector by its name. + * It will remove the connector and ALL PAYMENTS generated with it. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + async resetConnector( + request: operations.ResetConnectorRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsResetConnector( + this, + request, + options, + )); + } + + /** + * Reset a connector + * + * @remarks + * Reset a connector by its name. + * It will remove the connector and ALL PAYMENTS generated with it. + */ + async resetConnectorV1( + request: operations.ResetConnectorV1Request, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsResetConnectorV1( + this, + request, + options, + )); + } + + /** + * Retry a failed transfer initiation + * + * @remarks + * Retry a failed transfer initiation + */ + async retryTransferInitiation( + request: operations.RetryTransferInitiationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsRetryTransferInitiation( + this, + request, + options, + )); + } + + /** + * Reverse a transfer initiation + * + * @remarks + * Reverse transfer initiation + */ + async reverseTransferInitiation( + request: operations.ReverseTransferInitiationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsReverseTransferInitiation( + this, + request, + options, + )); + } + + /** + * Update the status of a transfer initiation + * + * @remarks + * Update a transfer initiation status + */ + async udpateTransferInitiationStatus( + request: operations.UdpateTransferInitiationStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsUdpateTransferInitiationStatus( + this, + request, + options, + )); + } + + /** + * Uninstall a connector + * + * @remarks + * Uninstall a connector by its name. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + async uninstallConnector( + request: operations.UninstallConnectorRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsUninstallConnector( + this, + request, + options, + )); + } + + /** + * Uninstall a connector + * + * @remarks + * Uninstall a connector by its name. + */ + async uninstallConnectorV1( + request: operations.UninstallConnectorV1Request, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsUninstallConnectorV1( + this, + request, + options, + )); + } + + /** + * Update metadata of a bank account + */ + async updateBankAccountMetadata( + request: operations.UpdateBankAccountMetadataRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsUpdateBankAccountMetadata( + this, + request, + options, + )); + } + + /** + * Update the config of a connector + * + * @remarks + * Update connector config + */ + async updateConnectorConfigV1( + request: operations.UpdateConnectorConfigV1Request, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsUpdateConnectorConfigV1( + this, + request, + options, + )); + } + + /** + * Update metadata + */ + async updateMetadata( + request: operations.UpdateMetadataRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentsUpdateMetadata( + this, + request, + options, + )); } } diff --git a/src/sdk/reconciliation.ts b/src/sdk/reconciliation.ts index 56952442..075dc3fe 100644 --- a/src/sdk/reconciliation.ts +++ b/src/sdk/reconciliation.ts @@ -2,12 +2,136 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClientSDK } from "../lib/sdks.js"; -import { SDKReconciliationV1 } from "./sdkreconciliationv1.js"; +import { reconciliationCreatePolicy } from "../funcs/reconciliationCreatePolicy.js"; +import { reconciliationDeletePolicy } from "../funcs/reconciliationDeletePolicy.js"; +import { reconciliationGetPolicy } from "../funcs/reconciliationGetPolicy.js"; +import { reconciliationGetReconciliation } from "../funcs/reconciliationGetReconciliation.js"; +import { reconciliationListPolicies } from "../funcs/reconciliationListPolicies.js"; +import { reconciliationListReconciliations } from "../funcs/reconciliationListReconciliations.js"; +import { reconciliationReconcile } from "../funcs/reconciliationReconcile.js"; +import { reconciliationReconciliationgetServerInfo } from "../funcs/reconciliationReconciliationgetServerInfo.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; export class Reconciliation extends ClientSDK { - private _v1?: SDKReconciliationV1; - get v1(): SDKReconciliationV1 { - return (this._v1 ??= new SDKReconciliationV1(this._options)); + /** + * Create a policy + * + * @remarks + * Create a policy + */ + async createPolicy( + request: shared.PolicyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationCreatePolicy( + this, + request, + options, + )); + } + + /** + * Delete a policy + * + * @remarks + * Delete a policy by its id. + */ + async deletePolicy( + request: operations.DeletePolicyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationDeletePolicy( + this, + request, + options, + )); + } + + /** + * Get a policy + */ + async getPolicy( + request: operations.GetPolicyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationGetPolicy( + this, + request, + options, + )); + } + + /** + * Get a reconciliation + */ + async getReconciliation( + request: operations.GetReconciliationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationGetReconciliation( + this, + request, + options, + )); + } + + /** + * List policies + */ + async listPolicies( + request: operations.ListPoliciesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationListPolicies( + this, + request, + options, + )); + } + + /** + * List reconciliations + */ + async listReconciliations( + request: operations.ListReconciliationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationListReconciliations( + this, + request, + options, + )); + } + + /** + * Reconcile using a policy + * + * @remarks + * Reconcile using a policy + */ + async reconcile( + request: operations.ReconcileRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationReconcile( + this, + request, + options, + )); + } + + /** + * Get server info + */ + async reconciliationgetServerInfo( + options?: RequestOptions, + ): Promise { + return unwrapAsync(reconciliationReconciliationgetServerInfo( + this, + options, + )); } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index b550562f..bedc48be 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { getOIDCWellKnowns } from "../funcs/getOIDCWellKnowns.js"; import { getVersions } from "../funcs/getVersions.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { Auth } from "./auth.js"; @@ -56,6 +57,18 @@ export class SDK extends ClientSDK { return (this._webhooks ??= new Webhooks(this._options)); } + /** + * Retrieve OpenID connect well-knowns. + */ + async getOIDCWellKnowns( + options?: RequestOptions, + ): Promise { + return unwrapAsync(getOIDCWellKnowns( + this, + options, + )); + } + /** * Show stack version information */ diff --git a/src/sdk/sdkorchestrationv1.ts b/src/sdk/sdkorchestrationv1.ts deleted file mode 100644 index 7939faab..00000000 --- a/src/sdk/sdkorchestrationv1.ts +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { orchestrationV1CancelEvent } from "../funcs/orchestrationV1CancelEvent.js"; -import { orchestrationV1CreateTrigger } from "../funcs/orchestrationV1CreateTrigger.js"; -import { orchestrationV1CreateWorkflow } from "../funcs/orchestrationV1CreateWorkflow.js"; -import { orchestrationV1DeleteTrigger } from "../funcs/orchestrationV1DeleteTrigger.js"; -import { orchestrationV1DeleteWorkflow } from "../funcs/orchestrationV1DeleteWorkflow.js"; -import { orchestrationV1GetInstance } from "../funcs/orchestrationV1GetInstance.js"; -import { orchestrationV1GetInstanceHistory } from "../funcs/orchestrationV1GetInstanceHistory.js"; -import { orchestrationV1GetInstanceStageHistory } from "../funcs/orchestrationV1GetInstanceStageHistory.js"; -import { orchestrationV1GetWorkflow } from "../funcs/orchestrationV1GetWorkflow.js"; -import { orchestrationV1ListInstances } from "../funcs/orchestrationV1ListInstances.js"; -import { orchestrationV1ListTriggers } from "../funcs/orchestrationV1ListTriggers.js"; -import { orchestrationV1ListTriggersOccurrences } from "../funcs/orchestrationV1ListTriggersOccurrences.js"; -import { orchestrationV1ListWorkflows } from "../funcs/orchestrationV1ListWorkflows.js"; -import { orchestrationV1OrchestrationgetServerInfo } from "../funcs/orchestrationV1OrchestrationgetServerInfo.js"; -import { orchestrationV1ReadTrigger } from "../funcs/orchestrationV1ReadTrigger.js"; -import { orchestrationV1RunWorkflow } from "../funcs/orchestrationV1RunWorkflow.js"; -import { orchestrationV1SendEvent } from "../funcs/orchestrationV1SendEvent.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SDKOrchestrationV1 extends ClientSDK { - /** - * Cancel a running workflow - * - * @remarks - * Cancel a running workflow - */ - async cancelEvent( - request: operations.CancelEventRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1CancelEvent( - this, - request, - options, - )); - } - - /** - * Create trigger - * - * @remarks - * Create trigger - */ - async createTrigger( - request?: shared.TriggerData | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1CreateTrigger( - this, - request, - options, - )); - } - - /** - * Create workflow - * - * @remarks - * Create a workflow - */ - async createWorkflow( - request?: shared.CreateWorkflowRequest | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1CreateWorkflow( - this, - request, - options, - )); - } - - /** - * Delete trigger - * - * @remarks - * Read trigger - */ - async deleteTrigger( - request: operations.DeleteTriggerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1DeleteTrigger( - this, - request, - options, - )); - } - - /** - * Delete a flow by id - * - * @remarks - * Delete a flow by id - */ - async deleteWorkflow( - request: operations.DeleteWorkflowRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1DeleteWorkflow( - this, - request, - options, - )); - } - - /** - * Get a workflow instance by id - * - * @remarks - * Get a workflow instance by id - */ - async getInstance( - request: operations.GetInstanceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1GetInstance( - this, - request, - options, - )); - } - - /** - * Get a workflow instance history by id - * - * @remarks - * Get a workflow instance history by id - */ - async getInstanceHistory( - request: operations.GetInstanceHistoryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1GetInstanceHistory( - this, - request, - options, - )); - } - - /** - * Get a workflow instance stage history - * - * @remarks - * Get a workflow instance stage history - */ - async getInstanceStageHistory( - request: operations.GetInstanceStageHistoryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1GetInstanceStageHistory( - this, - request, - options, - )); - } - - /** - * Get a flow by id - * - * @remarks - * Get a flow by id - */ - async getWorkflow( - request: operations.GetWorkflowRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1GetWorkflow( - this, - request, - options, - )); - } - - /** - * List instances of a workflow - * - * @remarks - * List instances of a workflow - */ - async listInstances( - request: operations.ListInstancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1ListInstances( - this, - request, - options, - )); - } - - /** - * List triggers - * - * @remarks - * List triggers - */ - async listTriggers( - request: operations.ListTriggersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1ListTriggers( - this, - request, - options, - )); - } - - /** - * List triggers occurrences - * - * @remarks - * List triggers occurrences - */ - async listTriggersOccurrences( - request: operations.ListTriggersOccurrencesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1ListTriggersOccurrences( - this, - request, - options, - )); - } - - /** - * List registered workflows - * - * @remarks - * List registered workflows - */ - async listWorkflows( - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1ListWorkflows( - this, - options, - )); - } - - /** - * Get server info - */ - async orchestrationgetServerInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1OrchestrationgetServerInfo( - this, - options, - )); - } - - /** - * Read trigger - * - * @remarks - * Read trigger - */ - async readTrigger( - request: operations.ReadTriggerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1ReadTrigger( - this, - request, - options, - )); - } - - /** - * Run workflow - * - * @remarks - * Run workflow - */ - async runWorkflow( - request: operations.RunWorkflowRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1RunWorkflow( - this, - request, - options, - )); - } - - /** - * Send an event to a running workflow - * - * @remarks - * Send an event to a running workflow - */ - async sendEvent( - request: operations.SendEventRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV1SendEvent( - this, - request, - options, - )); - } -} diff --git a/src/sdk/sdkpaymentsv1.ts b/src/sdk/sdkpaymentsv1.ts deleted file mode 100644 index df249a15..00000000 --- a/src/sdk/sdkpaymentsv1.ts +++ /dev/null @@ -1,745 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { paymentsV1AddAccountToPool } from "../funcs/paymentsV1AddAccountToPool.js"; -import { paymentsV1ConnectorsTransfer } from "../funcs/paymentsV1ConnectorsTransfer.js"; -import { paymentsV1CreateAccount } from "../funcs/paymentsV1CreateAccount.js"; -import { paymentsV1CreateBankAccount } from "../funcs/paymentsV1CreateBankAccount.js"; -import { paymentsV1CreatePayment } from "../funcs/paymentsV1CreatePayment.js"; -import { paymentsV1CreatePool } from "../funcs/paymentsV1CreatePool.js"; -import { paymentsV1CreateTransferInitiation } from "../funcs/paymentsV1CreateTransferInitiation.js"; -import { paymentsV1DeletePool } from "../funcs/paymentsV1DeletePool.js"; -import { paymentsV1DeleteTransferInitiation } from "../funcs/paymentsV1DeleteTransferInitiation.js"; -import { paymentsV1ForwardBankAccount } from "../funcs/paymentsV1ForwardBankAccount.js"; -import { paymentsV1GetAccountBalances } from "../funcs/paymentsV1GetAccountBalances.js"; -import { paymentsV1GetBankAccount } from "../funcs/paymentsV1GetBankAccount.js"; -import { paymentsV1GetConnectorTask } from "../funcs/paymentsV1GetConnectorTask.js"; -import { paymentsV1GetConnectorTaskV1 } from "../funcs/paymentsV1GetConnectorTaskV1.js"; -import { paymentsV1GetPayment } from "../funcs/paymentsV1GetPayment.js"; -import { paymentsV1GetPool } from "../funcs/paymentsV1GetPool.js"; -import { paymentsV1GetPoolBalances } from "../funcs/paymentsV1GetPoolBalances.js"; -import { paymentsV1GetTransferInitiation } from "../funcs/paymentsV1GetTransferInitiation.js"; -import { paymentsV1InstallConnector } from "../funcs/paymentsV1InstallConnector.js"; -import { paymentsV1ListAllConnectors } from "../funcs/paymentsV1ListAllConnectors.js"; -import { paymentsV1ListBankAccounts } from "../funcs/paymentsV1ListBankAccounts.js"; -import { paymentsV1ListConfigsAvailableConnectors } from "../funcs/paymentsV1ListConfigsAvailableConnectors.js"; -import { paymentsV1ListConnectorTasks } from "../funcs/paymentsV1ListConnectorTasks.js"; -import { paymentsV1ListConnectorTasksV1 } from "../funcs/paymentsV1ListConnectorTasksV1.js"; -import { paymentsV1ListPayments } from "../funcs/paymentsV1ListPayments.js"; -import { paymentsV1ListPools } from "../funcs/paymentsV1ListPools.js"; -import { paymentsV1ListTransferInitiations } from "../funcs/paymentsV1ListTransferInitiations.js"; -import { paymentsV1PaymentsgetAccount } from "../funcs/paymentsV1PaymentsgetAccount.js"; -import { paymentsV1PaymentsgetServerInfo } from "../funcs/paymentsV1PaymentsgetServerInfo.js"; -import { paymentsV1PaymentslistAccounts } from "../funcs/paymentsV1PaymentslistAccounts.js"; -import { paymentsV1ReadConnectorConfig } from "../funcs/paymentsV1ReadConnectorConfig.js"; -import { paymentsV1ReadConnectorConfigV1 } from "../funcs/paymentsV1ReadConnectorConfigV1.js"; -import { paymentsV1RemoveAccountFromPool } from "../funcs/paymentsV1RemoveAccountFromPool.js"; -import { paymentsV1ResetConnector } from "../funcs/paymentsV1ResetConnector.js"; -import { paymentsV1ResetConnectorV1 } from "../funcs/paymentsV1ResetConnectorV1.js"; -import { paymentsV1RetryTransferInitiation } from "../funcs/paymentsV1RetryTransferInitiation.js"; -import { paymentsV1ReverseTransferInitiation } from "../funcs/paymentsV1ReverseTransferInitiation.js"; -import { paymentsV1UdpateTransferInitiationStatus } from "../funcs/paymentsV1UdpateTransferInitiationStatus.js"; -import { paymentsV1UninstallConnector } from "../funcs/paymentsV1UninstallConnector.js"; -import { paymentsV1UninstallConnectorV1 } from "../funcs/paymentsV1UninstallConnectorV1.js"; -import { paymentsV1UpdateBankAccountMetadata } from "../funcs/paymentsV1UpdateBankAccountMetadata.js"; -import { paymentsV1UpdateConnectorConfigV1 } from "../funcs/paymentsV1UpdateConnectorConfigV1.js"; -import { paymentsV1UpdateMetadata } from "../funcs/paymentsV1UpdateMetadata.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SDKPaymentsV1 extends ClientSDK { - /** - * Add an account to a pool - * - * @remarks - * Add an account to a pool - */ - async addAccountToPool( - request: operations.AddAccountToPoolRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1AddAccountToPool( - this, - request, - options, - )); - } - - /** - * Transfer funds between Connector accounts - * - * @remarks - * Execute a transfer between two accounts. - */ - async connectorsTransfer( - request: operations.ConnectorsTransferRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ConnectorsTransfer( - this, - request, - options, - )); - } - - /** - * Create an account - * - * @remarks - * Create an account - */ - async createAccount( - request: shared.AccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1CreateAccount( - this, - request, - options, - )); - } - - /** - * Create a BankAccount in Payments and on the PSP - * - * @remarks - * Create a bank account in Payments and on the PSP. - */ - async createBankAccount( - request: shared.BankAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1CreateBankAccount( - this, - request, - options, - )); - } - - /** - * Create a payment - * - * @remarks - * Create a payment - */ - async createPayment( - request: shared.PaymentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1CreatePayment( - this, - request, - options, - )); - } - - /** - * Create a Pool - * - * @remarks - * Create a Pool - */ - async createPool( - request: shared.PoolRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1CreatePool( - this, - request, - options, - )); - } - - /** - * Create a TransferInitiation - * - * @remarks - * Create a transfer initiation - */ - async createTransferInitiation( - request: shared.TransferInitiationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1CreateTransferInitiation( - this, - request, - options, - )); - } - - /** - * Delete a Pool - * - * @remarks - * Delete a pool by its id. - */ - async deletePool( - request: operations.DeletePoolRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1DeletePool( - this, - request, - options, - )); - } - - /** - * Delete a transfer initiation - * - * @remarks - * Delete a transfer initiation by its id. - */ - async deleteTransferInitiation( - request: operations.DeleteTransferInitiationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1DeleteTransferInitiation( - this, - request, - options, - )); - } - - /** - * Forward a bank account to a connector - */ - async forwardBankAccount( - request: operations.ForwardBankAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ForwardBankAccount( - this, - request, - options, - )); - } - - /** - * Get account balances - */ - async getAccountBalances( - request: operations.GetAccountBalancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetAccountBalances( - this, - request, - options, - )); - } - - /** - * Get a bank account created by user on Formance - */ - async getBankAccount( - request: operations.GetBankAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetBankAccount( - this, - request, - options, - )); - } - - /** - * Read a specific task of the connector - * - * @remarks - * Get a specific task associated to the connector. - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async getConnectorTask( - request: operations.GetConnectorTaskRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetConnectorTask( - this, - request, - options, - )); - } - - /** - * Read a specific task of the connector - * - * @remarks - * Get a specific task associated to the connector. - */ - async getConnectorTaskV1( - request: operations.GetConnectorTaskV1Request, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetConnectorTaskV1( - this, - request, - options, - )); - } - - /** - * Get a payment - */ - async getPayment( - request: operations.GetPaymentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetPayment( - this, - request, - options, - )); - } - - /** - * Get a Pool - */ - async getPool( - request: operations.GetPoolRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetPool( - this, - request, - options, - )); - } - - /** - * Get pool balances - */ - async getPoolBalances( - request: operations.GetPoolBalancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetPoolBalances( - this, - request, - options, - )); - } - - /** - * Get a transfer initiation - */ - async getTransferInitiation( - request: operations.GetTransferInitiationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1GetTransferInitiation( - this, - request, - options, - )); - } - - /** - * Install a connector - * - * @remarks - * Install a connector by its name and config. - */ - async installConnector( - request: operations.InstallConnectorRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1InstallConnector( - this, - request, - options, - )); - } - - /** - * List all installed connectors - * - * @remarks - * List all installed connectors. - */ - async listAllConnectors( - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListAllConnectors( - this, - options, - )); - } - - /** - * List bank accounts created by user on Formance - * - * @remarks - * List all bank accounts created by user on Formance. - */ - async listBankAccounts( - request: operations.ListBankAccountsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListBankAccounts( - this, - request, - options, - )); - } - - /** - * List the configs of each available connector - * - * @remarks - * List the configs of each available connector. - */ - async listConfigsAvailableConnectors( - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListConfigsAvailableConnectors( - this, - options, - )); - } - - /** - * List tasks from a connector - * - * @remarks - * List all tasks associated with this connector. - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async listConnectorTasks( - request: operations.ListConnectorTasksRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListConnectorTasks( - this, - request, - options, - )); - } - - /** - * List tasks from a connector - * - * @remarks - * List all tasks associated with this connector. - */ - async listConnectorTasksV1( - request: operations.ListConnectorTasksV1Request, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListConnectorTasksV1( - this, - request, - options, - )); - } - - /** - * List payments - */ - async listPayments( - request: operations.ListPaymentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListPayments( - this, - request, - options, - )); - } - - /** - * List Pools - */ - async listPools( - request: operations.ListPoolsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListPools( - this, - request, - options, - )); - } - - /** - * List Transfer Initiations - */ - async listTransferInitiations( - request: operations.ListTransferInitiationsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ListTransferInitiations( - this, - request, - options, - )); - } - - /** - * Get an account - */ - async paymentsgetAccount( - request: operations.PaymentsgetAccountRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1PaymentsgetAccount( - this, - request, - options, - )); - } - - /** - * Get server info - */ - async paymentsgetServerInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1PaymentsgetServerInfo( - this, - options, - )); - } - - /** - * List accounts - */ - async paymentslistAccounts( - request: operations.PaymentslistAccountsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1PaymentslistAccounts( - this, - request, - options, - )); - } - - /** - * Read the config of a connector - * - * @remarks - * Read connector config - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async readConnectorConfig( - request: operations.ReadConnectorConfigRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ReadConnectorConfig( - this, - request, - options, - )); - } - - /** - * Read the config of a connector - * - * @remarks - * Read connector config - */ - async readConnectorConfigV1( - request: operations.ReadConnectorConfigV1Request, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ReadConnectorConfigV1( - this, - request, - options, - )); - } - - /** - * Remove an account from a pool - * - * @remarks - * Remove an account from a pool by its id. - */ - async removeAccountFromPool( - request: operations.RemoveAccountFromPoolRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1RemoveAccountFromPool( - this, - request, - options, - )); - } - - /** - * Reset a connector - * - * @remarks - * Reset a connector by its name. - * It will remove the connector and ALL PAYMENTS generated with it. - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async resetConnector( - request: operations.ResetConnectorRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ResetConnector( - this, - request, - options, - )); - } - - /** - * Reset a connector - * - * @remarks - * Reset a connector by its name. - * It will remove the connector and ALL PAYMENTS generated with it. - */ - async resetConnectorV1( - request: operations.ResetConnectorV1Request, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ResetConnectorV1( - this, - request, - options, - )); - } - - /** - * Retry a failed transfer initiation - * - * @remarks - * Retry a failed transfer initiation - */ - async retryTransferInitiation( - request: operations.RetryTransferInitiationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1RetryTransferInitiation( - this, - request, - options, - )); - } - - /** - * Reverse a transfer initiation - * - * @remarks - * Reverse transfer initiation - */ - async reverseTransferInitiation( - request: operations.ReverseTransferInitiationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1ReverseTransferInitiation( - this, - request, - options, - )); - } - - /** - * Update the status of a transfer initiation - * - * @remarks - * Update a transfer initiation status - */ - async udpateTransferInitiationStatus( - request: operations.UdpateTransferInitiationStatusRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1UdpateTransferInitiationStatus( - this, - request, - options, - )); - } - - /** - * Uninstall a connector - * - * @remarks - * Uninstall a connector by its name. - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async uninstallConnector( - request: operations.UninstallConnectorRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1UninstallConnector( - this, - request, - options, - )); - } - - /** - * Uninstall a connector - * - * @remarks - * Uninstall a connector by its name. - */ - async uninstallConnectorV1( - request: operations.UninstallConnectorV1Request, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1UninstallConnectorV1( - this, - request, - options, - )); - } - - /** - * Update metadata of a bank account - */ - async updateBankAccountMetadata( - request: operations.UpdateBankAccountMetadataRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1UpdateBankAccountMetadata( - this, - request, - options, - )); - } - - /** - * Update the config of a connector - * - * @remarks - * Update connector config - */ - async updateConnectorConfigV1( - request: operations.UpdateConnectorConfigV1Request, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1UpdateConnectorConfigV1( - this, - request, - options, - )); - } - - /** - * Update metadata - */ - async updateMetadata( - request: operations.UpdateMetadataRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(paymentsV1UpdateMetadata( - this, - request, - options, - )); - } -} diff --git a/src/sdk/sdkreconciliationv1.ts b/src/sdk/sdkreconciliationv1.ts deleted file mode 100644 index 13313020..00000000 --- a/src/sdk/sdkreconciliationv1.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { reconciliationV1CreatePolicy } from "../funcs/reconciliationV1CreatePolicy.js"; -import { reconciliationV1DeletePolicy } from "../funcs/reconciliationV1DeletePolicy.js"; -import { reconciliationV1GetPolicy } from "../funcs/reconciliationV1GetPolicy.js"; -import { reconciliationV1GetReconciliation } from "../funcs/reconciliationV1GetReconciliation.js"; -import { reconciliationV1ListPolicies } from "../funcs/reconciliationV1ListPolicies.js"; -import { reconciliationV1ListReconciliations } from "../funcs/reconciliationV1ListReconciliations.js"; -import { reconciliationV1Reconcile } from "../funcs/reconciliationV1Reconcile.js"; -import { reconciliationV1ReconciliationgetServerInfo } from "../funcs/reconciliationV1ReconciliationgetServerInfo.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SDKReconciliationV1 extends ClientSDK { - /** - * Create a policy - * - * @remarks - * Create a policy - */ - async createPolicy( - request: shared.PolicyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1CreatePolicy( - this, - request, - options, - )); - } - - /** - * Delete a policy - * - * @remarks - * Delete a policy by its id. - */ - async deletePolicy( - request: operations.DeletePolicyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1DeletePolicy( - this, - request, - options, - )); - } - - /** - * Get a policy - */ - async getPolicy( - request: operations.GetPolicyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1GetPolicy( - this, - request, - options, - )); - } - - /** - * Get a reconciliation - */ - async getReconciliation( - request: operations.GetReconciliationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1GetReconciliation( - this, - request, - options, - )); - } - - /** - * List policies - */ - async listPolicies( - request: operations.ListPoliciesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1ListPolicies( - this, - request, - options, - )); - } - - /** - * List reconciliations - */ - async listReconciliations( - request: operations.ListReconciliationsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1ListReconciliations( - this, - request, - options, - )); - } - - /** - * Reconcile using a policy - * - * @remarks - * Reconcile using a policy - */ - async reconcile( - request: operations.ReconcileRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1Reconcile( - this, - request, - options, - )); - } - - /** - * Get server info - */ - async reconciliationgetServerInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(reconciliationV1ReconciliationgetServerInfo( - this, - options, - )); - } -} diff --git a/src/sdk/sdksearchv1.ts b/src/sdk/sdksearchv1.ts deleted file mode 100644 index f7870feb..00000000 --- a/src/sdk/sdksearchv1.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { searchV1Search } from "../funcs/searchV1Search.js"; -import { searchV1SearchgetServerInfo } from "../funcs/searchV1SearchgetServerInfo.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SDKSearchV1 extends ClientSDK { - /** - * search.v1 - * - * @remarks - * Elasticsearch.v1 query engine - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async search( - request: shared.Query, - options?: RequestOptions, - ): Promise { - return unwrapAsync(searchV1Search( - this, - request, - options, - )); - } - - /** - * Get server info - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async searchgetServerInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(searchV1SearchgetServerInfo( - this, - options, - )); - } -} diff --git a/src/sdk/sdkv1.ts b/src/sdk/sdkv1.ts index 63de77f7..9897ee9a 100644 --- a/src/sdk/sdkv1.ts +++ b/src/sdk/sdkv1.ts @@ -2,39 +2,35 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ledgerV1AddMetadataOnTransaction } from "../funcs/ledgerV1AddMetadataOnTransaction.js"; -import { ledgerV1AddMetadataToAccount } from "../funcs/ledgerV1AddMetadataToAccount.js"; -import { ledgerV1CountAccounts } from "../funcs/ledgerV1CountAccounts.js"; -import { ledgerV1CountTransactions } from "../funcs/ledgerV1CountTransactions.js"; -import { ledgerV1CreateTransaction } from "../funcs/ledgerV1CreateTransaction.js"; -import { ledgerV1CreateTransactions } from "../funcs/ledgerV1CreateTransactions.js"; -import { ledgerV1GetAccount } from "../funcs/ledgerV1GetAccount.js"; -import { ledgerV1GetBalances } from "../funcs/ledgerV1GetBalances.js"; -import { ledgerV1GetBalancesAggregated } from "../funcs/ledgerV1GetBalancesAggregated.js"; -import { ledgerV1GetInfo } from "../funcs/ledgerV1GetInfo.js"; -import { ledgerV1GetLedgerInfo } from "../funcs/ledgerV1GetLedgerInfo.js"; -import { ledgerV1GetMapping } from "../funcs/ledgerV1GetMapping.js"; -import { ledgerV1GetTransaction } from "../funcs/ledgerV1GetTransaction.js"; -import { ledgerV1ListAccounts } from "../funcs/ledgerV1ListAccounts.js"; -import { ledgerV1ListLogs } from "../funcs/ledgerV1ListLogs.js"; -import { ledgerV1ListTransactions } from "../funcs/ledgerV1ListTransactions.js"; -import { ledgerV1ReadStats } from "../funcs/ledgerV1ReadStats.js"; -import { ledgerV1RevertTransaction } from "../funcs/ledgerV1RevertTransaction.js"; -import { ledgerV1RunScript } from "../funcs/ledgerV1RunScript.js"; -import { ledgerV1UpdateMapping } from "../funcs/ledgerV1UpdateMapping.js"; +import { walletsV1ConfirmHold } from "../funcs/walletsV1ConfirmHold.js"; +import { walletsV1CreateBalance } from "../funcs/walletsV1CreateBalance.js"; +import { walletsV1CreateWallet } from "../funcs/walletsV1CreateWallet.js"; +import { walletsV1CreditWallet } from "../funcs/walletsV1CreditWallet.js"; +import { walletsV1DebitWallet } from "../funcs/walletsV1DebitWallet.js"; +import { walletsV1GetBalance } from "../funcs/walletsV1GetBalance.js"; +import { walletsV1GetHold } from "../funcs/walletsV1GetHold.js"; +import { walletsV1GetHolds } from "../funcs/walletsV1GetHolds.js"; +import { walletsV1GetTransactions } from "../funcs/walletsV1GetTransactions.js"; +import { walletsV1GetWallet } from "../funcs/walletsV1GetWallet.js"; +import { walletsV1GetWalletSummary } from "../funcs/walletsV1GetWalletSummary.js"; +import { walletsV1ListBalances } from "../funcs/walletsV1ListBalances.js"; +import { walletsV1ListWallets } from "../funcs/walletsV1ListWallets.js"; +import { walletsV1UpdateWallet } from "../funcs/walletsV1UpdateWallet.js"; +import { walletsV1VoidHold } from "../funcs/walletsV1VoidHold.js"; +import { walletsV1WalletsgetServerInfo } from "../funcs/walletsV1WalletsgetServerInfo.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Sdkv1 extends ClientSDK { /** - * Create a new batch of transactions to a ledger + * Confirm a hold */ - async createTransactions( - request: operations.CreateTransactionsRequest, + async confirmHold( + request: operations.ConfirmHoldRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1CreateTransactions( + ): Promise { + return unwrapAsync(walletsV1ConfirmHold( this, request, options, @@ -42,13 +38,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Set the metadata of a transaction by its ID + * Create a balance */ - async addMetadataOnTransaction( - request: operations.AddMetadataOnTransactionRequest, + async createBalance( + request: operations.CreateBalanceRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1AddMetadataOnTransaction( + ): Promise { + return unwrapAsync(walletsV1CreateBalance( this, request, options, @@ -56,13 +52,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Add metadata to an account + * Create a new wallet */ - async addMetadataToAccount( - request: operations.AddMetadataToAccountRequest, + async createWallet( + request: operations.CreateWalletRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1AddMetadataToAccount( + ): Promise { + return unwrapAsync(walletsV1CreateWallet( this, request, options, @@ -70,13 +66,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Count the accounts from a ledger + * Credit a wallet */ - async countAccounts( - request: operations.CountAccountsRequest, + async creditWallet( + request: operations.CreditWalletRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1CountAccounts( + ): Promise { + return unwrapAsync(walletsV1CreditWallet( this, request, options, @@ -84,13 +80,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Count the transactions from a ledger + * Debit a wallet */ - async countTransactions( - request: operations.CountTransactionsRequest, + async debitWallet( + request: operations.DebitWalletRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1CountTransactions( + ): Promise { + return unwrapAsync(walletsV1DebitWallet( this, request, options, @@ -98,13 +94,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Create a new transaction to a ledger + * Get detailed balance */ - async createTransaction( - request: operations.CreateTransactionRequest, + async getBalance( + request: operations.GetBalanceRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1CreateTransaction( + ): Promise { + return unwrapAsync(walletsV1GetBalance( this, request, options, @@ -112,13 +108,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Get account by its address + * Get a hold */ - async getAccount( - request: operations.GetAccountRequest, + async getHold( + request: operations.GetHoldRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetAccount( + ): Promise { + return unwrapAsync(walletsV1GetHold( this, request, options, @@ -126,53 +122,24 @@ export class Sdkv1 extends ClientSDK { } /** - * Get the balances from a ledger's account + * Get all holds for a wallet */ - async getBalances( - request: operations.GetBalancesRequest, + async getHolds( + request: operations.GetHoldsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetBalances( + ): Promise { + return unwrapAsync(walletsV1GetHolds( this, request, options, )); } - /** - * Get the aggregated balances from selected accounts - */ - async getBalancesAggregated( - request: operations.GetBalancesAggregatedRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetBalancesAggregated( - this, - request, - options, - )); - } - - /** - * Show server information - */ - async getInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetInfo( - this, - options, - )); - } - - /** - * Get information about a ledger - */ - async getLedgerInfo( - request: operations.GetLedgerInfoRequest, + async getTransactions( + request: operations.GetTransactionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetLedgerInfo( + ): Promise { + return unwrapAsync(walletsV1GetTransactions( this, request, options, @@ -180,13 +147,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Get the mapping of a ledger + * Get a wallet */ - async getMapping( - request: operations.GetMappingRequest, + async getWallet( + request: operations.GetWalletRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetMapping( + ): Promise { + return unwrapAsync(walletsV1GetWallet( this, request, options, @@ -194,13 +161,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Get transaction from a ledger by its ID + * Get wallet summary */ - async getTransaction( - request: operations.GetTransactionRequest, + async getWalletSummary( + request: operations.GetWalletSummaryRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1GetTransaction( + ): Promise { + return unwrapAsync(walletsV1GetWalletSummary( this, request, options, @@ -208,16 +175,13 @@ export class Sdkv1 extends ClientSDK { } /** - * List accounts from a ledger - * - * @remarks - * List accounts from a ledger, sorted by address in descending order. + * List balances of a wallet */ - async listAccounts( - request: operations.ListAccountsRequest, + async listBalances( + request: operations.ListBalancesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1ListAccounts( + ): Promise { + return unwrapAsync(walletsV1ListBalances( this, request, options, @@ -225,16 +189,13 @@ export class Sdkv1 extends ClientSDK { } /** - * List the logs from a ledger - * - * @remarks - * List the logs from a ledger, sorted by ID in descending order. + * List all wallets */ - async listLogs( - request: operations.ListLogsRequest, + async listWallets( + request: operations.ListWalletsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1ListLogs( + ): Promise { + return unwrapAsync(walletsV1ListWallets( this, request, options, @@ -242,16 +203,13 @@ export class Sdkv1 extends ClientSDK { } /** - * List transactions from a ledger - * - * @remarks - * List transactions from a ledger, sorted by txid in descending order. + * Update a wallet */ - async listTransactions( - request: operations.ListTransactionsRequest, + async updateWallet( + request: operations.UpdateWalletRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1ListTransactions( + ): Promise { + return unwrapAsync(walletsV1UpdateWallet( this, request, options, @@ -259,16 +217,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Get statistics from a ledger - * - * @remarks - * Get statistics from a ledger. (aggregate metrics on accounts and transactions) + * Cancel a hold */ - async readStats( - request: operations.ReadStatsRequest, + async voidHold( + request: operations.VoidHoldRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1ReadStats( + ): Promise { + return unwrapAsync(walletsV1VoidHold( this, request, options, @@ -276,48 +231,13 @@ export class Sdkv1 extends ClientSDK { } /** - * Revert a ledger transaction by its ID + * Get server info */ - async revertTransaction( - request: operations.RevertTransactionRequest, + async walletsgetServerInfo( options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1RevertTransaction( + ): Promise { + return unwrapAsync(walletsV1WalletsgetServerInfo( this, - request, - options, - )); - } - - /** - * Execute a Numscript - * - * @remarks - * This route is deprecated, and has been merged into `POST /{ledger}/transactions`. - * - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - async runScript( - request: operations.RunScriptRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1RunScript( - this, - request, - options, - )); - } - - /** - * Update the mapping of a ledger - */ - async updateMapping( - request: operations.UpdateMappingRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ledgerV1UpdateMapping( - this, - request, options, )); } diff --git a/src/sdk/sdkv2.ts b/src/sdk/sdkv2.ts deleted file mode 100644 index f9e67ee5..00000000 --- a/src/sdk/sdkv2.ts +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { orchestrationV2CancelEvent } from "../funcs/orchestrationV2CancelEvent.js"; -import { orchestrationV2CreateTrigger } from "../funcs/orchestrationV2CreateTrigger.js"; -import { orchestrationV2CreateWorkflow } from "../funcs/orchestrationV2CreateWorkflow.js"; -import { orchestrationV2DeleteTrigger } from "../funcs/orchestrationV2DeleteTrigger.js"; -import { orchestrationV2DeleteWorkflow } from "../funcs/orchestrationV2DeleteWorkflow.js"; -import { orchestrationV2GetInstance } from "../funcs/orchestrationV2GetInstance.js"; -import { orchestrationV2GetInstanceHistory } from "../funcs/orchestrationV2GetInstanceHistory.js"; -import { orchestrationV2GetInstanceStageHistory } from "../funcs/orchestrationV2GetInstanceStageHistory.js"; -import { orchestrationV2GetServerInfo } from "../funcs/orchestrationV2GetServerInfo.js"; -import { orchestrationV2GetWorkflow } from "../funcs/orchestrationV2GetWorkflow.js"; -import { orchestrationV2ListInstances } from "../funcs/orchestrationV2ListInstances.js"; -import { orchestrationV2ListTriggers } from "../funcs/orchestrationV2ListTriggers.js"; -import { orchestrationV2ListTriggersOccurrences } from "../funcs/orchestrationV2ListTriggersOccurrences.js"; -import { orchestrationV2ListWorkflows } from "../funcs/orchestrationV2ListWorkflows.js"; -import { orchestrationV2ReadTrigger } from "../funcs/orchestrationV2ReadTrigger.js"; -import { orchestrationV2RunWorkflow } from "../funcs/orchestrationV2RunWorkflow.js"; -import { orchestrationV2SendEvent } from "../funcs/orchestrationV2SendEvent.js"; -import { orchestrationV2TestTrigger } from "../funcs/orchestrationV2TestTrigger.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class Sdkv2 extends ClientSDK { - /** - * Cancel a running workflow - * - * @remarks - * Cancel a running workflow - */ - async cancelEvent( - request: operations.V2CancelEventRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2CancelEvent( - this, - request, - options, - )); - } - - /** - * Create trigger - * - * @remarks - * Create trigger - */ - async createTrigger( - request?: shared.V2TriggerData | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2CreateTrigger( - this, - request, - options, - )); - } - - /** - * Create workflow - * - * @remarks - * Create a workflow - */ - async createWorkflow( - request?: shared.V2CreateWorkflowRequest | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2CreateWorkflow( - this, - request, - options, - )); - } - - /** - * Delete trigger - * - * @remarks - * Read trigger - */ - async deleteTrigger( - request: operations.V2DeleteTriggerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2DeleteTrigger( - this, - request, - options, - )); - } - - /** - * Delete a flow by id - * - * @remarks - * Delete a flow by id - */ - async deleteWorkflow( - request: operations.V2DeleteWorkflowRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2DeleteWorkflow( - this, - request, - options, - )); - } - - /** - * Get a workflow instance by id - * - * @remarks - * Get a workflow instance by id - */ - async getInstance( - request: operations.V2GetInstanceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2GetInstance( - this, - request, - options, - )); - } - - /** - * Get a workflow instance history by id - * - * @remarks - * Get a workflow instance history by id - */ - async getInstanceHistory( - request: operations.V2GetInstanceHistoryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2GetInstanceHistory( - this, - request, - options, - )); - } - - /** - * Get a workflow instance stage history - * - * @remarks - * Get a workflow instance stage history - */ - async getInstanceStageHistory( - request: operations.V2GetInstanceStageHistoryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2GetInstanceStageHistory( - this, - request, - options, - )); - } - - /** - * Get server info - */ - async getServerInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2GetServerInfo( - this, - options, - )); - } - - /** - * Get a flow by id - * - * @remarks - * Get a flow by id - */ - async getWorkflow( - request: operations.V2GetWorkflowRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2GetWorkflow( - this, - request, - options, - )); - } - - /** - * List instances of a workflow - * - * @remarks - * List instances of a workflow - */ - async listInstances( - request: operations.V2ListInstancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2ListInstances( - this, - request, - options, - )); - } - - /** - * List triggers - * - * @remarks - * List triggers - */ - async listTriggers( - request: operations.V2ListTriggersRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2ListTriggers( - this, - request, - options, - )); - } - - /** - * List triggers occurrences - * - * @remarks - * List triggers occurrences - */ - async listTriggersOccurrences( - request: operations.V2ListTriggersOccurrencesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2ListTriggersOccurrences( - this, - request, - options, - )); - } - - /** - * List registered workflows - * - * @remarks - * List registered workflows - */ - async listWorkflows( - request: operations.V2ListWorkflowsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2ListWorkflows( - this, - request, - options, - )); - } - - /** - * Read trigger - * - * @remarks - * Read trigger - */ - async readTrigger( - request: operations.V2ReadTriggerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2ReadTrigger( - this, - request, - options, - )); - } - - /** - * Run workflow - * - * @remarks - * Run workflow - */ - async runWorkflow( - request: operations.V2RunWorkflowRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2RunWorkflow( - this, - request, - options, - )); - } - - /** - * Send an event to a running workflow - * - * @remarks - * Send an event to a running workflow - */ - async sendEvent( - request: operations.V2SendEventRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2SendEvent( - this, - request, - options, - )); - } - - /** - * Test trigger - * - * @remarks - * Test trigger - */ - async testTrigger( - request: operations.TestTriggerRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(orchestrationV2TestTrigger( - this, - request, - options, - )); - } -} diff --git a/src/sdk/sdkwalletsv1.ts b/src/sdk/sdkwalletsv1.ts deleted file mode 100644 index 3c77e9a9..00000000 --- a/src/sdk/sdkwalletsv1.ts +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { walletsV1ConfirmHold } from "../funcs/walletsV1ConfirmHold.js"; -import { walletsV1CreateBalance } from "../funcs/walletsV1CreateBalance.js"; -import { walletsV1CreateWallet } from "../funcs/walletsV1CreateWallet.js"; -import { walletsV1CreditWallet } from "../funcs/walletsV1CreditWallet.js"; -import { walletsV1DebitWallet } from "../funcs/walletsV1DebitWallet.js"; -import { walletsV1GetBalance } from "../funcs/walletsV1GetBalance.js"; -import { walletsV1GetHold } from "../funcs/walletsV1GetHold.js"; -import { walletsV1GetHolds } from "../funcs/walletsV1GetHolds.js"; -import { walletsV1GetTransactions } from "../funcs/walletsV1GetTransactions.js"; -import { walletsV1GetWallet } from "../funcs/walletsV1GetWallet.js"; -import { walletsV1GetWalletSummary } from "../funcs/walletsV1GetWalletSummary.js"; -import { walletsV1ListBalances } from "../funcs/walletsV1ListBalances.js"; -import { walletsV1ListWallets } from "../funcs/walletsV1ListWallets.js"; -import { walletsV1UpdateWallet } from "../funcs/walletsV1UpdateWallet.js"; -import { walletsV1VoidHold } from "../funcs/walletsV1VoidHold.js"; -import { walletsV1WalletsgetServerInfo } from "../funcs/walletsV1WalletsgetServerInfo.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SDKWalletsV1 extends ClientSDK { - /** - * Confirm a hold - */ - async confirmHold( - request: operations.ConfirmHoldRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1ConfirmHold( - this, - request, - options, - )); - } - - /** - * Create a balance - */ - async createBalance( - request: operations.CreateBalanceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1CreateBalance( - this, - request, - options, - )); - } - - /** - * Create a new wallet - */ - async createWallet( - request: operations.CreateWalletRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1CreateWallet( - this, - request, - options, - )); - } - - /** - * Credit a wallet - */ - async creditWallet( - request: operations.CreditWalletRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1CreditWallet( - this, - request, - options, - )); - } - - /** - * Debit a wallet - */ - async debitWallet( - request: operations.DebitWalletRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1DebitWallet( - this, - request, - options, - )); - } - - /** - * Get detailed balance - */ - async getBalance( - request: operations.GetBalanceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1GetBalance( - this, - request, - options, - )); - } - - /** - * Get a hold - */ - async getHold( - request: operations.GetHoldRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1GetHold( - this, - request, - options, - )); - } - - /** - * Get all holds for a wallet - */ - async getHolds( - request: operations.GetHoldsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1GetHolds( - this, - request, - options, - )); - } - - async getTransactions( - request: operations.GetTransactionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1GetTransactions( - this, - request, - options, - )); - } - - /** - * Get a wallet - */ - async getWallet( - request: operations.GetWalletRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1GetWallet( - this, - request, - options, - )); - } - - /** - * Get wallet summary - */ - async getWalletSummary( - request: operations.GetWalletSummaryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1GetWalletSummary( - this, - request, - options, - )); - } - - /** - * List balances of a wallet - */ - async listBalances( - request: operations.ListBalancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1ListBalances( - this, - request, - options, - )); - } - - /** - * List all wallets - */ - async listWallets( - request: operations.ListWalletsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1ListWallets( - this, - request, - options, - )); - } - - /** - * Update a wallet - */ - async updateWallet( - request: operations.UpdateWalletRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1UpdateWallet( - this, - request, - options, - )); - } - - /** - * Cancel a hold - */ - async voidHold( - request: operations.VoidHoldRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1VoidHold( - this, - request, - options, - )); - } - - /** - * Get server info - */ - async walletsgetServerInfo( - options?: RequestOptions, - ): Promise { - return unwrapAsync(walletsV1WalletsgetServerInfo( - this, - options, - )); - } -} diff --git a/src/sdk/sdkwebhooksv1.ts b/src/sdk/sdkwebhooksv1.ts deleted file mode 100644 index 730ce718..00000000 --- a/src/sdk/sdkwebhooksv1.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { webhooksV1ActivateConfig } from "../funcs/webhooksV1ActivateConfig.js"; -import { webhooksV1ChangeConfigSecret } from "../funcs/webhooksV1ChangeConfigSecret.js"; -import { webhooksV1DeactivateConfig } from "../funcs/webhooksV1DeactivateConfig.js"; -import { webhooksV1DeleteConfig } from "../funcs/webhooksV1DeleteConfig.js"; -import { webhooksV1GetManyConfigs } from "../funcs/webhooksV1GetManyConfigs.js"; -import { webhooksV1InsertConfig } from "../funcs/webhooksV1InsertConfig.js"; -import { webhooksV1TestConfig } from "../funcs/webhooksV1TestConfig.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; -import { unwrapAsync } from "./types/fp.js"; - -export class SDKWebhooksV1 extends ClientSDK { - /** - * Activate one config - * - * @remarks - * Activate a webhooks config by ID, to start receiving webhooks to its endpoint. - */ - async activateConfig( - request: operations.ActivateConfigRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1ActivateConfig( - this, - request, - options, - )); - } - - /** - * Change the signing secret of a config - * - * @remarks - * Change the signing secret of the endpoint of a webhooks config. - * - * If not passed or empty, a secret is automatically generated. - * The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) - */ - async changeConfigSecret( - request: operations.ChangeConfigSecretRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1ChangeConfigSecret( - this, - request, - options, - )); - } - - /** - * Deactivate one config - * - * @remarks - * Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. - */ - async deactivateConfig( - request: operations.DeactivateConfigRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1DeactivateConfig( - this, - request, - options, - )); - } - - /** - * Delete one config - * - * @remarks - * Delete a webhooks config by ID. - */ - async deleteConfig( - request: operations.DeleteConfigRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1DeleteConfig( - this, - request, - options, - )); - } - - /** - * Get many configs - * - * @remarks - * Sorted by updated date descending - */ - async getManyConfigs( - request: operations.GetManyConfigsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1GetManyConfigs( - this, - request, - options, - )); - } - - /** - * Insert a new config - * - * @remarks - * Insert a new webhooks config. - * - * The endpoint should be a valid https URL and be unique. - * - * The secret is the endpoint's verification secret. - * If not passed or empty, a secret is automatically generated. - * The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) - * - * All eventTypes are converted to lower-case when inserted. - */ - async insertConfig( - request: shared.ConfigUser, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1InsertConfig( - this, - request, - options, - )); - } - - /** - * Test one config - * - * @remarks - * Test a config by sending a webhook to its endpoint. - */ - async testConfig( - request: operations.TestConfigRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksV1TestConfig( - this, - request, - options, - )); - } -} diff --git a/src/sdk/search.ts b/src/sdk/search.ts index 3c16ceb9..c6328268 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -2,12 +2,40 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClientSDK } from "../lib/sdks.js"; -import { SDKSearchV1 } from "./sdksearchv1.js"; +import { searchSearch } from "../funcs/searchSearch.js"; +import { searchSearchgetServerInfo } from "../funcs/searchSearchgetServerInfo.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; export class Search extends ClientSDK { - private _v1?: SDKSearchV1; - get v1(): SDKSearchV1 { - return (this._v1 ??= new SDKSearchV1(this._options)); + /** + * Search + * + * @remarks + * ElasticSearch query engine + */ + async search( + request: shared.Query, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchSearch( + this, + request, + options, + )); + } + + /** + * Get server info + */ + async searchgetServerInfo( + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchSearchgetServerInfo( + this, + options, + )); } } diff --git a/src/sdk/types/operations.ts b/src/sdk/types/operations.ts index 0952f6f4..beb81e10 100644 --- a/src/sdk/types/operations.ts +++ b/src/sdk/types/operations.ts @@ -6,9 +6,10 @@ import { Result } from "./fp.js"; export type Paginator = () => Promise }> | null; -export type PageIterator = V & { +export type PageIterator = V & { next: Paginator; [Symbol.asyncIterator]: () => AsyncIterableIterator; + "~next"?: PageState | undefined; }; export function createPageIterator( @@ -40,7 +41,9 @@ export function createPageIterator( * terminates. It is useful in paginated SDK functions that have early return * paths when things go wrong. */ -export function haltIterator(v: V): PageIterator { +export function haltIterator( + v: V, +): PageIterator { return { ...v, next: () => null, @@ -54,9 +57,9 @@ export function haltIterator(v: V): PageIterator { * Converts an async iterator of `Result` into an async iterator of `V`. * When error results occur, the underlying error value is thrown. */ -export async function unwrapResultIterator( - iteratorPromise: Promise>>, -): Promise> { +export async function unwrapResultIterator( + iteratorPromise: Promise, PageState>>, +): Promise> { const resultIter = await iteratorPromise; if (!resultIter.ok) { @@ -66,6 +69,7 @@ export async function unwrapResultIterator( return { ...resultIter.value, next: unwrapPaginator(resultIter.next), + "~next": resultIter["~next"], [Symbol.asyncIterator]: async function* paginator() { for await (const page of resultIter) { if (!page.ok) { @@ -97,3 +101,5 @@ function unwrapPaginator( }); }; } + +export const URL_OVERRIDE = Symbol("URL_OVERRIDE"); diff --git a/src/sdk/v1.ts b/src/sdk/v1.ts index 10b2cfdc..aaa8bc7f 100644 --- a/src/sdk/v1.ts +++ b/src/sdk/v1.ts @@ -2,31 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { authV1CreateClient } from "../funcs/authV1CreateClient.js"; -import { authV1CreateSecret } from "../funcs/authV1CreateSecret.js"; -import { authV1DeleteClient } from "../funcs/authV1DeleteClient.js"; -import { authV1DeleteSecret } from "../funcs/authV1DeleteSecret.js"; -import { authV1GetOIDCWellKnowns } from "../funcs/authV1GetOIDCWellKnowns.js"; -import { authV1GetServerInfo } from "../funcs/authV1GetServerInfo.js"; -import { authV1ListClients } from "../funcs/authV1ListClients.js"; -import { authV1ListUsers } from "../funcs/authV1ListUsers.js"; -import { authV1ReadClient } from "../funcs/authV1ReadClient.js"; -import { authV1ReadUser } from "../funcs/authV1ReadUser.js"; -import { authV1UpdateClient } from "../funcs/authV1UpdateClient.js"; +import { ledgerV1AddMetadataOnTransaction } from "../funcs/ledgerV1AddMetadataOnTransaction.js"; +import { ledgerV1AddMetadataToAccount } from "../funcs/ledgerV1AddMetadataToAccount.js"; +import { ledgerV1CountAccounts } from "../funcs/ledgerV1CountAccounts.js"; +import { ledgerV1CountTransactions } from "../funcs/ledgerV1CountTransactions.js"; +import { ledgerV1CreateTransaction } from "../funcs/ledgerV1CreateTransaction.js"; +import { ledgerV1CreateTransactions } from "../funcs/ledgerV1CreateTransactions.js"; +import { ledgerV1GetAccount } from "../funcs/ledgerV1GetAccount.js"; +import { ledgerV1GetBalances } from "../funcs/ledgerV1GetBalances.js"; +import { ledgerV1GetBalancesAggregated } from "../funcs/ledgerV1GetBalancesAggregated.js"; +import { ledgerV1GetInfo } from "../funcs/ledgerV1GetInfo.js"; +import { ledgerV1GetLedgerInfo } from "../funcs/ledgerV1GetLedgerInfo.js"; +import { ledgerV1GetMapping } from "../funcs/ledgerV1GetMapping.js"; +import { ledgerV1GetTransaction } from "../funcs/ledgerV1GetTransaction.js"; +import { ledgerV1ListAccounts } from "../funcs/ledgerV1ListAccounts.js"; +import { ledgerV1ListLogs } from "../funcs/ledgerV1ListLogs.js"; +import { ledgerV1ListTransactions } from "../funcs/ledgerV1ListTransactions.js"; +import { ledgerV1ReadStats } from "../funcs/ledgerV1ReadStats.js"; +import { ledgerV1RevertTransaction } from "../funcs/ledgerV1RevertTransaction.js"; +import { ledgerV1RunScript } from "../funcs/ledgerV1RunScript.js"; +import { ledgerV1UpdateMapping } from "../funcs/ledgerV1UpdateMapping.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; -import * as shared from "./models/shared/index.js"; import { unwrapAsync } from "./types/fp.js"; export class V1 extends ClientSDK { /** - * Create client + * Create a new batch of transactions to a ledger */ - async createClient( - request?: shared.CreateClientRequest | undefined, + async createTransactions( + request: operations.CreateTransactionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1CreateClient( + ): Promise { + return unwrapAsync(ledgerV1CreateTransactions( this, request, options, @@ -34,13 +42,13 @@ export class V1 extends ClientSDK { } /** - * Add a secret to a client + * Set the metadata of a transaction by its ID */ - async createSecret( - request: operations.CreateSecretRequest, + async addMetadataOnTransaction( + request: operations.AddMetadataOnTransactionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1CreateSecret( + ): Promise { + return unwrapAsync(ledgerV1AddMetadataOnTransaction( this, request, options, @@ -48,13 +56,13 @@ export class V1 extends ClientSDK { } /** - * Delete client + * Add metadata to an account */ - async deleteClient( - request: operations.DeleteClientRequest, + async addMetadataToAccount( + request: operations.AddMetadataToAccountRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1DeleteClient( + ): Promise { + return unwrapAsync(ledgerV1AddMetadataToAccount( this, request, options, @@ -62,13 +70,13 @@ export class V1 extends ClientSDK { } /** - * Delete a secret from a client + * Count the accounts from a ledger */ - async deleteSecret( - request: operations.DeleteSecretRequest, + async countAccounts( + request: operations.CountAccountsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1DeleteSecret( + ): Promise { + return unwrapAsync(ledgerV1CountAccounts( this, request, options, @@ -76,64 +84,157 @@ export class V1 extends ClientSDK { } /** - * Retrieve OpenID connect well-knowns. + * Count the transactions from a ledger */ - async getOIDCWellKnowns( + async countTransactions( + request: operations.CountTransactionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1GetOIDCWellKnowns( + ): Promise { + return unwrapAsync(ledgerV1CountTransactions( this, + request, + options, + )); + } + + /** + * Create a new transaction to a ledger + */ + async createTransaction( + request: operations.CreateTransactionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1CreateTransaction( + this, + request, + options, + )); + } + + /** + * Get account by its address + */ + async getAccount( + request: operations.GetAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1GetAccount( + this, + request, + options, + )); + } + + /** + * Get the balances from a ledger's account + */ + async getBalances( + request: operations.GetBalancesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1GetBalances( + this, + request, options, )); } /** - * Get server info + * Get the aggregated balances from selected accounts */ - async getServerInfo( + async getBalancesAggregated( + request: operations.GetBalancesAggregatedRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1GetServerInfo( + ): Promise { + return unwrapAsync(ledgerV1GetBalancesAggregated( this, + request, options, )); } /** - * List clients + * Show server information */ - async listClients( + async getInfo( options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1ListClients( + ): Promise { + return unwrapAsync(ledgerV1GetInfo( this, options, )); } /** - * List users + * Get information about a ledger + */ + async getLedgerInfo( + request: operations.GetLedgerInfoRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1GetLedgerInfo( + this, + request, + options, + )); + } + + /** + * Get the mapping of a ledger + */ + async getMapping( + request: operations.GetMappingRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1GetMapping( + this, + request, + options, + )); + } + + /** + * Get transaction from a ledger by its ID + */ + async getTransaction( + request: operations.GetTransactionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1GetTransaction( + this, + request, + options, + )); + } + + /** + * List accounts from a ledger * * @remarks - * List users + * List accounts from a ledger, sorted by address in descending order. */ - async listUsers( + async listAccounts( + request: operations.ListAccountsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1ListUsers( + ): Promise { + return unwrapAsync(ledgerV1ListAccounts( this, + request, options, )); } /** - * Read client + * List the logs from a ledger + * + * @remarks + * List the logs from a ledger, sorted by ID in descending order. */ - async readClient( - request: operations.ReadClientRequest, + async listLogs( + request: operations.ListLogsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1ReadClient( + ): Promise { + return unwrapAsync(ledgerV1ListLogs( this, request, options, @@ -141,16 +242,66 @@ export class V1 extends ClientSDK { } /** - * Read user + * List transactions from a ledger * * @remarks - * Read user + * List transactions from a ledger, sorted by txid in descending order. + */ + async listTransactions( + request: operations.ListTransactionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1ListTransactions( + this, + request, + options, + )); + } + + /** + * Get statistics from a ledger + * + * @remarks + * Get statistics from a ledger. (aggregate metrics on accounts and transactions) + */ + async readStats( + request: operations.ReadStatsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1ReadStats( + this, + request, + options, + )); + } + + /** + * Revert a ledger transaction by its ID + */ + async revertTransaction( + request: operations.RevertTransactionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ledgerV1RevertTransaction( + this, + request, + options, + )); + } + + /** + * Execute a Numscript + * + * @remarks + * This route is deprecated, and has been merged into `POST /{ledger}/transactions`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ - async readUser( - request: operations.ReadUserRequest, + async runScript( + request: operations.RunScriptRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1ReadUser( + ): Promise { + return unwrapAsync(ledgerV1RunScript( this, request, options, @@ -158,13 +309,13 @@ export class V1 extends ClientSDK { } /** - * Update client + * Update the mapping of a ledger */ - async updateClient( - request: operations.UpdateClientRequest, + async updateMapping( + request: operations.UpdateMappingRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(authV1UpdateClient( + ): Promise { + return unwrapAsync(ledgerV1UpdateMapping( this, request, options, diff --git a/src/sdk/wallets.ts b/src/sdk/wallets.ts index bebe8add..6f9ca098 100644 --- a/src/sdk/wallets.ts +++ b/src/sdk/wallets.ts @@ -3,11 +3,11 @@ */ import { ClientSDK } from "../lib/sdks.js"; -import { SDKWalletsV1 } from "./sdkwalletsv1.js"; +import { Sdkv1 } from "./sdkv1.js"; export class Wallets extends ClientSDK { - private _v1?: SDKWalletsV1; - get v1(): SDKWalletsV1 { - return (this._v1 ??= new SDKWalletsV1(this._options)); + private _v1?: Sdkv1; + get v1(): Sdkv1 { + return (this._v1 ??= new Sdkv1(this._options)); } } diff --git a/src/sdk/webhooks.ts b/src/sdk/webhooks.ts index 007fcd8a..bba0df95 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -2,12 +2,146 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClientSDK } from "../lib/sdks.js"; -import { SDKWebhooksV1 } from "./sdkwebhooksv1.js"; +import { webhooksActivateConfig } from "../funcs/webhooksActivateConfig.js"; +import { webhooksChangeConfigSecret } from "../funcs/webhooksChangeConfigSecret.js"; +import { webhooksDeactivateConfig } from "../funcs/webhooksDeactivateConfig.js"; +import { webhooksDeleteConfig } from "../funcs/webhooksDeleteConfig.js"; +import { webhooksGetManyConfigs } from "../funcs/webhooksGetManyConfigs.js"; +import { webhooksInsertConfig } from "../funcs/webhooksInsertConfig.js"; +import { webhooksTestConfig } from "../funcs/webhooksTestConfig.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; export class Webhooks extends ClientSDK { - private _v1?: SDKWebhooksV1; - get v1(): SDKWebhooksV1 { - return (this._v1 ??= new SDKWebhooksV1(this._options)); + /** + * Activate one config + * + * @remarks + * Activate a webhooks config by ID, to start receiving webhooks to its endpoint. + */ + async activateConfig( + request: operations.ActivateConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksActivateConfig( + this, + request, + options, + )); + } + + /** + * Change the signing secret of a config + * + * @remarks + * Change the signing secret of the endpoint of a webhooks config. + * + * If not passed or empty, a secret is automatically generated. + * The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + */ + async changeConfigSecret( + request: operations.ChangeConfigSecretRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksChangeConfigSecret( + this, + request, + options, + )); + } + + /** + * Deactivate one config + * + * @remarks + * Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint. + */ + async deactivateConfig( + request: operations.DeactivateConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksDeactivateConfig( + this, + request, + options, + )); + } + + /** + * Delete one config + * + * @remarks + * Delete a webhooks config by ID. + */ + async deleteConfig( + request: operations.DeleteConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksDeleteConfig( + this, + request, + options, + )); + } + + /** + * Get many configs + * + * @remarks + * Sorted by updated date descending + */ + async getManyConfigs( + request: operations.GetManyConfigsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksGetManyConfigs( + this, + request, + options, + )); + } + + /** + * Insert a new config + * + * @remarks + * Insert a new webhooks config. + * + * The endpoint should be a valid https URL and be unique. + * + * The secret is the endpoint's verification secret. + * If not passed or empty, a secret is automatically generated. + * The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding) + * + * All eventTypes are converted to lower-case when inserted. + */ + async insertConfig( + request: shared.ConfigUser, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksInsertConfig( + this, + request, + options, + )); + } + + /** + * Test one config + * + * @remarks + * Test a config by sending a webhook to its endpoint. + */ + async testConfig( + request: operations.TestConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksTestConfig( + this, + request, + options, + )); } } diff --git a/tsconfig.json b/tsconfig.json index 7a86d2d9..94d81a34 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,9 @@ "compilerOptions": { "incremental": true, "tsBuildInfoFile": ".tsbuildinfo", - "target": "ES2018", + "target": "ES2020", "lib": ["ES2022", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", "module": "Node16", "moduleResolution": "Node16",