mollie-api-typescript 0.9.0 → 0.9.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/bin/mcp-server.js +47 -37
- package/bin/mcp-server.js.map +15 -15
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/entitymethod.d.ts +4 -1
- package/dist/commonjs/models/entitymethod.d.ts.map +1 -1
- package/dist/commonjs/models/entitymethod.js +4 -1
- package/dist/commonjs/models/entitymethod.js.map +1 -1
- package/dist/commonjs/models/entitywebhookevent.d.ts +8 -2
- package/dist/commonjs/models/entitywebhookevent.d.ts.map +1 -1
- package/dist/commonjs/models/entitywebhookevent.js +4 -1
- package/dist/commonjs/models/entitywebhookevent.js.map +1 -1
- package/dist/commonjs/models/listentitymethod.d.ts +4 -1
- package/dist/commonjs/models/listentitymethod.d.ts.map +1 -1
- package/dist/commonjs/models/listentitymethod.js +4 -1
- package/dist/commonjs/models/listentitymethod.js.map +1 -1
- package/dist/commonjs/models/listentitymethodall.d.ts +4 -1
- package/dist/commonjs/models/listentitymethodall.d.ts.map +1 -1
- package/dist/commonjs/models/listentitymethodall.js +4 -1
- package/dist/commonjs/models/listentitymethodall.js.map +1 -1
- package/dist/commonjs/models/method.d.ts +0 -1
- package/dist/commonjs/models/method.d.ts.map +1 -1
- package/dist/commonjs/models/method.js +0 -1
- package/dist/commonjs/models/method.js.map +1 -1
- package/dist/commonjs/models/methodresponse.d.ts +4 -1
- package/dist/commonjs/models/methodresponse.d.ts.map +1 -1
- package/dist/commonjs/models/methodresponse.js +4 -1
- package/dist/commonjs/models/methodresponse.js.map +1 -1
- package/dist/commonjs/models/operations/createwebhook.d.ts +11 -5
- package/dist/commonjs/models/operations/createwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createwebhook.js +27 -11
- package/dist/commonjs/models/operations/createwebhook.js.map +1 -1
- package/dist/commonjs/models/operations/updatewebhook.d.ts +11 -5
- package/dist/commonjs/models/operations/updatewebhook.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatewebhook.js +27 -11
- package/dist/commonjs/models/operations/updatewebhook.js.map +1 -1
- package/dist/commonjs/models/paymentmethod.d.ts +0 -1
- package/dist/commonjs/models/paymentmethod.d.ts.map +1 -1
- package/dist/commonjs/models/paymentmethod.js +0 -1
- package/dist/commonjs/models/paymentmethod.js.map +1 -1
- package/dist/commonjs/models/webhookeventtypes.d.ts +8 -2
- package/dist/commonjs/models/webhookeventtypes.d.ts.map +1 -1
- package/dist/commonjs/models/webhookeventtypes.js +4 -1
- package/dist/commonjs/models/webhookeventtypes.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/entitymethod.d.ts +4 -1
- package/dist/esm/models/entitymethod.d.ts.map +1 -1
- package/dist/esm/models/entitymethod.js +4 -1
- package/dist/esm/models/entitymethod.js.map +1 -1
- package/dist/esm/models/entitywebhookevent.d.ts +8 -2
- package/dist/esm/models/entitywebhookevent.d.ts.map +1 -1
- package/dist/esm/models/entitywebhookevent.js +4 -1
- package/dist/esm/models/entitywebhookevent.js.map +1 -1
- package/dist/esm/models/listentitymethod.d.ts +4 -1
- package/dist/esm/models/listentitymethod.d.ts.map +1 -1
- package/dist/esm/models/listentitymethod.js +4 -1
- package/dist/esm/models/listentitymethod.js.map +1 -1
- package/dist/esm/models/listentitymethodall.d.ts +4 -1
- package/dist/esm/models/listentitymethodall.d.ts.map +1 -1
- package/dist/esm/models/listentitymethodall.js +4 -1
- package/dist/esm/models/listentitymethodall.js.map +1 -1
- package/dist/esm/models/method.d.ts +0 -1
- package/dist/esm/models/method.d.ts.map +1 -1
- package/dist/esm/models/method.js +0 -1
- package/dist/esm/models/method.js.map +1 -1
- package/dist/esm/models/methodresponse.d.ts +4 -1
- package/dist/esm/models/methodresponse.d.ts.map +1 -1
- package/dist/esm/models/methodresponse.js +4 -1
- package/dist/esm/models/methodresponse.js.map +1 -1
- package/dist/esm/models/operations/createwebhook.d.ts +11 -5
- package/dist/esm/models/operations/createwebhook.d.ts.map +1 -1
- package/dist/esm/models/operations/createwebhook.js +24 -10
- package/dist/esm/models/operations/createwebhook.js.map +1 -1
- package/dist/esm/models/operations/updatewebhook.d.ts +11 -5
- package/dist/esm/models/operations/updatewebhook.d.ts.map +1 -1
- package/dist/esm/models/operations/updatewebhook.js +24 -10
- package/dist/esm/models/operations/updatewebhook.js.map +1 -1
- package/dist/esm/models/paymentmethod.d.ts +0 -1
- package/dist/esm/models/paymentmethod.d.ts.map +1 -1
- package/dist/esm/models/paymentmethod.js +0 -1
- package/dist/esm/models/paymentmethod.js.map +1 -1
- package/dist/esm/models/webhookeventtypes.d.ts +8 -2
- package/dist/esm/models/webhookeventtypes.d.ts.map +1 -1
- package/dist/esm/models/webhookeventtypes.js +4 -1
- package/dist/esm/models/webhookeventtypes.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/entitymethod.ts +4 -1
- package/src/models/entitywebhookevent.ts +8 -2
- package/src/models/listentitymethod.ts +4 -1
- package/src/models/listentitymethodall.ts +4 -1
- package/src/models/method.ts +0 -1
- package/src/models/methodresponse.ts +4 -1
- package/src/models/operations/createwebhook.ts +53 -15
- package/src/models/operations/updatewebhook.ts +56 -15
- package/src/models/paymentmethod.ts +0 -1
- package/src/models/webhookeventtypes.ts +8 -2
package/src/lib/config.ts
CHANGED
|
@@ -77,8 +77,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
77
77
|
export const SDK_METADATA = {
|
|
78
78
|
language: "typescript",
|
|
79
79
|
openapiDocVersion: "1.0.0",
|
|
80
|
-
sdkVersion: "0.9.
|
|
80
|
+
sdkVersion: "0.9.2",
|
|
81
81
|
genVersion: "2.770.0",
|
|
82
82
|
userAgent:
|
|
83
|
-
"speakeasy-sdk/typescript 0.9.
|
|
83
|
+
"speakeasy-sdk/typescript 0.9.2 2.770.0 1.0.0 mollie-api-typescript",
|
|
84
84
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -51,7 +51,6 @@ export const EntityMethodId = {
|
|
|
51
51
|
Multibanco: "multibanco",
|
|
52
52
|
Mybank: "mybank",
|
|
53
53
|
Paybybank: "paybybank",
|
|
54
|
-
Payconiq: "payconiq",
|
|
55
54
|
Paypal: "paypal",
|
|
56
55
|
Paysafecard: "paysafecard",
|
|
57
56
|
Pointofsale: "pointofsale",
|
|
@@ -75,6 +74,10 @@ export const EntityMethodId = {
|
|
|
75
74
|
* Deprecated, use 'klarna' instead
|
|
76
75
|
*/
|
|
77
76
|
Klarnasliceit: "klarnasliceit",
|
|
77
|
+
/**
|
|
78
|
+
* No longer available
|
|
79
|
+
*/
|
|
80
|
+
Payconiq: "payconiq",
|
|
78
81
|
} as const;
|
|
79
82
|
/**
|
|
80
83
|
* The unique identifier of the payment method. When used during [payment creation](create-payment), the payment
|
|
@@ -29,7 +29,10 @@ import {
|
|
|
29
29
|
} from "./url.js";
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* The
|
|
32
|
+
* The list of events to enable for this webhook. You may specify `'*'` to add all events, except those
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* that require explicit selection.
|
|
33
36
|
*/
|
|
34
37
|
export const EntityWebhookEventWebhookEventTypes = {
|
|
35
38
|
PaymentLinkPaid: "payment-link.paid",
|
|
@@ -41,7 +44,10 @@ export const EntityWebhookEventWebhookEventTypes = {
|
|
|
41
44
|
Wildcard: "*",
|
|
42
45
|
} as const;
|
|
43
46
|
/**
|
|
44
|
-
* The
|
|
47
|
+
* The list of events to enable for this webhook. You may specify `'*'` to add all events, except those
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* that require explicit selection.
|
|
45
51
|
*/
|
|
46
52
|
export type EntityWebhookEventWebhookEventTypes = OpenEnum<
|
|
47
53
|
typeof EntityWebhookEventWebhookEventTypes
|
|
@@ -51,7 +51,6 @@ export const ListEntityMethodId = {
|
|
|
51
51
|
Multibanco: "multibanco",
|
|
52
52
|
Mybank: "mybank",
|
|
53
53
|
Paybybank: "paybybank",
|
|
54
|
-
Payconiq: "payconiq",
|
|
55
54
|
Paypal: "paypal",
|
|
56
55
|
Paysafecard: "paysafecard",
|
|
57
56
|
Pointofsale: "pointofsale",
|
|
@@ -75,6 +74,10 @@ export const ListEntityMethodId = {
|
|
|
75
74
|
* Deprecated, use 'klarna' instead
|
|
76
75
|
*/
|
|
77
76
|
Klarnasliceit: "klarnasliceit",
|
|
77
|
+
/**
|
|
78
|
+
* No longer available
|
|
79
|
+
*/
|
|
80
|
+
Payconiq: "payconiq",
|
|
78
81
|
} as const;
|
|
79
82
|
/**
|
|
80
83
|
* The unique identifier of the payment method. When used during [payment creation](create-payment), the payment
|
|
@@ -57,7 +57,6 @@ export const ListEntityMethodAllId = {
|
|
|
57
57
|
Multibanco: "multibanco",
|
|
58
58
|
Mybank: "mybank",
|
|
59
59
|
Paybybank: "paybybank",
|
|
60
|
-
Payconiq: "payconiq",
|
|
61
60
|
Paypal: "paypal",
|
|
62
61
|
Paysafecard: "paysafecard",
|
|
63
62
|
Pointofsale: "pointofsale",
|
|
@@ -81,6 +80,10 @@ export const ListEntityMethodAllId = {
|
|
|
81
80
|
* Deprecated, use 'klarna' instead
|
|
82
81
|
*/
|
|
83
82
|
Klarnasliceit: "klarnasliceit",
|
|
83
|
+
/**
|
|
84
|
+
* No longer available
|
|
85
|
+
*/
|
|
86
|
+
Payconiq: "payconiq",
|
|
84
87
|
} as const;
|
|
85
88
|
/**
|
|
86
89
|
* The unique identifier of the payment method. When used during [payment creation](create-payment), the payment
|
package/src/models/method.ts
CHANGED
|
@@ -41,7 +41,6 @@ export const MethodResponse = {
|
|
|
41
41
|
Multibanco: "multibanco",
|
|
42
42
|
Mybank: "mybank",
|
|
43
43
|
Paybybank: "paybybank",
|
|
44
|
-
Payconiq: "payconiq",
|
|
45
44
|
Paypal: "paypal",
|
|
46
45
|
Paysafecard: "paysafecard",
|
|
47
46
|
Pointofsale: "pointofsale",
|
|
@@ -65,6 +64,10 @@ export const MethodResponse = {
|
|
|
65
64
|
* Deprecated, use 'klarna' instead
|
|
66
65
|
*/
|
|
67
66
|
Klarnasliceit: "klarnasliceit",
|
|
67
|
+
/**
|
|
68
|
+
* No longer available
|
|
69
|
+
*/
|
|
70
|
+
Payconiq: "payconiq",
|
|
68
71
|
} as const;
|
|
69
72
|
/**
|
|
70
73
|
* Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment
|
|
@@ -9,6 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import * as models from "../index.js";
|
|
11
11
|
|
|
12
|
+
export type CreateWebhookEventTypes =
|
|
13
|
+
| Array<models.WebhookEventTypes>
|
|
14
|
+
| models.WebhookEventTypes;
|
|
15
|
+
|
|
12
16
|
export type CreateWebhookRequestBody = {
|
|
13
17
|
/**
|
|
14
18
|
* A name that identifies the webhook.
|
|
@@ -18,10 +22,7 @@ export type CreateWebhookRequestBody = {
|
|
|
18
22
|
* The URL Mollie will send the events to. This URL must be publicly accessible.
|
|
19
23
|
*/
|
|
20
24
|
url: string;
|
|
21
|
-
|
|
22
|
-
* The event's type
|
|
23
|
-
*/
|
|
24
|
-
webhookEventTypes: models.WebhookEventTypes;
|
|
25
|
+
eventTypes: Array<models.WebhookEventTypes> | models.WebhookEventTypes;
|
|
25
26
|
/**
|
|
26
27
|
* Whether to create the entity in test mode or live mode.
|
|
27
28
|
*
|
|
@@ -42,6 +43,45 @@ export type CreateWebhookRequest = {
|
|
|
42
43
|
requestBody?: CreateWebhookRequestBody | undefined;
|
|
43
44
|
};
|
|
44
45
|
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const CreateWebhookEventTypes$inboundSchema: z.ZodType<
|
|
48
|
+
CreateWebhookEventTypes,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.union([
|
|
52
|
+
z.array(models.WebhookEventTypes$inboundSchema),
|
|
53
|
+
models.WebhookEventTypes$inboundSchema,
|
|
54
|
+
]);
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type CreateWebhookEventTypes$Outbound = Array<string> | string;
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const CreateWebhookEventTypes$outboundSchema: z.ZodType<
|
|
60
|
+
CreateWebhookEventTypes$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
CreateWebhookEventTypes
|
|
63
|
+
> = z.union([
|
|
64
|
+
z.array(models.WebhookEventTypes$outboundSchema),
|
|
65
|
+
models.WebhookEventTypes$outboundSchema,
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
export function createWebhookEventTypesToJSON(
|
|
69
|
+
createWebhookEventTypes: CreateWebhookEventTypes,
|
|
70
|
+
): string {
|
|
71
|
+
return JSON.stringify(
|
|
72
|
+
CreateWebhookEventTypes$outboundSchema.parse(createWebhookEventTypes),
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
export function createWebhookEventTypesFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<CreateWebhookEventTypes, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => CreateWebhookEventTypes$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'CreateWebhookEventTypes' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
45
85
|
/** @internal */
|
|
46
86
|
export const CreateWebhookRequestBody$inboundSchema: z.ZodType<
|
|
47
87
|
CreateWebhookRequestBody,
|
|
@@ -50,18 +90,17 @@ export const CreateWebhookRequestBody$inboundSchema: z.ZodType<
|
|
|
50
90
|
> = z.object({
|
|
51
91
|
name: z.string(),
|
|
52
92
|
url: z.string(),
|
|
53
|
-
eventTypes:
|
|
93
|
+
eventTypes: z.union([
|
|
94
|
+
z.array(models.WebhookEventTypes$inboundSchema),
|
|
95
|
+
models.WebhookEventTypes$inboundSchema,
|
|
96
|
+
]),
|
|
54
97
|
testmode: z.nullable(z.boolean()).optional(),
|
|
55
|
-
}).transform((v) => {
|
|
56
|
-
return remap$(v, {
|
|
57
|
-
"eventTypes": "webhookEventTypes",
|
|
58
|
-
});
|
|
59
98
|
});
|
|
60
99
|
/** @internal */
|
|
61
100
|
export type CreateWebhookRequestBody$Outbound = {
|
|
62
101
|
name: string;
|
|
63
102
|
url: string;
|
|
64
|
-
eventTypes: string;
|
|
103
|
+
eventTypes: Array<string> | string;
|
|
65
104
|
testmode?: boolean | null | undefined;
|
|
66
105
|
};
|
|
67
106
|
|
|
@@ -73,12 +112,11 @@ export const CreateWebhookRequestBody$outboundSchema: z.ZodType<
|
|
|
73
112
|
> = z.object({
|
|
74
113
|
name: z.string(),
|
|
75
114
|
url: z.string(),
|
|
76
|
-
|
|
115
|
+
eventTypes: z.union([
|
|
116
|
+
z.array(models.WebhookEventTypes$outboundSchema),
|
|
117
|
+
models.WebhookEventTypes$outboundSchema,
|
|
118
|
+
]),
|
|
77
119
|
testmode: z.nullable(z.boolean()).optional(),
|
|
78
|
-
}).transform((v) => {
|
|
79
|
-
return remap$(v, {
|
|
80
|
-
webhookEventTypes: "eventTypes",
|
|
81
|
-
});
|
|
82
120
|
});
|
|
83
121
|
|
|
84
122
|
export function createWebhookRequestBodyToJSON(
|
|
@@ -9,6 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import * as models from "../index.js";
|
|
11
11
|
|
|
12
|
+
export type UpdateWebhookEventTypes =
|
|
13
|
+
| Array<models.WebhookEventTypes>
|
|
14
|
+
| models.WebhookEventTypes;
|
|
15
|
+
|
|
12
16
|
export type UpdateWebhookRequestBody = {
|
|
13
17
|
/**
|
|
14
18
|
* A name that identifies the webhook.
|
|
@@ -18,10 +22,10 @@ export type UpdateWebhookRequestBody = {
|
|
|
18
22
|
* The URL Mollie will send the events to. This URL must be publicly accessible.
|
|
19
23
|
*/
|
|
20
24
|
url?: string | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
eventTypes?:
|
|
26
|
+
| Array<models.WebhookEventTypes>
|
|
27
|
+
| models.WebhookEventTypes
|
|
28
|
+
| undefined;
|
|
25
29
|
/**
|
|
26
30
|
* Most API credentials are specifically created for either live mode or test mode. For organization-level credentials
|
|
27
31
|
*
|
|
@@ -45,6 +49,45 @@ export type UpdateWebhookRequest = {
|
|
|
45
49
|
requestBody?: UpdateWebhookRequestBody | undefined;
|
|
46
50
|
};
|
|
47
51
|
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const UpdateWebhookEventTypes$inboundSchema: z.ZodType<
|
|
54
|
+
UpdateWebhookEventTypes,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.union([
|
|
58
|
+
z.array(models.WebhookEventTypes$inboundSchema),
|
|
59
|
+
models.WebhookEventTypes$inboundSchema,
|
|
60
|
+
]);
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type UpdateWebhookEventTypes$Outbound = Array<string> | string;
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const UpdateWebhookEventTypes$outboundSchema: z.ZodType<
|
|
66
|
+
UpdateWebhookEventTypes$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
UpdateWebhookEventTypes
|
|
69
|
+
> = z.union([
|
|
70
|
+
z.array(models.WebhookEventTypes$outboundSchema),
|
|
71
|
+
models.WebhookEventTypes$outboundSchema,
|
|
72
|
+
]);
|
|
73
|
+
|
|
74
|
+
export function updateWebhookEventTypesToJSON(
|
|
75
|
+
updateWebhookEventTypes: UpdateWebhookEventTypes,
|
|
76
|
+
): string {
|
|
77
|
+
return JSON.stringify(
|
|
78
|
+
UpdateWebhookEventTypes$outboundSchema.parse(updateWebhookEventTypes),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export function updateWebhookEventTypesFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<UpdateWebhookEventTypes, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => UpdateWebhookEventTypes$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'UpdateWebhookEventTypes' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
48
91
|
/** @internal */
|
|
49
92
|
export const UpdateWebhookRequestBody$inboundSchema: z.ZodType<
|
|
50
93
|
UpdateWebhookRequestBody,
|
|
@@ -53,18 +96,17 @@ export const UpdateWebhookRequestBody$inboundSchema: z.ZodType<
|
|
|
53
96
|
> = z.object({
|
|
54
97
|
name: z.string().optional(),
|
|
55
98
|
url: z.string().optional(),
|
|
56
|
-
eventTypes:
|
|
99
|
+
eventTypes: z.union([
|
|
100
|
+
z.array(models.WebhookEventTypes$inboundSchema),
|
|
101
|
+
models.WebhookEventTypes$inboundSchema,
|
|
102
|
+
]).optional(),
|
|
57
103
|
testmode: z.nullable(z.boolean()).optional(),
|
|
58
|
-
}).transform((v) => {
|
|
59
|
-
return remap$(v, {
|
|
60
|
-
"eventTypes": "webhookEventTypes",
|
|
61
|
-
});
|
|
62
104
|
});
|
|
63
105
|
/** @internal */
|
|
64
106
|
export type UpdateWebhookRequestBody$Outbound = {
|
|
65
107
|
name?: string | undefined;
|
|
66
108
|
url?: string | undefined;
|
|
67
|
-
eventTypes?: string | undefined;
|
|
109
|
+
eventTypes?: Array<string> | string | undefined;
|
|
68
110
|
testmode?: boolean | null | undefined;
|
|
69
111
|
};
|
|
70
112
|
|
|
@@ -76,12 +118,11 @@ export const UpdateWebhookRequestBody$outboundSchema: z.ZodType<
|
|
|
76
118
|
> = z.object({
|
|
77
119
|
name: z.string().optional(),
|
|
78
120
|
url: z.string().optional(),
|
|
79
|
-
|
|
121
|
+
eventTypes: z.union([
|
|
122
|
+
z.array(models.WebhookEventTypes$outboundSchema),
|
|
123
|
+
models.WebhookEventTypes$outboundSchema,
|
|
124
|
+
]).optional(),
|
|
80
125
|
testmode: z.nullable(z.boolean()).optional(),
|
|
81
|
-
}).transform((v) => {
|
|
82
|
-
return remap$(v, {
|
|
83
|
-
webhookEventTypes: "eventTypes",
|
|
84
|
-
});
|
|
85
126
|
});
|
|
86
127
|
|
|
87
128
|
export function updateWebhookRequestBodyToJSON(
|
|
@@ -6,7 +6,10 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The list of events to enable for this webhook. You may specify `'*'` to add all events, except those
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* that require explicit selection.
|
|
10
13
|
*/
|
|
11
14
|
export const WebhookEventTypes = {
|
|
12
15
|
PaymentLinkPaid: "payment-link.paid",
|
|
@@ -18,7 +21,10 @@ export const WebhookEventTypes = {
|
|
|
18
21
|
Wildcard: "*",
|
|
19
22
|
} as const;
|
|
20
23
|
/**
|
|
21
|
-
* The
|
|
24
|
+
* The list of events to enable for this webhook. You may specify `'*'` to add all events, except those
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* that require explicit selection.
|
|
22
28
|
*/
|
|
23
29
|
export type WebhookEventTypes = ClosedEnum<typeof WebhookEventTypes>;
|
|
24
30
|
|