mollie-api-typescript 0.1.7 → 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 (79) hide show
  1. package/FUNCTIONS.md +7 -139
  2. package/README.md +77 -877
  3. package/bin/mcp-server.js +375 -182
  4. package/bin/mcp-server.js.map +10 -10
  5. package/dist/commonjs/lib/config.d.ts +3 -3
  6. package/dist/commonjs/lib/config.js +3 -3
  7. package/dist/commonjs/lib/config.js.map +1 -1
  8. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  9. package/dist/commonjs/mcp-server/server.js +40 -40
  10. package/dist/commonjs/mcp-server/server.js.map +1 -1
  11. package/dist/commonjs/models/operations/createwebhook.d.ts +96 -38
  12. package/dist/commonjs/models/operations/createwebhook.d.ts.map +1 -1
  13. package/dist/commonjs/models/operations/createwebhook.js +79 -41
  14. package/dist/commonjs/models/operations/createwebhook.js.map +1 -1
  15. package/dist/commonjs/models/operations/getwebhook.d.ts +139 -21
  16. package/dist/commonjs/models/operations/getwebhook.d.ts.map +1 -1
  17. package/dist/commonjs/models/operations/getwebhook.js +114 -20
  18. package/dist/commonjs/models/operations/getwebhook.js.map +1 -1
  19. package/dist/commonjs/models/operations/getwebhookevent.d.ts +63 -17
  20. package/dist/commonjs/models/operations/getwebhookevent.d.ts.map +1 -1
  21. package/dist/commonjs/models/operations/getwebhookevent.js +48 -21
  22. package/dist/commonjs/models/operations/getwebhookevent.js.map +1 -1
  23. package/dist/commonjs/models/operations/listwebhooks.d.ts +160 -39
  24. package/dist/commonjs/models/operations/listwebhooks.d.ts.map +1 -1
  25. package/dist/commonjs/models/operations/listwebhooks.js +136 -41
  26. package/dist/commonjs/models/operations/listwebhooks.js.map +1 -1
  27. package/dist/commonjs/models/operations/updatewebhook.d.ts +162 -32
  28. package/dist/commonjs/models/operations/updatewebhook.d.ts.map +1 -1
  29. package/dist/commonjs/models/operations/updatewebhook.js +140 -33
  30. package/dist/commonjs/models/operations/updatewebhook.js.map +1 -1
  31. package/dist/commonjs/sdk/sdk.d.ts +24 -24
  32. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  33. package/dist/commonjs/sdk/sdk.js +36 -36
  34. package/dist/commonjs/sdk/sdk.js.map +1 -1
  35. package/dist/esm/lib/config.d.ts +3 -3
  36. package/dist/esm/lib/config.js +3 -3
  37. package/dist/esm/lib/config.js.map +1 -1
  38. package/dist/esm/mcp-server/mcp-server.js +1 -1
  39. package/dist/esm/mcp-server/server.js +40 -40
  40. package/dist/esm/mcp-server/server.js.map +1 -1
  41. package/dist/esm/models/operations/createwebhook.d.ts +96 -38
  42. package/dist/esm/models/operations/createwebhook.d.ts.map +1 -1
  43. package/dist/esm/models/operations/createwebhook.js +78 -40
  44. package/dist/esm/models/operations/createwebhook.js.map +1 -1
  45. package/dist/esm/models/operations/getwebhook.d.ts +139 -21
  46. package/dist/esm/models/operations/getwebhook.d.ts.map +1 -1
  47. package/dist/esm/models/operations/getwebhook.js +109 -19
  48. package/dist/esm/models/operations/getwebhook.js.map +1 -1
  49. package/dist/esm/models/operations/getwebhookevent.d.ts +63 -17
  50. package/dist/esm/models/operations/getwebhookevent.d.ts.map +1 -1
  51. package/dist/esm/models/operations/getwebhookevent.js +45 -18
  52. package/dist/esm/models/operations/getwebhookevent.js.map +1 -1
  53. package/dist/esm/models/operations/listwebhooks.d.ts +160 -39
  54. package/dist/esm/models/operations/listwebhooks.d.ts.map +1 -1
  55. package/dist/esm/models/operations/listwebhooks.js +130 -40
  56. package/dist/esm/models/operations/listwebhooks.js.map +1 -1
  57. package/dist/esm/models/operations/updatewebhook.d.ts +162 -32
  58. package/dist/esm/models/operations/updatewebhook.d.ts.map +1 -1
  59. package/dist/esm/models/operations/updatewebhook.js +135 -32
  60. package/dist/esm/models/operations/updatewebhook.js.map +1 -1
  61. package/dist/esm/sdk/sdk.d.ts +24 -24
  62. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  63. package/dist/esm/sdk/sdk.js +36 -36
  64. package/dist/esm/sdk/sdk.js.map +1 -1
  65. package/docs/sdks/webhooks/README.md +4 -4
  66. package/examples/balancesList.example.ts +33 -0
  67. package/examples/package-lock.json +1 -1
  68. package/jsr.json +1 -1
  69. package/package.json +1 -1
  70. package/src/lib/config.ts +3 -3
  71. package/src/mcp-server/mcp-server.ts +1 -1
  72. package/src/mcp-server/server.ts +40 -40
  73. package/src/models/operations/createwebhook.ts +134 -73
  74. package/src/models/operations/getwebhook.ts +228 -39
  75. package/src/models/operations/getwebhookevent.ts +75 -35
  76. package/src/models/operations/listwebhooks.ts +262 -73
  77. package/src/models/operations/updatewebhook.ts +273 -59
  78. package/src/sdk/sdk.ts +60 -60
  79. package/examples/paymentsCreate.example.ts +0 -166
@@ -10,21 +10,28 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  /**
13
- * The list of events to enable for this webhook. You may specify `'*'` to add all events, except those that require explicit selection. Separate multiple event types with a comma.
13
+ * The list of events to enable for this webhook. You may specify `'*'` to add all events, except those
14
+ *
15
+ * @remarks
16
+ * that require explicit selection. Separate multiple event types with a comma.
14
17
  */
15
- export const UpdateWebhookEventTypes = {
18
+ export const UpdateWebhookWebhookEventTypesRequest = {
16
19
  PaymentLinkPaid: "payment-link.paid",
17
20
  BalanceTransactionCreated: "balance-transaction.created",
18
21
  SalesInvoiceCreated: "sales-invoice.created",
19
22
  SalesInvoiceIssued: "sales-invoice.issued",
20
23
  SalesInvoiceCanceled: "sales-invoice.canceled",
21
24
  SalesInvoicePaid: "sales-invoice.paid",
25
+ Wildcard: "*",
22
26
  } as const;
23
27
  /**
24
- * The list of events to enable for this webhook. You may specify `'*'` to add all events, except those that require explicit selection. Separate multiple event types with a comma.
28
+ * The list of events to enable for this webhook. You may specify `'*'` to add all events, except those
29
+ *
30
+ * @remarks
31
+ * that require explicit selection. Separate multiple event types with a comma.
25
32
  */
26
- export type UpdateWebhookEventTypes = ClosedEnum<
27
- typeof UpdateWebhookEventTypes
33
+ export type UpdateWebhookWebhookEventTypesRequest = ClosedEnum<
34
+ typeof UpdateWebhookWebhookEventTypesRequest
28
35
  >;
29
36
 
30
37
  export type UpdateWebhookRequestBody = {
@@ -37,9 +44,12 @@ export type UpdateWebhookRequestBody = {
37
44
  */
38
45
  url?: string | undefined;
39
46
  /**
40
- * The list of events to enable for this webhook. You may specify `'*'` to add all events, except those that require explicit selection. Separate multiple event types with a comma.
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. Separate multiple event types with a comma.
41
51
  */
42
- eventTypes?: UpdateWebhookEventTypes | undefined;
52
+ webhookEventTypes?: UpdateWebhookWebhookEventTypesRequest | undefined;
43
53
  /**
44
54
  * Most API credentials are specifically created for either live mode or test mode. For organization-level credentials
45
55
  *
@@ -89,6 +99,25 @@ export type UpdateWebhookNotFoundLinks = {
89
99
  documentation: UpdateWebhookNotFoundDocumentation;
90
100
  };
91
101
 
102
+ /**
103
+ * The event's type
104
+ */
105
+ export const UpdateWebhookEventTypeWebhookEventTypes = {
106
+ PaymentLinkPaid: "payment-link.paid",
107
+ BalanceTransactionCreated: "balance-transaction.created",
108
+ SalesInvoiceCreated: "sales-invoice.created",
109
+ SalesInvoiceIssued: "sales-invoice.issued",
110
+ SalesInvoiceCanceled: "sales-invoice.canceled",
111
+ SalesInvoicePaid: "sales-invoice.paid",
112
+ Wildcard: "*",
113
+ } as const;
114
+ /**
115
+ * The event's type
116
+ */
117
+ export type UpdateWebhookEventTypeWebhookEventTypes = ClosedEnum<
118
+ typeof UpdateWebhookEventTypeWebhookEventTypes
119
+ >;
120
+
92
121
  /**
93
122
  * The subscription's current status.
94
123
  */
@@ -104,17 +133,41 @@ export const UpdateWebhookStatus = {
104
133
  export type UpdateWebhookStatus = ClosedEnum<typeof UpdateWebhookStatus>;
105
134
 
106
135
  /**
107
- * The subscription's mode.
136
+ * Whether this entity was created in live mode or in test mode.
108
137
  */
109
138
  export const UpdateWebhookMode = {
110
139
  Live: "live",
111
140
  Test: "test",
112
141
  } as const;
113
142
  /**
114
- * The subscription's mode.
143
+ * Whether this entity was created in live mode or in test mode.
115
144
  */
116
145
  export type UpdateWebhookMode = ClosedEnum<typeof UpdateWebhookMode>;
117
146
 
147
+ /**
148
+ * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
149
+ */
150
+ export type UpdateWebhookDocumentation = {
151
+ /**
152
+ * The actual URL string.
153
+ */
154
+ href: string;
155
+ /**
156
+ * The content type of the page or endpoint the URL points to.
157
+ */
158
+ type: string;
159
+ };
160
+
161
+ /**
162
+ * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
163
+ */
164
+ export type UpdateWebhookLinks = {
165
+ /**
166
+ * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
167
+ */
168
+ documentation: UpdateWebhookDocumentation;
169
+ };
170
+
118
171
  /**
119
172
  * The webhook object.
120
173
  */
@@ -125,60 +178,67 @@ export type UpdateWebhookResponse = {
125
178
  * @remarks
126
179
  * Will always contain the string `webhook` for this endpoint.
127
180
  */
128
- resource?: string | undefined;
181
+ resource: string;
129
182
  /**
130
183
  * The identifier uniquely referring to this subscription.
131
184
  */
132
- id?: string | undefined;
185
+ id: string;
133
186
  /**
134
187
  * The subscription's events destination.
135
188
  */
136
- url?: string | undefined;
189
+ url: string;
137
190
  /**
138
191
  * The identifier uniquely referring to the profile that created the subscription.
139
192
  */
140
- profileId?: string | undefined;
193
+ profileId: string | null;
141
194
  /**
142
195
  * The subscription's date time of creation.
143
196
  */
144
- createdAt?: string | undefined;
197
+ createdAt: string;
145
198
  /**
146
199
  * The subscription's name.
147
200
  */
148
- name?: string | undefined;
201
+ name: string;
149
202
  /**
150
203
  * The events types that are subscribed.
151
204
  */
152
- eventTypes?: Array<string> | undefined;
205
+ eventTypes: Array<UpdateWebhookEventTypeWebhookEventTypes>;
153
206
  /**
154
207
  * The subscription's current status.
155
208
  */
156
- status?: UpdateWebhookStatus | undefined;
209
+ status: UpdateWebhookStatus;
210
+ /**
211
+ * Whether this entity was created in live mode or in test mode.
212
+ */
213
+ mode: UpdateWebhookMode;
157
214
  /**
158
- * The subscription's mode.
215
+ * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
159
216
  */
160
- mode?: UpdateWebhookMode | undefined;
217
+ links: UpdateWebhookLinks;
161
218
  };
162
219
 
163
220
  /** @internal */
164
- export const UpdateWebhookEventTypes$inboundSchema: z.ZodNativeEnum<
165
- typeof UpdateWebhookEventTypes
166
- > = z.nativeEnum(UpdateWebhookEventTypes);
221
+ export const UpdateWebhookWebhookEventTypesRequest$inboundSchema:
222
+ z.ZodNativeEnum<typeof UpdateWebhookWebhookEventTypesRequest> = z.nativeEnum(
223
+ UpdateWebhookWebhookEventTypesRequest,
224
+ );
167
225
 
168
226
  /** @internal */
169
- export const UpdateWebhookEventTypes$outboundSchema: z.ZodNativeEnum<
170
- typeof UpdateWebhookEventTypes
171
- > = UpdateWebhookEventTypes$inboundSchema;
227
+ export const UpdateWebhookWebhookEventTypesRequest$outboundSchema:
228
+ z.ZodNativeEnum<typeof UpdateWebhookWebhookEventTypesRequest> =
229
+ UpdateWebhookWebhookEventTypesRequest$inboundSchema;
172
230
 
173
231
  /**
174
232
  * @internal
175
233
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
176
234
  */
177
- export namespace UpdateWebhookEventTypes$ {
178
- /** @deprecated use `UpdateWebhookEventTypes$inboundSchema` instead. */
179
- export const inboundSchema = UpdateWebhookEventTypes$inboundSchema;
180
- /** @deprecated use `UpdateWebhookEventTypes$outboundSchema` instead. */
181
- export const outboundSchema = UpdateWebhookEventTypes$outboundSchema;
235
+ export namespace UpdateWebhookWebhookEventTypesRequest$ {
236
+ /** @deprecated use `UpdateWebhookWebhookEventTypesRequest$inboundSchema` instead. */
237
+ export const inboundSchema =
238
+ UpdateWebhookWebhookEventTypesRequest$inboundSchema;
239
+ /** @deprecated use `UpdateWebhookWebhookEventTypesRequest$outboundSchema` instead. */
240
+ export const outboundSchema =
241
+ UpdateWebhookWebhookEventTypesRequest$outboundSchema;
182
242
  }
183
243
 
184
244
  /** @internal */
@@ -189,8 +249,12 @@ export const UpdateWebhookRequestBody$inboundSchema: z.ZodType<
189
249
  > = z.object({
190
250
  name: z.string().optional(),
191
251
  url: z.string().optional(),
192
- eventTypes: UpdateWebhookEventTypes$inboundSchema.optional(),
252
+ eventTypes: UpdateWebhookWebhookEventTypesRequest$inboundSchema.optional(),
193
253
  testmode: z.nullable(z.boolean()).optional(),
254
+ }).transform((v) => {
255
+ return remap$(v, {
256
+ "eventTypes": "webhookEventTypes",
257
+ });
194
258
  });
195
259
 
196
260
  /** @internal */
@@ -209,8 +273,13 @@ export const UpdateWebhookRequestBody$outboundSchema: z.ZodType<
209
273
  > = z.object({
210
274
  name: z.string().optional(),
211
275
  url: z.string().optional(),
212
- eventTypes: UpdateWebhookEventTypes$outboundSchema.optional(),
276
+ webhookEventTypes: UpdateWebhookWebhookEventTypesRequest$outboundSchema
277
+ .optional(),
213
278
  testmode: z.nullable(z.boolean()).optional(),
279
+ }).transform((v) => {
280
+ return remap$(v, {
281
+ webhookEventTypes: "eventTypes",
282
+ });
214
283
  });
215
284
 
216
285
  /**
@@ -559,6 +628,29 @@ export function updateWebhookNotFoundLinksFromJSON(
559
628
  );
560
629
  }
561
630
 
631
+ /** @internal */
632
+ export const UpdateWebhookEventTypeWebhookEventTypes$inboundSchema:
633
+ z.ZodNativeEnum<typeof UpdateWebhookEventTypeWebhookEventTypes> = z
634
+ .nativeEnum(UpdateWebhookEventTypeWebhookEventTypes);
635
+
636
+ /** @internal */
637
+ export const UpdateWebhookEventTypeWebhookEventTypes$outboundSchema:
638
+ z.ZodNativeEnum<typeof UpdateWebhookEventTypeWebhookEventTypes> =
639
+ UpdateWebhookEventTypeWebhookEventTypes$inboundSchema;
640
+
641
+ /**
642
+ * @internal
643
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
644
+ */
645
+ export namespace UpdateWebhookEventTypeWebhookEventTypes$ {
646
+ /** @deprecated use `UpdateWebhookEventTypeWebhookEventTypes$inboundSchema` instead. */
647
+ export const inboundSchema =
648
+ UpdateWebhookEventTypeWebhookEventTypes$inboundSchema;
649
+ /** @deprecated use `UpdateWebhookEventTypeWebhookEventTypes$outboundSchema` instead. */
650
+ export const outboundSchema =
651
+ UpdateWebhookEventTypeWebhookEventTypes$outboundSchema;
652
+ }
653
+
562
654
  /** @internal */
563
655
  export const UpdateWebhookStatus$inboundSchema: z.ZodNativeEnum<
564
656
  typeof UpdateWebhookStatus
@@ -601,34 +693,151 @@ export namespace UpdateWebhookMode$ {
601
693
  export const outboundSchema = UpdateWebhookMode$outboundSchema;
602
694
  }
603
695
 
696
+ /** @internal */
697
+ export const UpdateWebhookDocumentation$inboundSchema: z.ZodType<
698
+ UpdateWebhookDocumentation,
699
+ z.ZodTypeDef,
700
+ unknown
701
+ > = z.object({
702
+ href: z.string(),
703
+ type: z.string(),
704
+ });
705
+
706
+ /** @internal */
707
+ export type UpdateWebhookDocumentation$Outbound = {
708
+ href: string;
709
+ type: string;
710
+ };
711
+
712
+ /** @internal */
713
+ export const UpdateWebhookDocumentation$outboundSchema: z.ZodType<
714
+ UpdateWebhookDocumentation$Outbound,
715
+ z.ZodTypeDef,
716
+ UpdateWebhookDocumentation
717
+ > = z.object({
718
+ href: z.string(),
719
+ type: z.string(),
720
+ });
721
+
722
+ /**
723
+ * @internal
724
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
725
+ */
726
+ export namespace UpdateWebhookDocumentation$ {
727
+ /** @deprecated use `UpdateWebhookDocumentation$inboundSchema` instead. */
728
+ export const inboundSchema = UpdateWebhookDocumentation$inboundSchema;
729
+ /** @deprecated use `UpdateWebhookDocumentation$outboundSchema` instead. */
730
+ export const outboundSchema = UpdateWebhookDocumentation$outboundSchema;
731
+ /** @deprecated use `UpdateWebhookDocumentation$Outbound` instead. */
732
+ export type Outbound = UpdateWebhookDocumentation$Outbound;
733
+ }
734
+
735
+ export function updateWebhookDocumentationToJSON(
736
+ updateWebhookDocumentation: UpdateWebhookDocumentation,
737
+ ): string {
738
+ return JSON.stringify(
739
+ UpdateWebhookDocumentation$outboundSchema.parse(updateWebhookDocumentation),
740
+ );
741
+ }
742
+
743
+ export function updateWebhookDocumentationFromJSON(
744
+ jsonString: string,
745
+ ): SafeParseResult<UpdateWebhookDocumentation, SDKValidationError> {
746
+ return safeParse(
747
+ jsonString,
748
+ (x) => UpdateWebhookDocumentation$inboundSchema.parse(JSON.parse(x)),
749
+ `Failed to parse 'UpdateWebhookDocumentation' from JSON`,
750
+ );
751
+ }
752
+
753
+ /** @internal */
754
+ export const UpdateWebhookLinks$inboundSchema: z.ZodType<
755
+ UpdateWebhookLinks,
756
+ z.ZodTypeDef,
757
+ unknown
758
+ > = z.object({
759
+ documentation: z.lazy(() => UpdateWebhookDocumentation$inboundSchema),
760
+ });
761
+
762
+ /** @internal */
763
+ export type UpdateWebhookLinks$Outbound = {
764
+ documentation: UpdateWebhookDocumentation$Outbound;
765
+ };
766
+
767
+ /** @internal */
768
+ export const UpdateWebhookLinks$outboundSchema: z.ZodType<
769
+ UpdateWebhookLinks$Outbound,
770
+ z.ZodTypeDef,
771
+ UpdateWebhookLinks
772
+ > = z.object({
773
+ documentation: z.lazy(() => UpdateWebhookDocumentation$outboundSchema),
774
+ });
775
+
776
+ /**
777
+ * @internal
778
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
779
+ */
780
+ export namespace UpdateWebhookLinks$ {
781
+ /** @deprecated use `UpdateWebhookLinks$inboundSchema` instead. */
782
+ export const inboundSchema = UpdateWebhookLinks$inboundSchema;
783
+ /** @deprecated use `UpdateWebhookLinks$outboundSchema` instead. */
784
+ export const outboundSchema = UpdateWebhookLinks$outboundSchema;
785
+ /** @deprecated use `UpdateWebhookLinks$Outbound` instead. */
786
+ export type Outbound = UpdateWebhookLinks$Outbound;
787
+ }
788
+
789
+ export function updateWebhookLinksToJSON(
790
+ updateWebhookLinks: UpdateWebhookLinks,
791
+ ): string {
792
+ return JSON.stringify(
793
+ UpdateWebhookLinks$outboundSchema.parse(updateWebhookLinks),
794
+ );
795
+ }
796
+
797
+ export function updateWebhookLinksFromJSON(
798
+ jsonString: string,
799
+ ): SafeParseResult<UpdateWebhookLinks, SDKValidationError> {
800
+ return safeParse(
801
+ jsonString,
802
+ (x) => UpdateWebhookLinks$inboundSchema.parse(JSON.parse(x)),
803
+ `Failed to parse 'UpdateWebhookLinks' from JSON`,
804
+ );
805
+ }
806
+
604
807
  /** @internal */
605
808
  export const UpdateWebhookResponse$inboundSchema: z.ZodType<
606
809
  UpdateWebhookResponse,
607
810
  z.ZodTypeDef,
608
811
  unknown
609
812
  > = z.object({
610
- resource: z.string().optional(),
611
- id: z.string().optional(),
612
- url: z.string().optional(),
613
- profileId: z.string().optional(),
614
- createdAt: z.string().optional(),
615
- name: z.string().optional(),
616
- eventTypes: z.array(z.string()).optional(),
617
- status: UpdateWebhookStatus$inboundSchema.optional(),
618
- mode: UpdateWebhookMode$inboundSchema.optional(),
813
+ resource: z.string(),
814
+ id: z.string(),
815
+ url: z.string(),
816
+ profileId: z.nullable(z.string()),
817
+ createdAt: z.string(),
818
+ name: z.string(),
819
+ eventTypes: z.array(UpdateWebhookEventTypeWebhookEventTypes$inboundSchema),
820
+ status: UpdateWebhookStatus$inboundSchema,
821
+ mode: UpdateWebhookMode$inboundSchema,
822
+ _links: z.lazy(() => UpdateWebhookLinks$inboundSchema),
823
+ }).transform((v) => {
824
+ return remap$(v, {
825
+ "_links": "links",
826
+ });
619
827
  });
620
828
 
621
829
  /** @internal */
622
830
  export type UpdateWebhookResponse$Outbound = {
623
- resource?: string | undefined;
624
- id?: string | undefined;
625
- url?: string | undefined;
626
- profileId?: string | undefined;
627
- createdAt?: string | undefined;
628
- name?: string | undefined;
629
- eventTypes?: Array<string> | undefined;
630
- status?: string | undefined;
631
- mode?: string | undefined;
831
+ resource: string;
832
+ id: string;
833
+ url: string;
834
+ profileId: string | null;
835
+ createdAt: string;
836
+ name: string;
837
+ eventTypes: Array<string>;
838
+ status: string;
839
+ mode: string;
840
+ _links: UpdateWebhookLinks$Outbound;
632
841
  };
633
842
 
634
843
  /** @internal */
@@ -637,15 +846,20 @@ export const UpdateWebhookResponse$outboundSchema: z.ZodType<
637
846
  z.ZodTypeDef,
638
847
  UpdateWebhookResponse
639
848
  > = z.object({
640
- resource: z.string().optional(),
641
- id: z.string().optional(),
642
- url: z.string().optional(),
643
- profileId: z.string().optional(),
644
- createdAt: z.string().optional(),
645
- name: z.string().optional(),
646
- eventTypes: z.array(z.string()).optional(),
647
- status: UpdateWebhookStatus$outboundSchema.optional(),
648
- mode: UpdateWebhookMode$outboundSchema.optional(),
849
+ resource: z.string(),
850
+ id: z.string(),
851
+ url: z.string(),
852
+ profileId: z.nullable(z.string()),
853
+ createdAt: z.string(),
854
+ name: z.string(),
855
+ eventTypes: z.array(UpdateWebhookEventTypeWebhookEventTypes$outboundSchema),
856
+ status: UpdateWebhookStatus$outboundSchema,
857
+ mode: UpdateWebhookMode$outboundSchema,
858
+ links: z.lazy(() => UpdateWebhookLinks$outboundSchema),
859
+ }).transform((v) => {
860
+ return remap$(v, {
861
+ links: "_links",
862
+ });
649
863
  });
650
864
 
651
865
  /**
package/src/sdk/sdk.ts CHANGED
@@ -30,6 +30,66 @@ import { WebhookEvents } from "./webhookevents.js";
30
30
  import { Webhooks } from "./webhooks.js";
31
31
 
32
32
  export class Client extends ClientSDK {
33
+ private _balances?: Balances;
34
+ get balances(): Balances {
35
+ return (this._balances ??= new Balances(this._options));
36
+ }
37
+
38
+ private _settlements?: Settlements;
39
+ get settlements(): Settlements {
40
+ return (this._settlements ??= new Settlements(this._options));
41
+ }
42
+
43
+ private _invoices?: Invoices;
44
+ get invoices(): Invoices {
45
+ return (this._invoices ??= new Invoices(this._options));
46
+ }
47
+
48
+ private _permissions?: Permissions;
49
+ get permissions(): Permissions {
50
+ return (this._permissions ??= new Permissions(this._options));
51
+ }
52
+
53
+ private _organizations?: Organizations;
54
+ get organizations(): Organizations {
55
+ return (this._organizations ??= new Organizations(this._options));
56
+ }
57
+
58
+ private _profiles?: Profiles;
59
+ get profiles(): Profiles {
60
+ return (this._profiles ??= new Profiles(this._options));
61
+ }
62
+
63
+ private _onboarding?: Onboarding;
64
+ get onboarding(): Onboarding {
65
+ return (this._onboarding ??= new Onboarding(this._options));
66
+ }
67
+
68
+ private _capabilities?: Capabilities;
69
+ get capabilities(): Capabilities {
70
+ return (this._capabilities ??= new Capabilities(this._options));
71
+ }
72
+
73
+ private _clients?: Clients;
74
+ get clients(): Clients {
75
+ return (this._clients ??= new Clients(this._options));
76
+ }
77
+
78
+ private _clientLinks?: ClientLinks;
79
+ get clientLinks(): ClientLinks {
80
+ return (this._clientLinks ??= new ClientLinks(this._options));
81
+ }
82
+
83
+ private _webhooks?: Webhooks;
84
+ get webhooks(): Webhooks {
85
+ return (this._webhooks ??= new Webhooks(this._options));
86
+ }
87
+
88
+ private _webhookEvents?: WebhookEvents;
89
+ get webhookEvents(): WebhookEvents {
90
+ return (this._webhookEvents ??= new WebhookEvents(this._options));
91
+ }
92
+
33
93
  private _payments?: Payments;
34
94
  get payments(): Payments {
35
95
  return (this._payments ??= new Payments(this._options));
@@ -90,66 +150,6 @@ export class Client extends ClientSDK {
90
150
  return (this._subscriptions ??= new Subscriptions(this._options));
91
151
  }
92
152
 
93
- private _permissions?: Permissions;
94
- get permissions(): Permissions {
95
- return (this._permissions ??= new Permissions(this._options));
96
- }
97
-
98
- private _organizations?: Organizations;
99
- get organizations(): Organizations {
100
- return (this._organizations ??= new Organizations(this._options));
101
- }
102
-
103
- private _profiles?: Profiles;
104
- get profiles(): Profiles {
105
- return (this._profiles ??= new Profiles(this._options));
106
- }
107
-
108
- private _onboarding?: Onboarding;
109
- get onboarding(): Onboarding {
110
- return (this._onboarding ??= new Onboarding(this._options));
111
- }
112
-
113
- private _capabilities?: Capabilities;
114
- get capabilities(): Capabilities {
115
- return (this._capabilities ??= new Capabilities(this._options));
116
- }
117
-
118
- private _clients?: Clients;
119
- get clients(): Clients {
120
- return (this._clients ??= new Clients(this._options));
121
- }
122
-
123
- private _clientLinks?: ClientLinks;
124
- get clientLinks(): ClientLinks {
125
- return (this._clientLinks ??= new ClientLinks(this._options));
126
- }
127
-
128
- private _webhooks?: Webhooks;
129
- get webhooks(): Webhooks {
130
- return (this._webhooks ??= new Webhooks(this._options));
131
- }
132
-
133
- private _webhookEvents?: WebhookEvents;
134
- get webhookEvents(): WebhookEvents {
135
- return (this._webhookEvents ??= new WebhookEvents(this._options));
136
- }
137
-
138
- private _balances?: Balances;
139
- get balances(): Balances {
140
- return (this._balances ??= new Balances(this._options));
141
- }
142
-
143
- private _settlements?: Settlements;
144
- get settlements(): Settlements {
145
- return (this._settlements ??= new Settlements(this._options));
146
- }
147
-
148
- private _invoices?: Invoices;
149
- get invoices(): Invoices {
150
- return (this._invoices ??= new Invoices(this._options));
151
- }
152
-
153
153
  private _salesInvoices?: SalesInvoices;
154
154
  get salesInvoices(): SalesInvoices {
155
155
  return (this._salesInvoices ??= new SalesInvoices(this._options));