@wix/auto_sdk_ecom_order-payment-requests 1.0.59 → 1.0.61
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 +52 -18
- package/build/cjs/index.js +164 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +269 -69
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +49 -37
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +125 -127
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +52 -18
- package/build/es/index.mjs +158 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +269 -69
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +49 -37
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +125 -127
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +54 -20
- package/build/internal/cjs/index.js +164 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +278 -80
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +49 -37
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +125 -127
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +54 -20
- package/build/internal/es/index.mjs +158 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +278 -80
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +49 -37
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +125 -127
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { CreateOrderPaymentRequestOptions, OrderPaymentRequest, CreateOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestApplicationErrors, UpdateOrderPaymentRequest, UpdateOrderPaymentRequestApplicationErrors, DeleteOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestURLResponse, GetOrderPaymentRequestUrlApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, OrderPaymentRequestsQueryBuilder, OrderPaymentRequestQuery, typedQueryOrderPaymentRequests } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, ActionEvent, ActionLink, ActionLinks, CommonQueryWithEntityContext, CreateOrderPaymentRequestRequest, CreateOrderPaymentRequestResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteOrderPaymentRequestRequest, DeleteOrderPaymentRequestResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, GetOrderPaymentRequestRequest, GetOrderPaymentRequestResponse, GetOrderPaymentRequestURLRequest, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, OrderPaymentRequestExpired, OrderPaymentRequestPaid, OrderPaymentRequestQuerySpec, OrderPaymentRequestVoided, OrderPaymentRequestsQueryResult, PaymentMethod, PaymentMethodWithLiterals, Price, QueryOrderPaymentRequestsRequest, QueryOrderPaymentRequestsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Source, Status, StatusWithLiterals, SubscriptionInfo, UpdateExtendedFieldsRequest, UpdateOrderPaymentRequestRequest, UpdateOrderPaymentRequestResponse, VoidOrderPaymentRequestApplicationErrors, VoidOrderPaymentRequestRequest, VoidOrderPaymentRequestResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { CreateOrderPaymentRequestOptions, OrderPaymentRequest, CreateOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestApplicationErrors, UpdateOrderPaymentRequest, UpdateOrderPaymentRequestApplicationErrors, DeleteOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestURLResponse, GetOrderPaymentRequestUrlApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, OrderPaymentRequestCreatedEnvelope, OrderPaymentRequestDeletedEnvelope, OrderPaymentRequestExpiredEnvelope, OrderPaymentRequestPaidEnvelope, OrderPaymentRequestUpdatedEnvelope, OrderPaymentRequestVoidedEnvelope, OrderPaymentRequestsQueryBuilder, OrderPaymentRequestQuery, typedQueryOrderPaymentRequests } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, ActionLink, ActionLinks, BaseEventMetadata, CommonQueryWithEntityContext, CreateOrderPaymentRequestRequest, CreateOrderPaymentRequestResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteOrderPaymentRequestRequest, DeleteOrderPaymentRequestResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetOrderPaymentRequestRequest, GetOrderPaymentRequestResponse, GetOrderPaymentRequestURLRequest, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, OrderPaymentRequestExpired, OrderPaymentRequestPaid, OrderPaymentRequestQuerySpec, OrderPaymentRequestVoided, OrderPaymentRequestsQueryResult, PaymentMethod, PaymentMethodWithLiterals, Price, QueryOrderPaymentRequestsRequest, QueryOrderPaymentRequestsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Source, Status, StatusWithLiterals, SubscriptionInfo, UpdateExtendedFieldsRequest, UpdateOrderPaymentRequestRequest, UpdateOrderPaymentRequestResponse, VoidOrderPaymentRequestApplicationErrors, VoidOrderPaymentRequestRequest, VoidOrderPaymentRequestResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createOrderPaymentRequest$1(httpClient: HttpClient): CreateOrderPaymentRequestSignature;
|
|
6
6
|
interface CreateOrderPaymentRequestSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Creates
|
|
9
|
-
*
|
|
8
|
+
* Creates an order payment request.
|
|
9
|
+
*
|
|
10
|
+
* The response includes the payment page URL, which you can share with the customer. To retrieve the URL later, call [Get Order Payment Request URL](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-payment-requests/get-order-payment-request-url).
|
|
11
|
+
*
|
|
12
|
+
* Creation fails with `ORDER_PAYMENT_REQUEST_PAGE_NOT_FOUND` if the site doesn't have a Payment Request Page added and published.
|
|
13
|
+
* @returns Created order payment request.
|
|
10
14
|
*/
|
|
11
15
|
(options?: NonNullablePaths<CreateOrderPaymentRequestOptions, `orderPaymentRequest.amount` | `orderPaymentRequest.orderId` | `orderPaymentRequest.title`, 3>): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
|
|
12
16
|
__applicationErrorsType?: CreateOrderPaymentRequestApplicationErrors;
|
|
@@ -15,9 +19,9 @@ interface CreateOrderPaymentRequestSignature {
|
|
|
15
19
|
declare function getOrderPaymentRequest$1(httpClient: HttpClient): GetOrderPaymentRequestSignature;
|
|
16
20
|
interface GetOrderPaymentRequestSignature {
|
|
17
21
|
/**
|
|
18
|
-
* Retrieves
|
|
19
|
-
* @param - ID of the
|
|
20
|
-
* @returns
|
|
22
|
+
* Retrieves an order payment request.
|
|
23
|
+
* @param - ID of the order payment request to retrieve.
|
|
24
|
+
* @returns Retrieved order payment request.
|
|
21
25
|
*/
|
|
22
26
|
(orderPaymentRequestId: string): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
|
|
23
27
|
__applicationErrorsType?: GetOrderPaymentRequestApplicationErrors;
|
|
@@ -26,11 +30,11 @@ interface GetOrderPaymentRequestSignature {
|
|
|
26
30
|
declare function updateOrderPaymentRequest$1(httpClient: HttpClient): UpdateOrderPaymentRequestSignature;
|
|
27
31
|
interface UpdateOrderPaymentRequestSignature {
|
|
28
32
|
/**
|
|
29
|
-
* Updates
|
|
33
|
+
* Updates an order payment request.
|
|
30
34
|
*
|
|
31
|
-
*
|
|
35
|
+
* Only `UNPAID` order payment requests can be updated. The `amount` can't be changed after the order payment request is created.
|
|
32
36
|
* @param - Order payment request ID.
|
|
33
|
-
* @returns Updated
|
|
37
|
+
* @returns Updated order payment request.
|
|
34
38
|
*/
|
|
35
39
|
(_id: string, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<NonNullablePaths<OrderPaymentRequest, `source.externalId` | `status` | `orderId` | `amount.amount` | `amount.formattedAmount` | `currency` | `title` | `blockedPaymentMethods`, 3> & {
|
|
36
40
|
__applicationErrorsType?: UpdateOrderPaymentRequestApplicationErrors;
|
|
@@ -39,10 +43,10 @@ interface UpdateOrderPaymentRequestSignature {
|
|
|
39
43
|
declare function deleteOrderPaymentRequest$1(httpClient: HttpClient): DeleteOrderPaymentRequestSignature;
|
|
40
44
|
interface DeleteOrderPaymentRequestSignature {
|
|
41
45
|
/**
|
|
42
|
-
* Deletes
|
|
46
|
+
* Deletes an order payment request.
|
|
43
47
|
*
|
|
44
|
-
*
|
|
45
|
-
* @param -
|
|
48
|
+
* You can delete an order payment request in any status except `PAID`. Attempting to delete a `PAID` order payment request fails with `CANNOT_DELETE_PAID_ORDER_PAYMENT_REQUEST`.
|
|
49
|
+
* @param - ID of the order payment request to delete.
|
|
46
50
|
*/
|
|
47
51
|
(orderPaymentRequestId: string): Promise<void & {
|
|
48
52
|
__applicationErrorsType?: DeleteOrderPaymentRequestApplicationErrors;
|
|
@@ -51,8 +55,8 @@ interface DeleteOrderPaymentRequestSignature {
|
|
|
51
55
|
declare function getOrderPaymentRequestUrl$1(httpClient: HttpClient): GetOrderPaymentRequestUrlSignature;
|
|
52
56
|
interface GetOrderPaymentRequestUrlSignature {
|
|
53
57
|
/**
|
|
54
|
-
* Retrieves the
|
|
55
|
-
* @param -
|
|
58
|
+
* Retrieves the payment page URL for an order payment request.
|
|
59
|
+
* @param - ID of the order payment request.
|
|
56
60
|
*/
|
|
57
61
|
(orderPaymentRequestId: string): Promise<NonNullablePaths<GetOrderPaymentRequestURLResponse, `orderPaymentRequestUrl`, 2> & {
|
|
58
62
|
__applicationErrorsType?: GetOrderPaymentRequestUrlApplicationErrors;
|
|
@@ -61,12 +65,18 @@ interface GetOrderPaymentRequestUrlSignature {
|
|
|
61
65
|
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
62
66
|
interface UpdateExtendedFieldsSignature {
|
|
63
67
|
/**
|
|
64
|
-
* Updates extended fields of
|
|
68
|
+
* Updates the extended fields of an order payment request.
|
|
65
69
|
* @param - ID of the entity to update.
|
|
66
70
|
* @param - Identifier for the app whose extended fields are being updated.
|
|
67
71
|
*/
|
|
68
72
|
(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`, 2>): Promise<NonNullablePaths<UpdateExtendedFieldsResponse, `orderPaymentRequest.source.externalId` | `orderPaymentRequest.status` | `orderPaymentRequest.orderId` | `orderPaymentRequest.amount.amount` | `orderPaymentRequest.amount.formattedAmount` | `orderPaymentRequest.currency` | `orderPaymentRequest.title` | `orderPaymentRequest.blockedPaymentMethods`, 4>>;
|
|
69
73
|
}
|
|
74
|
+
declare const onOrderPaymentRequestCreated$1: EventDefinition<OrderPaymentRequestCreatedEnvelope, "wix.ecom.v1.order_payment_request_created">;
|
|
75
|
+
declare const onOrderPaymentRequestDeleted$1: EventDefinition<OrderPaymentRequestDeletedEnvelope, "wix.ecom.v1.order_payment_request_deleted">;
|
|
76
|
+
declare const onOrderPaymentRequestExpired$1: EventDefinition<OrderPaymentRequestExpiredEnvelope, "wix.ecom.v1.order_payment_request_expired">;
|
|
77
|
+
declare const onOrderPaymentRequestPaid$1: EventDefinition<OrderPaymentRequestPaidEnvelope, "wix.ecom.v1.order_payment_request_paid">;
|
|
78
|
+
declare const onOrderPaymentRequestUpdated$1: EventDefinition<OrderPaymentRequestUpdatedEnvelope, "wix.ecom.v1.order_payment_request_updated">;
|
|
79
|
+
declare const onOrderPaymentRequestVoided$1: EventDefinition<OrderPaymentRequestVoidedEnvelope, "wix.ecom.v1.order_payment_request_voided">;
|
|
70
80
|
|
|
71
81
|
declare function customQueryOrderPaymentRequests(httpClient: HttpClient): {
|
|
72
82
|
(): OrderPaymentRequestsQueryBuilder;
|
|
@@ -79,5 +89,29 @@ declare const deleteOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof d
|
|
|
79
89
|
declare const getOrderPaymentRequestUrl: MaybeContext<BuildRESTFunction<typeof getOrderPaymentRequestUrl$1> & typeof getOrderPaymentRequestUrl$1>;
|
|
80
90
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
81
91
|
declare const queryOrderPaymentRequests: MaybeContext<BuildRESTFunction<typeof customQueryOrderPaymentRequests> & typeof customQueryOrderPaymentRequests>;
|
|
92
|
+
/**
|
|
93
|
+
* Triggered when an order payment request is created.
|
|
94
|
+
*/
|
|
95
|
+
declare const onOrderPaymentRequestCreated: BuildEventDefinition<typeof onOrderPaymentRequestCreated$1> & typeof onOrderPaymentRequestCreated$1;
|
|
96
|
+
/**
|
|
97
|
+
* Triggered when an order payment request is deleted.
|
|
98
|
+
*/
|
|
99
|
+
declare const onOrderPaymentRequestDeleted: BuildEventDefinition<typeof onOrderPaymentRequestDeleted$1> & typeof onOrderPaymentRequestDeleted$1;
|
|
100
|
+
/**
|
|
101
|
+
* Triggered when an order payment request's `status` changes to `EXPIRED`.
|
|
102
|
+
*/
|
|
103
|
+
declare const onOrderPaymentRequestExpired: BuildEventDefinition<typeof onOrderPaymentRequestExpired$1> & typeof onOrderPaymentRequestExpired$1;
|
|
104
|
+
/**
|
|
105
|
+
* Triggered when an order payment request's `status` changes to `PAID`.
|
|
106
|
+
*/
|
|
107
|
+
declare const onOrderPaymentRequestPaid: BuildEventDefinition<typeof onOrderPaymentRequestPaid$1> & typeof onOrderPaymentRequestPaid$1;
|
|
108
|
+
/**
|
|
109
|
+
* Triggered when an order payment request is updated.
|
|
110
|
+
*/
|
|
111
|
+
declare const onOrderPaymentRequestUpdated: BuildEventDefinition<typeof onOrderPaymentRequestUpdated$1> & typeof onOrderPaymentRequestUpdated$1;
|
|
112
|
+
/**
|
|
113
|
+
* Triggered when an order payment request's `status` changes to `VOIDED`.
|
|
114
|
+
*/
|
|
115
|
+
declare const onOrderPaymentRequestVoided: BuildEventDefinition<typeof onOrderPaymentRequestVoided$1> & typeof onOrderPaymentRequestVoided$1;
|
|
82
116
|
|
|
83
|
-
export { CreateOrderPaymentRequestApplicationErrors, CreateOrderPaymentRequestOptions, DeleteOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestURLResponse, GetOrderPaymentRequestUrlApplicationErrors, OrderPaymentRequest, OrderPaymentRequestQuery, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, UpdateOrderPaymentRequestApplicationErrors, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest };
|
|
117
|
+
export { CreateOrderPaymentRequestApplicationErrors, CreateOrderPaymentRequestOptions, DeleteOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestURLResponse, GetOrderPaymentRequestUrlApplicationErrors, OrderPaymentRequest, OrderPaymentRequestCreatedEnvelope, OrderPaymentRequestDeletedEnvelope, OrderPaymentRequestExpiredEnvelope, OrderPaymentRequestPaidEnvelope, OrderPaymentRequestQuery, OrderPaymentRequestUpdatedEnvelope, OrderPaymentRequestVoidedEnvelope, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, UpdateOrderPaymentRequestApplicationErrors, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, onOrderPaymentRequestCreated, onOrderPaymentRequestDeleted, onOrderPaymentRequestExpired, onOrderPaymentRequestPaid, onOrderPaymentRequestUpdated, onOrderPaymentRequestVoided, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest };
|
package/build/cjs/index.js
CHANGED
|
@@ -28,6 +28,12 @@ __export(index_exports, {
|
|
|
28
28
|
deleteOrderPaymentRequest: () => deleteOrderPaymentRequest4,
|
|
29
29
|
getOrderPaymentRequest: () => getOrderPaymentRequest4,
|
|
30
30
|
getOrderPaymentRequestUrl: () => getOrderPaymentRequestUrl4,
|
|
31
|
+
onOrderPaymentRequestCreated: () => onOrderPaymentRequestCreated2,
|
|
32
|
+
onOrderPaymentRequestDeleted: () => onOrderPaymentRequestDeleted2,
|
|
33
|
+
onOrderPaymentRequestExpired: () => onOrderPaymentRequestExpired2,
|
|
34
|
+
onOrderPaymentRequestPaid: () => onOrderPaymentRequestPaid2,
|
|
35
|
+
onOrderPaymentRequestUpdated: () => onOrderPaymentRequestUpdated2,
|
|
36
|
+
onOrderPaymentRequestVoided: () => onOrderPaymentRequestVoided2,
|
|
31
37
|
queryOrderPaymentRequests: () => queryOrderPaymentRequests4,
|
|
32
38
|
updateExtendedFields: () => updateExtendedFields4,
|
|
33
39
|
updateOrderPaymentRequest: () => updateOrderPaymentRequest4,
|
|
@@ -36,6 +42,13 @@ __export(index_exports, {
|
|
|
36
42
|
});
|
|
37
43
|
module.exports = __toCommonJS(index_exports);
|
|
38
44
|
|
|
45
|
+
// src/ecom-v1-order-payment-request-order-payment-requests.public.ts
|
|
46
|
+
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
47
|
+
var import_image3 = require("@wix/sdk-runtime/transformations/image");
|
|
48
|
+
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
49
|
+
var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
50
|
+
var import_sdk_types = require("@wix/sdk-types");
|
|
51
|
+
|
|
39
52
|
// src/ecom-v1-order-payment-request-order-payment-requests.universal.ts
|
|
40
53
|
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
41
54
|
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
@@ -743,9 +756,136 @@ function voidOrderPaymentRequest3(httpClient) {
|
|
|
743
756
|
{ httpClient }
|
|
744
757
|
);
|
|
745
758
|
}
|
|
759
|
+
var onOrderPaymentRequestCreated = (0, import_sdk_types.EventDefinition)(
|
|
760
|
+
"wix.ecom.v1.order_payment_request_created",
|
|
761
|
+
true,
|
|
762
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
763
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
764
|
+
{
|
|
765
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
766
|
+
paths: [
|
|
767
|
+
{ path: "entity.expirationDate" },
|
|
768
|
+
{ path: "entity.createdDate" },
|
|
769
|
+
{ path: "entity.updatedDate" },
|
|
770
|
+
{ path: "metadata.eventTime" }
|
|
771
|
+
]
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
775
|
+
paths: [{ path: "entity.image" }]
|
|
776
|
+
}
|
|
777
|
+
])
|
|
778
|
+
)
|
|
779
|
+
)();
|
|
780
|
+
var onOrderPaymentRequestDeleted = (0, import_sdk_types.EventDefinition)(
|
|
781
|
+
"wix.ecom.v1.order_payment_request_deleted",
|
|
782
|
+
true,
|
|
783
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
784
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
785
|
+
{
|
|
786
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
787
|
+
paths: [
|
|
788
|
+
{ path: "entity.expirationDate" },
|
|
789
|
+
{ path: "entity.createdDate" },
|
|
790
|
+
{ path: "entity.updatedDate" },
|
|
791
|
+
{ path: "metadata.eventTime" }
|
|
792
|
+
]
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
796
|
+
paths: [{ path: "entity.image" }]
|
|
797
|
+
}
|
|
798
|
+
])
|
|
799
|
+
)
|
|
800
|
+
)();
|
|
801
|
+
var onOrderPaymentRequestExpired = (0, import_sdk_types.EventDefinition)(
|
|
802
|
+
"wix.ecom.v1.order_payment_request_expired",
|
|
803
|
+
true,
|
|
804
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
805
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
806
|
+
{
|
|
807
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
808
|
+
paths: [
|
|
809
|
+
{ path: "data.orderPaymentRequest.expirationDate" },
|
|
810
|
+
{ path: "data.orderPaymentRequest.createdDate" },
|
|
811
|
+
{ path: "data.orderPaymentRequest.updatedDate" },
|
|
812
|
+
{ path: "metadata.eventTime" }
|
|
813
|
+
]
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
817
|
+
paths: [{ path: "data.orderPaymentRequest.image" }]
|
|
818
|
+
}
|
|
819
|
+
])
|
|
820
|
+
)
|
|
821
|
+
)();
|
|
822
|
+
var onOrderPaymentRequestPaid = (0, import_sdk_types.EventDefinition)(
|
|
823
|
+
"wix.ecom.v1.order_payment_request_paid",
|
|
824
|
+
true,
|
|
825
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
826
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
827
|
+
{
|
|
828
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
829
|
+
paths: [
|
|
830
|
+
{ path: "data.orderPaymentRequest.expirationDate" },
|
|
831
|
+
{ path: "data.orderPaymentRequest.createdDate" },
|
|
832
|
+
{ path: "data.orderPaymentRequest.updatedDate" },
|
|
833
|
+
{ path: "metadata.eventTime" }
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
838
|
+
paths: [{ path: "data.orderPaymentRequest.image" }]
|
|
839
|
+
}
|
|
840
|
+
])
|
|
841
|
+
)
|
|
842
|
+
)();
|
|
843
|
+
var onOrderPaymentRequestUpdated = (0, import_sdk_types.EventDefinition)(
|
|
844
|
+
"wix.ecom.v1.order_payment_request_updated",
|
|
845
|
+
true,
|
|
846
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
847
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
848
|
+
{
|
|
849
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
850
|
+
paths: [
|
|
851
|
+
{ path: "entity.expirationDate" },
|
|
852
|
+
{ path: "entity.createdDate" },
|
|
853
|
+
{ path: "entity.updatedDate" },
|
|
854
|
+
{ path: "metadata.eventTime" }
|
|
855
|
+
]
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
859
|
+
paths: [{ path: "entity.image" }]
|
|
860
|
+
}
|
|
861
|
+
])
|
|
862
|
+
)
|
|
863
|
+
)();
|
|
864
|
+
var onOrderPaymentRequestVoided = (0, import_sdk_types.EventDefinition)(
|
|
865
|
+
"wix.ecom.v1.order_payment_request_voided",
|
|
866
|
+
true,
|
|
867
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
868
|
+
(0, import_transform_paths3.transformPaths)(event, [
|
|
869
|
+
{
|
|
870
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
871
|
+
paths: [
|
|
872
|
+
{ path: "data.orderPaymentRequest.expirationDate" },
|
|
873
|
+
{ path: "data.orderPaymentRequest.createdDate" },
|
|
874
|
+
{ path: "data.orderPaymentRequest.updatedDate" },
|
|
875
|
+
{ path: "metadata.eventTime" }
|
|
876
|
+
]
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
880
|
+
paths: [{ path: "data.orderPaymentRequest.image" }]
|
|
881
|
+
}
|
|
882
|
+
])
|
|
883
|
+
)
|
|
884
|
+
)();
|
|
746
885
|
|
|
747
886
|
// src/ecom-v1-order-payment-request-order-payment-requests.context.ts
|
|
748
887
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
888
|
+
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
749
889
|
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
750
890
|
function customQueryOrderPaymentRequests(httpClient) {
|
|
751
891
|
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
@@ -766,6 +906,24 @@ var getOrderPaymentRequestUrl4 = /* @__PURE__ */ (0, import_rest_modules3.create
|
|
|
766
906
|
var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
|
|
767
907
|
var voidOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(voidOrderPaymentRequest3);
|
|
768
908
|
var queryOrderPaymentRequests4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryOrderPaymentRequests);
|
|
909
|
+
var onOrderPaymentRequestCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
910
|
+
onOrderPaymentRequestCreated
|
|
911
|
+
);
|
|
912
|
+
var onOrderPaymentRequestDeleted2 = (0, import_event_definition_modules.createEventModule)(
|
|
913
|
+
onOrderPaymentRequestDeleted
|
|
914
|
+
);
|
|
915
|
+
var onOrderPaymentRequestExpired2 = (0, import_event_definition_modules.createEventModule)(
|
|
916
|
+
onOrderPaymentRequestExpired
|
|
917
|
+
);
|
|
918
|
+
var onOrderPaymentRequestPaid2 = (0, import_event_definition_modules.createEventModule)(
|
|
919
|
+
onOrderPaymentRequestPaid
|
|
920
|
+
);
|
|
921
|
+
var onOrderPaymentRequestUpdated2 = (0, import_event_definition_modules.createEventModule)(
|
|
922
|
+
onOrderPaymentRequestUpdated
|
|
923
|
+
);
|
|
924
|
+
var onOrderPaymentRequestVoided2 = (0, import_event_definition_modules.createEventModule)(
|
|
925
|
+
onOrderPaymentRequestVoided
|
|
926
|
+
);
|
|
769
927
|
// Annotate the CommonJS export names for ESM import in node:
|
|
770
928
|
0 && (module.exports = {
|
|
771
929
|
PaymentMethod,
|
|
@@ -776,6 +934,12 @@ var queryOrderPaymentRequests4 = /* @__PURE__ */ (0, import_rest_modules3.create
|
|
|
776
934
|
deleteOrderPaymentRequest,
|
|
777
935
|
getOrderPaymentRequest,
|
|
778
936
|
getOrderPaymentRequestUrl,
|
|
937
|
+
onOrderPaymentRequestCreated,
|
|
938
|
+
onOrderPaymentRequestDeleted,
|
|
939
|
+
onOrderPaymentRequestExpired,
|
|
940
|
+
onOrderPaymentRequestPaid,
|
|
941
|
+
onOrderPaymentRequestUpdated,
|
|
942
|
+
onOrderPaymentRequestVoided,
|
|
779
943
|
queryOrderPaymentRequests,
|
|
780
944
|
updateExtendedFields,
|
|
781
945
|
updateOrderPaymentRequest,
|