mollie-api-typescript 1.3.7 → 1.3.8
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 +11 -0
- package/bin/mcp-server.js +1206 -233
- package/bin/mcp-server.js.map +26 -9
- package/dist/commonjs/funcs/unmatchedCreditTransfersGet.d.ts +23 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersGet.js +140 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersGet.js.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersList.d.ts +29 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersList.js +179 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersList.js.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersMatch.d.ts +23 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersMatch.d.ts.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersMatch.js +141 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersMatch.js.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersReturn.d.ts +23 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersReturn.d.ts.map +1 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersReturn.js +140 -0
- package/dist/commonjs/funcs/unmatchedCreditTransfersReturn.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +9 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersGet.js +69 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersGet.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersList.js +72 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersMatch.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersMatch.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersMatch.js +69 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersMatch.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersReturn.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersReturn.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersReturn.js +69 -0
- package/dist/commonjs/mcp-server/tools/unmatchedCreditTransfersReturn.js.map +1 -0
- package/dist/commonjs/models/entityunmatchedcredittransfer.d.ts +214 -0
- package/dist/commonjs/models/entityunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/commonjs/models/entityunmatchedcredittransfer.js +204 -0
- package/dist/commonjs/models/entityunmatchedcredittransfer.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +8 -8
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +11 -11
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +5 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +5 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/listentityunmatchedcredittransfer.d.ts +191 -0
- package/dist/commonjs/models/listentityunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/commonjs/models/listentityunmatchedcredittransfer.js +185 -0
- package/dist/commonjs/models/listentityunmatchedcredittransfer.js.map +1 -0
- package/dist/commonjs/models/operations/getunmatchedcredittransfer.d.ts +25 -0
- package/dist/commonjs/models/operations/getunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getunmatchedcredittransfer.js +70 -0
- package/dist/commonjs/models/operations/getunmatchedcredittransfer.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listunmatchedcredittransfers.d.ts +95 -0
- package/dist/commonjs/models/operations/listunmatchedcredittransfers.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listunmatchedcredittransfers.js +151 -0
- package/dist/commonjs/models/operations/listunmatchedcredittransfers.js.map +1 -0
- package/dist/commonjs/models/operations/matchunmatchedcredittransfer.d.ts +28 -0
- package/dist/commonjs/models/operations/matchunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/matchunmatchedcredittransfer.js +77 -0
- package/dist/commonjs/models/operations/matchunmatchedcredittransfer.js.map +1 -0
- package/dist/commonjs/models/operations/returnunmatchedcredittransfer.d.ts +25 -0
- package/dist/commonjs/models/operations/returnunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/returnunmatchedcredittransfer.js +70 -0
- package/dist/commonjs/models/operations/returnunmatchedcredittransfer.js.map +1 -0
- package/dist/commonjs/models/unmatchedcredittransferactionresponse.d.ts +164 -0
- package/dist/commonjs/models/unmatchedcredittransferactionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/unmatchedcredittransferactionresponse.js +175 -0
- package/dist/commonjs/models/unmatchedcredittransferactionresponse.js.map +1 -0
- package/dist/commonjs/models/unmatchedcredittransfermatchrequest.d.ts +20 -0
- package/dist/commonjs/models/unmatchedcredittransfermatchrequest.d.ts.map +1 -0
- package/dist/commonjs/models/unmatchedcredittransfermatchrequest.js +59 -0
- package/dist/commonjs/models/unmatchedcredittransfermatchrequest.js.map +1 -0
- package/dist/commonjs/models/unmatchedcredittransferstatus.d.ts +14 -0
- package/dist/commonjs/models/unmatchedcredittransferstatus.d.ts.map +1 -0
- package/dist/commonjs/models/unmatchedcredittransferstatus.js +52 -0
- package/dist/commonjs/models/unmatchedcredittransferstatus.js.map +1 -0
- 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/unmatchedcredittransfers.d.ts +55 -0
- package/dist/commonjs/sdk/unmatchedcredittransfers.d.ts.map +1 -0
- package/dist/commonjs/sdk/unmatchedcredittransfers.js +72 -0
- package/dist/commonjs/sdk/unmatchedcredittransfers.js.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersGet.d.ts +23 -0
- package/dist/esm/funcs/unmatchedCreditTransfersGet.d.ts.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersGet.js +104 -0
- package/dist/esm/funcs/unmatchedCreditTransfersGet.js.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersList.d.ts +29 -0
- package/dist/esm/funcs/unmatchedCreditTransfersList.d.ts.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersList.js +143 -0
- package/dist/esm/funcs/unmatchedCreditTransfersList.js.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersMatch.d.ts +23 -0
- package/dist/esm/funcs/unmatchedCreditTransfersMatch.d.ts.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersMatch.js +105 -0
- package/dist/esm/funcs/unmatchedCreditTransfersMatch.js.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersReturn.d.ts +23 -0
- package/dist/esm/funcs/unmatchedCreditTransfersReturn.d.ts.map +1 -0
- package/dist/esm/funcs/unmatchedCreditTransfersReturn.js +104 -0
- package/dist/esm/funcs/unmatchedCreditTransfersReturn.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +9 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersGet.js +33 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersGet.js.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersList.js +36 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersList.js.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersMatch.d.ts +8 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersMatch.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersMatch.js +33 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersMatch.js.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersReturn.d.ts +8 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersReturn.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersReturn.js +33 -0
- package/dist/esm/mcp-server/tools/unmatchedCreditTransfersReturn.js.map +1 -0
- package/dist/esm/models/entityunmatchedcredittransfer.d.ts +214 -0
- package/dist/esm/models/entityunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/esm/models/entityunmatchedcredittransfer.js +154 -0
- package/dist/esm/models/entityunmatchedcredittransfer.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +8 -8
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +8 -8
- package/dist/esm/models/errorresponse.js.map +1 -1
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/listentityunmatchedcredittransfer.d.ts +191 -0
- package/dist/esm/models/listentityunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/esm/models/listentityunmatchedcredittransfer.js +137 -0
- package/dist/esm/models/listentityunmatchedcredittransfer.js.map +1 -0
- package/dist/esm/models/operations/getunmatchedcredittransfer.d.ts +25 -0
- package/dist/esm/models/operations/getunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/esm/models/operations/getunmatchedcredittransfer.js +32 -0
- package/dist/esm/models/operations/getunmatchedcredittransfer.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listunmatchedcredittransfers.d.ts +95 -0
- package/dist/esm/models/operations/listunmatchedcredittransfers.d.ts.map +1 -0
- package/dist/esm/models/operations/listunmatchedcredittransfers.js +107 -0
- package/dist/esm/models/operations/listunmatchedcredittransfers.js.map +1 -0
- package/dist/esm/models/operations/matchunmatchedcredittransfer.d.ts +28 -0
- package/dist/esm/models/operations/matchunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/esm/models/operations/matchunmatchedcredittransfer.js +39 -0
- package/dist/esm/models/operations/matchunmatchedcredittransfer.js.map +1 -0
- package/dist/esm/models/operations/returnunmatchedcredittransfer.d.ts +25 -0
- package/dist/esm/models/operations/returnunmatchedcredittransfer.d.ts.map +1 -0
- package/dist/esm/models/operations/returnunmatchedcredittransfer.js +32 -0
- package/dist/esm/models/operations/returnunmatchedcredittransfer.js.map +1 -0
- package/dist/esm/models/unmatchedcredittransferactionresponse.d.ts +164 -0
- package/dist/esm/models/unmatchedcredittransferactionresponse.d.ts.map +1 -0
- package/dist/esm/models/unmatchedcredittransferactionresponse.js +129 -0
- package/dist/esm/models/unmatchedcredittransferactionresponse.js.map +1 -0
- package/dist/esm/models/unmatchedcredittransfermatchrequest.d.ts +20 -0
- package/dist/esm/models/unmatchedcredittransfermatchrequest.d.ts.map +1 -0
- package/dist/esm/models/unmatchedcredittransfermatchrequest.js +21 -0
- package/dist/esm/models/unmatchedcredittransfermatchrequest.js.map +1 -0
- package/dist/esm/models/unmatchedcredittransferstatus.d.ts +14 -0
- package/dist/esm/models/unmatchedcredittransferstatus.d.ts.map +1 -0
- package/dist/esm/models/unmatchedcredittransferstatus.js +16 -0
- package/dist/esm/models/unmatchedcredittransferstatus.js.map +1 -0
- 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/unmatchedcredittransfers.d.ts +55 -0
- package/dist/esm/sdk/unmatchedcredittransfers.d.ts.map +1 -0
- package/dist/esm/sdk/unmatchedcredittransfers.js +68 -0
- package/dist/esm/sdk/unmatchedcredittransfers.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/unmatchedCreditTransfersGet.ts +202 -0
- package/src/funcs/unmatchedCreditTransfersList.ts +274 -0
- package/src/funcs/unmatchedCreditTransfersMatch.ts +209 -0
- package/src/funcs/unmatchedCreditTransfersReturn.ts +204 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/unmatchedCreditTransfersGet.ts +42 -0
- package/src/mcp-server/tools/unmatchedCreditTransfersList.ts +45 -0
- package/src/mcp-server/tools/unmatchedCreditTransfersMatch.ts +42 -0
- package/src/mcp-server/tools/unmatchedCreditTransfersReturn.ts +43 -0
- package/src/models/entityunmatchedcredittransfer.ts +538 -0
- package/src/models/errorresponse.ts +21 -17
- package/src/models/index.ts +5 -0
- package/src/models/listentityunmatchedcredittransfer.ts +476 -0
- package/src/models/operations/getunmatchedcredittransfer.ts +73 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listunmatchedcredittransfers.ts +287 -0
- package/src/models/operations/matchunmatchedcredittransfer.ts +89 -0
- package/src/models/operations/returnunmatchedcredittransfer.ts +74 -0
- package/src/models/unmatchedcredittransferactionresponse.ts +426 -0
- package/src/models/unmatchedcredittransfermatchrequest.ts +58 -0
- package/src/models/unmatchedcredittransferstatus.ts +31 -0
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/unmatchedcredittransfers.ts +107 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 36626725b614
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ClientCore } from "../core.js";
|
|
7
|
+
import { dlv } from "../lib/dlv.js";
|
|
8
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.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 { ClientError } from "../models/errors/clienterror.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/httpclienterrors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
import {
|
|
30
|
+
createPageIterator,
|
|
31
|
+
haltIterator,
|
|
32
|
+
PageIterator,
|
|
33
|
+
Paginator,
|
|
34
|
+
URL_OVERRIDE,
|
|
35
|
+
} from "../types/operations.js";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* List unmatched credit transfers
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* > 🚧 Beta feature
|
|
42
|
+
* >
|
|
43
|
+
* > This feature is currently in private beta, and the final specification may still change.
|
|
44
|
+
*
|
|
45
|
+
* Retrieves a list of unmatched credit transfers for the profile.
|
|
46
|
+
*
|
|
47
|
+
* The results are paginated.
|
|
48
|
+
*/
|
|
49
|
+
export function unmatchedCreditTransfersList(
|
|
50
|
+
client: ClientCore,
|
|
51
|
+
request?: operations.ListUnmatchedCreditTransfersRequest | undefined,
|
|
52
|
+
options?: RequestOptions & { [URL_OVERRIDE]?: URL },
|
|
53
|
+
): APIPromise<
|
|
54
|
+
PageIterator<
|
|
55
|
+
Result<
|
|
56
|
+
operations.ListUnmatchedCreditTransfersResponse,
|
|
57
|
+
| errors.ErrorResponse
|
|
58
|
+
| ClientError
|
|
59
|
+
| ResponseValidationError
|
|
60
|
+
| ConnectionError
|
|
61
|
+
| RequestAbortedError
|
|
62
|
+
| RequestTimeoutError
|
|
63
|
+
| InvalidRequestError
|
|
64
|
+
| UnexpectedClientError
|
|
65
|
+
| SDKValidationError
|
|
66
|
+
>,
|
|
67
|
+
{ url: string }
|
|
68
|
+
>
|
|
69
|
+
> {
|
|
70
|
+
return new APIPromise($do(
|
|
71
|
+
client,
|
|
72
|
+
request,
|
|
73
|
+
options,
|
|
74
|
+
));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function $do(
|
|
78
|
+
client: ClientCore,
|
|
79
|
+
request?: operations.ListUnmatchedCreditTransfersRequest | undefined,
|
|
80
|
+
options?: RequestOptions & { [URL_OVERRIDE]?: URL },
|
|
81
|
+
): Promise<
|
|
82
|
+
[
|
|
83
|
+
PageIterator<
|
|
84
|
+
Result<
|
|
85
|
+
operations.ListUnmatchedCreditTransfersResponse,
|
|
86
|
+
| errors.ErrorResponse
|
|
87
|
+
| ClientError
|
|
88
|
+
| ResponseValidationError
|
|
89
|
+
| ConnectionError
|
|
90
|
+
| RequestAbortedError
|
|
91
|
+
| RequestTimeoutError
|
|
92
|
+
| InvalidRequestError
|
|
93
|
+
| UnexpectedClientError
|
|
94
|
+
| SDKValidationError
|
|
95
|
+
>,
|
|
96
|
+
{ url: string }
|
|
97
|
+
>,
|
|
98
|
+
APICall,
|
|
99
|
+
]
|
|
100
|
+
> {
|
|
101
|
+
const parsed = safeParse(
|
|
102
|
+
request,
|
|
103
|
+
(value) =>
|
|
104
|
+
operations.ListUnmatchedCreditTransfersRequest$outboundSchema.optional()
|
|
105
|
+
.parse(value),
|
|
106
|
+
"Input validation failed",
|
|
107
|
+
);
|
|
108
|
+
if (!parsed.ok) {
|
|
109
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
110
|
+
}
|
|
111
|
+
const payload = parsed.value;
|
|
112
|
+
const body = null;
|
|
113
|
+
|
|
114
|
+
const path = options?.[URL_OVERRIDE]
|
|
115
|
+
? ""
|
|
116
|
+
: pathToFunc("/unmatched-credit-transfers")();
|
|
117
|
+
|
|
118
|
+
const query = options?.[URL_OVERRIDE]
|
|
119
|
+
? options[URL_OVERRIDE].search.substring(1)
|
|
120
|
+
: encodeFormQuery({
|
|
121
|
+
"from": payload?.from,
|
|
122
|
+
"limit": payload?.limit,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const headers = new Headers(compactMap({
|
|
126
|
+
Accept: "application/hal+json",
|
|
127
|
+
"idempotency-key": encodeSimple(
|
|
128
|
+
"idempotency-key",
|
|
129
|
+
payload?.["idempotency-key"],
|
|
130
|
+
{ explode: false, charEncoding: "none" },
|
|
131
|
+
),
|
|
132
|
+
}));
|
|
133
|
+
|
|
134
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
135
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
136
|
+
|
|
137
|
+
const context = {
|
|
138
|
+
options: client._options,
|
|
139
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
140
|
+
operationID: "list-unmatched-credit-transfers",
|
|
141
|
+
oAuth2Scopes: null,
|
|
142
|
+
|
|
143
|
+
resolvedSecurity: requestSecurity,
|
|
144
|
+
|
|
145
|
+
securitySource: client._options.security,
|
|
146
|
+
retryConfig: options?.retries
|
|
147
|
+
|| client._options.retryConfig
|
|
148
|
+
|| {
|
|
149
|
+
strategy: "backoff",
|
|
150
|
+
backoff: {
|
|
151
|
+
initialInterval: 500,
|
|
152
|
+
maxInterval: 5000,
|
|
153
|
+
exponent: 2,
|
|
154
|
+
maxElapsedTime: 7500,
|
|
155
|
+
},
|
|
156
|
+
retryConnectionErrors: true,
|
|
157
|
+
}
|
|
158
|
+
|| { strategy: "none" },
|
|
159
|
+
retryCodes: options?.retryCodes || ["5xx"],
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const requestRes = client._createRequest(context, {
|
|
163
|
+
security: requestSecurity,
|
|
164
|
+
method: "GET",
|
|
165
|
+
baseURL: options?.[URL_OVERRIDE]?.href || options?.serverURL,
|
|
166
|
+
path: path,
|
|
167
|
+
headers: headers,
|
|
168
|
+
query: query,
|
|
169
|
+
body: body,
|
|
170
|
+
userAgent: client._options.userAgent,
|
|
171
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
172
|
+
}, options);
|
|
173
|
+
if (!requestRes.ok) {
|
|
174
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
175
|
+
}
|
|
176
|
+
const req = requestRes.value;
|
|
177
|
+
|
|
178
|
+
const doResult = await client._do(req, {
|
|
179
|
+
context,
|
|
180
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
181
|
+
retryConfig: context.retryConfig,
|
|
182
|
+
retryCodes: context.retryCodes,
|
|
183
|
+
});
|
|
184
|
+
if (!doResult.ok) {
|
|
185
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
186
|
+
}
|
|
187
|
+
const response = doResult.value;
|
|
188
|
+
|
|
189
|
+
const responseFields = {
|
|
190
|
+
HttpMeta: { Response: response, Request: req },
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const [result, raw] = await M.match<
|
|
194
|
+
operations.ListUnmatchedCreditTransfersResponse,
|
|
195
|
+
| errors.ErrorResponse
|
|
196
|
+
| ClientError
|
|
197
|
+
| ResponseValidationError
|
|
198
|
+
| ConnectionError
|
|
199
|
+
| RequestAbortedError
|
|
200
|
+
| RequestTimeoutError
|
|
201
|
+
| InvalidRequestError
|
|
202
|
+
| UnexpectedClientError
|
|
203
|
+
| SDKValidationError
|
|
204
|
+
>(
|
|
205
|
+
M.json(200, operations.ListUnmatchedCreditTransfersResponse$inboundSchema, {
|
|
206
|
+
ctype: "application/hal+json",
|
|
207
|
+
key: "Result",
|
|
208
|
+
}),
|
|
209
|
+
M.jsonErr(400, errors.ErrorResponse$inboundSchema, {
|
|
210
|
+
ctype: "application/hal+json",
|
|
211
|
+
}),
|
|
212
|
+
M.fail("4XX"),
|
|
213
|
+
M.fail("5XX"),
|
|
214
|
+
)(response, req, { extraFields: responseFields });
|
|
215
|
+
if (!result.ok) {
|
|
216
|
+
return [haltIterator(result), {
|
|
217
|
+
status: "complete",
|
|
218
|
+
request: req,
|
|
219
|
+
response,
|
|
220
|
+
}];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const nextFunc = (
|
|
224
|
+
responseData: unknown,
|
|
225
|
+
): {
|
|
226
|
+
next: Paginator<
|
|
227
|
+
Result<
|
|
228
|
+
operations.ListUnmatchedCreditTransfersResponse,
|
|
229
|
+
| errors.ErrorResponse
|
|
230
|
+
| ClientError
|
|
231
|
+
| ResponseValidationError
|
|
232
|
+
| ConnectionError
|
|
233
|
+
| RequestAbortedError
|
|
234
|
+
| RequestTimeoutError
|
|
235
|
+
| InvalidRequestError
|
|
236
|
+
| UnexpectedClientError
|
|
237
|
+
| SDKValidationError
|
|
238
|
+
>
|
|
239
|
+
>;
|
|
240
|
+
"~next"?: { url: string };
|
|
241
|
+
} => {
|
|
242
|
+
let nextURL = dlv(responseData, "_links.next.href");
|
|
243
|
+
if (typeof nextURL !== "string") {
|
|
244
|
+
return { next: () => null };
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
try {
|
|
248
|
+
if (nextURL.startsWith("/")) {
|
|
249
|
+
nextURL = new URL(nextURL, client._baseURL ?? "").href;
|
|
250
|
+
}
|
|
251
|
+
new URL(nextURL);
|
|
252
|
+
} catch (_error) {
|
|
253
|
+
return { next: () => null };
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const nextVal = () =>
|
|
257
|
+
unmatchedCreditTransfersList(
|
|
258
|
+
client,
|
|
259
|
+
{
|
|
260
|
+
...request!,
|
|
261
|
+
},
|
|
262
|
+
{ ...options, [URL_OVERRIDE]: new URL(nextURL) },
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
return { next: nextVal, "~next": { url: nextURL } };
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
269
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
270
|
+
status: "complete",
|
|
271
|
+
request: req,
|
|
272
|
+
response,
|
|
273
|
+
}];
|
|
274
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6d3713093d1a
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ClientCore } from "../core.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.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 { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { ClientError } from "../models/errors/clienterror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as models from "../models/index.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Match unmatched credit transfer
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* > 🚧 Beta feature
|
|
35
|
+
* >
|
|
36
|
+
* > This feature is currently in private beta, and the final specification may still change.
|
|
37
|
+
*
|
|
38
|
+
* Matches an unmatched credit transfer to one or more payments, settling the funds accordingly.
|
|
39
|
+
*/
|
|
40
|
+
export function unmatchedCreditTransfersMatch(
|
|
41
|
+
client: ClientCore,
|
|
42
|
+
request: operations.MatchUnmatchedCreditTransferRequest,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): APIPromise<
|
|
45
|
+
Result<
|
|
46
|
+
models.UnmatchedCreditTransferActionResponse,
|
|
47
|
+
| errors.ErrorResponse
|
|
48
|
+
| ClientError
|
|
49
|
+
| ResponseValidationError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| InvalidRequestError
|
|
54
|
+
| UnexpectedClientError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: ClientCore,
|
|
67
|
+
request: operations.MatchUnmatchedCreditTransferRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
models.UnmatchedCreditTransferActionResponse,
|
|
73
|
+
| errors.ErrorResponse
|
|
74
|
+
| ClientError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) =>
|
|
89
|
+
operations.MatchUnmatchedCreditTransferRequest$outboundSchema.parse(
|
|
90
|
+
value,
|
|
91
|
+
),
|
|
92
|
+
"Input validation failed",
|
|
93
|
+
);
|
|
94
|
+
if (!parsed.ok) {
|
|
95
|
+
return [parsed, { status: "invalid" }];
|
|
96
|
+
}
|
|
97
|
+
const payload = parsed.value;
|
|
98
|
+
const body = encodeJSON(
|
|
99
|
+
"body",
|
|
100
|
+
payload["unmatched-credit-transfer-match-request"],
|
|
101
|
+
{ explode: true },
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const pathParams = {
|
|
105
|
+
unmatchedCreditTransferId: encodeSimple(
|
|
106
|
+
"unmatchedCreditTransferId",
|
|
107
|
+
payload.unmatchedCreditTransferId,
|
|
108
|
+
{ explode: false, charEncoding: "percent" },
|
|
109
|
+
),
|
|
110
|
+
};
|
|
111
|
+
const path = pathToFunc(
|
|
112
|
+
"/unmatched-credit-transfers/{unmatchedCreditTransferId}/match",
|
|
113
|
+
)(pathParams);
|
|
114
|
+
|
|
115
|
+
const headers = new Headers(compactMap({
|
|
116
|
+
"Content-Type": "application/json",
|
|
117
|
+
Accept: "application/hal+json",
|
|
118
|
+
"idempotency-key": encodeSimple(
|
|
119
|
+
"idempotency-key",
|
|
120
|
+
payload["idempotency-key"],
|
|
121
|
+
{ explode: false, charEncoding: "none" },
|
|
122
|
+
),
|
|
123
|
+
}));
|
|
124
|
+
|
|
125
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
126
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
127
|
+
|
|
128
|
+
const context = {
|
|
129
|
+
options: client._options,
|
|
130
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
131
|
+
operationID: "match-unmatched-credit-transfer",
|
|
132
|
+
oAuth2Scopes: null,
|
|
133
|
+
|
|
134
|
+
resolvedSecurity: requestSecurity,
|
|
135
|
+
|
|
136
|
+
securitySource: client._options.security,
|
|
137
|
+
retryConfig: options?.retries
|
|
138
|
+
|| client._options.retryConfig
|
|
139
|
+
|| {
|
|
140
|
+
strategy: "backoff",
|
|
141
|
+
backoff: {
|
|
142
|
+
initialInterval: 500,
|
|
143
|
+
maxInterval: 5000,
|
|
144
|
+
exponent: 2,
|
|
145
|
+
maxElapsedTime: 7500,
|
|
146
|
+
},
|
|
147
|
+
retryConnectionErrors: true,
|
|
148
|
+
}
|
|
149
|
+
|| { strategy: "none" },
|
|
150
|
+
retryCodes: options?.retryCodes || ["5xx"],
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const requestRes = client._createRequest(context, {
|
|
154
|
+
security: requestSecurity,
|
|
155
|
+
method: "POST",
|
|
156
|
+
baseURL: options?.serverURL,
|
|
157
|
+
path: path,
|
|
158
|
+
headers: headers,
|
|
159
|
+
body: body,
|
|
160
|
+
userAgent: client._options.userAgent,
|
|
161
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
162
|
+
}, options);
|
|
163
|
+
if (!requestRes.ok) {
|
|
164
|
+
return [requestRes, { status: "invalid" }];
|
|
165
|
+
}
|
|
166
|
+
const req = requestRes.value;
|
|
167
|
+
|
|
168
|
+
const doResult = await client._do(req, {
|
|
169
|
+
context,
|
|
170
|
+
errorCodes: ["404", "422", "4XX", "5XX"],
|
|
171
|
+
retryConfig: context.retryConfig,
|
|
172
|
+
retryCodes: context.retryCodes,
|
|
173
|
+
});
|
|
174
|
+
if (!doResult.ok) {
|
|
175
|
+
return [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] = await M.match<
|
|
184
|
+
models.UnmatchedCreditTransferActionResponse,
|
|
185
|
+
| errors.ErrorResponse
|
|
186
|
+
| ClientError
|
|
187
|
+
| ResponseValidationError
|
|
188
|
+
| ConnectionError
|
|
189
|
+
| RequestAbortedError
|
|
190
|
+
| RequestTimeoutError
|
|
191
|
+
| InvalidRequestError
|
|
192
|
+
| UnexpectedClientError
|
|
193
|
+
| SDKValidationError
|
|
194
|
+
>(
|
|
195
|
+
M.json(201, models.UnmatchedCreditTransferActionResponse$inboundSchema, {
|
|
196
|
+
ctype: "application/hal+json",
|
|
197
|
+
}),
|
|
198
|
+
M.jsonErr([404, 422], errors.ErrorResponse$inboundSchema, {
|
|
199
|
+
ctype: "application/hal+json",
|
|
200
|
+
}),
|
|
201
|
+
M.fail("4XX"),
|
|
202
|
+
M.fail("5XX"),
|
|
203
|
+
)(response, req, { extraFields: responseFields });
|
|
204
|
+
if (!result.ok) {
|
|
205
|
+
return [result, { status: "complete", request: req, response }];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return [result, { status: "complete", request: req, response }];
|
|
209
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 64514b115818
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ClientCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.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 { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { ClientError } from "../models/errors/clienterror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as models from "../models/index.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Return unmatched credit transfer
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* > 🚧 Beta feature
|
|
35
|
+
* >
|
|
36
|
+
* > This feature is currently in private beta, and the final specification may still change.
|
|
37
|
+
*
|
|
38
|
+
* Returns an unmatched credit transfer, sending the funds back to the original sender.
|
|
39
|
+
*/
|
|
40
|
+
export function unmatchedCreditTransfersReturn(
|
|
41
|
+
client: ClientCore,
|
|
42
|
+
request: operations.ReturnUnmatchedCreditTransferRequest,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): APIPromise<
|
|
45
|
+
Result<
|
|
46
|
+
models.UnmatchedCreditTransferActionResponse,
|
|
47
|
+
| errors.ErrorResponse
|
|
48
|
+
| ClientError
|
|
49
|
+
| ResponseValidationError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
| RequestAbortedError
|
|
52
|
+
| RequestTimeoutError
|
|
53
|
+
| InvalidRequestError
|
|
54
|
+
| UnexpectedClientError
|
|
55
|
+
| SDKValidationError
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
return new APIPromise($do(
|
|
59
|
+
client,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function $do(
|
|
66
|
+
client: ClientCore,
|
|
67
|
+
request: operations.ReturnUnmatchedCreditTransferRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<
|
|
70
|
+
[
|
|
71
|
+
Result<
|
|
72
|
+
models.UnmatchedCreditTransferActionResponse,
|
|
73
|
+
| errors.ErrorResponse
|
|
74
|
+
| ClientError
|
|
75
|
+
| ResponseValidationError
|
|
76
|
+
| ConnectionError
|
|
77
|
+
| RequestAbortedError
|
|
78
|
+
| RequestTimeoutError
|
|
79
|
+
| InvalidRequestError
|
|
80
|
+
| UnexpectedClientError
|
|
81
|
+
| SDKValidationError
|
|
82
|
+
>,
|
|
83
|
+
APICall,
|
|
84
|
+
]
|
|
85
|
+
> {
|
|
86
|
+
const parsed = safeParse(
|
|
87
|
+
request,
|
|
88
|
+
(value) =>
|
|
89
|
+
operations.ReturnUnmatchedCreditTransferRequest$outboundSchema.parse(
|
|
90
|
+
value,
|
|
91
|
+
),
|
|
92
|
+
"Input validation failed",
|
|
93
|
+
);
|
|
94
|
+
if (!parsed.ok) {
|
|
95
|
+
return [parsed, { status: "invalid" }];
|
|
96
|
+
}
|
|
97
|
+
const payload = parsed.value;
|
|
98
|
+
const body = null;
|
|
99
|
+
|
|
100
|
+
const pathParams = {
|
|
101
|
+
unmatchedCreditTransferId: encodeSimple(
|
|
102
|
+
"unmatchedCreditTransferId",
|
|
103
|
+
payload.unmatchedCreditTransferId,
|
|
104
|
+
{ explode: false, charEncoding: "percent" },
|
|
105
|
+
),
|
|
106
|
+
};
|
|
107
|
+
const path = pathToFunc(
|
|
108
|
+
"/unmatched-credit-transfers/{unmatchedCreditTransferId}/return",
|
|
109
|
+
)(pathParams);
|
|
110
|
+
|
|
111
|
+
const headers = new Headers(compactMap({
|
|
112
|
+
Accept: "application/hal+json",
|
|
113
|
+
"idempotency-key": encodeSimple(
|
|
114
|
+
"idempotency-key",
|
|
115
|
+
payload["idempotency-key"],
|
|
116
|
+
{ explode: false, charEncoding: "none" },
|
|
117
|
+
),
|
|
118
|
+
}));
|
|
119
|
+
|
|
120
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
121
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
122
|
+
|
|
123
|
+
const context = {
|
|
124
|
+
options: client._options,
|
|
125
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
126
|
+
operationID: "return-unmatched-credit-transfer",
|
|
127
|
+
oAuth2Scopes: null,
|
|
128
|
+
|
|
129
|
+
resolvedSecurity: requestSecurity,
|
|
130
|
+
|
|
131
|
+
securitySource: client._options.security,
|
|
132
|
+
retryConfig: options?.retries
|
|
133
|
+
|| client._options.retryConfig
|
|
134
|
+
|| {
|
|
135
|
+
strategy: "backoff",
|
|
136
|
+
backoff: {
|
|
137
|
+
initialInterval: 500,
|
|
138
|
+
maxInterval: 5000,
|
|
139
|
+
exponent: 2,
|
|
140
|
+
maxElapsedTime: 7500,
|
|
141
|
+
},
|
|
142
|
+
retryConnectionErrors: true,
|
|
143
|
+
}
|
|
144
|
+
|| { strategy: "none" },
|
|
145
|
+
retryCodes: options?.retryCodes || ["5xx"],
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const requestRes = client._createRequest(context, {
|
|
149
|
+
security: requestSecurity,
|
|
150
|
+
method: "POST",
|
|
151
|
+
baseURL: options?.serverURL,
|
|
152
|
+
path: path,
|
|
153
|
+
headers: headers,
|
|
154
|
+
body: body,
|
|
155
|
+
userAgent: client._options.userAgent,
|
|
156
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
157
|
+
}, options);
|
|
158
|
+
if (!requestRes.ok) {
|
|
159
|
+
return [requestRes, { status: "invalid" }];
|
|
160
|
+
}
|
|
161
|
+
const req = requestRes.value;
|
|
162
|
+
|
|
163
|
+
const doResult = await client._do(req, {
|
|
164
|
+
context,
|
|
165
|
+
errorCodes: ["404", "4XX", "5XX"],
|
|
166
|
+
retryConfig: context.retryConfig,
|
|
167
|
+
retryCodes: context.retryCodes,
|
|
168
|
+
});
|
|
169
|
+
if (!doResult.ok) {
|
|
170
|
+
return [doResult, { status: "request-error", request: req }];
|
|
171
|
+
}
|
|
172
|
+
const response = doResult.value;
|
|
173
|
+
|
|
174
|
+
const responseFields = {
|
|
175
|
+
HttpMeta: { Response: response, Request: req },
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const [result] = await M.match<
|
|
179
|
+
models.UnmatchedCreditTransferActionResponse,
|
|
180
|
+
| errors.ErrorResponse
|
|
181
|
+
| ClientError
|
|
182
|
+
| ResponseValidationError
|
|
183
|
+
| ConnectionError
|
|
184
|
+
| RequestAbortedError
|
|
185
|
+
| RequestTimeoutError
|
|
186
|
+
| InvalidRequestError
|
|
187
|
+
| UnexpectedClientError
|
|
188
|
+
| SDKValidationError
|
|
189
|
+
>(
|
|
190
|
+
M.json(201, models.UnmatchedCreditTransferActionResponse$inboundSchema, {
|
|
191
|
+
ctype: "application/hal+json",
|
|
192
|
+
}),
|
|
193
|
+
M.jsonErr(404, errors.ErrorResponse$inboundSchema, {
|
|
194
|
+
ctype: "application/hal+json",
|
|
195
|
+
}),
|
|
196
|
+
M.fail("4XX"),
|
|
197
|
+
M.fail("5XX"),
|
|
198
|
+
)(response, req, { extraFields: responseFields });
|
|
199
|
+
if (!result.ok) {
|
|
200
|
+
return [result, { status: "complete", request: req, response }];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return [result, { status: "complete", request: req, response }];
|
|
204
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -78,8 +78,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
78
78
|
export const SDK_METADATA = {
|
|
79
79
|
language: "typescript",
|
|
80
80
|
openapiDocVersion: "1.0.0",
|
|
81
|
-
sdkVersion: "1.3.
|
|
82
|
-
genVersion: "2.879.
|
|
81
|
+
sdkVersion: "1.3.8",
|
|
82
|
+
genVersion: "2.879.6",
|
|
83
83
|
userAgent:
|
|
84
|
-
"speakeasy-sdk/typescript 1.3.
|
|
84
|
+
"speakeasy-sdk/typescript 1.3.8 2.879.6 1.0.0 mollie-api-typescript",
|
|
85
85
|
} as const;
|