@wix/auto_sdk_ecom_order-payment-requests 1.0.63 → 1.0.65
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.d.ts +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +33 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +33 -2
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +33 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +33 -2
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -5
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +70 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +115 -3
- package/build/internal/cjs/meta.js +1 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -5
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +70 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +115 -3
- 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,12 +493,31 @@ 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
|
*/
|
|
479
500
|
paymentResponseToken?: string | null;
|
|
480
501
|
}
|
|
502
|
+
interface InvalidPaymentStatusErrorData {
|
|
503
|
+
/**
|
|
504
|
+
* Token for completing the payment. Same value as `paymentResponseToken` in a successful response.
|
|
505
|
+
*
|
|
506
|
+
* Returned only when the charge reached the payment provider.
|
|
507
|
+
* @maxLength 1000
|
|
508
|
+
*/
|
|
509
|
+
paymentResponseToken?: string | null;
|
|
510
|
+
/**
|
|
511
|
+
* Status of the payment that blocked the charge, for example `DECLINED` or `CANCELED`.
|
|
512
|
+
* @maxLength 100
|
|
513
|
+
*/
|
|
514
|
+
paymentStatus?: string;
|
|
515
|
+
/**
|
|
516
|
+
* Reason the payment provider gave for the status, such as a gateway reason code. Falls back to `paymentStatus` when the provider doesn't give a reason.
|
|
517
|
+
* @maxLength 100
|
|
518
|
+
*/
|
|
519
|
+
failureDetails?: string | null;
|
|
520
|
+
}
|
|
481
521
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
482
522
|
createdEvent?: EntityCreatedEvent;
|
|
483
523
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -726,6 +766,18 @@ type ChargeOrderPaymentRequestApplicationErrors = {
|
|
|
726
766
|
code?: 'PAYMENT_IN_PROGRESS';
|
|
727
767
|
description?: string;
|
|
728
768
|
data?: Record<string, any>;
|
|
769
|
+
} | {
|
|
770
|
+
code?: 'PAYMENT_ATTEMPT_EXPIRED';
|
|
771
|
+
description?: string;
|
|
772
|
+
data?: Record<string, any>;
|
|
773
|
+
} | {
|
|
774
|
+
code?: 'PAYMENT_METHOD_UNAVAILABLE';
|
|
775
|
+
description?: string;
|
|
776
|
+
data?: Record<string, any>;
|
|
777
|
+
} | {
|
|
778
|
+
code?: 'INVALID_PAYMENT_STATUS';
|
|
779
|
+
description?: string;
|
|
780
|
+
data?: InvalidPaymentStatusErrorData;
|
|
729
781
|
};
|
|
730
782
|
interface BaseEventMetadata {
|
|
731
783
|
/**
|
|
@@ -1284,6 +1336,20 @@ type OrderPaymentRequestQuery = {
|
|
|
1284
1336
|
Sort order.
|
|
1285
1337
|
*/
|
|
1286
1338
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1339
|
+
/**
|
|
1340
|
+
When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
1341
|
+
a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
1342
|
+
|
|
1343
|
+
If multiple filters are provided, they are combined with AND operator.
|
|
1344
|
+
|
|
1345
|
+
Example:
|
|
1346
|
+
Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
1347
|
+
and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
1348
|
+
{ fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
1349
|
+
@internal: undefined,
|
|
1350
|
+
@maxSize: 10
|
|
1351
|
+
*/
|
|
1352
|
+
selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
|
|
1287
1353
|
}[];
|
|
1288
1354
|
};
|
|
1289
1355
|
declare const utils: {
|
|
@@ -1345,15 +1411,13 @@ declare function voidOrderPaymentRequest(orderPaymentRequestId: string): Promise
|
|
|
1345
1411
|
*
|
|
1346
1412
|
* 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
1413
|
*
|
|
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.
|
|
1414
|
+
* 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
1415
|
*
|
|
1352
1416
|
* 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
1417
|
*
|
|
1354
1418
|
* Charging requires a client-side Wix Cashier payments session, so a backend-only integration can't obtain a `paymentToken` or complete a payment that needs an additional step.
|
|
1355
1419
|
*
|
|
1356
|
-
* At most one charge attempt is processed per order payment request, so retrying is safe. While an attempt is still in progress, further calls fail with `PAYMENT_IN_PROGRESS`. Once the payment is collected, further calls fail with `CANNOT_CHARGE_PAID_ORDER_PAYMENT_REQUEST`. The customer isn't charged twice for the same order payment request.
|
|
1420
|
+
* At most one *successful* charge attempt is processed per order payment request, so retrying is safe. While an attempt is still in progress, further calls fail with `PAYMENT_IN_PROGRESS`. Once the payment is collected, further calls fail with `CANNOT_CHARGE_PAID_ORDER_PAYMENT_REQUEST`. When an attempt fails with `INVALID_PAYMENT_STATUS`, you can charge again with new payment details. The customer isn't charged twice for the same order payment request.
|
|
1357
1421
|
* @param orderPaymentRequestId - ID of the order payment request to charge.
|
|
1358
1422
|
* @internal
|
|
1359
1423
|
* @documentationMaturity preview
|
|
@@ -1372,4 +1436,4 @@ interface ChargeOrderPaymentRequestOptions {
|
|
|
1372
1436
|
paymentToken?: string | null;
|
|
1373
1437
|
}
|
|
1374
1438
|
|
|
1375
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ActionLink, type ActionLinks, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateOrderPaymentRequestsOptions, type BulkCreateOrderPaymentRequestsRequest, type BulkCreateOrderPaymentRequestsResponse, type BulkOrderPaymentRequestItem, type BulkOrderPaymentRequestResult, type ChargeOrderPaymentRequestApplicationErrors, type ChargeOrderPaymentRequestOptions, type ChargeOrderPaymentRequestRequest, type ChargeOrderPaymentRequestResponse, type CommonQueryWithEntityContext, type CreateOrderPaymentRequestApplicationErrors, type CreateOrderPaymentRequestOptions, type CreateOrderPaymentRequestRequest, type CreateOrderPaymentRequestResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteOrderPaymentRequestApplicationErrors, type DeleteOrderPaymentRequestRequest, type DeleteOrderPaymentRequestResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetOrderPaymentRequestApplicationErrors, type GetOrderPaymentRequestRequest, type GetOrderPaymentRequestResponse, type GetOrderPaymentRequestURLRequest, type GetOrderPaymentRequestURLResponse, type GetOrderPaymentRequestUrlApplicationErrors, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type OrderPaymentRequest, type OrderPaymentRequestCreatedEnvelope, type OrderPaymentRequestDeletedEnvelope, type OrderPaymentRequestExpired, type OrderPaymentRequestExpiredEnvelope, type OrderPaymentRequestPaid, type OrderPaymentRequestPaidEnvelope, type OrderPaymentRequestQuery, type OrderPaymentRequestQuerySpec, type OrderPaymentRequestUpdatedEnvelope, type OrderPaymentRequestVoided, type OrderPaymentRequestVoidedEnvelope, type OrderPaymentRequestsQueryBuilder, type OrderPaymentRequestsQueryResult, PaymentMethod, type PaymentMethodWithLiterals, type Price, type QueryOrderPaymentRequestsRequest, type QueryOrderPaymentRequestsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, Status, type StatusWithLiterals, type SubscriptionInfo, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateOrderPaymentRequest, type UpdateOrderPaymentRequestApplicationErrors, type UpdateOrderPaymentRequestRequest, type UpdateOrderPaymentRequestResponse, type VoidOrderPaymentRequestApplicationErrors, type VoidOrderPaymentRequestRequest, type VoidOrderPaymentRequestResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateOrderPaymentRequests, chargeOrderPaymentRequest, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, onOrderPaymentRequestCreated, onOrderPaymentRequestDeleted, onOrderPaymentRequestExpired, onOrderPaymentRequestPaid, onOrderPaymentRequestUpdated, onOrderPaymentRequestVoided, queryOrderPaymentRequests, typedQueryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, utils, voidOrderPaymentRequest };
|
|
1439
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ActionLink, type ActionLinks, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateOrderPaymentRequestsOptions, type BulkCreateOrderPaymentRequestsRequest, type BulkCreateOrderPaymentRequestsResponse, type BulkOrderPaymentRequestItem, type BulkOrderPaymentRequestResult, type ChargeOrderPaymentRequestApplicationErrors, type ChargeOrderPaymentRequestOptions, type ChargeOrderPaymentRequestRequest, type ChargeOrderPaymentRequestResponse, type CommonQueryWithEntityContext, type CreateOrderPaymentRequestApplicationErrors, type CreateOrderPaymentRequestOptions, type CreateOrderPaymentRequestRequest, type CreateOrderPaymentRequestResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteOrderPaymentRequestApplicationErrors, type DeleteOrderPaymentRequestRequest, type DeleteOrderPaymentRequestResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetOrderPaymentRequestApplicationErrors, type GetOrderPaymentRequestRequest, type GetOrderPaymentRequestResponse, type GetOrderPaymentRequestURLRequest, type GetOrderPaymentRequestURLResponse, type GetOrderPaymentRequestUrlApplicationErrors, type IdentificationData, type IdentificationDataIdOneOf, type InvalidPaymentStatusErrorData, type ItemMetadata, type MessageEnvelope, type OrderPaymentRequest, type OrderPaymentRequestCreatedEnvelope, type OrderPaymentRequestDeletedEnvelope, type OrderPaymentRequestExpired, type OrderPaymentRequestExpiredEnvelope, type OrderPaymentRequestPaid, type OrderPaymentRequestPaidEnvelope, type OrderPaymentRequestQuery, type OrderPaymentRequestQuerySpec, type OrderPaymentRequestUpdatedEnvelope, type OrderPaymentRequestVoided, type OrderPaymentRequestVoidedEnvelope, type OrderPaymentRequestsQueryBuilder, type OrderPaymentRequestsQueryResult, PaymentMethod, type PaymentMethodWithLiterals, type Price, type QueryOrderPaymentRequestsRequest, type QueryOrderPaymentRequestsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, Status, type StatusWithLiterals, type SubscriptionInfo, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateOrderPaymentRequest, type UpdateOrderPaymentRequestApplicationErrors, type UpdateOrderPaymentRequestRequest, type UpdateOrderPaymentRequestResponse, type VoidOrderPaymentRequestApplicationErrors, type VoidOrderPaymentRequestRequest, type VoidOrderPaymentRequestResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateOrderPaymentRequests, chargeOrderPaymentRequest, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, onOrderPaymentRequestCreated, onOrderPaymentRequestDeleted, onOrderPaymentRequestExpired, onOrderPaymentRequestPaid, onOrderPaymentRequestUpdated, onOrderPaymentRequestVoided, queryOrderPaymentRequests, typedQueryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, utils, voidOrderPaymentRequest };
|