@wix/auto_sdk_ecom_order-payment-requests 1.0.60 → 1.0.62
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 +33 -16
- package/build/cjs/index.js +100 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +171 -61
- package/build/cjs/index.typings.js +91 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +116 -35
- package/build/cjs/meta.js +65 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +5 -1
- package/build/cjs/schemas.js +116 -117
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +33 -16
- package/build/es/index.mjs +99 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +171 -61
- package/build/es/index.typings.mjs +90 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +116 -35
- package/build/es/meta.mjs +64 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +5 -1
- package/build/es/schemas.mjs +113 -116
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +40 -18
- package/build/internal/cjs/index.js +100 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +187 -71
- package/build/internal/cjs/index.typings.js +91 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +116 -35
- package/build/internal/cjs/meta.js +65 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +5 -1
- package/build/internal/cjs/schemas.js +116 -117
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +40 -18
- package/build/internal/es/index.mjs +99 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +187 -71
- package/build/internal/es/index.typings.mjs +90 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +116 -35
- package/build/internal/es/meta.mjs +64 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +5 -1
- package/build/internal/es/schemas.mjs +113 -116
- 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
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,
|
|
2
|
+
import { CreateOrderPaymentRequestOptions, OrderPaymentRequest, CreateOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestApplicationErrors, UpdateOrderPaymentRequest, UpdateOrderPaymentRequestApplicationErrors, DeleteOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestURLResponse, GetOrderPaymentRequestUrlApplicationErrors, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, VoidOrderPaymentRequestApplicationErrors, OrderPaymentRequestCreatedEnvelope, OrderPaymentRequestDeletedEnvelope, OrderPaymentRequestExpiredEnvelope, OrderPaymentRequestPaidEnvelope, OrderPaymentRequestUpdatedEnvelope, OrderPaymentRequestVoidedEnvelope, OrderPaymentRequestsQueryBuilder, OrderPaymentRequestQuery, typedQueryOrderPaymentRequests } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, ActionLink, ActionLinks, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateOrderPaymentRequestsOptions, BulkCreateOrderPaymentRequestsRequest, BulkCreateOrderPaymentRequestsResponse, BulkOrderPaymentRequestItem, BulkOrderPaymentRequestResult, CommonQueryWithEntityContext, CreateOrderPaymentRequestRequest, CreateOrderPaymentRequestResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteOrderPaymentRequestRequest, DeleteOrderPaymentRequestResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetOrderPaymentRequestRequest, GetOrderPaymentRequestResponse, GetOrderPaymentRequestURLRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, OrderPaymentRequestExpired, OrderPaymentRequestPaid, OrderPaymentRequestQuerySpec, OrderPaymentRequestVoided, OrderPaymentRequestsQueryResult, PaymentMethod, PaymentMethodWithLiterals, Price, QueryOrderPaymentRequestsRequest, QueryOrderPaymentRequestsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Source, Status, StatusWithLiterals, SubscriptionInfo, UpdateExtendedFieldsRequest, UpdateOrderPaymentRequestRequest, UpdateOrderPaymentRequestResponse, 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;
|
|
@@ -30,7 +34,7 @@ interface UpdateOrderPaymentRequestSignature {
|
|
|
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;
|
|
@@ -42,7 +46,7 @@ interface DeleteOrderPaymentRequestSignature {
|
|
|
42
46
|
* Deletes an order payment request.
|
|
43
47
|
*
|
|
44
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`.
|
|
45
|
-
* @param -
|
|
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,24 @@ 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 function voidOrderPaymentRequest$1(httpClient: HttpClient): VoidOrderPaymentRequestSignature;
|
|
75
|
+
interface VoidOrderPaymentRequestSignature {
|
|
76
|
+
/**
|
|
77
|
+
* Voids the given order payment request.
|
|
78
|
+
*
|
|
79
|
+
* Only `UNPAID` order payment requests can be voided. Voiding an order payment request that is already `VOIDED` succeeds without making any changes. Voiding a `PAID` or `EXPIRED` order payment request fails.
|
|
80
|
+
* @param - ID of the order payment request to void.
|
|
81
|
+
*/
|
|
82
|
+
(orderPaymentRequestId: string): Promise<void & {
|
|
83
|
+
__applicationErrorsType?: VoidOrderPaymentRequestApplicationErrors;
|
|
84
|
+
}>;
|
|
85
|
+
}
|
|
70
86
|
declare const onOrderPaymentRequestCreated$1: EventDefinition<OrderPaymentRequestCreatedEnvelope, "wix.ecom.v1.order_payment_request_created">;
|
|
71
87
|
declare const onOrderPaymentRequestDeleted$1: EventDefinition<OrderPaymentRequestDeletedEnvelope, "wix.ecom.v1.order_payment_request_deleted">;
|
|
72
88
|
declare const onOrderPaymentRequestExpired$1: EventDefinition<OrderPaymentRequestExpiredEnvelope, "wix.ecom.v1.order_payment_request_expired">;
|
|
@@ -84,6 +100,7 @@ declare const updateOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof u
|
|
|
84
100
|
declare const deleteOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof deleteOrderPaymentRequest$1> & typeof deleteOrderPaymentRequest$1>;
|
|
85
101
|
declare const getOrderPaymentRequestUrl: MaybeContext<BuildRESTFunction<typeof getOrderPaymentRequestUrl$1> & typeof getOrderPaymentRequestUrl$1>;
|
|
86
102
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
103
|
+
declare const voidOrderPaymentRequest: MaybeContext<BuildRESTFunction<typeof voidOrderPaymentRequest$1> & typeof voidOrderPaymentRequest$1>;
|
|
87
104
|
declare const queryOrderPaymentRequests: MaybeContext<BuildRESTFunction<typeof customQueryOrderPaymentRequests> & typeof customQueryOrderPaymentRequests>;
|
|
88
105
|
/**
|
|
89
106
|
* Triggered when an order payment request is created.
|
|
@@ -94,11 +111,11 @@ declare const onOrderPaymentRequestCreated: BuildEventDefinition<typeof onOrderP
|
|
|
94
111
|
*/
|
|
95
112
|
declare const onOrderPaymentRequestDeleted: BuildEventDefinition<typeof onOrderPaymentRequestDeleted$1> & typeof onOrderPaymentRequestDeleted$1;
|
|
96
113
|
/**
|
|
97
|
-
* Triggered when an order payment request status
|
|
114
|
+
* Triggered when an order payment request's `status` changes to `EXPIRED`.
|
|
98
115
|
*/
|
|
99
116
|
declare const onOrderPaymentRequestExpired: BuildEventDefinition<typeof onOrderPaymentRequestExpired$1> & typeof onOrderPaymentRequestExpired$1;
|
|
100
117
|
/**
|
|
101
|
-
* Triggered when an order payment request status
|
|
118
|
+
* Triggered when an order payment request's `status` changes to `PAID`.
|
|
102
119
|
*/
|
|
103
120
|
declare const onOrderPaymentRequestPaid: BuildEventDefinition<typeof onOrderPaymentRequestPaid$1> & typeof onOrderPaymentRequestPaid$1;
|
|
104
121
|
/**
|
|
@@ -106,8 +123,8 @@ declare const onOrderPaymentRequestPaid: BuildEventDefinition<typeof onOrderPaym
|
|
|
106
123
|
*/
|
|
107
124
|
declare const onOrderPaymentRequestUpdated: BuildEventDefinition<typeof onOrderPaymentRequestUpdated$1> & typeof onOrderPaymentRequestUpdated$1;
|
|
108
125
|
/**
|
|
109
|
-
* Triggered when an order payment request status
|
|
126
|
+
* Triggered when an order payment request's `status` changes to `VOIDED`.
|
|
110
127
|
*/
|
|
111
128
|
declare const onOrderPaymentRequestVoided: BuildEventDefinition<typeof onOrderPaymentRequestVoided$1> & typeof onOrderPaymentRequestVoided$1;
|
|
112
129
|
|
|
113
|
-
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 };
|
|
130
|
+
export { CreateOrderPaymentRequestApplicationErrors, CreateOrderPaymentRequestOptions, DeleteOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestApplicationErrors, GetOrderPaymentRequestURLResponse, GetOrderPaymentRequestUrlApplicationErrors, OrderPaymentRequest, OrderPaymentRequestCreatedEnvelope, OrderPaymentRequestDeletedEnvelope, OrderPaymentRequestExpiredEnvelope, OrderPaymentRequestPaidEnvelope, OrderPaymentRequestQuery, OrderPaymentRequestUpdatedEnvelope, OrderPaymentRequestVoidedEnvelope, OrderPaymentRequestsQueryBuilder, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateOrderPaymentRequest, UpdateOrderPaymentRequestApplicationErrors, VoidOrderPaymentRequestApplicationErrors, createOrderPaymentRequest, deleteOrderPaymentRequest, getOrderPaymentRequest, getOrderPaymentRequestUrl, onOrderPaymentRequestCreated, onOrderPaymentRequestDeleted, onOrderPaymentRequestExpired, onOrderPaymentRequestPaid, onOrderPaymentRequestUpdated, onOrderPaymentRequestVoided, queryOrderPaymentRequests, updateExtendedFields, updateOrderPaymentRequest, voidOrderPaymentRequest };
|
package/build/cjs/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
SortOrder: () => SortOrder,
|
|
25
25
|
Status: () => Status,
|
|
26
26
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
27
|
+
bulkCreateOrderPaymentRequests: () => bulkCreateOrderPaymentRequests4,
|
|
27
28
|
createOrderPaymentRequest: () => createOrderPaymentRequest4,
|
|
28
29
|
deleteOrderPaymentRequest: () => deleteOrderPaymentRequest4,
|
|
29
30
|
getOrderPaymentRequest: () => getOrderPaymentRequest4,
|
|
@@ -142,6 +143,49 @@ function createOrderPaymentRequest(payload) {
|
|
|
142
143
|
}
|
|
143
144
|
return __createOrderPaymentRequest;
|
|
144
145
|
}
|
|
146
|
+
function bulkCreateOrderPaymentRequests(payload) {
|
|
147
|
+
function __bulkCreateOrderPaymentRequests({ host }) {
|
|
148
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
149
|
+
{
|
|
150
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
151
|
+
paths: [
|
|
152
|
+
{ path: "orderPaymentRequests.expirationDate" },
|
|
153
|
+
{ path: "orderPaymentRequests.createdDate" },
|
|
154
|
+
{ path: "orderPaymentRequests.updatedDate" }
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
]);
|
|
158
|
+
const metadata = {
|
|
159
|
+
entityFqdn: "wix.ecom.v1.order_payment_request",
|
|
160
|
+
method: "POST",
|
|
161
|
+
methodFqn: "wix.ecom.order_payment_request.api.v1.OrderPaymentRequestsService.BulkCreateOrderPaymentRequests",
|
|
162
|
+
packageName: PACKAGE_NAME,
|
|
163
|
+
migrationOptions: {
|
|
164
|
+
optInTransformResponse: true
|
|
165
|
+
},
|
|
166
|
+
url: resolveWixEcomOrderPaymentRequestApiV1OrderPaymentRequestsServiceUrl(
|
|
167
|
+
{
|
|
168
|
+
protoPath: "/v1/bulk/order-payment-requests/create",
|
|
169
|
+
data: serializedData,
|
|
170
|
+
host
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
data: serializedData,
|
|
174
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
175
|
+
{
|
|
176
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
177
|
+
paths: [
|
|
178
|
+
{ path: "results.item.orderPaymentRequest.expirationDate" },
|
|
179
|
+
{ path: "results.item.orderPaymentRequest.createdDate" },
|
|
180
|
+
{ path: "results.item.orderPaymentRequest.updatedDate" }
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
])
|
|
184
|
+
};
|
|
185
|
+
return metadata;
|
|
186
|
+
}
|
|
187
|
+
return __bulkCreateOrderPaymentRequests;
|
|
188
|
+
}
|
|
145
189
|
function getOrderPaymentRequest(payload) {
|
|
146
190
|
function __getOrderPaymentRequest({ host }) {
|
|
147
191
|
const metadata = {
|
|
@@ -417,6 +461,52 @@ async function createOrderPaymentRequest2(options) {
|
|
|
417
461
|
throw transformedError;
|
|
418
462
|
}
|
|
419
463
|
}
|
|
464
|
+
async function bulkCreateOrderPaymentRequests2(orderPaymentRequests, options) {
|
|
465
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
466
|
+
const payload = (0, import_transform_paths2.transformPaths)(
|
|
467
|
+
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
468
|
+
orderPaymentRequests,
|
|
469
|
+
returnEntity: options?.returnEntity
|
|
470
|
+
}),
|
|
471
|
+
[
|
|
472
|
+
{
|
|
473
|
+
transformFn: import_image.transformSDKImageToRESTImage,
|
|
474
|
+
paths: [{ path: "orderPaymentRequests.image" }]
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
);
|
|
478
|
+
const reqOpts = bulkCreateOrderPaymentRequests(
|
|
479
|
+
payload
|
|
480
|
+
);
|
|
481
|
+
sideEffects?.onSiteCall?.();
|
|
482
|
+
try {
|
|
483
|
+
const result = await httpClient.request(reqOpts);
|
|
484
|
+
sideEffects?.onSuccess?.(result);
|
|
485
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
486
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
487
|
+
{
|
|
488
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
489
|
+
paths: [{ path: "results.item.orderPaymentRequest.image" }]
|
|
490
|
+
}
|
|
491
|
+
])
|
|
492
|
+
);
|
|
493
|
+
} catch (err) {
|
|
494
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
495
|
+
err,
|
|
496
|
+
{
|
|
497
|
+
spreadPathsToArguments: {},
|
|
498
|
+
explicitPathsToArguments: {
|
|
499
|
+
orderPaymentRequests: "$[0]",
|
|
500
|
+
returnEntity: "$[1].returnEntity"
|
|
501
|
+
},
|
|
502
|
+
singleArgumentUnchanged: false
|
|
503
|
+
},
|
|
504
|
+
["orderPaymentRequests", "options"]
|
|
505
|
+
);
|
|
506
|
+
sideEffects?.onError?.(err);
|
|
507
|
+
throw transformedError;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
420
510
|
async function getOrderPaymentRequest2(orderPaymentRequestId) {
|
|
421
511
|
const { httpClient, sideEffects } = arguments[1];
|
|
422
512
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -698,6 +788,14 @@ function createOrderPaymentRequest3(httpClient) {
|
|
|
698
788
|
{ httpClient }
|
|
699
789
|
);
|
|
700
790
|
}
|
|
791
|
+
function bulkCreateOrderPaymentRequests3(httpClient) {
|
|
792
|
+
return (orderPaymentRequests, options) => bulkCreateOrderPaymentRequests2(
|
|
793
|
+
orderPaymentRequests,
|
|
794
|
+
options,
|
|
795
|
+
// @ts-ignore
|
|
796
|
+
{ httpClient }
|
|
797
|
+
);
|
|
798
|
+
}
|
|
701
799
|
function getOrderPaymentRequest3(httpClient) {
|
|
702
800
|
return (orderPaymentRequestId) => getOrderPaymentRequest2(
|
|
703
801
|
orderPaymentRequestId,
|
|
@@ -899,6 +997,7 @@ function customQueryOrderPaymentRequests(httpClient) {
|
|
|
899
997
|
return overloadedQuery;
|
|
900
998
|
}
|
|
901
999
|
var createOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createOrderPaymentRequest3);
|
|
1000
|
+
var bulkCreateOrderPaymentRequests4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateOrderPaymentRequests3);
|
|
902
1001
|
var getOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrderPaymentRequest3);
|
|
903
1002
|
var updateOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateOrderPaymentRequest3);
|
|
904
1003
|
var deleteOrderPaymentRequest4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteOrderPaymentRequest3);
|
|
@@ -930,6 +1029,7 @@ var onOrderPaymentRequestVoided2 = (0, import_event_definition_modules.createEve
|
|
|
930
1029
|
SortOrder,
|
|
931
1030
|
Status,
|
|
932
1031
|
WebhookIdentityType,
|
|
1032
|
+
bulkCreateOrderPaymentRequests,
|
|
933
1033
|
createOrderPaymentRequest,
|
|
934
1034
|
deleteOrderPaymentRequest,
|
|
935
1035
|
getOrderPaymentRequest,
|