mollie-api-typescript 0.1.6 → 0.1.8

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.
Files changed (127) hide show
  1. package/FUNCTIONS.md +7 -139
  2. package/README.md +77 -877
  3. package/bin/mcp-server.js +385 -192
  4. package/bin/mcp-server.js.map +20 -20
  5. package/dist/commonjs/lib/config.d.ts +3 -3
  6. package/dist/commonjs/lib/config.js +3 -3
  7. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  8. package/dist/commonjs/mcp-server/server.js +40 -40
  9. package/dist/commonjs/mcp-server/server.js.map +1 -1
  10. package/dist/commonjs/models/operations/cancelpayment.d.ts +3 -3
  11. package/dist/commonjs/models/operations/cancelpayment.js +1 -1
  12. package/dist/commonjs/models/operations/createcustomerpayment.d.ts +3 -3
  13. package/dist/commonjs/models/operations/createcustomerpayment.js +1 -1
  14. package/dist/commonjs/models/operations/createpayment.d.ts +3 -3
  15. package/dist/commonjs/models/operations/createpayment.js +1 -1
  16. package/dist/commonjs/models/operations/createwebhook.d.ts +96 -38
  17. package/dist/commonjs/models/operations/createwebhook.d.ts.map +1 -1
  18. package/dist/commonjs/models/operations/createwebhook.js +79 -41
  19. package/dist/commonjs/models/operations/createwebhook.js.map +1 -1
  20. package/dist/commonjs/models/operations/getpayment.d.ts +3 -3
  21. package/dist/commonjs/models/operations/getpayment.js +1 -1
  22. package/dist/commonjs/models/operations/getpaymentlinkpayments.d.ts +3 -3
  23. package/dist/commonjs/models/operations/getpaymentlinkpayments.js +1 -1
  24. package/dist/commonjs/models/operations/getwebhook.d.ts +139 -21
  25. package/dist/commonjs/models/operations/getwebhook.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/getwebhook.js +114 -20
  27. package/dist/commonjs/models/operations/getwebhook.js.map +1 -1
  28. package/dist/commonjs/models/operations/getwebhookevent.d.ts +63 -17
  29. package/dist/commonjs/models/operations/getwebhookevent.d.ts.map +1 -1
  30. package/dist/commonjs/models/operations/getwebhookevent.js +48 -21
  31. package/dist/commonjs/models/operations/getwebhookevent.js.map +1 -1
  32. package/dist/commonjs/models/operations/listcustomerpayments.d.ts +3 -3
  33. package/dist/commonjs/models/operations/listcustomerpayments.js +1 -1
  34. package/dist/commonjs/models/operations/listpayments.d.ts +3 -3
  35. package/dist/commonjs/models/operations/listpayments.js +1 -1
  36. package/dist/commonjs/models/operations/listsettlementpayments.d.ts +3 -3
  37. package/dist/commonjs/models/operations/listsettlementpayments.js +1 -1
  38. package/dist/commonjs/models/operations/listsubscriptionpayments.d.ts +3 -3
  39. package/dist/commonjs/models/operations/listsubscriptionpayments.js +1 -1
  40. package/dist/commonjs/models/operations/listwebhooks.d.ts +160 -39
  41. package/dist/commonjs/models/operations/listwebhooks.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/listwebhooks.js +136 -41
  43. package/dist/commonjs/models/operations/listwebhooks.js.map +1 -1
  44. package/dist/commonjs/models/operations/updatepayment.d.ts +3 -3
  45. package/dist/commonjs/models/operations/updatepayment.js +1 -1
  46. package/dist/commonjs/models/operations/updatewebhook.d.ts +162 -32
  47. package/dist/commonjs/models/operations/updatewebhook.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/updatewebhook.js +140 -33
  49. package/dist/commonjs/models/operations/updatewebhook.js.map +1 -1
  50. package/dist/commonjs/sdk/sdk.d.ts +24 -24
  51. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  52. package/dist/commonjs/sdk/sdk.js +36 -36
  53. package/dist/commonjs/sdk/sdk.js.map +1 -1
  54. package/dist/esm/lib/config.d.ts +3 -3
  55. package/dist/esm/lib/config.js +3 -3
  56. package/dist/esm/mcp-server/mcp-server.js +1 -1
  57. package/dist/esm/mcp-server/server.js +40 -40
  58. package/dist/esm/mcp-server/server.js.map +1 -1
  59. package/dist/esm/models/operations/cancelpayment.d.ts +3 -3
  60. package/dist/esm/models/operations/cancelpayment.js +1 -1
  61. package/dist/esm/models/operations/createcustomerpayment.d.ts +3 -3
  62. package/dist/esm/models/operations/createcustomerpayment.js +1 -1
  63. package/dist/esm/models/operations/createpayment.d.ts +3 -3
  64. package/dist/esm/models/operations/createpayment.js +1 -1
  65. package/dist/esm/models/operations/createwebhook.d.ts +96 -38
  66. package/dist/esm/models/operations/createwebhook.d.ts.map +1 -1
  67. package/dist/esm/models/operations/createwebhook.js +78 -40
  68. package/dist/esm/models/operations/createwebhook.js.map +1 -1
  69. package/dist/esm/models/operations/getpayment.d.ts +3 -3
  70. package/dist/esm/models/operations/getpayment.js +1 -1
  71. package/dist/esm/models/operations/getpaymentlinkpayments.d.ts +3 -3
  72. package/dist/esm/models/operations/getpaymentlinkpayments.js +1 -1
  73. package/dist/esm/models/operations/getwebhook.d.ts +139 -21
  74. package/dist/esm/models/operations/getwebhook.d.ts.map +1 -1
  75. package/dist/esm/models/operations/getwebhook.js +109 -19
  76. package/dist/esm/models/operations/getwebhook.js.map +1 -1
  77. package/dist/esm/models/operations/getwebhookevent.d.ts +63 -17
  78. package/dist/esm/models/operations/getwebhookevent.d.ts.map +1 -1
  79. package/dist/esm/models/operations/getwebhookevent.js +45 -18
  80. package/dist/esm/models/operations/getwebhookevent.js.map +1 -1
  81. package/dist/esm/models/operations/listcustomerpayments.d.ts +3 -3
  82. package/dist/esm/models/operations/listcustomerpayments.js +1 -1
  83. package/dist/esm/models/operations/listpayments.d.ts +3 -3
  84. package/dist/esm/models/operations/listpayments.js +1 -1
  85. package/dist/esm/models/operations/listsettlementpayments.d.ts +3 -3
  86. package/dist/esm/models/operations/listsettlementpayments.js +1 -1
  87. package/dist/esm/models/operations/listsubscriptionpayments.d.ts +3 -3
  88. package/dist/esm/models/operations/listsubscriptionpayments.js +1 -1
  89. package/dist/esm/models/operations/listwebhooks.d.ts +160 -39
  90. package/dist/esm/models/operations/listwebhooks.d.ts.map +1 -1
  91. package/dist/esm/models/operations/listwebhooks.js +130 -40
  92. package/dist/esm/models/operations/listwebhooks.js.map +1 -1
  93. package/dist/esm/models/operations/updatepayment.d.ts +3 -3
  94. package/dist/esm/models/operations/updatepayment.js +1 -1
  95. package/dist/esm/models/operations/updatewebhook.d.ts +162 -32
  96. package/dist/esm/models/operations/updatewebhook.d.ts.map +1 -1
  97. package/dist/esm/models/operations/updatewebhook.js +135 -32
  98. package/dist/esm/models/operations/updatewebhook.js.map +1 -1
  99. package/dist/esm/sdk/sdk.d.ts +24 -24
  100. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  101. package/dist/esm/sdk/sdk.js +36 -36
  102. package/dist/esm/sdk/sdk.js.map +1 -1
  103. package/docs/sdks/webhooks/README.md +4 -4
  104. package/examples/balancesList.example.ts +33 -0
  105. package/examples/package-lock.json +1 -1
  106. package/jsr.json +1 -1
  107. package/package.json +1 -1
  108. package/src/lib/config.ts +3 -3
  109. package/src/mcp-server/mcp-server.ts +1 -1
  110. package/src/mcp-server/server.ts +40 -40
  111. package/src/models/operations/cancelpayment.ts +1 -1
  112. package/src/models/operations/createcustomerpayment.ts +1 -1
  113. package/src/models/operations/createpayment.ts +1 -1
  114. package/src/models/operations/createwebhook.ts +134 -73
  115. package/src/models/operations/getpayment.ts +1 -1
  116. package/src/models/operations/getpaymentlinkpayments.ts +1 -1
  117. package/src/models/operations/getwebhook.ts +228 -39
  118. package/src/models/operations/getwebhookevent.ts +75 -35
  119. package/src/models/operations/listcustomerpayments.ts +1 -1
  120. package/src/models/operations/listpayments.ts +1 -1
  121. package/src/models/operations/listsettlementpayments.ts +1 -1
  122. package/src/models/operations/listsubscriptionpayments.ts +1 -1
  123. package/src/models/operations/listwebhooks.ts +262 -73
  124. package/src/models/operations/updatepayment.ts +1 -1
  125. package/src/models/operations/updatewebhook.ts +273 -59
  126. package/src/sdk/sdk.ts +60 -60
  127. package/examples/paymentsCreate.example.ts +0 -166
@@ -28,20 +28,23 @@ export const ListWebhooksSort = {
28
28
  export type ListWebhooksSort = ClosedEnum<typeof ListWebhooksSort>;
29
29
 
30
30
  /**
31
- * Used to filter out only the webhooks that are subscribed to certain types of events.
31
+ * The event's type
32
32
  */
33
- export const ListWebhooksEventTypes = {
33
+ export const EventTypesWebhookEventTypes = {
34
34
  PaymentLinkPaid: "payment-link.paid",
35
35
  BalanceTransactionCreated: "balance-transaction.created",
36
36
  SalesInvoiceCreated: "sales-invoice.created",
37
37
  SalesInvoiceIssued: "sales-invoice.issued",
38
38
  SalesInvoiceCanceled: "sales-invoice.canceled",
39
39
  SalesInvoicePaid: "sales-invoice.paid",
40
+ Wildcard: "*",
40
41
  } as const;
41
42
  /**
42
- * Used to filter out only the webhooks that are subscribed to certain types of events.
43
+ * The event's type
43
44
  */
44
- export type ListWebhooksEventTypes = ClosedEnum<typeof ListWebhooksEventTypes>;
45
+ export type EventTypesWebhookEventTypes = ClosedEnum<
46
+ typeof EventTypesWebhookEventTypes
47
+ >;
45
48
 
46
49
  export type ListWebhooksRequest = {
47
50
  /**
@@ -65,7 +68,7 @@ export type ListWebhooksRequest = {
65
68
  /**
66
69
  * Used to filter out only the webhooks that are subscribed to certain types of events.
67
70
  */
68
- eventTypes?: ListWebhooksEventTypes | undefined;
71
+ eventTypes?: EventTypesWebhookEventTypes | undefined;
69
72
  /**
70
73
  * Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
71
74
  *
@@ -93,6 +96,25 @@ export type ListWebhooksBadRequestLinks = {
93
96
  documentation: ListWebhooksBadRequestDocumentation;
94
97
  };
95
98
 
99
+ /**
100
+ * The event's type
101
+ */
102
+ export const WebhookWebhookEventTypes = {
103
+ PaymentLinkPaid: "payment-link.paid",
104
+ BalanceTransactionCreated: "balance-transaction.created",
105
+ SalesInvoiceCreated: "sales-invoice.created",
106
+ SalesInvoiceIssued: "sales-invoice.issued",
107
+ SalesInvoiceCanceled: "sales-invoice.canceled",
108
+ SalesInvoicePaid: "sales-invoice.paid",
109
+ Wildcard: "*",
110
+ } as const;
111
+ /**
112
+ * The event's type
113
+ */
114
+ export type WebhookWebhookEventTypes = ClosedEnum<
115
+ typeof WebhookWebhookEventTypes
116
+ >;
117
+
96
118
  /**
97
119
  * The subscription's current status.
98
120
  */
@@ -108,17 +130,41 @@ export const ListWebhooksStatus = {
108
130
  export type ListWebhooksStatus = ClosedEnum<typeof ListWebhooksStatus>;
109
131
 
110
132
  /**
111
- * The subscription's mode.
133
+ * Whether this entity was created in live mode or in test mode.
112
134
  */
113
135
  export const ListWebhooksMode = {
114
136
  Live: "live",
115
137
  Test: "test",
116
138
  } as const;
117
139
  /**
118
- * The subscription's mode.
140
+ * Whether this entity was created in live mode or in test mode.
119
141
  */
120
142
  export type ListWebhooksMode = ClosedEnum<typeof ListWebhooksMode>;
121
143
 
144
+ /**
145
+ * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
146
+ */
147
+ export type WebhookDocumentation = {
148
+ /**
149
+ * The actual URL string.
150
+ */
151
+ href: string;
152
+ /**
153
+ * The content type of the page or endpoint the URL points to.
154
+ */
155
+ type: string;
156
+ };
157
+
158
+ /**
159
+ * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
160
+ */
161
+ export type WebhookLinks = {
162
+ /**
163
+ * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
164
+ */
165
+ documentation: WebhookDocumentation;
166
+ };
167
+
122
168
  export type Webhook = {
123
169
  /**
124
170
  * Indicates the response contains a webhook subscription object.
@@ -126,46 +172,50 @@ export type Webhook = {
126
172
  * @remarks
127
173
  * Will always contain the string `webhook` for this endpoint.
128
174
  */
129
- resource?: string | undefined;
175
+ resource: string;
130
176
  /**
131
177
  * The identifier uniquely referring to this subscription.
132
178
  */
133
- id?: string | undefined;
179
+ id: string;
134
180
  /**
135
181
  * The subscription's events destination.
136
182
  */
137
- url?: string | undefined;
183
+ url: string;
138
184
  /**
139
185
  * The identifier uniquely referring to the profile that created the subscription.
140
186
  */
141
- profileId?: string | undefined;
187
+ profileId: string | null;
142
188
  /**
143
189
  * The subscription's date time of creation.
144
190
  */
145
- createdAt?: string | undefined;
191
+ createdAt: string;
146
192
  /**
147
193
  * The subscription's name.
148
194
  */
149
- name?: string | undefined;
195
+ name: string;
150
196
  /**
151
197
  * The events types that are subscribed.
152
198
  */
153
- eventTypes?: Array<string> | undefined;
199
+ eventTypes: Array<WebhookWebhookEventTypes>;
154
200
  /**
155
201
  * The subscription's current status.
156
202
  */
157
- status?: ListWebhooksStatus | undefined;
203
+ status: ListWebhooksStatus;
158
204
  /**
159
- * The subscription's mode.
205
+ * Whether this entity was created in live mode or in test mode.
160
206
  */
161
- mode?: ListWebhooksMode | undefined;
207
+ mode: ListWebhooksMode;
208
+ /**
209
+ * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
210
+ */
211
+ links: WebhookLinks;
162
212
  };
163
213
 
164
214
  export type ListWebhooksEmbedded = {
165
215
  /**
166
216
  * A list of webhooks.
167
217
  */
168
- webhooks?: Array<Webhook> | undefined;
218
+ webhooks: Array<Webhook>;
169
219
  };
170
220
 
171
221
  /**
@@ -262,12 +312,12 @@ export type ListWebhooksResponse = {
262
312
  * The maximum number of items per result set is controlled by the `limit` property provided in the request. The default
263
313
  * limit is 50 items.
264
314
  */
265
- count?: number | undefined;
266
- embedded?: ListWebhooksEmbedded | undefined;
315
+ count: number;
316
+ embedded: ListWebhooksEmbedded;
267
317
  /**
268
318
  * Links to help navigate through the lists of items. Every URL object will contain an `href` and a `type` field.
269
319
  */
270
- links?: ListWebhooksLinks | undefined;
320
+ links: ListWebhooksLinks;
271
321
  };
272
322
 
273
323
  /** @internal */
@@ -292,24 +342,24 @@ export namespace ListWebhooksSort$ {
292
342
  }
293
343
 
294
344
  /** @internal */
295
- export const ListWebhooksEventTypes$inboundSchema: z.ZodNativeEnum<
296
- typeof ListWebhooksEventTypes
297
- > = z.nativeEnum(ListWebhooksEventTypes);
345
+ export const EventTypesWebhookEventTypes$inboundSchema: z.ZodNativeEnum<
346
+ typeof EventTypesWebhookEventTypes
347
+ > = z.nativeEnum(EventTypesWebhookEventTypes);
298
348
 
299
349
  /** @internal */
300
- export const ListWebhooksEventTypes$outboundSchema: z.ZodNativeEnum<
301
- typeof ListWebhooksEventTypes
302
- > = ListWebhooksEventTypes$inboundSchema;
350
+ export const EventTypesWebhookEventTypes$outboundSchema: z.ZodNativeEnum<
351
+ typeof EventTypesWebhookEventTypes
352
+ > = EventTypesWebhookEventTypes$inboundSchema;
303
353
 
304
354
  /**
305
355
  * @internal
306
356
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
307
357
  */
308
- export namespace ListWebhooksEventTypes$ {
309
- /** @deprecated use `ListWebhooksEventTypes$inboundSchema` instead. */
310
- export const inboundSchema = ListWebhooksEventTypes$inboundSchema;
311
- /** @deprecated use `ListWebhooksEventTypes$outboundSchema` instead. */
312
- export const outboundSchema = ListWebhooksEventTypes$outboundSchema;
358
+ export namespace EventTypesWebhookEventTypes$ {
359
+ /** @deprecated use `EventTypesWebhookEventTypes$inboundSchema` instead. */
360
+ export const inboundSchema = EventTypesWebhookEventTypes$inboundSchema;
361
+ /** @deprecated use `EventTypesWebhookEventTypes$outboundSchema` instead. */
362
+ export const outboundSchema = EventTypesWebhookEventTypes$outboundSchema;
313
363
  }
314
364
 
315
365
  /** @internal */
@@ -321,7 +371,7 @@ export const ListWebhooksRequest$inboundSchema: z.ZodType<
321
371
  from: z.string().optional(),
322
372
  limit: z.nullable(z.number().int()).optional(),
323
373
  sort: z.nullable(ListWebhooksSort$inboundSchema).optional(),
324
- eventTypes: ListWebhooksEventTypes$inboundSchema.optional(),
374
+ eventTypes: EventTypesWebhookEventTypes$inboundSchema.optional(),
325
375
  testmode: z.nullable(z.boolean()).optional(),
326
376
  });
327
377
 
@@ -343,7 +393,7 @@ export const ListWebhooksRequest$outboundSchema: z.ZodType<
343
393
  from: z.string().optional(),
344
394
  limit: z.nullable(z.number().int()).optional(),
345
395
  sort: z.nullable(ListWebhooksSort$outboundSchema).optional(),
346
- eventTypes: ListWebhooksEventTypes$outboundSchema.optional(),
396
+ eventTypes: EventTypesWebhookEventTypes$outboundSchema.optional(),
347
397
  testmode: z.nullable(z.boolean()).optional(),
348
398
  });
349
399
 
@@ -500,6 +550,27 @@ export function listWebhooksBadRequestLinksFromJSON(
500
550
  );
501
551
  }
502
552
 
553
+ /** @internal */
554
+ export const WebhookWebhookEventTypes$inboundSchema: z.ZodNativeEnum<
555
+ typeof WebhookWebhookEventTypes
556
+ > = z.nativeEnum(WebhookWebhookEventTypes);
557
+
558
+ /** @internal */
559
+ export const WebhookWebhookEventTypes$outboundSchema: z.ZodNativeEnum<
560
+ typeof WebhookWebhookEventTypes
561
+ > = WebhookWebhookEventTypes$inboundSchema;
562
+
563
+ /**
564
+ * @internal
565
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
566
+ */
567
+ export namespace WebhookWebhookEventTypes$ {
568
+ /** @deprecated use `WebhookWebhookEventTypes$inboundSchema` instead. */
569
+ export const inboundSchema = WebhookWebhookEventTypes$inboundSchema;
570
+ /** @deprecated use `WebhookWebhookEventTypes$outboundSchema` instead. */
571
+ export const outboundSchema = WebhookWebhookEventTypes$outboundSchema;
572
+ }
573
+
503
574
  /** @internal */
504
575
  export const ListWebhooksStatus$inboundSchema: z.ZodNativeEnum<
505
576
  typeof ListWebhooksStatus
@@ -542,31 +613,144 @@ export namespace ListWebhooksMode$ {
542
613
  export const outboundSchema = ListWebhooksMode$outboundSchema;
543
614
  }
544
615
 
616
+ /** @internal */
617
+ export const WebhookDocumentation$inboundSchema: z.ZodType<
618
+ WebhookDocumentation,
619
+ z.ZodTypeDef,
620
+ unknown
621
+ > = z.object({
622
+ href: z.string(),
623
+ type: z.string(),
624
+ });
625
+
626
+ /** @internal */
627
+ export type WebhookDocumentation$Outbound = {
628
+ href: string;
629
+ type: string;
630
+ };
631
+
632
+ /** @internal */
633
+ export const WebhookDocumentation$outboundSchema: z.ZodType<
634
+ WebhookDocumentation$Outbound,
635
+ z.ZodTypeDef,
636
+ WebhookDocumentation
637
+ > = z.object({
638
+ href: z.string(),
639
+ type: z.string(),
640
+ });
641
+
642
+ /**
643
+ * @internal
644
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
645
+ */
646
+ export namespace WebhookDocumentation$ {
647
+ /** @deprecated use `WebhookDocumentation$inboundSchema` instead. */
648
+ export const inboundSchema = WebhookDocumentation$inboundSchema;
649
+ /** @deprecated use `WebhookDocumentation$outboundSchema` instead. */
650
+ export const outboundSchema = WebhookDocumentation$outboundSchema;
651
+ /** @deprecated use `WebhookDocumentation$Outbound` instead. */
652
+ export type Outbound = WebhookDocumentation$Outbound;
653
+ }
654
+
655
+ export function webhookDocumentationToJSON(
656
+ webhookDocumentation: WebhookDocumentation,
657
+ ): string {
658
+ return JSON.stringify(
659
+ WebhookDocumentation$outboundSchema.parse(webhookDocumentation),
660
+ );
661
+ }
662
+
663
+ export function webhookDocumentationFromJSON(
664
+ jsonString: string,
665
+ ): SafeParseResult<WebhookDocumentation, SDKValidationError> {
666
+ return safeParse(
667
+ jsonString,
668
+ (x) => WebhookDocumentation$inboundSchema.parse(JSON.parse(x)),
669
+ `Failed to parse 'WebhookDocumentation' from JSON`,
670
+ );
671
+ }
672
+
673
+ /** @internal */
674
+ export const WebhookLinks$inboundSchema: z.ZodType<
675
+ WebhookLinks,
676
+ z.ZodTypeDef,
677
+ unknown
678
+ > = z.object({
679
+ documentation: z.lazy(() => WebhookDocumentation$inboundSchema),
680
+ });
681
+
682
+ /** @internal */
683
+ export type WebhookLinks$Outbound = {
684
+ documentation: WebhookDocumentation$Outbound;
685
+ };
686
+
687
+ /** @internal */
688
+ export const WebhookLinks$outboundSchema: z.ZodType<
689
+ WebhookLinks$Outbound,
690
+ z.ZodTypeDef,
691
+ WebhookLinks
692
+ > = z.object({
693
+ documentation: z.lazy(() => WebhookDocumentation$outboundSchema),
694
+ });
695
+
696
+ /**
697
+ * @internal
698
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
699
+ */
700
+ export namespace WebhookLinks$ {
701
+ /** @deprecated use `WebhookLinks$inboundSchema` instead. */
702
+ export const inboundSchema = WebhookLinks$inboundSchema;
703
+ /** @deprecated use `WebhookLinks$outboundSchema` instead. */
704
+ export const outboundSchema = WebhookLinks$outboundSchema;
705
+ /** @deprecated use `WebhookLinks$Outbound` instead. */
706
+ export type Outbound = WebhookLinks$Outbound;
707
+ }
708
+
709
+ export function webhookLinksToJSON(webhookLinks: WebhookLinks): string {
710
+ return JSON.stringify(WebhookLinks$outboundSchema.parse(webhookLinks));
711
+ }
712
+
713
+ export function webhookLinksFromJSON(
714
+ jsonString: string,
715
+ ): SafeParseResult<WebhookLinks, SDKValidationError> {
716
+ return safeParse(
717
+ jsonString,
718
+ (x) => WebhookLinks$inboundSchema.parse(JSON.parse(x)),
719
+ `Failed to parse 'WebhookLinks' from JSON`,
720
+ );
721
+ }
722
+
545
723
  /** @internal */
546
724
  export const Webhook$inboundSchema: z.ZodType<Webhook, z.ZodTypeDef, unknown> =
547
725
  z.object({
548
- resource: z.string().optional(),
549
- id: z.string().optional(),
550
- url: z.string().optional(),
551
- profileId: z.string().optional(),
552
- createdAt: z.string().optional(),
553
- name: z.string().optional(),
554
- eventTypes: z.array(z.string()).optional(),
555
- status: ListWebhooksStatus$inboundSchema.optional(),
556
- mode: ListWebhooksMode$inboundSchema.optional(),
726
+ resource: z.string(),
727
+ id: z.string(),
728
+ url: z.string(),
729
+ profileId: z.nullable(z.string()),
730
+ createdAt: z.string(),
731
+ name: z.string(),
732
+ eventTypes: z.array(WebhookWebhookEventTypes$inboundSchema),
733
+ status: ListWebhooksStatus$inboundSchema,
734
+ mode: ListWebhooksMode$inboundSchema,
735
+ _links: z.lazy(() => WebhookLinks$inboundSchema),
736
+ }).transform((v) => {
737
+ return remap$(v, {
738
+ "_links": "links",
739
+ });
557
740
  });
558
741
 
559
742
  /** @internal */
560
743
  export type Webhook$Outbound = {
561
- resource?: string | undefined;
562
- id?: string | undefined;
563
- url?: string | undefined;
564
- profileId?: string | undefined;
565
- createdAt?: string | undefined;
566
- name?: string | undefined;
567
- eventTypes?: Array<string> | undefined;
568
- status?: string | undefined;
569
- mode?: string | undefined;
744
+ resource: string;
745
+ id: string;
746
+ url: string;
747
+ profileId: string | null;
748
+ createdAt: string;
749
+ name: string;
750
+ eventTypes: Array<string>;
751
+ status: string;
752
+ mode: string;
753
+ _links: WebhookLinks$Outbound;
570
754
  };
571
755
 
572
756
  /** @internal */
@@ -575,15 +759,20 @@ export const Webhook$outboundSchema: z.ZodType<
575
759
  z.ZodTypeDef,
576
760
  Webhook
577
761
  > = z.object({
578
- resource: z.string().optional(),
579
- id: z.string().optional(),
580
- url: z.string().optional(),
581
- profileId: z.string().optional(),
582
- createdAt: z.string().optional(),
583
- name: z.string().optional(),
584
- eventTypes: z.array(z.string()).optional(),
585
- status: ListWebhooksStatus$outboundSchema.optional(),
586
- mode: ListWebhooksMode$outboundSchema.optional(),
762
+ resource: z.string(),
763
+ id: z.string(),
764
+ url: z.string(),
765
+ profileId: z.nullable(z.string()),
766
+ createdAt: z.string(),
767
+ name: z.string(),
768
+ eventTypes: z.array(WebhookWebhookEventTypes$outboundSchema),
769
+ status: ListWebhooksStatus$outboundSchema,
770
+ mode: ListWebhooksMode$outboundSchema,
771
+ links: z.lazy(() => WebhookLinks$outboundSchema),
772
+ }).transform((v) => {
773
+ return remap$(v, {
774
+ links: "_links",
775
+ });
587
776
  });
588
777
 
589
778
  /**
@@ -619,12 +808,12 @@ export const ListWebhooksEmbedded$inboundSchema: z.ZodType<
619
808
  z.ZodTypeDef,
620
809
  unknown
621
810
  > = z.object({
622
- webhooks: z.array(z.lazy(() => Webhook$inboundSchema)).optional(),
811
+ webhooks: z.array(z.lazy(() => Webhook$inboundSchema)),
623
812
  });
624
813
 
625
814
  /** @internal */
626
815
  export type ListWebhooksEmbedded$Outbound = {
627
- webhooks?: Array<Webhook$Outbound> | undefined;
816
+ webhooks: Array<Webhook$Outbound>;
628
817
  };
629
818
 
630
819
  /** @internal */
@@ -633,7 +822,7 @@ export const ListWebhooksEmbedded$outboundSchema: z.ZodType<
633
822
  z.ZodTypeDef,
634
823
  ListWebhooksEmbedded
635
824
  > = z.object({
636
- webhooks: z.array(z.lazy(() => Webhook$outboundSchema)).optional(),
825
+ webhooks: z.array(z.lazy(() => Webhook$outboundSchema)),
637
826
  });
638
827
 
639
828
  /**
@@ -964,9 +1153,9 @@ export const ListWebhooksResponse$inboundSchema: z.ZodType<
964
1153
  z.ZodTypeDef,
965
1154
  unknown
966
1155
  > = z.object({
967
- count: z.number().int().optional(),
968
- _embedded: z.lazy(() => ListWebhooksEmbedded$inboundSchema).optional(),
969
- _links: z.lazy(() => ListWebhooksLinks$inboundSchema).optional(),
1156
+ count: z.number().int(),
1157
+ _embedded: z.lazy(() => ListWebhooksEmbedded$inboundSchema),
1158
+ _links: z.lazy(() => ListWebhooksLinks$inboundSchema),
970
1159
  }).transform((v) => {
971
1160
  return remap$(v, {
972
1161
  "_embedded": "embedded",
@@ -976,9 +1165,9 @@ export const ListWebhooksResponse$inboundSchema: z.ZodType<
976
1165
 
977
1166
  /** @internal */
978
1167
  export type ListWebhooksResponse$Outbound = {
979
- count?: number | undefined;
980
- _embedded?: ListWebhooksEmbedded$Outbound | undefined;
981
- _links?: ListWebhooksLinks$Outbound | undefined;
1168
+ count: number;
1169
+ _embedded: ListWebhooksEmbedded$Outbound;
1170
+ _links: ListWebhooksLinks$Outbound;
982
1171
  };
983
1172
 
984
1173
  /** @internal */
@@ -987,9 +1176,9 @@ export const ListWebhooksResponse$outboundSchema: z.ZodType<
987
1176
  z.ZodTypeDef,
988
1177
  ListWebhooksResponse
989
1178
  > = z.object({
990
- count: z.number().int().optional(),
991
- embedded: z.lazy(() => ListWebhooksEmbedded$outboundSchema).optional(),
992
- links: z.lazy(() => ListWebhooksLinks$outboundSchema).optional(),
1179
+ count: z.number().int(),
1180
+ embedded: z.lazy(() => ListWebhooksEmbedded$outboundSchema),
1181
+ links: z.lazy(() => ListWebhooksLinks$outboundSchema),
993
1182
  }).transform((v) => {
994
1183
  return remap$(v, {
995
1184
  embedded: "_embedded",
@@ -1655,7 +1655,7 @@ export const UpdatePaymentFeeRegion = {
1655
1655
  Maestro: "maestro",
1656
1656
  Other: "other",
1657
1657
  Inter: "inter",
1658
- IntraEea: "intra-eea",
1658
+ IntraEea: "intra_eea",
1659
1659
  } as const;
1660
1660
  /**
1661
1661
  * The applicable card fee region.