@wix/ecom 1.0.712 → 1.0.714
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/package.json +28 -28
- package/type-bundles/context.bundle.d.ts +2230 -353
- package/type-bundles/index.bundle.d.ts +2230 -353
- package/type-bundles/meta.bundle.d.ts +316 -130
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
28
|
+
__type: 'event-definition';
|
|
29
|
+
type: Type;
|
|
30
|
+
isDomainEvent?: boolean;
|
|
31
|
+
transformations?: (envelope: unknown) => Payload;
|
|
32
|
+
__payload: Payload;
|
|
33
|
+
};
|
|
34
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
37
|
+
|
|
38
|
+
declare global {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
+
interface SymbolConstructor {
|
|
41
|
+
readonly observable: symbol;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
1
45
|
interface CheckoutContentProvider {
|
|
2
46
|
_id?: string | null;
|
|
3
47
|
}
|
|
@@ -56,52 +100,14 @@ interface GetCheckoutContentOptions {
|
|
|
56
100
|
languageCode?: string | null;
|
|
57
101
|
}
|
|
58
102
|
|
|
59
|
-
|
|
60
|
-
interface
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
66
|
-
type HttpResponse<T = any> = {
|
|
67
|
-
data: T;
|
|
68
|
-
status: number;
|
|
69
|
-
statusText: string;
|
|
70
|
-
headers: any;
|
|
71
|
-
request?: any;
|
|
72
|
-
};
|
|
73
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
74
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
75
|
-
url: string;
|
|
76
|
-
data?: Data;
|
|
77
|
-
params?: URLSearchParams;
|
|
78
|
-
} & APIMetadata;
|
|
79
|
-
type APIMetadata = {
|
|
80
|
-
methodFqn?: string;
|
|
81
|
-
entityFqdn?: string;
|
|
82
|
-
packageName?: string;
|
|
83
|
-
};
|
|
84
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
85
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
86
|
-
__type: 'event-definition';
|
|
87
|
-
type: Type;
|
|
88
|
-
isDomainEvent?: boolean;
|
|
89
|
-
transformations?: (envelope: unknown) => Payload;
|
|
90
|
-
__payload: Payload;
|
|
91
|
-
};
|
|
92
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
93
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
94
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
95
|
-
|
|
96
|
-
declare global {
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
98
|
-
interface SymbolConstructor {
|
|
99
|
-
readonly observable: symbol;
|
|
100
|
-
}
|
|
103
|
+
declare function getCheckoutContent$1(httpClient: HttpClient): GetCheckoutContentSignature;
|
|
104
|
+
interface GetCheckoutContentSignature {
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves a CheckoutContent.
|
|
107
|
+
*/
|
|
108
|
+
(identifiers: GetCheckoutContentIdentifiers, options?: GetCheckoutContentOptions | undefined): Promise<GetCheckoutContentResponse>;
|
|
101
109
|
}
|
|
102
110
|
|
|
103
|
-
declare function getCheckoutContent$1(httpClient: HttpClient): (identifiers: GetCheckoutContentIdentifiers, options?: GetCheckoutContentOptions) => Promise<GetCheckoutContentResponse>;
|
|
104
|
-
|
|
105
111
|
declare function createRESTModule$p<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
106
112
|
|
|
107
113
|
type _publicGetCheckoutContentType = typeof getCheckoutContent$1;
|
|
@@ -209,7 +215,13 @@ interface ListTriggersResponseNonNullableFields {
|
|
|
209
215
|
triggers: ListTriggersResponseCustomTriggerNonNullableFields[];
|
|
210
216
|
}
|
|
211
217
|
|
|
212
|
-
declare function listTriggers$1(httpClient: HttpClient):
|
|
218
|
+
declare function listTriggers$1(httpClient: HttpClient): ListTriggersSignature;
|
|
219
|
+
interface ListTriggersSignature {
|
|
220
|
+
/**
|
|
221
|
+
* List all custom triggers that are available on a given site
|
|
222
|
+
*/
|
|
223
|
+
(): Promise<ListTriggersResponse & ListTriggersResponseNonNullableFields>;
|
|
224
|
+
}
|
|
213
225
|
|
|
214
226
|
declare function createRESTModule$o<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
215
227
|
|
|
@@ -1128,11 +1140,77 @@ interface DiscountRulesQueryBuilder {
|
|
|
1128
1140
|
find: () => Promise<DiscountRulesQueryResult>;
|
|
1129
1141
|
}
|
|
1130
1142
|
|
|
1131
|
-
declare function createDiscountRule$1(httpClient: HttpClient):
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1143
|
+
declare function createDiscountRule$1(httpClient: HttpClient): CreateDiscountRuleSignature;
|
|
1144
|
+
interface CreateDiscountRuleSignature {
|
|
1145
|
+
/**
|
|
1146
|
+
* Creates a new discount rule.
|
|
1147
|
+
*
|
|
1148
|
+
*
|
|
1149
|
+
* The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created.
|
|
1150
|
+
* @param - Discount rule info.
|
|
1151
|
+
* @returns Discount rule.
|
|
1152
|
+
*/
|
|
1153
|
+
(discountRule: DiscountRule$7): Promise<DiscountRule$7 & DiscountRuleNonNullableFields$6>;
|
|
1154
|
+
}
|
|
1155
|
+
declare function getDiscountRule$1(httpClient: HttpClient): GetDiscountRuleSignature;
|
|
1156
|
+
interface GetDiscountRuleSignature {
|
|
1157
|
+
/**
|
|
1158
|
+
* Retrieves a discount rule.
|
|
1159
|
+
*
|
|
1160
|
+
*
|
|
1161
|
+
* The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved.
|
|
1162
|
+
* @param - ID of the discount rule to retrieve.
|
|
1163
|
+
* @returns The requested discount rule.
|
|
1164
|
+
*/
|
|
1165
|
+
(discountRuleId: string): Promise<DiscountRule$7 & DiscountRuleNonNullableFields$6>;
|
|
1166
|
+
}
|
|
1167
|
+
declare function updateDiscountRule$1(httpClient: HttpClient): UpdateDiscountRuleSignature;
|
|
1168
|
+
interface UpdateDiscountRuleSignature {
|
|
1169
|
+
/**
|
|
1170
|
+
* Updates a discount rule's properties.
|
|
1171
|
+
*
|
|
1172
|
+
*
|
|
1173
|
+
* The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated.
|
|
1174
|
+
*
|
|
1175
|
+
* Each time the discount rule is updated, `revision` increments by 1. The existing `revision` must be included when updating the discount rule. This ensures you're working with the latest discount rule information, and it prevents unintended overwrites.
|
|
1176
|
+
* @param - Discount rule ID.
|
|
1177
|
+
* @param - Discount rule info.
|
|
1178
|
+
* @param - Discount rule info.
|
|
1179
|
+
* @returns Updated discount rule.
|
|
1180
|
+
*/
|
|
1181
|
+
(_id: string | null, discountRule: UpdateDiscountRule): Promise<DiscountRule$7 & DiscountRuleNonNullableFields$6>;
|
|
1182
|
+
}
|
|
1183
|
+
declare function deleteDiscountRule$1(httpClient: HttpClient): DeleteDiscountRuleSignature;
|
|
1184
|
+
interface DeleteDiscountRuleSignature {
|
|
1185
|
+
/**
|
|
1186
|
+
* Deletes a discount rule.
|
|
1187
|
+
*
|
|
1188
|
+
*
|
|
1189
|
+
* The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted.
|
|
1190
|
+
* @param - ID of the discount rule to delete.
|
|
1191
|
+
*/
|
|
1192
|
+
(discountRuleId: string): Promise<void>;
|
|
1193
|
+
}
|
|
1194
|
+
declare function queryDiscountRules$1(httpClient: HttpClient): QueryDiscountRulesSignature;
|
|
1195
|
+
interface QueryDiscountRulesSignature {
|
|
1196
|
+
/**
|
|
1197
|
+
* Creates a query to retrieve a list of discount rules.
|
|
1198
|
+
*
|
|
1199
|
+
*
|
|
1200
|
+
* The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object.
|
|
1201
|
+
*
|
|
1202
|
+
* The returned object contains the query definition which is typically used to run the query using the [`find()`](/discount-rules/discount-rules-query-builder/find) function.
|
|
1203
|
+
*
|
|
1204
|
+
* You can refine the query by chaining `DiscountRulesQueryBuilder` functions onto the query. `DiscountRulesQueryBuilder` functions enable you to sort, filter, and control the results queryDiscountRules() returns.
|
|
1205
|
+
*
|
|
1206
|
+
* By default, `queryDiscountRules()` sorts results by [`ascending("_id")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden.
|
|
1207
|
+
*
|
|
1208
|
+
* To learn how to query posts, refer to the table below.
|
|
1209
|
+
*
|
|
1210
|
+
* The following `DiscountRulesQueryBuilder` functions are supported for the `queryDiscountRules()` function. For a full description of the discount rule object, see the object returned for the [`items`](/discount-rules/discount-rules-query-result/items) property in the `DiscountRulesQueryResult`.
|
|
1211
|
+
*/
|
|
1212
|
+
(): DiscountRulesQueryBuilder;
|
|
1213
|
+
}
|
|
1136
1214
|
declare const onDiscountRuleCreated$1: EventDefinition<DiscountRuleCreatedEnvelope, "wix.ecom.discounts.v1.discount_rule_created">;
|
|
1137
1215
|
declare const onDiscountRuleUpdated$1: EventDefinition<DiscountRuleUpdatedEnvelope, "wix.ecom.discounts.v1.discount_rule_updated">;
|
|
1138
1216
|
declare const onDiscountRuleDeleted$1: EventDefinition<DiscountRuleDeletedEnvelope, "wix.ecom.discounts.v1.discount_rule_deleted">;
|
|
@@ -1153,12 +1231,21 @@ type _publicQueryDiscountRulesType = typeof queryDiscountRules$1;
|
|
|
1153
1231
|
declare const queryDiscountRules: ReturnType<typeof createRESTModule$n<_publicQueryDiscountRulesType>>;
|
|
1154
1232
|
|
|
1155
1233
|
type _publicOnDiscountRuleCreatedType = typeof onDiscountRuleCreated$1;
|
|
1234
|
+
/**
|
|
1235
|
+
* Triggered when a discount rule is created.
|
|
1236
|
+
*/
|
|
1156
1237
|
declare const onDiscountRuleCreated: ReturnType<typeof createEventModule$g<_publicOnDiscountRuleCreatedType>>;
|
|
1157
1238
|
|
|
1158
1239
|
type _publicOnDiscountRuleUpdatedType = typeof onDiscountRuleUpdated$1;
|
|
1240
|
+
/**
|
|
1241
|
+
* Triggered when a discount rule is updated.
|
|
1242
|
+
*/
|
|
1159
1243
|
declare const onDiscountRuleUpdated: ReturnType<typeof createEventModule$g<_publicOnDiscountRuleUpdatedType>>;
|
|
1160
1244
|
|
|
1161
1245
|
type _publicOnDiscountRuleDeletedType = typeof onDiscountRuleDeleted$1;
|
|
1246
|
+
/**
|
|
1247
|
+
* Triggered when a discount rule is deleted.
|
|
1248
|
+
*/
|
|
1162
1249
|
declare const onDiscountRuleDeleted: ReturnType<typeof createEventModule$g<_publicOnDiscountRuleDeletedType>>;
|
|
1163
1250
|
|
|
1164
1251
|
type context$n_ActiveTimeInfo = ActiveTimeInfo;
|
|
@@ -1468,7 +1555,17 @@ interface ListInvoicesForMultipleOrdersResponseNonNullableFields {
|
|
|
1468
1555
|
invoicesForOrder: InvoicesForOrderNonNullableFields[];
|
|
1469
1556
|
}
|
|
1470
1557
|
|
|
1471
|
-
declare function listInvoicesForMultipleOrders$1(httpClient: HttpClient):
|
|
1558
|
+
declare function listInvoicesForMultipleOrders$1(httpClient: HttpClient): ListInvoicesForMultipleOrdersSignature;
|
|
1559
|
+
interface ListInvoicesForMultipleOrdersSignature {
|
|
1560
|
+
/**
|
|
1561
|
+
* Retrieves the IDs of invoices associated with all specified orders.
|
|
1562
|
+
*
|
|
1563
|
+
*
|
|
1564
|
+
* The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
|
|
1565
|
+
* @param - Order IDs for which to retrieve invoices.
|
|
1566
|
+
*/
|
|
1567
|
+
(orderIds: string[]): Promise<ListInvoicesForMultipleOrdersResponse$1 & ListInvoicesForMultipleOrdersResponseNonNullableFields>;
|
|
1568
|
+
}
|
|
1472
1569
|
|
|
1473
1570
|
declare function createRESTModule$m<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
1474
1571
|
|
|
@@ -1639,8 +1736,53 @@ interface GetRecommendationOptions {
|
|
|
1639
1736
|
minimumRecommendedItems?: number;
|
|
1640
1737
|
}
|
|
1641
1738
|
|
|
1642
|
-
declare function listAvailableAlgorithms$1(httpClient: HttpClient):
|
|
1643
|
-
|
|
1739
|
+
declare function listAvailableAlgorithms$1(httpClient: HttpClient): ListAvailableAlgorithmsSignature;
|
|
1740
|
+
interface ListAvailableAlgorithmsSignature {
|
|
1741
|
+
/**
|
|
1742
|
+
* Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer.
|
|
1743
|
+
*
|
|
1744
|
+
* Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps.
|
|
1745
|
+
*
|
|
1746
|
+
* The app which provides an algorithm is referenced by that algorithm’s `appId`. The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s `catalogAppIds` array.
|
|
1747
|
+
*
|
|
1748
|
+
*
|
|
1749
|
+
* For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions:
|
|
1750
|
+
* 1. The algorithm’s `appId` must match the ID of an installed Wix app.
|
|
1751
|
+
* 2. At least 1 of the IDs in `catalogAppIds` must match the ID of an installed Wix app.
|
|
1752
|
+
*
|
|
1753
|
+
* Wix app IDs are [listed here](https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions).
|
|
1754
|
+
*/
|
|
1755
|
+
(): Promise<ListAvailableAlgorithmsResponse & ListAvailableAlgorithmsResponseNonNullableFields>;
|
|
1756
|
+
}
|
|
1757
|
+
declare function getRecommendation$1(httpClient: HttpClient): GetRecommendationSignature;
|
|
1758
|
+
interface GetRecommendationSignature {
|
|
1759
|
+
/**
|
|
1760
|
+
* Returns a recommendation object containing a list of items to recommend to the customer.
|
|
1761
|
+
*
|
|
1762
|
+
* `getRecommendation()` determines which items to recommend based on the given recommendation algorithms.
|
|
1763
|
+
*
|
|
1764
|
+
* `getRecommendation()` doesn’t run the algorithms. It calls the installed apps that provide them.
|
|
1765
|
+
*
|
|
1766
|
+
* Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps.
|
|
1767
|
+
* For example, Wix Stores provides algorithms that can only be used on its own catalogs.
|
|
1768
|
+
* To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed.
|
|
1769
|
+
* For more information and to see which algorithms are available on your site or project, call [`listAvailableAlgorithms()`](#listavailablealgorithms).
|
|
1770
|
+
*
|
|
1771
|
+
* `getRecommendation()` operates as follows:
|
|
1772
|
+
* 1. `getRecommendation()` receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs.
|
|
1773
|
+
* 2. `getRecommendation()` calls the app that corresponds to the `appId` of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.
|
|
1774
|
+
* 3. The app runs the algorithms.
|
|
1775
|
+
* 4. `getRecommendation()` returns items recommendations from the first algorithm (according to its position in the `algorithms` array) that meets the minimum number of recommendations. At that point `getRecommendation()` stops calling other apps.
|
|
1776
|
+
* 5. If none of the algorithms run by the first app meet the minimum recommended items, `getRecommendation()` finds the next algorithm in the array with a new `appId` (an ID of an app that has not yet been called), and repeats the process.
|
|
1777
|
+
* 6. If no algorithms in the `algorithms` array recommend at least the minimum recommended items, `getRecommendation()` returns an empty array.
|
|
1778
|
+
* @param - A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
|
|
1779
|
+
* See the method description for more information.
|
|
1780
|
+
*
|
|
1781
|
+
* If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
|
|
1782
|
+
* @param - Get recommendation options.
|
|
1783
|
+
*/
|
|
1784
|
+
(algorithms: Algorithm[], options?: GetRecommendationOptions | undefined): Promise<GetRecommendationResponse & GetRecommendationResponseNonNullableFields>;
|
|
1785
|
+
}
|
|
1644
1786
|
|
|
1645
1787
|
declare function createRESTModule$l<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
1646
1788
|
|
|
@@ -2437,10 +2579,45 @@ interface AbandonedCheckoutsQueryBuilder {
|
|
|
2437
2579
|
find: () => Promise<AbandonedCheckoutsQueryResult>;
|
|
2438
2580
|
}
|
|
2439
2581
|
|
|
2440
|
-
declare function getAbandonedCheckout$1(httpClient: HttpClient):
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2582
|
+
declare function getAbandonedCheckout$1(httpClient: HttpClient): GetAbandonedCheckoutSignature;
|
|
2583
|
+
interface GetAbandonedCheckoutSignature {
|
|
2584
|
+
/**
|
|
2585
|
+
* Retrieves an abandoned checkout.
|
|
2586
|
+
* @param - Abandoned checkout ID.
|
|
2587
|
+
* @returns The requested abandoned checkout.
|
|
2588
|
+
*/
|
|
2589
|
+
(abandonedCheckoutId: string): Promise<AbandonedCheckout & AbandonedCheckoutNonNullableFields>;
|
|
2590
|
+
}
|
|
2591
|
+
declare function deleteAbandonedCheckout$1(httpClient: HttpClient): DeleteAbandonedCheckoutSignature;
|
|
2592
|
+
interface DeleteAbandonedCheckoutSignature {
|
|
2593
|
+
/**
|
|
2594
|
+
* Delete an AbandonedCheckout
|
|
2595
|
+
* @param - Id of the abandoned checkout to delete
|
|
2596
|
+
*/
|
|
2597
|
+
(abandonedCheckoutId: string): Promise<void>;
|
|
2598
|
+
}
|
|
2599
|
+
declare function queryAbandonedCheckouts$1(httpClient: HttpClient): QueryAbandonedCheckoutsSignature;
|
|
2600
|
+
interface QueryAbandonedCheckoutsSignature {
|
|
2601
|
+
/**
|
|
2602
|
+
* Creates a query to retrieve a list of abandoned checkouts.
|
|
2603
|
+
*
|
|
2604
|
+
* The `queryAbandonedCheckouts()` function builds a query to retrieve a list of abandoned checkouts and returns a `ResultsQueryBuilder` object.
|
|
2605
|
+
*
|
|
2606
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
2607
|
+
*
|
|
2608
|
+
* 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.
|
|
2609
|
+
*/
|
|
2610
|
+
(): AbandonedCheckoutsQueryBuilder;
|
|
2611
|
+
}
|
|
2612
|
+
declare function redirectToCheckout$1(httpClient: HttpClient): RedirectToCheckoutSignature;
|
|
2613
|
+
interface RedirectToCheckoutSignature {
|
|
2614
|
+
/**
|
|
2615
|
+
* Redirects the abandoned checkout to the checkout page.
|
|
2616
|
+
* @param - abandoned checkout id
|
|
2617
|
+
* @param - Identifier of the metaSite this checkout uses
|
|
2618
|
+
*/
|
|
2619
|
+
(abandonedCheckoutId: string, metasiteId: string): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
2620
|
+
}
|
|
2444
2621
|
declare const onAbandonedCheckoutRecovered$1: EventDefinition<AbandonedCheckoutRecoveredEnvelope, "wix.ecom.v1.abandoned_checkout_recovered">;
|
|
2445
2622
|
|
|
2446
2623
|
declare function createRESTModule$k<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -2457,6 +2634,9 @@ type _publicRedirectToCheckoutType = typeof redirectToCheckout$1;
|
|
|
2457
2634
|
declare const redirectToCheckout: ReturnType<typeof createRESTModule$k<_publicRedirectToCheckoutType>>;
|
|
2458
2635
|
|
|
2459
2636
|
type _publicOnAbandonedCheckoutRecoveredType = typeof onAbandonedCheckoutRecovered$1;
|
|
2637
|
+
/**
|
|
2638
|
+
* Triggered when an abandoned checkout is recovered (the customer completes the checkout).
|
|
2639
|
+
*/
|
|
2460
2640
|
declare const onAbandonedCheckoutRecovered: ReturnType<typeof createEventModule$f<_publicOnAbandonedCheckoutRecoveredType>>;
|
|
2461
2641
|
|
|
2462
2642
|
type context$k_AbandonedCheckout = AbandonedCheckout;
|
|
@@ -3101,13 +3281,106 @@ interface ReportItemsBackInStockOptions {
|
|
|
3101
3281
|
extraAutomationTemplateParameters?: Record<string, string>;
|
|
3102
3282
|
}
|
|
3103
3283
|
|
|
3104
|
-
declare function createBackInStockNotificationRequest$1(httpClient: HttpClient):
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3284
|
+
declare function createBackInStockNotificationRequest$1(httpClient: HttpClient): CreateBackInStockNotificationRequestSignature;
|
|
3285
|
+
interface CreateBackInStockNotificationRequestSignature {
|
|
3286
|
+
/**
|
|
3287
|
+
* Creates a back in stock notification request.
|
|
3288
|
+
*
|
|
3289
|
+
* If a notification request already exists for the same `catalogReference` and `email`,
|
|
3290
|
+
* then a new one isn't created and the existing request is returned.
|
|
3291
|
+
* @param - Notification request information.
|
|
3292
|
+
*
|
|
3293
|
+
* Includes details for the out of stock item and the email address
|
|
3294
|
+
* requesting to be notified when it's back in stock.
|
|
3295
|
+
* @param - Item details to include in the notification when the item is back in stock.
|
|
3296
|
+
* @returns Created back in stock notification request.
|
|
3297
|
+
*/
|
|
3298
|
+
(request: BackInStockNotificationRequest, itemDetails: BackInStockItemDetails): Promise<BackInStockNotificationRequest & BackInStockNotificationRequestNonNullableFields>;
|
|
3299
|
+
}
|
|
3300
|
+
declare function getBackInStockNotificationRequest$1(httpClient: HttpClient): GetBackInStockNotificationRequestSignature;
|
|
3301
|
+
interface GetBackInStockNotificationRequestSignature {
|
|
3302
|
+
/**
|
|
3303
|
+
* Retrieves a back in stock notification request.
|
|
3304
|
+
* @param - ID of the notification request to retrieve.
|
|
3305
|
+
* @returns Retrieved back in stock notification request.
|
|
3306
|
+
*/
|
|
3307
|
+
(_id: string): Promise<BackInStockNotificationRequest & BackInStockNotificationRequestNonNullableFields>;
|
|
3308
|
+
}
|
|
3309
|
+
declare function deleteBackInStockNotificationRequest$1(httpClient: HttpClient): DeleteBackInStockNotificationRequestSignature;
|
|
3310
|
+
interface DeleteBackInStockNotificationRequestSignature {
|
|
3311
|
+
/**
|
|
3312
|
+
* Deletes a back in stock notification request.
|
|
3313
|
+
* @param - ID of the notification request to delete.
|
|
3314
|
+
*/
|
|
3315
|
+
(_id: string): Promise<void>;
|
|
3316
|
+
}
|
|
3317
|
+
declare function markAsNotificationSent$1(httpClient: HttpClient): MarkAsNotificationSentSignature;
|
|
3318
|
+
interface MarkAsNotificationSentSignature {
|
|
3319
|
+
/**
|
|
3320
|
+
* Sets `status` of a back in stock request to `NOTIFICATION_SENT`.
|
|
3321
|
+
*
|
|
3322
|
+
* Use this function if the notification is sent manually offline. If the notification is sent automatically or with the `reportItemsBackInStock()` function, then `status` updates on its own.
|
|
3323
|
+
* @param - ID of the notification request to mark.
|
|
3324
|
+
*/
|
|
3325
|
+
(_id: string): Promise<MarkAsNotificationSentResponse & MarkAsNotificationSentResponseNonNullableFields>;
|
|
3326
|
+
}
|
|
3327
|
+
declare function queryBackInStockNotificationRequests$1(httpClient: HttpClient): QueryBackInStockNotificationRequestsSignature;
|
|
3328
|
+
interface QueryBackInStockNotificationRequestsSignature {
|
|
3329
|
+
/**
|
|
3330
|
+
* Creates a query to retrieve a list of back in stock notification requests.
|
|
3331
|
+
*
|
|
3332
|
+
* The `queryBackInStockNotificationRequests()` method builds a query to retrieve a list of back in stock notification requests and returns a `RequestsQueryBuilder` object.
|
|
3333
|
+
*
|
|
3334
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` method.
|
|
3335
|
+
*
|
|
3336
|
+
* You can refine the query by chaining `RequestsQueryBuilder` methods onto the query. `RequestsQueryBuilder` methods enable you to sort, filter, and control the results that `queryBackInStockNotificationRequests()` returns.
|
|
3337
|
+
*
|
|
3338
|
+
* The following `RequestsQueryBuilder` methods are supported for `queryBackInStockNotificationRequests()`. For a full description of the Requests object, see the object returned for the `items` property in `RequestsQueryResult`."
|
|
3339
|
+
*/
|
|
3340
|
+
(): RequestsQueryBuilder;
|
|
3341
|
+
}
|
|
3342
|
+
declare function getBackInStockNotificationRequestsCountByCatalogReferences$1(httpClient: HttpClient): GetBackInStockNotificationRequestsCountByCatalogReferencesSignature;
|
|
3343
|
+
interface GetBackInStockNotificationRequestsCountByCatalogReferencesSignature {
|
|
3344
|
+
/**
|
|
3345
|
+
* Retrieves the amount of back in stock requests for a given `catalogReference` item.
|
|
3346
|
+
* @param - `catalogReference` items to retrieve the notification request for.
|
|
3347
|
+
*/
|
|
3348
|
+
(catalogReferences: CatalogReference$7[]): Promise<GetBackInStockNotificationRequestsCountByCatalogReferencesResponse & GetBackInStockNotificationRequestsCountByCatalogReferencesResponseNonNullableFields>;
|
|
3349
|
+
}
|
|
3350
|
+
declare function reportItemsBackInStock$1(httpClient: HttpClient): ReportItemsBackInStockSignature;
|
|
3351
|
+
interface ReportItemsBackInStockSignature {
|
|
3352
|
+
/**
|
|
3353
|
+
* Sends notifications for back in stock requests.
|
|
3354
|
+
*
|
|
3355
|
+
* > **Important:**
|
|
3356
|
+
* > Automations must be turned on in a [site's dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Go%20to%20Back-in-Stock&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/store/back-in-stock) for notifications to send.
|
|
3357
|
+
*
|
|
3358
|
+
* This endpoint triggers notifications for requests in 1 of 2 ways:
|
|
3359
|
+
* 1. For a specific item, with the `catalogReference` information.
|
|
3360
|
+
* 2. For specific requests, with `requestIds`.
|
|
3361
|
+
*
|
|
3362
|
+
* `itemDetails` are required and may populate dynamic values in the notification template, as follows:
|
|
3363
|
+
* + `itemDetails.name` passes to the template as `item.name`
|
|
3364
|
+
* + `itemDetails.price` passes to the template as `item.price`
|
|
3365
|
+
* + `itemDetails.image.url` passes to the template as `item.image.url`
|
|
3366
|
+
*
|
|
3367
|
+
* If the notification template doesn't include `item.price`, `item.name`, or `item.image.url`, values should
|
|
3368
|
+
* be passed in `extraAutomationTemplateParameters`.
|
|
3369
|
+
*
|
|
3370
|
+
* After this endpoint is called, the `status` for the request will update to `NOTIFICATION_SENT` if it sends
|
|
3371
|
+
* successfully, or to `FAILED` if it fails to send.
|
|
3372
|
+
* @param - Item details to use in notifications.
|
|
3373
|
+
*
|
|
3374
|
+
* `itemDetails` may populate dynamic valyes in the notification template, as follows:
|
|
3375
|
+
* + `itemDetails.name` passes to the template as `item.name`
|
|
3376
|
+
* + `itemDetails.price` passes to the template as `item.price`
|
|
3377
|
+
* + `itemDetails.image.url` passes to the template as `item.image.url`
|
|
3378
|
+
*
|
|
3379
|
+
* Use `extraAutomationTemplateParameters` to pass additional dynamic values.
|
|
3380
|
+
* @param - Report options.
|
|
3381
|
+
*/
|
|
3382
|
+
(itemDetails: BackInStockItemDetails, options?: ReportItemsBackInStockOptions | undefined): Promise<void>;
|
|
3383
|
+
}
|
|
3111
3384
|
declare const onBackInStockNotificationRequestCreated$1: EventDefinition<BackInStockNotificationRequestCreatedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_created">;
|
|
3112
3385
|
declare const onBackInStockNotificationRequestDeleted$1: EventDefinition<BackInStockNotificationRequestDeletedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_deleted">;
|
|
3113
3386
|
declare const onBackInStockNotificationRequestUpdated$1: EventDefinition<BackInStockNotificationRequestUpdatedEnvelope, "wix.ecom.v1.back_in_stock_notification_request_updated">;
|
|
@@ -3132,12 +3405,21 @@ type _publicReportItemsBackInStockType = typeof reportItemsBackInStock$1;
|
|
|
3132
3405
|
declare const reportItemsBackInStock: ReturnType<typeof createRESTModule$j<_publicReportItemsBackInStockType>>;
|
|
3133
3406
|
|
|
3134
3407
|
type _publicOnBackInStockNotificationRequestCreatedType = typeof onBackInStockNotificationRequestCreated$1;
|
|
3408
|
+
/**
|
|
3409
|
+
* Triggered when a back in stock notification request is created.
|
|
3410
|
+
*/
|
|
3135
3411
|
declare const onBackInStockNotificationRequestCreated: ReturnType<typeof createEventModule$e<_publicOnBackInStockNotificationRequestCreatedType>>;
|
|
3136
3412
|
|
|
3137
3413
|
type _publicOnBackInStockNotificationRequestDeletedType = typeof onBackInStockNotificationRequestDeleted$1;
|
|
3414
|
+
/**
|
|
3415
|
+
* Triggered when a back in stock notification request is deleted.
|
|
3416
|
+
*/
|
|
3138
3417
|
declare const onBackInStockNotificationRequestDeleted: ReturnType<typeof createEventModule$e<_publicOnBackInStockNotificationRequestDeletedType>>;
|
|
3139
3418
|
|
|
3140
3419
|
type _publicOnBackInStockNotificationRequestUpdatedType = typeof onBackInStockNotificationRequestUpdated$1;
|
|
3420
|
+
/**
|
|
3421
|
+
* Triggered when a back in stock notification request is updated.
|
|
3422
|
+
*/
|
|
3141
3423
|
declare const onBackInStockNotificationRequestUpdated: ReturnType<typeof createEventModule$e<_publicOnBackInStockNotificationRequestUpdatedType>>;
|
|
3142
3424
|
|
|
3143
3425
|
type context$j_BackInStockItemDetails = BackInStockItemDetails;
|
|
@@ -3254,9 +3536,36 @@ interface GetSettingsResponseNonNullableFields {
|
|
|
3254
3536
|
settings?: BackInStockSettingsNonNullableFields;
|
|
3255
3537
|
}
|
|
3256
3538
|
|
|
3257
|
-
declare function startCollectingRequests$1(httpClient: HttpClient):
|
|
3258
|
-
|
|
3259
|
-
|
|
3539
|
+
declare function startCollectingRequests$1(httpClient: HttpClient): StartCollectingRequestsSignature;
|
|
3540
|
+
interface StartCollectingRequestsSignature {
|
|
3541
|
+
/**
|
|
3542
|
+
* Sets `settings.collectionStates.collectingRequests` to `true` for given `appId`.
|
|
3543
|
+
*
|
|
3544
|
+
* When the collection state is set to `true`, collecting requests is enabled and customers may request
|
|
3545
|
+
* notifications for out of stock products. While collecting is enabled, customers see a "Notify When Available"
|
|
3546
|
+
* button on out-of-stock items. Customers can click the button to enter their email address, which creates the
|
|
3547
|
+
* notification request.
|
|
3548
|
+
* @param - ID of the app to start accepting notification requests for.
|
|
3549
|
+
*/
|
|
3550
|
+
(appId: string): Promise<StartCollectingRequestsResponse & StartCollectingRequestsResponseNonNullableFields>;
|
|
3551
|
+
}
|
|
3552
|
+
declare function stopCollectingRequests$1(httpClient: HttpClient): StopCollectingRequestsSignature;
|
|
3553
|
+
interface StopCollectingRequestsSignature {
|
|
3554
|
+
/**
|
|
3555
|
+
* Sets `settings.collectionStates.collectingRequests` to `false` for given `appId`.
|
|
3556
|
+
*
|
|
3557
|
+
* When the collection state is set to `false`, collecting notification requests is disabled.
|
|
3558
|
+
* @param - ID of the app to stop accepting notification requests for.
|
|
3559
|
+
*/
|
|
3560
|
+
(appId: string): Promise<StopCollectingRequestsResponse & StopCollectingRequestsResponseNonNullableFields>;
|
|
3561
|
+
}
|
|
3562
|
+
declare function getSettings$1(httpClient: HttpClient): GetSettingsSignature;
|
|
3563
|
+
interface GetSettingsSignature {
|
|
3564
|
+
/**
|
|
3565
|
+
* Retrieves back in stock request settings.
|
|
3566
|
+
*/
|
|
3567
|
+
(): Promise<GetSettingsResponse & GetSettingsResponseNonNullableFields>;
|
|
3568
|
+
}
|
|
3260
3569
|
|
|
3261
3570
|
declare function createRESTModule$i<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
3262
3571
|
|
|
@@ -3729,17 +4038,17 @@ interface SelectedMembership$4 {
|
|
|
3729
4038
|
appId?: string;
|
|
3730
4039
|
}
|
|
3731
4040
|
interface CatalogOverrideFields$3 {
|
|
3732
|
-
/** Item
|
|
4041
|
+
/** Item name. */
|
|
3733
4042
|
productName?: ProductName$5;
|
|
3734
4043
|
/** Item price **after** discounts. */
|
|
3735
4044
|
price?: string | null;
|
|
3736
|
-
/** Item price **before**
|
|
4045
|
+
/** Item price **before** discounts. */
|
|
3737
4046
|
fullPrice?: string | null;
|
|
3738
|
-
/**
|
|
4047
|
+
/** Item description lines. Used when displaying the line item to customers. */
|
|
3739
4048
|
descriptionLines?: DescriptionLine$5[];
|
|
3740
|
-
/** Physical properties of the item.
|
|
4049
|
+
/** Physical properties of the item. */
|
|
3741
4050
|
physicalProperties?: PhysicalProperties$6;
|
|
3742
|
-
/**
|
|
4051
|
+
/** Item image. */
|
|
3743
4052
|
image?: string;
|
|
3744
4053
|
}
|
|
3745
4054
|
/** Buyer Info */
|
|
@@ -3914,7 +4223,12 @@ interface UpdateCartRequest$1 {
|
|
|
3914
4223
|
merchantDiscounts?: MerchantDiscountInput$3[];
|
|
3915
4224
|
/** Catalog line items. */
|
|
3916
4225
|
lineItems?: LineItem$6[];
|
|
3917
|
-
/**
|
|
4226
|
+
/**
|
|
4227
|
+
* Custom line items.
|
|
4228
|
+
*
|
|
4229
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
4230
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
4231
|
+
*/
|
|
3918
4232
|
customLineItems?: CustomLineItem$4[];
|
|
3919
4233
|
}
|
|
3920
4234
|
interface MerchantDiscountInput$3 {
|
|
@@ -3949,31 +4263,30 @@ interface CustomLineItem$4 {
|
|
|
3949
4263
|
media?: string;
|
|
3950
4264
|
/**
|
|
3951
4265
|
* Custom line item ID. If passed, `id` must be unique.
|
|
3952
|
-
*
|
|
4266
|
+
*
|
|
4267
|
+
* Default: auto-generated ID
|
|
3953
4268
|
*/
|
|
3954
4269
|
_id?: string | null;
|
|
3955
4270
|
/** Tax group ID for this custom line item. */
|
|
3956
4271
|
taxGroupId?: string | null;
|
|
3957
4272
|
/** Name of the item or product. */
|
|
3958
4273
|
productName?: ProductName$5;
|
|
3959
|
-
/**
|
|
3960
|
-
* Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.
|
|
3961
|
-
* The URL is optional and if not provided, the site URL will be used.
|
|
3962
|
-
*/
|
|
4274
|
+
/** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
|
|
3963
4275
|
url?: string;
|
|
3964
4276
|
/** Item type. Either a preset type or custom. */
|
|
3965
4277
|
itemType?: ItemType$6;
|
|
3966
|
-
/**
|
|
4278
|
+
/** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
3967
4279
|
fullPrice?: string | null;
|
|
3968
4280
|
/**
|
|
3969
|
-
*
|
|
4281
|
+
* Item quantity available for purchase. Only return this if inventory is managed.
|
|
3970
4282
|
* Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
|
|
3971
4283
|
*/
|
|
3972
4284
|
quantityAvailable?: number | null;
|
|
3973
|
-
/**
|
|
4285
|
+
/** Physical properties of the item. */
|
|
3974
4286
|
physicalProperties?: PhysicalProperties$6;
|
|
3975
4287
|
/**
|
|
3976
|
-
*
|
|
4288
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
4289
|
+
*
|
|
3977
4290
|
* + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
|
|
3978
4291
|
* + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
3979
4292
|
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
@@ -3981,21 +4294,23 @@ interface CustomLineItem$4 {
|
|
|
3981
4294
|
*/
|
|
3982
4295
|
paymentOption?: PaymentOptionType$6;
|
|
3983
4296
|
/**
|
|
3984
|
-
*
|
|
4297
|
+
* Service properties. When relevant, this contains information such as date and number of participants.
|
|
3985
4298
|
* Used, among other things, when checking for valid memberships.
|
|
3986
4299
|
*/
|
|
3987
4300
|
serviceProperties?: ServiceProperties$5;
|
|
3988
4301
|
/**
|
|
3989
|
-
*
|
|
4302
|
+
* In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
|
|
4303
|
+
*
|
|
3990
4304
|
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
3991
|
-
* +
|
|
4305
|
+
* + In most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
3992
4306
|
* + Used in membership validation.
|
|
3993
4307
|
*/
|
|
3994
4308
|
rootCatalogItemId?: string | null;
|
|
3995
4309
|
/**
|
|
3996
|
-
*
|
|
4310
|
+
* Partial payment for the given item to be paid upfront during the checkout.
|
|
4311
|
+
*
|
|
3997
4312
|
* Eligible for catalog items with type `DEPOSIT_ONLINE`.
|
|
3998
|
-
*
|
|
4313
|
+
* When omitted, the item's price will not be split and is expected to be paid in a single installment.
|
|
3999
4314
|
*/
|
|
4000
4315
|
depositAmount?: string | null;
|
|
4001
4316
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
@@ -4008,7 +4323,12 @@ interface UpdateCartResponse$1 {
|
|
|
4008
4323
|
interface AddToCurrentCartRequest$1 {
|
|
4009
4324
|
/** Catalog line items. */
|
|
4010
4325
|
lineItems?: LineItem$6[];
|
|
4011
|
-
/**
|
|
4326
|
+
/**
|
|
4327
|
+
* Custom line items.
|
|
4328
|
+
*
|
|
4329
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
4330
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
4331
|
+
*/
|
|
4012
4332
|
customLineItems?: CustomLineItem$4[];
|
|
4013
4333
|
}
|
|
4014
4334
|
interface AddToCartResponse$1 {
|
|
@@ -4018,7 +4338,12 @@ interface AddToCartResponse$1 {
|
|
|
4018
4338
|
interface AddToCurrentCartAndEstimateTotalsRequest$1 {
|
|
4019
4339
|
/** Catalog line items. */
|
|
4020
4340
|
lineItems?: LineItem$6[];
|
|
4021
|
-
/**
|
|
4341
|
+
/**
|
|
4342
|
+
* Custom line items.
|
|
4343
|
+
*
|
|
4344
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
4345
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
4346
|
+
*/
|
|
4022
4347
|
customLineItems?: CustomLineItem$4[];
|
|
4023
4348
|
/** Selected shipping option. */
|
|
4024
4349
|
selectedShippingOption?: SelectedShippingOption$2;
|
|
@@ -4925,7 +5250,12 @@ interface CreateCartRequest$1 {
|
|
|
4925
5250
|
merchantDiscounts?: MerchantDiscountInput$3[];
|
|
4926
5251
|
/** Catalog line items. */
|
|
4927
5252
|
lineItems?: LineItem$6[];
|
|
4928
|
-
/**
|
|
5253
|
+
/**
|
|
5254
|
+
* Custom line items.
|
|
5255
|
+
*
|
|
5256
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
5257
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
5258
|
+
*/
|
|
4929
5259
|
customLineItems?: CustomLineItem$4[];
|
|
4930
5260
|
}
|
|
4931
5261
|
interface CreateCartResponse$1 {
|
|
@@ -4953,7 +5283,12 @@ interface AddToCartRequest$1 {
|
|
|
4953
5283
|
_id: string;
|
|
4954
5284
|
/** Catalog line items. */
|
|
4955
5285
|
lineItems?: LineItem$6[];
|
|
4956
|
-
/**
|
|
5286
|
+
/**
|
|
5287
|
+
* Custom line items.
|
|
5288
|
+
*
|
|
5289
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
5290
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
5291
|
+
*/
|
|
4957
5292
|
customLineItems?: CustomLineItem$4[];
|
|
4958
5293
|
}
|
|
4959
5294
|
interface RemoveLineItemsRequest$2 {
|
|
@@ -5514,7 +5849,12 @@ interface CreateCartOptions {
|
|
|
5514
5849
|
merchantDiscounts?: MerchantDiscountInput$3[];
|
|
5515
5850
|
/** Catalog line items. */
|
|
5516
5851
|
lineItems?: LineItem$6[];
|
|
5517
|
-
/**
|
|
5852
|
+
/**
|
|
5853
|
+
* Custom line items.
|
|
5854
|
+
*
|
|
5855
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
5856
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
5857
|
+
*/
|
|
5518
5858
|
customLineItems?: CustomLineItem$4[];
|
|
5519
5859
|
}
|
|
5520
5860
|
interface UpdateCartOptions {
|
|
@@ -5605,13 +5945,23 @@ interface UpdateCartOptions {
|
|
|
5605
5945
|
merchantDiscounts?: MerchantDiscountInput$3[];
|
|
5606
5946
|
/** Catalog line items. */
|
|
5607
5947
|
lineItems?: LineItem$6[];
|
|
5608
|
-
/**
|
|
5948
|
+
/**
|
|
5949
|
+
* Custom line items.
|
|
5950
|
+
*
|
|
5951
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
5952
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
5953
|
+
*/
|
|
5609
5954
|
customLineItems?: CustomLineItem$4[];
|
|
5610
5955
|
}
|
|
5611
5956
|
interface AddToCartOptions {
|
|
5612
5957
|
/** Catalog line items. */
|
|
5613
5958
|
lineItems?: LineItem$6[];
|
|
5614
|
-
/**
|
|
5959
|
+
/**
|
|
5960
|
+
* Custom line items.
|
|
5961
|
+
*
|
|
5962
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
5963
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
5964
|
+
*/
|
|
5615
5965
|
customLineItems?: CustomLineItem$4[];
|
|
5616
5966
|
}
|
|
5617
5967
|
interface CreateCheckoutOptions$1 {
|
|
@@ -5626,27 +5976,160 @@ interface CreateCheckoutOptions$1 {
|
|
|
5626
5976
|
/** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */
|
|
5627
5977
|
email?: string | null;
|
|
5628
5978
|
}
|
|
5629
|
-
interface EstimateTotalsOptions {
|
|
5630
|
-
/** Selected shipping option. */
|
|
5631
|
-
selectedShippingOption?: SelectedShippingOption$2;
|
|
5632
|
-
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
5633
|
-
shippingAddress?: Address$9;
|
|
5634
|
-
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
5635
|
-
billingAddress?: Address$9;
|
|
5636
|
-
/** The selected membership payment options and which line items they apply to. */
|
|
5637
|
-
selectedMemberships?: SelectedMemberships$4;
|
|
5979
|
+
interface EstimateTotalsOptions {
|
|
5980
|
+
/** Selected shipping option. */
|
|
5981
|
+
selectedShippingOption?: SelectedShippingOption$2;
|
|
5982
|
+
/** Shipping address. Used for calculating tax and shipping (when applicable). */
|
|
5983
|
+
shippingAddress?: Address$9;
|
|
5984
|
+
/** Billing address. Used for calculating tax if all the items in the cart are not shippable. */
|
|
5985
|
+
billingAddress?: Address$9;
|
|
5986
|
+
/** The selected membership payment options and which line items they apply to. */
|
|
5987
|
+
selectedMemberships?: SelectedMemberships$4;
|
|
5988
|
+
}
|
|
5989
|
+
|
|
5990
|
+
declare function createCart$1(httpClient: HttpClient): CreateCartSignature;
|
|
5991
|
+
interface CreateCartSignature {
|
|
5992
|
+
/**
|
|
5993
|
+
* Creates a new cart.
|
|
5994
|
+
*
|
|
5995
|
+
*
|
|
5996
|
+
* The `createCart()` function returns a Promise that resolves to the new cart when it's created.
|
|
5997
|
+
*
|
|
5998
|
+
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
5999
|
+
* @param - Cart creation options.
|
|
6000
|
+
* @returns Fulfilled - Cart.
|
|
6001
|
+
*/
|
|
6002
|
+
(options?: CreateCartOptions | undefined): Promise<Cart$1 & CartNonNullableFields$1>;
|
|
6003
|
+
}
|
|
6004
|
+
declare function updateCart$1(httpClient: HttpClient): UpdateCartSignature;
|
|
6005
|
+
interface UpdateCartSignature {
|
|
6006
|
+
/**
|
|
6007
|
+
* Updates a specified cart's properties.
|
|
6008
|
+
*
|
|
6009
|
+
*
|
|
6010
|
+
* The `updateCart()` function returns a Promise that resolves when the specified cart's properties are updated.
|
|
6011
|
+
*
|
|
6012
|
+
* > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required.
|
|
6013
|
+
* @param - Available options to use when updating a cart.
|
|
6014
|
+
* @param - ID of the cart to be updated.
|
|
6015
|
+
* @returns Fulfilled - Updated cart.
|
|
6016
|
+
*/
|
|
6017
|
+
(_id: string | null, options?: UpdateCartOptions | undefined): Promise<Cart$1 & CartNonNullableFields$1>;
|
|
6018
|
+
}
|
|
6019
|
+
declare function getCart$1(httpClient: HttpClient): GetCartSignature;
|
|
6020
|
+
interface GetCartSignature {
|
|
6021
|
+
/**
|
|
6022
|
+
* Retrieves a cart.
|
|
6023
|
+
*
|
|
6024
|
+
*
|
|
6025
|
+
* The `getCart()` function returns a Promise that resolves when the specified cart is retrieved.
|
|
6026
|
+
* @param - ID of the cart to retrieve.
|
|
6027
|
+
* @returns Fulfilled - The specified cart.
|
|
6028
|
+
*/
|
|
6029
|
+
(_id: string): Promise<Cart$1 & CartNonNullableFields$1>;
|
|
6030
|
+
}
|
|
6031
|
+
declare function addToCart$1(httpClient: HttpClient): AddToCartSignature;
|
|
6032
|
+
interface AddToCartSignature {
|
|
6033
|
+
/**
|
|
6034
|
+
* Adds catalog line items to a cart.
|
|
6035
|
+
*
|
|
6036
|
+
*
|
|
6037
|
+
* The `addToCart()` function returns a Promise that resolves to the updated cart when the specified items have been added.
|
|
6038
|
+
*
|
|
6039
|
+
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
6040
|
+
* @param - Cart ID.
|
|
6041
|
+
* @param - Items to be added to cart.
|
|
6042
|
+
* @returns Fulfilled - Cart.
|
|
6043
|
+
*/
|
|
6044
|
+
(_id: string, options?: AddToCartOptions | undefined): Promise<AddToCartResponse$1 & AddToCartResponseNonNullableFields$1>;
|
|
6045
|
+
}
|
|
6046
|
+
declare function removeLineItems$3(httpClient: HttpClient): RemoveLineItemsSignature$1;
|
|
6047
|
+
interface RemoveLineItemsSignature$1 {
|
|
6048
|
+
/**
|
|
6049
|
+
* Removes line items from the specified cart.
|
|
6050
|
+
*
|
|
6051
|
+
*
|
|
6052
|
+
* The `removeLineItems()` function returns a Promise that resolves to the updated cart when the line items are removed from the specified cart.
|
|
6053
|
+
* @param - IDs of the line items to remove from the cart.
|
|
6054
|
+
* @param - ID of the cart to remove line items from.
|
|
6055
|
+
* @returns Fulfilled - Updated cart.
|
|
6056
|
+
*/
|
|
6057
|
+
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse$2 & RemoveLineItemsResponseNonNullableFields$2>;
|
|
6058
|
+
}
|
|
6059
|
+
declare function createCheckout$3(httpClient: HttpClient): CreateCheckoutSignature$1;
|
|
6060
|
+
interface CreateCheckoutSignature$1 {
|
|
6061
|
+
/**
|
|
6062
|
+
* Creates a checkout from a cart.
|
|
6063
|
+
*
|
|
6064
|
+
*
|
|
6065
|
+
* The `createCheckout()` function returns a Promise that resolves to the new checkout's ID when it's created.
|
|
6066
|
+
*
|
|
6067
|
+
* If a checkout was already created from the specified cart, that checkout will be
|
|
6068
|
+
* updated with any new information from the cart.
|
|
6069
|
+
*
|
|
6070
|
+
* > **Note:** `options.channelType` is a required field.
|
|
6071
|
+
* @param - Cart ID.
|
|
6072
|
+
* @param - Checkout creation options.
|
|
6073
|
+
* @returns Fulfilled - ID of the newly created checkout.
|
|
6074
|
+
*/
|
|
6075
|
+
(_id: string, options?: CreateCheckoutOptions$1 | undefined): Promise<CreateCheckoutResponse$2 & CreateCheckoutResponseNonNullableFields$2>;
|
|
6076
|
+
}
|
|
6077
|
+
declare function removeCoupon$3(httpClient: HttpClient): RemoveCouponSignature$1;
|
|
6078
|
+
interface RemoveCouponSignature$1 {
|
|
6079
|
+
/**
|
|
6080
|
+
* Removes the coupon from a specified cart.
|
|
6081
|
+
*
|
|
6082
|
+
*
|
|
6083
|
+
* The `removeCoupon()` function returns a Promise that resolves to the updated cart when the coupon is removed from the specified cart.
|
|
6084
|
+
* @param - Cart ID.
|
|
6085
|
+
* @returns Fulfilled - Updated cart.
|
|
6086
|
+
*/
|
|
6087
|
+
(_id: string): Promise<RemoveCouponResponse$2 & RemoveCouponResponseNonNullableFields$2>;
|
|
6088
|
+
}
|
|
6089
|
+
declare function updateLineItemsQuantity$3(httpClient: HttpClient): UpdateLineItemsQuantitySignature$1;
|
|
6090
|
+
interface UpdateLineItemsQuantitySignature$1 {
|
|
6091
|
+
/**
|
|
6092
|
+
* Updates the quantity of one or more line items in a specified cart.
|
|
6093
|
+
*
|
|
6094
|
+
*
|
|
6095
|
+
* The `updateLineItemsQuantity()` function returns a Promise that resolves when the quantities of the specified cart's line items are updated.
|
|
6096
|
+
*
|
|
6097
|
+
* This endpoint is only for updating the quantity of line items. To entirely remove a line item from the cart, use [`removeLineItems()`](#removelineitems). To add a new line item to the cart, use [`addToCart()`](#addtocart).
|
|
6098
|
+
*
|
|
6099
|
+
* This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
|
|
6100
|
+
* @param - Cart ID.
|
|
6101
|
+
* @param - Line item IDs and their new quantity.
|
|
6102
|
+
* @returns Fulfilled - Updated cart.
|
|
6103
|
+
*/
|
|
6104
|
+
(_id: string, lineItems: LineItemQuantityUpdate$2[]): Promise<UpdateLineItemsQuantityResponse$2 & UpdateLineItemsQuantityResponseNonNullableFields$2>;
|
|
6105
|
+
}
|
|
6106
|
+
declare function estimateTotals$1(httpClient: HttpClient): EstimateTotalsSignature;
|
|
6107
|
+
interface EstimateTotalsSignature {
|
|
6108
|
+
/**
|
|
6109
|
+
* Estimates the subtotal and total for current site visitor’s cart. Totals include tax and are based on the selected carrier service, shipping address, and billing information.
|
|
6110
|
+
*
|
|
6111
|
+
*
|
|
6112
|
+
* The `estimateTotals()` function returns a Promise that resolves when the estimated totals are generated.
|
|
6113
|
+
*
|
|
6114
|
+
* > **Note:** Not passing any `options` properties will only estimate the cart items price totals.
|
|
6115
|
+
* @param - Cart ID.
|
|
6116
|
+
* @param - Total estimation options.
|
|
6117
|
+
* @returns Fulfilled - Cart's estimated totals.
|
|
6118
|
+
*/
|
|
6119
|
+
(_id: string, options?: EstimateTotalsOptions | undefined): Promise<EstimateTotalsResponse$1 & EstimateTotalsResponseNonNullableFields$1>;
|
|
6120
|
+
}
|
|
6121
|
+
declare function deleteCart$1(httpClient: HttpClient): DeleteCartSignature;
|
|
6122
|
+
interface DeleteCartSignature {
|
|
6123
|
+
/**
|
|
6124
|
+
* Deletes a cart.
|
|
6125
|
+
*
|
|
6126
|
+
*
|
|
6127
|
+
* The `deleteCart()` function returns a Promise that resolves when the specified cart is deleted.
|
|
6128
|
+
* @param - ID of the cart to delete.
|
|
6129
|
+
* @returns Fulfilled - When the cart is deleted. Rejected - Error message.
|
|
6130
|
+
*/
|
|
6131
|
+
(_id: string): Promise<void>;
|
|
5638
6132
|
}
|
|
5639
|
-
|
|
5640
|
-
declare function createCart$1(httpClient: HttpClient): (options?: CreateCartOptions) => Promise<Cart$1 & CartNonNullableFields$1>;
|
|
5641
|
-
declare function updateCart$1(httpClient: HttpClient): (_id: string | null, options?: UpdateCartOptions) => Promise<Cart$1 & CartNonNullableFields$1>;
|
|
5642
|
-
declare function getCart$1(httpClient: HttpClient): (_id: string) => Promise<Cart$1 & CartNonNullableFields$1>;
|
|
5643
|
-
declare function addToCart$1(httpClient: HttpClient): (_id: string, options?: AddToCartOptions) => Promise<AddToCartResponse$1 & AddToCartResponseNonNullableFields$1>;
|
|
5644
|
-
declare function removeLineItems$3(httpClient: HttpClient): (_id: string, lineItemIds: string[]) => Promise<RemoveLineItemsResponse$2 & RemoveLineItemsResponseNonNullableFields$2>;
|
|
5645
|
-
declare function createCheckout$3(httpClient: HttpClient): (_id: string, options?: CreateCheckoutOptions$1) => Promise<CreateCheckoutResponse$2 & CreateCheckoutResponseNonNullableFields$2>;
|
|
5646
|
-
declare function removeCoupon$3(httpClient: HttpClient): (_id: string) => Promise<RemoveCouponResponse$2 & RemoveCouponResponseNonNullableFields$2>;
|
|
5647
|
-
declare function updateLineItemsQuantity$3(httpClient: HttpClient): (_id: string, lineItems: LineItemQuantityUpdate$2[]) => Promise<UpdateLineItemsQuantityResponse$2 & UpdateLineItemsQuantityResponseNonNullableFields$2>;
|
|
5648
|
-
declare function estimateTotals$1(httpClient: HttpClient): (_id: string, options?: EstimateTotalsOptions) => Promise<EstimateTotalsResponse$1 & EstimateTotalsResponseNonNullableFields$1>;
|
|
5649
|
-
declare function deleteCart$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
5650
6133
|
declare const onCartUpdated$3: EventDefinition<CartUpdatedEnvelope$1, "wix.ecom.v1.cart_updated">;
|
|
5651
6134
|
declare const onCartDeleted$3: EventDefinition<CartDeletedEnvelope$1, "wix.ecom.v1.cart_deleted">;
|
|
5652
6135
|
declare const onCartCreated$3: EventDefinition<CartCreatedEnvelope$1, "wix.ecom.v1.cart_created">;
|
|
@@ -5677,12 +6160,21 @@ type _publicDeleteCartType = typeof deleteCart$1;
|
|
|
5677
6160
|
declare const deleteCart: ReturnType<typeof createRESTModule$h<_publicDeleteCartType>>;
|
|
5678
6161
|
|
|
5679
6162
|
type _publicOnCartUpdatedType$1 = typeof onCartUpdated$3;
|
|
6163
|
+
/**
|
|
6164
|
+
* Triggered when a cart is updated.
|
|
6165
|
+
*/
|
|
5680
6166
|
declare const onCartUpdated$2: ReturnType<typeof createEventModule$d<_publicOnCartUpdatedType>>;
|
|
5681
6167
|
|
|
5682
6168
|
type _publicOnCartDeletedType$1 = typeof onCartDeleted$3;
|
|
6169
|
+
/**
|
|
6170
|
+
* Triggered when a cart is deleted.
|
|
6171
|
+
*/
|
|
5683
6172
|
declare const onCartDeleted$2: ReturnType<typeof createEventModule$d<_publicOnCartDeletedType>>;
|
|
5684
6173
|
|
|
5685
6174
|
type _publicOnCartCreatedType$1 = typeof onCartCreated$3;
|
|
6175
|
+
/**
|
|
6176
|
+
* Triggered when a cart is created.
|
|
6177
|
+
*/
|
|
5686
6178
|
declare const onCartCreated$2: ReturnType<typeof createEventModule$d<_publicOnCartCreatedType>>;
|
|
5687
6179
|
|
|
5688
6180
|
type context$h_AddToCartOptions = AddToCartOptions;
|
|
@@ -6146,17 +6638,17 @@ interface SelectedMembership$3 {
|
|
|
6146
6638
|
appId?: string;
|
|
6147
6639
|
}
|
|
6148
6640
|
interface CatalogOverrideFields$2 {
|
|
6149
|
-
/** Item
|
|
6641
|
+
/** Item name. */
|
|
6150
6642
|
productName?: ProductName$4;
|
|
6151
6643
|
/** Item price **after** discounts. */
|
|
6152
6644
|
price?: string | null;
|
|
6153
|
-
/** Item price **before**
|
|
6645
|
+
/** Item price **before** discounts. */
|
|
6154
6646
|
fullPrice?: string | null;
|
|
6155
|
-
/**
|
|
6647
|
+
/** Item description lines. Used when displaying the line item to customers. */
|
|
6156
6648
|
descriptionLines?: DescriptionLine$4[];
|
|
6157
|
-
/** Physical properties of the item.
|
|
6649
|
+
/** Physical properties of the item. */
|
|
6158
6650
|
physicalProperties?: PhysicalProperties$5;
|
|
6159
|
-
/**
|
|
6651
|
+
/** Item image. */
|
|
6160
6652
|
image?: string;
|
|
6161
6653
|
}
|
|
6162
6654
|
/** Buyer Info */
|
|
@@ -6331,7 +6823,12 @@ interface UpdateCartRequest {
|
|
|
6331
6823
|
merchantDiscounts?: MerchantDiscountInput$2[];
|
|
6332
6824
|
/** Catalog line items. */
|
|
6333
6825
|
lineItems?: LineItem$5[];
|
|
6334
|
-
/**
|
|
6826
|
+
/**
|
|
6827
|
+
* Custom line items.
|
|
6828
|
+
*
|
|
6829
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
6830
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
6831
|
+
*/
|
|
6335
6832
|
customLineItems?: CustomLineItem$3[];
|
|
6336
6833
|
}
|
|
6337
6834
|
interface MerchantDiscountInput$2 {
|
|
@@ -6366,31 +6863,30 @@ interface CustomLineItem$3 {
|
|
|
6366
6863
|
media?: string;
|
|
6367
6864
|
/**
|
|
6368
6865
|
* Custom line item ID. If passed, `id` must be unique.
|
|
6369
|
-
*
|
|
6866
|
+
*
|
|
6867
|
+
* Default: auto-generated ID
|
|
6370
6868
|
*/
|
|
6371
6869
|
_id?: string | null;
|
|
6372
6870
|
/** Tax group ID for this custom line item. */
|
|
6373
6871
|
taxGroupId?: string | null;
|
|
6374
6872
|
/** Name of the item or product. */
|
|
6375
6873
|
productName?: ProductName$4;
|
|
6376
|
-
/**
|
|
6377
|
-
* Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.
|
|
6378
|
-
* The URL is optional and if not provided, the site URL will be used.
|
|
6379
|
-
*/
|
|
6874
|
+
/** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
|
|
6380
6875
|
url?: string;
|
|
6381
6876
|
/** Item type. Either a preset type or custom. */
|
|
6382
6877
|
itemType?: ItemType$5;
|
|
6383
|
-
/**
|
|
6878
|
+
/** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
6384
6879
|
fullPrice?: string | null;
|
|
6385
6880
|
/**
|
|
6386
|
-
*
|
|
6881
|
+
* Item quantity available for purchase. Only return this if inventory is managed.
|
|
6387
6882
|
* Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
|
|
6388
6883
|
*/
|
|
6389
6884
|
quantityAvailable?: number | null;
|
|
6390
|
-
/**
|
|
6885
|
+
/** Physical properties of the item. */
|
|
6391
6886
|
physicalProperties?: PhysicalProperties$5;
|
|
6392
6887
|
/**
|
|
6393
|
-
*
|
|
6888
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
6889
|
+
*
|
|
6394
6890
|
* + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
|
|
6395
6891
|
* + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
6396
6892
|
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
@@ -6398,21 +6894,23 @@ interface CustomLineItem$3 {
|
|
|
6398
6894
|
*/
|
|
6399
6895
|
paymentOption?: PaymentOptionType$5;
|
|
6400
6896
|
/**
|
|
6401
|
-
*
|
|
6897
|
+
* Service properties. When relevant, this contains information such as date and number of participants.
|
|
6402
6898
|
* Used, among other things, when checking for valid memberships.
|
|
6403
6899
|
*/
|
|
6404
6900
|
serviceProperties?: ServiceProperties$4;
|
|
6405
6901
|
/**
|
|
6406
|
-
*
|
|
6902
|
+
* In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
|
|
6903
|
+
*
|
|
6407
6904
|
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
6408
|
-
* +
|
|
6905
|
+
* + In most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
6409
6906
|
* + Used in membership validation.
|
|
6410
6907
|
*/
|
|
6411
6908
|
rootCatalogItemId?: string | null;
|
|
6412
6909
|
/**
|
|
6413
|
-
*
|
|
6910
|
+
* Partial payment for the given item to be paid upfront during the checkout.
|
|
6911
|
+
*
|
|
6414
6912
|
* Eligible for catalog items with type `DEPOSIT_ONLINE`.
|
|
6415
|
-
*
|
|
6913
|
+
* When omitted, the item's price will not be split and is expected to be paid in a single installment.
|
|
6416
6914
|
*/
|
|
6417
6915
|
depositAmount?: string | null;
|
|
6418
6916
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
@@ -6425,7 +6923,12 @@ interface UpdateCartResponse {
|
|
|
6425
6923
|
interface AddToCurrentCartRequest {
|
|
6426
6924
|
/** Catalog line items. */
|
|
6427
6925
|
lineItems?: LineItem$5[];
|
|
6428
|
-
/**
|
|
6926
|
+
/**
|
|
6927
|
+
* Custom line items.
|
|
6928
|
+
*
|
|
6929
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
6930
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
6931
|
+
*/
|
|
6429
6932
|
customLineItems?: CustomLineItem$3[];
|
|
6430
6933
|
}
|
|
6431
6934
|
interface AddToCartResponse {
|
|
@@ -6435,7 +6938,12 @@ interface AddToCartResponse {
|
|
|
6435
6938
|
interface AddToCurrentCartAndEstimateTotalsRequest {
|
|
6436
6939
|
/** Catalog line items. */
|
|
6437
6940
|
lineItems?: LineItem$5[];
|
|
6438
|
-
/**
|
|
6941
|
+
/**
|
|
6942
|
+
* Custom line items.
|
|
6943
|
+
*
|
|
6944
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
6945
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
6946
|
+
*/
|
|
6439
6947
|
customLineItems?: CustomLineItem$3[];
|
|
6440
6948
|
/** Selected shipping option. */
|
|
6441
6949
|
selectedShippingOption?: SelectedShippingOption$1;
|
|
@@ -7342,7 +7850,12 @@ interface CreateCartRequest {
|
|
|
7342
7850
|
merchantDiscounts?: MerchantDiscountInput$2[];
|
|
7343
7851
|
/** Catalog line items. */
|
|
7344
7852
|
lineItems?: LineItem$5[];
|
|
7345
|
-
/**
|
|
7853
|
+
/**
|
|
7854
|
+
* Custom line items.
|
|
7855
|
+
*
|
|
7856
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
7857
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
7858
|
+
*/
|
|
7346
7859
|
customLineItems?: CustomLineItem$3[];
|
|
7347
7860
|
}
|
|
7348
7861
|
interface CreateCartResponse {
|
|
@@ -7370,7 +7883,12 @@ interface AddToCartRequest {
|
|
|
7370
7883
|
_id: string;
|
|
7371
7884
|
/** Catalog line items. */
|
|
7372
7885
|
lineItems?: LineItem$5[];
|
|
7373
|
-
/**
|
|
7886
|
+
/**
|
|
7887
|
+
* Custom line items.
|
|
7888
|
+
*
|
|
7889
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
7890
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
7891
|
+
*/
|
|
7374
7892
|
customLineItems?: CustomLineItem$3[];
|
|
7375
7893
|
}
|
|
7376
7894
|
interface RemoveLineItemsRequest$1 {
|
|
@@ -7931,13 +8449,23 @@ interface UpdateCurrentCartOptions {
|
|
|
7931
8449
|
merchantDiscounts?: MerchantDiscountInput$2[];
|
|
7932
8450
|
/** Catalog line items. */
|
|
7933
8451
|
lineItems?: LineItem$5[];
|
|
7934
|
-
/**
|
|
8452
|
+
/**
|
|
8453
|
+
* Custom line items.
|
|
8454
|
+
*
|
|
8455
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
8456
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
8457
|
+
*/
|
|
7935
8458
|
customLineItems?: CustomLineItem$3[];
|
|
7936
8459
|
}
|
|
7937
8460
|
interface AddToCurrentCartOptions {
|
|
7938
8461
|
/** Catalog line items. */
|
|
7939
8462
|
lineItems?: LineItem$5[];
|
|
7940
|
-
/**
|
|
8463
|
+
/**
|
|
8464
|
+
* Custom line items.
|
|
8465
|
+
*
|
|
8466
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
8467
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
8468
|
+
*/
|
|
7941
8469
|
customLineItems?: CustomLineItem$3[];
|
|
7942
8470
|
}
|
|
7943
8471
|
interface CreateCheckoutFromCurrentCartOptions {
|
|
@@ -7963,15 +8491,120 @@ interface EstimateCurrentCartTotalsOptions {
|
|
|
7963
8491
|
selectedMemberships?: SelectedMemberships$3;
|
|
7964
8492
|
}
|
|
7965
8493
|
|
|
7966
|
-
declare function getCurrentCart$1(httpClient: HttpClient):
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
8494
|
+
declare function getCurrentCart$1(httpClient: HttpClient): GetCurrentCartSignature;
|
|
8495
|
+
interface GetCurrentCartSignature {
|
|
8496
|
+
/**
|
|
8497
|
+
* Retrieves the current site visitor's cart.
|
|
8498
|
+
*
|
|
8499
|
+
*
|
|
8500
|
+
* The `getCurrentCart()` function returns a Promise that resolves when the current cart is retrieved.
|
|
8501
|
+
* @returns Current session's active cart.
|
|
8502
|
+
*/
|
|
8503
|
+
(): Promise<Cart & CartNonNullableFields>;
|
|
8504
|
+
}
|
|
8505
|
+
declare function updateCurrentCart$1(httpClient: HttpClient): UpdateCurrentCartSignature;
|
|
8506
|
+
interface UpdateCurrentCartSignature {
|
|
8507
|
+
/**
|
|
8508
|
+
* Updates the current site visitor's cart.
|
|
8509
|
+
*
|
|
8510
|
+
*
|
|
8511
|
+
* The `updateCurrentCart()` function returns a Promise that resolves when the current cart's properties are updated.
|
|
8512
|
+
*
|
|
8513
|
+
* > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required.
|
|
8514
|
+
* @param - Current cart update options.
|
|
8515
|
+
* @returns Fulfilled - The updated current cart.
|
|
8516
|
+
*/
|
|
8517
|
+
(options?: UpdateCurrentCartOptions | undefined): Promise<Cart & CartNonNullableFields>;
|
|
8518
|
+
}
|
|
8519
|
+
declare function addToCurrentCart$1(httpClient: HttpClient): AddToCurrentCartSignature;
|
|
8520
|
+
interface AddToCurrentCartSignature {
|
|
8521
|
+
/**
|
|
8522
|
+
* Adds catalog line items to the current site visitor's cart.
|
|
8523
|
+
*
|
|
8524
|
+
*
|
|
8525
|
+
* The `addToCurrentCart()` function returns a Promise that resolves to the updated current cart when the specified items have been added.
|
|
8526
|
+
*
|
|
8527
|
+
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
8528
|
+
* @param - Items to be added to the current cart.
|
|
8529
|
+
*/
|
|
8530
|
+
(options?: AddToCurrentCartOptions | undefined): Promise<AddToCartResponse & AddToCartResponseNonNullableFields>;
|
|
8531
|
+
}
|
|
8532
|
+
declare function removeLineItemsFromCurrentCart$1(httpClient: HttpClient): RemoveLineItemsFromCurrentCartSignature;
|
|
8533
|
+
interface RemoveLineItemsFromCurrentCartSignature {
|
|
8534
|
+
/**
|
|
8535
|
+
* Removes line items from the current site visitor's cart.
|
|
8536
|
+
*
|
|
8537
|
+
*
|
|
8538
|
+
* The `removeLineItemsFromCurrentCart()` function returns a Promise that resolves to the updated current cart when the line items are removed.
|
|
8539
|
+
* @param - IDs of the line items to remove from the cart.
|
|
8540
|
+
*/
|
|
8541
|
+
(lineItemIds: string[]): Promise<RemoveLineItemsResponse$1 & RemoveLineItemsResponseNonNullableFields$1>;
|
|
8542
|
+
}
|
|
8543
|
+
declare function createCheckoutFromCurrentCart$1(httpClient: HttpClient): CreateCheckoutFromCurrentCartSignature;
|
|
8544
|
+
interface CreateCheckoutFromCurrentCartSignature {
|
|
8545
|
+
/**
|
|
8546
|
+
* Creates a checkout from the current site visitor’s cart.
|
|
8547
|
+
*
|
|
8548
|
+
*
|
|
8549
|
+
* The `createCheckoutFromCurrentCart()` function returns a Promise that resolves to the new checkout's ID when it's created.
|
|
8550
|
+
*
|
|
8551
|
+
* If a checkout was already created from the current cart, that checkout will be updated with any new information from the cart.
|
|
8552
|
+
*
|
|
8553
|
+
* > **Note:** `options.channelType` is a required field.
|
|
8554
|
+
* @param - Checkout creation options.
|
|
8555
|
+
*/
|
|
8556
|
+
(options?: CreateCheckoutFromCurrentCartOptions | undefined): Promise<CreateCheckoutResponse$1 & CreateCheckoutResponseNonNullableFields$1>;
|
|
8557
|
+
}
|
|
8558
|
+
declare function removeCouponFromCurrentCart$1(httpClient: HttpClient): RemoveCouponFromCurrentCartSignature;
|
|
8559
|
+
interface RemoveCouponFromCurrentCartSignature {
|
|
8560
|
+
/**
|
|
8561
|
+
* Removes the coupon from the current site visitor's cart.
|
|
8562
|
+
*
|
|
8563
|
+
*
|
|
8564
|
+
* The `removeCouponFromCurrentCart()` function returns a Promise that resolves to the updated current cart when the coupon is removed.
|
|
8565
|
+
* @returns Fulfilled - Updated current cart.
|
|
8566
|
+
*/
|
|
8567
|
+
(): Promise<RemoveCouponResponse$1 & RemoveCouponResponseNonNullableFields$1>;
|
|
8568
|
+
}
|
|
8569
|
+
declare function updateCurrentCartLineItemQuantity$1(httpClient: HttpClient): UpdateCurrentCartLineItemQuantitySignature;
|
|
8570
|
+
interface UpdateCurrentCartLineItemQuantitySignature {
|
|
8571
|
+
/**
|
|
8572
|
+
* Updates the quantity of one or more line items in the current site visitor's cart.
|
|
8573
|
+
*
|
|
8574
|
+
*
|
|
8575
|
+
* The `updateCurrentCartLineItemQuantity()` function returns a Promise that resolves when the quantities of the current cart's line items are updated. This endpoint is only for updating the quantity of line items. To entirely remove a line item from the current cart, use [`removeLineItemsFromCurrentCart()`](#removelineitemsfromcurrentcart).
|
|
8576
|
+
* To add a new line item to the current cart, use [`addToCurrentCart()`](#addtocurrentcart).
|
|
8577
|
+
*
|
|
8578
|
+
* This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock.
|
|
8579
|
+
* @param - Line item IDs and their new quantity.
|
|
8580
|
+
* @returns Fulfilled - The updated current cart.
|
|
8581
|
+
*/
|
|
8582
|
+
(lineItems: LineItemQuantityUpdate$1[]): Promise<UpdateLineItemsQuantityResponse$1 & UpdateLineItemsQuantityResponseNonNullableFields$1>;
|
|
8583
|
+
}
|
|
8584
|
+
declare function estimateCurrentCartTotals$1(httpClient: HttpClient): EstimateCurrentCartTotalsSignature;
|
|
8585
|
+
interface EstimateCurrentCartTotalsSignature {
|
|
8586
|
+
/**
|
|
8587
|
+
* Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information.
|
|
8588
|
+
*
|
|
8589
|
+
*
|
|
8590
|
+
* The `estimateCurrentCartTotals()` function returns a Promise that resolves when the estimated totals are generated.
|
|
8591
|
+
*
|
|
8592
|
+
* > **Note:** Not passing any `options` properties will only estimate the cart items price totals.
|
|
8593
|
+
* @param - Total estimation options.
|
|
8594
|
+
*/
|
|
8595
|
+
(options?: EstimateCurrentCartTotalsOptions | undefined): Promise<EstimateTotalsResponse & EstimateTotalsResponseNonNullableFields>;
|
|
8596
|
+
}
|
|
8597
|
+
declare function deleteCurrentCart$1(httpClient: HttpClient): DeleteCurrentCartSignature;
|
|
8598
|
+
interface DeleteCurrentCartSignature {
|
|
8599
|
+
/**
|
|
8600
|
+
* Deletes the current site visitor's cart.
|
|
8601
|
+
*
|
|
8602
|
+
*
|
|
8603
|
+
* The `deleteCurrentCart()` function returns a Promise that resolves when the current cart is deleted.
|
|
8604
|
+
* @returns Fulfilled - When the current cart is deleted. Rejected - Error message.
|
|
8605
|
+
*/
|
|
8606
|
+
(): Promise<void>;
|
|
8607
|
+
}
|
|
7975
8608
|
declare const onCartUpdated$1: EventDefinition<CartUpdatedEnvelope, "wix.ecom.v1.cart_updated">;
|
|
7976
8609
|
declare const onCartDeleted$1: EventDefinition<CartDeletedEnvelope, "wix.ecom.v1.cart_deleted">;
|
|
7977
8610
|
declare const onCartCreated$1: EventDefinition<CartCreatedEnvelope, "wix.ecom.v1.cart_created">;
|
|
@@ -8000,12 +8633,21 @@ type _publicDeleteCurrentCartType = typeof deleteCurrentCart$1;
|
|
|
8000
8633
|
declare const deleteCurrentCart: ReturnType<typeof createRESTModule$g<_publicDeleteCurrentCartType>>;
|
|
8001
8634
|
|
|
8002
8635
|
type _publicOnCartUpdatedType = typeof onCartUpdated$1;
|
|
8636
|
+
/**
|
|
8637
|
+
* Triggered when a cart is updated.
|
|
8638
|
+
*/
|
|
8003
8639
|
declare const onCartUpdated: ReturnType<typeof createEventModule$c<_publicOnCartUpdatedType>>;
|
|
8004
8640
|
|
|
8005
8641
|
type _publicOnCartDeletedType = typeof onCartDeleted$1;
|
|
8642
|
+
/**
|
|
8643
|
+
* Triggered when a cart is deleted.
|
|
8644
|
+
*/
|
|
8006
8645
|
declare const onCartDeleted: ReturnType<typeof createEventModule$c<_publicOnCartDeletedType>>;
|
|
8007
8646
|
|
|
8008
8647
|
type _publicOnCartCreatedType = typeof onCartCreated$1;
|
|
8648
|
+
/**
|
|
8649
|
+
* Triggered when a cart is created.
|
|
8650
|
+
*/
|
|
8009
8651
|
declare const onCartCreated: ReturnType<typeof createEventModule$c<_publicOnCartCreatedType>>;
|
|
8010
8652
|
|
|
8011
8653
|
type context$g_AddToCartRequest = AddToCartRequest;
|
|
@@ -8372,11 +9014,23 @@ interface LineItem$4 {
|
|
|
8372
9014
|
* @readonly
|
|
8373
9015
|
*/
|
|
8374
9016
|
depositAmount?: MultiCurrencyPrice$2;
|
|
9017
|
+
/**
|
|
9018
|
+
* Whether the line item is custom or from catalog.
|
|
9019
|
+
* @readonly
|
|
9020
|
+
*/
|
|
9021
|
+
customLineItem?: boolean;
|
|
8375
9022
|
/**
|
|
8376
9023
|
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
8377
9024
|
* @readonly
|
|
8378
9025
|
*/
|
|
8379
9026
|
consentRequiredPaymentPolicy?: string | null;
|
|
9027
|
+
/**
|
|
9028
|
+
* Overriding values for catalog item properties.
|
|
9029
|
+
*
|
|
9030
|
+
* To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
9031
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
9032
|
+
*/
|
|
9033
|
+
catalogOverrideFields?: CatalogOverrideFields$1;
|
|
8380
9034
|
/**
|
|
8381
9035
|
* Whether to save the payment method on the order.
|
|
8382
9036
|
*
|
|
@@ -8704,17 +9358,17 @@ interface PriceDescription$3 {
|
|
|
8704
9358
|
translated?: string | null;
|
|
8705
9359
|
}
|
|
8706
9360
|
interface CatalogOverrideFields$1 {
|
|
8707
|
-
/** Item
|
|
9361
|
+
/** Item name. */
|
|
8708
9362
|
productName?: ProductName$3;
|
|
8709
9363
|
/** Item price **after** discounts. */
|
|
8710
9364
|
price?: string | null;
|
|
8711
|
-
/** Item price **before**
|
|
9365
|
+
/** Item price **before** discounts. */
|
|
8712
9366
|
fullPrice?: string | null;
|
|
8713
|
-
/**
|
|
9367
|
+
/** Item description lines. Used when displaying the line item to customers. */
|
|
8714
9368
|
descriptionLines?: DescriptionLine$3[];
|
|
8715
|
-
/** Physical properties of the item.
|
|
9369
|
+
/** Physical properties of the item. */
|
|
8716
9370
|
physicalProperties?: PhysicalProperties$4;
|
|
8717
|
-
/**
|
|
9371
|
+
/** Item image. */
|
|
8718
9372
|
image?: string;
|
|
8719
9373
|
}
|
|
8720
9374
|
/** Billing Info and shipping details */
|
|
@@ -9537,9 +10191,14 @@ interface CreateCheckoutRequest {
|
|
|
9537
10191
|
checkoutInfo?: Checkout$1;
|
|
9538
10192
|
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
9539
10193
|
couponCode?: string | null;
|
|
9540
|
-
/** Line items to
|
|
10194
|
+
/** Line items to add to the checkout. */
|
|
9541
10195
|
lineItems?: LineItem$4[];
|
|
9542
|
-
/**
|
|
10196
|
+
/**
|
|
10197
|
+
* Custom line items to add to the checkout.
|
|
10198
|
+
*
|
|
10199
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
10200
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
10201
|
+
*/
|
|
9543
10202
|
customLineItems?: CustomLineItem$2[];
|
|
9544
10203
|
/**
|
|
9545
10204
|
* **Required**
|
|
@@ -9583,31 +10242,30 @@ interface CustomLineItem$2 {
|
|
|
9583
10242
|
media?: string;
|
|
9584
10243
|
/**
|
|
9585
10244
|
* Custom line item ID. If passed, `id` must be unique.
|
|
9586
|
-
*
|
|
10245
|
+
*
|
|
10246
|
+
* Default: auto-generated ID
|
|
9587
10247
|
*/
|
|
9588
10248
|
_id?: string | null;
|
|
9589
10249
|
/** Tax group ID for this custom line item. */
|
|
9590
10250
|
taxGroupId?: string | null;
|
|
9591
10251
|
/** Name of the item or product. */
|
|
9592
10252
|
productName?: ProductName$3;
|
|
9593
|
-
/**
|
|
9594
|
-
* Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.
|
|
9595
|
-
* The URL is optional and if not provided, the site URL will be used.
|
|
9596
|
-
*/
|
|
10253
|
+
/** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
|
|
9597
10254
|
url?: string;
|
|
9598
10255
|
/** Item type. Either a preset type or custom. */
|
|
9599
10256
|
itemType?: ItemType$4;
|
|
9600
|
-
/**
|
|
10257
|
+
/** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
9601
10258
|
fullPrice?: string | null;
|
|
9602
10259
|
/**
|
|
9603
|
-
*
|
|
10260
|
+
* Item quantity available for purchase. Only return this if inventory is managed.
|
|
9604
10261
|
* Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
|
|
9605
10262
|
*/
|
|
9606
10263
|
quantityAvailable?: number | null;
|
|
9607
|
-
/**
|
|
10264
|
+
/** Physical properties of the item. */
|
|
9608
10265
|
physicalProperties?: PhysicalProperties$4;
|
|
9609
10266
|
/**
|
|
9610
|
-
*
|
|
10267
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
10268
|
+
*
|
|
9611
10269
|
* + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
|
|
9612
10270
|
* + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
9613
10271
|
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
@@ -9615,21 +10273,23 @@ interface CustomLineItem$2 {
|
|
|
9615
10273
|
*/
|
|
9616
10274
|
paymentOption?: PaymentOptionType$4;
|
|
9617
10275
|
/**
|
|
9618
|
-
*
|
|
10276
|
+
* Service properties. When relevant, this contains information such as date and number of participants.
|
|
9619
10277
|
* Used, among other things, when checking for valid memberships.
|
|
9620
10278
|
*/
|
|
9621
10279
|
serviceProperties?: ServiceProperties$3;
|
|
9622
10280
|
/**
|
|
9623
|
-
*
|
|
10281
|
+
* In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
|
|
10282
|
+
*
|
|
9624
10283
|
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
9625
|
-
* +
|
|
10284
|
+
* + In most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
9626
10285
|
* + Used in membership validation.
|
|
9627
10286
|
*/
|
|
9628
10287
|
rootCatalogItemId?: string | null;
|
|
9629
10288
|
/**
|
|
9630
|
-
*
|
|
10289
|
+
* Partial payment for the given item to be paid upfront during the checkout.
|
|
10290
|
+
*
|
|
9631
10291
|
* Eligible for catalog items with type `DEPOSIT_ONLINE`.
|
|
9632
|
-
*
|
|
10292
|
+
* When omitted, the item's price will not be split and is expected to be paid in a single installment.
|
|
9633
10293
|
*/
|
|
9634
10294
|
depositAmount?: string | null;
|
|
9635
10295
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
@@ -9707,7 +10367,14 @@ interface UpdateCheckoutRequest {
|
|
|
9707
10367
|
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
9708
10368
|
*/
|
|
9709
10369
|
overrideCheckoutUrl?: string | null;
|
|
9710
|
-
/**
|
|
10370
|
+
/** Line items. */
|
|
10371
|
+
lineItems?: LineItem$4[];
|
|
10372
|
+
/**
|
|
10373
|
+
* Custom line items.
|
|
10374
|
+
*
|
|
10375
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
10376
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
10377
|
+
*/
|
|
9711
10378
|
customLineItems?: CustomLineItem$2[];
|
|
9712
10379
|
}
|
|
9713
10380
|
interface UpdateCheckoutResponse {
|
|
@@ -9743,7 +10410,12 @@ interface AddToCheckoutRequest {
|
|
|
9743
10410
|
_id: string;
|
|
9744
10411
|
/** Catalog line items. */
|
|
9745
10412
|
lineItems?: LineItem$4[];
|
|
9746
|
-
/**
|
|
10413
|
+
/**
|
|
10414
|
+
* Custom line items.
|
|
10415
|
+
*
|
|
10416
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
10417
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
10418
|
+
*/
|
|
9747
10419
|
customLineItems?: CustomLineItem$2[];
|
|
9748
10420
|
}
|
|
9749
10421
|
interface AddToCheckoutResponse {
|
|
@@ -10882,9 +11554,14 @@ interface CreateCheckoutOptions {
|
|
|
10882
11554
|
checkoutInfo?: Checkout$1;
|
|
10883
11555
|
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
10884
11556
|
couponCode?: string | null;
|
|
10885
|
-
/** Line items to
|
|
11557
|
+
/** Line items to add to the checkout. */
|
|
10886
11558
|
lineItems?: LineItem$4[];
|
|
10887
|
-
/**
|
|
11559
|
+
/**
|
|
11560
|
+
* Custom line items to add to the checkout.
|
|
11561
|
+
*
|
|
11562
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
11563
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
11564
|
+
*/
|
|
10888
11565
|
customLineItems?: CustomLineItem$2[];
|
|
10889
11566
|
/**
|
|
10890
11567
|
* **Required**
|
|
@@ -11032,81 +11709,257 @@ interface UpdateCheckout {
|
|
|
11032
11709
|
* Remaining amount for the order to be fully paid.
|
|
11033
11710
|
* @readonly
|
|
11034
11711
|
*/
|
|
11035
|
-
payLater?: PriceSummary$4;
|
|
11036
|
-
/** Memberships to apply when creating the order. */
|
|
11037
|
-
membershipOptions?: MembershipOptions$2;
|
|
11038
|
-
/** Additional Fees. */
|
|
11039
|
-
additionalFees?: AdditionalFee$4[];
|
|
11040
|
-
/** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */
|
|
11041
|
-
cartId?: string | null;
|
|
11712
|
+
payLater?: PriceSummary$4;
|
|
11713
|
+
/** Memberships to apply when creating the order. */
|
|
11714
|
+
membershipOptions?: MembershipOptions$2;
|
|
11715
|
+
/** Additional Fees. */
|
|
11716
|
+
additionalFees?: AdditionalFee$4[];
|
|
11717
|
+
/** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */
|
|
11718
|
+
cartId?: string | null;
|
|
11719
|
+
/**
|
|
11720
|
+
* List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction).
|
|
11721
|
+
* @readonly
|
|
11722
|
+
*/
|
|
11723
|
+
violations?: Violation$1[];
|
|
11724
|
+
/**
|
|
11725
|
+
* Custom field data for the checkout object.
|
|
11726
|
+
*
|
|
11727
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.
|
|
11728
|
+
*/
|
|
11729
|
+
extendedFields?: ExtendedFields$7;
|
|
11730
|
+
/**
|
|
11731
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
11732
|
+
* @readonly
|
|
11733
|
+
*/
|
|
11734
|
+
purchaseFlowId?: string | null;
|
|
11735
|
+
/**
|
|
11736
|
+
* Additional settings for customization of the checkout process.
|
|
11737
|
+
*
|
|
11738
|
+
* Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).
|
|
11739
|
+
*/
|
|
11740
|
+
customSettings?: CustomSettings$1;
|
|
11741
|
+
/**
|
|
11742
|
+
* Customize the content of the checkout page.
|
|
11743
|
+
*
|
|
11744
|
+
* Includes IDs for the app and the component providing the content
|
|
11745
|
+
*/
|
|
11746
|
+
customContentReference?: CustomContentReference$1;
|
|
11747
|
+
/**
|
|
11748
|
+
* Used for integration and tracking across different platforms.
|
|
11749
|
+
* Contains external system IDs (e.g., app ID, external ID) to link the checkout with other systems.
|
|
11750
|
+
*/
|
|
11751
|
+
externalReference?: ExternalReference$1;
|
|
11752
|
+
}
|
|
11753
|
+
interface UpdateCheckoutOptions {
|
|
11754
|
+
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
11755
|
+
couponCode?: string | null;
|
|
11756
|
+
/** Gift card code. */
|
|
11757
|
+
giftCardCode?: string | null;
|
|
11758
|
+
/**
|
|
11759
|
+
* `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page.
|
|
11760
|
+
*
|
|
11761
|
+
* This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
11762
|
+
*/
|
|
11763
|
+
overrideCheckoutUrl?: string | null;
|
|
11764
|
+
/** Line items. */
|
|
11765
|
+
lineItems?: LineItem$4[];
|
|
11766
|
+
/**
|
|
11767
|
+
* Custom line items.
|
|
11768
|
+
*
|
|
11769
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
11770
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
11771
|
+
*/
|
|
11772
|
+
customLineItems?: CustomLineItem$2[];
|
|
11773
|
+
}
|
|
11774
|
+
interface AddToCheckoutOptions {
|
|
11775
|
+
/** Catalog line items. */
|
|
11776
|
+
lineItems?: LineItem$4[];
|
|
11777
|
+
/**
|
|
11778
|
+
* Custom line items.
|
|
11779
|
+
*
|
|
11780
|
+
* To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
11781
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
11782
|
+
*/
|
|
11783
|
+
customLineItems?: CustomLineItem$2[];
|
|
11784
|
+
}
|
|
11785
|
+
|
|
11786
|
+
declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
|
|
11787
|
+
interface CreateCheckoutSignature {
|
|
11788
|
+
/**
|
|
11789
|
+
* Creates a checkout.
|
|
11790
|
+
*
|
|
11791
|
+
*
|
|
11792
|
+
* The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
|
|
11793
|
+
*
|
|
11794
|
+
* > **Notes:**
|
|
11795
|
+
* > + Checkout must include at least 1 item in the `options.lineItems` array.
|
|
11796
|
+
* > + `options.channelType` is required.
|
|
11797
|
+
* > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
|
|
11798
|
+
* > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
|
|
11799
|
+
* @param - Checkout creation options.
|
|
11800
|
+
* @returns Fulfilled - the newly created checkout.
|
|
11801
|
+
*/
|
|
11802
|
+
(options?: CreateCheckoutOptions | undefined): Promise<Checkout$1 & CheckoutNonNullableFields>;
|
|
11803
|
+
}
|
|
11804
|
+
declare function getCheckout$1(httpClient: HttpClient): GetCheckoutSignature;
|
|
11805
|
+
interface GetCheckoutSignature {
|
|
11806
|
+
/**
|
|
11807
|
+
* Retrieves a checkout.
|
|
11808
|
+
*
|
|
11809
|
+
*
|
|
11810
|
+
* The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
|
|
11811
|
+
* @param - Checkout ID.
|
|
11812
|
+
* @returns Fulfilled - the requested checkout.
|
|
11813
|
+
*/
|
|
11814
|
+
(_id: string): Promise<Checkout$1 & CheckoutNonNullableFields>;
|
|
11815
|
+
}
|
|
11816
|
+
declare function getCheckoutByCartId$1(httpClient: HttpClient): GetCheckoutByCartIdSignature;
|
|
11817
|
+
interface GetCheckoutByCartIdSignature {
|
|
11818
|
+
/**
|
|
11819
|
+
* Retrieves the checkout associated with a specified cart.
|
|
11820
|
+
* @param - Cart ID.
|
|
11821
|
+
*/
|
|
11822
|
+
(_id: string): Promise<GetCheckoutByCartIdResponse & GetCheckoutByCartIdResponseNonNullableFields>;
|
|
11823
|
+
}
|
|
11824
|
+
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
11825
|
+
interface GetCheckoutUrlSignature {
|
|
11826
|
+
/**
|
|
11827
|
+
* Retrieves the checkout page URL of a specified checkout.
|
|
11828
|
+
*
|
|
11829
|
+
* By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
|
|
11830
|
+
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
11831
|
+
* @param - Checkout ID.
|
|
11832
|
+
*/
|
|
11833
|
+
(_id: string): Promise<GetCheckoutURLResponse & GetCheckoutURLResponseNonNullableFields>;
|
|
11834
|
+
}
|
|
11835
|
+
declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
|
|
11836
|
+
interface UpdateCheckoutSignature {
|
|
11837
|
+
/**
|
|
11838
|
+
* Updates a checkout.
|
|
11839
|
+
*
|
|
11840
|
+
*
|
|
11841
|
+
* The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.
|
|
11842
|
+
*
|
|
11843
|
+
* >**Notes:**
|
|
11844
|
+
* > + If nothing is passed in the request, the call will fail.
|
|
11845
|
+
* > + The `checkout.buyerInfo.email` may not be removed once it is set.
|
|
11846
|
+
* @param - Checkout ID.
|
|
11847
|
+
* @param - Checkout update options.
|
|
11848
|
+
* @returns Updated checkout.
|
|
11849
|
+
*/
|
|
11850
|
+
(_id: string | null, checkout: UpdateCheckout, options?: UpdateCheckoutOptions | undefined): Promise<Checkout$1 & CheckoutNonNullableFields>;
|
|
11851
|
+
}
|
|
11852
|
+
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
11853
|
+
interface RemoveCouponSignature {
|
|
11042
11854
|
/**
|
|
11043
|
-
*
|
|
11044
|
-
*
|
|
11855
|
+
* Removes the coupon from a specified checkout.
|
|
11856
|
+
*
|
|
11857
|
+
*
|
|
11858
|
+
* The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
|
|
11859
|
+
*
|
|
11860
|
+
* >**Note:** A checkout can only hold 1 coupon.
|
|
11861
|
+
* @param - ID of the checkout to remove the coupon from.
|
|
11045
11862
|
*/
|
|
11046
|
-
|
|
11863
|
+
(_id: string): Promise<RemoveCouponResponse & RemoveCouponResponseNonNullableFields>;
|
|
11864
|
+
}
|
|
11865
|
+
declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
|
|
11866
|
+
interface RemoveGiftCardSignature {
|
|
11047
11867
|
/**
|
|
11048
|
-
*
|
|
11868
|
+
* Removes the gift card from a specified checkout.
|
|
11049
11869
|
*
|
|
11050
|
-
*
|
|
11870
|
+
*
|
|
11871
|
+
* The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
|
|
11872
|
+
*
|
|
11873
|
+
* >**Note:** A checkout can only hold 1 gift card.
|
|
11874
|
+
* @param - ID of the checkout to remove the gift card from.
|
|
11051
11875
|
*/
|
|
11052
|
-
|
|
11876
|
+
(_id: string): Promise<RemoveGiftCardResponse & RemoveGiftCardResponseNonNullableFields>;
|
|
11877
|
+
}
|
|
11878
|
+
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
|
|
11879
|
+
interface RemoveOverrideCheckoutUrlSignature {
|
|
11053
11880
|
/**
|
|
11054
|
-
*
|
|
11055
|
-
*
|
|
11881
|
+
* Removes the `overrideCheckoutUrl` from a specified checkout.
|
|
11882
|
+
*
|
|
11883
|
+
* When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
|
|
11884
|
+
* Wix checkout page URL.
|
|
11885
|
+
* @param - ID of the checkout to remove the override checkout url from.
|
|
11056
11886
|
*/
|
|
11057
|
-
|
|
11887
|
+
(_id: string): Promise<RemoveOverrideCheckoutUrlResponse & RemoveOverrideCheckoutUrlResponseNonNullableFields>;
|
|
11888
|
+
}
|
|
11889
|
+
declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
|
|
11890
|
+
interface AddToCheckoutSignature {
|
|
11058
11891
|
/**
|
|
11059
|
-
*
|
|
11892
|
+
* Adds catalog line items and/or custom line items to a checkout.
|
|
11060
11893
|
*
|
|
11061
|
-
*
|
|
11894
|
+
*
|
|
11895
|
+
* The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
|
|
11896
|
+
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
11897
|
+
* @param - Checkout ID.
|
|
11898
|
+
* @param - Items to be added to checkout.
|
|
11062
11899
|
*/
|
|
11063
|
-
|
|
11900
|
+
(_id: string, options?: AddToCheckoutOptions | undefined): Promise<AddToCheckoutResponse & AddToCheckoutResponseNonNullableFields>;
|
|
11901
|
+
}
|
|
11902
|
+
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
11903
|
+
interface RemoveLineItemsSignature {
|
|
11064
11904
|
/**
|
|
11065
|
-
*
|
|
11905
|
+
* Removes line items from the specified checkout.
|
|
11066
11906
|
*
|
|
11067
|
-
*
|
|
11907
|
+
*
|
|
11908
|
+
* The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
|
|
11909
|
+
* @param - ID of the checkout to remove line items from.
|
|
11910
|
+
* @param - IDs of the line items to be removed.
|
|
11911
|
+
* To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`.
|
|
11068
11912
|
*/
|
|
11069
|
-
|
|
11913
|
+
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse & RemoveLineItemsResponseNonNullableFields>;
|
|
11914
|
+
}
|
|
11915
|
+
declare function createOrder$3(httpClient: HttpClient): CreateOrderSignature$1;
|
|
11916
|
+
interface CreateOrderSignature$1 {
|
|
11070
11917
|
/**
|
|
11071
|
-
*
|
|
11072
|
-
*
|
|
11918
|
+
* Creates an order from a specified checkout.
|
|
11919
|
+
*
|
|
11920
|
+
* The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
|
|
11921
|
+
* Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.
|
|
11922
|
+
*
|
|
11923
|
+
* > **Note:** The following requirements must be met for an order to be created from a checkout.
|
|
11924
|
+
* > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.
|
|
11925
|
+
* > + A checkout must have at least 1 line item.
|
|
11926
|
+
* > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
|
|
11927
|
+
* > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
|
|
11928
|
+
* > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
|
|
11929
|
+
* > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
|
|
11930
|
+
* @param - Checkout ID.
|
|
11931
|
+
* @param - Further order creation options.
|
|
11073
11932
|
*/
|
|
11074
|
-
|
|
11933
|
+
(_id: string): Promise<CreateOrderResponse$1 & CreateOrderResponseNonNullableFields$1>;
|
|
11075
11934
|
}
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
couponCode?: string | null;
|
|
11079
|
-
/** Gift card code. */
|
|
11080
|
-
giftCardCode?: string | null;
|
|
11935
|
+
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
|
|
11936
|
+
interface MarkCheckoutAsCompletedSignature {
|
|
11081
11937
|
/**
|
|
11082
|
-
*
|
|
11938
|
+
* Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
|
|
11083
11939
|
*
|
|
11084
|
-
*
|
|
11940
|
+
*
|
|
11941
|
+
* The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.
|
|
11942
|
+
* @param - Checkout ID.
|
|
11085
11943
|
*/
|
|
11086
|
-
|
|
11087
|
-
/** Custom line items to be saved on checkout. */
|
|
11088
|
-
customLineItems?: CustomLineItem$2[];
|
|
11944
|
+
(_id: string): Promise<void>;
|
|
11089
11945
|
}
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11946
|
+
declare function updateLineItemsQuantity$1(httpClient: HttpClient): UpdateLineItemsQuantitySignature;
|
|
11947
|
+
interface UpdateLineItemsQuantitySignature {
|
|
11948
|
+
/**
|
|
11949
|
+
* Updates the quantity of one or more line items in a checkout.
|
|
11950
|
+
*
|
|
11951
|
+
* This endpoint is only for updating the quantity of line items. To entirely remove a line item from
|
|
11952
|
+
* the checkout, use [`removeLineItems()`](#removelineitems).
|
|
11953
|
+
* To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).
|
|
11954
|
+
*
|
|
11955
|
+
* This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
11956
|
+
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
11957
|
+
* of remaining stock.
|
|
11958
|
+
* @param - Checkout ID.
|
|
11959
|
+
* @param - Line item info to update.
|
|
11960
|
+
*/
|
|
11961
|
+
(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse & UpdateLineItemsQuantityResponseNonNullableFields>;
|
|
11095
11962
|
}
|
|
11096
|
-
|
|
11097
|
-
declare function createCheckout$1(httpClient: HttpClient): (options?: CreateCheckoutOptions) => Promise<Checkout$1 & CheckoutNonNullableFields>;
|
|
11098
|
-
declare function getCheckout$1(httpClient: HttpClient): (_id: string) => Promise<Checkout$1 & CheckoutNonNullableFields>;
|
|
11099
|
-
declare function getCheckoutByCartId$1(httpClient: HttpClient): (_id: string) => Promise<GetCheckoutByCartIdResponse & GetCheckoutByCartIdResponseNonNullableFields>;
|
|
11100
|
-
declare function getCheckoutUrl$1(httpClient: HttpClient): (_id: string) => Promise<GetCheckoutURLResponse & GetCheckoutURLResponseNonNullableFields>;
|
|
11101
|
-
declare function updateCheckout$1(httpClient: HttpClient): (_id: string | null, checkout: UpdateCheckout, options?: UpdateCheckoutOptions) => Promise<Checkout$1 & CheckoutNonNullableFields>;
|
|
11102
|
-
declare function removeCoupon$1(httpClient: HttpClient): (_id: string) => Promise<RemoveCouponResponse & RemoveCouponResponseNonNullableFields>;
|
|
11103
|
-
declare function removeGiftCard$1(httpClient: HttpClient): (_id: string) => Promise<RemoveGiftCardResponse & RemoveGiftCardResponseNonNullableFields>;
|
|
11104
|
-
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): (_id: string) => Promise<RemoveOverrideCheckoutUrlResponse & RemoveOverrideCheckoutUrlResponseNonNullableFields>;
|
|
11105
|
-
declare function addToCheckout$1(httpClient: HttpClient): (_id: string, options?: AddToCheckoutOptions) => Promise<AddToCheckoutResponse & AddToCheckoutResponseNonNullableFields>;
|
|
11106
|
-
declare function removeLineItems$1(httpClient: HttpClient): (_id: string, lineItemIds: string[]) => Promise<RemoveLineItemsResponse & RemoveLineItemsResponseNonNullableFields>;
|
|
11107
|
-
declare function createOrder$3(httpClient: HttpClient): (_id: string) => Promise<CreateOrderResponse$1 & CreateOrderResponseNonNullableFields$1>;
|
|
11108
|
-
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
11109
|
-
declare function updateLineItemsQuantity$1(httpClient: HttpClient): (_id: string, lineItems: LineItemQuantityUpdate[]) => Promise<UpdateLineItemsQuantityResponse & UpdateLineItemsQuantityResponseNonNullableFields>;
|
|
11110
11963
|
declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
|
|
11111
11964
|
declare const onCheckoutUpdated$1: EventDefinition<CheckoutUpdatedEnvelope, "wix.ecom.v1.checkout_updated">;
|
|
11112
11965
|
declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
|
|
@@ -11143,12 +11996,22 @@ type _publicUpdateLineItemsQuantityType = typeof updateLineItemsQuantity$1;
|
|
|
11143
11996
|
declare const updateLineItemsQuantity: ReturnType<typeof createRESTModule$f<_publicUpdateLineItemsQuantityType>>;
|
|
11144
11997
|
|
|
11145
11998
|
type _publicOnCheckoutCreatedType = typeof onCheckoutCreated$1;
|
|
11999
|
+
/**
|
|
12000
|
+
* Triggered when a checkout is created.
|
|
12001
|
+
*/
|
|
11146
12002
|
declare const onCheckoutCreated: ReturnType<typeof createEventModule$b<_publicOnCheckoutCreatedType>>;
|
|
11147
12003
|
|
|
11148
12004
|
type _publicOnCheckoutUpdatedType = typeof onCheckoutUpdated$1;
|
|
12005
|
+
/**
|
|
12006
|
+
* Triggered when a checkout is updated.
|
|
12007
|
+
*/
|
|
11149
12008
|
declare const onCheckoutUpdated: ReturnType<typeof createEventModule$b<_publicOnCheckoutUpdatedType>>;
|
|
11150
12009
|
|
|
11151
12010
|
type _publicOnCheckoutCompletedType = typeof onCheckoutCompleted$1;
|
|
12011
|
+
/**
|
|
12012
|
+
* Triggered when an order created from this checkout is
|
|
12013
|
+
* successfully paid for or when a checkout is marked as completed.
|
|
12014
|
+
*/
|
|
11152
12015
|
declare const onCheckoutCompleted: ReturnType<typeof createEventModule$b<_publicOnCheckoutCompletedType>>;
|
|
11153
12016
|
|
|
11154
12017
|
type context$f_AddToCheckoutOptions = AddToCheckoutOptions;
|
|
@@ -11639,8 +12502,29 @@ interface CheckoutSettingsUpdatedEnvelope {
|
|
|
11639
12502
|
metadata: EventMetadata$a;
|
|
11640
12503
|
}
|
|
11641
12504
|
|
|
11642
|
-
declare function getCheckoutSettings$1(httpClient: HttpClient):
|
|
11643
|
-
|
|
12505
|
+
declare function getCheckoutSettings$1(httpClient: HttpClient): GetCheckoutSettingsSignature;
|
|
12506
|
+
interface GetCheckoutSettingsSignature {
|
|
12507
|
+
/**
|
|
12508
|
+
* Retrieves the sites' checkout settings.
|
|
12509
|
+
*
|
|
12510
|
+
*
|
|
12511
|
+
* The `getCheckoutSettings()` function returns a Promise that resolves to checkout settings.
|
|
12512
|
+
* @returns The requested checkout settings.
|
|
12513
|
+
*/
|
|
12514
|
+
(): Promise<GetCheckoutSettingsResponse & GetCheckoutSettingsResponseNonNullableFields>;
|
|
12515
|
+
}
|
|
12516
|
+
declare function updateCheckoutSettings$1(httpClient: HttpClient): UpdateCheckoutSettingsSignature;
|
|
12517
|
+
interface UpdateCheckoutSettingsSignature {
|
|
12518
|
+
/**
|
|
12519
|
+
* Updates the sites' checkout settings.
|
|
12520
|
+
*
|
|
12521
|
+
*
|
|
12522
|
+
* The `updateCheckoutSettings()` function returns a Promise that resolves to the newly updated checkout settings.
|
|
12523
|
+
* @param - Checkout settings to update.
|
|
12524
|
+
* @returns The updated checkout settings.
|
|
12525
|
+
*/
|
|
12526
|
+
(checkoutSettings: CheckoutSettings): Promise<UpdateCheckoutSettingsResponse & UpdateCheckoutSettingsResponseNonNullableFields>;
|
|
12527
|
+
}
|
|
11644
12528
|
declare const onCheckoutSettingsUpdated$1: EventDefinition<CheckoutSettingsUpdatedEnvelope, "wix.ecom.v1.checkout_settings_updated">;
|
|
11645
12529
|
|
|
11646
12530
|
declare function createRESTModule$e<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -11653,6 +12537,9 @@ type _publicUpdateCheckoutSettingsType = typeof updateCheckoutSettings$1;
|
|
|
11653
12537
|
declare const updateCheckoutSettings: ReturnType<typeof createRESTModule$e<_publicUpdateCheckoutSettingsType>>;
|
|
11654
12538
|
|
|
11655
12539
|
type _publicOnCheckoutSettingsUpdatedType = typeof onCheckoutSettingsUpdated$1;
|
|
12540
|
+
/**
|
|
12541
|
+
* Triggered when checkout settings are updated.
|
|
12542
|
+
*/
|
|
11656
12543
|
declare const onCheckoutSettingsUpdated: ReturnType<typeof createEventModule$a<_publicOnCheckoutSettingsUpdatedType>>;
|
|
11657
12544
|
|
|
11658
12545
|
type context$e_Alignment = Alignment;
|
|
@@ -11796,6 +12683,13 @@ interface V1LineItem {
|
|
|
11796
12683
|
* > **Note:** For more information on what to pass to `lineItems.catalogReference`, see [eCommerce Integration in the Wix Stores Catalog API](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration).
|
|
11797
12684
|
*/
|
|
11798
12685
|
catalogReference?: CatalogReference$3;
|
|
12686
|
+
/**
|
|
12687
|
+
* Overriding values for catalog item properties.
|
|
12688
|
+
*
|
|
12689
|
+
* To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
12690
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
12691
|
+
*/
|
|
12692
|
+
catalogOverrideFields?: CatalogOverrideFields;
|
|
11799
12693
|
}
|
|
11800
12694
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
11801
12695
|
interface CatalogReference$3 {
|
|
@@ -11820,17 +12714,17 @@ interface CatalogReference$3 {
|
|
|
11820
12714
|
options?: Record<string, any> | null;
|
|
11821
12715
|
}
|
|
11822
12716
|
interface CatalogOverrideFields {
|
|
11823
|
-
/** Item
|
|
12717
|
+
/** Item name. */
|
|
11824
12718
|
productName?: ProductName$2;
|
|
11825
12719
|
/** Item price **after** discounts. */
|
|
11826
12720
|
price?: string | null;
|
|
11827
|
-
/** Item price **before**
|
|
12721
|
+
/** Item price **before** discounts. */
|
|
11828
12722
|
fullPrice?: string | null;
|
|
11829
|
-
/**
|
|
12723
|
+
/** Item description lines. Used when displaying the line item to customers. */
|
|
11830
12724
|
descriptionLines?: DescriptionLine$2[];
|
|
11831
|
-
/** Physical properties of the item.
|
|
12725
|
+
/** Physical properties of the item. */
|
|
11832
12726
|
physicalProperties?: PhysicalProperties$3;
|
|
11833
|
-
/**
|
|
12727
|
+
/** Item image. */
|
|
11834
12728
|
image?: string;
|
|
11835
12729
|
}
|
|
11836
12730
|
interface ProductName$2 {
|
|
@@ -11935,31 +12829,30 @@ interface CustomLineItem$1 {
|
|
|
11935
12829
|
media?: string;
|
|
11936
12830
|
/**
|
|
11937
12831
|
* Custom line item ID. If passed, `id` must be unique.
|
|
11938
|
-
*
|
|
12832
|
+
*
|
|
12833
|
+
* Default: auto-generated ID
|
|
11939
12834
|
*/
|
|
11940
12835
|
_id?: string | null;
|
|
11941
12836
|
/** Tax group ID for this custom line item. */
|
|
11942
12837
|
taxGroupId?: string | null;
|
|
11943
12838
|
/** Name of the item or product. */
|
|
11944
12839
|
productName?: ProductName$2;
|
|
11945
|
-
/**
|
|
11946
|
-
* Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.
|
|
11947
|
-
* The URL is optional and if not provided, the site URL will be used.
|
|
11948
|
-
*/
|
|
12840
|
+
/** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */
|
|
11949
12841
|
url?: string;
|
|
11950
12842
|
/** Item type. Either a preset type or custom. */
|
|
11951
12843
|
itemType?: ItemType$3;
|
|
11952
|
-
/**
|
|
12844
|
+
/** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */
|
|
11953
12845
|
fullPrice?: string | null;
|
|
11954
12846
|
/**
|
|
11955
|
-
*
|
|
12847
|
+
* Item quantity available for purchase. Only return this if inventory is managed.
|
|
11956
12848
|
* Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
|
|
11957
12849
|
*/
|
|
11958
12850
|
quantityAvailable?: number | null;
|
|
11959
|
-
/**
|
|
12851
|
+
/** Physical properties of the item. */
|
|
11960
12852
|
physicalProperties?: PhysicalProperties$3;
|
|
11961
12853
|
/**
|
|
11962
|
-
*
|
|
12854
|
+
* Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
|
|
12855
|
+
*
|
|
11963
12856
|
* + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
|
|
11964
12857
|
* + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
|
|
11965
12858
|
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
@@ -11967,21 +12860,23 @@ interface CustomLineItem$1 {
|
|
|
11967
12860
|
*/
|
|
11968
12861
|
paymentOption?: PaymentOptionType$3;
|
|
11969
12862
|
/**
|
|
11970
|
-
*
|
|
12863
|
+
* Service properties. When relevant, this contains information such as date and number of participants.
|
|
11971
12864
|
* Used, among other things, when checking for valid memberships.
|
|
11972
12865
|
*/
|
|
11973
12866
|
serviceProperties?: ServiceProperties$2;
|
|
11974
12867
|
/**
|
|
11975
|
-
*
|
|
12868
|
+
* In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
|
|
12869
|
+
*
|
|
11976
12870
|
* + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
|
|
11977
|
-
* +
|
|
12871
|
+
* + In most cases, this field is the same as `catalogReference.catalogItemId`.
|
|
11978
12872
|
* + Used in membership validation.
|
|
11979
12873
|
*/
|
|
11980
12874
|
rootCatalogItemId?: string | null;
|
|
11981
12875
|
/**
|
|
11982
|
-
*
|
|
12876
|
+
* Partial payment for the given item to be paid upfront during the checkout.
|
|
12877
|
+
*
|
|
11983
12878
|
* Eligible for catalog items with type `DEPOSIT_ONLINE`.
|
|
11984
|
-
*
|
|
12879
|
+
* When omitted, the item's price will not be split and is expected to be paid in a single installment.
|
|
11985
12880
|
*/
|
|
11986
12881
|
depositAmount?: string | null;
|
|
11987
12882
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
@@ -12544,11 +13439,23 @@ interface LineItem$3 {
|
|
|
12544
13439
|
* @readonly
|
|
12545
13440
|
*/
|
|
12546
13441
|
depositAmount?: MultiCurrencyPrice$1;
|
|
13442
|
+
/**
|
|
13443
|
+
* Whether the line item is custom or from catalog.
|
|
13444
|
+
* @readonly
|
|
13445
|
+
*/
|
|
13446
|
+
customLineItem?: boolean;
|
|
12547
13447
|
/**
|
|
12548
13448
|
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
12549
13449
|
* @readonly
|
|
12550
13450
|
*/
|
|
12551
13451
|
consentRequiredPaymentPolicy?: string | null;
|
|
13452
|
+
/**
|
|
13453
|
+
* Overriding values for catalog item properties.
|
|
13454
|
+
*
|
|
13455
|
+
* To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
13456
|
+
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
13457
|
+
*/
|
|
13458
|
+
catalogOverrideFields?: CatalogOverrideFields;
|
|
12552
13459
|
/**
|
|
12553
13460
|
* Whether to save the payment method on the order.
|
|
12554
13461
|
*
|
|
@@ -13865,13 +14772,107 @@ interface CheckoutTemplatesQueryBuilder {
|
|
|
13865
14772
|
find: () => Promise<CheckoutTemplatesQueryResult>;
|
|
13866
14773
|
}
|
|
13867
14774
|
|
|
13868
|
-
declare function createCheckoutTemplate$1(httpClient: HttpClient):
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13874
|
-
|
|
14775
|
+
declare function createCheckoutTemplate$1(httpClient: HttpClient): CreateCheckoutTemplateSignature;
|
|
14776
|
+
interface CreateCheckoutTemplateSignature {
|
|
14777
|
+
/**
|
|
14778
|
+
* Creates a checkout template.
|
|
14779
|
+
*
|
|
14780
|
+
* A checkout template is used to create a new checkout that will include predefined information. For example, a single link with
|
|
14781
|
+
* a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created
|
|
14782
|
+
* for that customer with certain checkout information already populated.
|
|
14783
|
+
*
|
|
14784
|
+
* The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is
|
|
14785
|
+
* using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an
|
|
14786
|
+
* additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.
|
|
14787
|
+
*
|
|
14788
|
+
* A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.
|
|
14789
|
+
* @param - Checkout template to create.
|
|
14790
|
+
* @returns Created checkout template.
|
|
14791
|
+
*/
|
|
14792
|
+
(checkoutTemplate: CheckoutTemplate): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields>;
|
|
14793
|
+
}
|
|
14794
|
+
declare function getCheckoutTemplate$1(httpClient: HttpClient): GetCheckoutTemplateSignature;
|
|
14795
|
+
interface GetCheckoutTemplateSignature {
|
|
14796
|
+
/**
|
|
14797
|
+
* Retrieves a checkout template.
|
|
14798
|
+
* @param - ID of the checkout template to retrieve.
|
|
14799
|
+
* @returns Retrieved checkout template.
|
|
14800
|
+
*/
|
|
14801
|
+
(checkoutTemplateId: string): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields>;
|
|
14802
|
+
}
|
|
14803
|
+
declare function updateCheckoutTemplate$1(httpClient: HttpClient): UpdateCheckoutTemplateSignature;
|
|
14804
|
+
interface UpdateCheckoutTemplateSignature {
|
|
14805
|
+
/**
|
|
14806
|
+
* Updates a checkout template.
|
|
14807
|
+
*
|
|
14808
|
+
* If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously
|
|
14809
|
+
* created from this template before the update will not be affected.
|
|
14810
|
+
* @param - Checkout template ID.
|
|
14811
|
+
* @param - Checkout template info to update.
|
|
14812
|
+
* @returns Updated checkout template.
|
|
14813
|
+
*/
|
|
14814
|
+
(_id: string | null, checkoutTemplate: UpdateCheckoutTemplate): Promise<CheckoutTemplate & CheckoutTemplateNonNullableFields>;
|
|
14815
|
+
}
|
|
14816
|
+
declare function deleteCheckoutTemplate$1(httpClient: HttpClient): DeleteCheckoutTemplateSignature;
|
|
14817
|
+
interface DeleteCheckoutTemplateSignature {
|
|
14818
|
+
/**
|
|
14819
|
+
* Deletes a checkout template.
|
|
14820
|
+
*
|
|
14821
|
+
* If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then
|
|
14822
|
+
* the customer will be redirected to the domain site.
|
|
14823
|
+
* @param - ID of the checkout template to delete.
|
|
14824
|
+
*/
|
|
14825
|
+
(checkoutTemplateId: string): Promise<void>;
|
|
14826
|
+
}
|
|
14827
|
+
declare function queryCheckoutTemplates$1(httpClient: HttpClient): QueryCheckoutTemplatesSignature;
|
|
14828
|
+
interface QueryCheckoutTemplatesSignature {
|
|
14829
|
+
/**
|
|
14830
|
+
* Creates a query to retrieve a list of checkout templates.
|
|
14831
|
+
*
|
|
14832
|
+
* The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.
|
|
14833
|
+
*
|
|
14834
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
14835
|
+
*
|
|
14836
|
+
* You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.
|
|
14837
|
+
*
|
|
14838
|
+
* `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:
|
|
14839
|
+
* + `ascending("_id")`
|
|
14840
|
+
*
|
|
14841
|
+
* The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("_id")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"_id"`.
|
|
14842
|
+
*
|
|
14843
|
+
* The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.
|
|
14844
|
+
*/
|
|
14845
|
+
(): CheckoutTemplatesQueryBuilder;
|
|
14846
|
+
}
|
|
14847
|
+
declare function createCheckoutFromTemplate$1(httpClient: HttpClient): CreateCheckoutFromTemplateSignature;
|
|
14848
|
+
interface CreateCheckoutFromTemplateSignature {
|
|
14849
|
+
/**
|
|
14850
|
+
* Creates a new checkout based on the checkout template.
|
|
14851
|
+
*
|
|
14852
|
+
* Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
|
|
14853
|
+
*
|
|
14854
|
+
* The customer can be directed to the new checkout using the checkout's `checkoutUrl`.
|
|
14855
|
+
* @param - ID of the checkout template to use to create a checkout from.
|
|
14856
|
+
* @param - ID of the site associated with the checkout template.
|
|
14857
|
+
*/
|
|
14858
|
+
(checkoutTemplateId: string, siteId: string): Promise<CreateCheckoutFromTemplateResponse & CreateCheckoutFromTemplateResponseNonNullableFields>;
|
|
14859
|
+
}
|
|
14860
|
+
declare function createAndRedirectToCheckout$1(httpClient: HttpClient): CreateAndRedirectToCheckoutSignature;
|
|
14861
|
+
interface CreateAndRedirectToCheckoutSignature {
|
|
14862
|
+
/**
|
|
14863
|
+
* Creates a new checkout based on the checkout template and redirects to the new checkout page.
|
|
14864
|
+
*
|
|
14865
|
+
* Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
|
|
14866
|
+
*
|
|
14867
|
+
* To build a URL that uses this function, follow this format:
|
|
14868
|
+
* `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`
|
|
14869
|
+
*
|
|
14870
|
+
* To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.
|
|
14871
|
+
* @param - ID of the checkout template to use to create a checkout.
|
|
14872
|
+
* @param - ID of the site associated with the checkout template.
|
|
14873
|
+
*/
|
|
14874
|
+
(checkoutTemplateId: string, siteId: string): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
|
|
14875
|
+
}
|
|
13875
14876
|
declare const onCheckoutTemplateCreated$1: EventDefinition<CheckoutTemplateCreatedEnvelope, "wix.ecom.v1.checkout_template_created">;
|
|
13876
14877
|
declare const onCheckoutTemplateUpdated$1: EventDefinition<CheckoutTemplateUpdatedEnvelope, "wix.ecom.v1.checkout_template_updated">;
|
|
13877
14878
|
declare const onCheckoutTemplateDeleted$1: EventDefinition<CheckoutTemplateDeletedEnvelope, "wix.ecom.v1.checkout_template_deleted">;
|
|
@@ -13897,15 +14898,27 @@ type _publicCreateAndRedirectToCheckoutType = typeof createAndRedirectToCheckout
|
|
|
13897
14898
|
declare const createAndRedirectToCheckout: ReturnType<typeof createRESTModule$d<_publicCreateAndRedirectToCheckoutType>>;
|
|
13898
14899
|
|
|
13899
14900
|
type _publicOnCheckoutTemplateCreatedType = typeof onCheckoutTemplateCreated$1;
|
|
14901
|
+
/**
|
|
14902
|
+
* Triggered when a checkout template is created.
|
|
14903
|
+
*/
|
|
13900
14904
|
declare const onCheckoutTemplateCreated: ReturnType<typeof createEventModule$9<_publicOnCheckoutTemplateCreatedType>>;
|
|
13901
14905
|
|
|
13902
14906
|
type _publicOnCheckoutTemplateUpdatedType = typeof onCheckoutTemplateUpdated$1;
|
|
14907
|
+
/**
|
|
14908
|
+
* Triggered when a checkout template is updated.
|
|
14909
|
+
*/
|
|
13903
14910
|
declare const onCheckoutTemplateUpdated: ReturnType<typeof createEventModule$9<_publicOnCheckoutTemplateUpdatedType>>;
|
|
13904
14911
|
|
|
13905
14912
|
type _publicOnCheckoutTemplateDeletedType = typeof onCheckoutTemplateDeleted$1;
|
|
14913
|
+
/**
|
|
14914
|
+
* Triggered when a checkout template is deleted.
|
|
14915
|
+
*/
|
|
13906
14916
|
declare const onCheckoutTemplateDeleted: ReturnType<typeof createEventModule$9<_publicOnCheckoutTemplateDeletedType>>;
|
|
13907
14917
|
|
|
13908
14918
|
type _publicOnCheckoutTemplateUsedType = typeof onCheckoutTemplateUsed$1;
|
|
14919
|
+
/**
|
|
14920
|
+
* Triggered when a checkout is created from a checkout template.
|
|
14921
|
+
*/
|
|
13909
14922
|
declare const onCheckoutTemplateUsed: ReturnType<typeof createEventModule$9<_publicOnCheckoutTemplateUsedType>>;
|
|
13910
14923
|
|
|
13911
14924
|
type context$d_CatalogOverrideFields = CatalogOverrideFields;
|
|
@@ -15186,20 +16199,145 @@ interface UpdateExtendedFieldsOptions$3 {
|
|
|
15186
16199
|
namespaceData: Record<string, any> | null;
|
|
15187
16200
|
}
|
|
15188
16201
|
|
|
15189
|
-
declare function createDeliveryProfile$1(httpClient: HttpClient):
|
|
15190
|
-
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
declare function
|
|
15201
|
-
|
|
15202
|
-
|
|
16202
|
+
declare function createDeliveryProfile$1(httpClient: HttpClient): CreateDeliveryProfileSignature;
|
|
16203
|
+
interface CreateDeliveryProfileSignature {
|
|
16204
|
+
/**
|
|
16205
|
+
* Creates a DeliveryProfile.
|
|
16206
|
+
*
|
|
16207
|
+
* The request body must include the DeliveryProfiles name. DeliveryRegions are optional.
|
|
16208
|
+
* @param - DeliveryProfile to be created.
|
|
16209
|
+
* @returns The created DeliveryProfile.
|
|
16210
|
+
*/
|
|
16211
|
+
(deliveryProfile: DeliveryProfile): Promise<DeliveryProfile & DeliveryProfileNonNullableFields>;
|
|
16212
|
+
}
|
|
16213
|
+
declare function getDeliveryProfile$1(httpClient: HttpClient): GetDeliveryProfileSignature;
|
|
16214
|
+
interface GetDeliveryProfileSignature {
|
|
16215
|
+
/**
|
|
16216
|
+
* Retrieves a DeliveryProfile.
|
|
16217
|
+
* @param - ID of the DeliveryProfile to retrieve.
|
|
16218
|
+
* @returns The requested DeliveryProfile.
|
|
16219
|
+
*/
|
|
16220
|
+
(deliveryProfileId: string): Promise<DeliveryProfile & DeliveryProfileNonNullableFields>;
|
|
16221
|
+
}
|
|
16222
|
+
declare function updateDeliveryProfile$1(httpClient: HttpClient): UpdateDeliveryProfileSignature;
|
|
16223
|
+
interface UpdateDeliveryProfileSignature {
|
|
16224
|
+
/**
|
|
16225
|
+
* Updates a DeliveryProfile.
|
|
16226
|
+
*
|
|
16227
|
+
*
|
|
16228
|
+
* Each time the DeliveryProfile is updated,
|
|
16229
|
+
* `revision` increments by 1.
|
|
16230
|
+
* The current `revision` must be passed when updating the DeliveryProfile.
|
|
16231
|
+
* This ensures you're working with the latest DeliveryProfile
|
|
16232
|
+
* and prevents unintended overwrites.
|
|
16233
|
+
*
|
|
16234
|
+
* This method does not allow updating the DeliveryRegions in this DeliveryProfile.
|
|
16235
|
+
* Use AddDeliveryRegion, UpdateDeliveryRegion and RemoveDeliveryRegion for these functionalities.
|
|
16236
|
+
* @param - DeliveryProfile ID.
|
|
16237
|
+
* @returns Updated DeliveryProfile.
|
|
16238
|
+
*/
|
|
16239
|
+
(_id: string | null, deliveryProfile: UpdateDeliveryProfile): Promise<DeliveryProfile & DeliveryProfileNonNullableFields>;
|
|
16240
|
+
}
|
|
16241
|
+
declare function deleteDeliveryProfile$1(httpClient: HttpClient): DeleteDeliveryProfileSignature;
|
|
16242
|
+
interface DeleteDeliveryProfileSignature {
|
|
16243
|
+
/**
|
|
16244
|
+
* Deletes a DeliveryProfile.
|
|
16245
|
+
*
|
|
16246
|
+
* Deleting a DeliveryProfile permanently removes them from the DeliveryProfile List.
|
|
16247
|
+
* @param - Id of the DeliveryProfile to delete.
|
|
16248
|
+
*/
|
|
16249
|
+
(deliveryProfileId: string): Promise<void>;
|
|
16250
|
+
}
|
|
16251
|
+
declare function queryDeliveryProfiles$1(httpClient: HttpClient): QueryDeliveryProfilesSignature;
|
|
16252
|
+
interface QueryDeliveryProfilesSignature {
|
|
16253
|
+
/**
|
|
16254
|
+
* Retrieves a list of DeliveryProfiles, given the provided [paging, filtering, and sorting][1].
|
|
16255
|
+
*
|
|
16256
|
+
* Up to 1,000 DeliveryProfiles can be returned per request.
|
|
16257
|
+
*
|
|
16258
|
+
* To learn how to query DeliveryProfiles, see [API Query Language][2].
|
|
16259
|
+
*
|
|
16260
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
16261
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
16262
|
+
*/
|
|
16263
|
+
(): DeliveryProfilesQueryBuilder;
|
|
16264
|
+
}
|
|
16265
|
+
declare function addDeliveryRegion$1(httpClient: HttpClient): AddDeliveryRegionSignature;
|
|
16266
|
+
interface AddDeliveryRegionSignature {
|
|
16267
|
+
/**
|
|
16268
|
+
* Creates a new DeliveryRegion in an existing DeliveryProfile.
|
|
16269
|
+
* @param - delivery profile id to associated with the DeliveryRegion
|
|
16270
|
+
* @param - DeliveryRegion to be created
|
|
16271
|
+
*/
|
|
16272
|
+
(deliveryProfileId: string, deliveryRegion: DeliveryRegion, options?: AddDeliveryRegionOptions | undefined): Promise<AddDeliveryRegionResponse & AddDeliveryRegionResponseNonNullableFields>;
|
|
16273
|
+
}
|
|
16274
|
+
declare function updateDeliveryRegion$1(httpClient: HttpClient): UpdateDeliveryRegionSignature;
|
|
16275
|
+
interface UpdateDeliveryRegionSignature {
|
|
16276
|
+
/**
|
|
16277
|
+
* Update a DeliveryRegion, supports partial update
|
|
16278
|
+
* Pass the latest `revision` for a successful update
|
|
16279
|
+
*
|
|
16280
|
+
* This method does not allow setting or updating the delivery delivery_carriers in this delivery_region.
|
|
16281
|
+
* Use AddDeliveryCarrier, UpdateDeliveryCarrier and RemoveDeliveryCarrier for these functionalities.
|
|
16282
|
+
*/
|
|
16283
|
+
(identifiers: UpdateDeliveryRegionIdentifiers, deliveryRegion: UpdateDeliveryRegion, options?: UpdateDeliveryRegionOptions | undefined): Promise<UpdateDeliveryRegionResponse & UpdateDeliveryRegionResponseNonNullableFields>;
|
|
16284
|
+
}
|
|
16285
|
+
declare function removeDeliveryRegion$1(httpClient: HttpClient): RemoveDeliveryRegionSignature;
|
|
16286
|
+
interface RemoveDeliveryRegionSignature {
|
|
16287
|
+
/**
|
|
16288
|
+
* Delete a DeliveryRegion
|
|
16289
|
+
*/
|
|
16290
|
+
(identifiers: RemoveDeliveryRegionIdentifiers, options?: RemoveDeliveryRegionOptions | undefined): Promise<RemoveDeliveryRegionResponse & RemoveDeliveryRegionResponseNonNullableFields>;
|
|
16291
|
+
}
|
|
16292
|
+
declare function addDeliveryCarrier$1(httpClient: HttpClient): AddDeliveryCarrierSignature;
|
|
16293
|
+
interface AddDeliveryCarrierSignature {
|
|
16294
|
+
/**
|
|
16295
|
+
* Add a delivery_carrier to a delivery region
|
|
16296
|
+
* @param - delivery_region id to associated with the delivery_carrier.
|
|
16297
|
+
*/
|
|
16298
|
+
(deliveryRegionId: string, options: AddDeliveryCarrierOptions): Promise<AddDeliveryCarrierResponse & AddDeliveryCarrierResponseNonNullableFields>;
|
|
16299
|
+
}
|
|
16300
|
+
declare function removeDeliveryCarrier$1(httpClient: HttpClient): RemoveDeliveryCarrierSignature;
|
|
16301
|
+
interface RemoveDeliveryCarrierSignature {
|
|
16302
|
+
/**
|
|
16303
|
+
* Remove a delivery_carrier from a delivery region
|
|
16304
|
+
* @param - Id of the DeliveryRegion
|
|
16305
|
+
*/
|
|
16306
|
+
(deliveryRegionId: string, options: RemoveDeliveryCarrierOptions): Promise<RemoveDeliveryCarrierResponse & RemoveDeliveryCarrierResponseNonNullableFields>;
|
|
16307
|
+
}
|
|
16308
|
+
declare function updateDeliveryCarrier$1(httpClient: HttpClient): UpdateDeliveryCarrierSignature;
|
|
16309
|
+
interface UpdateDeliveryCarrierSignature {
|
|
16310
|
+
/**
|
|
16311
|
+
* Update a delivery carrier in a delivery region
|
|
16312
|
+
* @param - DeliveryRegion id
|
|
16313
|
+
*/
|
|
16314
|
+
(deliveryRegionId: string, options?: UpdateDeliveryCarrierOptions | undefined): Promise<UpdateDeliveryCarrierResponse & UpdateDeliveryCarrierResponseNonNullableFields>;
|
|
16315
|
+
}
|
|
16316
|
+
declare function listDeliveryCarrierDetails$1(httpClient: HttpClient): ListDeliveryCarrierDetailsSignature;
|
|
16317
|
+
interface ListDeliveryCarrierDetailsSignature {
|
|
16318
|
+
/**
|
|
16319
|
+
* List all installed delivery carriers in order to set their ids in delivery rules
|
|
16320
|
+
*/
|
|
16321
|
+
(): Promise<ListDeliveryCarrierDetailsResponse & ListDeliveryCarrierDetailsResponseNonNullableFields>;
|
|
16322
|
+
}
|
|
16323
|
+
declare function listDeliveryCarriers$1(httpClient: HttpClient): ListDeliveryCarriersSignature;
|
|
16324
|
+
interface ListDeliveryCarriersSignature {
|
|
16325
|
+
/**
|
|
16326
|
+
* Get delivery carrier settings for a delivery profile and delivery region.
|
|
16327
|
+
* These are returned in a table format for the dashboard.
|
|
16328
|
+
* @param - Delivery profile id.
|
|
16329
|
+
*/
|
|
16330
|
+
(deliveryProfileId: string, options?: ListDeliveryCarriersOptions | undefined): Promise<ListDeliveryCarriersResponse & ListDeliveryCarriersResponseNonNullableFields>;
|
|
16331
|
+
}
|
|
16332
|
+
declare function updateExtendedFields$7(httpClient: HttpClient): UpdateExtendedFieldsSignature$3;
|
|
16333
|
+
interface UpdateExtendedFieldsSignature$3 {
|
|
16334
|
+
/**
|
|
16335
|
+
* Updates extended fields of a DeliveryProfile without incrementing revision
|
|
16336
|
+
* @param - ID of the entity to update.
|
|
16337
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
16338
|
+
*/
|
|
16339
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$3): Promise<UpdateExtendedFieldsResponse$4 & UpdateExtendedFieldsResponseNonNullableFields$3>;
|
|
16340
|
+
}
|
|
15203
16341
|
declare const onDeliveryProfileCreated$1: EventDefinition<DeliveryProfileCreatedEnvelope, "wix.ecom.v1.delivery_profile_created">;
|
|
15204
16342
|
declare const onDeliveryProfileDeliveryRegionAdded$1: EventDefinition<DeliveryProfileDeliveryRegionAddedEnvelope, "wix.ecom.v1.delivery_profile_delivery_region_added">;
|
|
15205
16343
|
declare const onDeliveryProfileUpdated$1: EventDefinition<DeliveryProfileUpdatedEnvelope, "wix.ecom.v1.delivery_profile_updated">;
|
|
@@ -15241,21 +16379,35 @@ type _publicUpdateExtendedFieldsType$3 = typeof updateExtendedFields$7;
|
|
|
15241
16379
|
declare const updateExtendedFields$6: ReturnType<typeof createRESTModule$c<_publicUpdateExtendedFieldsType>>;
|
|
15242
16380
|
|
|
15243
16381
|
type _publicOnDeliveryProfileCreatedType = typeof onDeliveryProfileCreated$1;
|
|
16382
|
+
/** */
|
|
15244
16383
|
declare const onDeliveryProfileCreated: ReturnType<typeof createEventModule$8<_publicOnDeliveryProfileCreatedType>>;
|
|
15245
16384
|
|
|
15246
16385
|
type _publicOnDeliveryProfileDeliveryRegionAddedType = typeof onDeliveryProfileDeliveryRegionAdded$1;
|
|
16386
|
+
/**
|
|
16387
|
+
* Triggered when a delivery_region is added to a delivery_profile.
|
|
16388
|
+
*/
|
|
15247
16389
|
declare const onDeliveryProfileDeliveryRegionAdded: ReturnType<typeof createEventModule$8<_publicOnDeliveryProfileDeliveryRegionAddedType>>;
|
|
15248
16390
|
|
|
15249
16391
|
type _publicOnDeliveryProfileUpdatedType = typeof onDeliveryProfileUpdated$1;
|
|
16392
|
+
/**
|
|
16393
|
+
* Triggered when the delivery_carrier updated successfully
|
|
16394
|
+
*/
|
|
15250
16395
|
declare const onDeliveryProfileUpdated: ReturnType<typeof createEventModule$8<_publicOnDeliveryProfileUpdatedType>>;
|
|
15251
16396
|
|
|
15252
16397
|
type _publicOnDeliveryProfileDeletedType = typeof onDeliveryProfileDeleted$1;
|
|
16398
|
+
/** */
|
|
15253
16399
|
declare const onDeliveryProfileDeleted: ReturnType<typeof createEventModule$8<_publicOnDeliveryProfileDeletedType>>;
|
|
15254
16400
|
|
|
15255
16401
|
type _publicOnDeliveryProfileDeliveryRegionRemovedType = typeof onDeliveryProfileDeliveryRegionRemoved$1;
|
|
16402
|
+
/**
|
|
16403
|
+
* Triggered for each delivery_region assigned to the deleted delivery_profile
|
|
16404
|
+
*/
|
|
15256
16405
|
declare const onDeliveryProfileDeliveryRegionRemoved: ReturnType<typeof createEventModule$8<_publicOnDeliveryProfileDeliveryRegionRemovedType>>;
|
|
15257
16406
|
|
|
15258
16407
|
type _publicOnDeliveryProfileDeliveryRegionUpdatedType = typeof onDeliveryProfileDeliveryRegionUpdated$1;
|
|
16408
|
+
/**
|
|
16409
|
+
* Triggered when the delivery_carrier updated successfully
|
|
16410
|
+
*/
|
|
15259
16411
|
declare const onDeliveryProfileDeliveryRegionUpdated: ReturnType<typeof createEventModule$8<_publicOnDeliveryProfileDeliveryRegionUpdatedType>>;
|
|
15260
16412
|
|
|
15261
16413
|
type context$c_AddDeliveryCarrierOptions = AddDeliveryCarrierOptions;
|
|
@@ -18341,33 +19493,155 @@ interface DraftOrdersQueryBuilder {
|
|
|
18341
19493
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
18342
19494
|
* @documentationMaturity preview
|
|
18343
19495
|
*/
|
|
18344
|
-
descending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>) => DraftOrdersQueryBuilder;
|
|
18345
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
18346
|
-
* @documentationMaturity preview
|
|
19496
|
+
descending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>) => DraftOrdersQueryBuilder;
|
|
19497
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
19498
|
+
* @documentationMaturity preview
|
|
19499
|
+
*/
|
|
19500
|
+
limit: (limit: number) => DraftOrdersQueryBuilder;
|
|
19501
|
+
/** @param cursor - A pointer to specific record
|
|
19502
|
+
* @documentationMaturity preview
|
|
19503
|
+
*/
|
|
19504
|
+
skipTo: (cursor: string) => DraftOrdersQueryBuilder;
|
|
19505
|
+
/** @documentationMaturity preview */
|
|
19506
|
+
find: () => Promise<DraftOrdersQueryResult>;
|
|
19507
|
+
}
|
|
19508
|
+
|
|
19509
|
+
declare function createDraftOrder$1(httpClient: HttpClient): CreateDraftOrderSignature;
|
|
19510
|
+
interface CreateDraftOrderSignature {
|
|
19511
|
+
/**
|
|
19512
|
+
* Creates or gets a draft order.
|
|
19513
|
+
*
|
|
19514
|
+
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
19515
|
+
* To complete a draft and update the order, call [Commit Draft Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/commit-draft-order).
|
|
19516
|
+
* @param - To create a draft from existing order, provide its id. Otherwise, an empty draft will be created.
|
|
19517
|
+
*/
|
|
19518
|
+
(orderId: string | null): Promise<CreateDraftOrderResponse & CreateDraftOrderResponseNonNullableFields>;
|
|
19519
|
+
}
|
|
19520
|
+
declare function addLineItemsToDraftOrder$1(httpClient: HttpClient): AddLineItemsToDraftOrderSignature;
|
|
19521
|
+
interface AddLineItemsToDraftOrderSignature {
|
|
19522
|
+
/**
|
|
19523
|
+
* Adds line items to a draft order.
|
|
19524
|
+
* @param - The draft order id
|
|
19525
|
+
*/
|
|
19526
|
+
(draftOrderId: string, options?: AddLineItemsToDraftOrderOptions | undefined): Promise<AddLineItemsToDraftOrderResponse & AddLineItemsToDraftOrderResponseNonNullableFields>;
|
|
19527
|
+
}
|
|
19528
|
+
declare function updateLineItems$1(httpClient: HttpClient): UpdateLineItemsSignature;
|
|
19529
|
+
interface UpdateLineItemsSignature {
|
|
19530
|
+
/**
|
|
19531
|
+
* Updates a draft order's line items.
|
|
19532
|
+
*
|
|
19533
|
+
* Using this API, you can update a line item's quantity, price, and description.
|
|
19534
|
+
* > **Notes:**
|
|
19535
|
+
* > + Passing a quantity of `0` will remove the line item.
|
|
19536
|
+
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
19537
|
+
* > + Quantity cannot be decreased fulfilled line items. To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
|
|
19538
|
+
* @param - The draft order id
|
|
19539
|
+
*/
|
|
19540
|
+
(draftOrderId: string, options?: UpdateLineItemsOptions | undefined): Promise<UpdateLineItemsResponse & UpdateLineItemsResponseNonNullableFields>;
|
|
19541
|
+
}
|
|
19542
|
+
declare function setDiscounts$1(httpClient: HttpClient): SetDiscountsSignature;
|
|
19543
|
+
interface SetDiscountsSignature {
|
|
19544
|
+
/**
|
|
19545
|
+
* Sets and enables or disables discounts on a draft order.
|
|
19546
|
+
*
|
|
19547
|
+
* Any discounts not passed will not change.
|
|
19548
|
+
* @param - The draft order id
|
|
19549
|
+
* @param - The discount ids to opt-in. all existing discounts not listed are to be opted-out.
|
|
19550
|
+
*/
|
|
19551
|
+
(draftOrderId: string, discounts: IdAndApplied[]): Promise<SetDiscountsResponse & SetDiscountsResponseNonNullableFields>;
|
|
19552
|
+
}
|
|
19553
|
+
declare function createCustomDiscounts$1(httpClient: HttpClient): CreateCustomDiscountsSignature;
|
|
19554
|
+
interface CreateCustomDiscountsSignature {
|
|
19555
|
+
/**
|
|
19556
|
+
* Adds merchant discounts to the order.
|
|
19557
|
+
* @param - The draft order id
|
|
19558
|
+
*/
|
|
19559
|
+
(draftOrderId: string, options?: CreateCustomDiscountsOptions | undefined): Promise<CreateCustomDiscountsResponse & CreateCustomDiscountsResponseNonNullableFields>;
|
|
19560
|
+
}
|
|
19561
|
+
declare function deleteCustomDiscounts$1(httpClient: HttpClient): DeleteCustomDiscountsSignature;
|
|
19562
|
+
interface DeleteCustomDiscountsSignature {
|
|
19563
|
+
/**
|
|
19564
|
+
* Remove custom discounts from the order.
|
|
19565
|
+
* @param - The draft order id
|
|
19566
|
+
* @param - The discounts to remove
|
|
19567
|
+
*/
|
|
19568
|
+
(draftOrderId: string, discountIds: string[]): Promise<DeleteCustomDiscountsResponse & DeleteCustomDiscountsResponseNonNullableFields>;
|
|
19569
|
+
}
|
|
19570
|
+
declare function setAdditionalFees$1(httpClient: HttpClient): SetAdditionalFeesSignature;
|
|
19571
|
+
interface SetAdditionalFeesSignature {
|
|
19572
|
+
/**
|
|
19573
|
+
* Set which additional fees existing on the draft order are to be opt-in.
|
|
19574
|
+
* All existing additional fees not provided on the call are opted-out.
|
|
19575
|
+
* @param - The draft order id
|
|
19576
|
+
* @param - The additional fees ids to opt-in. all existing additional fees not listed are to be opted-out
|
|
19577
|
+
*/
|
|
19578
|
+
(draftOrderId: string, additionalFees: IdAndApplied[]): Promise<SetAdditionalFeesResponse & SetAdditionalFeesResponseNonNullableFields>;
|
|
19579
|
+
}
|
|
19580
|
+
declare function createCustomAdditionalFees$1(httpClient: HttpClient): CreateCustomAdditionalFeesSignature;
|
|
19581
|
+
interface CreateCustomAdditionalFeesSignature {
|
|
19582
|
+
/**
|
|
19583
|
+
* Create custom additional fees to the order.
|
|
19584
|
+
* added additional fees are by default opted-out.
|
|
19585
|
+
* To opt-in them, please call SetAdditionalFees with the added additional fee ids.
|
|
19586
|
+
* @param - The draft order id
|
|
19587
|
+
*/
|
|
19588
|
+
(draftOrderId: string, options?: CreateCustomAdditionalFeesOptions | undefined): Promise<CreateCustomAdditionalFeesResponse & CreateCustomAdditionalFeesResponseNonNullableFields>;
|
|
19589
|
+
}
|
|
19590
|
+
declare function deleteCustomAdditionalFees$1(httpClient: HttpClient): DeleteCustomAdditionalFeesSignature;
|
|
19591
|
+
interface DeleteCustomAdditionalFeesSignature {
|
|
19592
|
+
/**
|
|
19593
|
+
* Remove custom additional fees from the order.
|
|
19594
|
+
* @param - The draft order id
|
|
19595
|
+
* @param - The additional fees to remove
|
|
19596
|
+
*/
|
|
19597
|
+
(draftOrderId: string, customAdditionalFees: string[]): Promise<DeleteCustomAdditionalFeesResponse & DeleteCustomAdditionalFeesResponseNonNullableFields>;
|
|
19598
|
+
}
|
|
19599
|
+
declare function getDraftOrder$1(httpClient: HttpClient): GetDraftOrderSignature;
|
|
19600
|
+
interface GetDraftOrderSignature {
|
|
19601
|
+
/**
|
|
19602
|
+
* Get an order.
|
|
19603
|
+
* When order is in draft status, it's re-estimated and return with latest tax and totals
|
|
19604
|
+
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
19605
|
+
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
19606
|
+
* When order is in committed status, it's returned with it's calculation at the moment it was committed.
|
|
19607
|
+
* @param - The draft order id
|
|
19608
|
+
*/
|
|
19609
|
+
(draftOrderId: string): Promise<GetDraftOrderResponse & GetDraftOrderResponseNonNullableFields>;
|
|
19610
|
+
}
|
|
19611
|
+
declare function getOrderDraftabilityStatus$1(httpClient: HttpClient): GetOrderDraftabilityStatusSignature;
|
|
19612
|
+
interface GetOrderDraftabilityStatusSignature {
|
|
19613
|
+
/**
|
|
19614
|
+
* Checks whether a draft can be created for thos order
|
|
19615
|
+
* @param - Order ID.
|
|
19616
|
+
*/
|
|
19617
|
+
(orderId: string): Promise<GetOrderDraftabilityStatusResponse & GetOrderDraftabilityStatusResponseNonNullableFields>;
|
|
19618
|
+
}
|
|
19619
|
+
declare function commitDraftOrder$1(httpClient: HttpClient): CommitDraftOrderSignature;
|
|
19620
|
+
interface CommitDraftOrderSignature {
|
|
19621
|
+
/**
|
|
19622
|
+
* Commit latest changes to the baseline order and control what side-effects will be applied.
|
|
19623
|
+
* Commit cannot be undone or reverted.
|
|
19624
|
+
* Order-edit become closed for editing, however it's kept for reference and can be retrieved.
|
|
19625
|
+
* @param - The draft order id
|
|
18347
19626
|
*/
|
|
18348
|
-
|
|
18349
|
-
|
|
18350
|
-
|
|
19627
|
+
(draftOrderId: string, options?: CommitDraftOrderOptions | undefined): Promise<CommitDraftOrderResponse & CommitDraftOrderResponseNonNullableFields>;
|
|
19628
|
+
}
|
|
19629
|
+
declare function deleteDraftOrder$1(httpClient: HttpClient): DeleteDraftOrderSignature;
|
|
19630
|
+
interface DeleteDraftOrderSignature {
|
|
19631
|
+
/**
|
|
19632
|
+
* Delete order-edit entity with all pending changes.
|
|
19633
|
+
* Order-edit in status 'COMMITTED' cannot be deleted.
|
|
19634
|
+
* @param - The draft order id
|
|
18351
19635
|
*/
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
19636
|
+
(draftOrderId: string): Promise<void>;
|
|
19637
|
+
}
|
|
19638
|
+
declare function queryDraftOrders$1(httpClient: HttpClient): QueryDraftOrdersSignature;
|
|
19639
|
+
interface QueryDraftOrdersSignature {
|
|
19640
|
+
/**
|
|
19641
|
+
* Query draft orders by order id or by date range or status.
|
|
19642
|
+
*/
|
|
19643
|
+
(): DraftOrdersQueryBuilder;
|
|
18355
19644
|
}
|
|
18356
|
-
|
|
18357
|
-
declare function createDraftOrder$1(httpClient: HttpClient): (orderId: string | null) => Promise<CreateDraftOrderResponse & CreateDraftOrderResponseNonNullableFields>;
|
|
18358
|
-
declare function addLineItemsToDraftOrder$1(httpClient: HttpClient): (draftOrderId: string, options?: AddLineItemsToDraftOrderOptions) => Promise<AddLineItemsToDraftOrderResponse & AddLineItemsToDraftOrderResponseNonNullableFields>;
|
|
18359
|
-
declare function updateLineItems$1(httpClient: HttpClient): (draftOrderId: string, options?: UpdateLineItemsOptions) => Promise<UpdateLineItemsResponse & UpdateLineItemsResponseNonNullableFields>;
|
|
18360
|
-
declare function setDiscounts$1(httpClient: HttpClient): (draftOrderId: string, discounts: IdAndApplied[]) => Promise<SetDiscountsResponse & SetDiscountsResponseNonNullableFields>;
|
|
18361
|
-
declare function createCustomDiscounts$1(httpClient: HttpClient): (draftOrderId: string, options?: CreateCustomDiscountsOptions) => Promise<CreateCustomDiscountsResponse & CreateCustomDiscountsResponseNonNullableFields>;
|
|
18362
|
-
declare function deleteCustomDiscounts$1(httpClient: HttpClient): (draftOrderId: string, discountIds: string[]) => Promise<DeleteCustomDiscountsResponse & DeleteCustomDiscountsResponseNonNullableFields>;
|
|
18363
|
-
declare function setAdditionalFees$1(httpClient: HttpClient): (draftOrderId: string, additionalFees: IdAndApplied[]) => Promise<SetAdditionalFeesResponse & SetAdditionalFeesResponseNonNullableFields>;
|
|
18364
|
-
declare function createCustomAdditionalFees$1(httpClient: HttpClient): (draftOrderId: string, options?: CreateCustomAdditionalFeesOptions) => Promise<CreateCustomAdditionalFeesResponse & CreateCustomAdditionalFeesResponseNonNullableFields>;
|
|
18365
|
-
declare function deleteCustomAdditionalFees$1(httpClient: HttpClient): (draftOrderId: string, customAdditionalFees: string[]) => Promise<DeleteCustomAdditionalFeesResponse & DeleteCustomAdditionalFeesResponseNonNullableFields>;
|
|
18366
|
-
declare function getDraftOrder$1(httpClient: HttpClient): (draftOrderId: string) => Promise<GetDraftOrderResponse & GetDraftOrderResponseNonNullableFields>;
|
|
18367
|
-
declare function getOrderDraftabilityStatus$1(httpClient: HttpClient): (orderId: string) => Promise<GetOrderDraftabilityStatusResponse & GetOrderDraftabilityStatusResponseNonNullableFields>;
|
|
18368
|
-
declare function commitDraftOrder$1(httpClient: HttpClient): (draftOrderId: string, options?: CommitDraftOrderOptions) => Promise<CommitDraftOrderResponse & CommitDraftOrderResponseNonNullableFields>;
|
|
18369
|
-
declare function deleteDraftOrder$1(httpClient: HttpClient): (draftOrderId: string) => Promise<void>;
|
|
18370
|
-
declare function queryDraftOrders$1(httpClient: HttpClient): () => DraftOrdersQueryBuilder;
|
|
18371
19645
|
|
|
18372
19646
|
declare function createRESTModule$b<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
18373
19647
|
|
|
@@ -19066,12 +20340,79 @@ interface DeleteFulfillmentIdentifiers {
|
|
|
19066
20340
|
orderId: string;
|
|
19067
20341
|
}
|
|
19068
20342
|
|
|
19069
|
-
declare function listFulfillmentsForSingleOrder$1(httpClient: HttpClient):
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
20343
|
+
declare function listFulfillmentsForSingleOrder$1(httpClient: HttpClient): ListFulfillmentsForSingleOrderSignature;
|
|
20344
|
+
interface ListFulfillmentsForSingleOrderSignature {
|
|
20345
|
+
/**
|
|
20346
|
+
* Retrieves fulfillments associated with a specified order.
|
|
20347
|
+
*
|
|
20348
|
+
*
|
|
20349
|
+
* The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved.
|
|
20350
|
+
* @param - Order ID for which to retrieve fulfillments.
|
|
20351
|
+
*/
|
|
20352
|
+
(orderId: string): Promise<ListFulfillmentsForSingleOrderResponse & ListFulfillmentsForSingleOrderResponseNonNullableFields>;
|
|
20353
|
+
}
|
|
20354
|
+
declare function listFulfillmentsForMultipleOrders$1(httpClient: HttpClient): ListFulfillmentsForMultipleOrdersSignature;
|
|
20355
|
+
interface ListFulfillmentsForMultipleOrdersSignature {
|
|
20356
|
+
/**
|
|
20357
|
+
* Retrieves fulfillments associated with multiple specified orders.
|
|
20358
|
+
*
|
|
20359
|
+
*
|
|
20360
|
+
* The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved.
|
|
20361
|
+
* @param - List of order IDs for which to retrieve fulfillments.
|
|
20362
|
+
*/
|
|
20363
|
+
(orderIds: string[]): Promise<ListFulfillmentsForMultipleOrdersResponse & ListFulfillmentsForMultipleOrdersResponseNonNullableFields>;
|
|
20364
|
+
}
|
|
20365
|
+
declare function createFulfillment$1(httpClient: HttpClient): CreateFulfillmentSignature;
|
|
20366
|
+
interface CreateFulfillmentSignature {
|
|
20367
|
+
/**
|
|
20368
|
+
* Creates an order fulfillment.
|
|
20369
|
+
*
|
|
20370
|
+
*
|
|
20371
|
+
* The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created.
|
|
20372
|
+
* @param - Order ID.
|
|
20373
|
+
* @param - Fulfillment info.
|
|
20374
|
+
*/
|
|
20375
|
+
(orderId: string, fulfillment: Fulfillment$1): Promise<CreateFulfillmentResponse & CreateFulfillmentResponseNonNullableFields>;
|
|
20376
|
+
}
|
|
20377
|
+
declare function updateFulfillment$1(httpClient: HttpClient): UpdateFulfillmentSignature;
|
|
20378
|
+
interface UpdateFulfillmentSignature {
|
|
20379
|
+
/**
|
|
20380
|
+
* Updates a fulfillment's properties.
|
|
20381
|
+
* To update a field's value, include the new value in the `fulfillment` field in the body params.
|
|
20382
|
+
* To remove a field's value, pass `null`.
|
|
20383
|
+
*
|
|
20384
|
+
*
|
|
20385
|
+
* The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated.
|
|
20386
|
+
*
|
|
20387
|
+
* > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.
|
|
20388
|
+
* @param - Order and fulfillment IDs to be updated.
|
|
20389
|
+
* @param - Available options to use when updating a fulfillment.
|
|
20390
|
+
* @returns Order ID and the orders' associated fulfillments after update.
|
|
20391
|
+
*/
|
|
20392
|
+
(identifiers: UpdateFulfillmentIdentifiers, options?: UpdateFulfillmentOptions | undefined): Promise<OrderWithFulfillments & OrderWithFulfillmentsNonNullableFields>;
|
|
20393
|
+
}
|
|
20394
|
+
declare function deleteFulfillment$1(httpClient: HttpClient): DeleteFulfillmentSignature;
|
|
20395
|
+
interface DeleteFulfillmentSignature {
|
|
20396
|
+
/**
|
|
20397
|
+
* Deletes an existing order fulfillment.
|
|
20398
|
+
*
|
|
20399
|
+
*
|
|
20400
|
+
* The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted.
|
|
20401
|
+
* @param - Order and fulfillment IDs.
|
|
20402
|
+
*/
|
|
20403
|
+
(identifiers: DeleteFulfillmentIdentifiers): Promise<DeleteFulfillmentResponse & DeleteFulfillmentResponseNonNullableFields>;
|
|
20404
|
+
}
|
|
20405
|
+
declare function bulkCreateFulfillments$1(httpClient: HttpClient): BulkCreateFulfillmentsSignature;
|
|
20406
|
+
interface BulkCreateFulfillmentsSignature {
|
|
20407
|
+
/**
|
|
20408
|
+
* Creates multiple fulfillments for one or more orders.
|
|
20409
|
+
*
|
|
20410
|
+
*
|
|
20411
|
+
* The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created.
|
|
20412
|
+
* @param - List of order IDs and their associated fulfillments' info.
|
|
20413
|
+
*/
|
|
20414
|
+
(ordersWithFulfillments: BulkCreateOrderWithFulfillments[]): Promise<BulkCreateFulfillmentResponse & BulkCreateFulfillmentResponseNonNullableFields>;
|
|
20415
|
+
}
|
|
19075
20416
|
declare const onFulfillmentsUpdated$1: EventDefinition<FulfillmentsUpdatedEnvelope, "wix.ecom.v1.fulfillments_updated">;
|
|
19076
20417
|
|
|
19077
20418
|
declare function createRESTModule$a<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -19092,6 +20433,11 @@ type _publicBulkCreateFulfillmentsType = typeof bulkCreateFulfillments$1;
|
|
|
19092
20433
|
declare const bulkCreateFulfillments: ReturnType<typeof createRESTModule$a<_publicBulkCreateFulfillmentsType>>;
|
|
19093
20434
|
|
|
19094
20435
|
type _publicOnFulfillmentsUpdatedType = typeof onFulfillmentsUpdated$1;
|
|
20436
|
+
/**
|
|
20437
|
+
* Triggered when one or more of an order's fulfillments are created, updated, or deleted.
|
|
20438
|
+
*
|
|
20439
|
+
* The response contains the order's ID and details about all of its fulfillments following the change.
|
|
20440
|
+
*/
|
|
19095
20441
|
declare const onFulfillmentsUpdated: ReturnType<typeof createEventModule$7<_publicOnFulfillmentsUpdatedType>>;
|
|
19096
20442
|
|
|
19097
20443
|
type context$a_BulkCreateFulfillmentRequest = BulkCreateFulfillmentRequest;
|
|
@@ -19650,14 +20996,46 @@ interface UpdateLocalDeliveryOption {
|
|
|
19650
20996
|
_createdDate?: Date;
|
|
19651
20997
|
}
|
|
19652
20998
|
|
|
19653
|
-
declare function createLocalDeliveryOption$1(httpClient: HttpClient):
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
declare function
|
|
19659
|
-
|
|
19660
|
-
|
|
20999
|
+
declare function createLocalDeliveryOption$1(httpClient: HttpClient): CreateLocalDeliveryOptionSignature;
|
|
21000
|
+
interface CreateLocalDeliveryOptionSignature {
|
|
21001
|
+
/** */
|
|
21002
|
+
(localDeliveryOption: LocalDeliveryOption): Promise<LocalDeliveryOption & LocalDeliveryOptionNonNullableFields>;
|
|
21003
|
+
}
|
|
21004
|
+
declare function getLocalDeliveryOption$1(httpClient: HttpClient): GetLocalDeliveryOptionSignature;
|
|
21005
|
+
interface GetLocalDeliveryOptionSignature {
|
|
21006
|
+
/** */
|
|
21007
|
+
(_id: string): Promise<LocalDeliveryOption & LocalDeliveryOptionNonNullableFields>;
|
|
21008
|
+
}
|
|
21009
|
+
declare function listLocalDeliveryOptions$1(httpClient: HttpClient): ListLocalDeliveryOptionsSignature;
|
|
21010
|
+
interface ListLocalDeliveryOptionsSignature {
|
|
21011
|
+
/** */
|
|
21012
|
+
(externalId: string): Promise<ListLocalDeliveryOptionsResponse & ListLocalDeliveryOptionsResponseNonNullableFields>;
|
|
21013
|
+
}
|
|
21014
|
+
declare function updateLocalDeliveryOption$1(httpClient: HttpClient): UpdateLocalDeliveryOptionSignature;
|
|
21015
|
+
interface UpdateLocalDeliveryOptionSignature {
|
|
21016
|
+
/** @param - LocalDeliveryOptionId - unique identifier of local delivery option */
|
|
21017
|
+
(_id: string | null, localDeliveryOption: UpdateLocalDeliveryOption): Promise<LocalDeliveryOption & LocalDeliveryOptionNonNullableFields>;
|
|
21018
|
+
}
|
|
21019
|
+
declare function deleteLocalDeliveryOption$1(httpClient: HttpClient): DeleteLocalDeliveryOptionSignature;
|
|
21020
|
+
interface DeleteLocalDeliveryOptionSignature {
|
|
21021
|
+
/** */
|
|
21022
|
+
(_id: string): Promise<void>;
|
|
21023
|
+
}
|
|
21024
|
+
declare function bulkCreateLocalDeliveryOption$1(httpClient: HttpClient): BulkCreateLocalDeliveryOptionSignature;
|
|
21025
|
+
interface BulkCreateLocalDeliveryOptionSignature {
|
|
21026
|
+
/** */
|
|
21027
|
+
(localDeliveryOptions: LocalDeliveryOption[]): Promise<BulkCreateLocalDeliveryOptionResponse & BulkCreateLocalDeliveryOptionResponseNonNullableFields>;
|
|
21028
|
+
}
|
|
21029
|
+
declare function bulkUpdateLocalDeliveryOption$1(httpClient: HttpClient): BulkUpdateLocalDeliveryOptionSignature;
|
|
21030
|
+
interface BulkUpdateLocalDeliveryOptionSignature {
|
|
21031
|
+
/** */
|
|
21032
|
+
(localDeliveryOptions: LocalDeliveryOption[]): Promise<BulkUpdateLocalDeliveryOptionResponse & BulkUpdateLocalDeliveryOptionResponseNonNullableFields>;
|
|
21033
|
+
}
|
|
21034
|
+
declare function bulkDeleteLocalDeliveryOption$1(httpClient: HttpClient): BulkDeleteLocalDeliveryOptionSignature;
|
|
21035
|
+
interface BulkDeleteLocalDeliveryOptionSignature {
|
|
21036
|
+
/** */
|
|
21037
|
+
(ids: string[]): Promise<void>;
|
|
21038
|
+
}
|
|
19661
21039
|
declare const onLocalDeliveryOptionCreated$1: EventDefinition<LocalDeliveryOptionCreatedEnvelope, "wix.ecom.v1.local_delivery_option_created">;
|
|
19662
21040
|
declare const onLocalDeliveryOptionUpdated$1: EventDefinition<LocalDeliveryOptionUpdatedEnvelope, "wix.ecom.v1.local_delivery_option_updated">;
|
|
19663
21041
|
declare const onLocalDeliveryOptionDeleted$1: EventDefinition<LocalDeliveryOptionDeletedEnvelope, "wix.ecom.v1.local_delivery_option_deleted">;
|
|
@@ -19684,12 +21062,15 @@ type _publicBulkDeleteLocalDeliveryOptionType = typeof bulkDeleteLocalDeliveryOp
|
|
|
19684
21062
|
declare const bulkDeleteLocalDeliveryOption: ReturnType<typeof createRESTModule$9<_publicBulkDeleteLocalDeliveryOptionType>>;
|
|
19685
21063
|
|
|
19686
21064
|
type _publicOnLocalDeliveryOptionCreatedType = typeof onLocalDeliveryOptionCreated$1;
|
|
21065
|
+
/** */
|
|
19687
21066
|
declare const onLocalDeliveryOptionCreated: ReturnType<typeof createEventModule$6<_publicOnLocalDeliveryOptionCreatedType>>;
|
|
19688
21067
|
|
|
19689
21068
|
type _publicOnLocalDeliveryOptionUpdatedType = typeof onLocalDeliveryOptionUpdated$1;
|
|
21069
|
+
/** */
|
|
19690
21070
|
declare const onLocalDeliveryOptionUpdated: ReturnType<typeof createEventModule$6<_publicOnLocalDeliveryOptionUpdatedType>>;
|
|
19691
21071
|
|
|
19692
21072
|
type _publicOnLocalDeliveryOptionDeletedType = typeof onLocalDeliveryOptionDeleted$1;
|
|
21073
|
+
/** */
|
|
19693
21074
|
declare const onLocalDeliveryOptionDeleted: ReturnType<typeof createEventModule$6<_publicOnLocalDeliveryOptionDeletedType>>;
|
|
19694
21075
|
|
|
19695
21076
|
type context$9_BulkCreateLocalDeliveryOptionRequest = BulkCreateLocalDeliveryOptionRequest;
|
|
@@ -24527,13 +25908,142 @@ interface CancelOrderOptions {
|
|
|
24527
25908
|
restockAllItems?: boolean;
|
|
24528
25909
|
}
|
|
24529
25910
|
|
|
24530
|
-
declare function getPaymentCollectabilityStatus$1(httpClient: HttpClient):
|
|
24531
|
-
|
|
24532
|
-
|
|
24533
|
-
|
|
24534
|
-
|
|
24535
|
-
|
|
24536
|
-
|
|
25911
|
+
declare function getPaymentCollectabilityStatus$1(httpClient: HttpClient): GetPaymentCollectabilityStatusSignature;
|
|
25912
|
+
interface GetPaymentCollectabilityStatusSignature {
|
|
25913
|
+
/**
|
|
25914
|
+
* Provides payment collectability status for given order. If payment collection is possible
|
|
25915
|
+
* response will contain collectable amount for given ecom order. If not - response will contain
|
|
25916
|
+
* reason why payment collection is not possible.
|
|
25917
|
+
* @param - Ecom order ID.
|
|
25918
|
+
*/
|
|
25919
|
+
(ecomOrderId: string): Promise<GetPaymentCollectabilityStatusResponse & GetPaymentCollectabilityStatusResponseNonNullableFields>;
|
|
25920
|
+
}
|
|
25921
|
+
declare function getOrder$1(httpClient: HttpClient): GetOrderSignature;
|
|
25922
|
+
interface GetOrderSignature {
|
|
25923
|
+
/**
|
|
25924
|
+
* Retrieves an order.
|
|
25925
|
+
*
|
|
25926
|
+
*
|
|
25927
|
+
* The `getOrder()` function returns a Promise that resolves when the specified order is retrieved.
|
|
25928
|
+
*
|
|
25929
|
+
* To retrieve an order's payment and refund details, including amounts, payment methods, and payment statuses, pass the order ID to [`listTransactionsForSingleOrder( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/listtransactionsforsingleorder).
|
|
25930
|
+
* @param - ID of the order to retrieve.
|
|
25931
|
+
* @returns Fulfilled - The requested order.
|
|
25932
|
+
*/
|
|
25933
|
+
(_id: string): Promise<Order$1 & OrderNonNullableFields>;
|
|
25934
|
+
}
|
|
25935
|
+
declare function searchOrders$1(httpClient: HttpClient): SearchOrdersSignature;
|
|
25936
|
+
interface SearchOrdersSignature {
|
|
25937
|
+
/**
|
|
25938
|
+
* Retrieves a list of orders, given the provided paging, filtering, and sorting.
|
|
25939
|
+
*
|
|
25940
|
+
*
|
|
25941
|
+
* Search Orders runs with these defaults, which you can override:
|
|
25942
|
+
*
|
|
25943
|
+
* - `createdDate` is sorted in `DESC` order
|
|
25944
|
+
* - `cursorPaging.limit` is `100`
|
|
25945
|
+
* - `filter: {"status": {"$ne": "INITIALIZED"}}` - other order statuses can be queried, but orders with `status: "INITIALIZED"` are never returned
|
|
25946
|
+
*
|
|
25947
|
+
* For field support for filters and sorting, see [Orders: Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/supported-filters-and-sorting).
|
|
25948
|
+
*
|
|
25949
|
+
* To learn about working with _Search_ endpoints, see
|
|
25950
|
+
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
|
|
25951
|
+
* [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
25952
|
+
*/
|
|
25953
|
+
(options?: SearchOrdersOptions | undefined): Promise<SearchOrdersResponse & SearchOrdersResponseNonNullableFields>;
|
|
25954
|
+
}
|
|
25955
|
+
declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
|
|
25956
|
+
interface CreateOrderSignature {
|
|
25957
|
+
/**
|
|
25958
|
+
* Creates an order.
|
|
25959
|
+
*
|
|
25960
|
+
*
|
|
25961
|
+
* The `createOrder()` function returns a Promise that resolves when the order is created.
|
|
25962
|
+
*
|
|
25963
|
+
* > **Notes:**
|
|
25964
|
+
* > + If an item is digital - `lineItems[i].itemType.preset: DIGITAL` - then `lineItems[i].digitalFile` must be provided.
|
|
25965
|
+
* > + If `lineItems[i].id` is passed, it must be either a valid GUID, or empty.
|
|
25966
|
+
* @param - Order info.
|
|
25967
|
+
* @returns Newly created order.
|
|
25968
|
+
*/
|
|
25969
|
+
(order: Order$1): Promise<Order$1 & OrderNonNullableFields>;
|
|
25970
|
+
}
|
|
25971
|
+
declare function updateOrder$1(httpClient: HttpClient): UpdateOrderSignature;
|
|
25972
|
+
interface UpdateOrderSignature {
|
|
25973
|
+
/**
|
|
25974
|
+
* Updates an order.
|
|
25975
|
+
*
|
|
25976
|
+
*
|
|
25977
|
+
* The `updateOrder()` function returns a Promise that resolves when the specified order's information is updated.
|
|
25978
|
+
*
|
|
25979
|
+
* Currently, the following fields can be updated:
|
|
25980
|
+
* + `order.buyerInfo.email`
|
|
25981
|
+
* + `order.buyerLanguage`
|
|
25982
|
+
* + `order.weightUnit`
|
|
25983
|
+
* + `order.billingInfo.address`
|
|
25984
|
+
* + `order.billingInfo.contactDetails`
|
|
25985
|
+
* + `order.archived`
|
|
25986
|
+
* + `order.attributionSource`
|
|
25987
|
+
* + `order.seenByAHuman`
|
|
25988
|
+
* + `order.recipientInfo.address`
|
|
25989
|
+
* + `order.recipientInfo.contactDetails`
|
|
25990
|
+
* + `order.shippingInfo.logistics.shippingDestination.address`
|
|
25991
|
+
* + `order.shippingInfo.logistics.shippingDestination.contactDetails`
|
|
25992
|
+
*
|
|
25993
|
+
* To update a field's value, include the new value in the `order` object in the method parameters.
|
|
25994
|
+
* To remove a field's value, pass `null`.
|
|
25995
|
+
*
|
|
25996
|
+
* > **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error.
|
|
25997
|
+
*
|
|
25998
|
+
* To update an order's payment status, use [`updatePaymentStatus( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus).
|
|
25999
|
+
* @param - Order ID.
|
|
26000
|
+
* @returns Newly created order.
|
|
26001
|
+
*/
|
|
26002
|
+
(_id: string | null, order: UpdateOrder): Promise<Order$1 & OrderNonNullableFields>;
|
|
26003
|
+
}
|
|
26004
|
+
declare function bulkUpdateOrders$1(httpClient: HttpClient): BulkUpdateOrdersSignature;
|
|
26005
|
+
interface BulkUpdateOrdersSignature {
|
|
26006
|
+
/**
|
|
26007
|
+
* Updates up to 100 orders.
|
|
26008
|
+
*
|
|
26009
|
+
*
|
|
26010
|
+
* The `bulkUpdateOrders()` function returns a Promise that resolves when the specified orders' information is updated.
|
|
26011
|
+
*
|
|
26012
|
+
* Currently, the following fields can be updated:
|
|
26013
|
+
* + `order.buyerInfo.email`
|
|
26014
|
+
* + `order.buyerLanguage`
|
|
26015
|
+
* + `order.weightUnit`
|
|
26016
|
+
* + `order.billingInfo.address`
|
|
26017
|
+
* + `order.billingInfo.contactDetails`
|
|
26018
|
+
* + `order.archived`
|
|
26019
|
+
* + `order.attributionSource`
|
|
26020
|
+
* + `order.seenByAHuman`
|
|
26021
|
+
* + `order.recipientInfo.address`
|
|
26022
|
+
* + `order.recipientInfo.contactDetails`
|
|
26023
|
+
* + `order.shippingInfo.logistics.shippingDestination.address`
|
|
26024
|
+
* + `order.shippingInfo.logistics.shippingDestination.contactDetails`
|
|
26025
|
+
*
|
|
26026
|
+
* To update a field's value, include the new value in the `orders.order` object in the method parameters.
|
|
26027
|
+
* To remove a field's value, pass `null`.
|
|
26028
|
+
*
|
|
26029
|
+
* > **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error.
|
|
26030
|
+
*
|
|
26031
|
+
* To update an order's payment status, use [`updatePaymentStatus( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus).
|
|
26032
|
+
* @param - Orders to update.
|
|
26033
|
+
*/
|
|
26034
|
+
(orders: MaskedOrder[], options?: BulkUpdateOrdersOptions | undefined): Promise<BulkUpdateOrdersResponse & BulkUpdateOrdersResponseNonNullableFields>;
|
|
26035
|
+
}
|
|
26036
|
+
declare function cancelOrder$1(httpClient: HttpClient): CancelOrderSignature;
|
|
26037
|
+
interface CancelOrderSignature {
|
|
26038
|
+
/**
|
|
26039
|
+
* Cancels an order.
|
|
26040
|
+
*
|
|
26041
|
+
*
|
|
26042
|
+
* The `cancelOrder()` function returns a Promise that resolves when the specified order is canceled and the `order.status` field changes to `CANCELED`.
|
|
26043
|
+
* @param - Order ID.
|
|
26044
|
+
*/
|
|
26045
|
+
(_id: string, options?: CancelOrderOptions | undefined): Promise<CancelOrderResponse & CancelOrderResponseNonNullableFields>;
|
|
26046
|
+
}
|
|
24537
26047
|
declare const onOrderPaymentStatusUpdated$1: EventDefinition<OrderPaymentStatusUpdatedEnvelope, "wix.ecom.v1.order_payment_status_updated">;
|
|
24538
26048
|
declare const onOrderCreated$1: EventDefinition<OrderCreatedEnvelope, "wix.ecom.v1.order_created">;
|
|
24539
26049
|
declare const onOrderCanceled$1: EventDefinition<OrderCanceledEnvelope, "wix.ecom.v1.order_canceled">;
|
|
@@ -24559,15 +26069,30 @@ type _publicCancelOrderType = typeof cancelOrder$1;
|
|
|
24559
26069
|
declare const cancelOrder: ReturnType<typeof createRESTModule$8<_publicCancelOrderType>>;
|
|
24560
26070
|
|
|
24561
26071
|
type _publicOnOrderPaymentStatusUpdatedType = typeof onOrderPaymentStatusUpdated$1;
|
|
26072
|
+
/**
|
|
26073
|
+
* Triggered when an order's payment status is updated to `"PAID"`.
|
|
26074
|
+
*/
|
|
24562
26075
|
declare const onOrderPaymentStatusUpdated: ReturnType<typeof createEventModule$5<_publicOnOrderPaymentStatusUpdatedType>>;
|
|
24563
26076
|
|
|
24564
26077
|
type _publicOnOrderCreatedType = typeof onOrderCreated$1;
|
|
26078
|
+
/**
|
|
26079
|
+
* Triggered when an order is created.
|
|
26080
|
+
* Learn more about [webhook payload structure](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/order-object-conversion#webhook-conversion-table).
|
|
26081
|
+
*/
|
|
24565
26082
|
declare const onOrderCreated: ReturnType<typeof createEventModule$5<_publicOnOrderCreatedType>>;
|
|
24566
26083
|
|
|
24567
26084
|
type _publicOnOrderCanceledType = typeof onOrderCanceled$1;
|
|
26085
|
+
/**
|
|
26086
|
+
* Triggered when an order is canceled.
|
|
26087
|
+
* Learn more about [eCommerce webhook payload structure](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/order-object-conversion#webhook-conversion-table).
|
|
26088
|
+
*/
|
|
24568
26089
|
declare const onOrderCanceled: ReturnType<typeof createEventModule$5<_publicOnOrderCanceledType>>;
|
|
24569
26090
|
|
|
24570
26091
|
type _publicOnOrderApprovedType = typeof onOrderApproved$1;
|
|
26092
|
+
/**
|
|
26093
|
+
* Triggered when an order is created and its status is updated to `"APPROVED"`.
|
|
26094
|
+
* Learn more about [eCommerce webhook payload structure](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/order-object-conversion#webhook-conversion-table).
|
|
26095
|
+
*/
|
|
24571
26096
|
declare const onOrderApproved: ReturnType<typeof createEventModule$5<_publicOnOrderApprovedType>>;
|
|
24572
26097
|
|
|
24573
26098
|
type context$8_ActivityContentOneOf = ActivityContentOneOf;
|
|
@@ -25493,13 +27018,76 @@ interface UpdateExtendedFieldsOptions$2 {
|
|
|
25493
27018
|
namespaceData: Record<string, any> | null;
|
|
25494
27019
|
}
|
|
25495
27020
|
|
|
25496
|
-
declare function createOrderPaymentRequest$1(httpClient: HttpClient):
|
|
25497
|
-
|
|
25498
|
-
|
|
25499
|
-
|
|
25500
|
-
|
|
25501
|
-
|
|
25502
|
-
|
|
27021
|
+
declare function createOrderPaymentRequest$1(httpClient: HttpClient): CreateOrderPaymentRequestSignature;
|
|
27022
|
+
interface CreateOrderPaymentRequestSignature {
|
|
27023
|
+
/**
|
|
27024
|
+
* Creates a order payment request.
|
|
27025
|
+
* @returns The created OrderPaymentRequest.
|
|
27026
|
+
*/
|
|
27027
|
+
(options?: CreateOrderPaymentRequestOptions | undefined): Promise<OrderPaymentRequest & OrderPaymentRequestNonNullableFields>;
|
|
27028
|
+
}
|
|
27029
|
+
declare function getOrderPaymentRequest$1(httpClient: HttpClient): GetOrderPaymentRequestSignature;
|
|
27030
|
+
interface GetOrderPaymentRequestSignature {
|
|
27031
|
+
/**
|
|
27032
|
+
* Retrieves a order payment request.
|
|
27033
|
+
* @param - ID of the OrderPaymentRequest to retrieve.
|
|
27034
|
+
* @returns The requested OrderPaymentRequest.
|
|
27035
|
+
*/
|
|
27036
|
+
(orderPaymentRequestId: string): Promise<OrderPaymentRequest & OrderPaymentRequestNonNullableFields>;
|
|
27037
|
+
}
|
|
27038
|
+
declare function updateOrderPaymentRequest$1(httpClient: HttpClient): UpdateOrderPaymentRequestSignature;
|
|
27039
|
+
interface UpdateOrderPaymentRequestSignature {
|
|
27040
|
+
/**
|
|
27041
|
+
* Updates a order payment request.
|
|
27042
|
+
*
|
|
27043
|
+
* Please note that only `UNPAID` payment requests can be updated.
|
|
27044
|
+
* @param - Order payment request ID.
|
|
27045
|
+
* @returns Updated OrderPaymentRequest.
|
|
27046
|
+
*/
|
|
27047
|
+
(_id: string | null, orderPaymentRequest: UpdateOrderPaymentRequest): Promise<OrderPaymentRequest & OrderPaymentRequestNonNullableFields>;
|
|
27048
|
+
}
|
|
27049
|
+
declare function deleteOrderPaymentRequest$1(httpClient: HttpClient): DeleteOrderPaymentRequestSignature;
|
|
27050
|
+
interface DeleteOrderPaymentRequestSignature {
|
|
27051
|
+
/**
|
|
27052
|
+
* Deletes a order payment request.
|
|
27053
|
+
*
|
|
27054
|
+
* Please note that only `UNPAID` payment requests can be deleted.
|
|
27055
|
+
* @param - Id of the OrderPaymentRequest to delete.
|
|
27056
|
+
*/
|
|
27057
|
+
(orderPaymentRequestId: string): Promise<void>;
|
|
27058
|
+
}
|
|
27059
|
+
declare function queryOrderPaymentRequests$1(httpClient: HttpClient): QueryOrderPaymentRequestsSignature;
|
|
27060
|
+
interface QueryOrderPaymentRequestsSignature {
|
|
27061
|
+
/**
|
|
27062
|
+
* Retrieves a list of Payment Requests, given the provided [paging, filtering, and sorting][1].
|
|
27063
|
+
*
|
|
27064
|
+
* Query Payment Requests runs with these defaults, which you can override:
|
|
27065
|
+
* - `createdDate` is sorted in DESC order
|
|
27066
|
+
* - `cursorPaging.limit` is 100
|
|
27067
|
+
*
|
|
27068
|
+
* To learn about working with _Query_ endpoints, see
|
|
27069
|
+
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and
|
|
27070
|
+
* [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
27071
|
+
*/
|
|
27072
|
+
(): OrderPaymentRequestsQueryBuilder;
|
|
27073
|
+
}
|
|
27074
|
+
declare function getOrderPaymentRequestUrl$1(httpClient: HttpClient): GetOrderPaymentRequestUrlSignature;
|
|
27075
|
+
interface GetOrderPaymentRequestUrlSignature {
|
|
27076
|
+
/**
|
|
27077
|
+
* Retrieves the order payment request page URL of a specified order payment request.
|
|
27078
|
+
* @param - Order Payment Request ID.
|
|
27079
|
+
*/
|
|
27080
|
+
(orderPaymentRequestId: string): Promise<GetOrderPaymentRequestURLResponse & GetOrderPaymentRequestURLResponseNonNullableFields>;
|
|
27081
|
+
}
|
|
27082
|
+
declare function updateExtendedFields$5(httpClient: HttpClient): UpdateExtendedFieldsSignature$2;
|
|
27083
|
+
interface UpdateExtendedFieldsSignature$2 {
|
|
27084
|
+
/**
|
|
27085
|
+
* Updates extended fields of a order payment request
|
|
27086
|
+
* @param - ID of the entity to update.
|
|
27087
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
27088
|
+
*/
|
|
27089
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$2): Promise<UpdateExtendedFieldsResponse$2 & UpdateExtendedFieldsResponseNonNullableFields$2>;
|
|
27090
|
+
}
|
|
25503
27091
|
|
|
25504
27092
|
declare function createRESTModule$7<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
25505
27093
|
|
|
@@ -27353,11 +28941,63 @@ interface BulkUpdatePaymentStatusesOptions {
|
|
|
27353
28941
|
status?: TransactionStatus;
|
|
27354
28942
|
}
|
|
27355
28943
|
|
|
27356
|
-
declare function listTransactionsForSingleOrder$1(httpClient: HttpClient):
|
|
27357
|
-
|
|
27358
|
-
|
|
27359
|
-
|
|
27360
|
-
|
|
28944
|
+
declare function listTransactionsForSingleOrder$1(httpClient: HttpClient): ListTransactionsForSingleOrderSignature;
|
|
28945
|
+
interface ListTransactionsForSingleOrderSignature {
|
|
28946
|
+
/**
|
|
28947
|
+
* Retrieves information about payments and refunds associated with a specified order.
|
|
28948
|
+
*
|
|
28949
|
+
*
|
|
28950
|
+
* The `listTransactionsForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved.
|
|
28951
|
+
* @param - Order ID.
|
|
28952
|
+
*/
|
|
28953
|
+
(orderId: string): Promise<ListTransactionsForSingleOrderResponse & ListTransactionsForSingleOrderResponseNonNullableFields>;
|
|
28954
|
+
}
|
|
28955
|
+
declare function listTransactionsForMultipleOrders$1(httpClient: HttpClient): ListTransactionsForMultipleOrdersSignature;
|
|
28956
|
+
interface ListTransactionsForMultipleOrdersSignature {
|
|
28957
|
+
/**
|
|
28958
|
+
* Retrieves information about payments and refunds associated with all specified orders.
|
|
28959
|
+
*
|
|
28960
|
+
*
|
|
28961
|
+
* The `listTransactionsForMultipleOrders()` function returns a Promise that resolves when the specified orders' transaction records are retrieved.
|
|
28962
|
+
* @param - Order IDs for which to retrieve transactions.
|
|
28963
|
+
*/
|
|
28964
|
+
(orderIds: string[]): Promise<ListTransactionsForMultipleOrdersResponse & ListTransactionsForMultipleOrdersResponseNonNullableFields>;
|
|
28965
|
+
}
|
|
28966
|
+
declare function addPayments$1(httpClient: HttpClient): AddPaymentsSignature;
|
|
28967
|
+
interface AddPaymentsSignature {
|
|
28968
|
+
/**
|
|
28969
|
+
* Adds up to 50 payment records to an order.
|
|
28970
|
+
*
|
|
28971
|
+
*
|
|
28972
|
+
* The `addPayments()` function returns a Promise that resolves when the payment records are added to an order.
|
|
28973
|
+
*
|
|
28974
|
+
* > **Note:** This does **NOT** perform the actual charging - the order is only updated with records of the payments.
|
|
28975
|
+
* @param - Order ID.
|
|
28976
|
+
* @param - Payments to be added to order.
|
|
28977
|
+
*/
|
|
28978
|
+
(orderId: string, payments: Payment[]): Promise<AddPaymentsResponse & AddPaymentsResponseNonNullableFields>;
|
|
28979
|
+
}
|
|
28980
|
+
declare function updatePaymentStatus$1(httpClient: HttpClient): UpdatePaymentStatusSignature;
|
|
28981
|
+
interface UpdatePaymentStatusSignature {
|
|
28982
|
+
/**
|
|
28983
|
+
* Updates the status of an order's payment.
|
|
28984
|
+
*
|
|
28985
|
+
*
|
|
28986
|
+
* The `updatePaymentStatus()` function returns a Promise that resolves when the payment status is updated.
|
|
28987
|
+
*/
|
|
28988
|
+
(identifiers: UpdatePaymentStatusIdentifiers, options?: UpdatePaymentStatusOptions | undefined): Promise<UpdatePaymentStatusResponse & UpdatePaymentStatusResponseNonNullableFields>;
|
|
28989
|
+
}
|
|
28990
|
+
declare function bulkUpdatePaymentStatuses$1(httpClient: HttpClient): BulkUpdatePaymentStatusesSignature;
|
|
28991
|
+
interface BulkUpdatePaymentStatusesSignature {
|
|
28992
|
+
/**
|
|
28993
|
+
* Updates multiple order payments with a specified status.
|
|
28994
|
+
*
|
|
28995
|
+
*
|
|
28996
|
+
* The `bulkUpdatePaymentStatus()` function returns a Promise that resolves when the payment statuses are updated.
|
|
28997
|
+
* @param - Order and payment IDs for which to update payment status.
|
|
28998
|
+
*/
|
|
28999
|
+
(paymentAndOrderIds: PaymentAndOrderId[], options?: BulkUpdatePaymentStatusesOptions | undefined): Promise<BulkUpdatePaymentStatusesResponse & BulkUpdatePaymentStatusesResponseNonNullableFields>;
|
|
29000
|
+
}
|
|
27361
29001
|
declare const onOrderTransactionsUpdated$1: EventDefinition<OrderTransactionsUpdatedEnvelope, "wix.ecom.v1.order_transactions_updated">;
|
|
27362
29002
|
|
|
27363
29003
|
declare function createRESTModule$6<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -27376,6 +29016,7 @@ type _publicBulkUpdatePaymentStatusesType = typeof bulkUpdatePaymentStatuses$1;
|
|
|
27376
29016
|
declare const bulkUpdatePaymentStatuses: ReturnType<typeof createRESTModule$6<_publicBulkUpdatePaymentStatusesType>>;
|
|
27377
29017
|
|
|
27378
29018
|
type _publicOnOrderTransactionsUpdatedType = typeof onOrderTransactionsUpdated$1;
|
|
29019
|
+
/** */
|
|
27379
29020
|
declare const onOrderTransactionsUpdated: ReturnType<typeof createEventModule$4<_publicOnOrderTransactionsUpdatedType>>;
|
|
27380
29021
|
|
|
27381
29022
|
type context$6_ActionType = ActionType;
|
|
@@ -27781,8 +29422,29 @@ interface OrdersSettingsUpdatedEnvelope {
|
|
|
27781
29422
|
metadata: EventMetadata$3;
|
|
27782
29423
|
}
|
|
27783
29424
|
|
|
27784
|
-
declare function getOrdersSettings$1(httpClient: HttpClient):
|
|
27785
|
-
|
|
29425
|
+
declare function getOrdersSettings$1(httpClient: HttpClient): GetOrdersSettingsSignature;
|
|
29426
|
+
interface GetOrdersSettingsSignature {
|
|
29427
|
+
/**
|
|
29428
|
+
* Retrieves the sites' order settings.
|
|
29429
|
+
*
|
|
29430
|
+
*
|
|
29431
|
+
* The `getOrdersSettings()` function returns a Promise that resolves to orders settings.
|
|
29432
|
+
* @returns The requested orders settings.
|
|
29433
|
+
*/
|
|
29434
|
+
(): Promise<GetOrdersSettingsResponse & GetOrdersSettingsResponseNonNullableFields>;
|
|
29435
|
+
}
|
|
29436
|
+
declare function updateOrdersSettings$1(httpClient: HttpClient): UpdateOrdersSettingsSignature;
|
|
29437
|
+
interface UpdateOrdersSettingsSignature {
|
|
29438
|
+
/**
|
|
29439
|
+
* Updates the sites' orders settings.
|
|
29440
|
+
*
|
|
29441
|
+
*
|
|
29442
|
+
* The `updateOrdersSettings()` function returns a Promise that resolves to the newly updated orders settings.
|
|
29443
|
+
* @param - Orders settings to update.
|
|
29444
|
+
* @returns The updated orders settings.
|
|
29445
|
+
*/
|
|
29446
|
+
(ordersSettings: OrdersSettings): Promise<UpdateOrdersSettingsResponse & UpdateOrdersSettingsResponseNonNullableFields>;
|
|
29447
|
+
}
|
|
27786
29448
|
declare const onOrdersSettingsUpdated$1: EventDefinition<OrdersSettingsUpdatedEnvelope, "wix.ecom.v1.orders_settings_updated">;
|
|
27787
29449
|
|
|
27788
29450
|
declare function createRESTModule$5<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
@@ -27795,6 +29457,9 @@ type _publicUpdateOrdersSettingsType = typeof updateOrdersSettings$1;
|
|
|
27795
29457
|
declare const updateOrdersSettings: ReturnType<typeof createRESTModule$5<_publicUpdateOrdersSettingsType>>;
|
|
27796
29458
|
|
|
27797
29459
|
type _publicOnOrdersSettingsUpdatedType = typeof onOrdersSettingsUpdated$1;
|
|
29460
|
+
/**
|
|
29461
|
+
* Triggered when orders settings are updated.
|
|
29462
|
+
*/
|
|
27798
29463
|
declare const onOrdersSettingsUpdated: ReturnType<typeof createEventModule$3<_publicOnOrdersSettingsUpdatedType>>;
|
|
27799
29464
|
|
|
27800
29465
|
type context$5_DeleteOrdersSettingsRequest = DeleteOrdersSettingsRequest;
|
|
@@ -28403,14 +30068,69 @@ interface PickupLocationsQueryBuilder {
|
|
|
28403
30068
|
find: () => Promise<PickupLocationsQueryResult>;
|
|
28404
30069
|
}
|
|
28405
30070
|
|
|
28406
|
-
declare function createPickupLocation$1(httpClient: HttpClient):
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28412
|
-
|
|
28413
|
-
|
|
30071
|
+
declare function createPickupLocation$1(httpClient: HttpClient): CreatePickupLocationSignature;
|
|
30072
|
+
interface CreatePickupLocationSignature {
|
|
30073
|
+
/**
|
|
30074
|
+
* Creates a new PickupLocation
|
|
30075
|
+
* @param - PickupLocation to be created
|
|
30076
|
+
* @returns The created PickupLocation
|
|
30077
|
+
*/
|
|
30078
|
+
(pickupLocation: PickupLocation): Promise<PickupLocation & PickupLocationNonNullableFields>;
|
|
30079
|
+
}
|
|
30080
|
+
declare function getPickupLocation$1(httpClient: HttpClient): GetPickupLocationSignature;
|
|
30081
|
+
interface GetPickupLocationSignature {
|
|
30082
|
+
/**
|
|
30083
|
+
* Get a PickupLocation by id
|
|
30084
|
+
* @param - Id of the PickupLocation to retrieve
|
|
30085
|
+
* @returns The retrieved PickupLocation
|
|
30086
|
+
*/
|
|
30087
|
+
(pickupLocationId: string): Promise<PickupLocation & PickupLocationNonNullableFields>;
|
|
30088
|
+
}
|
|
30089
|
+
declare function updatePickupLocation$1(httpClient: HttpClient): UpdatePickupLocationSignature;
|
|
30090
|
+
interface UpdatePickupLocationSignature {
|
|
30091
|
+
/**
|
|
30092
|
+
* Update a PickupLocation
|
|
30093
|
+
* @param - PickupLocation ID
|
|
30094
|
+
* @returns The updated PickupLocation
|
|
30095
|
+
*/
|
|
30096
|
+
(_id: string | null, pickupLocation: UpdatePickupLocation): Promise<PickupLocation & PickupLocationNonNullableFields>;
|
|
30097
|
+
}
|
|
30098
|
+
declare function deletePickupLocation$1(httpClient: HttpClient): DeletePickupLocationSignature;
|
|
30099
|
+
interface DeletePickupLocationSignature {
|
|
30100
|
+
/**
|
|
30101
|
+
* Delete a PickupLocation
|
|
30102
|
+
* @param - Id of the PickupLocation to delete
|
|
30103
|
+
*/
|
|
30104
|
+
(pickupLocationId: string): Promise<void>;
|
|
30105
|
+
}
|
|
30106
|
+
declare function queryPickupLocation$1(httpClient: HttpClient): QueryPickupLocationSignature;
|
|
30107
|
+
interface QueryPickupLocationSignature {
|
|
30108
|
+
/**
|
|
30109
|
+
* Query PickupLocations using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
30110
|
+
*/
|
|
30111
|
+
(): PickupLocationsQueryBuilder;
|
|
30112
|
+
}
|
|
30113
|
+
declare function bulkCreatePickupLocation$1(httpClient: HttpClient): BulkCreatePickupLocationSignature;
|
|
30114
|
+
interface BulkCreatePickupLocationSignature {
|
|
30115
|
+
/**
|
|
30116
|
+
* Bulk Create for new PickupLocation
|
|
30117
|
+
*/
|
|
30118
|
+
(pickupLocations: PickupLocation[]): Promise<BulkCreatePickupLocationResponse & BulkCreatePickupLocationResponseNonNullableFields>;
|
|
30119
|
+
}
|
|
30120
|
+
declare function bulkUpdatePickupLocation$1(httpClient: HttpClient): BulkUpdatePickupLocationSignature;
|
|
30121
|
+
interface BulkUpdatePickupLocationSignature {
|
|
30122
|
+
/**
|
|
30123
|
+
* Update a PickupLocation
|
|
30124
|
+
*/
|
|
30125
|
+
(pickupLocations: PickupLocation[]): Promise<BulkUpdatePickupLocationResponse & BulkUpdatePickupLocationResponseNonNullableFields>;
|
|
30126
|
+
}
|
|
30127
|
+
declare function bulkDeletePickupLocation$1(httpClient: HttpClient): BulkDeletePickupLocationSignature;
|
|
30128
|
+
interface BulkDeletePickupLocationSignature {
|
|
30129
|
+
/**
|
|
30130
|
+
* Delete a PickupLocation
|
|
30131
|
+
*/
|
|
30132
|
+
(pickupLocationIds: string[]): Promise<BulkDeletePickupLocationResponse & BulkDeletePickupLocationResponseNonNullableFields>;
|
|
30133
|
+
}
|
|
28414
30134
|
declare const onPickupLocationCreated$1: EventDefinition<PickupLocationCreatedEnvelope, "wix.ecom.v1.pickup_location_created">;
|
|
28415
30135
|
declare const onPickupLocationUpdated$1: EventDefinition<PickupLocationUpdatedEnvelope, "wix.ecom.v1.pickup_location_updated">;
|
|
28416
30136
|
declare const onPickupLocationDeleted$1: EventDefinition<PickupLocationDeletedEnvelope, "wix.ecom.v1.pickup_location_deleted">;
|
|
@@ -28437,12 +30157,15 @@ type _publicBulkDeletePickupLocationType = typeof bulkDeletePickupLocation$1;
|
|
|
28437
30157
|
declare const bulkDeletePickupLocation: ReturnType<typeof createRESTModule$4<_publicBulkDeletePickupLocationType>>;
|
|
28438
30158
|
|
|
28439
30159
|
type _publicOnPickupLocationCreatedType = typeof onPickupLocationCreated$1;
|
|
30160
|
+
/** */
|
|
28440
30161
|
declare const onPickupLocationCreated: ReturnType<typeof createEventModule$2<_publicOnPickupLocationCreatedType>>;
|
|
28441
30162
|
|
|
28442
30163
|
type _publicOnPickupLocationUpdatedType = typeof onPickupLocationUpdated$1;
|
|
30164
|
+
/** */
|
|
28443
30165
|
declare const onPickupLocationUpdated: ReturnType<typeof createEventModule$2<_publicOnPickupLocationUpdatedType>>;
|
|
28444
30166
|
|
|
28445
30167
|
type _publicOnPickupLocationDeletedType = typeof onPickupLocationDeleted$1;
|
|
30168
|
+
/** */
|
|
28446
30169
|
declare const onPickupLocationDeleted: ReturnType<typeof createEventModule$2<_publicOnPickupLocationDeletedType>>;
|
|
28447
30170
|
|
|
28448
30171
|
type context$4_AddressStreetOneOf = AddressStreetOneOf;
|
|
@@ -28998,12 +30721,74 @@ interface UpdateExtendedFieldsOptions$1 {
|
|
|
28998
30721
|
namespaceData: Record<string, any> | null;
|
|
28999
30722
|
}
|
|
29000
30723
|
|
|
29001
|
-
declare function createShippingOption$1(httpClient: HttpClient):
|
|
29002
|
-
|
|
29003
|
-
|
|
29004
|
-
|
|
29005
|
-
|
|
29006
|
-
|
|
30724
|
+
declare function createShippingOption$1(httpClient: HttpClient): CreateShippingOptionSignature;
|
|
30725
|
+
interface CreateShippingOptionSignature {
|
|
30726
|
+
/**
|
|
30727
|
+
* Creates a ShippingOption.
|
|
30728
|
+
*
|
|
30729
|
+
* The request body must include shipping option and delivery region associated to.
|
|
30730
|
+
* @param - ShippingOption to be created.
|
|
30731
|
+
* @returns The created ShippingOption.
|
|
30732
|
+
*/
|
|
30733
|
+
(shippingOption: ShippingOption$1): Promise<ShippingOption$1 & ShippingOptionNonNullableFields$1>;
|
|
30734
|
+
}
|
|
30735
|
+
declare function getShippingOption$1(httpClient: HttpClient): GetShippingOptionSignature;
|
|
30736
|
+
interface GetShippingOptionSignature {
|
|
30737
|
+
/**
|
|
30738
|
+
* Retrieves a ShippingOption.
|
|
30739
|
+
* @param - ID of the ShippingOption to retrieve.
|
|
30740
|
+
* @returns The requested ShippingOption.
|
|
30741
|
+
*/
|
|
30742
|
+
(shippingOptionId: string): Promise<ShippingOption$1 & ShippingOptionNonNullableFields$1>;
|
|
30743
|
+
}
|
|
30744
|
+
declare function updateShippingOption$1(httpClient: HttpClient): UpdateShippingOptionSignature;
|
|
30745
|
+
interface UpdateShippingOptionSignature {
|
|
30746
|
+
/**
|
|
30747
|
+
* Updates a ShippingOption.
|
|
30748
|
+
*
|
|
30749
|
+
*
|
|
30750
|
+
* Each time the ShippingOption is updated,
|
|
30751
|
+
* `revision` increments by 1.
|
|
30752
|
+
* The current `revision` must be passed when updating the ShippingOption.
|
|
30753
|
+
* This ensures you're working with the latest ShippingOption
|
|
30754
|
+
* and prevents unintended overwrites.
|
|
30755
|
+
* @param - ShippingOption ID.
|
|
30756
|
+
* @returns Updated ShippingOption.
|
|
30757
|
+
*/
|
|
30758
|
+
(_id: string | null, shippingOption: UpdateShippingOption): Promise<ShippingOption$1 & ShippingOptionNonNullableFields$1>;
|
|
30759
|
+
}
|
|
30760
|
+
declare function deleteShippingOption$1(httpClient: HttpClient): DeleteShippingOptionSignature;
|
|
30761
|
+
interface DeleteShippingOptionSignature {
|
|
30762
|
+
/**
|
|
30763
|
+
* Deletes a ShippingOption.
|
|
30764
|
+
* Deleting a ShippingOption permanently removes them from the ShippingOption List.
|
|
30765
|
+
* @param - Id of the ShippingOption to delete.
|
|
30766
|
+
*/
|
|
30767
|
+
(shippingOptionId: string): Promise<void>;
|
|
30768
|
+
}
|
|
30769
|
+
declare function queryShippingOptions$1(httpClient: HttpClient): QueryShippingOptionsSignature;
|
|
30770
|
+
interface QueryShippingOptionsSignature {
|
|
30771
|
+
/**
|
|
30772
|
+
* Retrieves a list of ShippingOptions, given the provided [paging, filtering, and sorting][1].
|
|
30773
|
+
*
|
|
30774
|
+
* Up to 1,000 ShippingOptions can be returned per request.
|
|
30775
|
+
*
|
|
30776
|
+
* To learn how to query ShippingOptions, see [API Query Language][2].
|
|
30777
|
+
*
|
|
30778
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
30779
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
30780
|
+
*/
|
|
30781
|
+
(): ShippingOptionsQueryBuilder;
|
|
30782
|
+
}
|
|
30783
|
+
declare function updateExtendedFields$3(httpClient: HttpClient): UpdateExtendedFieldsSignature$1;
|
|
30784
|
+
interface UpdateExtendedFieldsSignature$1 {
|
|
30785
|
+
/**
|
|
30786
|
+
* Updates extended fields of a ShippingOption without incrementing revision
|
|
30787
|
+
* @param - ID of the entity to update.
|
|
30788
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
30789
|
+
*/
|
|
30790
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$1): Promise<UpdateExtendedFieldsResponse$1 & UpdateExtendedFieldsResponseNonNullableFields$1>;
|
|
30791
|
+
}
|
|
29007
30792
|
declare const onShippingOptionCreated$1: EventDefinition<ShippingOptionCreatedEnvelope, "wix.ecom.v1.shipping_option_created">;
|
|
29008
30793
|
declare const onShippingOptionUpdated$1: EventDefinition<ShippingOptionUpdatedEnvelope, "wix.ecom.v1.shipping_option_updated">;
|
|
29009
30794
|
declare const onShippingOptionDeleted$1: EventDefinition<ShippingOptionDeletedEnvelope, "wix.ecom.v1.shipping_option_deleted">;
|
|
@@ -29026,12 +30811,15 @@ type _publicUpdateExtendedFieldsType$1 = typeof updateExtendedFields$3;
|
|
|
29026
30811
|
declare const updateExtendedFields$2: ReturnType<typeof createRESTModule$3<_publicUpdateExtendedFieldsType>>;
|
|
29027
30812
|
|
|
29028
30813
|
type _publicOnShippingOptionCreatedType = typeof onShippingOptionCreated$1;
|
|
30814
|
+
/** */
|
|
29029
30815
|
declare const onShippingOptionCreated: ReturnType<typeof createEventModule$1<_publicOnShippingOptionCreatedType>>;
|
|
29030
30816
|
|
|
29031
30817
|
type _publicOnShippingOptionUpdatedType = typeof onShippingOptionUpdated$1;
|
|
30818
|
+
/** */
|
|
29032
30819
|
declare const onShippingOptionUpdated: ReturnType<typeof createEventModule$1<_publicOnShippingOptionUpdatedType>>;
|
|
29033
30820
|
|
|
29034
30821
|
type _publicOnShippingOptionDeletedType = typeof onShippingOptionDeleted$1;
|
|
30822
|
+
/** */
|
|
29035
30823
|
declare const onShippingOptionDeleted: ReturnType<typeof createEventModule$1<_publicOnShippingOptionDeletedType>>;
|
|
29036
30824
|
|
|
29037
30825
|
type context$3_Condition = Condition;
|
|
@@ -29685,12 +31473,64 @@ interface UpdateExtendedFieldsOptions {
|
|
|
29685
31473
|
namespaceData: Record<string, any> | null;
|
|
29686
31474
|
}
|
|
29687
31475
|
|
|
29688
|
-
declare function createShippoConfiguration$1(httpClient: HttpClient):
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
31476
|
+
declare function createShippoConfiguration$1(httpClient: HttpClient): CreateShippoConfigurationSignature;
|
|
31477
|
+
interface CreateShippoConfigurationSignature {
|
|
31478
|
+
/**
|
|
31479
|
+
* Creates a ShippoConfiguration.
|
|
31480
|
+
* @param - ShippoConfiguration to be created.
|
|
31481
|
+
* @returns The created ShippoConfiguration.
|
|
31482
|
+
*/
|
|
31483
|
+
(shippoConfiguration: ShippoConfiguration, options?: CreateShippoConfigurationOptions | undefined): Promise<ShippoConfiguration & ShippoConfigurationNonNullableFields>;
|
|
31484
|
+
}
|
|
31485
|
+
declare function getShippoConfiguration$1(httpClient: HttpClient): GetShippoConfigurationSignature;
|
|
31486
|
+
interface GetShippoConfigurationSignature {
|
|
31487
|
+
/**
|
|
31488
|
+
* Retrieves a ShippoConfiguration.
|
|
31489
|
+
* @param - ID of the ShippoConfiguration to retrieve.
|
|
31490
|
+
* @returns The requested ShippoConfiguration.
|
|
31491
|
+
*/
|
|
31492
|
+
(shippoConfigurationId: string): Promise<ShippoConfiguration & ShippoConfigurationNonNullableFields>;
|
|
31493
|
+
}
|
|
31494
|
+
declare function updateShippoConfiguration$1(httpClient: HttpClient): UpdateShippoConfigurationSignature;
|
|
31495
|
+
interface UpdateShippoConfigurationSignature {
|
|
31496
|
+
/**
|
|
31497
|
+
* Updates a ShippoConfiguration.
|
|
31498
|
+
* @param - ShippoConfiguration ID.
|
|
31499
|
+
* @returns Updated ShippoConfiguration.
|
|
31500
|
+
*/
|
|
31501
|
+
(_id: string | null, shippoConfiguration: UpdateShippoConfiguration): Promise<ShippoConfiguration & ShippoConfigurationNonNullableFields>;
|
|
31502
|
+
}
|
|
31503
|
+
declare function deleteShippoConfiguration$1(httpClient: HttpClient): DeleteShippoConfigurationSignature;
|
|
31504
|
+
interface DeleteShippoConfigurationSignature {
|
|
31505
|
+
/**
|
|
31506
|
+
* Deletes a ShippoConfiguration.
|
|
31507
|
+
* @param - ID of the ShippoConfiguration to delete.
|
|
31508
|
+
*/
|
|
31509
|
+
(shippoConfigurationId: string): Promise<void>;
|
|
31510
|
+
}
|
|
31511
|
+
declare function queryShippoConfigurations$1(httpClient: HttpClient): QueryShippoConfigurationsSignature;
|
|
31512
|
+
interface QueryShippoConfigurationsSignature {
|
|
31513
|
+
/**
|
|
31514
|
+
* Retrieves a list of ShippoConfigurations, given the provided [paging, filtering, and sorting][1].
|
|
31515
|
+
*
|
|
31516
|
+
* Up to 1,000 ShippoConfigurations can be returned per request.
|
|
31517
|
+
*
|
|
31518
|
+
* To learn how to query ShippoConfigurations, see [API Query Language][2].
|
|
31519
|
+
*
|
|
31520
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
31521
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
31522
|
+
*/
|
|
31523
|
+
(): ShippoConfigurationsQueryBuilder;
|
|
31524
|
+
}
|
|
31525
|
+
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
31526
|
+
interface UpdateExtendedFieldsSignature {
|
|
31527
|
+
/**
|
|
31528
|
+
* Updates extended fields of a ShippoConfiguration without incrementing revision
|
|
31529
|
+
* @param - ID of the entity to update.
|
|
31530
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
31531
|
+
*/
|
|
31532
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
31533
|
+
}
|
|
29694
31534
|
declare const onShippoConfigurationCreated$1: EventDefinition<ShippoConfigurationCreatedEnvelope, "wix.ecom.v1.shippo_configuration_created">;
|
|
29695
31535
|
declare const onShippoConfigurationUpdated$1: EventDefinition<ShippoConfigurationUpdatedEnvelope, "wix.ecom.v1.shippo_configuration_updated">;
|
|
29696
31536
|
declare const onShippoConfigurationDeleted$1: EventDefinition<ShippoConfigurationDeletedEnvelope, "wix.ecom.v1.shippo_configuration_deleted">;
|
|
@@ -29713,12 +31553,15 @@ type _publicUpdateExtendedFieldsType = typeof updateExtendedFields$1;
|
|
|
29713
31553
|
declare const updateExtendedFields: ReturnType<typeof createRESTModule$2<_publicUpdateExtendedFieldsType>>;
|
|
29714
31554
|
|
|
29715
31555
|
type _publicOnShippoConfigurationCreatedType = typeof onShippoConfigurationCreated$1;
|
|
31556
|
+
/** */
|
|
29716
31557
|
declare const onShippoConfigurationCreated: ReturnType<typeof createEventModule<_publicOnShippoConfigurationCreatedType>>;
|
|
29717
31558
|
|
|
29718
31559
|
type _publicOnShippoConfigurationUpdatedType = typeof onShippoConfigurationUpdated$1;
|
|
31560
|
+
/** */
|
|
29719
31561
|
declare const onShippoConfigurationUpdated: ReturnType<typeof createEventModule<_publicOnShippoConfigurationUpdatedType>>;
|
|
29720
31562
|
|
|
29721
31563
|
type _publicOnShippoConfigurationDeletedType = typeof onShippoConfigurationDeleted$1;
|
|
31564
|
+
/** */
|
|
29722
31565
|
declare const onShippoConfigurationDeleted: ReturnType<typeof createEventModule<_publicOnShippoConfigurationDeletedType>>;
|
|
29723
31566
|
|
|
29724
31567
|
type context$2_ActionEvent = ActionEvent;
|
|
@@ -31094,7 +32937,13 @@ interface CalculateTotalsOptions extends CalculateTotalsRequestCouponOneOf, Calc
|
|
|
31094
32937
|
purchaseFlowId?: string | null;
|
|
31095
32938
|
}
|
|
31096
32939
|
|
|
31097
|
-
declare function calculateTotals$1(httpClient: HttpClient):
|
|
32940
|
+
declare function calculateTotals$1(httpClient: HttpClient): CalculateTotalsSignature;
|
|
32941
|
+
interface CalculateTotalsSignature {
|
|
32942
|
+
/**
|
|
32943
|
+
* Returns a totals calculation for specified line items.
|
|
32944
|
+
*/
|
|
32945
|
+
(options?: CalculateTotalsOptions | undefined): Promise<CalculateTotalsResponse & CalculateTotalsResponseNonNullableFields>;
|
|
32946
|
+
}
|
|
31098
32947
|
|
|
31099
32948
|
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
31100
32949
|
|
|
@@ -31283,9 +33132,37 @@ interface GetConversionRateIdentifiers {
|
|
|
31283
33132
|
to: string;
|
|
31284
33133
|
}
|
|
31285
33134
|
|
|
31286
|
-
declare function listCurrencies$1(httpClient: HttpClient):
|
|
31287
|
-
|
|
31288
|
-
|
|
33135
|
+
declare function listCurrencies$1(httpClient: HttpClient): ListCurrenciesSignature;
|
|
33136
|
+
interface ListCurrenciesSignature {
|
|
33137
|
+
/**
|
|
33138
|
+
* Returns an array of currencies. The array lists all currencies for which Wix supports conversion and their symbols.
|
|
33139
|
+
*/
|
|
33140
|
+
(): Promise<ListCurrenciesResponse & ListCurrenciesResponseNonNullableFields>;
|
|
33141
|
+
}
|
|
33142
|
+
declare function convertCurrency$1(httpClient: HttpClient): ConvertCurrencySignature;
|
|
33143
|
+
interface ConvertCurrencySignature {
|
|
33144
|
+
/**
|
|
33145
|
+
* Returns an array of amounts converted from the original (`from`) currency to the target (`to`) currency and the timestamp for the conversion rate used.
|
|
33146
|
+
*
|
|
33147
|
+
*
|
|
33148
|
+
* Use the `convertCurrency()` function to convert an array of one or more amounts between two currencies. The `convertCurrency()` function returns an array of converted amounts and the timestamp for the conversion rate used.
|
|
33149
|
+
*
|
|
33150
|
+
* > **Note**: The currency codes used must exist in the array of supported currencies returned by the [`listCurrencies()`](#listcurrencies) function.
|
|
33151
|
+
*
|
|
33152
|
+
* @param - Amounts to convert.
|
|
33153
|
+
* @param - Identifying details needed to determine which currency rate to convert. The combination of the `from` and `to` properties together comprise the unique ID.
|
|
33154
|
+
* @param - Options to use when converting currency.
|
|
33155
|
+
*/
|
|
33156
|
+
(identifiers: ConvertCurrencyIdentifiers, amounts: DecimalValue[]): Promise<ConvertCurrencyResponse & ConvertCurrencyResponseNonNullableFields>;
|
|
33157
|
+
}
|
|
33158
|
+
declare function getConversionRate$1(httpClient: HttpClient): GetConversionRateSignature;
|
|
33159
|
+
interface GetConversionRateSignature {
|
|
33160
|
+
/**
|
|
33161
|
+
* Returns the conversion rate between 2 currencies.
|
|
33162
|
+
* @param - Identifying details needed to get the conversion rate. The combination of the `from` and `to` properties together comprise the unique ID.
|
|
33163
|
+
*/
|
|
33164
|
+
(identifiers: GetConversionRateIdentifiers): Promise<ConversionRateResponse & ConversionRateResponseNonNullableFields>;
|
|
33165
|
+
}
|
|
31289
33166
|
|
|
31290
33167
|
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
31291
33168
|
|