@wix/ecom 1.0.763 → 1.0.765
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/context.js +1 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/service-plugins-context.d.ts +1 -0
- package/build/cjs/service-plugins-context.js +3 -1
- package/build/cjs/service-plugins-context.js.map +1 -0
- package/build/cjs/service-plugins.d.ts +1 -0
- package/build/cjs/service-plugins.js +3 -1
- package/build/cjs/service-plugins.js.map +1 -0
- 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 +37 -36
- package/type-bundles/context.bundle.d.ts +11744 -412
- package/type-bundles/index.bundle.d.ts +11744 -412
- package/type-bundles/service-plugins-context.bundle.d.ts +730 -56
- package/type-bundles/service-plugins.bundle.d.ts +732 -58
|
@@ -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,27 +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 = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
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<Contract extends ServicePluginContract> = {
|
|
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<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
281
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
280
|
+
declare function ServicePluginDefinition$f<Contract extends ServicePluginContract$f>(componentType: string, methods: ServicePluginMethodMetadata$f[]): ServicePluginDefinition$f<Contract>;
|
|
282
281
|
|
|
283
282
|
declare global {
|
|
284
283
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -287,19 +286,24 @@ declare global {
|
|
|
287
286
|
}
|
|
288
287
|
}
|
|
289
288
|
|
|
289
|
+
declare global {
|
|
290
|
+
interface ContextualClient {
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
290
294
|
interface GetBalanceEnvelope {
|
|
291
295
|
request: GetBalanceRequest;
|
|
292
|
-
metadata: Context$
|
|
296
|
+
metadata: Context$7;
|
|
293
297
|
}
|
|
294
298
|
interface RedeemEnvelope {
|
|
295
299
|
request: RedeemRequest;
|
|
296
|
-
metadata: Context$
|
|
300
|
+
metadata: Context$7;
|
|
297
301
|
}
|
|
298
302
|
interface _voidEnvelope {
|
|
299
303
|
request: VoidRequest;
|
|
300
|
-
metadata: Context$
|
|
304
|
+
metadata: Context$7;
|
|
301
305
|
}
|
|
302
|
-
declare const provideHandlers$
|
|
306
|
+
declare const provideHandlers$f: ServicePluginDefinition$f<{
|
|
303
307
|
/**
|
|
304
308
|
*
|
|
305
309
|
* This method retrieves gift card data from your app.
|
|
@@ -317,37 +321,335 @@ declare const provideHandlers$d: ServicePluginDefinition<{
|
|
|
317
321
|
_void(payload: _voidEnvelope): VoidResponse | Promise<VoidResponse>;
|
|
318
322
|
}>;
|
|
319
323
|
|
|
320
|
-
|
|
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
|
+
|
|
604
|
+
type ServicePluginMethodInput$c = {
|
|
605
|
+
request: any;
|
|
606
|
+
metadata: any;
|
|
607
|
+
};
|
|
608
|
+
type ServicePluginContract$c = Record<string, (payload: ServicePluginMethodInput$c) => unknown | Promise<unknown>>;
|
|
609
|
+
type ServicePluginMethodMetadata$c = {
|
|
610
|
+
name: string;
|
|
611
|
+
primaryHttpMappingPath: string;
|
|
612
|
+
transformations: {
|
|
613
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$c;
|
|
614
|
+
toREST: (...args: unknown[]) => unknown;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
type ServicePluginDefinition$c<Contract extends ServicePluginContract$c> = {
|
|
618
|
+
__type: 'service-plugin-definition';
|
|
619
|
+
componentType: string;
|
|
620
|
+
methods: ServicePluginMethodMetadata$c[];
|
|
621
|
+
__contract: Contract;
|
|
622
|
+
};
|
|
623
|
+
declare function ServicePluginDefinition$c<Contract extends ServicePluginContract$c>(componentType: string, methods: ServicePluginMethodMetadata$c[]): ServicePluginDefinition$c<Contract>;
|
|
624
|
+
type BuildServicePluginDefinition$6<T extends ServicePluginDefinition$c<any>> = (implementation: T['__contract']) => void;
|
|
625
|
+
|
|
626
|
+
declare global {
|
|
627
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
628
|
+
interface SymbolConstructor {
|
|
629
|
+
readonly observable: symbol;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
declare function createServicePluginModule$6<T extends ServicePluginDefinition$c<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$6<T> & T;
|
|
321
634
|
|
|
322
635
|
type _publicProvideHandlersType$6 = typeof provideHandlers$d;
|
|
323
636
|
declare const provideHandlers$c: ReturnType<typeof createServicePluginModule$6<_publicProvideHandlersType>>;
|
|
324
637
|
|
|
325
|
-
type context$
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
type context$
|
|
332
|
-
type context$
|
|
333
|
-
type context$
|
|
334
|
-
declare const context$
|
|
335
|
-
type context$
|
|
336
|
-
|
|
337
|
-
type context$
|
|
338
|
-
declare const context$6_GiftCardNotFoundWixError: typeof GiftCardNotFoundWixError;
|
|
339
|
-
type context$6_GiftCardProviderConfig = GiftCardProviderConfig;
|
|
340
|
-
type context$6_GiftCardProviderEntity = GiftCardProviderEntity;
|
|
341
|
-
type context$6_InsufficientFundsWixError = InsufficientFundsWixError;
|
|
342
|
-
declare const context$6_InsufficientFundsWixError: typeof InsufficientFundsWixError;
|
|
343
|
-
type context$6_RedeemRequest = RedeemRequest;
|
|
344
|
-
type context$6_RedeemResponse = RedeemResponse;
|
|
345
|
-
type context$6_TransactionNotFoundWixError = TransactionNotFoundWixError;
|
|
346
|
-
declare const context$6_TransactionNotFoundWixError: typeof TransactionNotFoundWixError;
|
|
347
|
-
type context$6_VoidRequest = VoidRequest;
|
|
348
|
-
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;
|
|
349
651
|
declare namespace context$6 {
|
|
350
|
-
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 };
|
|
351
653
|
}
|
|
352
654
|
|
|
353
655
|
interface GetShippingRatesRequest {
|
|
@@ -891,11 +1193,44 @@ declare class GenericShippingRatesWixError extends Error {
|
|
|
891
1193
|
static readonly __type = "wix_spi_error";
|
|
892
1194
|
}
|
|
893
1195
|
|
|
1196
|
+
type ServicePluginMethodInput$b = {
|
|
1197
|
+
request: any;
|
|
1198
|
+
metadata: any;
|
|
1199
|
+
};
|
|
1200
|
+
type ServicePluginContract$b = Record<string, (payload: ServicePluginMethodInput$b) => unknown | Promise<unknown>>;
|
|
1201
|
+
type ServicePluginMethodMetadata$b = {
|
|
1202
|
+
name: string;
|
|
1203
|
+
primaryHttpMappingPath: string;
|
|
1204
|
+
transformations: {
|
|
1205
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$b;
|
|
1206
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
type ServicePluginDefinition$b<Contract extends ServicePluginContract$b> = {
|
|
1210
|
+
__type: 'service-plugin-definition';
|
|
1211
|
+
componentType: string;
|
|
1212
|
+
methods: ServicePluginMethodMetadata$b[];
|
|
1213
|
+
__contract: Contract;
|
|
1214
|
+
};
|
|
1215
|
+
declare function ServicePluginDefinition$b<Contract extends ServicePluginContract$b>(componentType: string, methods: ServicePluginMethodMetadata$b[]): ServicePluginDefinition$b<Contract>;
|
|
1216
|
+
|
|
1217
|
+
declare global {
|
|
1218
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1219
|
+
interface SymbolConstructor {
|
|
1220
|
+
readonly observable: symbol;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
declare global {
|
|
1225
|
+
interface ContextualClient {
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
|
|
894
1229
|
interface GetShippingRatesEnvelope {
|
|
895
1230
|
request: GetShippingRatesRequest;
|
|
896
1231
|
metadata: Context$5;
|
|
897
1232
|
}
|
|
898
|
-
declare const provideHandlers$b: ServicePluginDefinition<{
|
|
1233
|
+
declare const provideHandlers$b: ServicePluginDefinition$b<{
|
|
899
1234
|
/**
|
|
900
1235
|
*
|
|
901
1236
|
* This method retrieves applicable shipping rates for a delivery from your app.
|
|
@@ -904,7 +1239,36 @@ declare const provideHandlers$b: ServicePluginDefinition<{
|
|
|
904
1239
|
getShippingRates(payload: GetShippingRatesEnvelope): GetShippingRatesResponse | Promise<GetShippingRatesResponse>;
|
|
905
1240
|
}>;
|
|
906
1241
|
|
|
907
|
-
|
|
1242
|
+
type ServicePluginMethodInput$a = {
|
|
1243
|
+
request: any;
|
|
1244
|
+
metadata: any;
|
|
1245
|
+
};
|
|
1246
|
+
type ServicePluginContract$a = Record<string, (payload: ServicePluginMethodInput$a) => unknown | Promise<unknown>>;
|
|
1247
|
+
type ServicePluginMethodMetadata$a = {
|
|
1248
|
+
name: string;
|
|
1249
|
+
primaryHttpMappingPath: string;
|
|
1250
|
+
transformations: {
|
|
1251
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$a;
|
|
1252
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
type ServicePluginDefinition$a<Contract extends ServicePluginContract$a> = {
|
|
1256
|
+
__type: 'service-plugin-definition';
|
|
1257
|
+
componentType: string;
|
|
1258
|
+
methods: ServicePluginMethodMetadata$a[];
|
|
1259
|
+
__contract: Contract;
|
|
1260
|
+
};
|
|
1261
|
+
declare function ServicePluginDefinition$a<Contract extends ServicePluginContract$a>(componentType: string, methods: ServicePluginMethodMetadata$a[]): ServicePluginDefinition$a<Contract>;
|
|
1262
|
+
type BuildServicePluginDefinition$5<T extends ServicePluginDefinition$a<any>> = (implementation: T['__contract']) => void;
|
|
1263
|
+
|
|
1264
|
+
declare global {
|
|
1265
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1266
|
+
interface SymbolConstructor {
|
|
1267
|
+
readonly observable: symbol;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
declare function createServicePluginModule$5<T extends ServicePluginDefinition$a<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$5<T> & T;
|
|
908
1272
|
|
|
909
1273
|
type _publicProvideHandlersType$5 = typeof provideHandlers$b;
|
|
910
1274
|
declare const provideHandlers$a: ReturnType<typeof createServicePluginModule$5<_publicProvideHandlersType>>;
|
|
@@ -1321,11 +1685,44 @@ interface IdentificationDataIdOneOf$4 {
|
|
|
1321
1685
|
appId?: string;
|
|
1322
1686
|
}
|
|
1323
1687
|
|
|
1688
|
+
type ServicePluginMethodInput$9 = {
|
|
1689
|
+
request: any;
|
|
1690
|
+
metadata: any;
|
|
1691
|
+
};
|
|
1692
|
+
type ServicePluginContract$9 = Record<string, (payload: ServicePluginMethodInput$9) => unknown | Promise<unknown>>;
|
|
1693
|
+
type ServicePluginMethodMetadata$9 = {
|
|
1694
|
+
name: string;
|
|
1695
|
+
primaryHttpMappingPath: string;
|
|
1696
|
+
transformations: {
|
|
1697
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$9;
|
|
1698
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1699
|
+
};
|
|
1700
|
+
};
|
|
1701
|
+
type ServicePluginDefinition$9<Contract extends ServicePluginContract$9> = {
|
|
1702
|
+
__type: 'service-plugin-definition';
|
|
1703
|
+
componentType: string;
|
|
1704
|
+
methods: ServicePluginMethodMetadata$9[];
|
|
1705
|
+
__contract: Contract;
|
|
1706
|
+
};
|
|
1707
|
+
declare function ServicePluginDefinition$9<Contract extends ServicePluginContract$9>(componentType: string, methods: ServicePluginMethodMetadata$9[]): ServicePluginDefinition$9<Contract>;
|
|
1708
|
+
|
|
1709
|
+
declare global {
|
|
1710
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1711
|
+
interface SymbolConstructor {
|
|
1712
|
+
readonly observable: symbol;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
declare global {
|
|
1717
|
+
interface ContextualClient {
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1324
1721
|
interface CalculateAdditionalFeesEnvelope {
|
|
1325
1722
|
request: CalculateAdditionalFeesRequest;
|
|
1326
1723
|
metadata: Context$4;
|
|
1327
1724
|
}
|
|
1328
|
-
declare const provideHandlers$9: ServicePluginDefinition<{
|
|
1725
|
+
declare const provideHandlers$9: ServicePluginDefinition$9<{
|
|
1329
1726
|
/**
|
|
1330
1727
|
*
|
|
1331
1728
|
* This method retrieves additional fees calculated by your app.
|
|
@@ -1337,7 +1734,36 @@ declare const provideHandlers$9: ServicePluginDefinition<{
|
|
|
1337
1734
|
calculateAdditionalFees(payload: CalculateAdditionalFeesEnvelope): CalculateAdditionalFeesResponse | Promise<CalculateAdditionalFeesResponse>;
|
|
1338
1735
|
}>;
|
|
1339
1736
|
|
|
1340
|
-
|
|
1737
|
+
type ServicePluginMethodInput$8 = {
|
|
1738
|
+
request: any;
|
|
1739
|
+
metadata: any;
|
|
1740
|
+
};
|
|
1741
|
+
type ServicePluginContract$8 = Record<string, (payload: ServicePluginMethodInput$8) => unknown | Promise<unknown>>;
|
|
1742
|
+
type ServicePluginMethodMetadata$8 = {
|
|
1743
|
+
name: string;
|
|
1744
|
+
primaryHttpMappingPath: string;
|
|
1745
|
+
transformations: {
|
|
1746
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$8;
|
|
1747
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1748
|
+
};
|
|
1749
|
+
};
|
|
1750
|
+
type ServicePluginDefinition$8<Contract extends ServicePluginContract$8> = {
|
|
1751
|
+
__type: 'service-plugin-definition';
|
|
1752
|
+
componentType: string;
|
|
1753
|
+
methods: ServicePluginMethodMetadata$8[];
|
|
1754
|
+
__contract: Contract;
|
|
1755
|
+
};
|
|
1756
|
+
declare function ServicePluginDefinition$8<Contract extends ServicePluginContract$8>(componentType: string, methods: ServicePluginMethodMetadata$8[]): ServicePluginDefinition$8<Contract>;
|
|
1757
|
+
type BuildServicePluginDefinition$4<T extends ServicePluginDefinition$8<any>> = (implementation: T['__contract']) => void;
|
|
1758
|
+
|
|
1759
|
+
declare global {
|
|
1760
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1761
|
+
interface SymbolConstructor {
|
|
1762
|
+
readonly observable: symbol;
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
declare function createServicePluginModule$4<T extends ServicePluginDefinition$8<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$4<T> & T;
|
|
1341
1767
|
|
|
1342
1768
|
type _publicProvideHandlersType$4 = typeof provideHandlers$9;
|
|
1343
1769
|
declare const provideHandlers$8: ReturnType<typeof createServicePluginModule$4<_publicProvideHandlersType>>;
|
|
@@ -1488,6 +1914,39 @@ interface IdentificationDataIdOneOf$3 {
|
|
|
1488
1914
|
appId?: string;
|
|
1489
1915
|
}
|
|
1490
1916
|
|
|
1917
|
+
type ServicePluginMethodInput$7 = {
|
|
1918
|
+
request: any;
|
|
1919
|
+
metadata: any;
|
|
1920
|
+
};
|
|
1921
|
+
type ServicePluginContract$7 = Record<string, (payload: ServicePluginMethodInput$7) => unknown | Promise<unknown>>;
|
|
1922
|
+
type ServicePluginMethodMetadata$7 = {
|
|
1923
|
+
name: string;
|
|
1924
|
+
primaryHttpMappingPath: string;
|
|
1925
|
+
transformations: {
|
|
1926
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$7;
|
|
1927
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1928
|
+
};
|
|
1929
|
+
};
|
|
1930
|
+
type ServicePluginDefinition$7<Contract extends ServicePluginContract$7> = {
|
|
1931
|
+
__type: 'service-plugin-definition';
|
|
1932
|
+
componentType: string;
|
|
1933
|
+
methods: ServicePluginMethodMetadata$7[];
|
|
1934
|
+
__contract: Contract;
|
|
1935
|
+
};
|
|
1936
|
+
declare function ServicePluginDefinition$7<Contract extends ServicePluginContract$7>(componentType: string, methods: ServicePluginMethodMetadata$7[]): ServicePluginDefinition$7<Contract>;
|
|
1937
|
+
|
|
1938
|
+
declare global {
|
|
1939
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1940
|
+
interface SymbolConstructor {
|
|
1941
|
+
readonly observable: symbol;
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
declare global {
|
|
1946
|
+
interface ContextualClient {
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1491
1950
|
interface ListTriggersEnvelope {
|
|
1492
1951
|
request: ListTriggersRequest;
|
|
1493
1952
|
metadata: Context$3;
|
|
@@ -1496,7 +1955,7 @@ interface GetEligibleTriggersEnvelope {
|
|
|
1496
1955
|
request: GetEligibleTriggersRequest;
|
|
1497
1956
|
metadata: Context$3;
|
|
1498
1957
|
}
|
|
1499
|
-
declare const provideHandlers$7: ServicePluginDefinition<{
|
|
1958
|
+
declare const provideHandlers$7: ServicePluginDefinition$7<{
|
|
1500
1959
|
/**
|
|
1501
1960
|
*
|
|
1502
1961
|
* Lists all custom triggers provided by your service plugin integration.
|
|
@@ -1512,7 +1971,36 @@ declare const provideHandlers$7: ServicePluginDefinition<{
|
|
|
1512
1971
|
getEligibleTriggers(payload: GetEligibleTriggersEnvelope): GetEligibleTriggersResponse | Promise<GetEligibleTriggersResponse>;
|
|
1513
1972
|
}>;
|
|
1514
1973
|
|
|
1515
|
-
|
|
1974
|
+
type ServicePluginMethodInput$6 = {
|
|
1975
|
+
request: any;
|
|
1976
|
+
metadata: any;
|
|
1977
|
+
};
|
|
1978
|
+
type ServicePluginContract$6 = Record<string, (payload: ServicePluginMethodInput$6) => unknown | Promise<unknown>>;
|
|
1979
|
+
type ServicePluginMethodMetadata$6 = {
|
|
1980
|
+
name: string;
|
|
1981
|
+
primaryHttpMappingPath: string;
|
|
1982
|
+
transformations: {
|
|
1983
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$6;
|
|
1984
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
type ServicePluginDefinition$6<Contract extends ServicePluginContract$6> = {
|
|
1988
|
+
__type: 'service-plugin-definition';
|
|
1989
|
+
componentType: string;
|
|
1990
|
+
methods: ServicePluginMethodMetadata$6[];
|
|
1991
|
+
__contract: Contract;
|
|
1992
|
+
};
|
|
1993
|
+
declare function ServicePluginDefinition$6<Contract extends ServicePluginContract$6>(componentType: string, methods: ServicePluginMethodMetadata$6[]): ServicePluginDefinition$6<Contract>;
|
|
1994
|
+
type BuildServicePluginDefinition$3<T extends ServicePluginDefinition$6<any>> = (implementation: T['__contract']) => void;
|
|
1995
|
+
|
|
1996
|
+
declare global {
|
|
1997
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1998
|
+
interface SymbolConstructor {
|
|
1999
|
+
readonly observable: symbol;
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
declare function createServicePluginModule$3<T extends ServicePluginDefinition$6<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$3<T> & T;
|
|
1516
2004
|
|
|
1517
2005
|
type _publicProvideHandlersType$3 = typeof provideHandlers$7;
|
|
1518
2006
|
declare const provideHandlers$6: ReturnType<typeof createServicePluginModule$3<_publicProvideHandlersType>>;
|
|
@@ -1811,11 +2299,44 @@ declare class CouponDoesNotExistWixError extends Error {
|
|
|
1811
2299
|
static readonly __type = "wix_spi_error";
|
|
1812
2300
|
}
|
|
1813
2301
|
|
|
2302
|
+
type ServicePluginMethodInput$5 = {
|
|
2303
|
+
request: any;
|
|
2304
|
+
metadata: any;
|
|
2305
|
+
};
|
|
2306
|
+
type ServicePluginContract$5 = Record<string, (payload: ServicePluginMethodInput$5) => unknown | Promise<unknown>>;
|
|
2307
|
+
type ServicePluginMethodMetadata$5 = {
|
|
2308
|
+
name: string;
|
|
2309
|
+
primaryHttpMappingPath: string;
|
|
2310
|
+
transformations: {
|
|
2311
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$5;
|
|
2312
|
+
toREST: (...args: unknown[]) => unknown;
|
|
2313
|
+
};
|
|
2314
|
+
};
|
|
2315
|
+
type ServicePluginDefinition$5<Contract extends ServicePluginContract$5> = {
|
|
2316
|
+
__type: 'service-plugin-definition';
|
|
2317
|
+
componentType: string;
|
|
2318
|
+
methods: ServicePluginMethodMetadata$5[];
|
|
2319
|
+
__contract: Contract;
|
|
2320
|
+
};
|
|
2321
|
+
declare function ServicePluginDefinition$5<Contract extends ServicePluginContract$5>(componentType: string, methods: ServicePluginMethodMetadata$5[]): ServicePluginDefinition$5<Contract>;
|
|
2322
|
+
|
|
2323
|
+
declare global {
|
|
2324
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2325
|
+
interface SymbolConstructor {
|
|
2326
|
+
readonly observable: symbol;
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
declare global {
|
|
2331
|
+
interface ContextualClient {
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
|
|
1814
2335
|
interface GetEligibleDiscountsEnvelope {
|
|
1815
2336
|
request: GetEligibleDiscountsRequest;
|
|
1816
2337
|
metadata: Context$2;
|
|
1817
2338
|
}
|
|
1818
|
-
declare const provideHandlers$5: ServicePluginDefinition<{
|
|
2339
|
+
declare const provideHandlers$5: ServicePluginDefinition$5<{
|
|
1819
2340
|
/**
|
|
1820
2341
|
*
|
|
1821
2342
|
* Wix calls this method when certain actions are performed on the cart or checkout.
|
|
@@ -1823,7 +2344,36 @@ declare const provideHandlers$5: ServicePluginDefinition<{
|
|
|
1823
2344
|
getEligibleDiscounts(payload: GetEligibleDiscountsEnvelope): GetEligibleDiscountsResponse | Promise<GetEligibleDiscountsResponse>;
|
|
1824
2345
|
}>;
|
|
1825
2346
|
|
|
1826
|
-
|
|
2347
|
+
type ServicePluginMethodInput$4 = {
|
|
2348
|
+
request: any;
|
|
2349
|
+
metadata: any;
|
|
2350
|
+
};
|
|
2351
|
+
type ServicePluginContract$4 = Record<string, (payload: ServicePluginMethodInput$4) => unknown | Promise<unknown>>;
|
|
2352
|
+
type ServicePluginMethodMetadata$4 = {
|
|
2353
|
+
name: string;
|
|
2354
|
+
primaryHttpMappingPath: string;
|
|
2355
|
+
transformations: {
|
|
2356
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$4;
|
|
2357
|
+
toREST: (...args: unknown[]) => unknown;
|
|
2358
|
+
};
|
|
2359
|
+
};
|
|
2360
|
+
type ServicePluginDefinition$4<Contract extends ServicePluginContract$4> = {
|
|
2361
|
+
__type: 'service-plugin-definition';
|
|
2362
|
+
componentType: string;
|
|
2363
|
+
methods: ServicePluginMethodMetadata$4[];
|
|
2364
|
+
__contract: Contract;
|
|
2365
|
+
};
|
|
2366
|
+
declare function ServicePluginDefinition$4<Contract extends ServicePluginContract$4>(componentType: string, methods: ServicePluginMethodMetadata$4[]): ServicePluginDefinition$4<Contract>;
|
|
2367
|
+
type BuildServicePluginDefinition$2<T extends ServicePluginDefinition$4<any>> = (implementation: T['__contract']) => void;
|
|
2368
|
+
|
|
2369
|
+
declare global {
|
|
2370
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2371
|
+
interface SymbolConstructor {
|
|
2372
|
+
readonly observable: symbol;
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
declare function createServicePluginModule$2<T extends ServicePluginDefinition$4<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$2<T> & T;
|
|
1827
2377
|
|
|
1828
2378
|
type _publicProvideHandlersType$2 = typeof provideHandlers$5;
|
|
1829
2379
|
declare const provideHandlers$4: ReturnType<typeof createServicePluginModule$2<_publicProvideHandlersType>>;
|
|
@@ -4551,6 +5101,39 @@ interface IdentificationDataIdOneOf$1 {
|
|
|
4551
5101
|
appId?: string;
|
|
4552
5102
|
}
|
|
4553
5103
|
|
|
5104
|
+
type ServicePluginMethodInput$3 = {
|
|
5105
|
+
request: any;
|
|
5106
|
+
metadata: any;
|
|
5107
|
+
};
|
|
5108
|
+
type ServicePluginContract$3 = Record<string, (payload: ServicePluginMethodInput$3) => unknown | Promise<unknown>>;
|
|
5109
|
+
type ServicePluginMethodMetadata$3 = {
|
|
5110
|
+
name: string;
|
|
5111
|
+
primaryHttpMappingPath: string;
|
|
5112
|
+
transformations: {
|
|
5113
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$3;
|
|
5114
|
+
toREST: (...args: unknown[]) => unknown;
|
|
5115
|
+
};
|
|
5116
|
+
};
|
|
5117
|
+
type ServicePluginDefinition$3<Contract extends ServicePluginContract$3> = {
|
|
5118
|
+
__type: 'service-plugin-definition';
|
|
5119
|
+
componentType: string;
|
|
5120
|
+
methods: ServicePluginMethodMetadata$3[];
|
|
5121
|
+
__contract: Contract;
|
|
5122
|
+
};
|
|
5123
|
+
declare function ServicePluginDefinition$3<Contract extends ServicePluginContract$3>(componentType: string, methods: ServicePluginMethodMetadata$3[]): ServicePluginDefinition$3<Contract>;
|
|
5124
|
+
|
|
5125
|
+
declare global {
|
|
5126
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5127
|
+
interface SymbolConstructor {
|
|
5128
|
+
readonly observable: symbol;
|
|
5129
|
+
}
|
|
5130
|
+
}
|
|
5131
|
+
|
|
5132
|
+
declare global {
|
|
5133
|
+
interface ContextualClient {
|
|
5134
|
+
}
|
|
5135
|
+
}
|
|
5136
|
+
|
|
4554
5137
|
interface GetPaymentSettingsEnvelope {
|
|
4555
5138
|
request: GetPaymentSettingsRequest;
|
|
4556
5139
|
metadata: Context$1;
|
|
@@ -4559,7 +5142,7 @@ interface GetPaymentSettingsForCheckoutEnvelope {
|
|
|
4559
5142
|
request: GetPaymentSettingsForCheckoutRequest;
|
|
4560
5143
|
metadata: Context$1;
|
|
4561
5144
|
}
|
|
4562
|
-
declare const provideHandlers$3: ServicePluginDefinition<{
|
|
5145
|
+
declare const provideHandlers$3: ServicePluginDefinition$3<{
|
|
4563
5146
|
/**
|
|
4564
5147
|
*
|
|
4565
5148
|
* This method retrieves payment settings from your app.
|
|
@@ -4572,7 +5155,36 @@ declare const provideHandlers$3: ServicePluginDefinition<{
|
|
|
4572
5155
|
getPaymentSettingsForCheckout(payload: GetPaymentSettingsForCheckoutEnvelope): GetPaymentSettingsForCheckoutResponse | Promise<GetPaymentSettingsForCheckoutResponse>;
|
|
4573
5156
|
}>;
|
|
4574
5157
|
|
|
4575
|
-
|
|
5158
|
+
type ServicePluginMethodInput$2 = {
|
|
5159
|
+
request: any;
|
|
5160
|
+
metadata: any;
|
|
5161
|
+
};
|
|
5162
|
+
type ServicePluginContract$2 = Record<string, (payload: ServicePluginMethodInput$2) => unknown | Promise<unknown>>;
|
|
5163
|
+
type ServicePluginMethodMetadata$2 = {
|
|
5164
|
+
name: string;
|
|
5165
|
+
primaryHttpMappingPath: string;
|
|
5166
|
+
transformations: {
|
|
5167
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$2;
|
|
5168
|
+
toREST: (...args: unknown[]) => unknown;
|
|
5169
|
+
};
|
|
5170
|
+
};
|
|
5171
|
+
type ServicePluginDefinition$2<Contract extends ServicePluginContract$2> = {
|
|
5172
|
+
__type: 'service-plugin-definition';
|
|
5173
|
+
componentType: string;
|
|
5174
|
+
methods: ServicePluginMethodMetadata$2[];
|
|
5175
|
+
__contract: Contract;
|
|
5176
|
+
};
|
|
5177
|
+
declare function ServicePluginDefinition$2<Contract extends ServicePluginContract$2>(componentType: string, methods: ServicePluginMethodMetadata$2[]): ServicePluginDefinition$2<Contract>;
|
|
5178
|
+
type BuildServicePluginDefinition$1<T extends ServicePluginDefinition$2<any>> = (implementation: T['__contract']) => void;
|
|
5179
|
+
|
|
5180
|
+
declare global {
|
|
5181
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5182
|
+
interface SymbolConstructor {
|
|
5183
|
+
readonly observable: symbol;
|
|
5184
|
+
}
|
|
5185
|
+
}
|
|
5186
|
+
|
|
5187
|
+
declare function createServicePluginModule$1<T extends ServicePluginDefinition$2<any>>(servicePluginDefinition: T): BuildServicePluginDefinition$1<T> & T;
|
|
4576
5188
|
|
|
4577
5189
|
type _publicProvideHandlersType$1 = typeof provideHandlers$3;
|
|
4578
5190
|
declare const provideHandlers$2: ReturnType<typeof createServicePluginModule$1<_publicProvideHandlersType>>;
|
|
@@ -5406,11 +6018,44 @@ interface IdentificationDataIdOneOf {
|
|
|
5406
6018
|
appId?: string;
|
|
5407
6019
|
}
|
|
5408
6020
|
|
|
6021
|
+
type ServicePluginMethodInput$1 = {
|
|
6022
|
+
request: any;
|
|
6023
|
+
metadata: any;
|
|
6024
|
+
};
|
|
6025
|
+
type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
|
|
6026
|
+
type ServicePluginMethodMetadata$1 = {
|
|
6027
|
+
name: string;
|
|
6028
|
+
primaryHttpMappingPath: string;
|
|
6029
|
+
transformations: {
|
|
6030
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
|
|
6031
|
+
toREST: (...args: unknown[]) => unknown;
|
|
6032
|
+
};
|
|
6033
|
+
};
|
|
6034
|
+
type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
|
|
6035
|
+
__type: 'service-plugin-definition';
|
|
6036
|
+
componentType: string;
|
|
6037
|
+
methods: ServicePluginMethodMetadata$1[];
|
|
6038
|
+
__contract: Contract;
|
|
6039
|
+
};
|
|
6040
|
+
declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
|
|
6041
|
+
|
|
6042
|
+
declare global {
|
|
6043
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
6044
|
+
interface SymbolConstructor {
|
|
6045
|
+
readonly observable: symbol;
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
declare global {
|
|
6050
|
+
interface ContextualClient {
|
|
6051
|
+
}
|
|
6052
|
+
}
|
|
6053
|
+
|
|
5409
6054
|
interface GetValidationViolationsEnvelope {
|
|
5410
6055
|
request: GetValidationViolationsRequest;
|
|
5411
6056
|
metadata: Context;
|
|
5412
6057
|
}
|
|
5413
|
-
declare const provideHandlers$1: ServicePluginDefinition<{
|
|
6058
|
+
declare const provideHandlers$1: ServicePluginDefinition$1<{
|
|
5414
6059
|
/**
|
|
5415
6060
|
*
|
|
5416
6061
|
* This method retrieves validation violations from your app.
|
|
@@ -5422,6 +6067,35 @@ declare const provideHandlers$1: ServicePluginDefinition<{
|
|
|
5422
6067
|
getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
|
|
5423
6068
|
}>;
|
|
5424
6069
|
|
|
6070
|
+
type ServicePluginMethodInput = {
|
|
6071
|
+
request: any;
|
|
6072
|
+
metadata: any;
|
|
6073
|
+
};
|
|
6074
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
6075
|
+
type ServicePluginMethodMetadata = {
|
|
6076
|
+
name: string;
|
|
6077
|
+
primaryHttpMappingPath: string;
|
|
6078
|
+
transformations: {
|
|
6079
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
6080
|
+
toREST: (...args: unknown[]) => unknown;
|
|
6081
|
+
};
|
|
6082
|
+
};
|
|
6083
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
6084
|
+
__type: 'service-plugin-definition';
|
|
6085
|
+
componentType: string;
|
|
6086
|
+
methods: ServicePluginMethodMetadata[];
|
|
6087
|
+
__contract: Contract;
|
|
6088
|
+
};
|
|
6089
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
6090
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
6091
|
+
|
|
6092
|
+
declare global {
|
|
6093
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
6094
|
+
interface SymbolConstructor {
|
|
6095
|
+
readonly observable: symbol;
|
|
6096
|
+
}
|
|
6097
|
+
}
|
|
6098
|
+
|
|
5425
6099
|
declare function createServicePluginModule<T extends ServicePluginDefinition<any>>(servicePluginDefinition: T): BuildServicePluginDefinition<T> & T;
|
|
5426
6100
|
|
|
5427
6101
|
type _publicProvideHandlersType = typeof provideHandlers$1;
|
|
@@ -5508,4 +6182,4 @@ declare namespace context {
|
|
|
5508
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 };
|
|
5509
6183
|
}
|
|
5510
6184
|
|
|
5511
|
-
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 };
|