mollie-api-typescript 1.8.1 → 1.9.0
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 +8 -31
- package/dist/commonjs/funcs/oauthGenerate.d.ts.map +1 -1
- package/dist/commonjs/funcs/oauthGenerate.js +2 -7
- package/dist/commonjs/funcs/oauthGenerate.js.map +1 -1
- package/dist/commonjs/funcs/oauthRevoke.d.ts.map +1 -1
- package/dist/commonjs/funcs/oauthRevoke.js +2 -7
- package/dist/commonjs/funcs/oauthRevoke.js.map +1 -1
- package/dist/commonjs/funcs/terminalsTerminalsGetPairingCode.d.ts +28 -0
- package/dist/commonjs/funcs/terminalsTerminalsGetPairingCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsGetPairingCode.js +153 -0
- package/dist/commonjs/funcs/terminalsTerminalsGetPairingCode.js.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsListPairingCodes.d.ts +24 -0
- package/dist/commonjs/funcs/terminalsTerminalsListPairingCodes.d.ts.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsListPairingCodes.js +147 -0
- package/dist/commonjs/funcs/terminalsTerminalsListPairingCodes.js.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsRequestPairingCode.d.ts +30 -0
- package/dist/commonjs/funcs/terminalsTerminalsRequestPairingCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsRequestPairingCode.js +151 -0
- package/dist/commonjs/funcs/terminalsTerminalsRequestPairingCode.js.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsRevokePairingCode.d.ts +27 -0
- package/dist/commonjs/funcs/terminalsTerminalsRevokePairingCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/terminalsTerminalsRevokePairingCode.js +148 -0
- package/dist/commonjs/funcs/terminalsTerminalsRevokePairingCode.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/entityorganization.d.ts +2 -2
- package/dist/commonjs/models/entityorganization.d.ts.map +1 -1
- package/dist/commonjs/models/entityorganization.js +2 -2
- package/dist/commonjs/models/entityorganization.js.map +1 -1
- package/dist/commonjs/models/entitypairingcode.d.ts +122 -0
- package/dist/commonjs/models/entitypairingcode.d.ts.map +1 -0
- package/dist/commonjs/models/entitypairingcode.js +109 -0
- package/dist/commonjs/models/entitypairingcode.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +1 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -0
- package/dist/commonjs/models/index.js.map +1 -1
- 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/oauthgeneratetokens.d.ts +0 -1
- package/dist/commonjs/models/operations/oauthgeneratetokens.d.ts.map +1 -1
- package/dist/commonjs/models/operations/oauthgeneratetokens.js +1 -4
- package/dist/commonjs/models/operations/oauthgeneratetokens.js.map +1 -1
- package/dist/commonjs/models/operations/oauthrevoketokens.d.ts +0 -1
- package/dist/commonjs/models/operations/oauthrevoketokens.d.ts.map +1 -1
- package/dist/commonjs/models/operations/oauthrevoketokens.js +1 -4
- package/dist/commonjs/models/operations/oauthrevoketokens.js.map +1 -1
- package/dist/commonjs/models/operations/terminalsgetpairingcode.d.ts +25 -0
- package/dist/commonjs/models/operations/terminalsgetpairingcode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/terminalsgetpairingcode.js +57 -0
- package/dist/commonjs/models/operations/terminalsgetpairingcode.js.map +1 -0
- package/dist/commonjs/models/operations/terminalslistpairingcodes.d.ts +99 -0
- package/dist/commonjs/models/operations/terminalslistpairingcodes.d.ts.map +1 -0
- package/dist/commonjs/models/operations/terminalslistpairingcodes.js +95 -0
- package/dist/commonjs/models/operations/terminalslistpairingcodes.js.map +1 -0
- package/dist/commonjs/models/operations/terminalsrequestpairingcode.d.ts +35 -0
- package/dist/commonjs/models/operations/terminalsrequestpairingcode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/terminalsrequestpairingcode.js +66 -0
- package/dist/commonjs/models/operations/terminalsrequestpairingcode.js.map +1 -0
- package/dist/commonjs/models/operations/terminalsrevokepairingcode.d.ts +20 -0
- package/dist/commonjs/models/operations/terminalsrevokepairingcode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/terminalsrevokepairingcode.js +56 -0
- package/dist/commonjs/models/operations/terminalsrevokepairingcode.js.map +1 -0
- package/dist/commonjs/sdk/terminals.d.ts +54 -0
- package/dist/commonjs/sdk/terminals.d.ts.map +1 -1
- package/dist/commonjs/sdk/terminals.js +66 -0
- package/dist/commonjs/sdk/terminals.js.map +1 -1
- package/dist/commonjs/types/async.d.ts.map +1 -1
- package/dist/commonjs/types/async.js +8 -7
- package/dist/commonjs/types/async.js.map +1 -1
- package/dist/esm/funcs/oauthGenerate.d.ts.map +1 -1
- package/dist/esm/funcs/oauthGenerate.js +2 -7
- package/dist/esm/funcs/oauthGenerate.js.map +1 -1
- package/dist/esm/funcs/oauthRevoke.d.ts.map +1 -1
- package/dist/esm/funcs/oauthRevoke.js +2 -7
- package/dist/esm/funcs/oauthRevoke.js.map +1 -1
- package/dist/esm/funcs/terminalsTerminalsGetPairingCode.d.ts +28 -0
- package/dist/esm/funcs/terminalsTerminalsGetPairingCode.d.ts.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsGetPairingCode.js +117 -0
- package/dist/esm/funcs/terminalsTerminalsGetPairingCode.js.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsListPairingCodes.d.ts +24 -0
- package/dist/esm/funcs/terminalsTerminalsListPairingCodes.d.ts.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsListPairingCodes.js +111 -0
- package/dist/esm/funcs/terminalsTerminalsListPairingCodes.js.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsRequestPairingCode.d.ts +30 -0
- package/dist/esm/funcs/terminalsTerminalsRequestPairingCode.d.ts.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsRequestPairingCode.js +115 -0
- package/dist/esm/funcs/terminalsTerminalsRequestPairingCode.js.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsRevokePairingCode.d.ts +27 -0
- package/dist/esm/funcs/terminalsTerminalsRevokePairingCode.d.ts.map +1 -0
- package/dist/esm/funcs/terminalsTerminalsRevokePairingCode.js +112 -0
- package/dist/esm/funcs/terminalsTerminalsRevokePairingCode.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/entityorganization.d.ts +2 -2
- package/dist/esm/models/entityorganization.d.ts.map +1 -1
- package/dist/esm/models/entityorganization.js +2 -2
- package/dist/esm/models/entityorganization.js.map +1 -1
- package/dist/esm/models/entitypairingcode.d.ts +122 -0
- package/dist/esm/models/entitypairingcode.d.ts.map +1 -0
- package/dist/esm/models/entitypairingcode.js +69 -0
- package/dist/esm/models/entitypairingcode.js.map +1 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/index.js.map +1 -1
- 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/oauthgeneratetokens.d.ts +0 -1
- package/dist/esm/models/operations/oauthgeneratetokens.d.ts.map +1 -1
- package/dist/esm/models/operations/oauthgeneratetokens.js +0 -3
- package/dist/esm/models/operations/oauthgeneratetokens.js.map +1 -1
- package/dist/esm/models/operations/oauthrevoketokens.d.ts +0 -1
- package/dist/esm/models/operations/oauthrevoketokens.d.ts.map +1 -1
- package/dist/esm/models/operations/oauthrevoketokens.js +0 -3
- package/dist/esm/models/operations/oauthrevoketokens.js.map +1 -1
- package/dist/esm/models/operations/terminalsgetpairingcode.d.ts +25 -0
- package/dist/esm/models/operations/terminalsgetpairingcode.d.ts.map +1 -0
- package/dist/esm/models/operations/terminalsgetpairingcode.js +20 -0
- package/dist/esm/models/operations/terminalsgetpairingcode.js.map +1 -0
- package/dist/esm/models/operations/terminalslistpairingcodes.d.ts +99 -0
- package/dist/esm/models/operations/terminalslistpairingcodes.d.ts.map +1 -0
- package/dist/esm/models/operations/terminalslistpairingcodes.js +55 -0
- package/dist/esm/models/operations/terminalslistpairingcodes.js.map +1 -0
- package/dist/esm/models/operations/terminalsrequestpairingcode.d.ts +35 -0
- package/dist/esm/models/operations/terminalsrequestpairingcode.d.ts.map +1 -0
- package/dist/esm/models/operations/terminalsrequestpairingcode.js +28 -0
- package/dist/esm/models/operations/terminalsrequestpairingcode.js.map +1 -0
- package/dist/esm/models/operations/terminalsrevokepairingcode.d.ts +20 -0
- package/dist/esm/models/operations/terminalsrevokepairingcode.d.ts.map +1 -0
- package/dist/esm/models/operations/terminalsrevokepairingcode.js +19 -0
- package/dist/esm/models/operations/terminalsrevokepairingcode.js.map +1 -0
- package/dist/esm/sdk/terminals.d.ts +54 -0
- package/dist/esm/sdk/terminals.d.ts.map +1 -1
- package/dist/esm/sdk/terminals.js +66 -0
- package/dist/esm/sdk/terminals.js.map +1 -1
- package/dist/esm/types/async.d.ts.map +1 -1
- package/dist/esm/types/async.js +8 -7
- package/dist/esm/types/async.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/oauthGenerate.ts +2 -8
- package/src/funcs/oauthRevoke.ts +2 -8
- package/src/funcs/terminalsTerminalsGetPairingCode.ts +213 -0
- package/src/funcs/terminalsTerminalsListPairingCodes.ts +205 -0
- package/src/funcs/terminalsTerminalsRequestPairingCode.ts +209 -0
- package/src/funcs/terminalsTerminalsRevokePairingCode.ts +207 -0
- package/src/lib/config.ts +3 -3
- package/src/models/entityorganization.ts +4 -4
- package/src/models/entitypairingcode.ts +223 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/oauthgeneratetokens.ts +0 -4
- package/src/models/operations/oauthrevoketokens.ts +0 -4
- package/src/models/operations/terminalsgetpairingcode.ts +54 -0
- package/src/models/operations/terminalslistpairingcodes.ts +195 -0
- package/src/models/operations/terminalsrequestpairingcode.ts +86 -0
- package/src/models/operations/terminalsrevokepairingcode.ts +48 -0
- package/src/sdk/terminals.ts +98 -0
- package/src/types/async.ts +8 -7
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 142d0a0681b4
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ClientCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } 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 { 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 models from "../models/index.js";
|
|
27
|
+
import * as operations from "../models/operations/index.js";
|
|
28
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
29
|
+
import { Result } from "../types/fp.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Revoke terminal pairing code
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* > ℹ️ **Test mode**
|
|
36
|
+
* >
|
|
37
|
+
* > This endpoint currently does not support test mode yet.
|
|
38
|
+
*
|
|
39
|
+
* Revoke a pairing code, preventing the onboarding of new point-of-sale terminals.
|
|
40
|
+
*
|
|
41
|
+
* Terminals that have already paired with this code are not affected.
|
|
42
|
+
*
|
|
43
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
44
|
+
*/
|
|
45
|
+
export function terminalsTerminalsRevokePairingCode(
|
|
46
|
+
client: ClientCore,
|
|
47
|
+
request: operations.TerminalsRevokePairingCodeRequest,
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<
|
|
50
|
+
Result<
|
|
51
|
+
models.EntityPairingCode,
|
|
52
|
+
| errors.ErrorResponse
|
|
53
|
+
| ClientError
|
|
54
|
+
| ResponseValidationError
|
|
55
|
+
| ConnectionError
|
|
56
|
+
| RequestAbortedError
|
|
57
|
+
| RequestTimeoutError
|
|
58
|
+
| InvalidRequestError
|
|
59
|
+
| UnexpectedClientError
|
|
60
|
+
| SDKValidationError
|
|
61
|
+
>
|
|
62
|
+
> {
|
|
63
|
+
return new APIPromise($do(
|
|
64
|
+
client,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function $do(
|
|
71
|
+
client: ClientCore,
|
|
72
|
+
request: operations.TerminalsRevokePairingCodeRequest,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
Result<
|
|
77
|
+
models.EntityPairingCode,
|
|
78
|
+
| errors.ErrorResponse
|
|
79
|
+
| ClientError
|
|
80
|
+
| ResponseValidationError
|
|
81
|
+
| ConnectionError
|
|
82
|
+
| RequestAbortedError
|
|
83
|
+
| RequestTimeoutError
|
|
84
|
+
| InvalidRequestError
|
|
85
|
+
| UnexpectedClientError
|
|
86
|
+
| SDKValidationError
|
|
87
|
+
>,
|
|
88
|
+
APICall,
|
|
89
|
+
]
|
|
90
|
+
> {
|
|
91
|
+
const parsed = safeParse(
|
|
92
|
+
request,
|
|
93
|
+
(value) =>
|
|
94
|
+
operations.TerminalsRevokePairingCodeRequest$outboundSchema.parse(value),
|
|
95
|
+
"Input validation failed",
|
|
96
|
+
);
|
|
97
|
+
if (!parsed.ok) {
|
|
98
|
+
return [parsed, { status: "invalid" }];
|
|
99
|
+
}
|
|
100
|
+
const payload = parsed.value;
|
|
101
|
+
const body = null;
|
|
102
|
+
|
|
103
|
+
const pathParams = {
|
|
104
|
+
pairingCodeId: encodeSimple("pairingCodeId", payload.pairingCodeId, {
|
|
105
|
+
explode: false,
|
|
106
|
+
charEncoding: "percent",
|
|
107
|
+
}),
|
|
108
|
+
};
|
|
109
|
+
const path = pathToFunc("/v2/terminals/pairing-codes/{pairingCodeId}")(
|
|
110
|
+
pathParams,
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
const headers = new Headers(compactMap({
|
|
114
|
+
Accept: "application/hal+json",
|
|
115
|
+
"idempotency-key": encodeSimple(
|
|
116
|
+
"idempotency-key",
|
|
117
|
+
payload["idempotency-key"],
|
|
118
|
+
{ explode: false, charEncoding: "none" },
|
|
119
|
+
),
|
|
120
|
+
}));
|
|
121
|
+
|
|
122
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
123
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0, 2]);
|
|
124
|
+
|
|
125
|
+
const context = {
|
|
126
|
+
options: client._options,
|
|
127
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
128
|
+
operationID: "terminals-revoke-pairing-code",
|
|
129
|
+
oAuth2Scopes: null,
|
|
130
|
+
|
|
131
|
+
resolvedSecurity: requestSecurity,
|
|
132
|
+
|
|
133
|
+
securitySource: client._options.security,
|
|
134
|
+
retryConfig: options?.retries
|
|
135
|
+
|| client._options.retryConfig
|
|
136
|
+
|| {
|
|
137
|
+
strategy: "backoff",
|
|
138
|
+
backoff: {
|
|
139
|
+
initialInterval: 500,
|
|
140
|
+
maxInterval: 5000,
|
|
141
|
+
exponent: 2,
|
|
142
|
+
maxElapsedTime: 7500,
|
|
143
|
+
},
|
|
144
|
+
retryConnectionErrors: true,
|
|
145
|
+
}
|
|
146
|
+
|| { strategy: "none" },
|
|
147
|
+
retryCodes: options?.retryCodes || ["429", "5xx"],
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const requestRes = client._createRequest(context, {
|
|
151
|
+
security: requestSecurity,
|
|
152
|
+
method: "DELETE",
|
|
153
|
+
baseURL: options?.serverURL,
|
|
154
|
+
path: path,
|
|
155
|
+
headers: headers,
|
|
156
|
+
body: body,
|
|
157
|
+
userAgent: client._options.userAgent,
|
|
158
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
159
|
+
}, options);
|
|
160
|
+
if (!requestRes.ok) {
|
|
161
|
+
return [requestRes, { status: "invalid" }];
|
|
162
|
+
}
|
|
163
|
+
const req = requestRes.value;
|
|
164
|
+
|
|
165
|
+
const doResult = await client._do(req, {
|
|
166
|
+
context,
|
|
167
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
168
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
169
|
+
retryConfig: context.retryConfig,
|
|
170
|
+
retryCodes: context.retryCodes,
|
|
171
|
+
});
|
|
172
|
+
if (!doResult.ok) {
|
|
173
|
+
return [doResult, { status: "request-error", request: req }];
|
|
174
|
+
}
|
|
175
|
+
const response = doResult.value;
|
|
176
|
+
|
|
177
|
+
const responseFields = {
|
|
178
|
+
HttpMeta: { Response: response, Request: req },
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const [result] = await M.match<
|
|
182
|
+
models.EntityPairingCode,
|
|
183
|
+
| errors.ErrorResponse
|
|
184
|
+
| ClientError
|
|
185
|
+
| ResponseValidationError
|
|
186
|
+
| ConnectionError
|
|
187
|
+
| RequestAbortedError
|
|
188
|
+
| RequestTimeoutError
|
|
189
|
+
| InvalidRequestError
|
|
190
|
+
| UnexpectedClientError
|
|
191
|
+
| SDKValidationError
|
|
192
|
+
>(
|
|
193
|
+
M.json(200, models.EntityPairingCode$inboundSchema, {
|
|
194
|
+
ctype: "application/hal+json",
|
|
195
|
+
}),
|
|
196
|
+
M.jsonErr([404, 422, 429], errors.ErrorResponse$inboundSchema, {
|
|
197
|
+
ctype: "application/hal+json",
|
|
198
|
+
}),
|
|
199
|
+
M.fail("4XX"),
|
|
200
|
+
M.fail("5XX"),
|
|
201
|
+
)(response, req, { extraFields: responseFields });
|
|
202
|
+
if (!result.ok) {
|
|
203
|
+
return [result, { status: "complete", request: req, response }];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return [result, { status: "complete", request: req, response }];
|
|
207
|
+
}
|
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.
|
|
82
|
-
genVersion: "2.
|
|
81
|
+
sdkVersion: "1.9.0",
|
|
82
|
+
genVersion: "2.888.0",
|
|
83
83
|
userAgent:
|
|
84
|
-
"speakeasy-sdk/typescript 1.
|
|
84
|
+
"speakeasy-sdk/typescript 1.9.0 2.888.0 1.0.0 mollie-api-typescript",
|
|
85
85
|
} as const;
|
|
@@ -97,11 +97,11 @@ export type EntityOrganization = {
|
|
|
97
97
|
* The preferred locale of the merchant, as set in their Mollie dashboard.
|
|
98
98
|
*/
|
|
99
99
|
locale: EntityOrganizationLocale | null;
|
|
100
|
-
address
|
|
100
|
+
address?: Address | undefined;
|
|
101
101
|
/**
|
|
102
102
|
* The registration number of the organization at their local chamber of commerce.
|
|
103
103
|
*/
|
|
104
|
-
registrationNumber
|
|
104
|
+
registrationNumber?: string | undefined;
|
|
105
105
|
/**
|
|
106
106
|
* The VAT number of the organization, if based in the European Union or in The United Kingdom. VAT numbers are
|
|
107
107
|
*
|
|
@@ -165,8 +165,8 @@ export const EntityOrganization$inboundSchema: z.ZodType<
|
|
|
165
165
|
name: z.string(),
|
|
166
166
|
email: z.string(),
|
|
167
167
|
locale: z.nullable(EntityOrganizationLocale$inboundSchema),
|
|
168
|
-
address: Address$inboundSchema,
|
|
169
|
-
registrationNumber: z.string(),
|
|
168
|
+
address: Address$inboundSchema.optional(),
|
|
169
|
+
registrationNumber: z.string().optional(),
|
|
170
170
|
vatNumber: z.nullable(z.string()).optional(),
|
|
171
171
|
vatRegulation: z.nullable(OrganizationVatRegulation$inboundSchema).optional(),
|
|
172
172
|
_links: z.lazy(() => EntityOrganizationLinks$inboundSchema),
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 01b26dbb30ac
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import * as openEnums from "../types/enums.js";
|
|
10
|
+
import { OpenEnum } from "../types/enums.js";
|
|
11
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
12
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
13
|
+
import { Mode, Mode$inboundSchema } from "./mode.js";
|
|
14
|
+
import { Url, Url$inboundSchema } from "./url.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The status of the pairing code.
|
|
18
|
+
*/
|
|
19
|
+
export const EntityPairingCodeStatus = {
|
|
20
|
+
Active: "active",
|
|
21
|
+
Expired: "expired",
|
|
22
|
+
Revoked: "revoked",
|
|
23
|
+
} as const;
|
|
24
|
+
/**
|
|
25
|
+
* The status of the pairing code.
|
|
26
|
+
*/
|
|
27
|
+
export type EntityPairingCodeStatus = OpenEnum<typeof EntityPairingCodeStatus>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The QR code representation of the pairing code.
|
|
31
|
+
*/
|
|
32
|
+
export type EntityPairingCodeQrCode = {
|
|
33
|
+
height?: number | undefined;
|
|
34
|
+
width?: number | undefined;
|
|
35
|
+
src?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Additional pairing code data, present only when requested via the `include` parameter.
|
|
40
|
+
*/
|
|
41
|
+
export type EntityPairingCodeDetails = {
|
|
42
|
+
/**
|
|
43
|
+
* The QR code representation of the pairing code.
|
|
44
|
+
*/
|
|
45
|
+
qrCode?: EntityPairingCodeQrCode | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
50
|
+
*/
|
|
51
|
+
export type EntityPairingCodeLinks = {
|
|
52
|
+
/**
|
|
53
|
+
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
54
|
+
*/
|
|
55
|
+
self: Url;
|
|
56
|
+
/**
|
|
57
|
+
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
58
|
+
*/
|
|
59
|
+
profile: Url;
|
|
60
|
+
/**
|
|
61
|
+
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
62
|
+
*/
|
|
63
|
+
documentation: Url;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type EntityPairingCode = {
|
|
67
|
+
/**
|
|
68
|
+
* Indicates the response contains a terminal pairing code object. Will always contain the string
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* `terminal-pairing-code` for this endpoint.
|
|
72
|
+
*/
|
|
73
|
+
resource: string;
|
|
74
|
+
/**
|
|
75
|
+
* The unique identifier of the pairing code. Example: `termpc_R7gX5Ea9bC4DkFj3G`.
|
|
76
|
+
*/
|
|
77
|
+
id: string;
|
|
78
|
+
/**
|
|
79
|
+
* Whether this entity was created in live mode or in test mode.
|
|
80
|
+
*/
|
|
81
|
+
mode: Mode;
|
|
82
|
+
/**
|
|
83
|
+
* The human-readable pairing code to be entered on the terminal. This code is multi-use and will expire after the
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* time indicated in `expiresAt`.
|
|
87
|
+
*/
|
|
88
|
+
code: string;
|
|
89
|
+
/**
|
|
90
|
+
* The ID of the profile the terminal is being paired with.
|
|
91
|
+
*/
|
|
92
|
+
profileId: string;
|
|
93
|
+
status: EntityPairingCodeStatus;
|
|
94
|
+
/**
|
|
95
|
+
* Additional pairing code data, present only when requested via the `include` parameter.
|
|
96
|
+
*/
|
|
97
|
+
details?: EntityPairingCodeDetails | null | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* The date and time the pairing code expires, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Pairing
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* codes expire 90 days after creation. After this time, the code can no longer be used to pair a terminal.
|
|
103
|
+
*/
|
|
104
|
+
expiresAt: string;
|
|
105
|
+
/**
|
|
106
|
+
* The date and time the pairing code was revoked, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* `null` if the code has not been revoked.
|
|
110
|
+
*/
|
|
111
|
+
revokedAt?: string | null | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
114
|
+
*/
|
|
115
|
+
createdAt: string;
|
|
116
|
+
/**
|
|
117
|
+
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
118
|
+
*/
|
|
119
|
+
links: EntityPairingCodeLinks;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const EntityPairingCodeStatus$inboundSchema: z.ZodType<
|
|
124
|
+
EntityPairingCodeStatus,
|
|
125
|
+
z.ZodTypeDef,
|
|
126
|
+
unknown
|
|
127
|
+
> = openEnums.inboundSchema(EntityPairingCodeStatus);
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const EntityPairingCodeQrCode$inboundSchema: z.ZodType<
|
|
131
|
+
EntityPairingCodeQrCode,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
unknown
|
|
134
|
+
> = z.object({
|
|
135
|
+
height: z.number().optional(),
|
|
136
|
+
width: z.number().optional(),
|
|
137
|
+
src: z.string().optional(),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export function entityPairingCodeQrCodeFromJSON(
|
|
141
|
+
jsonString: string,
|
|
142
|
+
): SafeParseResult<EntityPairingCodeQrCode, SDKValidationError> {
|
|
143
|
+
return safeParse(
|
|
144
|
+
jsonString,
|
|
145
|
+
(x) => EntityPairingCodeQrCode$inboundSchema.parse(JSON.parse(x)),
|
|
146
|
+
`Failed to parse 'EntityPairingCodeQrCode' from JSON`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const EntityPairingCodeDetails$inboundSchema: z.ZodType<
|
|
152
|
+
EntityPairingCodeDetails,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
unknown
|
|
155
|
+
> = z.object({
|
|
156
|
+
qrCode: z.nullable(z.lazy(() => EntityPairingCodeQrCode$inboundSchema))
|
|
157
|
+
.optional(),
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
export function entityPairingCodeDetailsFromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<EntityPairingCodeDetails, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => EntityPairingCodeDetails$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'EntityPairingCodeDetails' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const EntityPairingCodeLinks$inboundSchema: z.ZodType<
|
|
172
|
+
EntityPairingCodeLinks,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = z.object({
|
|
176
|
+
self: Url$inboundSchema,
|
|
177
|
+
profile: Url$inboundSchema,
|
|
178
|
+
documentation: Url$inboundSchema,
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export function entityPairingCodeLinksFromJSON(
|
|
182
|
+
jsonString: string,
|
|
183
|
+
): SafeParseResult<EntityPairingCodeLinks, SDKValidationError> {
|
|
184
|
+
return safeParse(
|
|
185
|
+
jsonString,
|
|
186
|
+
(x) => EntityPairingCodeLinks$inboundSchema.parse(JSON.parse(x)),
|
|
187
|
+
`Failed to parse 'EntityPairingCodeLinks' from JSON`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const EntityPairingCode$inboundSchema: z.ZodType<
|
|
193
|
+
EntityPairingCode,
|
|
194
|
+
z.ZodTypeDef,
|
|
195
|
+
unknown
|
|
196
|
+
> = z.object({
|
|
197
|
+
resource: z.string(),
|
|
198
|
+
id: z.string(),
|
|
199
|
+
mode: Mode$inboundSchema,
|
|
200
|
+
code: z.string(),
|
|
201
|
+
profileId: z.string(),
|
|
202
|
+
status: EntityPairingCodeStatus$inboundSchema,
|
|
203
|
+
details: z.nullable(z.lazy(() => EntityPairingCodeDetails$inboundSchema))
|
|
204
|
+
.optional(),
|
|
205
|
+
expiresAt: z.string(),
|
|
206
|
+
revokedAt: z.nullable(z.string()).optional(),
|
|
207
|
+
createdAt: z.string(),
|
|
208
|
+
_links: z.lazy(() => EntityPairingCodeLinks$inboundSchema),
|
|
209
|
+
}).transform((v) => {
|
|
210
|
+
return remap$(v, {
|
|
211
|
+
"_links": "links",
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
export function entityPairingCodeFromJSON(
|
|
216
|
+
jsonString: string,
|
|
217
|
+
): SafeParseResult<EntityPairingCode, SDKValidationError> {
|
|
218
|
+
return safeParse(
|
|
219
|
+
jsonString,
|
|
220
|
+
(x) => EntityPairingCode$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
+
`Failed to parse 'EntityPairingCode' from JSON`,
|
|
222
|
+
);
|
|
223
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -61,6 +61,7 @@ export * from "./entityinvoice.js";
|
|
|
61
61
|
export * from "./entitymethodget.js";
|
|
62
62
|
export * from "./entityonboardingstatus.js";
|
|
63
63
|
export * from "./entityorganization.js";
|
|
64
|
+
export * from "./entitypairingcode.js";
|
|
64
65
|
export * from "./entitypaymentroute.js";
|
|
65
66
|
export * from "./entitypaymentrouteresponse.js";
|
|
66
67
|
export * from "./entitypayoutresponse.js";
|
|
@@ -110,6 +110,10 @@ export * from "./requestapplepaypaymentsession.js";
|
|
|
110
110
|
export * from "./returnunmatchedcredittransfer.js";
|
|
111
111
|
export * from "./revokemandate.js";
|
|
112
112
|
export * from "./submitonboardingdata.js";
|
|
113
|
+
export * from "./terminalsgetpairingcode.js";
|
|
114
|
+
export * from "./terminalslistpairingcodes.js";
|
|
115
|
+
export * from "./terminalsrequestpairingcode.js";
|
|
116
|
+
export * from "./terminalsrevokepairingcode.js";
|
|
113
117
|
export * from "./testwebhook.js";
|
|
114
118
|
export * from "./updatecustomer.js";
|
|
115
119
|
export * from "./updatepayment.js";
|
|
@@ -10,10 +10,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import * as models from "../index.js";
|
|
12
12
|
|
|
13
|
-
export const OauthGenerateTokensServerList = [
|
|
14
|
-
"https://api.mollie.com/oauth2",
|
|
15
|
-
] as const;
|
|
16
|
-
|
|
17
13
|
export type OauthGenerateTokensSecurity = {
|
|
18
14
|
username: string;
|
|
19
15
|
password: string;
|
|
@@ -7,10 +7,6 @@ import * as z from "zod/v3";
|
|
|
7
7
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
8
|
import * as models from "../index.js";
|
|
9
9
|
|
|
10
|
-
export const OauthRevokeTokensServerList = [
|
|
11
|
-
"https://api.mollie.com/oauth2",
|
|
12
|
-
] as const;
|
|
13
|
-
|
|
14
10
|
export type OauthRevokeTokensSecurity = {
|
|
15
11
|
username: string;
|
|
16
12
|
password: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b30f839af4d4
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
|
|
9
|
+
export type TerminalsGetPairingCodeRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* Provide the ID of the terminal pairing code.
|
|
12
|
+
*/
|
|
13
|
+
pairingCodeId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Include additional information in the response.
|
|
16
|
+
*/
|
|
17
|
+
include?: string | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
20
|
+
*/
|
|
21
|
+
idempotencyKey?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type TerminalsGetPairingCodeRequest$Outbound = {
|
|
26
|
+
pairingCodeId: string;
|
|
27
|
+
include?: string | null | undefined;
|
|
28
|
+
"idempotency-key"?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const TerminalsGetPairingCodeRequest$outboundSchema: z.ZodType<
|
|
33
|
+
TerminalsGetPairingCodeRequest$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
TerminalsGetPairingCodeRequest
|
|
36
|
+
> = z.object({
|
|
37
|
+
pairingCodeId: z.string(),
|
|
38
|
+
include: z.nullable(z.string()).optional(),
|
|
39
|
+
idempotencyKey: z.string().optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
idempotencyKey: "idempotency-key",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function terminalsGetPairingCodeRequestToJSON(
|
|
47
|
+
terminalsGetPairingCodeRequest: TerminalsGetPairingCodeRequest,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
TerminalsGetPairingCodeRequest$outboundSchema.parse(
|
|
51
|
+
terminalsGetPairingCodeRequest,
|
|
52
|
+
),
|
|
53
|
+
);
|
|
54
|
+
}
|