@deliverart/sdk-js-payment 2.5.33 → 2.6.0

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/dist/index.cjs CHANGED
@@ -11573,14 +11573,12 @@ var GetPaymentConfigBankTransferList = class extends import_sdk_js_core4.Abstrac
11573
11573
  this.outputSchema = getPaymentConfigBankTransferListResponseSchema;
11574
11574
  this.querySchema = paymentConfigsQuerySchema;
11575
11575
  this.headersSchema = void 0;
11576
+ this.listItemSchema = paymentConfigBankTransferSchema;
11577
+ this.paginationDefaultEnabled = true;
11576
11578
  }
11577
11579
  getPath() {
11578
11580
  return "/payment_configs/bank_transfer";
11579
11581
  }
11580
- parseResponse(data, rawResponse) {
11581
- const payments = external_exports.array(paymentConfigBankTransferSchema).parse(data);
11582
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types5.responseToPagination)(rawResponse) });
11583
- }
11584
11582
  };
11585
11583
 
11586
11584
  // src/requests/payment-configs/bank-transfer/UpdatePaymentConfigBankTransfer.ts
@@ -11684,14 +11682,12 @@ var GetPaymentConfigCashList = class extends import_sdk_js_core9.AbstractApiRequ
11684
11682
  this.outputSchema = getPaymentConfigCashListResponseSchema;
11685
11683
  this.querySchema = paymentConfigsQuerySchema;
11686
11684
  this.headersSchema = void 0;
11685
+ this.listItemSchema = paymentConfigCashSchema;
11686
+ this.paginationDefaultEnabled = true;
11687
11687
  }
11688
11688
  getPath() {
11689
11689
  return "/payment_configs/cash";
11690
11690
  }
11691
- parseResponse(data, rawResponse) {
11692
- const payments = external_exports.array(paymentConfigCashSchema).parse(data);
11693
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types7.responseToPagination)(rawResponse) });
11694
- }
11695
11691
  };
11696
11692
 
11697
11693
  // src/requests/payment-configs/credit-card/CreatePaymentConfigCreditCard.ts
@@ -11774,14 +11770,12 @@ var GetPaymentConfigCreditCardList = class extends import_sdk_js_core13.Abstract
11774
11770
  this.outputSchema = getPaymentConfigCreditCardListResponseSchema;
11775
11771
  this.querySchema = paymentConfigsQuerySchema;
11776
11772
  this.headersSchema = void 0;
11773
+ this.listItemSchema = paymentConfigCreditCardSchema;
11774
+ this.paginationDefaultEnabled = true;
11777
11775
  }
11778
11776
  getPath() {
11779
11777
  return "/payment_configs/credit_card";
11780
11778
  }
11781
- parseResponse(data, rawResponse) {
11782
- const payments = external_exports.array(paymentConfigCreditCardSchema).parse(data);
11783
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types9.responseToPagination)(rawResponse) });
11784
- }
11785
11779
  };
11786
11780
 
11787
11781
  // src/requests/payment-configs/DeletePaymentConfig.ts
@@ -11842,14 +11836,12 @@ var GetPaymentConfigs = class extends import_sdk_js_core16.AbstractApiRequest {
11842
11836
  this.outputSchema = getPaymentConfigsResponseSchema;
11843
11837
  this.querySchema = paymentConfigsQuerySchema;
11844
11838
  this.headersSchema = void 0;
11839
+ this.listItemSchema = paymentConfigSchema;
11840
+ this.paginationDefaultEnabled = true;
11845
11841
  }
11846
11842
  getPath() {
11847
11843
  return "/payment_configs";
11848
11844
  }
11849
- parseResponse(data, rawResponse) {
11850
- const payments = external_exports.array(paymentConfigSchema).parse(data);
11851
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types11.responseToPagination)(rawResponse) });
11852
- }
11853
11845
  };
11854
11846
 
11855
11847
  // src/requests/payment-configs/GetPaymentConfigsFromPointOfSale.ts
@@ -11866,14 +11858,13 @@ var GetPaymentConfigsFromPointOfSale = class extends import_sdk_js_core17.Abstra
11866
11858
  this.outputSchema = getPaymentConfigsFromPointOfSaleResponseSchema;
11867
11859
  this.querySchema = paymentConfigsQuerySchema;
11868
11860
  this.headersSchema = void 0;
11861
+ this.listItemSchema = paymentConfigSchema;
11862
+ this.paginationDefaultEnabled = false;
11869
11863
  this.pointOfSaleId = pointOfSaleId;
11870
11864
  }
11871
11865
  getPath() {
11872
11866
  return `/point_of_sales/${this.pointOfSaleId}/payment_configs`;
11873
11867
  }
11874
- parseResponse(data) {
11875
- return external_exports.array(paymentConfigSchema).parse(data);
11876
- }
11877
11868
  };
11878
11869
 
11879
11870
  // src/requests/payment-configs/stripe/CreatePaymentConfigStripe.ts
@@ -11954,14 +11945,12 @@ var GetPaymentConfigStripeList = class extends import_sdk_js_core21.AbstractApiR
11954
11945
  this.outputSchema = getPaymentConfigStripeListResponseSchema;
11955
11946
  this.querySchema = paymentConfigsQuerySchema;
11956
11947
  this.headersSchema = void 0;
11948
+ this.listItemSchema = paymentConfigStripeSchema;
11949
+ this.paginationDefaultEnabled = true;
11957
11950
  }
11958
11951
  getPath() {
11959
11952
  return "/payment_configs/stripe";
11960
11953
  }
11961
- parseResponse(data, rawResponse) {
11962
- const payments = external_exports.array(paymentConfigStripeSchema).parse(data);
11963
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types13.responseToPagination)(rawResponse) });
11964
- }
11965
11954
  };
11966
11955
 
11967
11956
  // src/requests/payment-configs/stripe/UpdatePaymentConfigStripe.ts
@@ -12066,14 +12055,12 @@ var GetPayments = class extends import_sdk_js_core26.AbstractApiRequest {
12066
12055
  this.outputSchema = getPaymentsResponseSchema;
12067
12056
  this.querySchema = paymentQuerySchema;
12068
12057
  this.headersSchema = void 0;
12058
+ this.listItemSchema = paymentSchema;
12059
+ this.paginationDefaultEnabled = true;
12069
12060
  }
12070
12061
  getPath() {
12071
12062
  return "/payments";
12072
12063
  }
12073
- parseResponse(data, rawResponse) {
12074
- const payments = external_exports.array(paymentSchema).parse(data);
12075
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types15.responseToPagination)(rawResponse) });
12076
- }
12077
12064
  };
12078
12065
 
12079
12066
  // src/requests/payments/GetPaymentsForPaymentConfig.ts
@@ -12091,15 +12078,13 @@ var GetPaymentsForPaymentConfig = class extends import_sdk_js_core27.AbstractApi
12091
12078
  this.outputSchema = getPaymentsForPaymentConfigResponseSchema;
12092
12079
  this.querySchema = paymentQuerySchema;
12093
12080
  this.headersSchema = void 0;
12081
+ this.listItemSchema = paymentSchema;
12082
+ this.paginationDefaultEnabled = true;
12094
12083
  this.paymentConfigId = paymentConfigId;
12095
12084
  }
12096
12085
  getPath() {
12097
12086
  return `/payment_configs/${this.paymentConfigId}/payments`;
12098
12087
  }
12099
- parseResponse(data, rawResponse) {
12100
- const payments = external_exports.array(paymentSchema).parse(data);
12101
- return this.validateOutput({ data: payments, pagination: (0, import_sdk_js_global_types16.responseToPagination)(rawResponse) });
12102
- }
12103
12088
  };
12104
12089
 
12105
12090
  // src/requests/payments/UpdatePayment.ts
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
2
- import { Paginated } from '@deliverart/sdk-js-global-types';
3
2
  export { PaymentMethod, PaymentStatus, paymentMethodSchema, paymentMethods, paymentStatusSchema, paymentStatuses } from '@deliverart/sdk-js-global-types';
4
3
  import { z } from 'zod';
5
4
  import { AbstractApiRequest } from '@deliverart/sdk-js-core';
@@ -688,9 +687,9 @@ declare const getPaymentConfigBankTransferListResponseSchema: z.ZodObject<{
688
687
  }, z.core.$strip>;
689
688
  type GetPaymentConfigBankTransferListResponse = z.infer<typeof getPaymentConfigBankTransferListResponseSchema>;
690
689
  declare class GetPaymentConfigBankTransferList extends AbstractApiRequest<typeof getPaymentConfigBankTransferListInputSchema, typeof getPaymentConfigBankTransferListResponseSchema, GetPaymentConfigBankTransferListQueryParams> {
691
- readonly method = "GET";
692
- readonly contentType = "application/json";
693
- readonly accept = "application/json";
690
+ readonly method: "GET";
691
+ readonly contentType: "application/json";
692
+ readonly accept: "application/json";
694
693
  readonly inputSchema: z.ZodUndefined;
695
694
  readonly outputSchema: z.ZodObject<{
696
695
  data: z.ZodArray<z.ZodObject<{
@@ -742,11 +741,24 @@ declare class GetPaymentConfigBankTransferList extends AbstractApiRequest<typeof
742
741
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
743
742
  }, z.core.$strip>;
744
743
  readonly headersSchema: undefined;
744
+ readonly listItemSchema: z.ZodObject<{
745
+ id: z.ZodString;
746
+ configurationCompleted: z.ZodBoolean;
747
+ createdAt: z.ZodString;
748
+ updatedAt: z.ZodString;
749
+ method: z.ZodLiteral<"bank_transfer">;
750
+ iban: z.ZodString;
751
+ bic: z.ZodString;
752
+ accountHolder: z.ZodString;
753
+ bankName: z.ZodString;
754
+ bankAddress: z.ZodNullable<z.ZodString>;
755
+ currency: z.ZodString;
756
+ }, z.core.$strip>;
757
+ readonly paginationDefaultEnabled = true;
745
758
  constructor(options?: {
746
759
  query?: GetPaymentConfigBankTransferListQueryParams;
747
760
  });
748
761
  getPath(): string;
749
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigBankTransfer>;
750
762
  }
751
763
 
752
764
  declare const updatePaymentConfigBankTransferInputSchema: z.ZodObject<{
@@ -908,9 +920,9 @@ declare const getPaymentConfigCashListResponseSchema: z.ZodObject<{
908
920
  }, z.core.$strip>;
909
921
  type GetPaymentConfigCashListResponse = z.infer<typeof getPaymentConfigCashListResponseSchema>;
910
922
  declare class GetPaymentConfigCashList extends AbstractApiRequest<typeof getPaymentConfigCashListInputSchema, typeof getPaymentConfigCashListResponseSchema, GetPaymentConfigCashListQueryParams> {
911
- readonly method = "GET";
912
- readonly contentType = "application/json";
913
- readonly accept = "application/json";
923
+ readonly method: "GET";
924
+ readonly contentType: "application/json";
925
+ readonly accept: "application/json";
914
926
  readonly inputSchema: z.ZodUndefined;
915
927
  readonly outputSchema: z.ZodObject<{
916
928
  data: z.ZodArray<z.ZodObject<{
@@ -956,11 +968,18 @@ declare class GetPaymentConfigCashList extends AbstractApiRequest<typeof getPaym
956
968
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
957
969
  }, z.core.$strip>;
958
970
  readonly headersSchema: undefined;
971
+ readonly listItemSchema: z.ZodObject<{
972
+ id: z.ZodString;
973
+ configurationCompleted: z.ZodBoolean;
974
+ createdAt: z.ZodString;
975
+ updatedAt: z.ZodString;
976
+ method: z.ZodLiteral<"cash">;
977
+ }, z.core.$strip>;
978
+ readonly paginationDefaultEnabled = true;
959
979
  constructor(options?: {
960
980
  query?: GetPaymentConfigCashListQueryParams;
961
981
  });
962
982
  getPath(): string;
963
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigCash>;
964
983
  }
965
984
 
966
985
  declare const createPaymentConfigCreditCardInputSchema: z.ZodObject<{
@@ -1065,9 +1084,9 @@ declare const getPaymentConfigCreditCardListResponseSchema: z.ZodObject<{
1065
1084
  }, z.core.$strip>;
1066
1085
  type GetPaymentConfigCreditCardListResponse = z.infer<typeof getPaymentConfigCreditCardListResponseSchema>;
1067
1086
  declare class GetPaymentConfigCreditCardList extends AbstractApiRequest<typeof getPaymentConfigCreditCardListInputSchema, typeof getPaymentConfigCreditCardListResponseSchema, GetPaymentConfigCreditCardListQueryParams> {
1068
- readonly method = "GET";
1069
- readonly contentType = "application/json";
1070
- readonly accept = "application/json";
1087
+ readonly method: "GET";
1088
+ readonly contentType: "application/json";
1089
+ readonly accept: "application/json";
1071
1090
  readonly inputSchema: z.ZodUndefined;
1072
1091
  readonly outputSchema: z.ZodObject<{
1073
1092
  data: z.ZodArray<z.ZodObject<{
@@ -1113,11 +1132,18 @@ declare class GetPaymentConfigCreditCardList extends AbstractApiRequest<typeof g
1113
1132
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1114
1133
  }, z.core.$strip>;
1115
1134
  readonly headersSchema: undefined;
1135
+ readonly listItemSchema: z.ZodObject<{
1136
+ id: z.ZodString;
1137
+ configurationCompleted: z.ZodBoolean;
1138
+ createdAt: z.ZodString;
1139
+ updatedAt: z.ZodString;
1140
+ method: z.ZodLiteral<"credit_card">;
1141
+ }, z.core.$strip>;
1142
+ readonly paginationDefaultEnabled = true;
1116
1143
  constructor(options?: {
1117
1144
  query?: GetPaymentConfigCreditCardListQueryParams;
1118
1145
  });
1119
1146
  getPath(): string;
1120
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigCreditCard>;
1121
1147
  }
1122
1148
 
1123
1149
  declare const deletePaymentConfigInputSchema: z.ZodUndefined;
@@ -1275,9 +1301,9 @@ declare const getPaymentConfigsResponseSchema: z.ZodObject<{
1275
1301
  }, z.core.$strip>;
1276
1302
  type GetPaymentConfigsResponse = z.infer<typeof getPaymentConfigsResponseSchema>;
1277
1303
  declare class GetPaymentConfigs extends AbstractApiRequest<typeof getPaymentConfigsInputSchema, typeof getPaymentConfigsResponseSchema, GetPaymentConfigsQueryParams> {
1278
- readonly method = "GET";
1279
- readonly contentType = "application/json";
1280
- readonly accept = "application/json";
1304
+ readonly method: "GET";
1305
+ readonly contentType: "application/json";
1306
+ readonly accept: "application/json";
1281
1307
  readonly inputSchema: z.ZodUndefined;
1282
1308
  readonly outputSchema: z.ZodObject<{
1283
1309
  data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1350,11 +1376,45 @@ declare class GetPaymentConfigs extends AbstractApiRequest<typeof getPaymentConf
1350
1376
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1351
1377
  }, z.core.$strip>;
1352
1378
  readonly headersSchema: undefined;
1379
+ readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1380
+ id: z.ZodString;
1381
+ configurationCompleted: z.ZodBoolean;
1382
+ createdAt: z.ZodString;
1383
+ updatedAt: z.ZodString;
1384
+ method: z.ZodLiteral<"bank_transfer">;
1385
+ iban: z.ZodString;
1386
+ bic: z.ZodString;
1387
+ accountHolder: z.ZodString;
1388
+ bankName: z.ZodString;
1389
+ bankAddress: z.ZodNullable<z.ZodString>;
1390
+ currency: z.ZodString;
1391
+ }, z.core.$strip>, z.ZodObject<{
1392
+ id: z.ZodString;
1393
+ configurationCompleted: z.ZodBoolean;
1394
+ createdAt: z.ZodString;
1395
+ updatedAt: z.ZodString;
1396
+ method: z.ZodLiteral<"stripe">;
1397
+ secretKey: z.ZodString;
1398
+ webhookSecret: z.ZodNullable<z.ZodString>;
1399
+ webhookId: z.ZodNullable<z.ZodString>;
1400
+ }, z.core.$strip>, z.ZodObject<{
1401
+ id: z.ZodString;
1402
+ configurationCompleted: z.ZodBoolean;
1403
+ createdAt: z.ZodString;
1404
+ updatedAt: z.ZodString;
1405
+ method: z.ZodLiteral<"cash">;
1406
+ }, z.core.$strip>, z.ZodObject<{
1407
+ id: z.ZodString;
1408
+ configurationCompleted: z.ZodBoolean;
1409
+ createdAt: z.ZodString;
1410
+ updatedAt: z.ZodString;
1411
+ method: z.ZodLiteral<"credit_card">;
1412
+ }, z.core.$strip>]>;
1413
+ readonly paginationDefaultEnabled = true;
1353
1414
  constructor(options?: {
1354
1415
  query?: GetPaymentConfigsQueryParams;
1355
1416
  });
1356
1417
  getPath(): string;
1357
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfig>;
1358
1418
  }
1359
1419
 
1360
1420
  type GetPaymentConfigsFromPointOfSaleQueryParams = PaymentConfigsQueryParams;
@@ -1396,9 +1456,9 @@ declare const getPaymentConfigsFromPointOfSaleResponseSchema: z.ZodArray<z.ZodDi
1396
1456
  }, z.core.$strip>]>>;
1397
1457
  type GetPaymentConfigsFromPointOfSaleResponse = z.infer<typeof getPaymentConfigsFromPointOfSaleResponseSchema>;
1398
1458
  declare class GetPaymentConfigsFromPointOfSale extends AbstractApiRequest<typeof getPaymentConfigsFromPointOfSaleInputSchema, typeof getPaymentConfigsFromPointOfSaleResponseSchema, GetPaymentConfigsFromPointOfSaleQueryParams> {
1399
- readonly method = "GET";
1400
- readonly contentType = "application/json";
1401
- readonly accept = "application/json";
1459
+ readonly method: "GET";
1460
+ readonly contentType: "application/json";
1461
+ readonly accept: "application/json";
1402
1462
  readonly inputSchema: z.ZodUndefined;
1403
1463
  readonly outputSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1404
1464
  id: z.ZodString;
@@ -1461,12 +1521,46 @@ declare class GetPaymentConfigsFromPointOfSale extends AbstractApiRequest<typeof
1461
1521
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1462
1522
  }, z.core.$strip>;
1463
1523
  readonly headersSchema: undefined;
1524
+ readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1525
+ id: z.ZodString;
1526
+ configurationCompleted: z.ZodBoolean;
1527
+ createdAt: z.ZodString;
1528
+ updatedAt: z.ZodString;
1529
+ method: z.ZodLiteral<"bank_transfer">;
1530
+ iban: z.ZodString;
1531
+ bic: z.ZodString;
1532
+ accountHolder: z.ZodString;
1533
+ bankName: z.ZodString;
1534
+ bankAddress: z.ZodNullable<z.ZodString>;
1535
+ currency: z.ZodString;
1536
+ }, z.core.$strip>, z.ZodObject<{
1537
+ id: z.ZodString;
1538
+ configurationCompleted: z.ZodBoolean;
1539
+ createdAt: z.ZodString;
1540
+ updatedAt: z.ZodString;
1541
+ method: z.ZodLiteral<"stripe">;
1542
+ secretKey: z.ZodString;
1543
+ webhookSecret: z.ZodNullable<z.ZodString>;
1544
+ webhookId: z.ZodNullable<z.ZodString>;
1545
+ }, z.core.$strip>, z.ZodObject<{
1546
+ id: z.ZodString;
1547
+ configurationCompleted: z.ZodBoolean;
1548
+ createdAt: z.ZodString;
1549
+ updatedAt: z.ZodString;
1550
+ method: z.ZodLiteral<"cash">;
1551
+ }, z.core.$strip>, z.ZodObject<{
1552
+ id: z.ZodString;
1553
+ configurationCompleted: z.ZodBoolean;
1554
+ createdAt: z.ZodString;
1555
+ updatedAt: z.ZodString;
1556
+ method: z.ZodLiteral<"credit_card">;
1557
+ }, z.core.$strip>]>;
1558
+ readonly paginationDefaultEnabled = false;
1464
1559
  private readonly pointOfSaleId;
1465
1560
  constructor(pointOfSaleId: string, options?: {
1466
1561
  query?: GetPaymentConfigsFromPointOfSaleQueryParams;
1467
1562
  });
1468
1563
  getPath(): string;
1469
- parseResponse(data: unknown): PaymentConfig[];
1470
1564
  }
1471
1565
 
1472
1566
  declare const createPaymentConfigStripeInputSchema: z.ZodObject<{
@@ -1588,9 +1682,9 @@ declare const getPaymentConfigStripeListResponseSchema: z.ZodObject<{
1588
1682
  }, z.core.$strip>;
1589
1683
  type GetPaymentConfigStripeListResponse = z.infer<typeof getPaymentConfigStripeListResponseSchema>;
1590
1684
  declare class GetPaymentConfigStripeList extends AbstractApiRequest<typeof getPaymentConfigStripeListInputSchema, typeof getPaymentConfigStripeListResponseSchema, GetPaymentConfigStripeListQueryParams> {
1591
- readonly method = "GET";
1592
- readonly contentType = "application/json";
1593
- readonly accept = "application/json";
1685
+ readonly method: "GET";
1686
+ readonly contentType: "application/json";
1687
+ readonly accept: "application/json";
1594
1688
  readonly inputSchema: z.ZodUndefined;
1595
1689
  readonly outputSchema: z.ZodObject<{
1596
1690
  data: z.ZodArray<z.ZodObject<{
@@ -1639,11 +1733,21 @@ declare class GetPaymentConfigStripeList extends AbstractApiRequest<typeof getPa
1639
1733
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1640
1734
  }, z.core.$strip>;
1641
1735
  readonly headersSchema: undefined;
1736
+ readonly listItemSchema: z.ZodObject<{
1737
+ id: z.ZodString;
1738
+ configurationCompleted: z.ZodBoolean;
1739
+ createdAt: z.ZodString;
1740
+ updatedAt: z.ZodString;
1741
+ method: z.ZodLiteral<"stripe">;
1742
+ secretKey: z.ZodString;
1743
+ webhookSecret: z.ZodNullable<z.ZodString>;
1744
+ webhookId: z.ZodNullable<z.ZodString>;
1745
+ }, z.core.$strip>;
1746
+ readonly paginationDefaultEnabled = true;
1642
1747
  constructor(options?: {
1643
1748
  query?: GetPaymentConfigStripeListQueryParams;
1644
1749
  });
1645
1750
  getPath(): string;
1646
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigStripe>;
1647
1751
  }
1648
1752
 
1649
1753
  declare const updatePaymentConfigStripeInputSchema: z.ZodObject<{
@@ -2049,9 +2153,9 @@ declare const getPaymentsResponseSchema: z.ZodObject<{
2049
2153
  }, z.core.$strip>;
2050
2154
  type GetPaymentsResponse = z.infer<typeof getPaymentsResponseSchema>;
2051
2155
  declare class GetPayments extends AbstractApiRequest<typeof getPaymentsInputSchema, typeof getPaymentsResponseSchema, GetPaymentsQueryParams> {
2052
- readonly method = "GET";
2053
- readonly contentType = "application/json";
2054
- readonly accept = "application/json";
2156
+ readonly method: "GET";
2157
+ readonly contentType: "application/json";
2158
+ readonly accept: "application/json";
2055
2159
  readonly inputSchema: z.ZodUndefined;
2056
2160
  readonly outputSchema: z.ZodObject<{
2057
2161
  data: z.ZodArray<z.ZodObject<{
@@ -2140,11 +2244,35 @@ declare class GetPayments extends AbstractApiRequest<typeof getPaymentsInputSche
2140
2244
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
2141
2245
  }, z.core.$strip>;
2142
2246
  readonly headersSchema: undefined;
2247
+ readonly listItemSchema: z.ZodObject<{
2248
+ id: z.ZodString;
2249
+ method: z.ZodEnum<{
2250
+ stripe: "stripe";
2251
+ bank_transfer: "bank_transfer";
2252
+ cash: "cash";
2253
+ credit_card: "credit_card";
2254
+ }>;
2255
+ status: z.ZodEnum<{
2256
+ pending: "pending";
2257
+ pending_verification: "pending_verification";
2258
+ paid: "paid";
2259
+ canceled: "canceled";
2260
+ refunded: "refunded";
2261
+ failed: "failed";
2262
+ }>;
2263
+ amount: z.ZodString;
2264
+ internalReference: z.ZodNullable<z.ZodString>;
2265
+ externalReference: z.ZodNullable<z.ZodString>;
2266
+ response: z.ZodNullable<z.ZodString>;
2267
+ validUntil: z.ZodNullable<z.ZodString>;
2268
+ createdAt: z.ZodString;
2269
+ updatedAt: z.ZodString;
2270
+ }, z.core.$strip>;
2271
+ readonly paginationDefaultEnabled = true;
2143
2272
  constructor(options?: {
2144
2273
  query?: GetPaymentsQueryParams;
2145
2274
  });
2146
2275
  getPath(): string;
2147
- parseResponse(data: unknown, rawResponse: Response): Paginated<Payment>;
2148
2276
  }
2149
2277
 
2150
2278
  type GetPaymentsForPaymentConfigQueryParams = PaymentQueryParams;
@@ -2186,9 +2314,9 @@ declare const getPaymentsForPaymentConfigResponseSchema: z.ZodObject<{
2186
2314
  }, z.core.$strip>;
2187
2315
  type GetPaymentsForPaymentConfigResponse = z.infer<typeof getPaymentsForPaymentConfigResponseSchema>;
2188
2316
  declare class GetPaymentsForPaymentConfig extends AbstractApiRequest<typeof getPaymentsForPaymentConfigInputSchema, typeof getPaymentsForPaymentConfigResponseSchema, GetPaymentsForPaymentConfigQueryParams> {
2189
- readonly method = "GET";
2190
- readonly contentType = "application/json";
2191
- readonly accept = "application/json";
2317
+ readonly method: "GET";
2318
+ readonly contentType: "application/json";
2319
+ readonly accept: "application/json";
2192
2320
  readonly inputSchema: z.ZodUndefined;
2193
2321
  readonly outputSchema: z.ZodObject<{
2194
2322
  data: z.ZodArray<z.ZodObject<{
@@ -2277,12 +2405,36 @@ declare class GetPaymentsForPaymentConfig extends AbstractApiRequest<typeof getP
2277
2405
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
2278
2406
  }, z.core.$strip>;
2279
2407
  readonly headersSchema: undefined;
2408
+ readonly listItemSchema: z.ZodObject<{
2409
+ id: z.ZodString;
2410
+ method: z.ZodEnum<{
2411
+ stripe: "stripe";
2412
+ bank_transfer: "bank_transfer";
2413
+ cash: "cash";
2414
+ credit_card: "credit_card";
2415
+ }>;
2416
+ status: z.ZodEnum<{
2417
+ pending: "pending";
2418
+ pending_verification: "pending_verification";
2419
+ paid: "paid";
2420
+ canceled: "canceled";
2421
+ refunded: "refunded";
2422
+ failed: "failed";
2423
+ }>;
2424
+ amount: z.ZodString;
2425
+ internalReference: z.ZodNullable<z.ZodString>;
2426
+ externalReference: z.ZodNullable<z.ZodString>;
2427
+ response: z.ZodNullable<z.ZodString>;
2428
+ validUntil: z.ZodNullable<z.ZodString>;
2429
+ createdAt: z.ZodString;
2430
+ updatedAt: z.ZodString;
2431
+ }, z.core.$strip>;
2432
+ readonly paginationDefaultEnabled = true;
2280
2433
  private readonly paymentConfigId;
2281
2434
  constructor(paymentConfigId: string, options?: {
2282
2435
  query?: GetPaymentsForPaymentConfigQueryParams;
2283
2436
  });
2284
2437
  getPath(): string;
2285
- parseResponse(data: unknown, rawResponse: Response): Paginated<Payment>;
2286
2438
  }
2287
2439
 
2288
2440
  declare const updatePaymentInputSchema: z.ZodObject<{
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
2
- import { Paginated } from '@deliverart/sdk-js-global-types';
3
2
  export { PaymentMethod, PaymentStatus, paymentMethodSchema, paymentMethods, paymentStatusSchema, paymentStatuses } from '@deliverart/sdk-js-global-types';
4
3
  import { z } from 'zod';
5
4
  import { AbstractApiRequest } from '@deliverart/sdk-js-core';
@@ -688,9 +687,9 @@ declare const getPaymentConfigBankTransferListResponseSchema: z.ZodObject<{
688
687
  }, z.core.$strip>;
689
688
  type GetPaymentConfigBankTransferListResponse = z.infer<typeof getPaymentConfigBankTransferListResponseSchema>;
690
689
  declare class GetPaymentConfigBankTransferList extends AbstractApiRequest<typeof getPaymentConfigBankTransferListInputSchema, typeof getPaymentConfigBankTransferListResponseSchema, GetPaymentConfigBankTransferListQueryParams> {
691
- readonly method = "GET";
692
- readonly contentType = "application/json";
693
- readonly accept = "application/json";
690
+ readonly method: "GET";
691
+ readonly contentType: "application/json";
692
+ readonly accept: "application/json";
694
693
  readonly inputSchema: z.ZodUndefined;
695
694
  readonly outputSchema: z.ZodObject<{
696
695
  data: z.ZodArray<z.ZodObject<{
@@ -742,11 +741,24 @@ declare class GetPaymentConfigBankTransferList extends AbstractApiRequest<typeof
742
741
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
743
742
  }, z.core.$strip>;
744
743
  readonly headersSchema: undefined;
744
+ readonly listItemSchema: z.ZodObject<{
745
+ id: z.ZodString;
746
+ configurationCompleted: z.ZodBoolean;
747
+ createdAt: z.ZodString;
748
+ updatedAt: z.ZodString;
749
+ method: z.ZodLiteral<"bank_transfer">;
750
+ iban: z.ZodString;
751
+ bic: z.ZodString;
752
+ accountHolder: z.ZodString;
753
+ bankName: z.ZodString;
754
+ bankAddress: z.ZodNullable<z.ZodString>;
755
+ currency: z.ZodString;
756
+ }, z.core.$strip>;
757
+ readonly paginationDefaultEnabled = true;
745
758
  constructor(options?: {
746
759
  query?: GetPaymentConfigBankTransferListQueryParams;
747
760
  });
748
761
  getPath(): string;
749
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigBankTransfer>;
750
762
  }
751
763
 
752
764
  declare const updatePaymentConfigBankTransferInputSchema: z.ZodObject<{
@@ -908,9 +920,9 @@ declare const getPaymentConfigCashListResponseSchema: z.ZodObject<{
908
920
  }, z.core.$strip>;
909
921
  type GetPaymentConfigCashListResponse = z.infer<typeof getPaymentConfigCashListResponseSchema>;
910
922
  declare class GetPaymentConfigCashList extends AbstractApiRequest<typeof getPaymentConfigCashListInputSchema, typeof getPaymentConfigCashListResponseSchema, GetPaymentConfigCashListQueryParams> {
911
- readonly method = "GET";
912
- readonly contentType = "application/json";
913
- readonly accept = "application/json";
923
+ readonly method: "GET";
924
+ readonly contentType: "application/json";
925
+ readonly accept: "application/json";
914
926
  readonly inputSchema: z.ZodUndefined;
915
927
  readonly outputSchema: z.ZodObject<{
916
928
  data: z.ZodArray<z.ZodObject<{
@@ -956,11 +968,18 @@ declare class GetPaymentConfigCashList extends AbstractApiRequest<typeof getPaym
956
968
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
957
969
  }, z.core.$strip>;
958
970
  readonly headersSchema: undefined;
971
+ readonly listItemSchema: z.ZodObject<{
972
+ id: z.ZodString;
973
+ configurationCompleted: z.ZodBoolean;
974
+ createdAt: z.ZodString;
975
+ updatedAt: z.ZodString;
976
+ method: z.ZodLiteral<"cash">;
977
+ }, z.core.$strip>;
978
+ readonly paginationDefaultEnabled = true;
959
979
  constructor(options?: {
960
980
  query?: GetPaymentConfigCashListQueryParams;
961
981
  });
962
982
  getPath(): string;
963
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigCash>;
964
983
  }
965
984
 
966
985
  declare const createPaymentConfigCreditCardInputSchema: z.ZodObject<{
@@ -1065,9 +1084,9 @@ declare const getPaymentConfigCreditCardListResponseSchema: z.ZodObject<{
1065
1084
  }, z.core.$strip>;
1066
1085
  type GetPaymentConfigCreditCardListResponse = z.infer<typeof getPaymentConfigCreditCardListResponseSchema>;
1067
1086
  declare class GetPaymentConfigCreditCardList extends AbstractApiRequest<typeof getPaymentConfigCreditCardListInputSchema, typeof getPaymentConfigCreditCardListResponseSchema, GetPaymentConfigCreditCardListQueryParams> {
1068
- readonly method = "GET";
1069
- readonly contentType = "application/json";
1070
- readonly accept = "application/json";
1087
+ readonly method: "GET";
1088
+ readonly contentType: "application/json";
1089
+ readonly accept: "application/json";
1071
1090
  readonly inputSchema: z.ZodUndefined;
1072
1091
  readonly outputSchema: z.ZodObject<{
1073
1092
  data: z.ZodArray<z.ZodObject<{
@@ -1113,11 +1132,18 @@ declare class GetPaymentConfigCreditCardList extends AbstractApiRequest<typeof g
1113
1132
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1114
1133
  }, z.core.$strip>;
1115
1134
  readonly headersSchema: undefined;
1135
+ readonly listItemSchema: z.ZodObject<{
1136
+ id: z.ZodString;
1137
+ configurationCompleted: z.ZodBoolean;
1138
+ createdAt: z.ZodString;
1139
+ updatedAt: z.ZodString;
1140
+ method: z.ZodLiteral<"credit_card">;
1141
+ }, z.core.$strip>;
1142
+ readonly paginationDefaultEnabled = true;
1116
1143
  constructor(options?: {
1117
1144
  query?: GetPaymentConfigCreditCardListQueryParams;
1118
1145
  });
1119
1146
  getPath(): string;
1120
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigCreditCard>;
1121
1147
  }
1122
1148
 
1123
1149
  declare const deletePaymentConfigInputSchema: z.ZodUndefined;
@@ -1275,9 +1301,9 @@ declare const getPaymentConfigsResponseSchema: z.ZodObject<{
1275
1301
  }, z.core.$strip>;
1276
1302
  type GetPaymentConfigsResponse = z.infer<typeof getPaymentConfigsResponseSchema>;
1277
1303
  declare class GetPaymentConfigs extends AbstractApiRequest<typeof getPaymentConfigsInputSchema, typeof getPaymentConfigsResponseSchema, GetPaymentConfigsQueryParams> {
1278
- readonly method = "GET";
1279
- readonly contentType = "application/json";
1280
- readonly accept = "application/json";
1304
+ readonly method: "GET";
1305
+ readonly contentType: "application/json";
1306
+ readonly accept: "application/json";
1281
1307
  readonly inputSchema: z.ZodUndefined;
1282
1308
  readonly outputSchema: z.ZodObject<{
1283
1309
  data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1350,11 +1376,45 @@ declare class GetPaymentConfigs extends AbstractApiRequest<typeof getPaymentConf
1350
1376
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1351
1377
  }, z.core.$strip>;
1352
1378
  readonly headersSchema: undefined;
1379
+ readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1380
+ id: z.ZodString;
1381
+ configurationCompleted: z.ZodBoolean;
1382
+ createdAt: z.ZodString;
1383
+ updatedAt: z.ZodString;
1384
+ method: z.ZodLiteral<"bank_transfer">;
1385
+ iban: z.ZodString;
1386
+ bic: z.ZodString;
1387
+ accountHolder: z.ZodString;
1388
+ bankName: z.ZodString;
1389
+ bankAddress: z.ZodNullable<z.ZodString>;
1390
+ currency: z.ZodString;
1391
+ }, z.core.$strip>, z.ZodObject<{
1392
+ id: z.ZodString;
1393
+ configurationCompleted: z.ZodBoolean;
1394
+ createdAt: z.ZodString;
1395
+ updatedAt: z.ZodString;
1396
+ method: z.ZodLiteral<"stripe">;
1397
+ secretKey: z.ZodString;
1398
+ webhookSecret: z.ZodNullable<z.ZodString>;
1399
+ webhookId: z.ZodNullable<z.ZodString>;
1400
+ }, z.core.$strip>, z.ZodObject<{
1401
+ id: z.ZodString;
1402
+ configurationCompleted: z.ZodBoolean;
1403
+ createdAt: z.ZodString;
1404
+ updatedAt: z.ZodString;
1405
+ method: z.ZodLiteral<"cash">;
1406
+ }, z.core.$strip>, z.ZodObject<{
1407
+ id: z.ZodString;
1408
+ configurationCompleted: z.ZodBoolean;
1409
+ createdAt: z.ZodString;
1410
+ updatedAt: z.ZodString;
1411
+ method: z.ZodLiteral<"credit_card">;
1412
+ }, z.core.$strip>]>;
1413
+ readonly paginationDefaultEnabled = true;
1353
1414
  constructor(options?: {
1354
1415
  query?: GetPaymentConfigsQueryParams;
1355
1416
  });
1356
1417
  getPath(): string;
1357
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfig>;
1358
1418
  }
1359
1419
 
1360
1420
  type GetPaymentConfigsFromPointOfSaleQueryParams = PaymentConfigsQueryParams;
@@ -1396,9 +1456,9 @@ declare const getPaymentConfigsFromPointOfSaleResponseSchema: z.ZodArray<z.ZodDi
1396
1456
  }, z.core.$strip>]>>;
1397
1457
  type GetPaymentConfigsFromPointOfSaleResponse = z.infer<typeof getPaymentConfigsFromPointOfSaleResponseSchema>;
1398
1458
  declare class GetPaymentConfigsFromPointOfSale extends AbstractApiRequest<typeof getPaymentConfigsFromPointOfSaleInputSchema, typeof getPaymentConfigsFromPointOfSaleResponseSchema, GetPaymentConfigsFromPointOfSaleQueryParams> {
1399
- readonly method = "GET";
1400
- readonly contentType = "application/json";
1401
- readonly accept = "application/json";
1459
+ readonly method: "GET";
1460
+ readonly contentType: "application/json";
1461
+ readonly accept: "application/json";
1402
1462
  readonly inputSchema: z.ZodUndefined;
1403
1463
  readonly outputSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1404
1464
  id: z.ZodString;
@@ -1461,12 +1521,46 @@ declare class GetPaymentConfigsFromPointOfSale extends AbstractApiRequest<typeof
1461
1521
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1462
1522
  }, z.core.$strip>;
1463
1523
  readonly headersSchema: undefined;
1524
+ readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1525
+ id: z.ZodString;
1526
+ configurationCompleted: z.ZodBoolean;
1527
+ createdAt: z.ZodString;
1528
+ updatedAt: z.ZodString;
1529
+ method: z.ZodLiteral<"bank_transfer">;
1530
+ iban: z.ZodString;
1531
+ bic: z.ZodString;
1532
+ accountHolder: z.ZodString;
1533
+ bankName: z.ZodString;
1534
+ bankAddress: z.ZodNullable<z.ZodString>;
1535
+ currency: z.ZodString;
1536
+ }, z.core.$strip>, z.ZodObject<{
1537
+ id: z.ZodString;
1538
+ configurationCompleted: z.ZodBoolean;
1539
+ createdAt: z.ZodString;
1540
+ updatedAt: z.ZodString;
1541
+ method: z.ZodLiteral<"stripe">;
1542
+ secretKey: z.ZodString;
1543
+ webhookSecret: z.ZodNullable<z.ZodString>;
1544
+ webhookId: z.ZodNullable<z.ZodString>;
1545
+ }, z.core.$strip>, z.ZodObject<{
1546
+ id: z.ZodString;
1547
+ configurationCompleted: z.ZodBoolean;
1548
+ createdAt: z.ZodString;
1549
+ updatedAt: z.ZodString;
1550
+ method: z.ZodLiteral<"cash">;
1551
+ }, z.core.$strip>, z.ZodObject<{
1552
+ id: z.ZodString;
1553
+ configurationCompleted: z.ZodBoolean;
1554
+ createdAt: z.ZodString;
1555
+ updatedAt: z.ZodString;
1556
+ method: z.ZodLiteral<"credit_card">;
1557
+ }, z.core.$strip>]>;
1558
+ readonly paginationDefaultEnabled = false;
1464
1559
  private readonly pointOfSaleId;
1465
1560
  constructor(pointOfSaleId: string, options?: {
1466
1561
  query?: GetPaymentConfigsFromPointOfSaleQueryParams;
1467
1562
  });
1468
1563
  getPath(): string;
1469
- parseResponse(data: unknown): PaymentConfig[];
1470
1564
  }
1471
1565
 
1472
1566
  declare const createPaymentConfigStripeInputSchema: z.ZodObject<{
@@ -1588,9 +1682,9 @@ declare const getPaymentConfigStripeListResponseSchema: z.ZodObject<{
1588
1682
  }, z.core.$strip>;
1589
1683
  type GetPaymentConfigStripeListResponse = z.infer<typeof getPaymentConfigStripeListResponseSchema>;
1590
1684
  declare class GetPaymentConfigStripeList extends AbstractApiRequest<typeof getPaymentConfigStripeListInputSchema, typeof getPaymentConfigStripeListResponseSchema, GetPaymentConfigStripeListQueryParams> {
1591
- readonly method = "GET";
1592
- readonly contentType = "application/json";
1593
- readonly accept = "application/json";
1685
+ readonly method: "GET";
1686
+ readonly contentType: "application/json";
1687
+ readonly accept: "application/json";
1594
1688
  readonly inputSchema: z.ZodUndefined;
1595
1689
  readonly outputSchema: z.ZodObject<{
1596
1690
  data: z.ZodArray<z.ZodObject<{
@@ -1639,11 +1733,21 @@ declare class GetPaymentConfigStripeList extends AbstractApiRequest<typeof getPa
1639
1733
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
1640
1734
  }, z.core.$strip>;
1641
1735
  readonly headersSchema: undefined;
1736
+ readonly listItemSchema: z.ZodObject<{
1737
+ id: z.ZodString;
1738
+ configurationCompleted: z.ZodBoolean;
1739
+ createdAt: z.ZodString;
1740
+ updatedAt: z.ZodString;
1741
+ method: z.ZodLiteral<"stripe">;
1742
+ secretKey: z.ZodString;
1743
+ webhookSecret: z.ZodNullable<z.ZodString>;
1744
+ webhookId: z.ZodNullable<z.ZodString>;
1745
+ }, z.core.$strip>;
1746
+ readonly paginationDefaultEnabled = true;
1642
1747
  constructor(options?: {
1643
1748
  query?: GetPaymentConfigStripeListQueryParams;
1644
1749
  });
1645
1750
  getPath(): string;
1646
- parseResponse(data: unknown, rawResponse: Response): Paginated<PaymentConfigStripe>;
1647
1751
  }
1648
1752
 
1649
1753
  declare const updatePaymentConfigStripeInputSchema: z.ZodObject<{
@@ -2049,9 +2153,9 @@ declare const getPaymentsResponseSchema: z.ZodObject<{
2049
2153
  }, z.core.$strip>;
2050
2154
  type GetPaymentsResponse = z.infer<typeof getPaymentsResponseSchema>;
2051
2155
  declare class GetPayments extends AbstractApiRequest<typeof getPaymentsInputSchema, typeof getPaymentsResponseSchema, GetPaymentsQueryParams> {
2052
- readonly method = "GET";
2053
- readonly contentType = "application/json";
2054
- readonly accept = "application/json";
2156
+ readonly method: "GET";
2157
+ readonly contentType: "application/json";
2158
+ readonly accept: "application/json";
2055
2159
  readonly inputSchema: z.ZodUndefined;
2056
2160
  readonly outputSchema: z.ZodObject<{
2057
2161
  data: z.ZodArray<z.ZodObject<{
@@ -2140,11 +2244,35 @@ declare class GetPayments extends AbstractApiRequest<typeof getPaymentsInputSche
2140
2244
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
2141
2245
  }, z.core.$strip>;
2142
2246
  readonly headersSchema: undefined;
2247
+ readonly listItemSchema: z.ZodObject<{
2248
+ id: z.ZodString;
2249
+ method: z.ZodEnum<{
2250
+ stripe: "stripe";
2251
+ bank_transfer: "bank_transfer";
2252
+ cash: "cash";
2253
+ credit_card: "credit_card";
2254
+ }>;
2255
+ status: z.ZodEnum<{
2256
+ pending: "pending";
2257
+ pending_verification: "pending_verification";
2258
+ paid: "paid";
2259
+ canceled: "canceled";
2260
+ refunded: "refunded";
2261
+ failed: "failed";
2262
+ }>;
2263
+ amount: z.ZodString;
2264
+ internalReference: z.ZodNullable<z.ZodString>;
2265
+ externalReference: z.ZodNullable<z.ZodString>;
2266
+ response: z.ZodNullable<z.ZodString>;
2267
+ validUntil: z.ZodNullable<z.ZodString>;
2268
+ createdAt: z.ZodString;
2269
+ updatedAt: z.ZodString;
2270
+ }, z.core.$strip>;
2271
+ readonly paginationDefaultEnabled = true;
2143
2272
  constructor(options?: {
2144
2273
  query?: GetPaymentsQueryParams;
2145
2274
  });
2146
2275
  getPath(): string;
2147
- parseResponse(data: unknown, rawResponse: Response): Paginated<Payment>;
2148
2276
  }
2149
2277
 
2150
2278
  type GetPaymentsForPaymentConfigQueryParams = PaymentQueryParams;
@@ -2186,9 +2314,9 @@ declare const getPaymentsForPaymentConfigResponseSchema: z.ZodObject<{
2186
2314
  }, z.core.$strip>;
2187
2315
  type GetPaymentsForPaymentConfigResponse = z.infer<typeof getPaymentsForPaymentConfigResponseSchema>;
2188
2316
  declare class GetPaymentsForPaymentConfig extends AbstractApiRequest<typeof getPaymentsForPaymentConfigInputSchema, typeof getPaymentsForPaymentConfigResponseSchema, GetPaymentsForPaymentConfigQueryParams> {
2189
- readonly method = "GET";
2190
- readonly contentType = "application/json";
2191
- readonly accept = "application/json";
2317
+ readonly method: "GET";
2318
+ readonly contentType: "application/json";
2319
+ readonly accept: "application/json";
2192
2320
  readonly inputSchema: z.ZodUndefined;
2193
2321
  readonly outputSchema: z.ZodObject<{
2194
2322
  data: z.ZodArray<z.ZodObject<{
@@ -2277,12 +2405,36 @@ declare class GetPaymentsForPaymentConfig extends AbstractApiRequest<typeof getP
2277
2405
  'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
2278
2406
  }, z.core.$strip>;
2279
2407
  readonly headersSchema: undefined;
2408
+ readonly listItemSchema: z.ZodObject<{
2409
+ id: z.ZodString;
2410
+ method: z.ZodEnum<{
2411
+ stripe: "stripe";
2412
+ bank_transfer: "bank_transfer";
2413
+ cash: "cash";
2414
+ credit_card: "credit_card";
2415
+ }>;
2416
+ status: z.ZodEnum<{
2417
+ pending: "pending";
2418
+ pending_verification: "pending_verification";
2419
+ paid: "paid";
2420
+ canceled: "canceled";
2421
+ refunded: "refunded";
2422
+ failed: "failed";
2423
+ }>;
2424
+ amount: z.ZodString;
2425
+ internalReference: z.ZodNullable<z.ZodString>;
2426
+ externalReference: z.ZodNullable<z.ZodString>;
2427
+ response: z.ZodNullable<z.ZodString>;
2428
+ validUntil: z.ZodNullable<z.ZodString>;
2429
+ createdAt: z.ZodString;
2430
+ updatedAt: z.ZodString;
2431
+ }, z.core.$strip>;
2432
+ readonly paginationDefaultEnabled = true;
2280
2433
  private readonly paymentConfigId;
2281
2434
  constructor(paymentConfigId: string, options?: {
2282
2435
  query?: GetPaymentsForPaymentConfigQueryParams;
2283
2436
  });
2284
2437
  getPath(): string;
2285
- parseResponse(data: unknown, rawResponse: Response): Paginated<Payment>;
2286
2438
  }
2287
2439
 
2288
2440
  declare const updatePaymentInputSchema: z.ZodObject<{
package/dist/index.js CHANGED
@@ -11423,10 +11423,7 @@ var GetPaymentConfigBankTransferDetails = class extends AbstractApiRequest3 {
11423
11423
 
11424
11424
  // src/requests/payment-configs/bank-transfer/GetPaymentConfigBankTransferList.ts
11425
11425
  import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
11426
- import {
11427
- createPaginatedSchema,
11428
- responseToPagination
11429
- } from "@deliverart/sdk-js-global-types";
11426
+ import { createPaginatedSchema } from "@deliverart/sdk-js-global-types";
11430
11427
  var getPaymentConfigBankTransferListInputSchema = external_exports.undefined();
11431
11428
  var getPaymentConfigBankTransferListResponseSchema = createPaginatedSchema(
11432
11429
  paymentConfigBankTransferSchema
@@ -11441,14 +11438,12 @@ var GetPaymentConfigBankTransferList = class extends AbstractApiRequest4 {
11441
11438
  this.outputSchema = getPaymentConfigBankTransferListResponseSchema;
11442
11439
  this.querySchema = paymentConfigsQuerySchema;
11443
11440
  this.headersSchema = void 0;
11441
+ this.listItemSchema = paymentConfigBankTransferSchema;
11442
+ this.paginationDefaultEnabled = true;
11444
11443
  }
11445
11444
  getPath() {
11446
11445
  return "/payment_configs/bank_transfer";
11447
11446
  }
11448
- parseResponse(data, rawResponse) {
11449
- const payments = external_exports.array(paymentConfigBankTransferSchema).parse(data);
11450
- return this.validateOutput({ data: payments, pagination: responseToPagination(rawResponse) });
11451
- }
11452
11447
  };
11453
11448
 
11454
11449
  // src/requests/payment-configs/bank-transfer/UpdatePaymentConfigBankTransfer.ts
@@ -11539,10 +11534,7 @@ var GetPaymentConfigCashDetails = class extends AbstractApiRequest8 {
11539
11534
 
11540
11535
  // src/requests/payment-configs/cash/GetPaymentConfigCashList.ts
11541
11536
  import { AbstractApiRequest as AbstractApiRequest9 } from "@deliverart/sdk-js-core";
11542
- import {
11543
- createPaginatedSchema as createPaginatedSchema2,
11544
- responseToPagination as responseToPagination2
11545
- } from "@deliverart/sdk-js-global-types";
11537
+ import { createPaginatedSchema as createPaginatedSchema2 } from "@deliverart/sdk-js-global-types";
11546
11538
  var getPaymentConfigCashListInputSchema = external_exports.undefined();
11547
11539
  var getPaymentConfigCashListResponseSchema = createPaginatedSchema2(paymentConfigCashSchema);
11548
11540
  var GetPaymentConfigCashList = class extends AbstractApiRequest9 {
@@ -11555,14 +11547,12 @@ var GetPaymentConfigCashList = class extends AbstractApiRequest9 {
11555
11547
  this.outputSchema = getPaymentConfigCashListResponseSchema;
11556
11548
  this.querySchema = paymentConfigsQuerySchema;
11557
11549
  this.headersSchema = void 0;
11550
+ this.listItemSchema = paymentConfigCashSchema;
11551
+ this.paginationDefaultEnabled = true;
11558
11552
  }
11559
11553
  getPath() {
11560
11554
  return "/payment_configs/cash";
11561
11555
  }
11562
- parseResponse(data, rawResponse) {
11563
- const payments = external_exports.array(paymentConfigCashSchema).parse(data);
11564
- return this.validateOutput({ data: payments, pagination: responseToPagination2(rawResponse) });
11565
- }
11566
11556
  };
11567
11557
 
11568
11558
  // src/requests/payment-configs/credit-card/CreatePaymentConfigCreditCard.ts
@@ -11630,10 +11620,7 @@ var GetPaymentConfigCreditCardDetails = class extends AbstractApiRequest12 {
11630
11620
 
11631
11621
  // src/requests/payment-configs/credit-card/GetPaymentConfigCreditCardList.ts
11632
11622
  import { AbstractApiRequest as AbstractApiRequest13 } from "@deliverart/sdk-js-core";
11633
- import {
11634
- createPaginatedSchema as createPaginatedSchema3,
11635
- responseToPagination as responseToPagination3
11636
- } from "@deliverart/sdk-js-global-types";
11623
+ import { createPaginatedSchema as createPaginatedSchema3 } from "@deliverart/sdk-js-global-types";
11637
11624
  var getPaymentConfigCreditCardListInputSchema = external_exports.undefined();
11638
11625
  var getPaymentConfigCreditCardListResponseSchema = createPaginatedSchema3(
11639
11626
  paymentConfigCreditCardSchema
@@ -11648,14 +11635,12 @@ var GetPaymentConfigCreditCardList = class extends AbstractApiRequest13 {
11648
11635
  this.outputSchema = getPaymentConfigCreditCardListResponseSchema;
11649
11636
  this.querySchema = paymentConfigsQuerySchema;
11650
11637
  this.headersSchema = void 0;
11638
+ this.listItemSchema = paymentConfigCreditCardSchema;
11639
+ this.paginationDefaultEnabled = true;
11651
11640
  }
11652
11641
  getPath() {
11653
11642
  return "/payment_configs/credit_card";
11654
11643
  }
11655
- parseResponse(data, rawResponse) {
11656
- const payments = external_exports.array(paymentConfigCreditCardSchema).parse(data);
11657
- return this.validateOutput({ data: payments, pagination: responseToPagination3(rawResponse) });
11658
- }
11659
11644
  };
11660
11645
 
11661
11646
  // src/requests/payment-configs/DeletePaymentConfig.ts
@@ -11703,10 +11688,7 @@ var GetPaymentConfigDetails = class extends AbstractApiRequest15 {
11703
11688
 
11704
11689
  // src/requests/payment-configs/GetPaymentConfigs.ts
11705
11690
  import { AbstractApiRequest as AbstractApiRequest16 } from "@deliverart/sdk-js-core";
11706
- import {
11707
- createPaginatedSchema as createPaginatedSchema4,
11708
- responseToPagination as responseToPagination4
11709
- } from "@deliverart/sdk-js-global-types";
11691
+ import { createPaginatedSchema as createPaginatedSchema4 } from "@deliverart/sdk-js-global-types";
11710
11692
  var getPaymentConfigsInputSchema = external_exports.undefined();
11711
11693
  var getPaymentConfigsResponseSchema = createPaginatedSchema4(paymentConfigSchema);
11712
11694
  var GetPaymentConfigs = class extends AbstractApiRequest16 {
@@ -11719,14 +11701,12 @@ var GetPaymentConfigs = class extends AbstractApiRequest16 {
11719
11701
  this.outputSchema = getPaymentConfigsResponseSchema;
11720
11702
  this.querySchema = paymentConfigsQuerySchema;
11721
11703
  this.headersSchema = void 0;
11704
+ this.listItemSchema = paymentConfigSchema;
11705
+ this.paginationDefaultEnabled = true;
11722
11706
  }
11723
11707
  getPath() {
11724
11708
  return "/payment_configs";
11725
11709
  }
11726
- parseResponse(data, rawResponse) {
11727
- const payments = external_exports.array(paymentConfigSchema).parse(data);
11728
- return this.validateOutput({ data: payments, pagination: responseToPagination4(rawResponse) });
11729
- }
11730
11710
  };
11731
11711
 
11732
11712
  // src/requests/payment-configs/GetPaymentConfigsFromPointOfSale.ts
@@ -11743,14 +11723,13 @@ var GetPaymentConfigsFromPointOfSale = class extends AbstractApiRequest17 {
11743
11723
  this.outputSchema = getPaymentConfigsFromPointOfSaleResponseSchema;
11744
11724
  this.querySchema = paymentConfigsQuerySchema;
11745
11725
  this.headersSchema = void 0;
11726
+ this.listItemSchema = paymentConfigSchema;
11727
+ this.paginationDefaultEnabled = false;
11746
11728
  this.pointOfSaleId = pointOfSaleId;
11747
11729
  }
11748
11730
  getPath() {
11749
11731
  return `/point_of_sales/${this.pointOfSaleId}/payment_configs`;
11750
11732
  }
11751
- parseResponse(data) {
11752
- return external_exports.array(paymentConfigSchema).parse(data);
11753
- }
11754
11733
  };
11755
11734
 
11756
11735
  // src/requests/payment-configs/stripe/CreatePaymentConfigStripe.ts
@@ -11818,10 +11797,7 @@ var GetPaymentConfigStripeDetails = class extends AbstractApiRequest20 {
11818
11797
 
11819
11798
  // src/requests/payment-configs/stripe/GetPaymentConfigStripeList.ts
11820
11799
  import { AbstractApiRequest as AbstractApiRequest21 } from "@deliverart/sdk-js-core";
11821
- import {
11822
- createPaginatedSchema as createPaginatedSchema5,
11823
- responseToPagination as responseToPagination5
11824
- } from "@deliverart/sdk-js-global-types";
11800
+ import { createPaginatedSchema as createPaginatedSchema5 } from "@deliverart/sdk-js-global-types";
11825
11801
  var getPaymentConfigStripeListInputSchema = external_exports.undefined();
11826
11802
  var getPaymentConfigStripeListResponseSchema = createPaginatedSchema5(paymentConfigStripeSchema);
11827
11803
  var GetPaymentConfigStripeList = class extends AbstractApiRequest21 {
@@ -11834,14 +11810,12 @@ var GetPaymentConfigStripeList = class extends AbstractApiRequest21 {
11834
11810
  this.outputSchema = getPaymentConfigStripeListResponseSchema;
11835
11811
  this.querySchema = paymentConfigsQuerySchema;
11836
11812
  this.headersSchema = void 0;
11813
+ this.listItemSchema = paymentConfigStripeSchema;
11814
+ this.paginationDefaultEnabled = true;
11837
11815
  }
11838
11816
  getPath() {
11839
11817
  return "/payment_configs/stripe";
11840
11818
  }
11841
- parseResponse(data, rawResponse) {
11842
- const payments = external_exports.array(paymentConfigStripeSchema).parse(data);
11843
- return this.validateOutput({ data: payments, pagination: responseToPagination5(rawResponse) });
11844
- }
11845
11819
  };
11846
11820
 
11847
11821
  // src/requests/payment-configs/stripe/UpdatePaymentConfigStripe.ts
@@ -11933,10 +11907,7 @@ var GetPaymentInfo = class extends AbstractApiRequest25 {
11933
11907
 
11934
11908
  // src/requests/payments/GetPayments.ts
11935
11909
  import { AbstractApiRequest as AbstractApiRequest26 } from "@deliverart/sdk-js-core";
11936
- import {
11937
- createPaginatedSchema as createPaginatedSchema6,
11938
- responseToPagination as responseToPagination6
11939
- } from "@deliverart/sdk-js-global-types";
11910
+ import { createPaginatedSchema as createPaginatedSchema6 } from "@deliverart/sdk-js-global-types";
11940
11911
  var getPaymentsInputSchema = external_exports.undefined();
11941
11912
  var getPaymentsResponseSchema = createPaginatedSchema6(paymentSchema);
11942
11913
  var GetPayments = class extends AbstractApiRequest26 {
@@ -11949,22 +11920,17 @@ var GetPayments = class extends AbstractApiRequest26 {
11949
11920
  this.outputSchema = getPaymentsResponseSchema;
11950
11921
  this.querySchema = paymentQuerySchema;
11951
11922
  this.headersSchema = void 0;
11923
+ this.listItemSchema = paymentSchema;
11924
+ this.paginationDefaultEnabled = true;
11952
11925
  }
11953
11926
  getPath() {
11954
11927
  return "/payments";
11955
11928
  }
11956
- parseResponse(data, rawResponse) {
11957
- const payments = external_exports.array(paymentSchema).parse(data);
11958
- return this.validateOutput({ data: payments, pagination: responseToPagination6(rawResponse) });
11959
- }
11960
11929
  };
11961
11930
 
11962
11931
  // src/requests/payments/GetPaymentsForPaymentConfig.ts
11963
11932
  import { AbstractApiRequest as AbstractApiRequest27 } from "@deliverart/sdk-js-core";
11964
- import {
11965
- createPaginatedSchema as createPaginatedSchema7,
11966
- responseToPagination as responseToPagination7
11967
- } from "@deliverart/sdk-js-global-types";
11933
+ import { createPaginatedSchema as createPaginatedSchema7 } from "@deliverart/sdk-js-global-types";
11968
11934
  var getPaymentsForPaymentConfigInputSchema = external_exports.undefined();
11969
11935
  var getPaymentsForPaymentConfigResponseSchema = createPaginatedSchema7(paymentSchema);
11970
11936
  var GetPaymentsForPaymentConfig = class extends AbstractApiRequest27 {
@@ -11977,15 +11943,13 @@ var GetPaymentsForPaymentConfig = class extends AbstractApiRequest27 {
11977
11943
  this.outputSchema = getPaymentsForPaymentConfigResponseSchema;
11978
11944
  this.querySchema = paymentQuerySchema;
11979
11945
  this.headersSchema = void 0;
11946
+ this.listItemSchema = paymentSchema;
11947
+ this.paginationDefaultEnabled = true;
11980
11948
  this.paymentConfigId = paymentConfigId;
11981
11949
  }
11982
11950
  getPath() {
11983
11951
  return `/payment_configs/${this.paymentConfigId}/payments`;
11984
11952
  }
11985
- parseResponse(data, rawResponse) {
11986
- const payments = external_exports.array(paymentSchema).parse(data);
11987
- return this.validateOutput({ data: payments, pagination: responseToPagination7(rawResponse) });
11988
- }
11989
11953
  };
11990
11954
 
11991
11955
  // src/requests/payments/UpdatePayment.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-payment",
3
3
  "description": "Deliverart JavaScript SDK for Payment Management",
4
- "version": "2.5.33",
4
+ "version": "2.6.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,9 +18,9 @@
18
18
  "dist"
19
19
  ],
20
20
  "dependencies": {
21
- "@deliverart/sdk-js-core": "2.5.33",
22
- "@deliverart/sdk-js-global-types": "2.5.33",
23
- "@deliverart/sdk-js-point-of-sale": "2.5.33"
21
+ "@deliverart/sdk-js-core": "2.6.0",
22
+ "@deliverart/sdk-js-point-of-sale": "2.6.0",
23
+ "@deliverart/sdk-js-global-types": "2.6.0"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"