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,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
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: bc1b621a466f
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
export type TerminalsListPairingCodesGlobals = {
|
|
14
|
+
/**
|
|
15
|
+
* The identifier referring to the [profile](get-profile) you wish to
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* retrieve the resources for.
|
|
19
|
+
*
|
|
20
|
+
* Most API credentials are linked to a single profile. In these cases the `profileId` must not be sent. For
|
|
21
|
+
* organization-level credentials such as OAuth access tokens however, the `profileId` parameter is required.
|
|
22
|
+
*/
|
|
23
|
+
profileId?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type TerminalsListPairingCodesRequest = {
|
|
27
|
+
/**
|
|
28
|
+
* Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate the
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* result set.
|
|
32
|
+
*/
|
|
33
|
+
from?: string | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The maximum number of items to return. Defaults to 50 items.
|
|
36
|
+
*/
|
|
37
|
+
limit?: number | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Used for setting the direction of the result set. Defaults to descending order, meaning the results are ordered from
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* newest to oldest.
|
|
43
|
+
*/
|
|
44
|
+
sort?: models.Sorting | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The identifier referring to the [profile](get-profile) you wish to retrieve pairing codes for.
|
|
47
|
+
*/
|
|
48
|
+
profileId?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
51
|
+
*/
|
|
52
|
+
idempotencyKey?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type TerminalPairingCode = {};
|
|
56
|
+
|
|
57
|
+
export type TerminalsListPairingCodesEmbedded = {
|
|
58
|
+
/**
|
|
59
|
+
* An array of terminal pairing code objects. For a complete reference of the terminal pairing code
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* object, refer to the [Get terminal pairing code endpoint](terminals-get-pairing-code)
|
|
63
|
+
* documentation.
|
|
64
|
+
*/
|
|
65
|
+
terminalPairingCodes?: Array<TerminalPairingCode> | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A list of terminal pairing code objects. For a complete reference of the terminal pairing code object, refer to
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* the [Get terminal pairing code endpoint](terminals-get-pairing-code) documentation.
|
|
73
|
+
*/
|
|
74
|
+
export type TerminalsListPairingCodesResponse = {
|
|
75
|
+
/**
|
|
76
|
+
* The number of items in this result set. If more items are available, a `_links.next` URL will be present in the result
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* as well.
|
|
80
|
+
*
|
|
81
|
+
* The maximum number of items per result set is controlled by the `limit` property provided in the request. The default
|
|
82
|
+
* limit is 50 items.
|
|
83
|
+
*/
|
|
84
|
+
count?: number | undefined;
|
|
85
|
+
embedded?: TerminalsListPairingCodesEmbedded | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Links to help navigate through the lists of items. Every URL object will contain an `href` and a `type` field.
|
|
88
|
+
*/
|
|
89
|
+
links?: models.ListLinks | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export type TerminalsListPairingCodesRequest$Outbound = {
|
|
94
|
+
from?: string | null | undefined;
|
|
95
|
+
limit?: number | null | undefined;
|
|
96
|
+
sort?: string | undefined;
|
|
97
|
+
profileId?: string | undefined;
|
|
98
|
+
"idempotency-key"?: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const TerminalsListPairingCodesRequest$outboundSchema: z.ZodType<
|
|
103
|
+
TerminalsListPairingCodesRequest$Outbound,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
TerminalsListPairingCodesRequest
|
|
106
|
+
> = z.object({
|
|
107
|
+
from: z.nullable(z.string()).optional(),
|
|
108
|
+
limit: z.nullable(z.number().int()).optional(),
|
|
109
|
+
sort: models.Sorting$outboundSchema.optional(),
|
|
110
|
+
profileId: z.string().optional(),
|
|
111
|
+
idempotencyKey: z.string().optional(),
|
|
112
|
+
}).transform((v) => {
|
|
113
|
+
return remap$(v, {
|
|
114
|
+
idempotencyKey: "idempotency-key",
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export function terminalsListPairingCodesRequestToJSON(
|
|
119
|
+
terminalsListPairingCodesRequest: TerminalsListPairingCodesRequest,
|
|
120
|
+
): string {
|
|
121
|
+
return JSON.stringify(
|
|
122
|
+
TerminalsListPairingCodesRequest$outboundSchema.parse(
|
|
123
|
+
terminalsListPairingCodesRequest,
|
|
124
|
+
),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const TerminalPairingCode$inboundSchema: z.ZodType<
|
|
130
|
+
TerminalPairingCode,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
unknown
|
|
133
|
+
> = z.object({});
|
|
134
|
+
|
|
135
|
+
export function terminalPairingCodeFromJSON(
|
|
136
|
+
jsonString: string,
|
|
137
|
+
): SafeParseResult<TerminalPairingCode, SDKValidationError> {
|
|
138
|
+
return safeParse(
|
|
139
|
+
jsonString,
|
|
140
|
+
(x) => TerminalPairingCode$inboundSchema.parse(JSON.parse(x)),
|
|
141
|
+
`Failed to parse 'TerminalPairingCode' from JSON`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const TerminalsListPairingCodesEmbedded$inboundSchema: z.ZodType<
|
|
147
|
+
TerminalsListPairingCodesEmbedded,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
unknown
|
|
150
|
+
> = z.object({
|
|
151
|
+
"terminal-pairing-codes": z.array(
|
|
152
|
+
z.lazy(() => TerminalPairingCode$inboundSchema),
|
|
153
|
+
).optional(),
|
|
154
|
+
}).transform((v) => {
|
|
155
|
+
return remap$(v, {
|
|
156
|
+
"terminal-pairing-codes": "terminalPairingCodes",
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
export function terminalsListPairingCodesEmbeddedFromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<TerminalsListPairingCodesEmbedded, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => TerminalsListPairingCodesEmbedded$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'TerminalsListPairingCodesEmbedded' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const TerminalsListPairingCodesResponse$inboundSchema: z.ZodType<
|
|
172
|
+
TerminalsListPairingCodesResponse,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = z.object({
|
|
176
|
+
count: z.number().int().optional(),
|
|
177
|
+
_embedded: z.lazy(() => TerminalsListPairingCodesEmbedded$inboundSchema)
|
|
178
|
+
.optional(),
|
|
179
|
+
_links: models.ListLinks$inboundSchema.optional(),
|
|
180
|
+
}).transform((v) => {
|
|
181
|
+
return remap$(v, {
|
|
182
|
+
"_embedded": "embedded",
|
|
183
|
+
"_links": "links",
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
export function terminalsListPairingCodesResponseFromJSON(
|
|
188
|
+
jsonString: string,
|
|
189
|
+
): SafeParseResult<TerminalsListPairingCodesResponse, SDKValidationError> {
|
|
190
|
+
return safeParse(
|
|
191
|
+
jsonString,
|
|
192
|
+
(x) => TerminalsListPairingCodesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
193
|
+
`Failed to parse 'TerminalsListPairingCodesResponse' from JSON`,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 017d1fbcc397
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
|
|
9
|
+
export type TerminalsRequestPairingCodeRequestBody = {
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the profile to pair the terminal with.
|
|
12
|
+
*/
|
|
13
|
+
profileId: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type TerminalsRequestPairingCodeRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* Include additional information in the response.
|
|
19
|
+
*/
|
|
20
|
+
include?: string | null | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
23
|
+
*/
|
|
24
|
+
idempotencyKey?: string | undefined;
|
|
25
|
+
requestBody?: TerminalsRequestPairingCodeRequestBody | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type TerminalsRequestPairingCodeRequestBody$Outbound = {
|
|
30
|
+
profileId: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const TerminalsRequestPairingCodeRequestBody$outboundSchema: z.ZodType<
|
|
35
|
+
TerminalsRequestPairingCodeRequestBody$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
TerminalsRequestPairingCodeRequestBody
|
|
38
|
+
> = z.object({
|
|
39
|
+
profileId: z.string(),
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export function terminalsRequestPairingCodeRequestBodyToJSON(
|
|
43
|
+
terminalsRequestPairingCodeRequestBody:
|
|
44
|
+
TerminalsRequestPairingCodeRequestBody,
|
|
45
|
+
): string {
|
|
46
|
+
return JSON.stringify(
|
|
47
|
+
TerminalsRequestPairingCodeRequestBody$outboundSchema.parse(
|
|
48
|
+
terminalsRequestPairingCodeRequestBody,
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type TerminalsRequestPairingCodeRequest$Outbound = {
|
|
55
|
+
include?: string | null | undefined;
|
|
56
|
+
"idempotency-key"?: string | undefined;
|
|
57
|
+
RequestBody?: TerminalsRequestPairingCodeRequestBody$Outbound | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const TerminalsRequestPairingCodeRequest$outboundSchema: z.ZodType<
|
|
62
|
+
TerminalsRequestPairingCodeRequest$Outbound,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
TerminalsRequestPairingCodeRequest
|
|
65
|
+
> = z.object({
|
|
66
|
+
include: z.nullable(z.string()).optional(),
|
|
67
|
+
idempotencyKey: z.string().optional(),
|
|
68
|
+
requestBody: z.lazy(() =>
|
|
69
|
+
TerminalsRequestPairingCodeRequestBody$outboundSchema
|
|
70
|
+
).optional(),
|
|
71
|
+
}).transform((v) => {
|
|
72
|
+
return remap$(v, {
|
|
73
|
+
idempotencyKey: "idempotency-key",
|
|
74
|
+
requestBody: "RequestBody",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function terminalsRequestPairingCodeRequestToJSON(
|
|
79
|
+
terminalsRequestPairingCodeRequest: TerminalsRequestPairingCodeRequest,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
TerminalsRequestPairingCodeRequest$outboundSchema.parse(
|
|
83
|
+
terminalsRequestPairingCodeRequest,
|
|
84
|
+
),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9742dfb51ef0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
|
|
9
|
+
export type TerminalsRevokePairingCodeRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* Provide the ID of the terminal pairing code.
|
|
12
|
+
*/
|
|
13
|
+
pairingCodeId: string;
|
|
14
|
+
/**
|
|
15
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
16
|
+
*/
|
|
17
|
+
idempotencyKey?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type TerminalsRevokePairingCodeRequest$Outbound = {
|
|
22
|
+
pairingCodeId: string;
|
|
23
|
+
"idempotency-key"?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const TerminalsRevokePairingCodeRequest$outboundSchema: z.ZodType<
|
|
28
|
+
TerminalsRevokePairingCodeRequest$Outbound,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
TerminalsRevokePairingCodeRequest
|
|
31
|
+
> = z.object({
|
|
32
|
+
pairingCodeId: z.string(),
|
|
33
|
+
idempotencyKey: z.string().optional(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
idempotencyKey: "idempotency-key",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function terminalsRevokePairingCodeRequestToJSON(
|
|
41
|
+
terminalsRevokePairingCodeRequest: TerminalsRevokePairingCodeRequest,
|
|
42
|
+
): string {
|
|
43
|
+
return JSON.stringify(
|
|
44
|
+
TerminalsRevokePairingCodeRequest$outboundSchema.parse(
|
|
45
|
+
terminalsRevokePairingCodeRequest,
|
|
46
|
+
),
|
|
47
|
+
);
|
|
48
|
+
}
|
package/src/sdk/terminals.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { terminalsGet } from "../funcs/terminalsGet.js";
|
|
7
7
|
import { terminalsList } from "../funcs/terminalsList.js";
|
|
8
|
+
import { terminalsTerminalsGetPairingCode } from "../funcs/terminalsTerminalsGetPairingCode.js";
|
|
9
|
+
import { terminalsTerminalsListPairingCodes } from "../funcs/terminalsTerminalsListPairingCodes.js";
|
|
10
|
+
import { terminalsTerminalsRequestPairingCode } from "../funcs/terminalsTerminalsRequestPairingCode.js";
|
|
11
|
+
import { terminalsTerminalsRevokePairingCode } from "../funcs/terminalsTerminalsRevokePairingCode.js";
|
|
8
12
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
13
|
import * as models from "../models/index.js";
|
|
10
14
|
import * as operations from "../models/operations/index.js";
|
|
@@ -47,4 +51,98 @@ export class Terminals extends ClientSDK {
|
|
|
47
51
|
options,
|
|
48
52
|
));
|
|
49
53
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Request terminal pairing code
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* > ℹ️ **Test mode**
|
|
60
|
+
* >
|
|
61
|
+
* > This endpoint currently does not support test mode yet.
|
|
62
|
+
*
|
|
63
|
+
* Request a pairing code to onboard a point-of-sale terminal.
|
|
64
|
+
*
|
|
65
|
+
* The response includes a human-readable `code` for manual entry on the terminal, and a QR Code as a
|
|
66
|
+
* base64 encoded SVG data URI for scanning if you specify the query parameter `include` with value `details.qrCode`.
|
|
67
|
+
*
|
|
68
|
+
* Pairing codes expire after 90 days (see `expiresAt`) and can be used multiple times.
|
|
69
|
+
*/
|
|
70
|
+
async terminalsRequestPairingCode(
|
|
71
|
+
request?: operations.TerminalsRequestPairingCodeRequest | undefined,
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): Promise<models.EntityPairingCode> {
|
|
74
|
+
return unwrapAsync(terminalsTerminalsRequestPairingCode(
|
|
75
|
+
this,
|
|
76
|
+
request,
|
|
77
|
+
options,
|
|
78
|
+
));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* List terminal pairing codes
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* > ℹ️ **Test mode**
|
|
86
|
+
* >
|
|
87
|
+
* > This endpoint currently does not support test mode yet.
|
|
88
|
+
*
|
|
89
|
+
* Returns all pairing codes: `active`, `expired`, and `revoked`. Results are paginated.
|
|
90
|
+
*/
|
|
91
|
+
async terminalsListPairingCodes(
|
|
92
|
+
request?: operations.TerminalsListPairingCodesRequest | undefined,
|
|
93
|
+
options?: RequestOptions,
|
|
94
|
+
): Promise<operations.TerminalsListPairingCodesResponse> {
|
|
95
|
+
return unwrapAsync(terminalsTerminalsListPairingCodes(
|
|
96
|
+
this,
|
|
97
|
+
request,
|
|
98
|
+
options,
|
|
99
|
+
));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Get terminal pairing code
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* > ℹ️ **Test mode**
|
|
107
|
+
* >
|
|
108
|
+
* > This endpoint currently does not support test mode yet.
|
|
109
|
+
*
|
|
110
|
+
* Get a pairing code to onboard a point-of-sale terminal.
|
|
111
|
+
*
|
|
112
|
+
* The response includes a human-readable `code` for manual entry on the terminal and, optionally, a QR Code as a
|
|
113
|
+
* base64 encoded SVG data URI when you use the `include` query parameter with value `details.qrCode`.
|
|
114
|
+
*/
|
|
115
|
+
async terminalsGetPairingCode(
|
|
116
|
+
request: operations.TerminalsGetPairingCodeRequest,
|
|
117
|
+
options?: RequestOptions,
|
|
118
|
+
): Promise<models.EntityPairingCode> {
|
|
119
|
+
return unwrapAsync(terminalsTerminalsGetPairingCode(
|
|
120
|
+
this,
|
|
121
|
+
request,
|
|
122
|
+
options,
|
|
123
|
+
));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Revoke terminal pairing code
|
|
128
|
+
*
|
|
129
|
+
* @remarks
|
|
130
|
+
* > ℹ️ **Test mode**
|
|
131
|
+
* >
|
|
132
|
+
* > This endpoint currently does not support test mode yet.
|
|
133
|
+
*
|
|
134
|
+
* Revoke a pairing code, preventing the onboarding of new point-of-sale terminals.
|
|
135
|
+
*
|
|
136
|
+
* Terminals that have already paired with this code are not affected.
|
|
137
|
+
*/
|
|
138
|
+
async terminalsRevokePairingCode(
|
|
139
|
+
request: operations.TerminalsRevokePairingCodeRequest,
|
|
140
|
+
options?: RequestOptions,
|
|
141
|
+
): Promise<models.EntityPairingCode> {
|
|
142
|
+
return unwrapAsync(terminalsTerminalsRevokePairingCode(
|
|
143
|
+
this,
|
|
144
|
+
request,
|
|
145
|
+
options,
|
|
146
|
+
));
|
|
147
|
+
}
|
|
50
148
|
}
|