@wix/auto_sdk_ecom_order-payment-requests 1.0.63 → 1.0.64
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/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +9 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +9 -1
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +9 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +9 -1
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -3
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +45 -4
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +91 -2
- package/build/internal/cjs/meta.js +1 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -3
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +45 -4
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +91 -2
- package/build/internal/es/meta.mjs +1 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -316,6 +316,13 @@ interface GetOrderPaymentRequestResponse {
|
|
|
316
316
|
interface UpdateOrderPaymentRequestRequest {
|
|
317
317
|
/** Order payment request to update. */
|
|
318
318
|
orderPaymentRequest: OrderPaymentRequest;
|
|
319
|
+
/**
|
|
320
|
+
* Set of fields to update.
|
|
321
|
+
*
|
|
322
|
+
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
fieldMask?: string[];
|
|
319
326
|
}
|
|
320
327
|
interface UpdateOrderPaymentRequestResponse {
|
|
321
328
|
/** Updated order payment request. */
|
|
@@ -366,6 +373,20 @@ interface Sorting {
|
|
|
366
373
|
fieldName?: string;
|
|
367
374
|
/** Sort order. */
|
|
368
375
|
order?: SortOrderWithLiterals;
|
|
376
|
+
/**
|
|
377
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
378
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
379
|
+
*
|
|
380
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
381
|
+
*
|
|
382
|
+
* Example:
|
|
383
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
384
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
385
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
386
|
+
* @internal
|
|
387
|
+
* @maxSize 10
|
|
388
|
+
*/
|
|
389
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
369
390
|
}
|
|
370
391
|
declare enum SortOrder {
|
|
371
392
|
ASC = "ASC",
|
|
@@ -472,7 +493,7 @@ interface ChargeOrderPaymentRequestRequest {
|
|
|
472
493
|
}
|
|
473
494
|
interface ChargeOrderPaymentRequestResponse {
|
|
474
495
|
/**
|
|
475
|
-
* Token for completing
|
|
496
|
+
* Token for completing the payment. Returned for every charge that reaches the payment provider. Pass it to `paymentsApi.continuePayment()` in the Wix Cashier payments client SDK, which completes any remaining step the provider requires from the customer, such as 3D Secure verification or an off-site redirect.
|
|
476
497
|
* @minLength 1
|
|
477
498
|
* @maxLength 1000
|
|
478
499
|
*/
|
|
@@ -726,6 +747,14 @@ type ChargeOrderPaymentRequestApplicationErrors = {
|
|
|
726
747
|
code?: 'PAYMENT_IN_PROGRESS';
|
|
727
748
|
description?: string;
|
|
728
749
|
data?: Record<string, any>;
|
|
750
|
+
} | {
|
|
751
|
+
code?: 'PAYMENT_ATTEMPT_EXPIRED';
|
|
752
|
+
description?: string;
|
|
753
|
+
data?: Record<string, any>;
|
|
754
|
+
} | {
|
|
755
|
+
code?: 'PAYMENT_METHOD_UNAVAILABLE';
|
|
756
|
+
description?: string;
|
|
757
|
+
data?: Record<string, any>;
|
|
729
758
|
};
|
|
730
759
|
interface BaseEventMetadata {
|
|
731
760
|
/**
|
|
@@ -1284,6 +1313,20 @@ type OrderPaymentRequestQuery = {
|
|
|
1284
1313
|
Sort order.
|
|
1285
1314
|
*/
|
|
1286
1315
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1316
|
+
/**
|
|
1317
|
+
When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
1318
|
+
a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
1319
|
+
|
|
1320
|
+
If multiple filters are provided, they are combined with AND operator.
|
|
1321
|
+
|
|
1322
|
+
Example:
|
|
1323
|
+
Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
1324
|
+
and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
1325
|
+
{ fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
1326
|
+
@internal: undefined,
|
|
1327
|
+
@maxSize: 10
|
|
1328
|
+
*/
|
|
1329
|
+
selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
|
|
1287
1330
|
}[];
|
|
1288
1331
|
};
|
|
1289
1332
|
declare const utils: {
|
|
@@ -1345,9 +1388,7 @@ declare function voidOrderPaymentRequest(orderPaymentRequestId: string): Promise
|
|
|
1345
1388
|
*
|
|
1346
1389
|
* Collects the order payment request's `amount` from the payment method the customer entered in the Wix Cashier payments widget on your page. Before calling this method, call `paymentsApi.initializePayment()` on the `paymentsApi` object provided by the Wix Cashier payments client SDK to collect the customer's payment details, then pass the token it returns as `paymentToken`.
|
|
1347
1390
|
*
|
|
1348
|
-
* A successful response doesn't mean the payment was collected
|
|
1349
|
-
* - If `paymentResponseToken` is returned, the customer must complete an additional step, such as 3D Secure verification or an off-site redirect. Pass the token to `paymentsApi.continuePayment()` to complete the payment.
|
|
1350
|
-
* - If `paymentResponseToken` isn't returned, no further step is needed. The payment was either collected or declined by the payment provider.
|
|
1391
|
+
* A successful response doesn't mean the payment was collected. Always pass the returned `paymentResponseToken` to `paymentsApi.continuePayment()`. The widget then completes any step the payment provider still requires from the customer, such as 3D Secure verification or an off-site redirect, and does nothing when no step is needed.
|
|
1351
1392
|
*
|
|
1352
1393
|
* Either way, the order payment request's `status` is the authoritative outcome. It changes to `PAID` asynchronously, after the payment provider settles the transaction, which can happen after this method returns. To be notified, listen to the [Order Payment Request Paid](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-payment-requests/order-payment-request-paid) webhook, or poll [Get Order Payment Request](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-payment-requests/get-order-payment-request).
|
|
1353
1394
|
*
|