@oatfi/oatfi-sdk-ts 0.12.5 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/commonjs/funcs/filesUpload.js +3 -0
- package/dist/commonjs/funcs/filesUpload.js.map +1 -1
- package/dist/commonjs/funcs/transactionsTransactionsControllerUpdate.d.ts +20 -0
- package/dist/commonjs/funcs/transactionsTransactionsControllerUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{networkLedgerUpdateHold.js → transactionsTransactionsControllerUpdate.js} +21 -26
- package/dist/commonjs/funcs/transactionsTransactionsControllerUpdate.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/adjustmentresponsedto.d.ts +0 -6
- package/dist/commonjs/models/adjustmentresponsedto.d.ts.map +1 -1
- package/dist/commonjs/models/adjustmentresponsedto.js +0 -3
- package/dist/commonjs/models/adjustmentresponsedto.js.map +1 -1
- package/dist/commonjs/models/businessrefdto.d.ts +5 -0
- package/dist/commonjs/models/businessrefdto.d.ts.map +1 -1
- package/dist/commonjs/models/businessrefdto.js +2 -0
- package/dist/commonjs/models/businessrefdto.js.map +1 -1
- package/dist/commonjs/models/createadjustmentdto.d.ts +0 -6
- package/dist/commonjs/models/createadjustmentdto.d.ts.map +1 -1
- package/dist/commonjs/models/createadjustmentdto.js +0 -3
- package/dist/commonjs/models/createadjustmentdto.js.map +1 -1
- package/dist/commonjs/models/createfinancialaccountdto.d.ts +0 -1
- package/dist/commonjs/models/createfinancialaccountdto.d.ts.map +1 -1
- package/dist/commonjs/models/createfinancialaccountdto.js +0 -1
- package/dist/commonjs/models/createfinancialaccountdto.js.map +1 -1
- package/dist/commonjs/models/createplatformfinancialaccountdto.d.ts +0 -1
- package/dist/commonjs/models/createplatformfinancialaccountdto.d.ts.map +1 -1
- package/dist/commonjs/models/createplatformfinancialaccountdto.js +0 -1
- package/dist/commonjs/models/createplatformfinancialaccountdto.js.map +1 -1
- package/dist/commonjs/models/createplatformsettingsdto.d.ts +0 -20
- package/dist/commonjs/models/createplatformsettingsdto.d.ts.map +1 -1
- package/dist/commonjs/models/createplatformsettingsdto.js +0 -8
- package/dist/commonjs/models/createplatformsettingsdto.js.map +1 -1
- package/dist/commonjs/models/fileresponsedto.d.ts +7 -0
- package/dist/commonjs/models/fileresponsedto.d.ts.map +1 -1
- package/dist/commonjs/models/fileresponsedto.js +5 -0
- package/dist/commonjs/models/fileresponsedto.js.map +1 -1
- package/dist/commonjs/models/filetype.d.ts +3 -0
- package/dist/commonjs/models/filetype.d.ts.map +1 -1
- package/dist/commonjs/models/filetype.js +3 -0
- package/dist/commonjs/models/filetype.js.map +1 -1
- package/dist/commonjs/models/financialaccountdatadto.d.ts +0 -5
- package/dist/commonjs/models/financialaccountdatadto.d.ts.map +1 -1
- package/dist/commonjs/models/financialaccountdatadto.js +0 -4
- package/dist/commonjs/models/financialaccountdatadto.js.map +1 -1
- package/dist/commonjs/models/financialaccountresponsedto.d.ts +0 -1
- package/dist/commonjs/models/financialaccountresponsedto.d.ts.map +1 -1
- package/dist/commonjs/models/financialaccountresponsedto.js +0 -1
- package/dist/commonjs/models/financialaccountresponsedto.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +2 -2
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -2
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/ledgerentrysnapshotdto.d.ts +0 -5
- package/dist/commonjs/models/ledgerentrysnapshotdto.d.ts.map +1 -1
- package/dist/commonjs/models/ledgerentrysnapshotdto.js +0 -2
- package/dist/commonjs/models/ledgerentrysnapshotdto.js.map +1 -1
- package/dist/commonjs/models/lmsloantransactiontype.d.ts +1 -0
- package/dist/commonjs/models/lmsloantransactiontype.d.ts.map +1 -1
- package/dist/commonjs/models/lmsloantransactiontype.js +1 -0
- package/dist/commonjs/models/lmsloantransactiontype.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -2
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -2
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/networkcontrollerexecutepurchase.d.ts +1 -1
- package/dist/commonjs/models/operations/networkcontrollerexecutepurchase.d.ts.map +1 -1
- package/dist/commonjs/models/operations/networkcontrollerexecutepurchase.js +1 -0
- package/dist/commonjs/models/operations/networkcontrollerexecutepurchase.js.map +1 -1
- package/dist/commonjs/models/operations/transactionscontrollerupdate.d.ts +18 -0
- package/dist/commonjs/models/operations/transactionscontrollerupdate.d.ts.map +1 -0
- package/dist/commonjs/models/{patchholdrequestdto.js → operations/transactionscontrollerupdate.js} +11 -13
- package/dist/commonjs/models/operations/transactionscontrollerupdate.js.map +1 -0
- package/dist/commonjs/models/paymentraildatadto.d.ts +0 -5
- package/dist/commonjs/models/paymentraildatadto.d.ts.map +1 -1
- package/dist/commonjs/models/paymentraildatadto.js +0 -4
- package/dist/commonjs/models/paymentraildatadto.js.map +1 -1
- package/dist/commonjs/models/platformsettingsdto.d.ts +0 -16
- package/dist/commonjs/models/platformsettingsdto.d.ts.map +1 -1
- package/dist/commonjs/models/platformsettingsdto.js +0 -8
- package/dist/commonjs/models/platformsettingsdto.js.map +1 -1
- package/dist/commonjs/models/purchasenotconfirmeddto.d.ts +13 -0
- package/dist/commonjs/models/purchasenotconfirmeddto.d.ts.map +1 -0
- package/dist/commonjs/models/purchasenotconfirmeddto.js +51 -0
- package/dist/commonjs/models/purchasenotconfirmeddto.js.map +1 -0
- package/dist/commonjs/models/transfermethodenum.d.ts +0 -1
- package/dist/commonjs/models/transfermethodenum.d.ts.map +1 -1
- package/dist/commonjs/models/transfermethodenum.js +0 -1
- package/dist/commonjs/models/transfermethodenum.js.map +1 -1
- package/dist/commonjs/models/updatefiledto.d.ts +8 -0
- package/dist/commonjs/models/updatefiledto.d.ts.map +1 -1
- package/dist/commonjs/models/updatefiledto.js +5 -0
- package/dist/commonjs/models/updatefiledto.js.map +1 -1
- package/dist/commonjs/models/updatetransactiondto.d.ts +36 -0
- package/dist/commonjs/models/updatetransactiondto.d.ts.map +1 -0
- package/dist/commonjs/models/{recordadjustmentrequestdto.js → updatetransactiondto.js} +11 -36
- package/dist/commonjs/models/updatetransactiondto.js.map +1 -0
- package/dist/commonjs/models/uploadfilesdto.d.ts +8 -0
- package/dist/commonjs/models/uploadfilesdto.d.ts.map +1 -1
- package/dist/commonjs/models/uploadfilesdto.js +5 -0
- package/dist/commonjs/models/uploadfilesdto.js.map +1 -1
- package/dist/commonjs/models/uploadfilesmultipartdto.d.ts +3 -0
- package/dist/commonjs/models/uploadfilesmultipartdto.d.ts.map +1 -1
- package/dist/commonjs/models/uploadfilesmultipartdto.js +3 -0
- package/dist/commonjs/models/uploadfilesmultipartdto.js.map +1 -1
- package/dist/commonjs/sdk/networkledger.d.ts +0 -8
- package/dist/commonjs/sdk/networkledger.d.ts.map +1 -1
- package/dist/commonjs/sdk/networkledger.js +0 -14
- package/dist/commonjs/sdk/networkledger.js.map +1 -1
- package/dist/commonjs/sdk/transactions.d.ts +7 -0
- package/dist/commonjs/sdk/transactions.d.ts.map +1 -1
- package/dist/commonjs/sdk/transactions.js +10 -0
- package/dist/commonjs/sdk/transactions.js.map +1 -1
- package/dist/esm/funcs/filesUpload.js +3 -0
- package/dist/esm/funcs/filesUpload.js.map +1 -1
- package/dist/esm/funcs/transactionsTransactionsControllerUpdate.d.ts +20 -0
- package/dist/esm/funcs/transactionsTransactionsControllerUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/{networkLedgerUpdateHold.js → transactionsTransactionsControllerUpdate.js} +21 -26
- package/dist/esm/funcs/transactionsTransactionsControllerUpdate.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/adjustmentresponsedto.d.ts +0 -6
- package/dist/esm/models/adjustmentresponsedto.d.ts.map +1 -1
- package/dist/esm/models/adjustmentresponsedto.js +0 -3
- package/dist/esm/models/adjustmentresponsedto.js.map +1 -1
- package/dist/esm/models/businessrefdto.d.ts +5 -0
- package/dist/esm/models/businessrefdto.d.ts.map +1 -1
- package/dist/esm/models/businessrefdto.js +2 -0
- package/dist/esm/models/businessrefdto.js.map +1 -1
- package/dist/esm/models/createadjustmentdto.d.ts +0 -6
- package/dist/esm/models/createadjustmentdto.d.ts.map +1 -1
- package/dist/esm/models/createadjustmentdto.js +0 -3
- package/dist/esm/models/createadjustmentdto.js.map +1 -1
- package/dist/esm/models/createfinancialaccountdto.d.ts +0 -1
- package/dist/esm/models/createfinancialaccountdto.d.ts.map +1 -1
- package/dist/esm/models/createfinancialaccountdto.js +0 -1
- package/dist/esm/models/createfinancialaccountdto.js.map +1 -1
- package/dist/esm/models/createplatformfinancialaccountdto.d.ts +0 -1
- package/dist/esm/models/createplatformfinancialaccountdto.d.ts.map +1 -1
- package/dist/esm/models/createplatformfinancialaccountdto.js +0 -1
- package/dist/esm/models/createplatformfinancialaccountdto.js.map +1 -1
- package/dist/esm/models/createplatformsettingsdto.d.ts +0 -20
- package/dist/esm/models/createplatformsettingsdto.d.ts.map +1 -1
- package/dist/esm/models/createplatformsettingsdto.js +0 -8
- package/dist/esm/models/createplatformsettingsdto.js.map +1 -1
- package/dist/esm/models/fileresponsedto.d.ts +7 -0
- package/dist/esm/models/fileresponsedto.d.ts.map +1 -1
- package/dist/esm/models/fileresponsedto.js +5 -0
- package/dist/esm/models/fileresponsedto.js.map +1 -1
- package/dist/esm/models/filetype.d.ts +3 -0
- package/dist/esm/models/filetype.d.ts.map +1 -1
- package/dist/esm/models/filetype.js +3 -0
- package/dist/esm/models/filetype.js.map +1 -1
- package/dist/esm/models/financialaccountdatadto.d.ts +0 -5
- package/dist/esm/models/financialaccountdatadto.d.ts.map +1 -1
- package/dist/esm/models/financialaccountdatadto.js +0 -4
- package/dist/esm/models/financialaccountdatadto.js.map +1 -1
- package/dist/esm/models/financialaccountresponsedto.d.ts +0 -1
- package/dist/esm/models/financialaccountresponsedto.d.ts.map +1 -1
- package/dist/esm/models/financialaccountresponsedto.js +0 -1
- package/dist/esm/models/financialaccountresponsedto.js.map +1 -1
- package/dist/esm/models/index.d.ts +2 -2
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +2 -2
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/ledgerentrysnapshotdto.d.ts +0 -5
- package/dist/esm/models/ledgerentrysnapshotdto.d.ts.map +1 -1
- package/dist/esm/models/ledgerentrysnapshotdto.js +0 -2
- package/dist/esm/models/ledgerentrysnapshotdto.js.map +1 -1
- package/dist/esm/models/lmsloantransactiontype.d.ts +1 -0
- package/dist/esm/models/lmsloantransactiontype.d.ts.map +1 -1
- package/dist/esm/models/lmsloantransactiontype.js +1 -0
- package/dist/esm/models/lmsloantransactiontype.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -2
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -2
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/networkcontrollerexecutepurchase.d.ts +1 -1
- package/dist/esm/models/operations/networkcontrollerexecutepurchase.d.ts.map +1 -1
- package/dist/esm/models/operations/networkcontrollerexecutepurchase.js +1 -0
- package/dist/esm/models/operations/networkcontrollerexecutepurchase.js.map +1 -1
- package/dist/esm/models/operations/transactionscontrollerupdate.d.ts +18 -0
- package/dist/esm/models/operations/transactionscontrollerupdate.d.ts.map +1 -0
- package/dist/esm/models/operations/transactionscontrollerupdate.js +19 -0
- package/dist/esm/models/operations/transactionscontrollerupdate.js.map +1 -0
- package/dist/esm/models/paymentraildatadto.d.ts +0 -5
- package/dist/esm/models/paymentraildatadto.d.ts.map +1 -1
- package/dist/esm/models/paymentraildatadto.js +0 -4
- package/dist/esm/models/paymentraildatadto.js.map +1 -1
- package/dist/esm/models/platformsettingsdto.d.ts +0 -16
- package/dist/esm/models/platformsettingsdto.d.ts.map +1 -1
- package/dist/esm/models/platformsettingsdto.js +0 -8
- package/dist/esm/models/platformsettingsdto.js.map +1 -1
- package/dist/esm/models/purchasenotconfirmeddto.d.ts +13 -0
- package/dist/esm/models/purchasenotconfirmeddto.d.ts.map +1 -0
- package/dist/esm/models/purchasenotconfirmeddto.js +14 -0
- package/dist/esm/models/purchasenotconfirmeddto.js.map +1 -0
- package/dist/esm/models/transfermethodenum.d.ts +0 -1
- package/dist/esm/models/transfermethodenum.d.ts.map +1 -1
- package/dist/esm/models/transfermethodenum.js +0 -1
- package/dist/esm/models/transfermethodenum.js.map +1 -1
- package/dist/esm/models/updatefiledto.d.ts +8 -0
- package/dist/esm/models/updatefiledto.d.ts.map +1 -1
- package/dist/esm/models/updatefiledto.js +5 -0
- package/dist/esm/models/updatefiledto.js.map +1 -1
- package/dist/esm/models/updatetransactiondto.d.ts +36 -0
- package/dist/esm/models/updatetransactiondto.d.ts.map +1 -0
- package/dist/esm/models/updatetransactiondto.js +17 -0
- package/dist/esm/models/updatetransactiondto.js.map +1 -0
- package/dist/esm/models/uploadfilesdto.d.ts +8 -0
- package/dist/esm/models/uploadfilesdto.d.ts.map +1 -1
- package/dist/esm/models/uploadfilesdto.js +5 -0
- package/dist/esm/models/uploadfilesdto.js.map +1 -1
- package/dist/esm/models/uploadfilesmultipartdto.d.ts +3 -0
- package/dist/esm/models/uploadfilesmultipartdto.d.ts.map +1 -1
- package/dist/esm/models/uploadfilesmultipartdto.js +3 -0
- package/dist/esm/models/uploadfilesmultipartdto.js.map +1 -1
- package/dist/esm/sdk/networkledger.d.ts +0 -8
- package/dist/esm/sdk/networkledger.d.ts.map +1 -1
- package/dist/esm/sdk/networkledger.js +0 -14
- package/dist/esm/sdk/networkledger.js.map +1 -1
- package/dist/esm/sdk/transactions.d.ts +7 -0
- package/dist/esm/sdk/transactions.d.ts.map +1 -1
- package/dist/esm/sdk/transactions.js +10 -0
- package/dist/esm/sdk/transactions.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/filesUpload.ts +3 -0
- package/src/funcs/{networkLedgerUpdateHold.ts → transactionsTransactionsControllerUpdate.ts} +26 -46
- package/src/lib/config.ts +3 -3
- package/src/models/adjustmentresponsedto.ts +0 -6
- package/src/models/businessrefdto.ts +7 -0
- package/src/models/createadjustmentdto.ts +0 -6
- package/src/models/createfinancialaccountdto.ts +0 -1
- package/src/models/createplatformfinancialaccountdto.ts +0 -1
- package/src/models/createplatformsettingsdto.ts +0 -28
- package/src/models/fileresponsedto.ts +9 -0
- package/src/models/filetype.ts +3 -0
- package/src/models/financialaccountdatadto.ts +0 -9
- package/src/models/financialaccountresponsedto.ts +0 -1
- package/src/models/index.ts +2 -2
- package/src/models/ledgerentrysnapshotdto.ts +0 -7
- package/src/models/lmsloantransactiontype.ts +1 -0
- package/src/models/operations/index.ts +1 -2
- package/src/models/operations/networkcontrollerexecutepurchase.ts +3 -1
- package/src/models/operations/transactionscontrollerupdate.ts +45 -0
- package/src/models/paymentraildatadto.ts +0 -9
- package/src/models/platformsettingsdto.ts +0 -24
- package/src/models/purchasenotconfirmeddto.ts +35 -0
- package/src/models/transfermethodenum.ts +0 -1
- package/src/models/updatefiledto.ts +10 -0
- package/src/models/updatetransactiondto.ts +62 -0
- package/src/models/uploadfilesdto.ts +10 -0
- package/src/models/uploadfilesmultipartdto.ts +3 -0
- package/src/sdk/networkledger.ts +0 -34
- package/src/sdk/transactions.ts +18 -0
- package/dist/commonjs/funcs/networkLedgerRecordAdjustment.d.ts +0 -15
- package/dist/commonjs/funcs/networkLedgerRecordAdjustment.d.ts.map +0 -1
- package/dist/commonjs/funcs/networkLedgerRecordAdjustment.js +0 -139
- package/dist/commonjs/funcs/networkLedgerRecordAdjustment.js.map +0 -1
- package/dist/commonjs/funcs/networkLedgerUpdateHold.d.ts +0 -15
- package/dist/commonjs/funcs/networkLedgerUpdateHold.d.ts.map +0 -1
- package/dist/commonjs/funcs/networkLedgerUpdateHold.js.map +0 -1
- package/dist/commonjs/models/operations/networkcontrollerpatchhold.d.ts +0 -50
- package/dist/commonjs/models/operations/networkcontrollerpatchhold.d.ts.map +0 -1
- package/dist/commonjs/models/operations/networkcontrollerpatchhold.js +0 -74
- package/dist/commonjs/models/operations/networkcontrollerpatchhold.js.map +0 -1
- package/dist/commonjs/models/operations/networkcontrollerrecordadjustment.d.ts +0 -50
- package/dist/commonjs/models/operations/networkcontrollerrecordadjustment.d.ts.map +0 -1
- package/dist/commonjs/models/operations/networkcontrollerrecordadjustment.js +0 -74
- package/dist/commonjs/models/operations/networkcontrollerrecordadjustment.js.map +0 -1
- package/dist/commonjs/models/patchholdrequestdto.d.ts +0 -25
- package/dist/commonjs/models/patchholdrequestdto.d.ts.map +0 -1
- package/dist/commonjs/models/patchholdrequestdto.js.map +0 -1
- package/dist/commonjs/models/recordadjustmentrequestdto.d.ts +0 -71
- package/dist/commonjs/models/recordadjustmentrequestdto.d.ts.map +0 -1
- package/dist/commonjs/models/recordadjustmentrequestdto.js.map +0 -1
- package/dist/esm/funcs/networkLedgerRecordAdjustment.d.ts +0 -15
- package/dist/esm/funcs/networkLedgerRecordAdjustment.d.ts.map +0 -1
- package/dist/esm/funcs/networkLedgerRecordAdjustment.js +0 -103
- package/dist/esm/funcs/networkLedgerRecordAdjustment.js.map +0 -1
- package/dist/esm/funcs/networkLedgerUpdateHold.d.ts +0 -15
- package/dist/esm/funcs/networkLedgerUpdateHold.d.ts.map +0 -1
- package/dist/esm/funcs/networkLedgerUpdateHold.js.map +0 -1
- package/dist/esm/models/operations/networkcontrollerpatchhold.d.ts +0 -50
- package/dist/esm/models/operations/networkcontrollerpatchhold.d.ts.map +0 -1
- package/dist/esm/models/operations/networkcontrollerpatchhold.js +0 -36
- package/dist/esm/models/operations/networkcontrollerpatchhold.js.map +0 -1
- package/dist/esm/models/operations/networkcontrollerrecordadjustment.d.ts +0 -50
- package/dist/esm/models/operations/networkcontrollerrecordadjustment.d.ts.map +0 -1
- package/dist/esm/models/operations/networkcontrollerrecordadjustment.js +0 -36
- package/dist/esm/models/operations/networkcontrollerrecordadjustment.js.map +0 -1
- package/dist/esm/models/patchholdrequestdto.d.ts +0 -25
- package/dist/esm/models/patchholdrequestdto.d.ts.map +0 -1
- package/dist/esm/models/patchholdrequestdto.js +0 -21
- package/dist/esm/models/patchholdrequestdto.js.map +0 -1
- package/dist/esm/models/recordadjustmentrequestdto.d.ts +0 -71
- package/dist/esm/models/recordadjustmentrequestdto.d.ts.map +0 -1
- package/dist/esm/models/recordadjustmentrequestdto.js +0 -42
- package/dist/esm/models/recordadjustmentrequestdto.js.map +0 -1
- package/src/funcs/networkLedgerRecordAdjustment.ts +0 -212
- package/src/models/operations/networkcontrollerpatchhold.ts +0 -105
- package/src/models/operations/networkcontrollerrecordadjustment.ts +0 -108
- package/src/models/patchholdrequestdto.ts +0 -53
- package/src/models/recordadjustmentrequestdto.ts +0 -105
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { OatFiSDKCore } from "../core.js";
|
|
6
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
-
import { resolveSecurity } from "../lib/security.js";
|
|
13
|
-
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import {
|
|
15
|
-
ConnectionError,
|
|
16
|
-
InvalidRequestError,
|
|
17
|
-
RequestAbortedError,
|
|
18
|
-
RequestTimeoutError,
|
|
19
|
-
UnexpectedClientError,
|
|
20
|
-
} from "../models/errors/httpclienterrors.js";
|
|
21
|
-
import { OatFiSDKError } from "../models/errors/oatfisdkerror.js";
|
|
22
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
-
import * as models from "../models/index.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Record adjustment on the lender (recordAdjustment).
|
|
31
|
-
*/
|
|
32
|
-
export function networkLedgerRecordAdjustment(
|
|
33
|
-
client: OatFiSDKCore,
|
|
34
|
-
security: operations.NetworkControllerRecordAdjustmentSecurity,
|
|
35
|
-
request: operations.NetworkControllerRecordAdjustmentRequest,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): APIPromise<
|
|
38
|
-
Result<
|
|
39
|
-
models.ConfirmedEnvelopeDto,
|
|
40
|
-
| OatFiSDKError
|
|
41
|
-
| ResponseValidationError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| UnexpectedClientError
|
|
47
|
-
| SDKValidationError
|
|
48
|
-
>
|
|
49
|
-
> {
|
|
50
|
-
return new APIPromise($do(
|
|
51
|
-
client,
|
|
52
|
-
security,
|
|
53
|
-
request,
|
|
54
|
-
options,
|
|
55
|
-
));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async function $do(
|
|
59
|
-
client: OatFiSDKCore,
|
|
60
|
-
security: operations.NetworkControllerRecordAdjustmentSecurity,
|
|
61
|
-
request: operations.NetworkControllerRecordAdjustmentRequest,
|
|
62
|
-
options?: RequestOptions,
|
|
63
|
-
): Promise<
|
|
64
|
-
[
|
|
65
|
-
Result<
|
|
66
|
-
models.ConfirmedEnvelopeDto,
|
|
67
|
-
| OatFiSDKError
|
|
68
|
-
| ResponseValidationError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
| RequestAbortedError
|
|
71
|
-
| RequestTimeoutError
|
|
72
|
-
| InvalidRequestError
|
|
73
|
-
| UnexpectedClientError
|
|
74
|
-
| SDKValidationError
|
|
75
|
-
>,
|
|
76
|
-
APICall,
|
|
77
|
-
]
|
|
78
|
-
> {
|
|
79
|
-
const parsed = safeParse(
|
|
80
|
-
request,
|
|
81
|
-
(value) =>
|
|
82
|
-
operations.NetworkControllerRecordAdjustmentRequest$outboundSchema.parse(
|
|
83
|
-
value,
|
|
84
|
-
),
|
|
85
|
-
"Input validation failed",
|
|
86
|
-
);
|
|
87
|
-
if (!parsed.ok) {
|
|
88
|
-
return [parsed, { status: "invalid" }];
|
|
89
|
-
}
|
|
90
|
-
const payload = parsed.value;
|
|
91
|
-
const body = encodeJSON("body", payload.RecordAdjustmentRequestDto, {
|
|
92
|
-
explode: true,
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const pathParams = {
|
|
96
|
-
ledger_entry_external_id: encodeSimple(
|
|
97
|
-
"ledger_entry_external_id",
|
|
98
|
-
payload.ledger_entry_external_id,
|
|
99
|
-
{ explode: false, charEncoding: "percent" },
|
|
100
|
-
),
|
|
101
|
-
};
|
|
102
|
-
const path = pathToFunc(
|
|
103
|
-
"/v3/network/ledger-entries/{ledger_entry_external_id}/adjustments",
|
|
104
|
-
)(pathParams);
|
|
105
|
-
|
|
106
|
-
const headers = new Headers(compactMap({
|
|
107
|
-
"Content-Type": "application/json",
|
|
108
|
-
Accept: "application/json",
|
|
109
|
-
"Idempotency-Key": encodeSimple(
|
|
110
|
-
"Idempotency-Key",
|
|
111
|
-
payload["Idempotency-Key"],
|
|
112
|
-
{ explode: false, charEncoding: "none" },
|
|
113
|
-
),
|
|
114
|
-
"User-Agent": encodeSimple("User-Agent", payload["User-Agent"], {
|
|
115
|
-
explode: false,
|
|
116
|
-
charEncoding: "none",
|
|
117
|
-
}),
|
|
118
|
-
"X-Network-Request-Id": encodeSimple(
|
|
119
|
-
"X-Network-Request-Id",
|
|
120
|
-
payload["X-Network-Request-Id"],
|
|
121
|
-
{ explode: false, charEncoding: "none" },
|
|
122
|
-
),
|
|
123
|
-
"X-Network-Role": encodeSimple(
|
|
124
|
-
"X-Network-Role",
|
|
125
|
-
payload["X-Network-Role"],
|
|
126
|
-
{ explode: false, charEncoding: "none" },
|
|
127
|
-
),
|
|
128
|
-
}));
|
|
129
|
-
|
|
130
|
-
const requestSecurity = resolveSecurity(
|
|
131
|
-
[
|
|
132
|
-
{
|
|
133
|
-
type: "http:basic",
|
|
134
|
-
value: { username: security?.username, password: security?.password },
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
const context = {
|
|
140
|
-
options: client._options,
|
|
141
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
142
|
-
operationID: "NetworkController_recordAdjustment",
|
|
143
|
-
oAuth2Scopes: null,
|
|
144
|
-
|
|
145
|
-
resolvedSecurity: requestSecurity,
|
|
146
|
-
|
|
147
|
-
securitySource: security,
|
|
148
|
-
retryConfig: options?.retries
|
|
149
|
-
|| client._options.retryConfig
|
|
150
|
-
|| {
|
|
151
|
-
strategy: "backoff",
|
|
152
|
-
backoff: {
|
|
153
|
-
initialInterval: 500,
|
|
154
|
-
maxInterval: 60000,
|
|
155
|
-
exponent: 1.5,
|
|
156
|
-
maxElapsedTime: 120000,
|
|
157
|
-
},
|
|
158
|
-
retryConnectionErrors: true,
|
|
159
|
-
}
|
|
160
|
-
|| { strategy: "none" },
|
|
161
|
-
retryCodes: options?.retryCodes || ["5XX"],
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const requestRes = client._createRequest(context, {
|
|
165
|
-
security: requestSecurity,
|
|
166
|
-
method: "POST",
|
|
167
|
-
baseURL: options?.serverURL,
|
|
168
|
-
path: path,
|
|
169
|
-
headers: headers,
|
|
170
|
-
body: body,
|
|
171
|
-
uaHeader: "x-speakeasy-user-agent",
|
|
172
|
-
userAgent: client._options.userAgent,
|
|
173
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
174
|
-
}, options);
|
|
175
|
-
if (!requestRes.ok) {
|
|
176
|
-
return [requestRes, { status: "invalid" }];
|
|
177
|
-
}
|
|
178
|
-
const req = requestRes.value;
|
|
179
|
-
|
|
180
|
-
const doResult = await client._do(req, {
|
|
181
|
-
context,
|
|
182
|
-
isErrorStatusCode: (statusCode: number) =>
|
|
183
|
-
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
184
|
-
retryConfig: context.retryConfig,
|
|
185
|
-
retryCodes: context.retryCodes,
|
|
186
|
-
});
|
|
187
|
-
if (!doResult.ok) {
|
|
188
|
-
return [doResult, { status: "request-error", request: req }];
|
|
189
|
-
}
|
|
190
|
-
const response = doResult.value;
|
|
191
|
-
|
|
192
|
-
const [result] = await M.match<
|
|
193
|
-
models.ConfirmedEnvelopeDto,
|
|
194
|
-
| OatFiSDKError
|
|
195
|
-
| ResponseValidationError
|
|
196
|
-
| ConnectionError
|
|
197
|
-
| RequestAbortedError
|
|
198
|
-
| RequestTimeoutError
|
|
199
|
-
| InvalidRequestError
|
|
200
|
-
| UnexpectedClientError
|
|
201
|
-
| SDKValidationError
|
|
202
|
-
>(
|
|
203
|
-
M.json(200, models.ConfirmedEnvelopeDto$inboundSchema),
|
|
204
|
-
M.fail([400, 401, 404, 409, 422, 429, "4XX"]),
|
|
205
|
-
M.fail("5XX"),
|
|
206
|
-
)(response, req);
|
|
207
|
-
if (!result.ok) {
|
|
208
|
-
return [result, { status: "complete", request: req, response }];
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return [result, { status: "complete", request: req, response }];
|
|
212
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import * as models from "../index.js";
|
|
8
|
-
|
|
9
|
-
export type NetworkControllerPatchHoldSecurity = {
|
|
10
|
-
username: string;
|
|
11
|
-
password: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type NetworkControllerPatchHoldRequest = {
|
|
15
|
-
/**
|
|
16
|
-
* Lender hold id (ipp_hold_id for IPP, lms_hold_id for LMS).
|
|
17
|
-
*/
|
|
18
|
-
holdId: string;
|
|
19
|
-
/**
|
|
20
|
-
* UUID idempotency key (lender dedupes for >= 24h).
|
|
21
|
-
*/
|
|
22
|
-
idempotencyKey: string;
|
|
23
|
-
/**
|
|
24
|
-
* Log-correlation id; new value per attempt.
|
|
25
|
-
*/
|
|
26
|
-
xNetworkRequestId: string;
|
|
27
|
-
/**
|
|
28
|
-
* Format OatFi-Network-Ledger/{semver}.
|
|
29
|
-
*/
|
|
30
|
-
userAgent: string;
|
|
31
|
-
/**
|
|
32
|
-
* Lender role for this call: `buyer` (LMS) or `vendor` (IPP). Validated by NetworkRoleGuard.
|
|
33
|
-
*/
|
|
34
|
-
xNetworkRole: string;
|
|
35
|
-
patchHoldRequestDto: models.PatchHoldRequestDto;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/** @internal */
|
|
39
|
-
export type NetworkControllerPatchHoldSecurity$Outbound = {
|
|
40
|
-
username: string;
|
|
41
|
-
password: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
export const NetworkControllerPatchHoldSecurity$outboundSchema: z.ZodType<
|
|
46
|
-
NetworkControllerPatchHoldSecurity$Outbound,
|
|
47
|
-
z.ZodTypeDef,
|
|
48
|
-
NetworkControllerPatchHoldSecurity
|
|
49
|
-
> = z.object({
|
|
50
|
-
username: z.string(),
|
|
51
|
-
password: z.string(),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export function networkControllerPatchHoldSecurityToJSON(
|
|
55
|
-
networkControllerPatchHoldSecurity: NetworkControllerPatchHoldSecurity,
|
|
56
|
-
): string {
|
|
57
|
-
return JSON.stringify(
|
|
58
|
-
NetworkControllerPatchHoldSecurity$outboundSchema.parse(
|
|
59
|
-
networkControllerPatchHoldSecurity,
|
|
60
|
-
),
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** @internal */
|
|
65
|
-
export type NetworkControllerPatchHoldRequest$Outbound = {
|
|
66
|
-
hold_id: string;
|
|
67
|
-
"Idempotency-Key": string;
|
|
68
|
-
"X-Network-Request-Id": string;
|
|
69
|
-
"User-Agent": string;
|
|
70
|
-
"X-Network-Role": string;
|
|
71
|
-
PatchHoldRequestDto: models.PatchHoldRequestDto$Outbound;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/** @internal */
|
|
75
|
-
export const NetworkControllerPatchHoldRequest$outboundSchema: z.ZodType<
|
|
76
|
-
NetworkControllerPatchHoldRequest$Outbound,
|
|
77
|
-
z.ZodTypeDef,
|
|
78
|
-
NetworkControllerPatchHoldRequest
|
|
79
|
-
> = z.object({
|
|
80
|
-
holdId: z.string(),
|
|
81
|
-
idempotencyKey: z.string(),
|
|
82
|
-
xNetworkRequestId: z.string(),
|
|
83
|
-
userAgent: z.string(),
|
|
84
|
-
xNetworkRole: z.string(),
|
|
85
|
-
patchHoldRequestDto: models.PatchHoldRequestDto$outboundSchema,
|
|
86
|
-
}).transform((v) => {
|
|
87
|
-
return remap$(v, {
|
|
88
|
-
holdId: "hold_id",
|
|
89
|
-
idempotencyKey: "Idempotency-Key",
|
|
90
|
-
xNetworkRequestId: "X-Network-Request-Id",
|
|
91
|
-
userAgent: "User-Agent",
|
|
92
|
-
xNetworkRole: "X-Network-Role",
|
|
93
|
-
patchHoldRequestDto: "PatchHoldRequestDto",
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
export function networkControllerPatchHoldRequestToJSON(
|
|
98
|
-
networkControllerPatchHoldRequest: NetworkControllerPatchHoldRequest,
|
|
99
|
-
): string {
|
|
100
|
-
return JSON.stringify(
|
|
101
|
-
NetworkControllerPatchHoldRequest$outboundSchema.parse(
|
|
102
|
-
networkControllerPatchHoldRequest,
|
|
103
|
-
),
|
|
104
|
-
);
|
|
105
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import * as models from "../index.js";
|
|
8
|
-
|
|
9
|
-
export type NetworkControllerRecordAdjustmentSecurity = {
|
|
10
|
-
username: string;
|
|
11
|
-
password: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type NetworkControllerRecordAdjustmentRequest = {
|
|
15
|
-
/**
|
|
16
|
-
* Partner-assigned external id of the ledger entry (the lender invoice external_id).
|
|
17
|
-
*/
|
|
18
|
-
ledgerEntryExternalId: string;
|
|
19
|
-
/**
|
|
20
|
-
* UUID idempotency key (lender dedupes for >= 24h).
|
|
21
|
-
*/
|
|
22
|
-
idempotencyKey: string;
|
|
23
|
-
/**
|
|
24
|
-
* Log-correlation id; new value per attempt.
|
|
25
|
-
*/
|
|
26
|
-
xNetworkRequestId: string;
|
|
27
|
-
/**
|
|
28
|
-
* Format OatFi-Network-Ledger/{semver}.
|
|
29
|
-
*/
|
|
30
|
-
userAgent: string;
|
|
31
|
-
/**
|
|
32
|
-
* Lender role for this call: `buyer` (LMS) or `vendor` (IPP). Validated by NetworkRoleGuard.
|
|
33
|
-
*/
|
|
34
|
-
xNetworkRole: string;
|
|
35
|
-
recordAdjustmentRequestDto: models.RecordAdjustmentRequestDto;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/** @internal */
|
|
39
|
-
export type NetworkControllerRecordAdjustmentSecurity$Outbound = {
|
|
40
|
-
username: string;
|
|
41
|
-
password: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
export const NetworkControllerRecordAdjustmentSecurity$outboundSchema:
|
|
46
|
-
z.ZodType<
|
|
47
|
-
NetworkControllerRecordAdjustmentSecurity$Outbound,
|
|
48
|
-
z.ZodTypeDef,
|
|
49
|
-
NetworkControllerRecordAdjustmentSecurity
|
|
50
|
-
> = z.object({
|
|
51
|
-
username: z.string(),
|
|
52
|
-
password: z.string(),
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export function networkControllerRecordAdjustmentSecurityToJSON(
|
|
56
|
-
networkControllerRecordAdjustmentSecurity:
|
|
57
|
-
NetworkControllerRecordAdjustmentSecurity,
|
|
58
|
-
): string {
|
|
59
|
-
return JSON.stringify(
|
|
60
|
-
NetworkControllerRecordAdjustmentSecurity$outboundSchema.parse(
|
|
61
|
-
networkControllerRecordAdjustmentSecurity,
|
|
62
|
-
),
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** @internal */
|
|
67
|
-
export type NetworkControllerRecordAdjustmentRequest$Outbound = {
|
|
68
|
-
ledger_entry_external_id: string;
|
|
69
|
-
"Idempotency-Key": string;
|
|
70
|
-
"X-Network-Request-Id": string;
|
|
71
|
-
"User-Agent": string;
|
|
72
|
-
"X-Network-Role": string;
|
|
73
|
-
RecordAdjustmentRequestDto: models.RecordAdjustmentRequestDto$Outbound;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/** @internal */
|
|
77
|
-
export const NetworkControllerRecordAdjustmentRequest$outboundSchema: z.ZodType<
|
|
78
|
-
NetworkControllerRecordAdjustmentRequest$Outbound,
|
|
79
|
-
z.ZodTypeDef,
|
|
80
|
-
NetworkControllerRecordAdjustmentRequest
|
|
81
|
-
> = z.object({
|
|
82
|
-
ledgerEntryExternalId: z.string(),
|
|
83
|
-
idempotencyKey: z.string(),
|
|
84
|
-
xNetworkRequestId: z.string(),
|
|
85
|
-
userAgent: z.string(),
|
|
86
|
-
xNetworkRole: z.string(),
|
|
87
|
-
recordAdjustmentRequestDto: models.RecordAdjustmentRequestDto$outboundSchema,
|
|
88
|
-
}).transform((v) => {
|
|
89
|
-
return remap$(v, {
|
|
90
|
-
ledgerEntryExternalId: "ledger_entry_external_id",
|
|
91
|
-
idempotencyKey: "Idempotency-Key",
|
|
92
|
-
xNetworkRequestId: "X-Network-Request-Id",
|
|
93
|
-
userAgent: "User-Agent",
|
|
94
|
-
xNetworkRole: "X-Network-Role",
|
|
95
|
-
recordAdjustmentRequestDto: "RecordAdjustmentRequestDto",
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
export function networkControllerRecordAdjustmentRequestToJSON(
|
|
100
|
-
networkControllerRecordAdjustmentRequest:
|
|
101
|
-
NetworkControllerRecordAdjustmentRequest,
|
|
102
|
-
): string {
|
|
103
|
-
return JSON.stringify(
|
|
104
|
-
NetworkControllerRecordAdjustmentRequest$outboundSchema.parse(
|
|
105
|
-
networkControllerRecordAdjustmentRequest,
|
|
106
|
-
),
|
|
107
|
-
);
|
|
108
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
-
|
|
8
|
-
export type PatchHoldRequestDto = {
|
|
9
|
-
/**
|
|
10
|
-
* Partner-assigned external id of the ledger entry whose hold is being amended (cross-check against the lender ledger).
|
|
11
|
-
*/
|
|
12
|
-
ledgerEntryExternalId: string;
|
|
13
|
-
/**
|
|
14
|
-
* Partner-assigned external id of the role-relevant counterparty (vendor for IPP, buyer for LMS) so the lender can link the amended hold to its onboarded business.
|
|
15
|
-
*/
|
|
16
|
-
businessExternalId: string;
|
|
17
|
-
/**
|
|
18
|
-
* New outstanding amount in cents after the negative adjustment. Must be lower than the original hold amount.
|
|
19
|
-
*/
|
|
20
|
-
outstandingAmount: number;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type PatchHoldRequestDto$Outbound = {
|
|
25
|
-
ledger_entry_external_id: string;
|
|
26
|
-
business_external_id: string;
|
|
27
|
-
outstanding_amount: number;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/** @internal */
|
|
31
|
-
export const PatchHoldRequestDto$outboundSchema: z.ZodType<
|
|
32
|
-
PatchHoldRequestDto$Outbound,
|
|
33
|
-
z.ZodTypeDef,
|
|
34
|
-
PatchHoldRequestDto
|
|
35
|
-
> = z.object({
|
|
36
|
-
ledgerEntryExternalId: z.string(),
|
|
37
|
-
businessExternalId: z.string(),
|
|
38
|
-
outstandingAmount: z.number(),
|
|
39
|
-
}).transform((v) => {
|
|
40
|
-
return remap$(v, {
|
|
41
|
-
ledgerEntryExternalId: "ledger_entry_external_id",
|
|
42
|
-
businessExternalId: "business_external_id",
|
|
43
|
-
outstandingAmount: "outstanding_amount",
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export function patchHoldRequestDtoToJSON(
|
|
48
|
-
patchHoldRequestDto: PatchHoldRequestDto,
|
|
49
|
-
): string {
|
|
50
|
-
return JSON.stringify(
|
|
51
|
-
PatchHoldRequestDto$outboundSchema.parse(patchHoldRequestDto),
|
|
52
|
-
);
|
|
53
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Adjustment classification. Mirrors the partner-side CreateAdjustmentDto.type enum.
|
|
11
|
-
*/
|
|
12
|
-
export const RecordAdjustmentRequestDtoType = {
|
|
13
|
-
Reward: "REWARD",
|
|
14
|
-
Return: "RETURN",
|
|
15
|
-
SaasPartnerFee: "SAAS_PARTNER_FEE",
|
|
16
|
-
Correction: "CORRECTION",
|
|
17
|
-
Discount: "DISCOUNT",
|
|
18
|
-
Allowance: "ALLOWANCE",
|
|
19
|
-
Damaged: "DAMAGED",
|
|
20
|
-
LateFee: "LATE_FEE",
|
|
21
|
-
FeeOther: "FEE_OTHER",
|
|
22
|
-
Other: "OTHER",
|
|
23
|
-
} as const;
|
|
24
|
-
/**
|
|
25
|
-
* Adjustment classification. Mirrors the partner-side CreateAdjustmentDto.type enum.
|
|
26
|
-
*/
|
|
27
|
-
export type RecordAdjustmentRequestDtoType = ClosedEnum<
|
|
28
|
-
typeof RecordAdjustmentRequestDtoType
|
|
29
|
-
>;
|
|
30
|
-
|
|
31
|
-
export type RecordAdjustmentRequestDto = {
|
|
32
|
-
/**
|
|
33
|
-
* Network's UUID for the adjustment record (lender SHOULD persist for cross-reference/dedup).
|
|
34
|
-
*/
|
|
35
|
-
adjustmentId: string;
|
|
36
|
-
/**
|
|
37
|
-
* Partner-assigned external id of the role-relevant counterparty (vendor for IPP, buyer for LMS) so the lender can link the adjustment to its onboarded business.
|
|
38
|
-
*/
|
|
39
|
-
businessExternalId: string;
|
|
40
|
-
/**
|
|
41
|
-
* Signed adjustment amount in cents. Positive grows outstanding_amount, negative shrinks it. Never zero.
|
|
42
|
-
*/
|
|
43
|
-
amount: number;
|
|
44
|
-
/**
|
|
45
|
-
* Adjustment classification. Mirrors the partner-side CreateAdjustmentDto.type enum.
|
|
46
|
-
*/
|
|
47
|
-
type: RecordAdjustmentRequestDtoType;
|
|
48
|
-
/**
|
|
49
|
-
* Optional free-text description provided by the partner at adjustment creation.
|
|
50
|
-
*/
|
|
51
|
-
description?: string | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* New outstanding_amount on the ledger entry after this adjustment is applied (lender cross-check).
|
|
54
|
-
*/
|
|
55
|
-
outstandingAmount: number;
|
|
56
|
-
/**
|
|
57
|
-
* Optional free-form metadata.
|
|
58
|
-
*/
|
|
59
|
-
metadata?: { [k: string]: any } | undefined;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/** @internal */
|
|
63
|
-
export const RecordAdjustmentRequestDtoType$outboundSchema: z.ZodNativeEnum<
|
|
64
|
-
typeof RecordAdjustmentRequestDtoType
|
|
65
|
-
> = z.nativeEnum(RecordAdjustmentRequestDtoType);
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export type RecordAdjustmentRequestDto$Outbound = {
|
|
69
|
-
adjustment_id: string;
|
|
70
|
-
business_external_id: string;
|
|
71
|
-
amount: number;
|
|
72
|
-
type: string;
|
|
73
|
-
description?: string | undefined;
|
|
74
|
-
outstanding_amount: number;
|
|
75
|
-
metadata?: { [k: string]: any } | undefined;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/** @internal */
|
|
79
|
-
export const RecordAdjustmentRequestDto$outboundSchema: z.ZodType<
|
|
80
|
-
RecordAdjustmentRequestDto$Outbound,
|
|
81
|
-
z.ZodTypeDef,
|
|
82
|
-
RecordAdjustmentRequestDto
|
|
83
|
-
> = z.object({
|
|
84
|
-
adjustmentId: z.string(),
|
|
85
|
-
businessExternalId: z.string(),
|
|
86
|
-
amount: z.number(),
|
|
87
|
-
type: RecordAdjustmentRequestDtoType$outboundSchema,
|
|
88
|
-
description: z.string().optional(),
|
|
89
|
-
outstandingAmount: z.number(),
|
|
90
|
-
metadata: z.record(z.any()).optional(),
|
|
91
|
-
}).transform((v) => {
|
|
92
|
-
return remap$(v, {
|
|
93
|
-
adjustmentId: "adjustment_id",
|
|
94
|
-
businessExternalId: "business_external_id",
|
|
95
|
-
outstandingAmount: "outstanding_amount",
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
export function recordAdjustmentRequestDtoToJSON(
|
|
100
|
-
recordAdjustmentRequestDto: RecordAdjustmentRequestDto,
|
|
101
|
-
): string {
|
|
102
|
-
return JSON.stringify(
|
|
103
|
-
RecordAdjustmentRequestDto$outboundSchema.parse(recordAdjustmentRequestDto),
|
|
104
|
-
);
|
|
105
|
-
}
|