@wix/stores 1.0.59 → 1.0.60
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 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/stores-v1-abandoned-cart.http.d.ts +6 -0
- package/build/cjs/src/stores-v1-abandoned-cart.http.js +103 -0
- package/build/cjs/src/stores-v1-abandoned-cart.http.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.public.d.ts +9 -0
- package/build/cjs/src/stores-v1-abandoned-cart.public.js +22 -0
- package/build/cjs/src/stores-v1-abandoned-cart.public.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.types.d.ts +189 -0
- package/build/cjs/src/stores-v1-abandoned-cart.types.js +30 -0
- package/build/cjs/src/stores-v1-abandoned-cart.types.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.universal.d.ts +214 -0
- package/build/cjs/src/stores-v1-abandoned-cart.universal.js +180 -0
- package/build/cjs/src/stores-v1-abandoned-cart.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/src/stores-v1-abandoned-cart.http.d.ts +6 -0
- package/build/es/src/stores-v1-abandoned-cart.http.js +98 -0
- package/build/es/src/stores-v1-abandoned-cart.http.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.public.d.ts +9 -0
- package/build/es/src/stores-v1-abandoned-cart.public.js +14 -0
- package/build/es/src/stores-v1-abandoned-cart.public.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.types.d.ts +189 -0
- package/build/es/src/stores-v1-abandoned-cart.types.js +27 -0
- package/build/es/src/stores-v1-abandoned-cart.types.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.universal.d.ts +214 -0
- package/build/es/src/stores-v1-abandoned-cart.universal.js +156 -0
- package/build/es/src/stores-v1-abandoned-cart.universal.js.map +1 -0
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * as orders from './src/stores-v2-orders.public';
|
|
|
2
2
|
export * as wishlist from './src/platform-v1-wishlist.public';
|
|
3
3
|
export * as collections from './src/stores-catalog-v1-collection.public';
|
|
4
4
|
export * as products from './src/stores-catalog-v1-product-products.public';
|
|
5
|
+
export * as abandonedCarts from './src/stores-v1-abandoned-cart.public';
|
|
5
6
|
export * as subscriptionOptions from './src/stores-v1-subscription-option.public';
|
|
6
7
|
export * as inventory from './src/stores-v2-inventory.public';
|
package/build/cjs/index.js
CHANGED
|
@@ -19,11 +19,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.inventory = exports.subscriptionOptions = exports.products = exports.collections = exports.wishlist = exports.orders = void 0;
|
|
22
|
+
exports.inventory = exports.subscriptionOptions = exports.abandonedCarts = exports.products = exports.collections = exports.wishlist = exports.orders = void 0;
|
|
23
23
|
exports.orders = __importStar(require("./src/stores-v2-orders.public"));
|
|
24
24
|
exports.wishlist = __importStar(require("./src/platform-v1-wishlist.public"));
|
|
25
25
|
exports.collections = __importStar(require("./src/stores-catalog-v1-collection.public"));
|
|
26
26
|
exports.products = __importStar(require("./src/stores-catalog-v1-product-products.public"));
|
|
27
|
+
exports.abandonedCarts = __importStar(require("./src/stores-v1-abandoned-cart.public"));
|
|
27
28
|
exports.subscriptionOptions = __importStar(require("./src/stores-v1-subscription-option.public"));
|
|
28
29
|
exports.inventory = __importStar(require("./src/stores-v2-inventory.public"));
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAwD;AACxD,8EAA8D;AAC9D,yFAAyE;AACzE,4FAA4E;AAC5E,kGAAkF;AAClF,8EAA8D"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAwD;AACxD,8EAA8D;AAC9D,yFAAyE;AACzE,4FAA4E;AAC5E,wFAAwE;AACxE,kGAAkF;AAClF,8EAA8D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { GetAbandonedCartRequest, GetAbandonedCartResponse, QueryAbandonedCartsRequest, QueryAbandonedCartsResponse } from './stores-v1-abandoned-cart.types';
|
|
3
|
+
/** Returns abandoned carts based on the cart ID */
|
|
4
|
+
export declare function getAbandonedCart(payload: GetAbandonedCartRequest): RequestOptionsFactory<GetAbandonedCartResponse>;
|
|
5
|
+
/** Returns abandoned carts based on the requested query parameters */
|
|
6
|
+
export declare function queryAbandonedCarts(payload: QueryAbandonedCartsRequest): RequestOptionsFactory<QueryAbandonedCartsResponse>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryAbandonedCarts = exports.getAbandonedCart = void 0;
|
|
4
|
+
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
|
+
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
6
|
+
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
7
|
+
const _abandonedCart = {
|
|
8
|
+
abandonTime: 'google.protobuf.Timestamp',
|
|
9
|
+
activities: '_activity',
|
|
10
|
+
};
|
|
11
|
+
const _activity = { timestamp: 'google.protobuf.Timestamp' };
|
|
12
|
+
const _getAbandonedCartRequest = {};
|
|
13
|
+
const _getAbandonedCartResponse = { abandonedCart: '_abandonedCart' };
|
|
14
|
+
const _queryAbandonedCartsRequest = {};
|
|
15
|
+
const _queryAbandonedCartsResponse = { abandonedCarts: '_abandonedCart' };
|
|
16
|
+
function resolveWixCartAbandonmentApiV1AbandonedCartsUrl(opts) {
|
|
17
|
+
const domainToMappings = {
|
|
18
|
+
'api._api_base_domain_': [
|
|
19
|
+
{
|
|
20
|
+
srcPath: '/wix-ecommerce-cart-abandonment-web',
|
|
21
|
+
destPath: '',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
'www._base_domain_': [
|
|
25
|
+
{
|
|
26
|
+
srcPath: '/_api/abandoned-carts',
|
|
27
|
+
destPath: '',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
'www.wixapis.com': [
|
|
31
|
+
{
|
|
32
|
+
srcPath: '/stores/v1/abandonedCart',
|
|
33
|
+
destPath: '/v1/abandonedCarts',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
srcPath: '/stores/v1/abandonedCarts',
|
|
37
|
+
destPath: '/v1/abandonedCarts',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'manage._base_domain_': [
|
|
41
|
+
{
|
|
42
|
+
srcPath: '/_api/abandoned-carts',
|
|
43
|
+
destPath: '',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
48
|
+
}
|
|
49
|
+
/** Returns abandoned carts based on the cart ID */
|
|
50
|
+
function getAbandonedCart(payload) {
|
|
51
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getAbandonedCartRequest, {});
|
|
52
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getAbandonedCartResponse, {
|
|
53
|
+
_abandonedCart,
|
|
54
|
+
_activity,
|
|
55
|
+
});
|
|
56
|
+
function __getAbandonedCart({ host }) {
|
|
57
|
+
const serializedData = toReq(payload);
|
|
58
|
+
const metadata = {
|
|
59
|
+
entityFqdn: 'wix.stores.v1.abandoned_cart',
|
|
60
|
+
method: 'GET',
|
|
61
|
+
methodFqn: 'wix.cart.abandonment.api.v1.AbandonedCarts.GetAbandonedCart',
|
|
62
|
+
url: resolveWixCartAbandonmentApiV1AbandonedCartsUrl({
|
|
63
|
+
protoPath: '/v1/abandonedCarts/{id}',
|
|
64
|
+
data: serializedData,
|
|
65
|
+
host,
|
|
66
|
+
}),
|
|
67
|
+
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
68
|
+
transformResponse: fromRes,
|
|
69
|
+
};
|
|
70
|
+
return metadata;
|
|
71
|
+
}
|
|
72
|
+
__getAbandonedCart.fromReq = fromReq;
|
|
73
|
+
return __getAbandonedCart;
|
|
74
|
+
}
|
|
75
|
+
exports.getAbandonedCart = getAbandonedCart;
|
|
76
|
+
/** Returns abandoned carts based on the requested query parameters */
|
|
77
|
+
function queryAbandonedCarts(payload) {
|
|
78
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryAbandonedCartsRequest, {});
|
|
79
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryAbandonedCartsResponse, {
|
|
80
|
+
_abandonedCart,
|
|
81
|
+
_activity,
|
|
82
|
+
});
|
|
83
|
+
function __queryAbandonedCarts({ host }) {
|
|
84
|
+
const serializedData = toReq(payload);
|
|
85
|
+
const metadata = {
|
|
86
|
+
entityFqdn: 'wix.stores.v1.abandoned_cart',
|
|
87
|
+
method: 'POST',
|
|
88
|
+
methodFqn: 'wix.cart.abandonment.api.v1.AbandonedCarts.QueryAbandonedCarts',
|
|
89
|
+
url: resolveWixCartAbandonmentApiV1AbandonedCartsUrl({
|
|
90
|
+
protoPath: '/v1/abandonedCarts/query',
|
|
91
|
+
data: serializedData,
|
|
92
|
+
host,
|
|
93
|
+
}),
|
|
94
|
+
data: serializedData,
|
|
95
|
+
transformResponse: fromRes,
|
|
96
|
+
};
|
|
97
|
+
return metadata;
|
|
98
|
+
}
|
|
99
|
+
__queryAbandonedCarts.fromReq = fromReq;
|
|
100
|
+
return __queryAbandonedCarts;
|
|
101
|
+
}
|
|
102
|
+
exports.queryAbandonedCarts = queryAbandonedCarts;
|
|
103
|
+
//# sourceMappingURL=stores-v1-abandoned-cart.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-v1-abandoned-cart.http.js","sourceRoot":"","sources":["../../../src/stores-v1-abandoned-cart.http.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { QueryAbandonedCartsOptions } from './stores-v1-abandoned-cart.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function getAbandonedCart(httpClient: HttpClient): (_id: string) => Promise<import("./stores-v1-abandoned-cart.universal").AbandonedCart>;
|
|
7
|
+
export declare function queryAbandonedCarts(httpClient: HttpClient): (options?: QueryAbandonedCartsOptions | undefined) => Promise<import("./stores-v1-abandoned-cart.universal").QueryAbandonedCartsResponse>;
|
|
8
|
+
export { Status, Identity, ActivityType, } from './stores-v1-abandoned-cart.universal';
|
|
9
|
+
export { AbandonedCart, BuyerInfo, Activity, CustomData, CartAbandonedEvent, Totals, CartRecoveredEvent, CartDeletedEvent, GetAbandonedCartRequest, GetAbandonedCartResponse, QueryAbandonedCartsRequest, Query, Paging, QueryAbandonedCartsResponse, DeleteCartRequest, DeleteCartResponse, RedirectToCheckoutRequest, RawHttpResponse, HeadersEntry, QueryAbandonedCartsOptions, } from './stores-v1-abandoned-cart.universal';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityType = exports.Identity = exports.Status = exports.queryAbandonedCarts = exports.getAbandonedCart = exports.__metadata = void 0;
|
|
4
|
+
const stores_v1_abandoned_cart_universal_1 = require("./stores-v1-abandoned-cart.universal");
|
|
5
|
+
exports.__metadata = { PACKAGE_NAME: '@wix/stores' };
|
|
6
|
+
function getAbandonedCart(httpClient) {
|
|
7
|
+
return (_id) => (0, stores_v1_abandoned_cart_universal_1.getAbandonedCart)(_id,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
{ httpClient });
|
|
10
|
+
}
|
|
11
|
+
exports.getAbandonedCart = getAbandonedCart;
|
|
12
|
+
function queryAbandonedCarts(httpClient) {
|
|
13
|
+
return (options) => (0, stores_v1_abandoned_cart_universal_1.queryAbandonedCarts)(options,
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
{ httpClient });
|
|
16
|
+
}
|
|
17
|
+
exports.queryAbandonedCarts = queryAbandonedCarts;
|
|
18
|
+
var stores_v1_abandoned_cart_universal_2 = require("./stores-v1-abandoned-cart.universal");
|
|
19
|
+
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return stores_v1_abandoned_cart_universal_2.Status; } });
|
|
20
|
+
Object.defineProperty(exports, "Identity", { enumerable: true, get: function () { return stores_v1_abandoned_cart_universal_2.Identity; } });
|
|
21
|
+
Object.defineProperty(exports, "ActivityType", { enumerable: true, get: function () { return stores_v1_abandoned_cart_universal_2.ActivityType; } });
|
|
22
|
+
//# sourceMappingURL=stores-v1-abandoned-cart.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-v1-abandoned-cart.public.js","sourceRoot":"","sources":["../../../src/stores-v1-abandoned-cart.public.ts"],"names":[],"mappings":";;;AACA,6FAI8C;AAEjC,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE1D,SAAgB,gBAAgB,CAAC,UAAsB;IACrD,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,IAAA,qDAAyB,EACvB,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,4CAOC;AAED,SAAgB,mBAAmB,CAAC,UAAsB;IACxD,OAAO,CAAC,OAAoC,EAAE,EAAE,CAC9C,IAAA,wDAA4B,EAC1B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,kDAOC;AAED,2FAI8C;AAH5C,4HAAA,MAAM,OAAA;AACN,8HAAA,QAAQ,OAAA;AACR,kIAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export interface AbandonedCart {
|
|
2
|
+
/** Original cart ID */
|
|
3
|
+
id?: string;
|
|
4
|
+
/** Cart status */
|
|
5
|
+
status?: Status;
|
|
6
|
+
/**
|
|
7
|
+
* Time the cart was abandoned
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
abandonTime?: Date;
|
|
11
|
+
/** Buyer information */
|
|
12
|
+
buyerInfo?: BuyerInfo;
|
|
13
|
+
/** Cart total including currency symbol */
|
|
14
|
+
total?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* History activities
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
activities?: Activity[];
|
|
20
|
+
}
|
|
21
|
+
export declare enum Status {
|
|
22
|
+
ABANDONED = "ABANDONED",
|
|
23
|
+
RECOVERED = "RECOVERED"
|
|
24
|
+
}
|
|
25
|
+
export interface BuyerInfo {
|
|
26
|
+
/** Wix customer ID */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Customer information */
|
|
29
|
+
identityType?: Identity;
|
|
30
|
+
/** Customer's email address */
|
|
31
|
+
email?: string | null;
|
|
32
|
+
/** Customer's phone number */
|
|
33
|
+
phone?: string | null;
|
|
34
|
+
/** Customer's first name */
|
|
35
|
+
firstName?: string | null;
|
|
36
|
+
/** Customer's last name */
|
|
37
|
+
lastName?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export declare enum Identity {
|
|
40
|
+
/** Customer is the site owner */
|
|
41
|
+
ADMIN = "ADMIN",
|
|
42
|
+
/** Customer is logged in */
|
|
43
|
+
MEMBER = "MEMBER",
|
|
44
|
+
/** Customer is not logged in */
|
|
45
|
+
VISITOR = "VISITOR",
|
|
46
|
+
/** Contact was created for the customer */
|
|
47
|
+
CONTACT = "CONTACT"
|
|
48
|
+
}
|
|
49
|
+
export interface Activity {
|
|
50
|
+
/**
|
|
51
|
+
* Log item type
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
activityType?: ActivityType;
|
|
55
|
+
/**
|
|
56
|
+
* Comment added to Log item
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
message?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Log item occurrence timestamp
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
64
|
+
timestamp?: Date;
|
|
65
|
+
/** Custom data for un-typed activities */
|
|
66
|
+
customData?: CustomData;
|
|
67
|
+
}
|
|
68
|
+
export declare enum ActivityType {
|
|
69
|
+
UNRECOGNIZED_TYPE = "UNRECOGNIZED_TYPE",
|
|
70
|
+
SCHEDULED = "SCHEDULED",
|
|
71
|
+
EMAIL_SENT = "EMAIL_SENT",
|
|
72
|
+
EMAIL_NOT_SENT = "EMAIL_NOT_SENT",
|
|
73
|
+
NOTIFICATION_SENT = "NOTIFICATION_SENT",
|
|
74
|
+
TASK_CREATED = "TASK_CREATED",
|
|
75
|
+
CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY"
|
|
76
|
+
}
|
|
77
|
+
export interface CustomData {
|
|
78
|
+
/** Activity unique namespace */
|
|
79
|
+
namespace?: string | null;
|
|
80
|
+
/** Custom json field for any desired data */
|
|
81
|
+
customValue?: Record<string, any> | null;
|
|
82
|
+
}
|
|
83
|
+
export interface CartAbandonedEvent {
|
|
84
|
+
cartId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Time the cart was created
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
89
|
+
creationTime?: Date;
|
|
90
|
+
/**
|
|
91
|
+
* Time the cart was abandoned
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
abandonTime?: Date;
|
|
95
|
+
/** Buyer information */
|
|
96
|
+
buyerInfo?: BuyerInfo;
|
|
97
|
+
/** Amount of items in cart */
|
|
98
|
+
itemsCount?: number;
|
|
99
|
+
/** Coupon ID (if relevant) */
|
|
100
|
+
couponId?: string;
|
|
101
|
+
/** Subtotal of all line items in cart, not before shipping and taxes */
|
|
102
|
+
totals?: Totals;
|
|
103
|
+
/** Checkout URL - checkout with the abandoned cart details */
|
|
104
|
+
checkoutUrl?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface Totals {
|
|
107
|
+
/** Subtotal of all line items in cart, without shipping and taxes */
|
|
108
|
+
subtotal?: number | null;
|
|
109
|
+
/** Total cart price */
|
|
110
|
+
total?: number | null;
|
|
111
|
+
/** Formatted total cart price includes currency symbol */
|
|
112
|
+
formattedTotal?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface CartRecoveredEvent {
|
|
115
|
+
cartId?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Time the cart was recovered
|
|
118
|
+
* @readonly
|
|
119
|
+
*/
|
|
120
|
+
recoveredTime?: Date;
|
|
121
|
+
/**
|
|
122
|
+
* Time the cart was created
|
|
123
|
+
* @readonly
|
|
124
|
+
*/
|
|
125
|
+
creationTime?: Date;
|
|
126
|
+
/**
|
|
127
|
+
* Time the cart was abandoned
|
|
128
|
+
* @readonly
|
|
129
|
+
*/
|
|
130
|
+
abandonedTime?: Date;
|
|
131
|
+
}
|
|
132
|
+
export interface CartDeletedEvent {
|
|
133
|
+
instanceId?: string;
|
|
134
|
+
cartId?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface GetAbandonedCartRequest {
|
|
137
|
+
/** Cart ID */
|
|
138
|
+
id: string;
|
|
139
|
+
}
|
|
140
|
+
export interface GetAbandonedCartResponse {
|
|
141
|
+
/** Cart details */
|
|
142
|
+
abandonedCart?: AbandonedCart;
|
|
143
|
+
}
|
|
144
|
+
export interface QueryAbandonedCartsRequest {
|
|
145
|
+
/** Query details */
|
|
146
|
+
query?: Query;
|
|
147
|
+
}
|
|
148
|
+
export interface Query {
|
|
149
|
+
paging?: Paging;
|
|
150
|
+
/** A filter string, for more information see the intro section */
|
|
151
|
+
filter?: string | null;
|
|
152
|
+
/** Sort string, for more information see the intro section */
|
|
153
|
+
sort?: string | null;
|
|
154
|
+
}
|
|
155
|
+
export interface Paging {
|
|
156
|
+
/** The number of items to load */
|
|
157
|
+
limit?: number | null;
|
|
158
|
+
/** The offset since the beginning of the collection */
|
|
159
|
+
offset?: number | null;
|
|
160
|
+
}
|
|
161
|
+
export interface QueryAbandonedCartsResponse {
|
|
162
|
+
/** Abandoned carts list */
|
|
163
|
+
abandonedCarts?: AbandonedCart[];
|
|
164
|
+
/** Total number of carts */
|
|
165
|
+
totalResults?: number;
|
|
166
|
+
}
|
|
167
|
+
export interface DeleteCartRequest {
|
|
168
|
+
/** Cart ID */
|
|
169
|
+
id?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface DeleteCartResponse {
|
|
172
|
+
}
|
|
173
|
+
export interface RedirectToCheckoutRequest {
|
|
174
|
+
/** abandoned cart id */
|
|
175
|
+
id?: string;
|
|
176
|
+
/** Identifier of the metaSite this cart uses */
|
|
177
|
+
metaSiteId?: string;
|
|
178
|
+
/** The currency code to create the redirection link with */
|
|
179
|
+
currency?: string | null;
|
|
180
|
+
}
|
|
181
|
+
export interface RawHttpResponse {
|
|
182
|
+
body?: Uint8Array;
|
|
183
|
+
statusCode?: number | null;
|
|
184
|
+
headers?: HeadersEntry[];
|
|
185
|
+
}
|
|
186
|
+
export interface HeadersEntry {
|
|
187
|
+
key?: string;
|
|
188
|
+
value?: string;
|
|
189
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityType = exports.Identity = exports.Status = void 0;
|
|
4
|
+
var Status;
|
|
5
|
+
(function (Status) {
|
|
6
|
+
Status["ABANDONED"] = "ABANDONED";
|
|
7
|
+
Status["RECOVERED"] = "RECOVERED";
|
|
8
|
+
})(Status = exports.Status || (exports.Status = {}));
|
|
9
|
+
var Identity;
|
|
10
|
+
(function (Identity) {
|
|
11
|
+
/** Customer is the site owner */
|
|
12
|
+
Identity["ADMIN"] = "ADMIN";
|
|
13
|
+
/** Customer is logged in */
|
|
14
|
+
Identity["MEMBER"] = "MEMBER";
|
|
15
|
+
/** Customer is not logged in */
|
|
16
|
+
Identity["VISITOR"] = "VISITOR";
|
|
17
|
+
/** Contact was created for the customer */
|
|
18
|
+
Identity["CONTACT"] = "CONTACT";
|
|
19
|
+
})(Identity = exports.Identity || (exports.Identity = {}));
|
|
20
|
+
var ActivityType;
|
|
21
|
+
(function (ActivityType) {
|
|
22
|
+
ActivityType["UNRECOGNIZED_TYPE"] = "UNRECOGNIZED_TYPE";
|
|
23
|
+
ActivityType["SCHEDULED"] = "SCHEDULED";
|
|
24
|
+
ActivityType["EMAIL_SENT"] = "EMAIL_SENT";
|
|
25
|
+
ActivityType["EMAIL_NOT_SENT"] = "EMAIL_NOT_SENT";
|
|
26
|
+
ActivityType["NOTIFICATION_SENT"] = "NOTIFICATION_SENT";
|
|
27
|
+
ActivityType["TASK_CREATED"] = "TASK_CREATED";
|
|
28
|
+
ActivityType["CUSTOM_ACTIVITY"] = "CUSTOM_ACTIVITY";
|
|
29
|
+
})(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
|
|
30
|
+
//# sourceMappingURL=stores-v1-abandoned-cart.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-v1-abandoned-cart.types.js","sourceRoot":"","sources":["../../../src/stores-v1-abandoned-cart.types.ts"],"names":[],"mappings":";;;AAqBA,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;AACzB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB;AAiBD,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,iCAAiC;IACjC,2BAAe,CAAA;IACf,4BAA4B;IAC5B,6BAAiB,CAAA;IACjB,gCAAgC;IAChC,+BAAmB,CAAA;IACnB,2CAA2C;IAC3C,+BAAmB,CAAA;AACrB,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB;AAsBD,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,uDAAuC,CAAA;IACvC,uCAAuB,CAAA;IACvB,yCAAyB,CAAA;IACzB,iDAAiC,CAAA;IACjC,uDAAuC,CAAA;IACvC,6CAA6B,CAAA;IAC7B,mDAAmC,CAAA;AACrC,CAAC,EARW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAQvB"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export interface AbandonedCart {
|
|
8
|
+
/** Original cart ID */
|
|
9
|
+
_id?: string;
|
|
10
|
+
/** Cart status */
|
|
11
|
+
status?: Status;
|
|
12
|
+
/**
|
|
13
|
+
* Time the cart was abandoned
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
abandonTime?: Date;
|
|
17
|
+
/** Buyer information */
|
|
18
|
+
buyerInfo?: BuyerInfo;
|
|
19
|
+
/** Cart total including currency symbol */
|
|
20
|
+
total?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* History activities
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
activities?: Activity[];
|
|
26
|
+
}
|
|
27
|
+
export declare enum Status {
|
|
28
|
+
ABANDONED = "ABANDONED",
|
|
29
|
+
RECOVERED = "RECOVERED"
|
|
30
|
+
}
|
|
31
|
+
export interface BuyerInfo {
|
|
32
|
+
/** Wix customer ID */
|
|
33
|
+
_id?: string;
|
|
34
|
+
/** Customer information */
|
|
35
|
+
identityType?: Identity;
|
|
36
|
+
/** Customer's email address */
|
|
37
|
+
email?: string | null;
|
|
38
|
+
/** Customer's phone number */
|
|
39
|
+
phone?: string | null;
|
|
40
|
+
/** Customer's first name */
|
|
41
|
+
firstName?: string | null;
|
|
42
|
+
/** Customer's last name */
|
|
43
|
+
lastName?: string | null;
|
|
44
|
+
}
|
|
45
|
+
export declare enum Identity {
|
|
46
|
+
/** Customer is the site owner */
|
|
47
|
+
ADMIN = "ADMIN",
|
|
48
|
+
/** Customer is logged in */
|
|
49
|
+
MEMBER = "MEMBER",
|
|
50
|
+
/** Customer is not logged in */
|
|
51
|
+
VISITOR = "VISITOR",
|
|
52
|
+
/** Contact was created for the customer */
|
|
53
|
+
CONTACT = "CONTACT"
|
|
54
|
+
}
|
|
55
|
+
export interface Activity {
|
|
56
|
+
/**
|
|
57
|
+
* Log item type
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
60
|
+
activityType?: ActivityType;
|
|
61
|
+
/**
|
|
62
|
+
* Comment added to Log item
|
|
63
|
+
* @readonly
|
|
64
|
+
*/
|
|
65
|
+
message?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Log item occurrence timestamp
|
|
68
|
+
* @readonly
|
|
69
|
+
*/
|
|
70
|
+
timestamp?: Date;
|
|
71
|
+
/** Custom data for un-typed activities */
|
|
72
|
+
customData?: CustomData;
|
|
73
|
+
}
|
|
74
|
+
export declare enum ActivityType {
|
|
75
|
+
UNRECOGNIZED_TYPE = "UNRECOGNIZED_TYPE",
|
|
76
|
+
SCHEDULED = "SCHEDULED",
|
|
77
|
+
EMAIL_SENT = "EMAIL_SENT",
|
|
78
|
+
EMAIL_NOT_SENT = "EMAIL_NOT_SENT",
|
|
79
|
+
NOTIFICATION_SENT = "NOTIFICATION_SENT",
|
|
80
|
+
TASK_CREATED = "TASK_CREATED",
|
|
81
|
+
CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY"
|
|
82
|
+
}
|
|
83
|
+
export interface CustomData {
|
|
84
|
+
/** Activity unique namespace */
|
|
85
|
+
namespace?: string | null;
|
|
86
|
+
/** Custom json field for any desired data */
|
|
87
|
+
customValue?: Record<string, any> | null;
|
|
88
|
+
}
|
|
89
|
+
export interface CartAbandonedEvent {
|
|
90
|
+
cartId?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Time the cart was created
|
|
93
|
+
* @readonly
|
|
94
|
+
*/
|
|
95
|
+
creationTime?: Date;
|
|
96
|
+
/**
|
|
97
|
+
* Time the cart was abandoned
|
|
98
|
+
* @readonly
|
|
99
|
+
*/
|
|
100
|
+
abandonTime?: Date;
|
|
101
|
+
/** Buyer information */
|
|
102
|
+
buyerInfo?: BuyerInfo;
|
|
103
|
+
/** Amount of items in cart */
|
|
104
|
+
itemsCount?: number;
|
|
105
|
+
/** Coupon ID (if relevant) */
|
|
106
|
+
couponId?: string;
|
|
107
|
+
/** Subtotal of all line items in cart, not before shipping and taxes */
|
|
108
|
+
totals?: Totals;
|
|
109
|
+
/** Checkout URL - checkout with the abandoned cart details */
|
|
110
|
+
checkoutUrl?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface Totals {
|
|
113
|
+
/** Subtotal of all line items in cart, without shipping and taxes */
|
|
114
|
+
subtotal?: number | null;
|
|
115
|
+
/** Total cart price */
|
|
116
|
+
total?: number | null;
|
|
117
|
+
/** Formatted total cart price includes currency symbol */
|
|
118
|
+
formattedTotal?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CartRecoveredEvent {
|
|
121
|
+
cartId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Time the cart was recovered
|
|
124
|
+
* @readonly
|
|
125
|
+
*/
|
|
126
|
+
recoveredTime?: Date;
|
|
127
|
+
/**
|
|
128
|
+
* Time the cart was created
|
|
129
|
+
* @readonly
|
|
130
|
+
*/
|
|
131
|
+
creationTime?: Date;
|
|
132
|
+
/**
|
|
133
|
+
* Time the cart was abandoned
|
|
134
|
+
* @readonly
|
|
135
|
+
*/
|
|
136
|
+
abandonedTime?: Date;
|
|
137
|
+
}
|
|
138
|
+
export interface CartDeletedEvent {
|
|
139
|
+
instanceId?: string;
|
|
140
|
+
cartId?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface GetAbandonedCartRequest {
|
|
143
|
+
/** Cart ID */
|
|
144
|
+
_id: string;
|
|
145
|
+
}
|
|
146
|
+
export interface GetAbandonedCartResponse {
|
|
147
|
+
/** Cart details */
|
|
148
|
+
abandonedCart?: AbandonedCart;
|
|
149
|
+
}
|
|
150
|
+
export interface QueryAbandonedCartsRequest {
|
|
151
|
+
/** Query details */
|
|
152
|
+
query?: Query;
|
|
153
|
+
}
|
|
154
|
+
export interface Query {
|
|
155
|
+
paging?: Paging;
|
|
156
|
+
/** A filter string, for more information see the intro section */
|
|
157
|
+
filter?: string | null;
|
|
158
|
+
/** Sort string, for more information see the intro section */
|
|
159
|
+
sort?: string | null;
|
|
160
|
+
}
|
|
161
|
+
export interface Paging {
|
|
162
|
+
/** The number of items to load */
|
|
163
|
+
limit?: number | null;
|
|
164
|
+
/** The offset since the beginning of the collection */
|
|
165
|
+
offset?: number | null;
|
|
166
|
+
}
|
|
167
|
+
export interface QueryAbandonedCartsResponse {
|
|
168
|
+
/** Abandoned carts list */
|
|
169
|
+
abandonedCarts?: AbandonedCart[];
|
|
170
|
+
/** Total number of carts */
|
|
171
|
+
totalResults?: number;
|
|
172
|
+
}
|
|
173
|
+
export interface DeleteCartRequest {
|
|
174
|
+
/** Cart ID */
|
|
175
|
+
_id?: string;
|
|
176
|
+
}
|
|
177
|
+
export interface DeleteCartResponse {
|
|
178
|
+
}
|
|
179
|
+
export interface RedirectToCheckoutRequest {
|
|
180
|
+
/** abandoned cart id */
|
|
181
|
+
_id?: string;
|
|
182
|
+
/** Identifier of the metaSite this cart uses */
|
|
183
|
+
metaSiteId?: string;
|
|
184
|
+
/** The currency code to create the redirection link with */
|
|
185
|
+
currency?: string | null;
|
|
186
|
+
}
|
|
187
|
+
export interface RawHttpResponse {
|
|
188
|
+
body?: Uint8Array;
|
|
189
|
+
statusCode?: number | null;
|
|
190
|
+
headers?: HeadersEntry[];
|
|
191
|
+
}
|
|
192
|
+
export interface HeadersEntry {
|
|
193
|
+
key?: string;
|
|
194
|
+
value?: string;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Returns abandoned carts based on the cart ID
|
|
198
|
+
* @param _id - Cart ID
|
|
199
|
+
* @public
|
|
200
|
+
* @documentationMaturity preview
|
|
201
|
+
* @requiredField _id
|
|
202
|
+
* @returns Cart details
|
|
203
|
+
*/
|
|
204
|
+
export declare function getAbandonedCart(_id: string): Promise<AbandonedCart>;
|
|
205
|
+
/**
|
|
206
|
+
* Returns abandoned carts based on the requested query parameters
|
|
207
|
+
* @public
|
|
208
|
+
* @documentationMaturity preview
|
|
209
|
+
*/
|
|
210
|
+
export declare function queryAbandonedCarts(options?: QueryAbandonedCartsOptions): Promise<QueryAbandonedCartsResponse>;
|
|
211
|
+
export interface QueryAbandonedCartsOptions {
|
|
212
|
+
/** Query details */
|
|
213
|
+
query?: Query;
|
|
214
|
+
}
|