@wix/auto_sdk_ecom_order-payment-requests 1.0.64 → 1.0.66
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 +14 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +29 -11
- package/build/cjs/index.typings.js +1 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +28 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +16 -16
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +14 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +29 -11
- package/build/es/index.typings.mjs +1 -3
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +28 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +16 -16
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -2
- package/build/internal/cjs/index.js +14 -16
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +31 -12
- package/build/internal/cjs/index.typings.js +1 -3
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +28 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +16 -16
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -2
- package/build/internal/es/index.mjs +14 -16
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +31 -12
- package/build/internal/es/index.typings.mjs +1 -3
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +28 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +16 -16
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -499,6 +499,25 @@ interface ChargeOrderPaymentRequestResponse {
|
|
|
499
499
|
*/
|
|
500
500
|
paymentResponseToken?: string | null;
|
|
501
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
|
+
}
|
|
502
521
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
503
522
|
createdEvent?: EntityCreatedEvent;
|
|
504
523
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -667,6 +686,10 @@ type CreateOrderPaymentRequestApplicationErrors = {
|
|
|
667
686
|
code?: 'INVALID_ORDER_STATUS_FOR_SUBSCRIPTION';
|
|
668
687
|
description?: string;
|
|
669
688
|
data?: Record<string, any>;
|
|
689
|
+
} | {
|
|
690
|
+
code?: 'SUBSCRIPTION_ALREADY_STARTED';
|
|
691
|
+
description?: string;
|
|
692
|
+
data?: Record<string, any>;
|
|
670
693
|
} | {
|
|
671
694
|
code?: 'ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND';
|
|
672
695
|
description?: string;
|
|
@@ -755,6 +778,10 @@ type ChargeOrderPaymentRequestApplicationErrors = {
|
|
|
755
778
|
code?: 'PAYMENT_METHOD_UNAVAILABLE';
|
|
756
779
|
description?: string;
|
|
757
780
|
data?: Record<string, any>;
|
|
781
|
+
} | {
|
|
782
|
+
code?: 'INVALID_PAYMENT_STATUS';
|
|
783
|
+
description?: string;
|
|
784
|
+
data?: InvalidPaymentStatusErrorData;
|
|
758
785
|
};
|
|
759
786
|
interface BaseEventMetadata {
|
|
760
787
|
/**
|
|
@@ -969,6 +996,7 @@ interface CreateOrderPaymentRequestOptions {
|
|
|
969
996
|
* - `ORDER_NOT_FOUND`: The referenced order wasn't found.
|
|
970
997
|
* - `PARTIAL_PAYMENT_NOT_SUPPORTED_FOR_SUBSCRIPTION`: The requested amount doesn't equal the subscription order total.
|
|
971
998
|
* - `INVALID_ORDER_STATUS_FOR_SUBSCRIPTION`: The subscription order isn't in `INITIALIZED` status.
|
|
999
|
+
* - `SUBSCRIPTION_ALREADY_STARTED`: The order's subscription has already started billing.
|
|
972
1000
|
* - `SITE_NOT_PUBLISHED`: The site isn't published.
|
|
973
1001
|
* - `ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND`: The Payment Request Page isn't available on the site.
|
|
974
1002
|
* @param orderPaymentRequests - Order payment requests to create.
|
|
@@ -1201,11 +1229,6 @@ interface OrderPaymentRequestsQueryBuilder {
|
|
|
1201
1229
|
* @documentationMaturity preview
|
|
1202
1230
|
*/
|
|
1203
1231
|
startsWith: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description', value: string) => OrderPaymentRequestsQueryBuilder;
|
|
1204
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
1205
|
-
* @param values - List of values to compare against.
|
|
1206
|
-
* @documentationMaturity preview
|
|
1207
|
-
*/
|
|
1208
|
-
hasSome: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any[]) => OrderPaymentRequestsQueryBuilder;
|
|
1209
1232
|
/** @documentationMaturity preview */
|
|
1210
1233
|
in: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder;
|
|
1211
1234
|
/** @documentationMaturity preview */
|
|
@@ -1330,11 +1353,7 @@ type OrderPaymentRequestQuery = {
|
|
|
1330
1353
|
}[];
|
|
1331
1354
|
};
|
|
1332
1355
|
declare const utils: {
|
|
1333
|
-
query:
|
|
1334
|
-
QueryBuilder: () => _wix_sdk_types.QueryBuilder<OrderPaymentRequest, OrderPaymentRequestQuerySpec, OrderPaymentRequestQuery>;
|
|
1335
|
-
Filter: _wix_sdk_types.FilterFactory<OrderPaymentRequest, OrderPaymentRequestQuerySpec>;
|
|
1336
|
-
Sort: _wix_sdk_types.SortFactory<OrderPaymentRequestQuerySpec>;
|
|
1337
|
-
};
|
|
1356
|
+
query: _wix_sdk_types.QueryHelpers<OrderPaymentRequest, OrderPaymentRequestQuerySpec, OrderPaymentRequestQuery>;
|
|
1338
1357
|
};
|
|
1339
1358
|
/**
|
|
1340
1359
|
* Retrieves the payment page URL for an order payment request.
|
|
@@ -1394,7 +1413,7 @@ declare function voidOrderPaymentRequest(orderPaymentRequestId: string): Promise
|
|
|
1394
1413
|
*
|
|
1395
1414
|
* 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.
|
|
1396
1415
|
*
|
|
1397
|
-
* 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.
|
|
1416
|
+
* 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.
|
|
1398
1417
|
* @param orderPaymentRequestId - ID of the order payment request to charge.
|
|
1399
1418
|
* @internal
|
|
1400
1419
|
* @documentationMaturity preview
|
|
@@ -1413,4 +1432,4 @@ interface ChargeOrderPaymentRequestOptions {
|
|
|
1413
1432
|
paymentToken?: string | null;
|
|
1414
1433
|
}
|
|
1415
1434
|
|
|
1416
|
-
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 };
|
|
1435
|
+
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 };
|
|
@@ -657,9 +657,7 @@ async function typedQueryOrderPaymentRequests(query) {
|
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
var utils = {
|
|
660
|
-
query:
|
|
661
|
-
...createQueryUtils()
|
|
662
|
-
}
|
|
660
|
+
query: /* @__PURE__ */ createQueryUtils()
|
|
663
661
|
};
|
|
664
662
|
async function getOrderPaymentRequestUrl2(orderPaymentRequestId) {
|
|
665
663
|
const { httpClient, sideEffects } = arguments[1];
|