@wix/payments 1.0.21 → 1.0.23

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.
@@ -296,7 +296,7 @@ interface UpdatePartnerFlowResponseNonNullableFields {
296
296
  onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
297
297
  }
298
298
 
299
- type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
299
+ type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
300
300
  getUrl: (context: any) => string;
301
301
  httpMethod: K;
302
302
  path: string;
@@ -306,17 +306,17 @@ type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown,
306
306
  __responseType: Q;
307
307
  __originalResponseType: R;
308
308
  };
309
- declare function getOnboardingAvailability(): __PublicMethodMetaInfo$2<'GET', {}, GetOnboardingAvailabilityRequest, GetOnboardingAvailabilityRequest$1, GetOnboardingAvailabilityResponse & GetOnboardingAvailabilityResponseNonNullableFields, GetOnboardingAvailabilityResponse$1 & GetOnboardingAvailabilityResponseNonNullableFields$1>;
310
- declare function updateCbdFlow(): __PublicMethodMetaInfo$2<'PATCH', {}, UpdateCbdFlowRequest, UpdateCbdFlowRequest$1, UpdateCbdFlowResponse & UpdateCbdFlowResponseNonNullableFields, UpdateCbdFlowResponse$1 & UpdateCbdFlowResponseNonNullableFields$1>;
311
- declare function updateRestrictedGoodsFlow(): __PublicMethodMetaInfo$2<'PATCH', {}, UpdateRestrictedGoodsFlowRequest, UpdateRestrictedGoodsFlowRequest$1, UpdateRestrictedGoodsFlowResponse & UpdateRestrictedGoodsFlowResponseNonNullableFields, UpdateRestrictedGoodsFlowResponse$1 & UpdateRestrictedGoodsFlowResponseNonNullableFields$1>;
312
- declare function updatePartnerFlow(): __PublicMethodMetaInfo$2<'PATCH', {}, UpdatePartnerFlowRequest, UpdatePartnerFlowRequest$1, UpdatePartnerFlowResponse & UpdatePartnerFlowResponseNonNullableFields, UpdatePartnerFlowResponse$1 & UpdatePartnerFlowResponseNonNullableFields$1>;
309
+ declare function getOnboardingAvailability(): __PublicMethodMetaInfo$3<'GET', {}, GetOnboardingAvailabilityRequest, GetOnboardingAvailabilityRequest$1, GetOnboardingAvailabilityResponse & GetOnboardingAvailabilityResponseNonNullableFields, GetOnboardingAvailabilityResponse$1 & GetOnboardingAvailabilityResponseNonNullableFields$1>;
310
+ declare function updateCbdFlow(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdateCbdFlowRequest, UpdateCbdFlowRequest$1, UpdateCbdFlowResponse & UpdateCbdFlowResponseNonNullableFields, UpdateCbdFlowResponse$1 & UpdateCbdFlowResponseNonNullableFields$1>;
311
+ declare function updateRestrictedGoodsFlow(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdateRestrictedGoodsFlowRequest, UpdateRestrictedGoodsFlowRequest$1, UpdateRestrictedGoodsFlowResponse & UpdateRestrictedGoodsFlowResponseNonNullableFields, UpdateRestrictedGoodsFlowResponse$1 & UpdateRestrictedGoodsFlowResponseNonNullableFields$1>;
312
+ declare function updatePartnerFlow(): __PublicMethodMetaInfo$3<'PATCH', {}, UpdatePartnerFlowRequest, UpdatePartnerFlowRequest$1, UpdatePartnerFlowResponse & UpdatePartnerFlowResponseNonNullableFields, UpdatePartnerFlowResponse$1 & UpdatePartnerFlowResponseNonNullableFields$1>;
313
313
 
314
- declare const meta$2_getOnboardingAvailability: typeof getOnboardingAvailability;
315
- declare const meta$2_updateCbdFlow: typeof updateCbdFlow;
316
- declare const meta$2_updatePartnerFlow: typeof updatePartnerFlow;
317
- declare const meta$2_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
318
- declare namespace meta$2 {
319
- export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_getOnboardingAvailability as getOnboardingAvailability, meta$2_updateCbdFlow as updateCbdFlow, meta$2_updatePartnerFlow as updatePartnerFlow, meta$2_updateRestrictedGoodsFlow as updateRestrictedGoodsFlow };
314
+ declare const meta$3_getOnboardingAvailability: typeof getOnboardingAvailability;
315
+ declare const meta$3_updateCbdFlow: typeof updateCbdFlow;
316
+ declare const meta$3_updatePartnerFlow: typeof updatePartnerFlow;
317
+ declare const meta$3_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
318
+ declare namespace meta$3 {
319
+ export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_getOnboardingAvailability as getOnboardingAvailability, meta$3_updateCbdFlow as updateCbdFlow, meta$3_updatePartnerFlow as updatePartnerFlow, meta$3_updateRestrictedGoodsFlow as updateRestrictedGoodsFlow };
320
320
  }
321
321
 
322
322
  /** Provider platform event */
@@ -497,7 +497,7 @@ interface SubmitEventRequest {
497
497
  interface SubmitEventResponse {
498
498
  }
499
499
 
500
- type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
500
+ type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
501
501
  getUrl: (context: any) => string;
502
502
  httpMethod: K;
503
503
  path: string;
@@ -507,16 +507,16 @@ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown,
507
507
  __responseType: Q;
508
508
  __originalResponseType: R;
509
509
  };
510
- declare function submitEvent(): __PublicMethodMetaInfo$1<'POST', {}, SubmitEventRequest, SubmitEventRequest$1, SubmitEventResponse, SubmitEventResponse$1>;
510
+ declare function submitEvent(): __PublicMethodMetaInfo$2<'POST', {}, SubmitEventRequest, SubmitEventRequest$1, SubmitEventResponse, SubmitEventResponse$1>;
511
511
 
512
- declare const meta$1_submitEvent: typeof submitEvent;
513
- declare namespace meta$1 {
514
- export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_submitEvent as submitEvent };
512
+ declare const meta$2_submitEvent: typeof submitEvent;
513
+ declare namespace meta$2 {
514
+ export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_submitEvent as submitEvent };
515
515
  }
516
516
 
517
517
  /**
518
518
  * A refund a record of an attempt of
519
- * returning funds for a charge from a merchant to a customer to who has made a purchase.
519
+ * returning funds for a charge from a merchant to a buyer who has made a purchase.
520
520
  * Read more about refunds in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction>).
521
521
  */
522
522
  interface Refund$1 {
@@ -543,13 +543,13 @@ interface Refund$1 {
543
543
  */
544
544
  updatedDate?: Date | null;
545
545
  /** Data Extensions */
546
- extendedFields?: ExtendedFields$1;
546
+ extendedFields?: ExtendedFields$3;
547
547
  /** ID of charge for which the funds are returned by this refund. */
548
548
  chargeId?: string | null;
549
549
  /** Currency of refund, should be the same as currency of charge. */
550
550
  currency?: string | null;
551
551
  /**
552
- * Amount of refund in base units, what's returned to the customer.
552
+ * Amount of refund in base units, what's returned to the buyer.
553
553
  * E.g. "12.95".
554
554
  */
555
555
  amount?: string | null;
@@ -600,7 +600,7 @@ interface Refund$1 {
600
600
  /** Optional free-text note about this refund. */
601
601
  note?: string | null;
602
602
  }
603
- interface ExtendedFields$1 {
603
+ interface ExtendedFields$3 {
604
604
  /**
605
605
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
606
606
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -680,7 +680,7 @@ interface QueryRefundsRequest$1 {
680
680
  }
681
681
  interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
682
682
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
683
- cursorPaging?: CursorPaging$1;
683
+ cursorPaging?: CursorPaging$3;
684
684
  /**
685
685
  * Filter object in the following format:
686
686
  * `"filter" : {
@@ -699,7 +699,7 @@ interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
699
699
  /** @oneof */
700
700
  interface CursorQueryPagingMethodOneOf$1 {
701
701
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
702
- cursorPaging?: CursorPaging$1;
702
+ cursorPaging?: CursorPaging$3;
703
703
  }
704
704
  interface Sorting$1 {
705
705
  /** Name of the field to sort by. */
@@ -711,7 +711,7 @@ declare enum SortOrder$1 {
711
711
  ASC = "ASC",
712
712
  DESC = "DESC"
713
713
  }
714
- interface CursorPaging$1 {
714
+ interface CursorPaging$3 {
715
715
  /** Number of items to load. */
716
716
  limit?: number | null;
717
717
  /**
@@ -727,13 +727,13 @@ interface QueryRefundsResponse$1 {
727
727
  /** List of refunds. */
728
728
  refunds?: Refund$1[];
729
729
  /** Paging metadata */
730
- pagingMetadata?: CursorPagingMetadata$1;
730
+ pagingMetadata?: CursorPagingMetadata$3;
731
731
  }
732
- interface CursorPagingMetadata$1 {
732
+ interface CursorPagingMetadata$3 {
733
733
  /** Number of items returned in the response. */
734
734
  count?: number | null;
735
735
  /** Offset that was requested. */
736
- cursors?: Cursors$1;
736
+ cursors?: Cursors$3;
737
737
  /**
738
738
  * Indicates if there are more results after the current page.
739
739
  * If `true`, another page of results can be retrieved.
@@ -741,7 +741,7 @@ interface CursorPagingMetadata$1 {
741
741
  */
742
742
  hasNext?: boolean | null;
743
743
  }
744
- interface Cursors$1 {
744
+ interface Cursors$3 {
745
745
  /** Cursor pointing to next page in the list of results. */
746
746
  next?: string | null;
747
747
  /** Cursor pointing to previous page in the list of results. */
@@ -883,7 +883,7 @@ interface GetRefundabilityResponseNonNullableFields$1 {
883
883
 
884
884
  /**
885
885
  * A refund a record of an attempt of
886
- * returning funds for a charge from a merchant to a customer to who has made a purchase.
886
+ * returning funds for a charge from a merchant to a buyer who has made a purchase.
887
887
  * Read more about refunds in this [article](<https://dev.wix.com/docs/rest/business-management/payments/refunds/introduction>).
888
888
  */
889
889
  interface Refund {
@@ -910,13 +910,13 @@ interface Refund {
910
910
  */
911
911
  _updatedDate?: Date | null;
912
912
  /** Data Extensions */
913
- extendedFields?: ExtendedFields;
913
+ extendedFields?: ExtendedFields$2;
914
914
  /** ID of charge for which the funds are returned by this refund. */
915
915
  chargeId?: string | null;
916
916
  /** Currency of refund, should be the same as currency of charge. */
917
917
  currency?: string | null;
918
918
  /**
919
- * Amount of refund in base units, what's returned to the customer.
919
+ * Amount of refund in base units, what's returned to the buyer.
920
920
  * E.g. "12.95".
921
921
  */
922
922
  amount?: string | null;
@@ -967,7 +967,7 @@ interface Refund {
967
967
  /** Optional free-text note about this refund. */
968
968
  note?: string | null;
969
969
  }
970
- interface ExtendedFields {
970
+ interface ExtendedFields$2 {
971
971
  /**
972
972
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
973
973
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -1047,7 +1047,7 @@ interface QueryRefundsRequest {
1047
1047
  }
1048
1048
  interface CursorQuery extends CursorQueryPagingMethodOneOf {
1049
1049
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1050
- cursorPaging?: CursorPaging;
1050
+ cursorPaging?: CursorPaging$2;
1051
1051
  /**
1052
1052
  * Filter object in the following format:
1053
1053
  * `"filter" : {
@@ -1066,7 +1066,7 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
1066
1066
  /** @oneof */
1067
1067
  interface CursorQueryPagingMethodOneOf {
1068
1068
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1069
- cursorPaging?: CursorPaging;
1069
+ cursorPaging?: CursorPaging$2;
1070
1070
  }
1071
1071
  interface Sorting {
1072
1072
  /** Name of the field to sort by. */
@@ -1078,7 +1078,7 @@ declare enum SortOrder {
1078
1078
  ASC = "ASC",
1079
1079
  DESC = "DESC"
1080
1080
  }
1081
- interface CursorPaging {
1081
+ interface CursorPaging$2 {
1082
1082
  /** Number of items to load. */
1083
1083
  limit?: number | null;
1084
1084
  /**
@@ -1094,13 +1094,13 @@ interface QueryRefundsResponse {
1094
1094
  /** List of refunds. */
1095
1095
  refunds?: Refund[];
1096
1096
  /** Paging metadata */
1097
- pagingMetadata?: CursorPagingMetadata;
1097
+ pagingMetadata?: CursorPagingMetadata$2;
1098
1098
  }
1099
- interface CursorPagingMetadata {
1099
+ interface CursorPagingMetadata$2 {
1100
1100
  /** Number of items returned in the response. */
1101
1101
  count?: number | null;
1102
1102
  /** Offset that was requested. */
1103
- cursors?: Cursors;
1103
+ cursors?: Cursors$2;
1104
1104
  /**
1105
1105
  * Indicates if there are more results after the current page.
1106
1106
  * If `true`, another page of results can be retrieved.
@@ -1108,7 +1108,7 @@ interface CursorPagingMetadata {
1108
1108
  */
1109
1109
  hasNext?: boolean | null;
1110
1110
  }
1111
- interface Cursors {
1111
+ interface Cursors$2 {
1112
1112
  /** Cursor pointing to next page in the list of results. */
1113
1113
  next?: string | null;
1114
1114
  /** Cursor pointing to previous page in the list of results. */
@@ -1248,7 +1248,7 @@ interface GetRefundabilityResponseNonNullableFields {
1248
1248
  refundability?: RefundabilityNonNullableFields;
1249
1249
  }
1250
1250
 
1251
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1251
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1252
1252
  getUrl: (context: any) => string;
1253
1253
  httpMethod: K;
1254
1254
  path: string;
@@ -1258,26 +1258,551 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
1258
1258
  __responseType: Q;
1259
1259
  __originalResponseType: R;
1260
1260
  };
1261
- declare function createRefund(): __PublicMethodMetaInfo<'POST', {}, CreateRefundRequest, CreateRefundRequest$1, CreateRefundResponse & CreateRefundResponseNonNullableFields, CreateRefundResponse$1 & CreateRefundResponseNonNullableFields$1>;
1262
- declare function getRefund(): __PublicMethodMetaInfo<'GET', {
1261
+ declare function createRefund(): __PublicMethodMetaInfo$1<'POST', {}, CreateRefundRequest, CreateRefundRequest$1, CreateRefundResponse & CreateRefundResponseNonNullableFields, CreateRefundResponse$1 & CreateRefundResponseNonNullableFields$1>;
1262
+ declare function getRefund(): __PublicMethodMetaInfo$1<'GET', {
1263
1263
  refundId: string;
1264
1264
  }, GetRefundRequest, GetRefundRequest$1, GetRefundResponse & GetRefundResponseNonNullableFields, GetRefundResponse$1 & GetRefundResponseNonNullableFields$1>;
1265
- declare function queryRefunds(): __PublicMethodMetaInfo<'POST', {}, QueryRefundsRequest, QueryRefundsRequest$1, QueryRefundsResponse & QueryRefundsResponseNonNullableFields, QueryRefundsResponse$1 & QueryRefundsResponseNonNullableFields$1>;
1266
- declare function updateExtendedFields(): __PublicMethodMetaInfo<'POST', {
1265
+ declare function queryRefunds(): __PublicMethodMetaInfo$1<'POST', {}, QueryRefundsRequest, QueryRefundsRequest$1, QueryRefundsResponse & QueryRefundsResponseNonNullableFields, QueryRefundsResponse$1 & QueryRefundsResponseNonNullableFields$1>;
1266
+ declare function updateExtendedFields(): __PublicMethodMetaInfo$1<'POST', {
1267
1267
  id: string;
1268
1268
  }, UpdateExtendedFieldsRequest, UpdateExtendedFieldsRequest$1, UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields, UpdateExtendedFieldsResponse$1 & UpdateExtendedFieldsResponseNonNullableFields$1>;
1269
- declare function getRefundability(): __PublicMethodMetaInfo<'GET', {
1269
+ declare function getRefundability(): __PublicMethodMetaInfo$1<'GET', {
1270
1270
  chargeId: string;
1271
1271
  }, GetRefundabilityRequest, GetRefundabilityRequest$1, GetRefundabilityResponse & GetRefundabilityResponseNonNullableFields, GetRefundabilityResponse$1 & GetRefundabilityResponseNonNullableFields$1>;
1272
1272
 
1273
+ declare const meta$1_createRefund: typeof createRefund;
1274
+ declare const meta$1_getRefund: typeof getRefund;
1275
+ declare const meta$1_getRefundability: typeof getRefundability;
1276
+ declare const meta$1_queryRefunds: typeof queryRefunds;
1277
+ declare const meta$1_updateExtendedFields: typeof updateExtendedFields;
1278
+ declare namespace meta$1 {
1279
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_createRefund as createRefund, meta$1_getRefund as getRefund, meta$1_getRefundability as getRefundability, meta$1_queryRefunds as queryRefunds, meta$1_updateExtendedFields as updateExtendedFields };
1280
+ }
1281
+
1282
+ interface SavedPaymentMethod$1 {
1283
+ /**
1284
+ * Unique identifier of a saved payment method.
1285
+ * @readonly
1286
+ */
1287
+ id?: string | null;
1288
+ /**
1289
+ * Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision.
1290
+ * @readonly
1291
+ */
1292
+ revision?: string | null;
1293
+ /**
1294
+ * SavedPaymentMethod creation time.
1295
+ * @readonly
1296
+ */
1297
+ createdDate?: Date | null;
1298
+ /**
1299
+ * SavedPaymentMethod last update time.
1300
+ * @readonly
1301
+ */
1302
+ updatedDate?: Date | null;
1303
+ /** Saved payment method owner's member ID. */
1304
+ siteMemberId?: string | null;
1305
+ /**
1306
+ * Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method.
1307
+ * @readonly
1308
+ */
1309
+ primary?: boolean;
1310
+ /** Payment method details. */
1311
+ paymentMethod?: PaymentMethod$1;
1312
+ /**
1313
+ * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1314
+ * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1315
+ */
1316
+ merchantUseAllowed?: boolean | null;
1317
+ /**
1318
+ * Saved payment method sensitive information.
1319
+ * @readonly
1320
+ */
1321
+ sensitiveInfo?: SensitiveInfo$1;
1322
+ /** Data Extensions */
1323
+ extendedFields?: ExtendedFields$1;
1324
+ }
1325
+ interface CardInfo$1 {
1326
+ /**
1327
+ * Credit card's last 4 digits.
1328
+ * @readonly
1329
+ */
1330
+ lastFourDigits?: string | null;
1331
+ /**
1332
+ * Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number.
1333
+ * @readonly
1334
+ */
1335
+ bin?: string | null;
1336
+ /** Credit card's expiration month. */
1337
+ expirationMonth?: number | null;
1338
+ /** Credit card's expiration year. */
1339
+ expirationYear?: number | null;
1340
+ /** Card holder's full name specified on the card. */
1341
+ cardholderName?: string | null;
1342
+ }
1343
+ declare enum CardBrand$1 {
1344
+ UNKNOWN_CARD_BRAND = "UNKNOWN_CARD_BRAND",
1345
+ AMEX = "AMEX",
1346
+ DANKORT = "DANKORT",
1347
+ DINERS = "DINERS",
1348
+ DISCOVER = "DISCOVER",
1349
+ ISRACARD = "ISRACARD",
1350
+ JCB = "JCB",
1351
+ MAESTRO = "MAESTRO",
1352
+ MASTERCARD = "MASTERCARD",
1353
+ UNIONPAY = "UNIONPAY",
1354
+ VISA = "VISA",
1355
+ RUPAY = "RUPAY"
1356
+ }
1357
+ interface PaymentMethod$1 {
1358
+ /** Legacy payment method type ID. Supported values are `creditCard`, `payPal`. */
1359
+ typeId?: string;
1360
+ /**
1361
+ * Payment method type ID.
1362
+ * @readonly
1363
+ */
1364
+ paymentMethodTypeId?: string;
1365
+ /**
1366
+ * Payment method brand ID.
1367
+ * @readonly
1368
+ */
1369
+ paymentMethodBrandId?: string | null;
1370
+ /** Details of credit card. */
1371
+ cardInfo?: CardInfo$1;
1372
+ }
1373
+ interface SensitiveInfo$1 {
1374
+ /** Sensitive details of credit card like card token. */
1375
+ cardSensitiveInfo?: CardSensitiveInfo$1;
1376
+ }
1377
+ interface CardSensitiveInfo$1 {
1378
+ /** Persistent token of credit card tokenized by Wix. */
1379
+ persistentToken?: string | null;
1380
+ }
1381
+ interface ExtendedFields$1 {
1382
+ /**
1383
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1384
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
1385
+ *
1386
+ * You can only access fields for which you have the appropriate permissions.
1387
+ *
1388
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1389
+ */
1390
+ namespaces?: Record<string, Record<string, any>>;
1391
+ }
1392
+ interface UpsertSavedPaymentMethodRequest$1 {
1393
+ /** Saved payment method. */
1394
+ savedPaymentMethod: SavedPaymentMethod$1;
1395
+ /** Temporary token of credit card tokenized by Wix. This token is used to create a persistent token */
1396
+ temporaryCardToken: string | null;
1397
+ }
1398
+ interface UpsertSavedPaymentMethodResponse$1 {
1399
+ /** Saved payment method. */
1400
+ savedPaymentMethod?: SavedPaymentMethod$1;
1401
+ }
1402
+ interface GetSavedPaymentMethodRequest$1 {
1403
+ /** Unique identifier of a saved payment method. */
1404
+ savedPaymentMethodId: string;
1405
+ /**
1406
+ * List of heeded fields that will be returned.
1407
+ * You should have additional permission in order to get them as described in HidedFields documentation.
1408
+ */
1409
+ fields?: RequestedFields$1[];
1410
+ }
1411
+ declare enum RequestedFields$1 {
1412
+ /** Default value. This value is unused. */
1413
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1414
+ SENSITIVE_INFO = "SENSITIVE_INFO"
1415
+ }
1416
+ interface GetSavedPaymentMethodResponse$1 {
1417
+ /** Saved payment method. */
1418
+ savedPaymentMethod?: SavedPaymentMethod$1;
1419
+ }
1420
+ interface DeleteSavedPaymentMethodRequest$1 {
1421
+ /** Unique identifier of a saved payment method. */
1422
+ savedPaymentMethodId: string;
1423
+ }
1424
+ interface DeleteSavedPaymentMethodResponse$1 {
1425
+ }
1426
+ interface ListSavedPaymentMethodsRequest$1 {
1427
+ /**
1428
+ * Site member that owns saved payment methods.
1429
+ * Pass `me` to list saved payment method of the current site member.
1430
+ */
1431
+ siteMemberId?: string | null;
1432
+ /** Payment method type id. Supported values are `creditCard`, `payPal`. */
1433
+ paymentMethodTypeId?: string | null;
1434
+ /**
1435
+ * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1436
+ * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1437
+ */
1438
+ merchantUseAllowed?: boolean | null;
1439
+ /**
1440
+ * List of requested fields that will be returned.
1441
+ * Supported values:
1442
+ * SENSITIVE_INFO - Sensitive information of a SavedPaymentMethod like credit card tokens that's needed to process payments with it.
1443
+ * In order to receive it you should have `PAYMENTS.SAVED_PAYMENT_METHOD_READ_SENSITIVE_INFO` permission
1444
+ */
1445
+ fields?: RequestedFields$1[];
1446
+ /**
1447
+ * Paging for limit the response size.
1448
+ * If no paging provider default response limit 100 will be used.
1449
+ */
1450
+ paging?: CursorPaging$1;
1451
+ }
1452
+ interface CursorPaging$1 {
1453
+ /** Maximum number of items to return in the results. */
1454
+ limit?: number | null;
1455
+ /**
1456
+ * Pointer to the next or previous page in the list of results.
1457
+ *
1458
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1459
+ * Not relevant for the first request.
1460
+ */
1461
+ cursor?: string | null;
1462
+ }
1463
+ interface ListSavedPaymentMethodsResponse$1 {
1464
+ /** List of saved payment methods. */
1465
+ savedPaymentMethods?: SavedPaymentMethod$1[];
1466
+ /** Paging metadata. */
1467
+ pagingMetadata?: CursorPagingMetadata$1;
1468
+ }
1469
+ interface CursorPagingMetadata$1 {
1470
+ /** Number of items returned in the response. */
1471
+ count?: number | null;
1472
+ /** Cursor strings that point to the next page, previous page, or both. */
1473
+ cursors?: Cursors$1;
1474
+ /**
1475
+ * Whether there are more pages to retrieve following the current page.
1476
+ *
1477
+ * + `true`: Another page of results can be retrieved.
1478
+ * + `false`: This is the last page.
1479
+ */
1480
+ hasNext?: boolean | null;
1481
+ }
1482
+ interface Cursors$1 {
1483
+ /** Cursor string pointing to the next page in the list of results. */
1484
+ next?: string | null;
1485
+ /** Cursor pointing to the previous page in the list of results. */
1486
+ prev?: string | null;
1487
+ }
1488
+ interface UpdateSavedPaymentMethodRequest$1 {
1489
+ /** Saved payment method to update. */
1490
+ savedPaymentMethod?: SavedPaymentMethod$1;
1491
+ }
1492
+ interface UpdateSavedPaymentMethodResponse$1 {
1493
+ /** Updated saved payment method. */
1494
+ savedPaymentMethod?: SavedPaymentMethod$1;
1495
+ }
1496
+ interface MarkSavedPaymentMethodPrimaryRequest$1 {
1497
+ /** Unique identifier of a saved payment method. */
1498
+ savedPaymentMethodId: string;
1499
+ }
1500
+ interface MarkSavedPaymentMethodPrimaryResponse$1 {
1501
+ }
1502
+ interface CardInfoNonNullableFields$1 {
1503
+ brand: CardBrand$1;
1504
+ }
1505
+ interface PaymentMethodNonNullableFields$1 {
1506
+ typeId: string;
1507
+ paymentMethodTypeId: string;
1508
+ cardInfo?: CardInfoNonNullableFields$1;
1509
+ }
1510
+ interface SavedPaymentMethodNonNullableFields$1 {
1511
+ primary: boolean;
1512
+ paymentMethod?: PaymentMethodNonNullableFields$1;
1513
+ }
1514
+ interface UpsertSavedPaymentMethodResponseNonNullableFields$1 {
1515
+ savedPaymentMethod?: SavedPaymentMethodNonNullableFields$1;
1516
+ }
1517
+ interface GetSavedPaymentMethodResponseNonNullableFields$1 {
1518
+ savedPaymentMethod?: SavedPaymentMethodNonNullableFields$1;
1519
+ }
1520
+ interface ListSavedPaymentMethodsResponseNonNullableFields$1 {
1521
+ savedPaymentMethods: SavedPaymentMethodNonNullableFields$1[];
1522
+ }
1523
+ interface UpdateSavedPaymentMethodResponseNonNullableFields$1 {
1524
+ savedPaymentMethod?: SavedPaymentMethodNonNullableFields$1;
1525
+ }
1526
+
1527
+ interface SavedPaymentMethod {
1528
+ /**
1529
+ * Unique identifier of a saved payment method.
1530
+ * @readonly
1531
+ */
1532
+ _id?: string | null;
1533
+ /**
1534
+ * Represents the current state of a saved payment method. Each time saved payment method is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision.
1535
+ * @readonly
1536
+ */
1537
+ revision?: string | null;
1538
+ /**
1539
+ * SavedPaymentMethod creation time.
1540
+ * @readonly
1541
+ */
1542
+ _createdDate?: Date | null;
1543
+ /**
1544
+ * SavedPaymentMethod last update time.
1545
+ * @readonly
1546
+ */
1547
+ _updatedDate?: Date | null;
1548
+ /** Saved payment method owner's member ID. */
1549
+ siteMemberId?: string | null;
1550
+ /**
1551
+ * Defines whether this payment method is primary for the member. Member can only have at most one primary saved payment method.
1552
+ * @readonly
1553
+ */
1554
+ primary?: boolean;
1555
+ /** Payment method details. */
1556
+ paymentMethod?: PaymentMethod;
1557
+ /**
1558
+ * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1559
+ * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1560
+ */
1561
+ merchantUseAllowed?: boolean | null;
1562
+ /**
1563
+ * Saved payment method sensitive information.
1564
+ * @readonly
1565
+ */
1566
+ sensitiveInfo?: SensitiveInfo;
1567
+ /** Data Extensions */
1568
+ extendedFields?: ExtendedFields;
1569
+ }
1570
+ interface CardInfo {
1571
+ /**
1572
+ * Credit card's last 4 digits.
1573
+ * @readonly
1574
+ */
1575
+ lastFourDigits?: string | null;
1576
+ /**
1577
+ * Credit card's BIN (Bank Identification Number). It's first 4-6 digits of card's number.
1578
+ * @readonly
1579
+ */
1580
+ bin?: string | null;
1581
+ /** Credit card's expiration month. */
1582
+ expirationMonth?: number | null;
1583
+ /** Credit card's expiration year. */
1584
+ expirationYear?: number | null;
1585
+ /** Card holder's full name specified on the card. */
1586
+ cardholderName?: string | null;
1587
+ }
1588
+ declare enum CardBrand {
1589
+ UNKNOWN_CARD_BRAND = "UNKNOWN_CARD_BRAND",
1590
+ AMEX = "AMEX",
1591
+ DANKORT = "DANKORT",
1592
+ DINERS = "DINERS",
1593
+ DISCOVER = "DISCOVER",
1594
+ ISRACARD = "ISRACARD",
1595
+ JCB = "JCB",
1596
+ MAESTRO = "MAESTRO",
1597
+ MASTERCARD = "MASTERCARD",
1598
+ UNIONPAY = "UNIONPAY",
1599
+ VISA = "VISA",
1600
+ RUPAY = "RUPAY"
1601
+ }
1602
+ interface PaymentMethod {
1603
+ /** Legacy payment method type ID. Supported values are `creditCard`, `payPal`. */
1604
+ typeId?: string;
1605
+ /**
1606
+ * Payment method type ID.
1607
+ * @readonly
1608
+ */
1609
+ paymentMethodTypeId?: string;
1610
+ /**
1611
+ * Payment method brand ID.
1612
+ * @readonly
1613
+ */
1614
+ paymentMethodBrandId?: string | null;
1615
+ /** Details of credit card. */
1616
+ cardInfo?: CardInfo;
1617
+ }
1618
+ interface SensitiveInfo {
1619
+ /** Sensitive details of credit card like card token. */
1620
+ cardSensitiveInfo?: CardSensitiveInfo;
1621
+ }
1622
+ interface CardSensitiveInfo {
1623
+ /** Persistent token of credit card tokenized by Wix. */
1624
+ persistentToken?: string | null;
1625
+ }
1626
+ interface ExtendedFields {
1627
+ /**
1628
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1629
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
1630
+ *
1631
+ * You can only access fields for which you have the appropriate permissions.
1632
+ *
1633
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1634
+ */
1635
+ namespaces?: Record<string, Record<string, any>>;
1636
+ }
1637
+ interface UpsertSavedPaymentMethodRequest {
1638
+ /** Saved payment method. */
1639
+ savedPaymentMethod: SavedPaymentMethod;
1640
+ /** Temporary token of credit card tokenized by Wix. This token is used to create a persistent token */
1641
+ temporaryCardToken: string | null;
1642
+ }
1643
+ interface UpsertSavedPaymentMethodResponse {
1644
+ /** Saved payment method. */
1645
+ savedPaymentMethod?: SavedPaymentMethod;
1646
+ }
1647
+ interface GetSavedPaymentMethodRequest {
1648
+ /** Unique identifier of a saved payment method. */
1649
+ savedPaymentMethodId: string;
1650
+ /**
1651
+ * List of heeded fields that will be returned.
1652
+ * You should have additional permission in order to get them as described in HidedFields documentation.
1653
+ */
1654
+ fields?: RequestedFields[];
1655
+ }
1656
+ declare enum RequestedFields {
1657
+ /** Default value. This value is unused. */
1658
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
1659
+ SENSITIVE_INFO = "SENSITIVE_INFO"
1660
+ }
1661
+ interface GetSavedPaymentMethodResponse {
1662
+ /** Saved payment method. */
1663
+ savedPaymentMethod?: SavedPaymentMethod;
1664
+ }
1665
+ interface DeleteSavedPaymentMethodRequest {
1666
+ /** Unique identifier of a saved payment method. */
1667
+ savedPaymentMethodId: string;
1668
+ }
1669
+ interface DeleteSavedPaymentMethodResponse {
1670
+ }
1671
+ interface ListSavedPaymentMethodsRequest {
1672
+ /**
1673
+ * Site member that owns saved payment methods.
1674
+ * Pass `me` to list saved payment method of the current site member.
1675
+ */
1676
+ siteMemberId?: string | null;
1677
+ /** Payment method type id. Supported values are `creditCard`, `payPal`. */
1678
+ paymentMethodTypeId?: string | null;
1679
+ /**
1680
+ * Defines whether this payment method can be used by the merchant for making unscheduled payments.
1681
+ * Even if it's set to `false` payment method still can be used for scheduled payments e.g. subscription renewal without the buyer being present.
1682
+ */
1683
+ merchantUseAllowed?: boolean | null;
1684
+ /**
1685
+ * List of requested fields that will be returned.
1686
+ * Supported values:
1687
+ * SENSITIVE_INFO - Sensitive information of a SavedPaymentMethod like credit card tokens that's needed to process payments with it.
1688
+ * In order to receive it you should have `PAYMENTS.SAVED_PAYMENT_METHOD_READ_SENSITIVE_INFO` permission
1689
+ */
1690
+ fields?: RequestedFields[];
1691
+ /**
1692
+ * Paging for limit the response size.
1693
+ * If no paging provider default response limit 100 will be used.
1694
+ */
1695
+ paging?: CursorPaging;
1696
+ }
1697
+ interface CursorPaging {
1698
+ /** Maximum number of items to return in the results. */
1699
+ limit?: number | null;
1700
+ /**
1701
+ * Pointer to the next or previous page in the list of results.
1702
+ *
1703
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1704
+ * Not relevant for the first request.
1705
+ */
1706
+ cursor?: string | null;
1707
+ }
1708
+ interface ListSavedPaymentMethodsResponse {
1709
+ /** List of saved payment methods. */
1710
+ savedPaymentMethods?: SavedPaymentMethod[];
1711
+ /** Paging metadata. */
1712
+ pagingMetadata?: CursorPagingMetadata;
1713
+ }
1714
+ interface CursorPagingMetadata {
1715
+ /** Number of items returned in the response. */
1716
+ count?: number | null;
1717
+ /** Cursor strings that point to the next page, previous page, or both. */
1718
+ cursors?: Cursors;
1719
+ /**
1720
+ * Whether there are more pages to retrieve following the current page.
1721
+ *
1722
+ * + `true`: Another page of results can be retrieved.
1723
+ * + `false`: This is the last page.
1724
+ */
1725
+ hasNext?: boolean | null;
1726
+ }
1727
+ interface Cursors {
1728
+ /** Cursor string pointing to the next page in the list of results. */
1729
+ next?: string | null;
1730
+ /** Cursor pointing to the previous page in the list of results. */
1731
+ prev?: string | null;
1732
+ }
1733
+ interface UpdateSavedPaymentMethodRequest {
1734
+ /** Saved payment method to update. */
1735
+ savedPaymentMethod?: SavedPaymentMethod;
1736
+ }
1737
+ interface UpdateSavedPaymentMethodResponse {
1738
+ /** Updated saved payment method. */
1739
+ savedPaymentMethod?: SavedPaymentMethod;
1740
+ }
1741
+ interface MarkSavedPaymentMethodPrimaryRequest {
1742
+ /** Unique identifier of a saved payment method. */
1743
+ savedPaymentMethodId: string;
1744
+ }
1745
+ interface MarkSavedPaymentMethodPrimaryResponse {
1746
+ }
1747
+ interface CardInfoNonNullableFields {
1748
+ brand: CardBrand;
1749
+ }
1750
+ interface PaymentMethodNonNullableFields {
1751
+ typeId: string;
1752
+ paymentMethodTypeId: string;
1753
+ cardInfo?: CardInfoNonNullableFields;
1754
+ }
1755
+ interface SavedPaymentMethodNonNullableFields {
1756
+ primary: boolean;
1757
+ paymentMethod?: PaymentMethodNonNullableFields;
1758
+ }
1759
+ interface UpsertSavedPaymentMethodResponseNonNullableFields {
1760
+ savedPaymentMethod?: SavedPaymentMethodNonNullableFields;
1761
+ }
1762
+ interface GetSavedPaymentMethodResponseNonNullableFields {
1763
+ savedPaymentMethod?: SavedPaymentMethodNonNullableFields;
1764
+ }
1765
+ interface ListSavedPaymentMethodsResponseNonNullableFields {
1766
+ savedPaymentMethods: SavedPaymentMethodNonNullableFields[];
1767
+ }
1768
+ interface UpdateSavedPaymentMethodResponseNonNullableFields {
1769
+ savedPaymentMethod?: SavedPaymentMethodNonNullableFields;
1770
+ }
1771
+
1772
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1773
+ getUrl: (context: any) => string;
1774
+ httpMethod: K;
1775
+ path: string;
1776
+ pathParams: M;
1777
+ __requestType: T;
1778
+ __originalRequestType: S;
1779
+ __responseType: Q;
1780
+ __originalResponseType: R;
1781
+ };
1782
+ declare function upsertSavedPaymentMethod(): __PublicMethodMetaInfo<'POST', {}, UpsertSavedPaymentMethodRequest, UpsertSavedPaymentMethodRequest$1, UpsertSavedPaymentMethodResponse & UpsertSavedPaymentMethodResponseNonNullableFields, UpsertSavedPaymentMethodResponse$1 & UpsertSavedPaymentMethodResponseNonNullableFields$1>;
1783
+ declare function getSavedPaymentMethod(): __PublicMethodMetaInfo<'GET', {
1784
+ savedPaymentMethodId: string;
1785
+ }, GetSavedPaymentMethodRequest, GetSavedPaymentMethodRequest$1, GetSavedPaymentMethodResponse & GetSavedPaymentMethodResponseNonNullableFields, GetSavedPaymentMethodResponse$1 & GetSavedPaymentMethodResponseNonNullableFields$1>;
1786
+ declare function deleteSavedPaymentMethod(): __PublicMethodMetaInfo<'DELETE', {
1787
+ savedPaymentMethodId: string;
1788
+ }, DeleteSavedPaymentMethodRequest, DeleteSavedPaymentMethodRequest$1, DeleteSavedPaymentMethodResponse, DeleteSavedPaymentMethodResponse$1>;
1789
+ declare function listSavedPaymentMethods(): __PublicMethodMetaInfo<'GET', {}, ListSavedPaymentMethodsRequest, ListSavedPaymentMethodsRequest$1, ListSavedPaymentMethodsResponse & ListSavedPaymentMethodsResponseNonNullableFields, ListSavedPaymentMethodsResponse$1 & ListSavedPaymentMethodsResponseNonNullableFields$1>;
1790
+ declare function updateSavedPaymentMethod(): __PublicMethodMetaInfo<'PATCH', {
1791
+ savedPaymentMethodId: string;
1792
+ }, UpdateSavedPaymentMethodRequest, UpdateSavedPaymentMethodRequest$1, UpdateSavedPaymentMethodResponse & UpdateSavedPaymentMethodResponseNonNullableFields, UpdateSavedPaymentMethodResponse$1 & UpdateSavedPaymentMethodResponseNonNullableFields$1>;
1793
+ declare function markSavedPaymentMethodPrimary(): __PublicMethodMetaInfo<'GET', {
1794
+ savedPaymentMethodId: string;
1795
+ }, MarkSavedPaymentMethodPrimaryRequest, MarkSavedPaymentMethodPrimaryRequest$1, MarkSavedPaymentMethodPrimaryResponse, MarkSavedPaymentMethodPrimaryResponse$1>;
1796
+
1273
1797
  type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
1274
- declare const meta_createRefund: typeof createRefund;
1275
- declare const meta_getRefund: typeof getRefund;
1276
- declare const meta_getRefundability: typeof getRefundability;
1277
- declare const meta_queryRefunds: typeof queryRefunds;
1278
- declare const meta_updateExtendedFields: typeof updateExtendedFields;
1798
+ declare const meta_deleteSavedPaymentMethod: typeof deleteSavedPaymentMethod;
1799
+ declare const meta_getSavedPaymentMethod: typeof getSavedPaymentMethod;
1800
+ declare const meta_listSavedPaymentMethods: typeof listSavedPaymentMethods;
1801
+ declare const meta_markSavedPaymentMethodPrimary: typeof markSavedPaymentMethodPrimary;
1802
+ declare const meta_updateSavedPaymentMethod: typeof updateSavedPaymentMethod;
1803
+ declare const meta_upsertSavedPaymentMethod: typeof upsertSavedPaymentMethod;
1279
1804
  declare namespace meta {
1280
- export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createRefund as createRefund, meta_getRefund as getRefund, meta_getRefundability as getRefundability, meta_queryRefunds as queryRefunds, meta_updateExtendedFields as updateExtendedFields };
1805
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_deleteSavedPaymentMethod as deleteSavedPaymentMethod, meta_getSavedPaymentMethod as getSavedPaymentMethod, meta_listSavedPaymentMethods as listSavedPaymentMethods, meta_markSavedPaymentMethodPrimary as markSavedPaymentMethodPrimary, meta_updateSavedPaymentMethod as updateSavedPaymentMethod, meta_upsertSavedPaymentMethod as upsertSavedPaymentMethod };
1281
1806
  }
1282
1807
 
1283
- export { meta$2 as onboardingAvailability, meta$1 as pspCallbacks, meta as refunds };
1808
+ export { meta$3 as onboardingAvailability, meta$2 as pspCallbacks, meta$1 as refunds, meta as savedPaymentMethods };