mollie-api-typescript 0.2.4 → 0.2.6

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 (44) hide show
  1. package/README.md +1 -1
  2. package/bin/mcp-server.js +104 -31
  3. package/bin/mcp-server.js.map +8 -8
  4. package/dist/commonjs/lib/config.d.ts +3 -3
  5. package/dist/commonjs/lib/config.js +3 -3
  6. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  7. package/dist/commonjs/mcp-server/server.js +1 -1
  8. package/dist/commonjs/models/entitysettlement.d.ts +206 -16
  9. package/dist/commonjs/models/entitysettlement.d.ts.map +1 -1
  10. package/dist/commonjs/models/entitysettlement.js +159 -17
  11. package/dist/commonjs/models/entitysettlement.js.map +1 -1
  12. package/dist/commonjs/models/errors/index.d.ts +1 -0
  13. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  14. package/dist/commonjs/models/errors/index.js +1 -0
  15. package/dist/commonjs/models/errors/index.js.map +1 -1
  16. package/dist/commonjs/models/operations/listsettlements.d.ts +8 -8
  17. package/dist/commonjs/models/operations/listsettlements.d.ts.map +1 -1
  18. package/dist/commonjs/models/operations/listsettlements.js +8 -8
  19. package/dist/commonjs/models/operations/listsettlements.js.map +1 -1
  20. package/dist/esm/lib/config.d.ts +3 -3
  21. package/dist/esm/lib/config.js +3 -3
  22. package/dist/esm/mcp-server/mcp-server.js +1 -1
  23. package/dist/esm/mcp-server/server.js +1 -1
  24. package/dist/esm/models/entitysettlement.d.ts +206 -16
  25. package/dist/esm/models/entitysettlement.d.ts.map +1 -1
  26. package/dist/esm/models/entitysettlement.js +150 -16
  27. package/dist/esm/models/entitysettlement.js.map +1 -1
  28. package/dist/esm/models/errors/index.d.ts +1 -0
  29. package/dist/esm/models/errors/index.d.ts.map +1 -1
  30. package/dist/esm/models/errors/index.js +1 -0
  31. package/dist/esm/models/errors/index.js.map +1 -1
  32. package/dist/esm/models/operations/listsettlements.d.ts +8 -8
  33. package/dist/esm/models/operations/listsettlements.d.ts.map +1 -1
  34. package/dist/esm/models/operations/listsettlements.js +8 -8
  35. package/dist/esm/models/operations/listsettlements.js.map +1 -1
  36. package/examples/package-lock.json +1 -1
  37. package/jsr.json +1 -1
  38. package/package.json +1 -1
  39. package/src/lib/config.ts +3 -3
  40. package/src/mcp-server/mcp-server.ts +1 -1
  41. package/src/mcp-server/server.ts +1 -1
  42. package/src/models/entitysettlement.ts +355 -32
  43. package/src/models/errors/index.ts +1 -0
  44. package/src/models/operations/listsettlements.ts +16 -16
@@ -12,7 +12,18 @@ import {
12
12
  Amount$Outbound,
13
13
  Amount$outboundSchema,
14
14
  } from "./amount.js";
15
+ import {
16
+ AmountNullable,
17
+ AmountNullable$inboundSchema,
18
+ AmountNullable$Outbound,
19
+ AmountNullable$outboundSchema,
20
+ } from "./amountnullable.js";
15
21
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
22
+ import {
23
+ PaymentMethod,
24
+ PaymentMethod$inboundSchema,
25
+ PaymentMethod$outboundSchema,
26
+ } from "./paymentmethod.js";
16
27
  import {
17
28
  SettlementStatus,
18
29
  SettlementStatus$inboundSchema,
@@ -31,6 +42,91 @@ import {
31
42
  UrlNullable$outboundSchema,
32
43
  } from "./urlnullable.js";
33
44
 
45
+ /**
46
+ * The service rates, further divided into `fixed` and `percentage` costs.
47
+ */
48
+ export type Rate = {
49
+ /**
50
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
51
+ */
52
+ fixed?: Amount | undefined;
53
+ percentage?: string | undefined;
54
+ };
55
+
56
+ export type Cost = {
57
+ /**
58
+ * A description of the cost subtotal
59
+ */
60
+ description: string;
61
+ /**
62
+ * The payment method, if applicable
63
+ */
64
+ method: PaymentMethod | null;
65
+ /**
66
+ * The number of fees
67
+ */
68
+ count: number;
69
+ /**
70
+ * The service rates, further divided into `fixed` and `percentage` costs.
71
+ */
72
+ rate: Rate;
73
+ /**
74
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
75
+ */
76
+ amountNet: Amount;
77
+ /**
78
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
79
+ */
80
+ amountVat: Amount;
81
+ /**
82
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
83
+ */
84
+ amountGross: Amount;
85
+ };
86
+
87
+ export type Revenue = {
88
+ /**
89
+ * A description of the revenue subtotal
90
+ */
91
+ description: string;
92
+ /**
93
+ * The payment method, if applicable
94
+ */
95
+ method: PaymentMethod | null;
96
+ /**
97
+ * The number of payments
98
+ */
99
+ count: number;
100
+ /**
101
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
102
+ */
103
+ amountNet: Amount;
104
+ /**
105
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
106
+ */
107
+ amountVat: AmountNullable | null;
108
+ /**
109
+ * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
110
+ */
111
+ amountGross: Amount;
112
+ };
113
+
114
+ export type Periods = {
115
+ /**
116
+ * An array of cost objects, describing the fees withheld for each payment method during this period.
117
+ */
118
+ costs?: Array<Cost> | undefined;
119
+ /**
120
+ * An array of revenue objects containing the total revenue for each payment method during this period.
121
+ */
122
+ revenue?: Array<Revenue> | undefined;
123
+ invoiceId?: string | undefined;
124
+ /**
125
+ * The invoice reference, if the invoice has been created already.
126
+ */
127
+ invoiceReference?: string | null | undefined;
128
+ };
129
+
34
130
  /**
35
131
  * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
36
132
  */
@@ -38,7 +134,7 @@ export type EntitySettlementLinks = {
38
134
  /**
39
135
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
40
136
  */
41
- self?: Url | undefined;
137
+ self: Url;
42
138
  /**
43
139
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
44
140
  */
@@ -72,8 +168,8 @@ export type EntitySettlement = {
72
168
  * @remarks
73
169
  * endpoint.
74
170
  */
75
- resource?: string | undefined;
76
- id?: string | undefined;
171
+ resource: string;
172
+ id: string;
77
173
  /**
78
174
  * The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
79
175
  */
@@ -94,12 +190,12 @@ export type EntitySettlement = {
94
190
  /**
95
191
  * The status of the settlement.
96
192
  */
97
- status?: SettlementStatus | undefined;
193
+ status: SettlementStatus;
98
194
  /**
99
195
  * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
100
196
  */
101
- amount?: Amount | undefined;
102
- balanceId?: string | undefined;
197
+ amount: Amount;
198
+ balanceId: string;
103
199
  invoiceId?: string | undefined;
104
200
  /**
105
201
  * For bookkeeping purposes, the settlement includes an overview of transactions included in the settlement. These
@@ -115,20 +211,247 @@ export type EntitySettlement = {
115
211
  *
116
212
  * The example response should give a good idea of what this looks like in practise.
117
213
  */
118
- periods?: { [k: string]: any } | undefined;
214
+ periods?: { [k: string]: { [k: string]: Periods } } | undefined;
119
215
  /**
120
216
  * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
121
217
  */
122
- links?: EntitySettlementLinks | undefined;
218
+ links: EntitySettlementLinks;
219
+ };
220
+
221
+ /** @internal */
222
+ export const Rate$inboundSchema: z.ZodType<Rate, z.ZodTypeDef, unknown> = z
223
+ .object({
224
+ fixed: Amount$inboundSchema.optional(),
225
+ percentage: z.string().optional(),
226
+ });
227
+
228
+ /** @internal */
229
+ export type Rate$Outbound = {
230
+ fixed?: Amount$Outbound | undefined;
231
+ percentage?: string | undefined;
232
+ };
233
+
234
+ /** @internal */
235
+ export const Rate$outboundSchema: z.ZodType<Rate$Outbound, z.ZodTypeDef, Rate> =
236
+ z.object({
237
+ fixed: Amount$outboundSchema.optional(),
238
+ percentage: z.string().optional(),
239
+ });
240
+
241
+ /**
242
+ * @internal
243
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
244
+ */
245
+ export namespace Rate$ {
246
+ /** @deprecated use `Rate$inboundSchema` instead. */
247
+ export const inboundSchema = Rate$inboundSchema;
248
+ /** @deprecated use `Rate$outboundSchema` instead. */
249
+ export const outboundSchema = Rate$outboundSchema;
250
+ /** @deprecated use `Rate$Outbound` instead. */
251
+ export type Outbound = Rate$Outbound;
252
+ }
253
+
254
+ export function rateToJSON(rate: Rate): string {
255
+ return JSON.stringify(Rate$outboundSchema.parse(rate));
256
+ }
257
+
258
+ export function rateFromJSON(
259
+ jsonString: string,
260
+ ): SafeParseResult<Rate, SDKValidationError> {
261
+ return safeParse(
262
+ jsonString,
263
+ (x) => Rate$inboundSchema.parse(JSON.parse(x)),
264
+ `Failed to parse 'Rate' from JSON`,
265
+ );
266
+ }
267
+
268
+ /** @internal */
269
+ export const Cost$inboundSchema: z.ZodType<Cost, z.ZodTypeDef, unknown> = z
270
+ .object({
271
+ description: z.string(),
272
+ method: z.nullable(PaymentMethod$inboundSchema),
273
+ count: z.number().int(),
274
+ rate: z.lazy(() => Rate$inboundSchema),
275
+ amountNet: Amount$inboundSchema,
276
+ amountVat: Amount$inboundSchema,
277
+ amountGross: Amount$inboundSchema,
278
+ });
279
+
280
+ /** @internal */
281
+ export type Cost$Outbound = {
282
+ description: string;
283
+ method: string | null;
284
+ count: number;
285
+ rate: Rate$Outbound;
286
+ amountNet: Amount$Outbound;
287
+ amountVat: Amount$Outbound;
288
+ amountGross: Amount$Outbound;
289
+ };
290
+
291
+ /** @internal */
292
+ export const Cost$outboundSchema: z.ZodType<Cost$Outbound, z.ZodTypeDef, Cost> =
293
+ z.object({
294
+ description: z.string(),
295
+ method: z.nullable(PaymentMethod$outboundSchema),
296
+ count: z.number().int(),
297
+ rate: z.lazy(() => Rate$outboundSchema),
298
+ amountNet: Amount$outboundSchema,
299
+ amountVat: Amount$outboundSchema,
300
+ amountGross: Amount$outboundSchema,
301
+ });
302
+
303
+ /**
304
+ * @internal
305
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
306
+ */
307
+ export namespace Cost$ {
308
+ /** @deprecated use `Cost$inboundSchema` instead. */
309
+ export const inboundSchema = Cost$inboundSchema;
310
+ /** @deprecated use `Cost$outboundSchema` instead. */
311
+ export const outboundSchema = Cost$outboundSchema;
312
+ /** @deprecated use `Cost$Outbound` instead. */
313
+ export type Outbound = Cost$Outbound;
314
+ }
315
+
316
+ export function costToJSON(cost: Cost): string {
317
+ return JSON.stringify(Cost$outboundSchema.parse(cost));
318
+ }
319
+
320
+ export function costFromJSON(
321
+ jsonString: string,
322
+ ): SafeParseResult<Cost, SDKValidationError> {
323
+ return safeParse(
324
+ jsonString,
325
+ (x) => Cost$inboundSchema.parse(JSON.parse(x)),
326
+ `Failed to parse 'Cost' from JSON`,
327
+ );
328
+ }
329
+
330
+ /** @internal */
331
+ export const Revenue$inboundSchema: z.ZodType<Revenue, z.ZodTypeDef, unknown> =
332
+ z.object({
333
+ description: z.string(),
334
+ method: z.nullable(PaymentMethod$inboundSchema),
335
+ count: z.number().int(),
336
+ amountNet: Amount$inboundSchema,
337
+ amountVat: z.nullable(AmountNullable$inboundSchema),
338
+ amountGross: Amount$inboundSchema,
339
+ });
340
+
341
+ /** @internal */
342
+ export type Revenue$Outbound = {
343
+ description: string;
344
+ method: string | null;
345
+ count: number;
346
+ amountNet: Amount$Outbound;
347
+ amountVat: AmountNullable$Outbound | null;
348
+ amountGross: Amount$Outbound;
349
+ };
350
+
351
+ /** @internal */
352
+ export const Revenue$outboundSchema: z.ZodType<
353
+ Revenue$Outbound,
354
+ z.ZodTypeDef,
355
+ Revenue
356
+ > = z.object({
357
+ description: z.string(),
358
+ method: z.nullable(PaymentMethod$outboundSchema),
359
+ count: z.number().int(),
360
+ amountNet: Amount$outboundSchema,
361
+ amountVat: z.nullable(AmountNullable$outboundSchema),
362
+ amountGross: Amount$outboundSchema,
363
+ });
364
+
365
+ /**
366
+ * @internal
367
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
368
+ */
369
+ export namespace Revenue$ {
370
+ /** @deprecated use `Revenue$inboundSchema` instead. */
371
+ export const inboundSchema = Revenue$inboundSchema;
372
+ /** @deprecated use `Revenue$outboundSchema` instead. */
373
+ export const outboundSchema = Revenue$outboundSchema;
374
+ /** @deprecated use `Revenue$Outbound` instead. */
375
+ export type Outbound = Revenue$Outbound;
376
+ }
377
+
378
+ export function revenueToJSON(revenue: Revenue): string {
379
+ return JSON.stringify(Revenue$outboundSchema.parse(revenue));
380
+ }
381
+
382
+ export function revenueFromJSON(
383
+ jsonString: string,
384
+ ): SafeParseResult<Revenue, SDKValidationError> {
385
+ return safeParse(
386
+ jsonString,
387
+ (x) => Revenue$inboundSchema.parse(JSON.parse(x)),
388
+ `Failed to parse 'Revenue' from JSON`,
389
+ );
390
+ }
391
+
392
+ /** @internal */
393
+ export const Periods$inboundSchema: z.ZodType<Periods, z.ZodTypeDef, unknown> =
394
+ z.object({
395
+ costs: z.array(z.lazy(() => Cost$inboundSchema)).optional(),
396
+ revenue: z.array(z.lazy(() => Revenue$inboundSchema)).optional(),
397
+ invoiceId: z.string().optional(),
398
+ invoiceReference: z.nullable(z.string()).optional(),
399
+ });
400
+
401
+ /** @internal */
402
+ export type Periods$Outbound = {
403
+ costs?: Array<Cost$Outbound> | undefined;
404
+ revenue?: Array<Revenue$Outbound> | undefined;
405
+ invoiceId?: string | undefined;
406
+ invoiceReference?: string | null | undefined;
123
407
  };
124
408
 
409
+ /** @internal */
410
+ export const Periods$outboundSchema: z.ZodType<
411
+ Periods$Outbound,
412
+ z.ZodTypeDef,
413
+ Periods
414
+ > = z.object({
415
+ costs: z.array(z.lazy(() => Cost$outboundSchema)).optional(),
416
+ revenue: z.array(z.lazy(() => Revenue$outboundSchema)).optional(),
417
+ invoiceId: z.string().optional(),
418
+ invoiceReference: z.nullable(z.string()).optional(),
419
+ });
420
+
421
+ /**
422
+ * @internal
423
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
424
+ */
425
+ export namespace Periods$ {
426
+ /** @deprecated use `Periods$inboundSchema` instead. */
427
+ export const inboundSchema = Periods$inboundSchema;
428
+ /** @deprecated use `Periods$outboundSchema` instead. */
429
+ export const outboundSchema = Periods$outboundSchema;
430
+ /** @deprecated use `Periods$Outbound` instead. */
431
+ export type Outbound = Periods$Outbound;
432
+ }
433
+
434
+ export function periodsToJSON(periods: Periods): string {
435
+ return JSON.stringify(Periods$outboundSchema.parse(periods));
436
+ }
437
+
438
+ export function periodsFromJSON(
439
+ jsonString: string,
440
+ ): SafeParseResult<Periods, SDKValidationError> {
441
+ return safeParse(
442
+ jsonString,
443
+ (x) => Periods$inboundSchema.parse(JSON.parse(x)),
444
+ `Failed to parse 'Periods' from JSON`,
445
+ );
446
+ }
447
+
125
448
  /** @internal */
126
449
  export const EntitySettlementLinks$inboundSchema: z.ZodType<
127
450
  EntitySettlementLinks,
128
451
  z.ZodTypeDef,
129
452
  unknown
130
453
  > = z.object({
131
- self: Url$inboundSchema.optional(),
454
+ self: Url$inboundSchema,
132
455
  payments: Url$inboundSchema.optional(),
133
456
  captures: Url$inboundSchema.optional(),
134
457
  refunds: Url$inboundSchema.optional(),
@@ -139,7 +462,7 @@ export const EntitySettlementLinks$inboundSchema: z.ZodType<
139
462
 
140
463
  /** @internal */
141
464
  export type EntitySettlementLinks$Outbound = {
142
- self?: Url$Outbound | undefined;
465
+ self: Url$Outbound;
143
466
  payments?: Url$Outbound | undefined;
144
467
  captures?: Url$Outbound | undefined;
145
468
  refunds?: Url$Outbound | undefined;
@@ -154,7 +477,7 @@ export const EntitySettlementLinks$outboundSchema: z.ZodType<
154
477
  z.ZodTypeDef,
155
478
  EntitySettlementLinks
156
479
  > = z.object({
157
- self: Url$outboundSchema.optional(),
480
+ self: Url$outboundSchema,
158
481
  payments: Url$outboundSchema.optional(),
159
482
  captures: Url$outboundSchema.optional(),
160
483
  refunds: Url$outboundSchema.optional(),
@@ -200,17 +523,17 @@ export const EntitySettlement$inboundSchema: z.ZodType<
200
523
  z.ZodTypeDef,
201
524
  unknown
202
525
  > = z.object({
203
- resource: z.string().optional(),
204
- id: z.string().optional(),
526
+ resource: z.string(),
527
+ id: z.string(),
205
528
  createdAt: z.string().optional(),
206
529
  reference: z.nullable(z.string()).optional(),
207
530
  settledAt: z.nullable(z.string()).optional(),
208
- status: SettlementStatus$inboundSchema.optional(),
209
- amount: Amount$inboundSchema.optional(),
210
- balanceId: z.string().optional(),
531
+ status: SettlementStatus$inboundSchema,
532
+ amount: Amount$inboundSchema,
533
+ balanceId: z.string(),
211
534
  invoiceId: z.string().optional(),
212
- periods: z.record(z.any()).optional(),
213
- _links: z.lazy(() => EntitySettlementLinks$inboundSchema).optional(),
535
+ periods: z.record(z.record(z.lazy(() => Periods$inboundSchema))).optional(),
536
+ _links: z.lazy(() => EntitySettlementLinks$inboundSchema),
214
537
  }).transform((v) => {
215
538
  return remap$(v, {
216
539
  "_links": "links",
@@ -219,17 +542,17 @@ export const EntitySettlement$inboundSchema: z.ZodType<
219
542
 
220
543
  /** @internal */
221
544
  export type EntitySettlement$Outbound = {
222
- resource?: string | undefined;
223
- id?: string | undefined;
545
+ resource: string;
546
+ id: string;
224
547
  createdAt?: string | undefined;
225
548
  reference?: string | null | undefined;
226
549
  settledAt?: string | null | undefined;
227
- status?: string | undefined;
228
- amount?: Amount$Outbound | undefined;
229
- balanceId?: string | undefined;
550
+ status: string;
551
+ amount: Amount$Outbound;
552
+ balanceId: string;
230
553
  invoiceId?: string | undefined;
231
- periods?: { [k: string]: any } | undefined;
232
- _links?: EntitySettlementLinks$Outbound | undefined;
554
+ periods?: { [k: string]: { [k: string]: Periods$Outbound } } | undefined;
555
+ _links: EntitySettlementLinks$Outbound;
233
556
  };
234
557
 
235
558
  /** @internal */
@@ -238,17 +561,17 @@ export const EntitySettlement$outboundSchema: z.ZodType<
238
561
  z.ZodTypeDef,
239
562
  EntitySettlement
240
563
  > = z.object({
241
- resource: z.string().optional(),
242
- id: z.string().optional(),
564
+ resource: z.string(),
565
+ id: z.string(),
243
566
  createdAt: z.string().optional(),
244
567
  reference: z.nullable(z.string()).optional(),
245
568
  settledAt: z.nullable(z.string()).optional(),
246
- status: SettlementStatus$outboundSchema.optional(),
247
- amount: Amount$outboundSchema.optional(),
248
- balanceId: z.string().optional(),
569
+ status: SettlementStatus$outboundSchema,
570
+ amount: Amount$outboundSchema,
571
+ balanceId: z.string(),
249
572
  invoiceId: z.string().optional(),
250
- periods: z.record(z.any()).optional(),
251
- links: z.lazy(() => EntitySettlementLinks$outboundSchema).optional(),
573
+ periods: z.record(z.record(z.lazy(() => Periods$outboundSchema))).optional(),
574
+ links: z.lazy(() => EntitySettlementLinks$outboundSchema),
252
575
  }).transform((v) => {
253
576
  return remap$(v, {
254
577
  links: "_links",
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  export * from "./clientdefaulterror.js";
6
+ export * from "./clienterror.js";
6
7
  export * from "./errorresponse.js";
7
8
  export * from "./httpclienterrors.js";
8
9
  export * from "./responsevalidationerror.js";
@@ -53,7 +53,7 @@ export type ListSettlementsEmbedded = {
53
53
  * @remarks
54
54
  * of the settlement object, refer to the [Get settlement endpoint](get-settlement) documentation.
55
55
  */
56
- settlements?: Array<models.EntitySettlement> | undefined;
56
+ settlements: Array<models.EntitySettlement>;
57
57
  };
58
58
 
59
59
  /**
@@ -72,12 +72,12 @@ export type ListSettlementsResponse = {
72
72
  * The maximum number of items per result set is controlled by the `limit` property provided in the request. The default
73
73
  * limit is 50 items.
74
74
  */
75
- count?: number | undefined;
76
- embedded?: ListSettlementsEmbedded | undefined;
75
+ count: number;
76
+ embedded: ListSettlementsEmbedded;
77
77
  /**
78
78
  * Links to help navigate through the lists of items. Every URL object will contain an `href` and a `type` field.
79
79
  */
80
- links?: models.ListLinks | undefined;
80
+ links: models.ListLinks;
81
81
  };
82
82
 
83
83
  /** @internal */
@@ -166,12 +166,12 @@ export const ListSettlementsEmbedded$inboundSchema: z.ZodType<
166
166
  z.ZodTypeDef,
167
167
  unknown
168
168
  > = z.object({
169
- settlements: z.array(models.EntitySettlement$inboundSchema).optional(),
169
+ settlements: z.array(models.EntitySettlement$inboundSchema),
170
170
  });
171
171
 
172
172
  /** @internal */
173
173
  export type ListSettlementsEmbedded$Outbound = {
174
- settlements?: Array<models.EntitySettlement$Outbound> | undefined;
174
+ settlements: Array<models.EntitySettlement$Outbound>;
175
175
  };
176
176
 
177
177
  /** @internal */
@@ -180,7 +180,7 @@ export const ListSettlementsEmbedded$outboundSchema: z.ZodType<
180
180
  z.ZodTypeDef,
181
181
  ListSettlementsEmbedded
182
182
  > = z.object({
183
- settlements: z.array(models.EntitySettlement$outboundSchema).optional(),
183
+ settlements: z.array(models.EntitySettlement$outboundSchema),
184
184
  });
185
185
 
186
186
  /**
@@ -220,9 +220,9 @@ export const ListSettlementsResponse$inboundSchema: z.ZodType<
220
220
  z.ZodTypeDef,
221
221
  unknown
222
222
  > = z.object({
223
- count: z.number().int().optional(),
224
- _embedded: z.lazy(() => ListSettlementsEmbedded$inboundSchema).optional(),
225
- _links: models.ListLinks$inboundSchema.optional(),
223
+ count: z.number().int(),
224
+ _embedded: z.lazy(() => ListSettlementsEmbedded$inboundSchema),
225
+ _links: models.ListLinks$inboundSchema,
226
226
  }).transform((v) => {
227
227
  return remap$(v, {
228
228
  "_embedded": "embedded",
@@ -232,9 +232,9 @@ export const ListSettlementsResponse$inboundSchema: z.ZodType<
232
232
 
233
233
  /** @internal */
234
234
  export type ListSettlementsResponse$Outbound = {
235
- count?: number | undefined;
236
- _embedded?: ListSettlementsEmbedded$Outbound | undefined;
237
- _links?: models.ListLinks$Outbound | undefined;
235
+ count: number;
236
+ _embedded: ListSettlementsEmbedded$Outbound;
237
+ _links: models.ListLinks$Outbound;
238
238
  };
239
239
 
240
240
  /** @internal */
@@ -243,9 +243,9 @@ export const ListSettlementsResponse$outboundSchema: z.ZodType<
243
243
  z.ZodTypeDef,
244
244
  ListSettlementsResponse
245
245
  > = z.object({
246
- count: z.number().int().optional(),
247
- embedded: z.lazy(() => ListSettlementsEmbedded$outboundSchema).optional(),
248
- links: models.ListLinks$outboundSchema.optional(),
246
+ count: z.number().int(),
247
+ embedded: z.lazy(() => ListSettlementsEmbedded$outboundSchema),
248
+ links: models.ListLinks$outboundSchema,
249
249
  }).transform((v) => {
250
250
  return remap$(v, {
251
251
  embedded: "_embedded",