@oatfi/oatfi-sdk-ts 0.12.4 → 0.12.5
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 +9 -0
- package/dist/commonjs/funcs/networkLedgerGetBusiness.d.ts +1 -1
- package/dist/commonjs/funcs/networkLedgerGetBusiness.d.ts.map +1 -1
- package/dist/commonjs/funcs/networkLedgerGetBusiness.js +1 -1
- package/dist/commonjs/funcs/networkLedgerGetBusiness.js.map +1 -1
- package/dist/commonjs/funcs/transactionsCreateBatch.d.ts +20 -0
- package/dist/commonjs/funcs/transactionsCreateBatch.d.ts.map +1 -0
- package/dist/commonjs/funcs/transactionsCreateBatch.js +132 -0
- package/dist/commonjs/funcs/transactionsCreateBatch.js.map +1 -0
- package/dist/commonjs/funcs/transactionsGetById.d.ts +20 -0
- package/dist/commonjs/funcs/transactionsGetById.d.ts.map +1 -0
- package/dist/commonjs/funcs/transactionsGetById.js +134 -0
- package/dist/commonjs/funcs/transactionsGetById.js.map +1 -0
- package/dist/commonjs/funcs/transactionsList.d.ts +22 -0
- package/dist/commonjs/funcs/transactionsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/transactionsList.js +163 -0
- package/dist/commonjs/funcs/transactionsList.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/businessdataresponsedto.d.ts +51 -0
- package/dist/commonjs/models/businessdataresponsedto.d.ts.map +1 -0
- package/dist/commonjs/models/businessdataresponsedto.js +75 -0
- package/dist/commonjs/models/businessdataresponsedto.js.map +1 -0
- package/dist/commonjs/models/businessresponsedto.d.ts +142 -21
- package/dist/commonjs/models/businessresponsedto.d.ts.map +1 -1
- package/dist/commonjs/models/businessresponsedto.js +76 -13
- package/dist/commonjs/models/businessresponsedto.js.map +1 -1
- package/dist/commonjs/models/createtransactionsdto.d.ts +26 -0
- package/dist/commonjs/models/createtransactionsdto.d.ts.map +1 -0
- package/dist/commonjs/models/createtransactionsdto.js +52 -0
- package/dist/commonjs/models/createtransactionsdto.js.map +1 -0
- package/dist/commonjs/models/increasedatadto.d.ts +21 -0
- package/dist/commonjs/models/increasedatadto.d.ts.map +1 -0
- package/dist/commonjs/models/increasedatadto.js +60 -0
- package/dist/commonjs/models/increasedatadto.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +11 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +11 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/lmsloantransactiontype.d.ts +33 -0
- package/dist/commonjs/models/lmsloantransactiontype.d.ts.map +1 -0
- package/dist/commonjs/models/lmsloantransactiontype.js +67 -0
- package/dist/commonjs/models/lmsloantransactiontype.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/transactionscontrollercreate.d.ts +18 -0
- package/dist/commonjs/models/operations/transactionscontrollercreate.d.ts.map +1 -0
- package/dist/commonjs/models/operations/transactionscontrollercreate.js +57 -0
- package/dist/commonjs/models/operations/transactionscontrollercreate.js.map +1 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindall.d.ts +44 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindall.d.ts.map +1 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindall.js +73 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindall.js.map +1 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindone.d.ts +15 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindone.d.ts.map +1 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindone.js +49 -0
- package/dist/commonjs/models/operations/transactionscontrollerfindone.js.map +1 -0
- package/dist/commonjs/models/paymentstatus.d.ts +22 -0
- package/dist/commonjs/models/paymentstatus.d.ts.map +1 -0
- package/dist/commonjs/models/paymentstatus.js +56 -0
- package/dist/commonjs/models/paymentstatus.js.map +1 -0
- package/dist/commonjs/models/storedtransactionlistresponsedto.d.ts +26 -0
- package/dist/commonjs/models/storedtransactionlistresponsedto.d.ts.map +1 -0
- package/dist/commonjs/models/storedtransactionlistresponsedto.js +60 -0
- package/dist/commonjs/models/storedtransactionlistresponsedto.js.map +1 -0
- package/dist/commonjs/models/storedtransactionresponsedto.d.ts +48 -0
- package/dist/commonjs/models/storedtransactionresponsedto.d.ts.map +1 -0
- package/dist/commonjs/models/storedtransactionresponsedto.js +68 -0
- package/dist/commonjs/models/storedtransactionresponsedto.js.map +1 -0
- package/dist/commonjs/models/transactiondirection.d.ts +12 -0
- package/dist/commonjs/models/transactiondirection.d.ts.map +1 -0
- package/dist/commonjs/models/transactiondirection.js +49 -0
- package/dist/commonjs/models/transactiondirection.js.map +1 -0
- package/dist/commonjs/models/transactionitemdto.d.ts +36 -0
- package/dist/commonjs/models/transactionitemdto.d.ts.map +1 -0
- package/dist/commonjs/models/transactionitemdto.js +54 -0
- package/dist/commonjs/models/transactionitemdto.js.map +1 -0
- package/dist/commonjs/models/transactionloandto.d.ts +25 -0
- package/dist/commonjs/models/transactionloandto.d.ts.map +1 -0
- package/dist/commonjs/models/transactionloandto.js +59 -0
- package/dist/commonjs/models/transactionloandto.js.map +1 -0
- package/dist/commonjs/models/transactionresponsedto.d.ts +56 -0
- package/dist/commonjs/models/transactionresponsedto.d.ts.map +1 -0
- package/dist/commonjs/models/transactionresponsedto.js +74 -0
- package/dist/commonjs/models/transactionresponsedto.js.map +1 -0
- package/dist/commonjs/sdk/networkledger.d.ts +1 -1
- package/dist/commonjs/sdk/networkledger.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/transactions.d.ts +30 -0
- package/dist/commonjs/sdk/transactions.d.ts.map +1 -0
- package/dist/commonjs/sdk/transactions.js +43 -0
- package/dist/commonjs/sdk/transactions.js.map +1 -0
- package/dist/esm/funcs/networkLedgerGetBusiness.d.ts +1 -1
- package/dist/esm/funcs/networkLedgerGetBusiness.d.ts.map +1 -1
- package/dist/esm/funcs/networkLedgerGetBusiness.js +1 -1
- package/dist/esm/funcs/networkLedgerGetBusiness.js.map +1 -1
- package/dist/esm/funcs/transactionsCreateBatch.d.ts +20 -0
- package/dist/esm/funcs/transactionsCreateBatch.d.ts.map +1 -0
- package/dist/esm/funcs/transactionsCreateBatch.js +96 -0
- package/dist/esm/funcs/transactionsCreateBatch.js.map +1 -0
- package/dist/esm/funcs/transactionsGetById.d.ts +20 -0
- package/dist/esm/funcs/transactionsGetById.d.ts.map +1 -0
- package/dist/esm/funcs/transactionsGetById.js +98 -0
- package/dist/esm/funcs/transactionsGetById.js.map +1 -0
- package/dist/esm/funcs/transactionsList.d.ts +22 -0
- package/dist/esm/funcs/transactionsList.d.ts.map +1 -0
- package/dist/esm/funcs/transactionsList.js +127 -0
- package/dist/esm/funcs/transactionsList.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/businessdataresponsedto.d.ts +51 -0
- package/dist/esm/models/businessdataresponsedto.d.ts.map +1 -0
- package/dist/esm/models/businessdataresponsedto.js +38 -0
- package/dist/esm/models/businessdataresponsedto.js.map +1 -0
- package/dist/esm/models/businessresponsedto.d.ts +142 -21
- package/dist/esm/models/businessresponsedto.d.ts.map +1 -1
- package/dist/esm/models/businessresponsedto.js +75 -12
- package/dist/esm/models/businessresponsedto.js.map +1 -1
- package/dist/esm/models/createtransactionsdto.d.ts +26 -0
- package/dist/esm/models/createtransactionsdto.d.ts.map +1 -0
- package/dist/esm/models/createtransactionsdto.js +15 -0
- package/dist/esm/models/createtransactionsdto.js.map +1 -0
- package/dist/esm/models/increasedatadto.d.ts +21 -0
- package/dist/esm/models/increasedatadto.d.ts.map +1 -0
- package/dist/esm/models/increasedatadto.js +23 -0
- package/dist/esm/models/increasedatadto.js.map +1 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +11 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/lmsloantransactiontype.d.ts +33 -0
- package/dist/esm/models/lmsloantransactiontype.d.ts.map +1 -0
- package/dist/esm/models/lmsloantransactiontype.js +31 -0
- package/dist/esm/models/lmsloantransactiontype.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/transactionscontrollercreate.d.ts +18 -0
- package/dist/esm/models/operations/transactionscontrollercreate.d.ts.map +1 -0
- package/dist/esm/models/operations/transactionscontrollercreate.js +20 -0
- package/dist/esm/models/operations/transactionscontrollercreate.js.map +1 -0
- package/dist/esm/models/operations/transactionscontrollerfindall.d.ts +44 -0
- package/dist/esm/models/operations/transactionscontrollerfindall.d.ts.map +1 -0
- package/dist/esm/models/operations/transactionscontrollerfindall.js +35 -0
- package/dist/esm/models/operations/transactionscontrollerfindall.js.map +1 -0
- package/dist/esm/models/operations/transactionscontrollerfindone.d.ts +15 -0
- package/dist/esm/models/operations/transactionscontrollerfindone.d.ts.map +1 -0
- package/dist/esm/models/operations/transactionscontrollerfindone.js +12 -0
- package/dist/esm/models/operations/transactionscontrollerfindone.js.map +1 -0
- package/dist/esm/models/paymentstatus.d.ts +22 -0
- package/dist/esm/models/paymentstatus.d.ts.map +1 -0
- package/dist/esm/models/paymentstatus.js +20 -0
- package/dist/esm/models/paymentstatus.js.map +1 -0
- package/dist/esm/models/storedtransactionlistresponsedto.d.ts +26 -0
- package/dist/esm/models/storedtransactionlistresponsedto.d.ts.map +1 -0
- package/dist/esm/models/storedtransactionlistresponsedto.js +23 -0
- package/dist/esm/models/storedtransactionlistresponsedto.js.map +1 -0
- package/dist/esm/models/storedtransactionresponsedto.d.ts +48 -0
- package/dist/esm/models/storedtransactionresponsedto.d.ts.map +1 -0
- package/dist/esm/models/storedtransactionresponsedto.js +31 -0
- package/dist/esm/models/storedtransactionresponsedto.js.map +1 -0
- package/dist/esm/models/transactiondirection.d.ts +12 -0
- package/dist/esm/models/transactiondirection.d.ts.map +1 -0
- package/dist/esm/models/transactiondirection.js +13 -0
- package/dist/esm/models/transactiondirection.js.map +1 -0
- package/dist/esm/models/transactionitemdto.d.ts +36 -0
- package/dist/esm/models/transactionitemdto.d.ts.map +1 -0
- package/dist/esm/models/transactionitemdto.js +17 -0
- package/dist/esm/models/transactionitemdto.js.map +1 -0
- package/dist/esm/models/transactionloandto.d.ts +25 -0
- package/dist/esm/models/transactionloandto.d.ts.map +1 -0
- package/dist/esm/models/transactionloandto.js +22 -0
- package/dist/esm/models/transactionloandto.js.map +1 -0
- package/dist/esm/models/transactionresponsedto.d.ts +56 -0
- package/dist/esm/models/transactionresponsedto.d.ts.map +1 -0
- package/dist/esm/models/transactionresponsedto.js +37 -0
- package/dist/esm/models/transactionresponsedto.js.map +1 -0
- package/dist/esm/sdk/networkledger.d.ts +1 -1
- package/dist/esm/sdk/networkledger.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/transactions.d.ts +30 -0
- package/dist/esm/sdk/transactions.d.ts.map +1 -0
- package/dist/esm/sdk/transactions.js +39 -0
- package/dist/esm/sdk/transactions.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/networkLedgerGetBusiness.ts +4 -4
- package/src/funcs/transactionsCreateBatch.ts +186 -0
- package/src/funcs/transactionsGetById.ts +184 -0
- package/src/funcs/transactionsList.ts +255 -0
- package/src/lib/config.ts +2 -2
- package/src/models/businessdataresponsedto.ts +94 -0
- package/src/models/businessresponsedto.ts +198 -31
- package/src/models/createtransactionsdto.ts +51 -0
- package/src/models/increasedatadto.ts +52 -0
- package/src/models/index.ts +11 -0
- package/src/models/lmsloantransactiontype.ts +40 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/transactionscontrollercreate.ts +46 -0
- package/src/models/operations/transactionscontrollerfindall.ts +98 -0
- package/src/models/operations/transactionscontrollerfindone.ts +36 -0
- package/src/models/paymentstatus.ts +29 -0
- package/src/models/storedtransactionlistresponsedto.ts +59 -0
- package/src/models/storedtransactionresponsedto.ts +89 -0
- package/src/models/transactiondirection.ts +21 -0
- package/src/models/transactionitemdto.ts +62 -0
- package/src/models/transactionloandto.ts +55 -0
- package/src/models/transactionresponsedto.ts +104 -0
- package/src/sdk/networkledger.ts +1 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/transactions.ts +70 -0
|
@@ -0,0 +1,52 @@
|
|
|
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 { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type IncreaseDataDto = {
|
|
13
|
+
/**
|
|
14
|
+
* Increase entity ID.
|
|
15
|
+
*/
|
|
16
|
+
entityId?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Increase account ID.
|
|
19
|
+
*/
|
|
20
|
+
accountId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the payout payment method associated with the Increase account.
|
|
23
|
+
*/
|
|
24
|
+
payoutPaymentMethod?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const IncreaseDataDto$inboundSchema: z.ZodType<
|
|
29
|
+
IncreaseDataDto,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
entity_id: types.optional(types.string()),
|
|
34
|
+
account_id: types.optional(types.string()),
|
|
35
|
+
payout_payment_method: types.optional(types.string()),
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"entity_id": "entityId",
|
|
39
|
+
"account_id": "accountId",
|
|
40
|
+
"payout_payment_method": "payoutPaymentMethod",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export function increaseDataDtoFromJSON(
|
|
45
|
+
jsonString: string,
|
|
46
|
+
): SafeParseResult<IncreaseDataDto, SDKValidationError> {
|
|
47
|
+
return safeParse(
|
|
48
|
+
jsonString,
|
|
49
|
+
(x) => IncreaseDataDto$inboundSchema.parse(JSON.parse(x)),
|
|
50
|
+
`Failed to parse 'IncreaseDataDto' from JSON`,
|
|
51
|
+
);
|
|
52
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from "./brandingresponsedto.js";
|
|
|
34
34
|
export * from "./bulkcreatebusinessrequestdto.js";
|
|
35
35
|
export * from "./businessbalancedto.js";
|
|
36
36
|
export * from "./businessbalancesummarydto.js";
|
|
37
|
+
export * from "./businessdataresponsedto.js";
|
|
37
38
|
export * from "./businessinformationdto.js";
|
|
38
39
|
export * from "./businesslistresponsedto.js";
|
|
39
40
|
export * from "./businessloanprogramenrollmentresponsedto.js";
|
|
@@ -75,6 +76,7 @@ export * from "./createprogramdto.js";
|
|
|
75
76
|
export * from "./createprogramsettingdto.js";
|
|
76
77
|
export * from "./createsupplementaldatadto.js";
|
|
77
78
|
export * from "./createtradingrelationshipdto.js";
|
|
79
|
+
export * from "./createtransactionsdto.js";
|
|
78
80
|
export * from "./customertype.js";
|
|
79
81
|
export * from "./dailyreportdto.js";
|
|
80
82
|
export * from "./delaybatchtimeframedto.js";
|
|
@@ -104,6 +106,7 @@ export * from "./getvirtualaccountinformationresponsedto.js";
|
|
|
104
106
|
export * from "./holdresponsedto.js";
|
|
105
107
|
export * from "./holdsettingsdto.js";
|
|
106
108
|
export * from "./increaseaccountstatement.js";
|
|
109
|
+
export * from "./increasedatadto.js";
|
|
107
110
|
export * from "./increasefilelink.js";
|
|
108
111
|
export * from "./increasetransactiondto.js";
|
|
109
112
|
export * from "./increasetransactioninvoicedto.js";
|
|
@@ -131,6 +134,7 @@ export * from "./listusersresponsedto.js";
|
|
|
131
134
|
export * from "./listusersupsertresponsedto.js";
|
|
132
135
|
export * from "./lmsbusinesstype.js";
|
|
133
136
|
export * from "./lmsloanprogramconfigrisktier.js";
|
|
137
|
+
export * from "./lmsloantransactiontype.js";
|
|
134
138
|
export * from "./lmspaymentrequeststatus.js";
|
|
135
139
|
export * from "./lmspaymentrequesttriggeredby.js";
|
|
136
140
|
export * from "./lmspurchaseconfirmationdto.js";
|
|
@@ -167,6 +171,7 @@ export * from "./paymentintentoriginationbalancedto.js";
|
|
|
167
171
|
export * from "./paymentintentresponsedto.js";
|
|
168
172
|
export * from "./paymentraildatadto.js";
|
|
169
173
|
export * from "./paymentreversaldto.js";
|
|
174
|
+
export * from "./paymentstatus.js";
|
|
170
175
|
export * from "./person.js";
|
|
171
176
|
export * from "./personinformationdto.js";
|
|
172
177
|
export * from "./plaidtokendto.js";
|
|
@@ -203,11 +208,17 @@ export * from "./startunderwritingdto.js";
|
|
|
203
208
|
export * from "./statedisclosureresponsedto.js";
|
|
204
209
|
export * from "./statusruledto.js";
|
|
205
210
|
export * from "./statusruleresponsedto.js";
|
|
211
|
+
export * from "./storedtransactionlistresponsedto.js";
|
|
212
|
+
export * from "./storedtransactionresponsedto.js";
|
|
206
213
|
export * from "./supplementaldataresponsedto.js";
|
|
207
214
|
export * from "./termssettingsdto.js";
|
|
208
215
|
export * from "./termssettingsrecipientdto.js";
|
|
209
216
|
export * from "./tradingrelationshiplistresponsedto.js";
|
|
210
217
|
export * from "./tradingrelationshipresponsedto.js";
|
|
218
|
+
export * from "./transactiondirection.js";
|
|
219
|
+
export * from "./transactionitemdto.js";
|
|
220
|
+
export * from "./transactionloandto.js";
|
|
221
|
+
export * from "./transactionresponsedto.js";
|
|
211
222
|
export * from "./transactionsettingsdto.js";
|
|
212
223
|
export * from "./transactionsreportresponsedto.js";
|
|
213
224
|
export * from "./transfermethodenum.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The type of the transaction.
|
|
10
|
+
*/
|
|
11
|
+
export const LmsLoanTransactionType = {
|
|
12
|
+
ChargedOff: "CHARGED_OFF",
|
|
13
|
+
ChargeOffReversal: "CHARGE_OFF_REVERSAL",
|
|
14
|
+
ClosedLoanAdjustment: "CLOSED_LOAN_ADJUSTMENT",
|
|
15
|
+
CommissionAdjustment: "COMMISSION_ADJUSTMENT",
|
|
16
|
+
DownPayment: "DOWN_PAYMENT",
|
|
17
|
+
FeeAdjustment: "FEE_ADJUSTMENT",
|
|
18
|
+
Funding: "FUNDING",
|
|
19
|
+
InterestAdjustment: "INTEREST_ADJUSTMENT",
|
|
20
|
+
LateFeeAdjustment: "LATE_FEE_ADJUSTMENT",
|
|
21
|
+
PrincipalAdjustment: "PRINCIPAL_ADJUSTMENT",
|
|
22
|
+
Recovery: "RECOVERY",
|
|
23
|
+
Repayment: "REPAYMENT",
|
|
24
|
+
Reversal: "REVERSAL",
|
|
25
|
+
Sale: "SALE",
|
|
26
|
+
SaleAdjustment: "SALE_ADJUSTMENT",
|
|
27
|
+
SaleReversal: "SALE_REVERSAL",
|
|
28
|
+
WriteOffAdjustment: "WRITE_OFF_ADJUSTMENT",
|
|
29
|
+
TransferAdjustment: "TRANSFER_ADJUSTMENT",
|
|
30
|
+
DeadAmountAdjustment: "DEAD_AMOUNT_ADJUSTMENT",
|
|
31
|
+
} as const;
|
|
32
|
+
/**
|
|
33
|
+
* The type of the transaction.
|
|
34
|
+
*/
|
|
35
|
+
export type LmsLoanTransactionType = ClosedEnum<typeof LmsLoanTransactionType>;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const LmsLoanTransactionType$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof LmsLoanTransactionType
|
|
40
|
+
> = z.nativeEnum(LmsLoanTransactionType);
|
|
@@ -180,6 +180,9 @@ export * from "./releasehold.js";
|
|
|
180
180
|
export * from "./statedisclosurescontrollergetstatedisclosure.js";
|
|
181
181
|
export * from "./tradingrelationshipscontrollercreate.js";
|
|
182
182
|
export * from "./tradingrelationshipscontrollerfind.js";
|
|
183
|
+
export * from "./transactionscontrollercreate.js";
|
|
184
|
+
export * from "./transactionscontrollerfindall.js";
|
|
185
|
+
export * from "./transactionscontrollerfindone.js";
|
|
183
186
|
export * from "./underwritingtermscontrollergetstatedisclosuretermshtml.js";
|
|
184
187
|
export * from "./underwritingtermscontrollergetunderwritingtermshtml.js";
|
|
185
188
|
export * from "./userscontrollerfindone.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
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 TransactionsControllerCreateRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* Unique key to prevent duplicate processing
|
|
12
|
+
*/
|
|
13
|
+
idempotencyKey: string;
|
|
14
|
+
createTransactionsDto: models.CreateTransactionsDto;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type TransactionsControllerCreateRequest$Outbound = {
|
|
19
|
+
"Idempotency-Key": string;
|
|
20
|
+
CreateTransactionsDto: models.CreateTransactionsDto$Outbound;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const TransactionsControllerCreateRequest$outboundSchema: z.ZodType<
|
|
25
|
+
TransactionsControllerCreateRequest$Outbound,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
TransactionsControllerCreateRequest
|
|
28
|
+
> = z.object({
|
|
29
|
+
idempotencyKey: z.string(),
|
|
30
|
+
createTransactionsDto: models.CreateTransactionsDto$outboundSchema,
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
idempotencyKey: "Idempotency-Key",
|
|
34
|
+
createTransactionsDto: "CreateTransactionsDto",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function transactionsControllerCreateRequestToJSON(
|
|
39
|
+
transactionsControllerCreateRequest: TransactionsControllerCreateRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
TransactionsControllerCreateRequest$outboundSchema.parse(
|
|
43
|
+
transactionsControllerCreateRequest,
|
|
44
|
+
),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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 { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as models from "../index.js";
|
|
11
|
+
|
|
12
|
+
export type TransactionsControllerFindAllRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Business id
|
|
15
|
+
*/
|
|
16
|
+
business: string;
|
|
17
|
+
/**
|
|
18
|
+
* Loan program id
|
|
19
|
+
*/
|
|
20
|
+
program: string;
|
|
21
|
+
/**
|
|
22
|
+
* Page size (default 10)
|
|
23
|
+
*/
|
|
24
|
+
limit?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Cursor: return results after this id
|
|
27
|
+
*/
|
|
28
|
+
startingAfter?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Cursor: return results before this id
|
|
31
|
+
*/
|
|
32
|
+
endingBefore?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type TransactionsControllerFindAllResponse = {
|
|
36
|
+
result: models.StoredTransactionListResponseDto;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type TransactionsControllerFindAllRequest$Outbound = {
|
|
41
|
+
business: string;
|
|
42
|
+
program: string;
|
|
43
|
+
limit?: number | undefined;
|
|
44
|
+
starting_after?: string | undefined;
|
|
45
|
+
ending_before?: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const TransactionsControllerFindAllRequest$outboundSchema: z.ZodType<
|
|
50
|
+
TransactionsControllerFindAllRequest$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
TransactionsControllerFindAllRequest
|
|
53
|
+
> = z.object({
|
|
54
|
+
business: z.string(),
|
|
55
|
+
program: z.string(),
|
|
56
|
+
limit: z.number().optional(),
|
|
57
|
+
startingAfter: z.string().optional(),
|
|
58
|
+
endingBefore: z.string().optional(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
startingAfter: "starting_after",
|
|
62
|
+
endingBefore: "ending_before",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export function transactionsControllerFindAllRequestToJSON(
|
|
67
|
+
transactionsControllerFindAllRequest: TransactionsControllerFindAllRequest,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
TransactionsControllerFindAllRequest$outboundSchema.parse(
|
|
71
|
+
transactionsControllerFindAllRequest,
|
|
72
|
+
),
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const TransactionsControllerFindAllResponse$inboundSchema: z.ZodType<
|
|
78
|
+
TransactionsControllerFindAllResponse,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
unknown
|
|
81
|
+
> = z.object({
|
|
82
|
+
Result: models.StoredTransactionListResponseDto$inboundSchema,
|
|
83
|
+
}).transform((v) => {
|
|
84
|
+
return remap$(v, {
|
|
85
|
+
"Result": "result",
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function transactionsControllerFindAllResponseFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<TransactionsControllerFindAllResponse, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) =>
|
|
95
|
+
TransactionsControllerFindAllResponse$inboundSchema.parse(JSON.parse(x)),
|
|
96
|
+
`Failed to parse 'TransactionsControllerFindAllResponse' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type TransactionsControllerFindOneRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The transaction (transfer) id
|
|
10
|
+
*/
|
|
11
|
+
transactionId: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type TransactionsControllerFindOneRequest$Outbound = {
|
|
16
|
+
transactionId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const TransactionsControllerFindOneRequest$outboundSchema: z.ZodType<
|
|
21
|
+
TransactionsControllerFindOneRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
TransactionsControllerFindOneRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
transactionId: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function transactionsControllerFindOneRequestToJSON(
|
|
29
|
+
transactionsControllerFindOneRequest: TransactionsControllerFindOneRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
TransactionsControllerFindOneRequest$outboundSchema.parse(
|
|
33
|
+
transactionsControllerFindOneRequest,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The status of the transaction (derived from the payment rail status).
|
|
10
|
+
*/
|
|
11
|
+
export const PaymentStatus = {
|
|
12
|
+
Pending: "PENDING",
|
|
13
|
+
Processing: "PROCESSING",
|
|
14
|
+
Processed: "PROCESSED",
|
|
15
|
+
Succeeded: "SUCCEEDED",
|
|
16
|
+
Failed: "FAILED",
|
|
17
|
+
Corrected: "CORRECTED",
|
|
18
|
+
Canceled: "CANCELED",
|
|
19
|
+
Error: "ERROR",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* The status of the transaction (derived from the payment rail status).
|
|
23
|
+
*/
|
|
24
|
+
export type PaymentStatus = ClosedEnum<typeof PaymentStatus>;
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const PaymentStatus$inboundSchema: z.ZodNativeEnum<
|
|
28
|
+
typeof PaymentStatus
|
|
29
|
+
> = z.nativeEnum(PaymentStatus);
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
StoredTransactionResponseDto,
|
|
13
|
+
StoredTransactionResponseDto$inboundSchema,
|
|
14
|
+
} from "./storedtransactionresponsedto.js";
|
|
15
|
+
|
|
16
|
+
export type StoredTransactionListResponseDto = {
|
|
17
|
+
/**
|
|
18
|
+
* Type of the response
|
|
19
|
+
*/
|
|
20
|
+
object: string;
|
|
21
|
+
/**
|
|
22
|
+
* Array of stored transaction objects
|
|
23
|
+
*/
|
|
24
|
+
data: Array<StoredTransactionResponseDto>;
|
|
25
|
+
/**
|
|
26
|
+
* Whether there are more items to fetch
|
|
27
|
+
*/
|
|
28
|
+
hasMore: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Total number of items
|
|
31
|
+
*/
|
|
32
|
+
total: number;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const StoredTransactionListResponseDto$inboundSchema: z.ZodType<
|
|
37
|
+
StoredTransactionListResponseDto,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({
|
|
41
|
+
object: types.string().default("list"),
|
|
42
|
+
data: z.array(StoredTransactionResponseDto$inboundSchema),
|
|
43
|
+
has_more: types.boolean(),
|
|
44
|
+
total: types.number(),
|
|
45
|
+
}).transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
"has_more": "hasMore",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function storedTransactionListResponseDtoFromJSON(
|
|
52
|
+
jsonString: string,
|
|
53
|
+
): SafeParseResult<StoredTransactionListResponseDto, SDKValidationError> {
|
|
54
|
+
return safeParse(
|
|
55
|
+
jsonString,
|
|
56
|
+
(x) => StoredTransactionListResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'StoredTransactionListResponseDto' from JSON`,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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 { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
TransactionDirection,
|
|
13
|
+
TransactionDirection$inboundSchema,
|
|
14
|
+
} from "./transactiondirection.js";
|
|
15
|
+
|
|
16
|
+
export type StoredTransactionResponseDto = {
|
|
17
|
+
object: string;
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier of the transaction
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Transaction amount in cents
|
|
24
|
+
*/
|
|
25
|
+
amount: number;
|
|
26
|
+
/**
|
|
27
|
+
* Human-readable description of the transaction
|
|
28
|
+
*/
|
|
29
|
+
description: string;
|
|
30
|
+
/**
|
|
31
|
+
* Partner-defined transaction type
|
|
32
|
+
*/
|
|
33
|
+
type: string;
|
|
34
|
+
direction: TransactionDirection;
|
|
35
|
+
/**
|
|
36
|
+
* Business the transaction belongs to
|
|
37
|
+
*/
|
|
38
|
+
business: string;
|
|
39
|
+
/**
|
|
40
|
+
* Loan program the transaction belongs to
|
|
41
|
+
*/
|
|
42
|
+
program: string;
|
|
43
|
+
/**
|
|
44
|
+
* Transaction date (ISO 8601)
|
|
45
|
+
*/
|
|
46
|
+
date: string;
|
|
47
|
+
/**
|
|
48
|
+
* Creation timestamp (ISO 8601)
|
|
49
|
+
*/
|
|
50
|
+
createdAt: string;
|
|
51
|
+
/**
|
|
52
|
+
* Last update timestamp (ISO 8601)
|
|
53
|
+
*/
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const StoredTransactionResponseDto$inboundSchema: z.ZodType<
|
|
59
|
+
StoredTransactionResponseDto,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
unknown
|
|
62
|
+
> = z.object({
|
|
63
|
+
object: types.string().default("transaction"),
|
|
64
|
+
id: types.string(),
|
|
65
|
+
amount: types.number(),
|
|
66
|
+
description: types.string(),
|
|
67
|
+
type: types.string(),
|
|
68
|
+
direction: TransactionDirection$inboundSchema,
|
|
69
|
+
business: types.string(),
|
|
70
|
+
program: types.string(),
|
|
71
|
+
date: types.string(),
|
|
72
|
+
created_at: types.string(),
|
|
73
|
+
updated_at: types.string(),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
"created_at": "createdAt",
|
|
77
|
+
"updated_at": "updatedAt",
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function storedTransactionResponseDtoFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<StoredTransactionResponseDto, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => StoredTransactionResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'StoredTransactionResponseDto' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const TransactionDirection = {
|
|
9
|
+
Credit: "credit",
|
|
10
|
+
Debit: "debit",
|
|
11
|
+
} as const;
|
|
12
|
+
export type TransactionDirection = ClosedEnum<typeof TransactionDirection>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const TransactionDirection$inboundSchema: z.ZodNativeEnum<
|
|
16
|
+
typeof TransactionDirection
|
|
17
|
+
> = z.nativeEnum(TransactionDirection);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const TransactionDirection$outboundSchema: z.ZodNativeEnum<
|
|
20
|
+
typeof TransactionDirection
|
|
21
|
+
> = TransactionDirection$inboundSchema;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
TransactionDirection,
|
|
8
|
+
TransactionDirection$outboundSchema,
|
|
9
|
+
} from "./transactiondirection.js";
|
|
10
|
+
|
|
11
|
+
export type TransactionItemDto = {
|
|
12
|
+
/**
|
|
13
|
+
* Transaction amount in cents
|
|
14
|
+
*/
|
|
15
|
+
amount: number;
|
|
16
|
+
/**
|
|
17
|
+
* Human-readable description of the transaction
|
|
18
|
+
*/
|
|
19
|
+
description: string;
|
|
20
|
+
/**
|
|
21
|
+
* Partner-defined transaction type (free-form)
|
|
22
|
+
*/
|
|
23
|
+
type: string;
|
|
24
|
+
/**
|
|
25
|
+
* credit (refund/return) or debit (purchase/spend)
|
|
26
|
+
*/
|
|
27
|
+
direction: TransactionDirection;
|
|
28
|
+
/**
|
|
29
|
+
* Transaction date (ISO 8601)
|
|
30
|
+
*/
|
|
31
|
+
date: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type TransactionItemDto$Outbound = {
|
|
36
|
+
amount: number;
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
direction: string;
|
|
40
|
+
date: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const TransactionItemDto$outboundSchema: z.ZodType<
|
|
45
|
+
TransactionItemDto$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
TransactionItemDto
|
|
48
|
+
> = z.object({
|
|
49
|
+
amount: z.number(),
|
|
50
|
+
description: z.string(),
|
|
51
|
+
type: z.string(),
|
|
52
|
+
direction: TransactionDirection$outboundSchema,
|
|
53
|
+
date: z.string(),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function transactionItemDtoToJSON(
|
|
57
|
+
transactionItemDto: TransactionItemDto,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
TransactionItemDto$outboundSchema.parse(transactionItemDto),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type TransactionLoanDto = {
|
|
13
|
+
/**
|
|
14
|
+
* The origination (loan) id the transaction line belongs to.
|
|
15
|
+
*/
|
|
16
|
+
origination?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The original amount of the loan in cents.
|
|
19
|
+
*/
|
|
20
|
+
amount?: number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The payment intent (invoice) id linked to the loan.
|
|
23
|
+
*/
|
|
24
|
+
paymentIntent?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The business id the loan belongs to.
|
|
27
|
+
*/
|
|
28
|
+
business?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const TransactionLoanDto$inboundSchema: z.ZodType<
|
|
33
|
+
TransactionLoanDto,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
origination: types.optional(types.string()),
|
|
38
|
+
amount: types.optional(types.number()),
|
|
39
|
+
payment_intent: types.optional(types.string()),
|
|
40
|
+
business: types.optional(types.string()),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"payment_intent": "paymentIntent",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function transactionLoanDtoFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<TransactionLoanDto, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => TransactionLoanDto$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'TransactionLoanDto' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|