@wix/auto_sdk_ecom_abandoned-checkouts 1.0.47 → 1.0.48
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/{ecom-v1-abandoned-checkout-abandoned-checkouts.universal-CCZj0Gfc.d.ts → ecom-v1-abandoned-checkout-abandoned-checkouts.universal-DhcdCax5.d.ts} +7 -1
- package/build/cjs/index.d.ts +8 -17
- package/build/cjs/index.js +53 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js +37 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/es/{ecom-v1-abandoned-checkout-abandoned-checkouts.universal-CCZj0Gfc.d.mts → ecom-v1-abandoned-checkout-abandoned-checkouts.universal-DhcdCax5.d.mts} +7 -1
- package/build/es/index.d.mts +8 -17
- package/build/es/index.mjs +53 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs +35 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -1
- package/build/internal/cjs/{ecom-v1-abandoned-checkout-abandoned-checkouts.universal-DTc3f1_H.d.ts → ecom-v1-abandoned-checkout-abandoned-checkouts.universal-WxTvIcU0.d.ts} +7 -1
- package/build/internal/cjs/index.d.ts +8 -17
- package/build/internal/cjs/index.js +53 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js +37 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -1
- package/build/internal/es/{ecom-v1-abandoned-checkout-abandoned-checkouts.universal-DTc3f1_H.d.mts → ecom-v1-abandoned-checkout-abandoned-checkouts.universal-WxTvIcU0.d.mts} +7 -1
- package/build/internal/es/index.d.mts +8 -17
- package/build/internal/es/index.mjs +53 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs +35 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { A as AbandonedCheckout, B as BulkDeleteAbandonedCheckoutsResponse, a as
|
|
3
|
-
export {
|
|
2
|
+
import { A as AbandonedCheckout, B as BulkDeleteAbandonedCheckoutsResponse, a as AbandonedCheckoutSearch, S as SearchAbandonedCheckoutsResponse, b as AddAbandonedCheckoutActivityOptions, c as AddAbandonedCheckoutActivityResponse, R as RawHttpResponse, d as AbandonedCheckoutCreatedEnvelope, e as AbandonedCheckoutDeletedEnvelope, f as AbandonedCheckoutRecoveredEnvelope, g as AbandonedCheckoutUpdatedEnvelope, h as AbandonedCheckoutsQueryBuilder, Q as QueryV2, t as typedQueryAbandonedCheckouts } from './ecom-v1-abandoned-checkout-abandoned-checkouts.universal-WxTvIcU0.js';
|
|
3
|
+
export { Y as AbandonedCheckoutRecovered, aL as AbandonedCheckoutSearchSpec, aK as AbandonedCheckoutsQueryResult, aD as ActionEvent, q as Activity, i as ActivityType, aM as ActivityTypeWithLiterals, an as AddAbandonedCheckoutActivityRequest, a3 as ApplicationError, E as AppliedDiscount, G as AppliedDiscountDiscountSourceOneOf, aI as BaseEventMetadata, a4 as BulkAbandonedCheckoutResult, a5 as BulkActionMetadata, a1 as BulkDeleteAbandonedCheckoutsRequest, T as BuyerInfo, at as Cancel, O as CartAbandonedEvent, X as CartRecoveredEvent, r as CatalogReference, y as Color, ak as CommonCursorPaging, am as CommonCursors, aj as CommonPaging, al as CommonPagingMetadataV2, aW as CommonSearchWithEntityContext, C as CommonSortOrder, aT as CommonSortOrderWithLiterals, ah as CommonSorting, as as Complete, H as Coupon, aa as CursorPaging, ad as Cursors, $ as DeleteAbandonedCheckoutRequest, a0 as DeleteAbandonedCheckoutResponse, s as DescriptionLine, v as DescriptionLineDescriptionLineValueOneOf, w as DescriptionLineName, D as DescriptionLineType, aP as DescriptionLineTypeWithLiterals, u as DescriptionLineValueOneOf, K as DiscountRule, N as DiscountRuleName, k as DiscountType, aQ as DiscountTypeWithLiterals, ax as DomainEvent, ay as DomainEventBodyOneOf, aE as Empty, az as EntityCreatedEvent, aC as EntityDeletedEvent, aB as EntityUpdatedEvent, aJ as EventMetadata, F as FullAddressContactDetails, Z as GetAbandonedCheckoutRequest, _ as GetAbandonedCheckoutResponse, aw as HeadersEntry, aG as IdentificationData, aH as IdentificationDataIdOneOf, I as Identity, aR as IdentityWithLiterals, a2 as ItemMetadata, L as LineItem, J as MerchantDiscount, aF as MessageEnvelope, M as Mode, aU as ModeWithLiterals, p as MultiCurrencyPrice, a9 as Paging, ac as PagingMetadataV2, z as PhysicalProperties, x as PlainTextValue, P as ProductName, a6 as QueryAbandonedCheckoutsRequest, ab as QueryAbandonedCheckoutsResponse, a7 as QueryV2PagingMethodOneOf, av as RedirectToCheckoutRequest, au as Reschedule, aA as RestoreInfo, af as Search, ae as SearchAbandonedCheckoutsRequest, ai as SearchDetails, ag as SearchPagingMethodOneOf, l as SortOrder, aS as SortOrderWithLiterals, a8 as Sorting, j as Status, aN as StatusWithLiterals, ao as Task, aq as TaskAction, ar as TaskActionActionOneOf, ap as TaskKey, U as Totals, m as V1BuyerInfo, n as V1BuyerInfoIdOneOf, o as VatId, V as VatType, aO as VatTypeWithLiterals, W as WebhookIdentityType, aV as WebhookIdentityTypeWithLiterals } from './ecom-v1-abandoned-checkout-abandoned-checkouts.universal-WxTvIcU0.js';
|
|
4
4
|
|
|
5
5
|
declare function getAbandonedCheckout$1(httpClient: HttpClient): GetAbandonedCheckoutSignature;
|
|
6
6
|
interface GetAbandonedCheckoutSignature {
|
|
@@ -27,19 +27,6 @@ interface BulkDeleteAbandonedCheckoutsSignature {
|
|
|
27
27
|
*/
|
|
28
28
|
(abandonedCheckoutIds: string[]): Promise<NonNullablePaths<BulkDeleteAbandonedCheckoutsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
29
29
|
}
|
|
30
|
-
declare function queryAbandonedCheckouts$1(httpClient: HttpClient): QueryAbandonedCheckoutsSignature;
|
|
31
|
-
interface QueryAbandonedCheckoutsSignature {
|
|
32
|
-
/**
|
|
33
|
-
* Creates a query to retrieve a list of abandoned checkouts.
|
|
34
|
-
*
|
|
35
|
-
* The `queryAbandonedCheckouts()` function builds a query to retrieve a list of abandoned checkouts and returns a `ResultsQueryBuilder` object.
|
|
36
|
-
*
|
|
37
|
-
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
38
|
-
*
|
|
39
|
-
* You can refine the query by chaining `ResultsQueryBuilder` functions onto the query. `ResultsQueryBuilder` functions enable you to sort, filter, and control the results `queryAbandonedCheckouts()` returns.
|
|
40
|
-
*/
|
|
41
|
-
(): AbandonedCheckoutsQueryBuilder;
|
|
42
|
-
}
|
|
43
30
|
declare function searchAbandonedCheckouts$1(httpClient: HttpClient): SearchAbandonedCheckoutsSignature;
|
|
44
31
|
interface SearchAbandonedCheckoutsSignature {
|
|
45
32
|
/**
|
|
@@ -71,14 +58,18 @@ declare const onAbandonedCheckoutDeleted$1: EventDefinition<AbandonedCheckoutDel
|
|
|
71
58
|
declare const onAbandonedCheckoutRecovered$1: EventDefinition<AbandonedCheckoutRecoveredEnvelope, "wix.ecom.v1.abandoned_checkout_recovered">;
|
|
72
59
|
declare const onAbandonedCheckoutUpdated$1: EventDefinition<AbandonedCheckoutUpdatedEnvelope, "wix.ecom.v1.abandoned_checkout_updated">;
|
|
73
60
|
|
|
61
|
+
declare function customQueryAbandonedCheckouts(httpClient: HttpClient): {
|
|
62
|
+
(): AbandonedCheckoutsQueryBuilder;
|
|
63
|
+
(query: QueryV2): ReturnType<typeof typedQueryAbandonedCheckouts>;
|
|
64
|
+
};
|
|
74
65
|
declare const getAbandonedCheckout: MaybeContext<BuildRESTFunction<typeof getAbandonedCheckout$1> & typeof getAbandonedCheckout$1>;
|
|
75
66
|
declare const deleteAbandonedCheckout: MaybeContext<BuildRESTFunction<typeof deleteAbandonedCheckout$1> & typeof deleteAbandonedCheckout$1>;
|
|
76
67
|
declare const bulkDeleteAbandonedCheckouts: MaybeContext<BuildRESTFunction<typeof bulkDeleteAbandonedCheckouts$1> & typeof bulkDeleteAbandonedCheckouts$1>;
|
|
77
|
-
declare const queryAbandonedCheckouts: MaybeContext<BuildRESTFunction<typeof queryAbandonedCheckouts$1> & typeof queryAbandonedCheckouts$1>;
|
|
78
68
|
declare const searchAbandonedCheckouts: MaybeContext<BuildRESTFunction<typeof searchAbandonedCheckouts$1> & typeof searchAbandonedCheckouts$1>;
|
|
79
69
|
/** @internal */
|
|
80
70
|
declare const addAbandonedCheckoutActivity: MaybeContext<BuildRESTFunction<typeof addAbandonedCheckoutActivity$1> & typeof addAbandonedCheckoutActivity$1>;
|
|
81
71
|
declare const redirectToCheckout: MaybeContext<BuildRESTFunction<typeof redirectToCheckout$1> & typeof redirectToCheckout$1>;
|
|
72
|
+
declare const queryAbandonedCheckouts: MaybeContext<BuildRESTFunction<typeof customQueryAbandonedCheckouts> & typeof customQueryAbandonedCheckouts>;
|
|
82
73
|
/**
|
|
83
74
|
* Triggered when an abandoned checkout is created.
|
|
84
75
|
*/
|
|
@@ -96,4 +87,4 @@ declare const onAbandonedCheckoutRecovered: BuildEventDefinition<typeof onAbando
|
|
|
96
87
|
*/
|
|
97
88
|
declare const onAbandonedCheckoutUpdated: BuildEventDefinition<typeof onAbandonedCheckoutUpdated$1> & typeof onAbandonedCheckoutUpdated$1;
|
|
98
89
|
|
|
99
|
-
export { AbandonedCheckout, AbandonedCheckoutCreatedEnvelope, AbandonedCheckoutDeletedEnvelope, AbandonedCheckoutRecoveredEnvelope, AbandonedCheckoutSearch, AbandonedCheckoutUpdatedEnvelope, AbandonedCheckoutsQueryBuilder, AddAbandonedCheckoutActivityOptions, AddAbandonedCheckoutActivityResponse, BulkDeleteAbandonedCheckoutsResponse, RawHttpResponse, SearchAbandonedCheckoutsResponse, addAbandonedCheckoutActivity, bulkDeleteAbandonedCheckouts, deleteAbandonedCheckout, getAbandonedCheckout, onAbandonedCheckoutCreated, onAbandonedCheckoutDeleted, onAbandonedCheckoutRecovered, onAbandonedCheckoutUpdated, queryAbandonedCheckouts, redirectToCheckout, searchAbandonedCheckouts };
|
|
90
|
+
export { AbandonedCheckout, AbandonedCheckoutCreatedEnvelope, AbandonedCheckoutDeletedEnvelope, AbandonedCheckoutRecoveredEnvelope, AbandonedCheckoutSearch, AbandonedCheckoutUpdatedEnvelope, AbandonedCheckoutsQueryBuilder, AddAbandonedCheckoutActivityOptions, AddAbandonedCheckoutActivityResponse, BulkDeleteAbandonedCheckoutsResponse, QueryV2, RawHttpResponse, SearchAbandonedCheckoutsResponse, addAbandonedCheckoutActivity, bulkDeleteAbandonedCheckouts, deleteAbandonedCheckout, getAbandonedCheckout, onAbandonedCheckoutCreated, onAbandonedCheckoutDeleted, onAbandonedCheckoutRecovered, onAbandonedCheckoutUpdated, queryAbandonedCheckouts, redirectToCheckout, searchAbandonedCheckouts };
|
|
@@ -556,6 +556,39 @@ function queryAbandonedCheckouts2() {
|
|
|
556
556
|
transformationPaths: {}
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
|
+
async function typedQueryAbandonedCheckouts(query) {
|
|
560
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
561
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
562
|
+
const reqOpts = queryAbandonedCheckouts(payload);
|
|
563
|
+
sideEffects?.onSiteCall?.();
|
|
564
|
+
try {
|
|
565
|
+
const result = await httpClient.request(reqOpts);
|
|
566
|
+
sideEffects?.onSuccess?.(result);
|
|
567
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
568
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
569
|
+
{
|
|
570
|
+
transformFn: import_image.transformRESTImageToSDKImage,
|
|
571
|
+
paths: [
|
|
572
|
+
{ path: "results.lineItems.image" },
|
|
573
|
+
{ path: "abandonedCheckouts.lineItems.image" }
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
])
|
|
577
|
+
);
|
|
578
|
+
} catch (err) {
|
|
579
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
580
|
+
err,
|
|
581
|
+
{
|
|
582
|
+
spreadPathsToArguments: {},
|
|
583
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
584
|
+
singleArgumentUnchanged: false
|
|
585
|
+
},
|
|
586
|
+
["query"]
|
|
587
|
+
);
|
|
588
|
+
sideEffects?.onError?.(err);
|
|
589
|
+
throw transformedError;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
559
592
|
async function searchAbandonedCheckouts2(search) {
|
|
560
593
|
const { httpClient, sideEffects } = arguments[1];
|
|
561
594
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search });
|
|
@@ -680,6 +713,13 @@ function queryAbandonedCheckouts3(httpClient) {
|
|
|
680
713
|
{ httpClient }
|
|
681
714
|
);
|
|
682
715
|
}
|
|
716
|
+
function typedQueryAbandonedCheckouts2(httpClient) {
|
|
717
|
+
return (query) => typedQueryAbandonedCheckouts(
|
|
718
|
+
query,
|
|
719
|
+
// @ts-ignore
|
|
720
|
+
{ httpClient }
|
|
721
|
+
);
|
|
722
|
+
}
|
|
683
723
|
function searchAbandonedCheckouts3(httpClient) {
|
|
684
724
|
return (search) => searchAbandonedCheckouts2(
|
|
685
725
|
search,
|
|
@@ -827,13 +867,25 @@ var onAbandonedCheckoutUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
827
867
|
// src/ecom-v1-abandoned-checkout-abandoned-checkouts.context.ts
|
|
828
868
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
829
869
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
870
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
871
|
+
function customQueryAbandonedCheckouts(httpClient) {
|
|
872
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
873
|
+
builderQueryFunction: () => queryAbandonedCheckouts3(httpClient)(),
|
|
874
|
+
typedQueryFunction: (query) => typedQueryAbandonedCheckouts2(httpClient)(query),
|
|
875
|
+
hasOptionsParameter: false
|
|
876
|
+
});
|
|
877
|
+
function overloadedQuery(query) {
|
|
878
|
+
return router(...arguments);
|
|
879
|
+
}
|
|
880
|
+
return overloadedQuery;
|
|
881
|
+
}
|
|
830
882
|
var getAbandonedCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAbandonedCheckout3);
|
|
831
883
|
var deleteAbandonedCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteAbandonedCheckout3);
|
|
832
884
|
var bulkDeleteAbandonedCheckouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteAbandonedCheckouts3);
|
|
833
|
-
var queryAbandonedCheckouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryAbandonedCheckouts3);
|
|
834
885
|
var searchAbandonedCheckouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchAbandonedCheckouts3);
|
|
835
886
|
var addAbandonedCheckoutActivity4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addAbandonedCheckoutActivity3);
|
|
836
887
|
var redirectToCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(redirectToCheckout3);
|
|
888
|
+
var queryAbandonedCheckouts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryAbandonedCheckouts);
|
|
837
889
|
var onAbandonedCheckoutCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
838
890
|
onAbandonedCheckoutCreated
|
|
839
891
|
);
|