@wix/ecom 1.0.764 → 1.0.766
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/service-plugins-context.d.ts +1 -0
- package/build/cjs/service-plugins-context.js +2 -1
- package/build/cjs/service-plugins-context.js.map +1 -1
- package/build/cjs/service-plugins.d.ts +1 -0
- package/build/cjs/service-plugins.js +2 -1
- package/build/cjs/service-plugins.js.map +1 -1
- package/build/es/service-plugins-context.d.ts +1 -0
- package/build/es/service-plugins-context.js +1 -0
- package/build/es/service-plugins-context.js.map +1 -1
- package/build/es/service-plugins.d.ts +1 -0
- package/build/es/service-plugins.js +1 -0
- package/build/es/service-plugins.js.map +1 -1
- package/package.json +5 -4
- package/type-bundles/context.bundle.d.ts +8 -9
- package/type-bundles/index.bundle.d.ts +8 -9
- package/type-bundles/meta.bundle.d.ts +8 -8
- package/type-bundles/service-plugins-context.bundle.d.ts +322 -53
- package/type-bundles/service-plugins.bundle.d.ts +333 -64
|
@@ -6,12 +6,12 @@ interface GetBalanceRequest {
|
|
|
6
6
|
/** Gift card code. */
|
|
7
7
|
code?: string;
|
|
8
8
|
/**
|
|
9
|
-
* App
|
|
10
|
-
* @deprecated App
|
|
9
|
+
* App ID of the Gift Card provider. Deprecated.
|
|
10
|
+
* @deprecated App ID of the Gift Card provider. Deprecated.
|
|
11
11
|
* @targetRemovalDate 2025-07-01
|
|
12
12
|
*/
|
|
13
13
|
appInstanceId?: string;
|
|
14
|
-
/** The physical location ID. */
|
|
14
|
+
/** The physical location ID. Can be based on the Locations API or an external provider. */
|
|
15
15
|
locationId?: string | null;
|
|
16
16
|
}
|
|
17
17
|
interface GetBalanceResponse {
|
|
@@ -29,18 +29,18 @@ interface RedeemRequest {
|
|
|
29
29
|
/** Gift card code. */
|
|
30
30
|
code?: string;
|
|
31
31
|
/**
|
|
32
|
-
* App
|
|
33
|
-
* @deprecated App
|
|
32
|
+
* App ID of the Gift Card provider. Deprecated.
|
|
33
|
+
* @deprecated App ID of the Gift Card provider. Deprecated.
|
|
34
34
|
* @targetRemovalDate 2025-07-01
|
|
35
35
|
*/
|
|
36
36
|
appInstanceId?: string;
|
|
37
37
|
/** Amount to redeem from the gift card. */
|
|
38
38
|
amount?: number;
|
|
39
|
-
/** Order ID the gift card transaction is applied to. */
|
|
39
|
+
/** Order ID the gift card transaction is applied to. Order details can be collected from eCommerce Search Orders. */
|
|
40
40
|
orderId?: string;
|
|
41
41
|
/** Currency code. */
|
|
42
42
|
currencyCode?: string;
|
|
43
|
-
/** Physical location ID. */
|
|
43
|
+
/** Physical location ID. Can be based on the Locations API or an external provider. */
|
|
44
44
|
locationId?: string | null;
|
|
45
45
|
}
|
|
46
46
|
interface RedeemResponse {
|
|
@@ -53,14 +53,14 @@ interface RedeemResponse {
|
|
|
53
53
|
}
|
|
54
54
|
interface VoidRequest {
|
|
55
55
|
/**
|
|
56
|
-
* App
|
|
57
|
-
* @deprecated App
|
|
56
|
+
* App ID of the Gift Card provider. Deprecated.
|
|
57
|
+
* @deprecated App ID of the Gift Card provider. Deprecated.
|
|
58
58
|
* @targetRemovalDate 2025-07-01
|
|
59
59
|
*/
|
|
60
60
|
appInstanceId?: string;
|
|
61
61
|
/** Transaction ID to void. */
|
|
62
62
|
transactionId?: string;
|
|
63
|
-
/** Physical location ID. */
|
|
63
|
+
/** Physical location ID. Can be based on the Locations API or an external provider. */
|
|
64
64
|
locationId?: string | null;
|
|
65
65
|
}
|
|
66
66
|
interface VoidResponse {
|
|
@@ -86,26 +86,26 @@ interface GiftCardProviderConfig {
|
|
|
86
86
|
* }
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
interface Context$
|
|
89
|
+
interface Context$7 {
|
|
90
90
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
91
91
|
requestId?: string | null;
|
|
92
92
|
/** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code. */
|
|
93
93
|
currency?: string | null;
|
|
94
94
|
/** An object that describes the identity that triggered this request. */
|
|
95
|
-
identity?: IdentificationData$
|
|
95
|
+
identity?: IdentificationData$7;
|
|
96
96
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
97
97
|
languages?: string[];
|
|
98
98
|
/** The service provider app's instance ID. */
|
|
99
99
|
instanceId?: string | null;
|
|
100
100
|
}
|
|
101
|
-
declare enum IdentityType$
|
|
101
|
+
declare enum IdentityType$7 {
|
|
102
102
|
UNKNOWN = "UNKNOWN",
|
|
103
103
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
104
104
|
MEMBER = "MEMBER",
|
|
105
105
|
WIX_USER = "WIX_USER",
|
|
106
106
|
APP = "APP"
|
|
107
107
|
}
|
|
108
|
-
interface IdentificationData$
|
|
108
|
+
interface IdentificationData$7 extends IdentificationDataIdOneOf$7 {
|
|
109
109
|
/** ID of a site visitor that has not logged in to the site. */
|
|
110
110
|
anonymousVisitorId?: string;
|
|
111
111
|
/** ID of a site visitor that has logged in to the site. */
|
|
@@ -115,10 +115,10 @@ interface IdentificationData$6 extends IdentificationDataIdOneOf$6 {
|
|
|
115
115
|
/** ID of an app. */
|
|
116
116
|
appId?: string;
|
|
117
117
|
/** @readonly */
|
|
118
|
-
identityType?: IdentityType$
|
|
118
|
+
identityType?: IdentityType$7;
|
|
119
119
|
}
|
|
120
120
|
/** @oneof */
|
|
121
|
-
interface IdentificationDataIdOneOf$
|
|
121
|
+
interface IdentificationDataIdOneOf$7 {
|
|
122
122
|
/** ID of a site visitor that has not logged in to the site. */
|
|
123
123
|
anonymousVisitorId?: string;
|
|
124
124
|
/** ID of a site visitor that has logged in to the site. */
|
|
@@ -258,26 +258,26 @@ declare class AlreadyVoidedWixError extends Error {
|
|
|
258
258
|
static readonly __type = "wix_spi_error";
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
type ServicePluginMethodInput$
|
|
261
|
+
type ServicePluginMethodInput$f = {
|
|
262
262
|
request: any;
|
|
263
263
|
metadata: any;
|
|
264
264
|
};
|
|
265
|
-
type ServicePluginContract$
|
|
266
|
-
type ServicePluginMethodMetadata$
|
|
265
|
+
type ServicePluginContract$f = Record<string, (payload: ServicePluginMethodInput$f) => unknown | Promise<unknown>>;
|
|
266
|
+
type ServicePluginMethodMetadata$f = {
|
|
267
267
|
name: string;
|
|
268
268
|
primaryHttpMappingPath: string;
|
|
269
269
|
transformations: {
|
|
270
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$
|
|
270
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$f;
|
|
271
271
|
toREST: (...args: unknown[]) => unknown;
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
|
-
type ServicePluginDefinition$
|
|
274
|
+
type ServicePluginDefinition$f<Contract extends ServicePluginContract$f> = {
|
|
275
275
|
__type: 'service-plugin-definition';
|
|
276
276
|
componentType: string;
|
|
277
|
-
methods: ServicePluginMethodMetadata$
|
|
277
|
+
methods: ServicePluginMethodMetadata$f[];
|
|
278
278
|
__contract: Contract;
|
|
279
279
|
};
|
|
280
|
-
declare function ServicePluginDefinition$
|
|
280
|
+
declare function ServicePluginDefinition$f<Contract extends ServicePluginContract$f>(componentType: string, methods: ServicePluginMethodMetadata$f[]): ServicePluginDefinition$f<Contract>;
|
|
281
281
|
|
|
282
282
|
declare global {
|
|
283
283
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -293,17 +293,17 @@ declare global {
|
|
|
293
293
|
|
|
294
294
|
interface GetBalanceEnvelope {
|
|
295
295
|
request: GetBalanceRequest;
|
|
296
|
-
metadata: Context$
|
|
296
|
+
metadata: Context$7;
|
|
297
297
|
}
|
|
298
298
|
interface RedeemEnvelope {
|
|
299
299
|
request: RedeemRequest;
|
|
300
|
-
metadata: Context$
|
|
300
|
+
metadata: Context$7;
|
|
301
301
|
}
|
|
302
302
|
interface _voidEnvelope {
|
|
303
303
|
request: VoidRequest;
|
|
304
|
-
metadata: Context$
|
|
304
|
+
metadata: Context$7;
|
|
305
305
|
}
|
|
306
|
-
declare const provideHandlers$
|
|
306
|
+
declare const provideHandlers$f: ServicePluginDefinition$f<{
|
|
307
307
|
/**
|
|
308
308
|
*
|
|
309
309
|
* This method retrieves gift card data from your app.
|
|
@@ -321,6 +321,286 @@ declare const provideHandlers$d: ServicePluginDefinition$d<{
|
|
|
321
321
|
_void(payload: _voidEnvelope): VoidResponse | Promise<VoidResponse>;
|
|
322
322
|
}>;
|
|
323
323
|
|
|
324
|
+
type ServicePluginMethodInput$e = {
|
|
325
|
+
request: any;
|
|
326
|
+
metadata: any;
|
|
327
|
+
};
|
|
328
|
+
type ServicePluginContract$e = Record<string, (payload: ServicePluginMethodInput$e) => unknown | Promise<unknown>>;
|
|
329
|
+
type ServicePluginMethodMetadata$e = {
|
|
330
|
+
name: string;
|
|
331
|
+
primaryHttpMappingPath: string;
|
|
332
|
+
transformations: {
|
|
333
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$e;
|
|
334
|
+
toREST: (...args: unknown[]) => unknown;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
type ServicePluginDefinition$e<Contract extends ServicePluginContract$e> = {
|
|
338
|
+
__type: 'service-plugin-definition';
|
|
339
|
+
componentType: string;
|
|
340
|
+
methods: ServicePluginMethodMetadata$e[];
|
|
341
|
+
__contract: Contract;
|
|
342
|
+
};
|
|
343
|
+
declare function ServicePluginDefinition$e<Contract extends ServicePluginContract$e>(componentType: string, methods: ServicePluginMethodMetadata$e[]): ServicePluginDefinition$e<Contract>;
|
|
344
|
+
type BuildServicePluginDefinition$7<T extends ServicePluginDefinition$e<any>> = (implementation: T['__contract']) => void;
|
|
345
|
+
|
|
346
|
+
declare global {
|
|
347
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
348
|
+
interface SymbolConstructor {
|
|
349
|
+
readonly observable: symbol;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
declare function createServicePluginModule$7<T extends ServicePluginDefinition$e<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$7<T> & T;
|
|
354
|
+
|
|
355
|
+
type _publicProvideHandlersType$7 = typeof provideHandlers$f;
|
|
356
|
+
declare const provideHandlers$e: ReturnType<typeof createServicePluginModule$7<_publicProvideHandlersType>>;
|
|
357
|
+
|
|
358
|
+
type context$7_AlreadyRedeemedWixError = AlreadyRedeemedWixError;
|
|
359
|
+
declare const context$7_AlreadyRedeemedWixError: typeof AlreadyRedeemedWixError;
|
|
360
|
+
type context$7_AlreadyVoidedWixError = AlreadyVoidedWixError;
|
|
361
|
+
declare const context$7_AlreadyVoidedWixError: typeof AlreadyVoidedWixError;
|
|
362
|
+
type context$7_CurrencyNotSupportedWixError = CurrencyNotSupportedWixError;
|
|
363
|
+
declare const context$7_CurrencyNotSupportedWixError: typeof CurrencyNotSupportedWixError;
|
|
364
|
+
type context$7_GetBalanceRequest = GetBalanceRequest;
|
|
365
|
+
type context$7_GetBalanceResponse = GetBalanceResponse;
|
|
366
|
+
type context$7_GiftCardDisabledWixError = GiftCardDisabledWixError;
|
|
367
|
+
declare const context$7_GiftCardDisabledWixError: typeof GiftCardDisabledWixError;
|
|
368
|
+
type context$7_GiftCardExpiredWixError = GiftCardExpiredWixError;
|
|
369
|
+
declare const context$7_GiftCardExpiredWixError: typeof GiftCardExpiredWixError;
|
|
370
|
+
type context$7_GiftCardNotFoundWixError = GiftCardNotFoundWixError;
|
|
371
|
+
declare const context$7_GiftCardNotFoundWixError: typeof GiftCardNotFoundWixError;
|
|
372
|
+
type context$7_GiftCardProviderConfig = GiftCardProviderConfig;
|
|
373
|
+
type context$7_GiftCardProviderEntity = GiftCardProviderEntity;
|
|
374
|
+
type context$7_InsufficientFundsWixError = InsufficientFundsWixError;
|
|
375
|
+
declare const context$7_InsufficientFundsWixError: typeof InsufficientFundsWixError;
|
|
376
|
+
type context$7_RedeemRequest = RedeemRequest;
|
|
377
|
+
type context$7_RedeemResponse = RedeemResponse;
|
|
378
|
+
type context$7_TransactionNotFoundWixError = TransactionNotFoundWixError;
|
|
379
|
+
declare const context$7_TransactionNotFoundWixError: typeof TransactionNotFoundWixError;
|
|
380
|
+
type context$7_VoidRequest = VoidRequest;
|
|
381
|
+
type context$7_VoidResponse = VoidResponse;
|
|
382
|
+
declare namespace context$7 {
|
|
383
|
+
export { context$7_AlreadyRedeemedWixError as AlreadyRedeemedWixError, context$7_AlreadyVoidedWixError as AlreadyVoidedWixError, type Context$7 as Context, context$7_CurrencyNotSupportedWixError as CurrencyNotSupportedWixError, type context$7_GetBalanceRequest as GetBalanceRequest, type context$7_GetBalanceResponse as GetBalanceResponse, context$7_GiftCardDisabledWixError as GiftCardDisabledWixError, context$7_GiftCardExpiredWixError as GiftCardExpiredWixError, context$7_GiftCardNotFoundWixError as GiftCardNotFoundWixError, type context$7_GiftCardProviderConfig as GiftCardProviderConfig, type context$7_GiftCardProviderEntity as GiftCardProviderEntity, type IdentificationData$7 as IdentificationData, type IdentificationDataIdOneOf$7 as IdentificationDataIdOneOf, IdentityType$7 as IdentityType, context$7_InsufficientFundsWixError as InsufficientFundsWixError, type context$7_RedeemRequest as RedeemRequest, type context$7_RedeemResponse as RedeemResponse, context$7_TransactionNotFoundWixError as TransactionNotFoundWixError, type context$7_VoidRequest as VoidRequest, type context$7_VoidResponse as VoidResponse, type _publicProvideHandlersType$7 as _publicProvideHandlersType, provideHandlers$e as provideHandlers, provideHandlers$f as publicProvideHandlers };
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/** additional information can be passed via aspects, for example GEO */
|
|
387
|
+
interface GetRecommendationsRequest {
|
|
388
|
+
/** The set of items used by algorithms with the `RELATED_ITEMS` `algorithmType` to determine related item recommendations. */
|
|
389
|
+
items?: CatalogReference$6[];
|
|
390
|
+
/** List of algorithms used to find recommended items. Items will be returned in a separate object for each algorithm */
|
|
391
|
+
algorithmIds?: string[];
|
|
392
|
+
}
|
|
393
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
394
|
+
interface CatalogReference$6 {
|
|
395
|
+
/** ID of the item within the catalog it belongs to. */
|
|
396
|
+
catalogItemId?: string;
|
|
397
|
+
/**
|
|
398
|
+
* ID of the app providing the catalog.
|
|
399
|
+
*
|
|
400
|
+
* You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
|
|
401
|
+
*
|
|
402
|
+
* For items from Wix catalogs, the following values always apply:
|
|
403
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
404
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
405
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
406
|
+
*/
|
|
407
|
+
appId?: string;
|
|
408
|
+
/**
|
|
409
|
+
* Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
|
|
410
|
+
*
|
|
411
|
+
* For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
|
|
412
|
+
*/
|
|
413
|
+
options?: Record<string, any> | null;
|
|
414
|
+
}
|
|
415
|
+
interface GetRecommendationsResponse {
|
|
416
|
+
/**
|
|
417
|
+
* Related items returned by each algorithm.
|
|
418
|
+
*
|
|
419
|
+
* Each object in the array contains an `algorithmId` and a list of the item recommendations provided by that algorithm.
|
|
420
|
+
*/
|
|
421
|
+
recommendationPerAlgorithm?: RecommendationForAlgorithm[];
|
|
422
|
+
}
|
|
423
|
+
interface RecommendationForAlgorithm {
|
|
424
|
+
/** Id of the algorithm that provided the recommendation. */
|
|
425
|
+
algorithmId?: string;
|
|
426
|
+
/** Item recommendations provided by the algorithm. Depending on the algorithm, these recommendations may be influenced by the items provided in the request. */
|
|
427
|
+
recommendedItems?: CatalogReference$6[];
|
|
428
|
+
}
|
|
429
|
+
interface RecommendationAlgorithmNotSupported {
|
|
430
|
+
/** Not supported algorithms. */
|
|
431
|
+
unsupportedAlgorithms?: string[];
|
|
432
|
+
}
|
|
433
|
+
interface ItemAppIdNotSupportedError {
|
|
434
|
+
/** Items with not supported catalogs. */
|
|
435
|
+
items?: CatalogReference$6[];
|
|
436
|
+
}
|
|
437
|
+
interface RecommendationsProviderConfig {
|
|
438
|
+
/** URI where the application implementing the SPI is deployed. */
|
|
439
|
+
deploymentUri?: string;
|
|
440
|
+
/** App IDs of catalogs for which recommended items can be found. */
|
|
441
|
+
catalogAppIds?: string[];
|
|
442
|
+
/** The algorithms that this application can use to calculate item recommendations. */
|
|
443
|
+
supportedAlgorithms?: AlgorithmConfig[];
|
|
444
|
+
}
|
|
445
|
+
interface AlgorithmConfig {
|
|
446
|
+
/** Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project. */
|
|
447
|
+
_id?: string;
|
|
448
|
+
/** Algorithm name. This value is not translatable. */
|
|
449
|
+
name?: string;
|
|
450
|
+
/** Algorithm description. This describes how the algorithm works and if it has any limitations regarding site content, number of items in the catalog, site traffic, and so on. This value is not translatable. */
|
|
451
|
+
description?: string;
|
|
452
|
+
/** A supplemental `description`. It can be used to help break up and organize information. You can, for example, display this information as a tooltip or as an additional section that is collapsed by default. */
|
|
453
|
+
additionalInfo?: string | null;
|
|
454
|
+
/**
|
|
455
|
+
* Algorithms may have the following types:
|
|
456
|
+
* * `RELATED_ITEMS` - This type of algorithm provides recommendations based on 1 or more other provided items. For example, when an item is added to a cart, the algorithm can suggest other items frequently bought together with that item.
|
|
457
|
+
* * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
|
|
458
|
+
*/
|
|
459
|
+
algorithmType?: AlgorithmType;
|
|
460
|
+
/** Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project. */
|
|
461
|
+
algorithmId?: string | null;
|
|
462
|
+
}
|
|
463
|
+
declare enum AlgorithmType {
|
|
464
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
465
|
+
RELATED_ITEMS = "RELATED_ITEMS",
|
|
466
|
+
GLOBAL = "GLOBAL"
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* this message is not directly used by any service,
|
|
470
|
+
* it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
|
|
471
|
+
* e.g. SPIs, event-handlers, etc..
|
|
472
|
+
* NOTE: this context object MUST be provided as the last argument in each Velo method signature.
|
|
473
|
+
*
|
|
474
|
+
* Example:
|
|
475
|
+
* ```typescript
|
|
476
|
+
* export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
|
|
477
|
+
* ...
|
|
478
|
+
* }
|
|
479
|
+
* ```
|
|
480
|
+
*/
|
|
481
|
+
interface Context$6 {
|
|
482
|
+
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
483
|
+
requestId?: string | null;
|
|
484
|
+
/** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code. */
|
|
485
|
+
currency?: string | null;
|
|
486
|
+
/** An object that describes the identity that triggered this request. */
|
|
487
|
+
identity?: IdentificationData$6;
|
|
488
|
+
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
489
|
+
languages?: string[];
|
|
490
|
+
/** The service provider app's instance ID. */
|
|
491
|
+
instanceId?: string | null;
|
|
492
|
+
}
|
|
493
|
+
declare enum IdentityType$6 {
|
|
494
|
+
UNKNOWN = "UNKNOWN",
|
|
495
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
496
|
+
MEMBER = "MEMBER",
|
|
497
|
+
WIX_USER = "WIX_USER",
|
|
498
|
+
APP = "APP"
|
|
499
|
+
}
|
|
500
|
+
interface IdentificationData$6 extends IdentificationDataIdOneOf$6 {
|
|
501
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
502
|
+
anonymousVisitorId?: string;
|
|
503
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
504
|
+
memberId?: string;
|
|
505
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
506
|
+
wixUserId?: string;
|
|
507
|
+
/** ID of an app. */
|
|
508
|
+
appId?: string;
|
|
509
|
+
/** @readonly */
|
|
510
|
+
identityType?: IdentityType$6;
|
|
511
|
+
}
|
|
512
|
+
/** @oneof */
|
|
513
|
+
interface IdentificationDataIdOneOf$6 {
|
|
514
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
515
|
+
anonymousVisitorId?: string;
|
|
516
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
517
|
+
memberId?: string;
|
|
518
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
519
|
+
wixUserId?: string;
|
|
520
|
+
/** ID of an app. */
|
|
521
|
+
appId?: string;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
declare class AlgorithmNotSupportedWixError extends Error {
|
|
525
|
+
/** @hidden */
|
|
526
|
+
httpCode: number;
|
|
527
|
+
/** @hidden */
|
|
528
|
+
statusCode: string;
|
|
529
|
+
/** @hidden */
|
|
530
|
+
applicationCode: string;
|
|
531
|
+
/** @hidden */
|
|
532
|
+
name: string;
|
|
533
|
+
/** @hidden */
|
|
534
|
+
errorSchemaName: string;
|
|
535
|
+
data: RecommendationAlgorithmNotSupported;
|
|
536
|
+
constructor(data: RecommendationAlgorithmNotSupported);
|
|
537
|
+
/** @hidden */
|
|
538
|
+
static readonly __type = "wix_spi_error";
|
|
539
|
+
}
|
|
540
|
+
declare class ItemAppIdNotSupportedWixError extends Error {
|
|
541
|
+
/** @hidden */
|
|
542
|
+
httpCode: number;
|
|
543
|
+
/** @hidden */
|
|
544
|
+
statusCode: string;
|
|
545
|
+
/** @hidden */
|
|
546
|
+
applicationCode: string;
|
|
547
|
+
/** @hidden */
|
|
548
|
+
name: string;
|
|
549
|
+
/** @hidden */
|
|
550
|
+
errorSchemaName: string;
|
|
551
|
+
data: ItemAppIdNotSupportedError;
|
|
552
|
+
constructor(data: ItemAppIdNotSupportedError);
|
|
553
|
+
/** @hidden */
|
|
554
|
+
static readonly __type = "wix_spi_error";
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
type ServicePluginMethodInput$d = {
|
|
558
|
+
request: any;
|
|
559
|
+
metadata: any;
|
|
560
|
+
};
|
|
561
|
+
type ServicePluginContract$d = Record<string, (payload: ServicePluginMethodInput$d) => unknown | Promise<unknown>>;
|
|
562
|
+
type ServicePluginMethodMetadata$d = {
|
|
563
|
+
name: string;
|
|
564
|
+
primaryHttpMappingPath: string;
|
|
565
|
+
transformations: {
|
|
566
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$d;
|
|
567
|
+
toREST: (...args: unknown[]) => unknown;
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
type ServicePluginDefinition$d<Contract extends ServicePluginContract$d> = {
|
|
571
|
+
__type: 'service-plugin-definition';
|
|
572
|
+
componentType: string;
|
|
573
|
+
methods: ServicePluginMethodMetadata$d[];
|
|
574
|
+
__contract: Contract;
|
|
575
|
+
};
|
|
576
|
+
declare function ServicePluginDefinition$d<Contract extends ServicePluginContract$d>(componentType: string, methods: ServicePluginMethodMetadata$d[]): ServicePluginDefinition$d<Contract>;
|
|
577
|
+
|
|
578
|
+
declare global {
|
|
579
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
580
|
+
interface SymbolConstructor {
|
|
581
|
+
readonly observable: symbol;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
declare global {
|
|
586
|
+
interface ContextualClient {
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
interface GetRecommendationsEnvelope {
|
|
591
|
+
request: GetRecommendationsRequest;
|
|
592
|
+
metadata: Context$6;
|
|
593
|
+
}
|
|
594
|
+
declare const provideHandlers$d: ServicePluginDefinition$d<{
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* Returns lists of items recommended by each requested algorithm.
|
|
598
|
+
*
|
|
599
|
+
* If the algorithm's type is `RELATED_ITEMS` then the `items` field is required in the request, and the response will contain items related to those submitted.
|
|
600
|
+
* How the related items are selected based on the requested items depends on the algorithm. Some examples include items related by category or those frequently bought or watched together. */
|
|
601
|
+
getRecommendations(payload: GetRecommendationsEnvelope): GetRecommendationsResponse | Promise<GetRecommendationsResponse>;
|
|
602
|
+
}>;
|
|
603
|
+
|
|
324
604
|
type ServicePluginMethodInput$c = {
|
|
325
605
|
request: any;
|
|
326
606
|
metadata: any;
|
|
@@ -355,32 +635,21 @@ declare function createServicePluginModule$6<T extends ServicePluginDefinition$c
|
|
|
355
635
|
type _publicProvideHandlersType$6 = typeof provideHandlers$d;
|
|
356
636
|
declare const provideHandlers$c: ReturnType<typeof createServicePluginModule$6<_publicProvideHandlersType>>;
|
|
357
637
|
|
|
358
|
-
type context$
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
type context$
|
|
365
|
-
type context$
|
|
366
|
-
type context$
|
|
367
|
-
declare const context$
|
|
368
|
-
type context$
|
|
369
|
-
|
|
370
|
-
type context$
|
|
371
|
-
declare const context$6_GiftCardNotFoundWixError: typeof GiftCardNotFoundWixError;
|
|
372
|
-
type context$6_GiftCardProviderConfig = GiftCardProviderConfig;
|
|
373
|
-
type context$6_GiftCardProviderEntity = GiftCardProviderEntity;
|
|
374
|
-
type context$6_InsufficientFundsWixError = InsufficientFundsWixError;
|
|
375
|
-
declare const context$6_InsufficientFundsWixError: typeof InsufficientFundsWixError;
|
|
376
|
-
type context$6_RedeemRequest = RedeemRequest;
|
|
377
|
-
type context$6_RedeemResponse = RedeemResponse;
|
|
378
|
-
type context$6_TransactionNotFoundWixError = TransactionNotFoundWixError;
|
|
379
|
-
declare const context$6_TransactionNotFoundWixError: typeof TransactionNotFoundWixError;
|
|
380
|
-
type context$6_VoidRequest = VoidRequest;
|
|
381
|
-
type context$6_VoidResponse = VoidResponse;
|
|
638
|
+
type context$6_AlgorithmConfig = AlgorithmConfig;
|
|
639
|
+
type context$6_AlgorithmNotSupportedWixError = AlgorithmNotSupportedWixError;
|
|
640
|
+
declare const context$6_AlgorithmNotSupportedWixError: typeof AlgorithmNotSupportedWixError;
|
|
641
|
+
type context$6_AlgorithmType = AlgorithmType;
|
|
642
|
+
declare const context$6_AlgorithmType: typeof AlgorithmType;
|
|
643
|
+
type context$6_GetRecommendationsRequest = GetRecommendationsRequest;
|
|
644
|
+
type context$6_GetRecommendationsResponse = GetRecommendationsResponse;
|
|
645
|
+
type context$6_ItemAppIdNotSupportedError = ItemAppIdNotSupportedError;
|
|
646
|
+
type context$6_ItemAppIdNotSupportedWixError = ItemAppIdNotSupportedWixError;
|
|
647
|
+
declare const context$6_ItemAppIdNotSupportedWixError: typeof ItemAppIdNotSupportedWixError;
|
|
648
|
+
type context$6_RecommendationAlgorithmNotSupported = RecommendationAlgorithmNotSupported;
|
|
649
|
+
type context$6_RecommendationForAlgorithm = RecommendationForAlgorithm;
|
|
650
|
+
type context$6_RecommendationsProviderConfig = RecommendationsProviderConfig;
|
|
382
651
|
declare namespace context$6 {
|
|
383
|
-
export { context$
|
|
652
|
+
export { type context$6_AlgorithmConfig as AlgorithmConfig, context$6_AlgorithmNotSupportedWixError as AlgorithmNotSupportedWixError, context$6_AlgorithmType as AlgorithmType, type CatalogReference$6 as CatalogReference, type Context$6 as Context, type context$6_GetRecommendationsRequest as GetRecommendationsRequest, type context$6_GetRecommendationsResponse as GetRecommendationsResponse, type IdentificationData$6 as IdentificationData, type IdentificationDataIdOneOf$6 as IdentificationDataIdOneOf, IdentityType$6 as IdentityType, type context$6_ItemAppIdNotSupportedError as ItemAppIdNotSupportedError, context$6_ItemAppIdNotSupportedWixError as ItemAppIdNotSupportedWixError, type context$6_RecommendationAlgorithmNotSupported as RecommendationAlgorithmNotSupported, type context$6_RecommendationForAlgorithm as RecommendationForAlgorithm, type context$6_RecommendationsProviderConfig as RecommendationsProviderConfig, type _publicProvideHandlersType$6 as _publicProvideHandlersType, provideHandlers$c as provideHandlers, provideHandlers$d as publicProvideHandlers };
|
|
384
653
|
}
|
|
385
654
|
|
|
386
655
|
interface GetShippingRatesRequest {
|
|
@@ -5913,4 +6182,4 @@ declare namespace context {
|
|
|
5913
6182
|
export { type context_Address as Address, type context_AddressLocation as AddressLocation, type context_AddressWithContact as AddressWithContact, type context_AppliedDiscount as AppliedDiscount, type context_AppliedDiscountDiscountSourceOneOf as AppliedDiscountDiscountSourceOneOf, type context_BuyerDetails as BuyerDetails, type context_CatalogReference as CatalogReference, context_CheckoutStage as CheckoutStage, type context_Context as Context, type context_Coupon as Coupon, type context_CustomField as CustomField, type context_CustomFields as CustomFields, type context_Description as Description, type context_DiscountRule as DiscountRule, type context_DiscountRuleName as DiscountRuleName, context_DiscountType as DiscountType, type context_ExtendedFields as ExtendedFields, type context_ExternalReference as ExternalReference, type context_FullAddressContactDetails as FullAddressContactDetails, type context_GetValidationViolationsRequest as GetValidationViolationsRequest, type context_GetValidationViolationsResponse as GetValidationViolationsResponse, type context_GiftCard as GiftCard, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentityType as IdentityType, type context_ItemTaxFullDetails as ItemTaxFullDetails, type context_ItemType as ItemType, context_ItemTypeItemType as ItemTypeItemType, type context_ItemTypeItemTypeDataOneOf as ItemTypeItemTypeDataOneOf, context_JurisdictionType as JurisdictionType, type context_LineItem as LineItem, type context_LineItemPricesData as LineItemPricesData, type context_MerchantDiscount as MerchantDiscount, type context_MultiCurrencyPrice as MultiCurrencyPrice, context_NameInLineItem as NameInLineItem, context_NameInOther as NameInOther, type context_Other as Other, type context_PhysicalProperties as PhysicalProperties, type context_PriceSummary as PriceSummary, type context_ProductName as ProductName, type context_SelectedCarrierServiceOption as SelectedCarrierServiceOption, type context_SelectedCarrierServiceOptionPrices as SelectedCarrierServiceOptionPrices, context_Severity as Severity, type context_ShippingInfo as ShippingInfo, context_Source as Source, type context_SourceInfo as SourceInfo, type context_Stage as Stage, type context_StageStagesOneOf as StageStagesOneOf, type context_StreetAddress as StreetAddress, context_SubscriptionFrequency as SubscriptionFrequency, type context_SubscriptionOptionInfo as SubscriptionOptionInfo, type context_SubscriptionSettings as SubscriptionSettings, type context_Target as Target, type context_TargetLineItem as TargetLineItem, type context_TargetTargetTypeOneOf as TargetTargetTypeOneOf, type context_TaxBreakdown as TaxBreakdown, type context_Title as Title, type context_ValidationInfo as ValidationInfo, type context_ValidationsSPIConfig as ValidationsSPIConfig, type context_VatId as VatId, context_VatType as VatType, type context_Violation as Violation, context_WeightUnit as WeightUnit, type context__publicProvideHandlersType as _publicProvideHandlersType, context_provideHandlers as provideHandlers, provideHandlers$1 as publicProvideHandlers };
|
|
5914
6183
|
}
|
|
5915
6184
|
|
|
5916
|
-
export { context$4 as additionalFees, context$3 as customTriggers, context$2 as discounts, context$
|
|
6185
|
+
export { context$4 as additionalFees, context$3 as customTriggers, context$2 as discounts, context$7 as giftVouchersProvider, context$1 as paymentSettings, context$6 as recommendationsProvider, context$5 as shippingRates, context as validations };
|