@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,255 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { JsonValue, query as jpQuery } from "jsonpath-rfc9535";
|
|
6
|
+
import { OatFiSDKCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import { OatFiSDKError } from "../models/errors/oatfisdkerror.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.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
|
+
import {
|
|
29
|
+
createPageIterator,
|
|
30
|
+
haltIterator,
|
|
31
|
+
PageIterator,
|
|
32
|
+
Paginator,
|
|
33
|
+
} from "../types/operations.js";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* List stored transactions
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Finance-only. Lists partner-uploaded transactions for a business and loan program.
|
|
40
|
+
*
|
|
41
|
+
* If set, this operation will use {@link Security.bearer} from the global security.
|
|
42
|
+
*/
|
|
43
|
+
export function transactionsList(
|
|
44
|
+
client: OatFiSDKCore,
|
|
45
|
+
request: operations.TransactionsControllerFindAllRequest,
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<
|
|
48
|
+
PageIterator<
|
|
49
|
+
Result<
|
|
50
|
+
operations.TransactionsControllerFindAllResponse,
|
|
51
|
+
| OatFiSDKError
|
|
52
|
+
| ResponseValidationError
|
|
53
|
+
| ConnectionError
|
|
54
|
+
| RequestAbortedError
|
|
55
|
+
| RequestTimeoutError
|
|
56
|
+
| InvalidRequestError
|
|
57
|
+
| UnexpectedClientError
|
|
58
|
+
| SDKValidationError
|
|
59
|
+
>,
|
|
60
|
+
{ cursor: string }
|
|
61
|
+
>
|
|
62
|
+
> {
|
|
63
|
+
return new APIPromise($do(
|
|
64
|
+
client,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function $do(
|
|
71
|
+
client: OatFiSDKCore,
|
|
72
|
+
request: operations.TransactionsControllerFindAllRequest,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
PageIterator<
|
|
77
|
+
Result<
|
|
78
|
+
operations.TransactionsControllerFindAllResponse,
|
|
79
|
+
| OatFiSDKError
|
|
80
|
+
| ResponseValidationError
|
|
81
|
+
| ConnectionError
|
|
82
|
+
| RequestAbortedError
|
|
83
|
+
| RequestTimeoutError
|
|
84
|
+
| InvalidRequestError
|
|
85
|
+
| UnexpectedClientError
|
|
86
|
+
| SDKValidationError
|
|
87
|
+
>,
|
|
88
|
+
{ cursor: string }
|
|
89
|
+
>,
|
|
90
|
+
APICall,
|
|
91
|
+
]
|
|
92
|
+
> {
|
|
93
|
+
const parsed = safeParse(
|
|
94
|
+
request,
|
|
95
|
+
(value) =>
|
|
96
|
+
operations.TransactionsControllerFindAllRequest$outboundSchema.parse(
|
|
97
|
+
value,
|
|
98
|
+
),
|
|
99
|
+
"Input validation failed",
|
|
100
|
+
);
|
|
101
|
+
if (!parsed.ok) {
|
|
102
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
103
|
+
}
|
|
104
|
+
const payload = parsed.value;
|
|
105
|
+
const body = null;
|
|
106
|
+
|
|
107
|
+
const path = pathToFunc("/v3/transactions")();
|
|
108
|
+
|
|
109
|
+
const query = encodeFormQuery({
|
|
110
|
+
"business": payload.business,
|
|
111
|
+
"ending_before": payload.ending_before,
|
|
112
|
+
"limit": payload.limit,
|
|
113
|
+
"program": payload.program,
|
|
114
|
+
"starting_after": payload.starting_after,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const headers = new Headers(compactMap({
|
|
118
|
+
Accept: "application/json",
|
|
119
|
+
}));
|
|
120
|
+
|
|
121
|
+
const secConfig = await extractSecurity(client._options.bearer);
|
|
122
|
+
const securityInput = secConfig == null ? {} : { bearer: secConfig };
|
|
123
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
124
|
+
|
|
125
|
+
const context = {
|
|
126
|
+
options: client._options,
|
|
127
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
128
|
+
operationID: "TransactionsController_findAll",
|
|
129
|
+
oAuth2Scopes: null,
|
|
130
|
+
|
|
131
|
+
resolvedSecurity: requestSecurity,
|
|
132
|
+
|
|
133
|
+
securitySource: client._options.bearer,
|
|
134
|
+
retryConfig: options?.retries
|
|
135
|
+
|| client._options.retryConfig
|
|
136
|
+
|| {
|
|
137
|
+
strategy: "backoff",
|
|
138
|
+
backoff: {
|
|
139
|
+
initialInterval: 500,
|
|
140
|
+
maxInterval: 60000,
|
|
141
|
+
exponent: 1.5,
|
|
142
|
+
maxElapsedTime: 120000,
|
|
143
|
+
},
|
|
144
|
+
retryConnectionErrors: true,
|
|
145
|
+
}
|
|
146
|
+
|| { strategy: "none" },
|
|
147
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const requestRes = client._createRequest(context, {
|
|
151
|
+
security: requestSecurity,
|
|
152
|
+
method: "GET",
|
|
153
|
+
baseURL: options?.serverURL,
|
|
154
|
+
path: path,
|
|
155
|
+
headers: headers,
|
|
156
|
+
query: query,
|
|
157
|
+
body: body,
|
|
158
|
+
uaHeader: "x-speakeasy-user-agent",
|
|
159
|
+
userAgent: client._options.userAgent,
|
|
160
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
161
|
+
}, options);
|
|
162
|
+
if (!requestRes.ok) {
|
|
163
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
164
|
+
}
|
|
165
|
+
const req = requestRes.value;
|
|
166
|
+
|
|
167
|
+
const doResult = await client._do(req, {
|
|
168
|
+
context,
|
|
169
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
170
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
171
|
+
retryConfig: context.retryConfig,
|
|
172
|
+
retryCodes: context.retryCodes,
|
|
173
|
+
});
|
|
174
|
+
if (!doResult.ok) {
|
|
175
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
176
|
+
}
|
|
177
|
+
const response = doResult.value;
|
|
178
|
+
|
|
179
|
+
const responseFields = {
|
|
180
|
+
HttpMeta: { Response: response, Request: req },
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const [result, raw] = await M.match<
|
|
184
|
+
operations.TransactionsControllerFindAllResponse,
|
|
185
|
+
| OatFiSDKError
|
|
186
|
+
| ResponseValidationError
|
|
187
|
+
| ConnectionError
|
|
188
|
+
| RequestAbortedError
|
|
189
|
+
| RequestTimeoutError
|
|
190
|
+
| InvalidRequestError
|
|
191
|
+
| UnexpectedClientError
|
|
192
|
+
| SDKValidationError
|
|
193
|
+
>(
|
|
194
|
+
M.json(
|
|
195
|
+
200,
|
|
196
|
+
operations.TransactionsControllerFindAllResponse$inboundSchema,
|
|
197
|
+
{ key: "Result" },
|
|
198
|
+
),
|
|
199
|
+
M.fail([400, 403, 429, "4XX"]),
|
|
200
|
+
M.fail("5XX"),
|
|
201
|
+
)(response, req, { extraFields: responseFields });
|
|
202
|
+
if (!result.ok) {
|
|
203
|
+
return [haltIterator(result), {
|
|
204
|
+
status: "complete",
|
|
205
|
+
request: req,
|
|
206
|
+
response,
|
|
207
|
+
}];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const nextFunc = (
|
|
211
|
+
responseData: unknown,
|
|
212
|
+
): {
|
|
213
|
+
next: Paginator<
|
|
214
|
+
Result<
|
|
215
|
+
operations.TransactionsControllerFindAllResponse,
|
|
216
|
+
| OatFiSDKError
|
|
217
|
+
| ResponseValidationError
|
|
218
|
+
| ConnectionError
|
|
219
|
+
| RequestAbortedError
|
|
220
|
+
| RequestTimeoutError
|
|
221
|
+
| InvalidRequestError
|
|
222
|
+
| UnexpectedClientError
|
|
223
|
+
| SDKValidationError
|
|
224
|
+
>
|
|
225
|
+
>;
|
|
226
|
+
"~next"?: { cursor: string };
|
|
227
|
+
} => {
|
|
228
|
+
const nextCursor = jpQuery(responseData as JsonValue, "$.data[-1].id")[0];
|
|
229
|
+
if (typeof nextCursor !== "string") {
|
|
230
|
+
return { next: () => null };
|
|
231
|
+
}
|
|
232
|
+
if (nextCursor.trim() === "") {
|
|
233
|
+
return { next: () => null };
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const nextVal = () =>
|
|
237
|
+
transactionsList(
|
|
238
|
+
client,
|
|
239
|
+
{
|
|
240
|
+
...request,
|
|
241
|
+
startingAfter: nextCursor,
|
|
242
|
+
},
|
|
243
|
+
options,
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
return { next: nextVal, "~next": { cursor: nextCursor } };
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
250
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
251
|
+
status: "complete",
|
|
252
|
+
request: req,
|
|
253
|
+
response,
|
|
254
|
+
}];
|
|
255
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -69,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
69
69
|
export const SDK_METADATA = {
|
|
70
70
|
language: "typescript",
|
|
71
71
|
openapiDocVersion: "3.0.0",
|
|
72
|
-
sdkVersion: "0.12.
|
|
72
|
+
sdkVersion: "0.12.5",
|
|
73
73
|
genVersion: "2.912.1",
|
|
74
74
|
userAgent:
|
|
75
|
-
"speakeasy-sdk/typescript 0.12.
|
|
75
|
+
"speakeasy-sdk/typescript 0.12.5 2.912.1 3.0.0 @oatfi/oatfi-sdk-ts",
|
|
76
76
|
} as const;
|
|
@@ -0,0 +1,94 @@
|
|
|
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 { ClosedEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Lender-side account state. inactive covers suspended/frozen/closed/blocked.
|
|
15
|
+
*/
|
|
16
|
+
export const BusinessDataResponseDtoStatus = {
|
|
17
|
+
Active: "active",
|
|
18
|
+
Inactive: "inactive",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* Lender-side account state. inactive covers suspended/frozen/closed/blocked.
|
|
22
|
+
*/
|
|
23
|
+
export type BusinessDataResponseDtoStatus = ClosedEnum<
|
|
24
|
+
typeof BusinessDataResponseDtoStatus
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
export type BusinessDataResponseDto = {
|
|
28
|
+
/**
|
|
29
|
+
* Partner-assigned external id (the path key).
|
|
30
|
+
*/
|
|
31
|
+
externalId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Lender-side account state. inactive covers suspended/frozen/closed/blocked.
|
|
34
|
+
*/
|
|
35
|
+
status: BusinessDataResponseDtoStatus;
|
|
36
|
+
/**
|
|
37
|
+
* Legal business name.
|
|
38
|
+
*/
|
|
39
|
+
name?: string | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Tax id (e.g. EIN).
|
|
42
|
+
*/
|
|
43
|
+
taxId?: string | null | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Legal entity type.
|
|
46
|
+
*/
|
|
47
|
+
businessEntityType?: string | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Unix ms when the lender created its record.
|
|
50
|
+
*/
|
|
51
|
+
createdAt?: number | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Unix ms of the last update.
|
|
54
|
+
*/
|
|
55
|
+
updatedAt?: number | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const BusinessDataResponseDtoStatus$inboundSchema: z.ZodNativeEnum<
|
|
60
|
+
typeof BusinessDataResponseDtoStatus
|
|
61
|
+
> = z.nativeEnum(BusinessDataResponseDtoStatus);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const BusinessDataResponseDto$inboundSchema: z.ZodType<
|
|
65
|
+
BusinessDataResponseDto,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
unknown
|
|
68
|
+
> = z.object({
|
|
69
|
+
external_id: types.string(),
|
|
70
|
+
status: BusinessDataResponseDtoStatus$inboundSchema,
|
|
71
|
+
name: z.nullable(types.string()).optional(),
|
|
72
|
+
tax_id: z.nullable(types.string()).optional(),
|
|
73
|
+
business_entity_type: z.nullable(types.string()).optional(),
|
|
74
|
+
created_at: types.optional(types.number()),
|
|
75
|
+
updated_at: types.optional(types.number()),
|
|
76
|
+
}).transform((v) => {
|
|
77
|
+
return remap$(v, {
|
|
78
|
+
"external_id": "externalId",
|
|
79
|
+
"tax_id": "taxId",
|
|
80
|
+
"business_entity_type": "businessEntityType",
|
|
81
|
+
"created_at": "createdAt",
|
|
82
|
+
"updated_at": "updatedAt",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export function businessDataResponseDtoFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<BusinessDataResponseDto, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => BusinessDataResponseDto$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'BusinessDataResponseDto' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -8,57 +8,187 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
import { ClosedEnum } from "../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
10
|
import * as types from "../types/primitives.js";
|
|
11
|
+
import { AddressDto, AddressDto$inboundSchema } from "./addressdto.js";
|
|
11
12
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
13
|
+
import {
|
|
14
|
+
IncreaseDataDto,
|
|
15
|
+
IncreaseDataDto$inboundSchema,
|
|
16
|
+
} from "./increasedatadto.js";
|
|
12
17
|
|
|
13
18
|
/**
|
|
14
|
-
*
|
|
19
|
+
* Current status of the business account
|
|
15
20
|
*/
|
|
16
|
-
export const
|
|
17
|
-
Active: "
|
|
18
|
-
|
|
21
|
+
export const AccountStatus = {
|
|
22
|
+
Active: "ACTIVE",
|
|
23
|
+
Frozen: "FROZEN",
|
|
24
|
+
Inactive: "INACTIVE",
|
|
25
|
+
Closed: "CLOSED",
|
|
26
|
+
BlockList: "BLOCK_LIST",
|
|
19
27
|
} as const;
|
|
20
28
|
/**
|
|
21
|
-
*
|
|
29
|
+
* Current status of the business account
|
|
22
30
|
*/
|
|
23
|
-
export type
|
|
24
|
-
|
|
31
|
+
export type AccountStatus = ClosedEnum<typeof AccountStatus>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Current sub-status of the business account
|
|
35
|
+
*/
|
|
36
|
+
export const AccountSubStatus = {
|
|
37
|
+
Standard: "STANDARD",
|
|
38
|
+
Manual: "MANUAL",
|
|
39
|
+
ManualLock: "MANUAL_LOCK",
|
|
40
|
+
Dq: "DQ",
|
|
41
|
+
WaiveDrawRules: "WAIVE_DRAW_RULES",
|
|
42
|
+
Unit: "UNIT",
|
|
43
|
+
} as const;
|
|
44
|
+
/**
|
|
45
|
+
* Current sub-status of the business account
|
|
46
|
+
*/
|
|
47
|
+
export type AccountSubStatus = ClosedEnum<typeof AccountSubStatus>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Source of the requested credit limit.
|
|
51
|
+
*/
|
|
52
|
+
export const BusinessResponseDtoRequestedLimitSource = {
|
|
53
|
+
Partner: "Partner",
|
|
54
|
+
Customer: "Customer",
|
|
55
|
+
} as const;
|
|
56
|
+
/**
|
|
57
|
+
* Source of the requested credit limit.
|
|
58
|
+
*/
|
|
59
|
+
export type BusinessResponseDtoRequestedLimitSource = ClosedEnum<
|
|
60
|
+
typeof BusinessResponseDtoRequestedLimitSource
|
|
25
61
|
>;
|
|
26
62
|
|
|
27
63
|
export type BusinessResponseDto = {
|
|
28
64
|
/**
|
|
29
|
-
*
|
|
65
|
+
* Unique identifier for the business.
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* String representing the object's type. Always 'business'.
|
|
70
|
+
*/
|
|
71
|
+
object: string;
|
|
72
|
+
/**
|
|
73
|
+
* External identifier for the business.
|
|
74
|
+
*/
|
|
75
|
+
externalId?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Identifier of the platform this business is associated with.
|
|
78
|
+
*/
|
|
79
|
+
platform?: string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* List of financial account IDs associated with this business.
|
|
82
|
+
*/
|
|
83
|
+
financialAccounts?: Array<string> | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* List of Plaid token IDs associated with this business.
|
|
86
|
+
*/
|
|
87
|
+
plaidTokens?: Array<string> | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* List of person IDs associated with this business.
|
|
90
|
+
*/
|
|
91
|
+
persons?: Array<string> | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Legal name of the business.
|
|
94
|
+
*/
|
|
95
|
+
name?: string | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Doing Business As (DBA) name.
|
|
98
|
+
*/
|
|
99
|
+
dbaName?: string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Tax ID (e.g., EIN for US businesses).
|
|
102
|
+
*/
|
|
103
|
+
taxId?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Business address.
|
|
106
|
+
*/
|
|
107
|
+
address?: AddressDto | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Contact person's first name. Populated from the primary user's first name.
|
|
110
|
+
*/
|
|
111
|
+
contactFirstName?: string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Contact person's last name. Populated from the primary user's last name.
|
|
114
|
+
*/
|
|
115
|
+
contactLastName?: string | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Contact person's email address. Populated from the primary user's email.
|
|
118
|
+
*/
|
|
119
|
+
contactEmail?: string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Contact person's phone number.
|
|
122
|
+
*/
|
|
123
|
+
contactPhone?: string | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Month the business started (MM).
|
|
126
|
+
*/
|
|
127
|
+
businessStartDateMonth?: string | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Year the business started (YYYY).
|
|
30
130
|
*/
|
|
31
|
-
|
|
131
|
+
businessStartDateYear?: string | undefined;
|
|
32
132
|
/**
|
|
33
|
-
*
|
|
133
|
+
* Type of business entity (e.g., corporation, llc).
|
|
34
134
|
*/
|
|
35
|
-
|
|
135
|
+
businessEntityType?: string | undefined;
|
|
36
136
|
/**
|
|
37
|
-
*
|
|
137
|
+
* Current status of the business account
|
|
38
138
|
*/
|
|
39
|
-
|
|
139
|
+
accountStatus?: AccountStatus | undefined;
|
|
40
140
|
/**
|
|
41
|
-
*
|
|
141
|
+
* Current sub-status of the business account
|
|
42
142
|
*/
|
|
43
|
-
|
|
143
|
+
accountSubStatus?: AccountSubStatus | undefined;
|
|
44
144
|
/**
|
|
45
|
-
*
|
|
145
|
+
* Timestamp of when the business was created.
|
|
46
146
|
*/
|
|
47
|
-
|
|
147
|
+
createdAt?: Date | undefined;
|
|
48
148
|
/**
|
|
49
|
-
*
|
|
149
|
+
* Timestamp of when the business was last updated.
|
|
50
150
|
*/
|
|
51
|
-
|
|
151
|
+
updatedAt?: Date | undefined;
|
|
52
152
|
/**
|
|
53
|
-
*
|
|
153
|
+
* List of user IDs associated with this business.
|
|
54
154
|
*/
|
|
55
|
-
|
|
155
|
+
users?: Array<string> | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* ID of the primary user associated with this business.
|
|
158
|
+
*/
|
|
159
|
+
primaryUser?: string | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Source of the requested credit limit.
|
|
162
|
+
*/
|
|
163
|
+
requestedLimitSource?: BusinessResponseDtoRequestedLimitSource | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Requested credit limit amount.
|
|
166
|
+
*/
|
|
167
|
+
requestedCreditLimit?: number | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* A set of key-value pairs that can be used to store additional information about the object.
|
|
170
|
+
*/
|
|
171
|
+
metadata?: { [k: string]: any } | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Increase account data associated with this business.
|
|
174
|
+
*/
|
|
175
|
+
increase?: IncreaseDataDto | undefined;
|
|
56
176
|
};
|
|
57
177
|
|
|
58
178
|
/** @internal */
|
|
59
|
-
export const
|
|
60
|
-
typeof
|
|
61
|
-
> = z.nativeEnum(
|
|
179
|
+
export const AccountStatus$inboundSchema: z.ZodNativeEnum<
|
|
180
|
+
typeof AccountStatus
|
|
181
|
+
> = z.nativeEnum(AccountStatus);
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const AccountSubStatus$inboundSchema: z.ZodNativeEnum<
|
|
185
|
+
typeof AccountSubStatus
|
|
186
|
+
> = z.nativeEnum(AccountSubStatus);
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
export const BusinessResponseDtoRequestedLimitSource$inboundSchema:
|
|
190
|
+
z.ZodNativeEnum<typeof BusinessResponseDtoRequestedLimitSource> = z
|
|
191
|
+
.nativeEnum(BusinessResponseDtoRequestedLimitSource);
|
|
62
192
|
|
|
63
193
|
/** @internal */
|
|
64
194
|
export const BusinessResponseDto$inboundSchema: z.ZodType<
|
|
@@ -66,20 +196,57 @@ export const BusinessResponseDto$inboundSchema: z.ZodType<
|
|
|
66
196
|
z.ZodTypeDef,
|
|
67
197
|
unknown
|
|
68
198
|
> = z.object({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
199
|
+
id: types.string(),
|
|
200
|
+
object: types.string().default("business"),
|
|
201
|
+
external_id: types.optional(types.string()),
|
|
202
|
+
platform: types.optional(types.string()),
|
|
203
|
+
financial_accounts: types.optional(z.array(types.string())),
|
|
204
|
+
plaid_tokens: types.optional(z.array(types.string())),
|
|
205
|
+
persons: types.optional(z.array(types.string())),
|
|
206
|
+
name: types.optional(types.string()),
|
|
207
|
+
dba_name: types.optional(types.string()),
|
|
208
|
+
tax_id: types.optional(types.string()),
|
|
209
|
+
address: types.optional(AddressDto$inboundSchema),
|
|
210
|
+
contact_first_name: types.optional(types.string()),
|
|
211
|
+
contact_last_name: types.optional(types.string()),
|
|
212
|
+
contact_email: types.optional(types.string()),
|
|
213
|
+
contact_phone: types.optional(types.string()),
|
|
214
|
+
business_start_date_month: types.optional(types.string()),
|
|
215
|
+
business_start_date_year: types.optional(types.string()),
|
|
216
|
+
business_entity_type: types.optional(types.string()),
|
|
217
|
+
account_status: types.optional(AccountStatus$inboundSchema),
|
|
218
|
+
account_sub_status: types.optional(AccountSubStatus$inboundSchema),
|
|
219
|
+
created_at: types.optional(types.date()),
|
|
220
|
+
updated_at: types.optional(types.date()),
|
|
221
|
+
users: types.optional(z.array(types.string())),
|
|
222
|
+
primary_user: types.optional(types.string()),
|
|
223
|
+
requested_limit_source: types.optional(
|
|
224
|
+
BusinessResponseDtoRequestedLimitSource$inboundSchema,
|
|
225
|
+
),
|
|
226
|
+
requested_credit_limit: types.optional(types.number()),
|
|
227
|
+
metadata: types.optional(z.record(z.any())),
|
|
228
|
+
increase: types.optional(IncreaseDataDto$inboundSchema),
|
|
76
229
|
}).transform((v) => {
|
|
77
230
|
return remap$(v, {
|
|
78
231
|
"external_id": "externalId",
|
|
232
|
+
"financial_accounts": "financialAccounts",
|
|
233
|
+
"plaid_tokens": "plaidTokens",
|
|
234
|
+
"dba_name": "dbaName",
|
|
79
235
|
"tax_id": "taxId",
|
|
236
|
+
"contact_first_name": "contactFirstName",
|
|
237
|
+
"contact_last_name": "contactLastName",
|
|
238
|
+
"contact_email": "contactEmail",
|
|
239
|
+
"contact_phone": "contactPhone",
|
|
240
|
+
"business_start_date_month": "businessStartDateMonth",
|
|
241
|
+
"business_start_date_year": "businessStartDateYear",
|
|
80
242
|
"business_entity_type": "businessEntityType",
|
|
243
|
+
"account_status": "accountStatus",
|
|
244
|
+
"account_sub_status": "accountSubStatus",
|
|
81
245
|
"created_at": "createdAt",
|
|
82
246
|
"updated_at": "updatedAt",
|
|
247
|
+
"primary_user": "primaryUser",
|
|
248
|
+
"requested_limit_source": "requestedLimitSource",
|
|
249
|
+
"requested_credit_limit": "requestedCreditLimit",
|
|
83
250
|
});
|
|
84
251
|
});
|
|
85
252
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
TransactionItemDto,
|
|
8
|
+
TransactionItemDto$Outbound,
|
|
9
|
+
TransactionItemDto$outboundSchema,
|
|
10
|
+
} from "./transactionitemdto.js";
|
|
11
|
+
|
|
12
|
+
export type CreateTransactionsDto = {
|
|
13
|
+
/**
|
|
14
|
+
* Business the transactions belong to
|
|
15
|
+
*/
|
|
16
|
+
business: string;
|
|
17
|
+
/**
|
|
18
|
+
* Loan program the transactions belong to
|
|
19
|
+
*/
|
|
20
|
+
program: string;
|
|
21
|
+
/**
|
|
22
|
+
* Transactions to store
|
|
23
|
+
*/
|
|
24
|
+
transactions: Array<TransactionItemDto>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type CreateTransactionsDto$Outbound = {
|
|
29
|
+
business: string;
|
|
30
|
+
program: string;
|
|
31
|
+
transactions: Array<TransactionItemDto$Outbound>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const CreateTransactionsDto$outboundSchema: z.ZodType<
|
|
36
|
+
CreateTransactionsDto$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
CreateTransactionsDto
|
|
39
|
+
> = z.object({
|
|
40
|
+
business: z.string(),
|
|
41
|
+
program: z.string(),
|
|
42
|
+
transactions: z.array(TransactionItemDto$outboundSchema),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function createTransactionsDtoToJSON(
|
|
46
|
+
createTransactionsDto: CreateTransactionsDto,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(
|
|
49
|
+
CreateTransactionsDto$outboundSchema.parse(createTransactionsDto),
|
|
50
|
+
);
|
|
51
|
+
}
|