mollie-api-typescript 0.0.8 → 0.0.9
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/bin/mcp-server.js +38 -16
- package/bin/mcp-server.js.map +9 -9
- package/dist/commonjs/funcs/webhookEventsGet.js +4 -0
- package/dist/commonjs/funcs/webhookEventsGet.js.map +1 -1
- package/dist/commonjs/funcs/webhooksDelete.js +2 -5
- package/dist/commonjs/funcs/webhooksDelete.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/operations/deletewebhook.d.ts +33 -9
- package/dist/commonjs/models/operations/deletewebhook.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletewebhook.js +39 -3
- package/dist/commonjs/models/operations/deletewebhook.js.map +1 -1
- package/dist/commonjs/models/operations/getwebhookevent.d.ts +11 -0
- package/dist/commonjs/models/operations/getwebhookevent.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getwebhookevent.js +2 -0
- package/dist/commonjs/models/operations/getwebhookevent.js.map +1 -1
- package/dist/esm/funcs/webhookEventsGet.js +5 -1
- package/dist/esm/funcs/webhookEventsGet.js.map +1 -1
- package/dist/esm/funcs/webhooksDelete.js +3 -6
- package/dist/esm/funcs/webhooksDelete.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/operations/deletewebhook.d.ts +33 -9
- package/dist/esm/models/operations/deletewebhook.d.ts.map +1 -1
- package/dist/esm/models/operations/deletewebhook.js +36 -2
- package/dist/esm/models/operations/deletewebhook.js.map +1 -1
- package/dist/esm/models/operations/getwebhookevent.d.ts +11 -0
- package/dist/esm/models/operations/getwebhookevent.d.ts.map +1 -1
- package/dist/esm/models/operations/getwebhookevent.js +2 -0
- package/dist/esm/models/operations/getwebhookevent.js.map +1 -1
- package/docs/sdks/webhookevents/README.md +2 -0
- package/docs/sdks/webhooks/README.md +6 -2
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/webhookEventsGet.ts +6 -1
- package/src/funcs/webhooksDelete.ts +3 -7
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/deletewebhook.ts +77 -11
- package/src/models/operations/getwebhookevent.ts +13 -0
|
@@ -3,27 +3,31 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
10
|
-
export type
|
|
11
|
+
export type DeleteWebhookRequestBody = {
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
id: string;
|
|
15
|
-
/**
|
|
16
|
-
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
13
|
+
* Most API credentials are specifically created for either live mode or test mode. For organization-level credentials
|
|
17
14
|
*
|
|
18
15
|
* @remarks
|
|
19
|
-
*
|
|
20
|
-
* setting the `testmode` query parameter to `true`.
|
|
16
|
+
* such as OAuth access tokens, you can enable test mode by setting `testmode` to `true`.
|
|
21
17
|
*
|
|
22
18
|
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
23
19
|
*/
|
|
24
20
|
testmode?: boolean | null | undefined;
|
|
25
21
|
};
|
|
26
22
|
|
|
23
|
+
export type DeleteWebhookRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* Provide the ID of the item you want to perform this operation on.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
requestBody?: DeleteWebhookRequestBody | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
27
31
|
/**
|
|
28
32
|
* The URL to the generic Mollie API error handling guide.
|
|
29
33
|
*/
|
|
@@ -54,6 +58,60 @@ export type DeleteWebhookNotFoundLinks = {
|
|
|
54
58
|
documentation: DeleteWebhookNotFoundDocumentation;
|
|
55
59
|
};
|
|
56
60
|
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const DeleteWebhookRequestBody$inboundSchema: z.ZodType<
|
|
63
|
+
DeleteWebhookRequestBody,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
testmode: z.nullable(z.boolean()).optional(),
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type DeleteWebhookRequestBody$Outbound = {
|
|
72
|
+
testmode?: boolean | null | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const DeleteWebhookRequestBody$outboundSchema: z.ZodType<
|
|
77
|
+
DeleteWebhookRequestBody$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
DeleteWebhookRequestBody
|
|
80
|
+
> = z.object({
|
|
81
|
+
testmode: z.nullable(z.boolean()).optional(),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace DeleteWebhookRequestBody$ {
|
|
89
|
+
/** @deprecated use `DeleteWebhookRequestBody$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = DeleteWebhookRequestBody$inboundSchema;
|
|
91
|
+
/** @deprecated use `DeleteWebhookRequestBody$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = DeleteWebhookRequestBody$outboundSchema;
|
|
93
|
+
/** @deprecated use `DeleteWebhookRequestBody$Outbound` instead. */
|
|
94
|
+
export type Outbound = DeleteWebhookRequestBody$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function deleteWebhookRequestBodyToJSON(
|
|
98
|
+
deleteWebhookRequestBody: DeleteWebhookRequestBody,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
DeleteWebhookRequestBody$outboundSchema.parse(deleteWebhookRequestBody),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function deleteWebhookRequestBodyFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<DeleteWebhookRequestBody, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) => DeleteWebhookRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'DeleteWebhookRequestBody' from JSON`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
57
115
|
/** @internal */
|
|
58
116
|
export const DeleteWebhookRequest$inboundSchema: z.ZodType<
|
|
59
117
|
DeleteWebhookRequest,
|
|
@@ -61,13 +119,17 @@ export const DeleteWebhookRequest$inboundSchema: z.ZodType<
|
|
|
61
119
|
unknown
|
|
62
120
|
> = z.object({
|
|
63
121
|
id: z.string(),
|
|
64
|
-
|
|
122
|
+
RequestBody: z.lazy(() => DeleteWebhookRequestBody$inboundSchema).optional(),
|
|
123
|
+
}).transform((v) => {
|
|
124
|
+
return remap$(v, {
|
|
125
|
+
"RequestBody": "requestBody",
|
|
126
|
+
});
|
|
65
127
|
});
|
|
66
128
|
|
|
67
129
|
/** @internal */
|
|
68
130
|
export type DeleteWebhookRequest$Outbound = {
|
|
69
131
|
id: string;
|
|
70
|
-
|
|
132
|
+
RequestBody?: DeleteWebhookRequestBody$Outbound | undefined;
|
|
71
133
|
};
|
|
72
134
|
|
|
73
135
|
/** @internal */
|
|
@@ -77,7 +139,11 @@ export const DeleteWebhookRequest$outboundSchema: z.ZodType<
|
|
|
77
139
|
DeleteWebhookRequest
|
|
78
140
|
> = z.object({
|
|
79
141
|
id: z.string(),
|
|
80
|
-
|
|
142
|
+
requestBody: z.lazy(() => DeleteWebhookRequestBody$outboundSchema).optional(),
|
|
143
|
+
}).transform((v) => {
|
|
144
|
+
return remap$(v, {
|
|
145
|
+
requestBody: "RequestBody",
|
|
146
|
+
});
|
|
81
147
|
});
|
|
82
148
|
|
|
83
149
|
/**
|
|
@@ -14,6 +14,16 @@ export type GetWebhookEventRequest = {
|
|
|
14
14
|
* Provide the ID of the item you want to perform this operation on.
|
|
15
15
|
*/
|
|
16
16
|
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* parameter can be omitted. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
22
|
+
* setting the `testmode` query parameter to `true`.
|
|
23
|
+
*
|
|
24
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
25
|
+
*/
|
|
26
|
+
testmode?: boolean | null | undefined;
|
|
17
27
|
};
|
|
18
28
|
|
|
19
29
|
/**
|
|
@@ -1173,11 +1183,13 @@ export const GetWebhookEventRequest$inboundSchema: z.ZodType<
|
|
|
1173
1183
|
unknown
|
|
1174
1184
|
> = z.object({
|
|
1175
1185
|
id: z.string(),
|
|
1186
|
+
testmode: z.nullable(z.boolean()).optional(),
|
|
1176
1187
|
});
|
|
1177
1188
|
|
|
1178
1189
|
/** @internal */
|
|
1179
1190
|
export type GetWebhookEventRequest$Outbound = {
|
|
1180
1191
|
id: string;
|
|
1192
|
+
testmode?: boolean | null | undefined;
|
|
1181
1193
|
};
|
|
1182
1194
|
|
|
1183
1195
|
/** @internal */
|
|
@@ -1187,6 +1199,7 @@ export const GetWebhookEventRequest$outboundSchema: z.ZodType<
|
|
|
1187
1199
|
GetWebhookEventRequest
|
|
1188
1200
|
> = z.object({
|
|
1189
1201
|
id: z.string(),
|
|
1202
|
+
testmode: z.nullable(z.boolean()).optional(),
|
|
1190
1203
|
});
|
|
1191
1204
|
|
|
1192
1205
|
/**
|