mollie-api-typescript 1.8.1 → 1.8.2
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 -0
- 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/lib/config.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/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/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/lib/config.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/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/jsr.json +1 -1
- package/package.json +1 -1
- 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/entitypairingcode.ts +223 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/index.ts +4 -0
- 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
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9587d36d7bc1
|
|
4
|
+
*/
|
|
5
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Get terminal pairing code
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* > ℹ️ **Test mode**
|
|
21
|
+
* >
|
|
22
|
+
* > This endpoint currently does not support test mode yet.
|
|
23
|
+
*
|
|
24
|
+
* Get a pairing code to onboard a point-of-sale terminal.
|
|
25
|
+
*
|
|
26
|
+
* The response includes a human-readable `code` for manual entry on the terminal and, optionally, a QR Code as a
|
|
27
|
+
* base64 encoded SVG data URI when you use the `include` query parameter with value `details.qrCode`.
|
|
28
|
+
*
|
|
29
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
30
|
+
*/
|
|
31
|
+
export function terminalsTerminalsGetPairingCode(client, request, options) {
|
|
32
|
+
return new APIPromise($do(client, request, options));
|
|
33
|
+
}
|
|
34
|
+
async function $do(client, request, options) {
|
|
35
|
+
const parsed = safeParse(request, (value) => operations.TerminalsGetPairingCodeRequest$outboundSchema.parse(value), "Input validation failed");
|
|
36
|
+
if (!parsed.ok) {
|
|
37
|
+
return [parsed, { status: "invalid" }];
|
|
38
|
+
}
|
|
39
|
+
const payload = parsed.value;
|
|
40
|
+
const body = null;
|
|
41
|
+
const pathParams = {
|
|
42
|
+
pairingCodeId: encodeSimple("pairingCodeId", payload.pairingCodeId, {
|
|
43
|
+
explode: false,
|
|
44
|
+
charEncoding: "percent",
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
const path = pathToFunc("/v2/terminals/pairing-codes/{pairingCodeId}")(pathParams);
|
|
48
|
+
const query = encodeFormQuery({
|
|
49
|
+
"include": payload.include,
|
|
50
|
+
});
|
|
51
|
+
const headers = new Headers(compactMap({
|
|
52
|
+
Accept: "application/hal+json",
|
|
53
|
+
"idempotency-key": encodeSimple("idempotency-key", payload["idempotency-key"], { explode: false, charEncoding: "none" }),
|
|
54
|
+
}));
|
|
55
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
56
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0, 2]);
|
|
57
|
+
const context = {
|
|
58
|
+
options: client._options,
|
|
59
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
60
|
+
operationID: "terminals-get-pairing-code",
|
|
61
|
+
oAuth2Scopes: null,
|
|
62
|
+
resolvedSecurity: requestSecurity,
|
|
63
|
+
securitySource: client._options.security,
|
|
64
|
+
retryConfig: options?.retries
|
|
65
|
+
|| client._options.retryConfig
|
|
66
|
+
|| {
|
|
67
|
+
strategy: "backoff",
|
|
68
|
+
backoff: {
|
|
69
|
+
initialInterval: 500,
|
|
70
|
+
maxInterval: 5000,
|
|
71
|
+
exponent: 2,
|
|
72
|
+
maxElapsedTime: 7500,
|
|
73
|
+
},
|
|
74
|
+
retryConnectionErrors: true,
|
|
75
|
+
}
|
|
76
|
+
|| { strategy: "none" },
|
|
77
|
+
retryCodes: options?.retryCodes || ["429", "5xx"],
|
|
78
|
+
};
|
|
79
|
+
const requestRes = client._createRequest(context, {
|
|
80
|
+
security: requestSecurity,
|
|
81
|
+
method: "GET",
|
|
82
|
+
baseURL: options?.serverURL,
|
|
83
|
+
path: path,
|
|
84
|
+
headers: headers,
|
|
85
|
+
query: query,
|
|
86
|
+
body: body,
|
|
87
|
+
userAgent: client._options.userAgent,
|
|
88
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
89
|
+
}, options);
|
|
90
|
+
if (!requestRes.ok) {
|
|
91
|
+
return [requestRes, { status: "invalid" }];
|
|
92
|
+
}
|
|
93
|
+
const req = requestRes.value;
|
|
94
|
+
const doResult = await client._do(req, {
|
|
95
|
+
context,
|
|
96
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
97
|
+
retryConfig: context.retryConfig,
|
|
98
|
+
retryCodes: context.retryCodes,
|
|
99
|
+
});
|
|
100
|
+
if (!doResult.ok) {
|
|
101
|
+
return [doResult, { status: "request-error", request: req }];
|
|
102
|
+
}
|
|
103
|
+
const response = doResult.value;
|
|
104
|
+
const responseFields = {
|
|
105
|
+
HttpMeta: { Response: response, Request: req },
|
|
106
|
+
};
|
|
107
|
+
const [result] = await M.match(M.json(200, models.EntityPairingCode$inboundSchema, {
|
|
108
|
+
ctype: "application/hal+json",
|
|
109
|
+
}), M.jsonErr([404, 429], errors.ErrorResponse$inboundSchema, {
|
|
110
|
+
ctype: "application/hal+json",
|
|
111
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
112
|
+
if (!result.ok) {
|
|
113
|
+
return [result, { status: "complete", request: req, response }];
|
|
114
|
+
}
|
|
115
|
+
return [result, { status: "complete", request: req, response }];
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=terminalsTerminalsGetPairingCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsTerminalsGetPairingCode.js","sourceRoot":"","sources":["../../../src/funcs/terminalsTerminalsGetPairingCode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,U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5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,+BAA+B,EAAE;QAClD,KAAK,EAAE,sBAAsB;KAC9B,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,2BAA2B,EAAE;QACxD,KAAK,EAAE,sBAAsB;KAC9B,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ClientCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ClientError } from "../models/errors/clienterror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* List terminal pairing codes
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* > ℹ️ **Test mode**
|
|
16
|
+
* >
|
|
17
|
+
* > This endpoint currently does not support test mode yet.
|
|
18
|
+
*
|
|
19
|
+
* Returns all pairing codes: `active`, `expired`, and `revoked`. Results are paginated.
|
|
20
|
+
*
|
|
21
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
22
|
+
*/
|
|
23
|
+
export declare function terminalsTerminalsListPairingCodes(client: ClientCore, request?: operations.TerminalsListPairingCodesRequest | undefined, options?: RequestOptions): APIPromise<Result<operations.TerminalsListPairingCodesResponse, errors.ErrorResponse | ClientError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
24
|
+
//# sourceMappingURL=terminalsTerminalsListPairingCodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsTerminalsListPairingCodes.d.ts","sourceRoot":"","sources":["../../../src/funcs/terminalsTerminalsListPairingCodes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,UAAU,CAAC,gCAAgC,GAAG,SAAS,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,iCAAiC,EAC1C,MAAM,CAAC,aAAa,GACpB,WAAW,GACX,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 96af41551549
|
|
4
|
+
*/
|
|
5
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as operations from "../models/operations/index.js";
|
|
14
|
+
import { APIPromise } from "../types/async.js";
|
|
15
|
+
/**
|
|
16
|
+
* List terminal pairing codes
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* > ℹ️ **Test mode**
|
|
20
|
+
* >
|
|
21
|
+
* > This endpoint currently does not support test mode yet.
|
|
22
|
+
*
|
|
23
|
+
* Returns all pairing codes: `active`, `expired`, and `revoked`. Results are paginated.
|
|
24
|
+
*
|
|
25
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
26
|
+
*/
|
|
27
|
+
export function terminalsTerminalsListPairingCodes(client, request, options) {
|
|
28
|
+
return new APIPromise($do(client, request, options));
|
|
29
|
+
}
|
|
30
|
+
async function $do(client, request, options) {
|
|
31
|
+
const parsed = safeParse(request, (value) => operations.TerminalsListPairingCodesRequest$outboundSchema.optional()
|
|
32
|
+
.parse(value), "Input validation failed");
|
|
33
|
+
if (!parsed.ok) {
|
|
34
|
+
return [parsed, { status: "invalid" }];
|
|
35
|
+
}
|
|
36
|
+
const payload = parsed.value;
|
|
37
|
+
const body = null;
|
|
38
|
+
const path = pathToFunc("/v2/terminals/pairing-codes")();
|
|
39
|
+
const query = encodeFormQuery({
|
|
40
|
+
"from": payload?.from,
|
|
41
|
+
"limit": payload?.limit,
|
|
42
|
+
"profileId": payload?.profileId ?? client._options.profileId,
|
|
43
|
+
"sort": payload?.sort,
|
|
44
|
+
});
|
|
45
|
+
const headers = new Headers(compactMap({
|
|
46
|
+
Accept: "application/hal+json",
|
|
47
|
+
"idempotency-key": encodeSimple("idempotency-key", payload?.["idempotency-key"], { explode: false, charEncoding: "none" }),
|
|
48
|
+
}));
|
|
49
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
50
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0, 2]);
|
|
51
|
+
const context = {
|
|
52
|
+
options: client._options,
|
|
53
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54
|
+
operationID: "terminals-list-pairing-codes",
|
|
55
|
+
oAuth2Scopes: null,
|
|
56
|
+
resolvedSecurity: requestSecurity,
|
|
57
|
+
securitySource: client._options.security,
|
|
58
|
+
retryConfig: options?.retries
|
|
59
|
+
|| client._options.retryConfig
|
|
60
|
+
|| {
|
|
61
|
+
strategy: "backoff",
|
|
62
|
+
backoff: {
|
|
63
|
+
initialInterval: 500,
|
|
64
|
+
maxInterval: 5000,
|
|
65
|
+
exponent: 2,
|
|
66
|
+
maxElapsedTime: 7500,
|
|
67
|
+
},
|
|
68
|
+
retryConnectionErrors: true,
|
|
69
|
+
}
|
|
70
|
+
|| { strategy: "none" },
|
|
71
|
+
retryCodes: options?.retryCodes || ["429", "5xx"],
|
|
72
|
+
};
|
|
73
|
+
const requestRes = client._createRequest(context, {
|
|
74
|
+
security: requestSecurity,
|
|
75
|
+
method: "GET",
|
|
76
|
+
baseURL: options?.serverURL,
|
|
77
|
+
path: path,
|
|
78
|
+
headers: headers,
|
|
79
|
+
query: query,
|
|
80
|
+
body: body,
|
|
81
|
+
userAgent: client._options.userAgent,
|
|
82
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
83
|
+
}, options);
|
|
84
|
+
if (!requestRes.ok) {
|
|
85
|
+
return [requestRes, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const req = requestRes.value;
|
|
88
|
+
const doResult = await client._do(req, {
|
|
89
|
+
context,
|
|
90
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
91
|
+
retryConfig: context.retryConfig,
|
|
92
|
+
retryCodes: context.retryCodes,
|
|
93
|
+
});
|
|
94
|
+
if (!doResult.ok) {
|
|
95
|
+
return [doResult, { status: "request-error", request: req }];
|
|
96
|
+
}
|
|
97
|
+
const response = doResult.value;
|
|
98
|
+
const responseFields = {
|
|
99
|
+
HttpMeta: { Response: response, Request: req },
|
|
100
|
+
};
|
|
101
|
+
const [result] = await M.match(M.json(200, operations.TerminalsListPairingCodesResponse$inboundSchema, {
|
|
102
|
+
ctype: "application/hal+json",
|
|
103
|
+
}), M.jsonErr([400, 429], errors.ErrorResponse$inboundSchema, {
|
|
104
|
+
ctype: "application/hal+json",
|
|
105
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
106
|
+
if (!result.ok) {
|
|
107
|
+
return [result, { status: "complete", request: req, response }];
|
|
108
|
+
}
|
|
109
|
+
return [result, { status: "complete", request: req, response }];
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=terminalsTerminalsListPairingCodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsT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ACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,+CAA+C,EAAE;QACtE,KAAK,EAAE,sBAAsB;KAC9B,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,2BAA2B,EAAE;QACxD,KAAK,EAAE,sBAAsB;KAC9B,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ClientCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ClientError } from "../models/errors/clienterror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Request terminal pairing code
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* > ℹ️ **Test mode**
|
|
17
|
+
* >
|
|
18
|
+
* > This endpoint currently does not support test mode yet.
|
|
19
|
+
*
|
|
20
|
+
* Request a pairing code to onboard a point-of-sale terminal.
|
|
21
|
+
*
|
|
22
|
+
* The response includes a human-readable `code` for manual entry on the terminal, and a QR Code as a
|
|
23
|
+
* base64 encoded SVG data URI for scanning if you specify the query parameter `include` with value `details.qrCode`.
|
|
24
|
+
*
|
|
25
|
+
* Pairing codes expire after 90 days (see `expiresAt`) and can be used multiple times.
|
|
26
|
+
*
|
|
27
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
28
|
+
*/
|
|
29
|
+
export declare function terminalsTerminalsRequestPairingCode(client: ClientCore, request?: operations.TerminalsRequestPairingCodeRequest | undefined, options?: RequestOptions): APIPromise<Result<models.EntityPairingCode, errors.ErrorResponse | ClientError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
30
|
+
//# sourceMappingURL=terminalsTerminalsRequestPairingCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsTerminalsRequestPairingCode.d.ts","sourceRoot":"","sources":["../../../src/funcs/terminalsTerminalsRequestPairingCode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,UAAU,CAAC,kCAAkC,GAAG,SAAS,EACnE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,iBAAiB,EACtB,MAAM,CAAC,aAAa,GACpB,WAAW,GACX,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 351a2c36e865
|
|
4
|
+
*/
|
|
5
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Request terminal pairing code
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* > ℹ️ **Test mode**
|
|
21
|
+
* >
|
|
22
|
+
* > This endpoint currently does not support test mode yet.
|
|
23
|
+
*
|
|
24
|
+
* Request a pairing code to onboard a point-of-sale terminal.
|
|
25
|
+
*
|
|
26
|
+
* The response includes a human-readable `code` for manual entry on the terminal, and a QR Code as a
|
|
27
|
+
* base64 encoded SVG data URI for scanning if you specify the query parameter `include` with value `details.qrCode`.
|
|
28
|
+
*
|
|
29
|
+
* Pairing codes expire after 90 days (see `expiresAt`) and can be used multiple times.
|
|
30
|
+
*
|
|
31
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
32
|
+
*/
|
|
33
|
+
export function terminalsTerminalsRequestPairingCode(client, request, options) {
|
|
34
|
+
return new APIPromise($do(client, request, options));
|
|
35
|
+
}
|
|
36
|
+
async function $do(client, request, options) {
|
|
37
|
+
const parsed = safeParse(request, (value) => operations.TerminalsRequestPairingCodeRequest$outboundSchema.optional()
|
|
38
|
+
.parse(value), "Input validation failed");
|
|
39
|
+
if (!parsed.ok) {
|
|
40
|
+
return [parsed, { status: "invalid" }];
|
|
41
|
+
}
|
|
42
|
+
const payload = parsed.value;
|
|
43
|
+
const body = encodeJSON("body", payload?.RequestBody, { explode: true });
|
|
44
|
+
const path = pathToFunc("/v2/terminals/pairing-codes")();
|
|
45
|
+
const query = encodeFormQuery({
|
|
46
|
+
"include": payload?.include,
|
|
47
|
+
});
|
|
48
|
+
const headers = new Headers(compactMap({
|
|
49
|
+
"Content-Type": "application/json",
|
|
50
|
+
Accept: "application/hal+json",
|
|
51
|
+
"idempotency-key": encodeSimple("idempotency-key", payload?.["idempotency-key"], { explode: false, charEncoding: "none" }),
|
|
52
|
+
}));
|
|
53
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
54
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0, 2]);
|
|
55
|
+
const context = {
|
|
56
|
+
options: client._options,
|
|
57
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
58
|
+
operationID: "terminals-request-pairing-code",
|
|
59
|
+
oAuth2Scopes: null,
|
|
60
|
+
resolvedSecurity: requestSecurity,
|
|
61
|
+
securitySource: client._options.security,
|
|
62
|
+
retryConfig: options?.retries
|
|
63
|
+
|| client._options.retryConfig
|
|
64
|
+
|| {
|
|
65
|
+
strategy: "backoff",
|
|
66
|
+
backoff: {
|
|
67
|
+
initialInterval: 500,
|
|
68
|
+
maxInterval: 5000,
|
|
69
|
+
exponent: 2,
|
|
70
|
+
maxElapsedTime: 7500,
|
|
71
|
+
},
|
|
72
|
+
retryConnectionErrors: true,
|
|
73
|
+
}
|
|
74
|
+
|| { strategy: "none" },
|
|
75
|
+
retryCodes: options?.retryCodes || ["429", "5xx"],
|
|
76
|
+
};
|
|
77
|
+
const requestRes = client._createRequest(context, {
|
|
78
|
+
security: requestSecurity,
|
|
79
|
+
method: "POST",
|
|
80
|
+
baseURL: options?.serverURL,
|
|
81
|
+
path: path,
|
|
82
|
+
headers: headers,
|
|
83
|
+
query: query,
|
|
84
|
+
body: body,
|
|
85
|
+
userAgent: client._options.userAgent,
|
|
86
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
87
|
+
}, options);
|
|
88
|
+
if (!requestRes.ok) {
|
|
89
|
+
return [requestRes, { status: "invalid" }];
|
|
90
|
+
}
|
|
91
|
+
const req = requestRes.value;
|
|
92
|
+
const doResult = await client._do(req, {
|
|
93
|
+
context,
|
|
94
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
95
|
+
retryConfig: context.retryConfig,
|
|
96
|
+
retryCodes: context.retryCodes,
|
|
97
|
+
});
|
|
98
|
+
if (!doResult.ok) {
|
|
99
|
+
return [doResult, { status: "request-error", request: req }];
|
|
100
|
+
}
|
|
101
|
+
const response = doResult.value;
|
|
102
|
+
const responseFields = {
|
|
103
|
+
HttpMeta: { Response: response, Request: req },
|
|
104
|
+
};
|
|
105
|
+
const [result] = await M.match(M.json(201, models.EntityPairingCode$inboundSchema, {
|
|
106
|
+
ctype: "application/hal+json",
|
|
107
|
+
}), M.jsonErr([422, 429], errors.ErrorResponse$inboundSchema, {
|
|
108
|
+
ctype: "application/hal+json",
|
|
109
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
110
|
+
if (!result.ok) {
|
|
111
|
+
return [result, { status: "complete", request: req, response }];
|
|
112
|
+
}
|
|
113
|
+
return [result, { status: "complete", request: req, response }];
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=terminalsTerminalsRequestPairingCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsTerminalsRequestPairingCode.js","sourceRoot":"","sources":["../../../src/funcs/terminalsTerminalsRequestPairingCode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,MAAM,MAAM,oBAAoB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AC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ClientCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ClientError } from "../models/errors/clienterror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Revoke terminal pairing code
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* > ℹ️ **Test mode**
|
|
17
|
+
* >
|
|
18
|
+
* > This endpoint currently does not support test mode yet.
|
|
19
|
+
*
|
|
20
|
+
* Revoke a pairing code, preventing the onboarding of new point-of-sale terminals.
|
|
21
|
+
*
|
|
22
|
+
* Terminals that have already paired with this code are not affected.
|
|
23
|
+
*
|
|
24
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
25
|
+
*/
|
|
26
|
+
export declare function terminalsTerminalsRevokePairingCode(client: ClientCore, request: operations.TerminalsRevokePairingCodeRequest, options?: RequestOptions): APIPromise<Result<models.EntityPairingCode, errors.ErrorResponse | ClientError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
27
|
+
//# sourceMappingURL=terminalsTerminalsRevokePairingCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsTerminalsRevokePairingCode.d.ts","sourceRoot":"","sources":["../../../src/funcs/terminalsTerminalsRevokePairingCode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,iBAAiB,EACtB,MAAM,CAAC,aAAa,GACpB,WAAW,GACX,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 142d0a0681b4
|
|
4
|
+
*/
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Revoke terminal pairing code
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* > ℹ️ **Test mode**
|
|
21
|
+
* >
|
|
22
|
+
* > This endpoint currently does not support test mode yet.
|
|
23
|
+
*
|
|
24
|
+
* Revoke a pairing code, preventing the onboarding of new point-of-sale terminals.
|
|
25
|
+
*
|
|
26
|
+
* Terminals that have already paired with this code are not affected.
|
|
27
|
+
*
|
|
28
|
+
* If set, this operation will use either {@link Security.apiKey} or {@link Security.oAuth} from the global security.
|
|
29
|
+
*/
|
|
30
|
+
export function terminalsTerminalsRevokePairingCode(client, request, options) {
|
|
31
|
+
return new APIPromise($do(client, request, options));
|
|
32
|
+
}
|
|
33
|
+
async function $do(client, request, options) {
|
|
34
|
+
const parsed = safeParse(request, (value) => operations.TerminalsRevokePairingCodeRequest$outboundSchema.parse(value), "Input validation failed");
|
|
35
|
+
if (!parsed.ok) {
|
|
36
|
+
return [parsed, { status: "invalid" }];
|
|
37
|
+
}
|
|
38
|
+
const payload = parsed.value;
|
|
39
|
+
const body = null;
|
|
40
|
+
const pathParams = {
|
|
41
|
+
pairingCodeId: encodeSimple("pairingCodeId", payload.pairingCodeId, {
|
|
42
|
+
explode: false,
|
|
43
|
+
charEncoding: "percent",
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
46
|
+
const path = pathToFunc("/v2/terminals/pairing-codes/{pairingCodeId}")(pathParams);
|
|
47
|
+
const headers = new Headers(compactMap({
|
|
48
|
+
Accept: "application/hal+json",
|
|
49
|
+
"idempotency-key": encodeSimple("idempotency-key", payload["idempotency-key"], { explode: false, charEncoding: "none" }),
|
|
50
|
+
}));
|
|
51
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
52
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0, 2]);
|
|
53
|
+
const context = {
|
|
54
|
+
options: client._options,
|
|
55
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
56
|
+
operationID: "terminals-revoke-pairing-code",
|
|
57
|
+
oAuth2Scopes: null,
|
|
58
|
+
resolvedSecurity: requestSecurity,
|
|
59
|
+
securitySource: client._options.security,
|
|
60
|
+
retryConfig: options?.retries
|
|
61
|
+
|| client._options.retryConfig
|
|
62
|
+
|| {
|
|
63
|
+
strategy: "backoff",
|
|
64
|
+
backoff: {
|
|
65
|
+
initialInterval: 500,
|
|
66
|
+
maxInterval: 5000,
|
|
67
|
+
exponent: 2,
|
|
68
|
+
maxElapsedTime: 7500,
|
|
69
|
+
},
|
|
70
|
+
retryConnectionErrors: true,
|
|
71
|
+
}
|
|
72
|
+
|| { strategy: "none" },
|
|
73
|
+
retryCodes: options?.retryCodes || ["429", "5xx"],
|
|
74
|
+
};
|
|
75
|
+
const requestRes = client._createRequest(context, {
|
|
76
|
+
security: requestSecurity,
|
|
77
|
+
method: "DELETE",
|
|
78
|
+
baseURL: options?.serverURL,
|
|
79
|
+
path: path,
|
|
80
|
+
headers: headers,
|
|
81
|
+
body: body,
|
|
82
|
+
userAgent: client._options.userAgent,
|
|
83
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
84
|
+
}, options);
|
|
85
|
+
if (!requestRes.ok) {
|
|
86
|
+
return [requestRes, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const req = requestRes.value;
|
|
89
|
+
const doResult = await client._do(req, {
|
|
90
|
+
context,
|
|
91
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
92
|
+
retryConfig: context.retryConfig,
|
|
93
|
+
retryCodes: context.retryCodes,
|
|
94
|
+
});
|
|
95
|
+
if (!doResult.ok) {
|
|
96
|
+
return [doResult, { status: "request-error", request: req }];
|
|
97
|
+
}
|
|
98
|
+
const response = doResult.value;
|
|
99
|
+
const responseFields = {
|
|
100
|
+
HttpMeta: { Response: response, Request: req },
|
|
101
|
+
};
|
|
102
|
+
const [result] = await M.match(M.json(200, models.EntityPairingCode$inboundSchema, {
|
|
103
|
+
ctype: "application/hal+json",
|
|
104
|
+
}), M.jsonErr([404, 422, 429], errors.ErrorResponse$inboundSchema, {
|
|
105
|
+
ctype: "application/hal+json",
|
|
106
|
+
}), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
107
|
+
if (!result.ok) {
|
|
108
|
+
return [result, { status: "complete", request: req, response }];
|
|
109
|
+
}
|
|
110
|
+
return [result, { status: "complete", request: req, response }];
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=terminalsTerminalsRevokePairingCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalsTerminalsRevokePairingCode.js","sourceRoot":"","sources":["../../../src/funcs/terminalsTerminalsRevokePairingCode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,E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C,GAAG,EAAE,MAAM,CAAC,+BAA+B,EAAE;QAClD,KAAK,EAAE,sBAAsB;KAC9B,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,2BAA2B,EAAE;QAC7D,KAAK,EAAE,sBAAsB;KAC9B,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -47,8 +47,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
47
47
|
export declare const SDK_METADATA: {
|
|
48
48
|
readonly language: "typescript";
|
|
49
49
|
readonly openapiDocVersion: "1.0.0";
|
|
50
|
-
readonly sdkVersion: "1.8.
|
|
51
|
-
readonly genVersion: "2.884.
|
|
52
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.8.
|
|
50
|
+
readonly sdkVersion: "1.8.2";
|
|
51
|
+
readonly genVersion: "2.884.11";
|
|
52
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.8.2 2.884.11 1.0.0 mollie-api-typescript";
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "1.8.
|
|
29
|
-
genVersion: "2.884.
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.8.
|
|
28
|
+
sdkVersion: "1.8.2",
|
|
29
|
+
genVersion: "2.884.11",
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.8.2 2.884.11 1.0.0 mollie-api-typescript",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAU,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,wBAAwB;CAChB,CAAC;AA4CX,MAAM,UAAU,oBAAoB,CAAC,OAAmB;IACtD,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAElC,MAAM,MAAM,GAAW,EAAE,CAAC;IAE1B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC;QACzC,IAAI,SAAS,GAAG,CAAC,IAAI,SAAS,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,wBAAwB,SAAS,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,YAAY;IACtB,iBAAiB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