@wix/auto_sdk_ecom_catalog 1.0.18 → 1.0.20
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/src/service-plugins-types.d.ts → index.d.mts} +100 -57
- package/build/{internal/cjs/src/service-plugins-types.d.ts → index.d.ts} +100 -57
- package/build/index.js +161 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +128 -0
- package/build/index.mjs.map +1 -0
- package/build/{es/src/service-plugins-types.d.ts → internal/index.d.mts} +100 -57
- package/build/internal/{es/src/service-plugins-types.d.ts → index.d.ts} +100 -57
- package/build/internal/index.js +161 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +128 -0
- package/build/internal/index.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -2
- package/build/cjs/index.js +0 -19
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -29
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.d.ts +0 -5
- package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -9
- package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
- package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
- package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -49
- package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
- package/build/cjs/src/service-plugins-types.js +0 -77
- package/build/cjs/src/service-plugins-types.js.map +0 -1
- package/build/es/index.d.ts +0 -2
- package/build/es/index.js +0 -3
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -29
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/interfaces-ecommerce-v1-catalog-provider.context.d.ts +0 -5
- package/build/es/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -6
- package/build/es/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
- package/build/es/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
- package/build/es/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -46
- package/build/es/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
- package/build/es/src/service-plugins-types.js +0 -74
- package/build/es/src/service-plugins-types.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -2
- package/build/internal/cjs/index.js +0 -19
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -29
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.d.ts +0 -5
- package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -9
- package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
- package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
- package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -49
- package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
- package/build/internal/cjs/src/service-plugins-types.js +0 -77
- package/build/internal/cjs/src/service-plugins-types.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -2
- package/build/internal/es/index.js +0 -3
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -29
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.context.d.ts +0 -5
- package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -6
- package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
- package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
- package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -46
- package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
- package/build/internal/es/src/service-plugins-types.js +0 -74
- package/build/internal/es/src/service-plugins-types.js.map +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { ServicePluginDefinition, BuildServicePluginDefinition } from '@wix/sdk-types';
|
|
2
|
+
|
|
3
|
+
interface GetCatalogItemsRequest {
|
|
2
4
|
/**
|
|
3
5
|
* Catalog reference details for the items to retrieve, including quantity of each item.
|
|
4
6
|
* @minSize 1
|
|
@@ -19,14 +21,14 @@ export interface GetCatalogItemsRequest {
|
|
|
19
21
|
*/
|
|
20
22
|
currency?: string;
|
|
21
23
|
}
|
|
22
|
-
|
|
24
|
+
interface CatalogReferenceAndQuantity {
|
|
23
25
|
/** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */
|
|
24
26
|
catalogReference?: CatalogReference;
|
|
25
27
|
/** Item quantity. */
|
|
26
28
|
quantity?: number;
|
|
27
29
|
}
|
|
28
30
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
29
|
-
|
|
31
|
+
interface CatalogReference {
|
|
30
32
|
/**
|
|
31
33
|
* ID of the item within the catalog it belongs to.
|
|
32
34
|
* @minLength 1
|
|
@@ -52,7 +54,7 @@ export interface CatalogReference {
|
|
|
52
54
|
*/
|
|
53
55
|
options?: Record<string, any> | null;
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
declare enum WeightUnit {
|
|
56
58
|
/** Weight unit can't be classified due to an error. */
|
|
57
59
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
58
60
|
/** Kilograms. */
|
|
@@ -61,7 +63,7 @@ export declare enum WeightUnit {
|
|
|
61
63
|
LB = "LB"
|
|
62
64
|
}
|
|
63
65
|
/** Buyer Info */
|
|
64
|
-
|
|
66
|
+
interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
65
67
|
/**
|
|
66
68
|
* Visitor ID - if the buyer is **not** a site member.
|
|
67
69
|
* @format GUID
|
|
@@ -92,7 +94,7 @@ export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
|
92
94
|
email?: string | null;
|
|
93
95
|
}
|
|
94
96
|
/** @oneof */
|
|
95
|
-
|
|
97
|
+
interface BuyerInfoIdOneOf {
|
|
96
98
|
/**
|
|
97
99
|
* Visitor ID - if the buyer is **not** a site member.
|
|
98
100
|
* @format GUID
|
|
@@ -112,20 +114,20 @@ export interface BuyerInfoIdOneOf {
|
|
|
112
114
|
*/
|
|
113
115
|
userId?: string;
|
|
114
116
|
}
|
|
115
|
-
|
|
117
|
+
interface GetCatalogItemsResponse {
|
|
116
118
|
/**
|
|
117
119
|
* Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.
|
|
118
120
|
* If none of the requested items exist in the catalog, this array must be empty.
|
|
119
121
|
*/
|
|
120
122
|
catalogItems?: Item[];
|
|
121
123
|
}
|
|
122
|
-
|
|
124
|
+
interface Item {
|
|
123
125
|
/** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */
|
|
124
126
|
catalogReference?: CatalogReference;
|
|
125
127
|
/** Item data. Contains full details about the item. */
|
|
126
128
|
data?: ItemData;
|
|
127
129
|
}
|
|
128
|
-
|
|
130
|
+
interface ItemData {
|
|
129
131
|
/** __Required.__ Item name. */
|
|
130
132
|
productName?: ProductName;
|
|
131
133
|
/**
|
|
@@ -250,8 +252,13 @@ export interface ItemData {
|
|
|
250
252
|
* Default: `false`
|
|
251
253
|
*/
|
|
252
254
|
membersOnly?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Modifier groups that were added to the item.
|
|
257
|
+
* @maxSize 25
|
|
258
|
+
*/
|
|
259
|
+
modifierGroups?: ModifierGroup[];
|
|
253
260
|
}
|
|
254
|
-
|
|
261
|
+
interface ProductName {
|
|
255
262
|
/**
|
|
256
263
|
* __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
257
264
|
*
|
|
@@ -272,27 +279,27 @@ export interface ProductName {
|
|
|
272
279
|
*/
|
|
273
280
|
translated?: string | null;
|
|
274
281
|
}
|
|
275
|
-
|
|
282
|
+
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
276
283
|
/** Preset item type. */
|
|
277
284
|
preset?: ItemTypeItemType;
|
|
278
285
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
279
286
|
custom?: string;
|
|
280
287
|
}
|
|
281
288
|
/** @oneof */
|
|
282
|
-
|
|
289
|
+
interface ItemTypeItemTypeDataOneOf {
|
|
283
290
|
/** Preset item type. */
|
|
284
291
|
preset?: ItemTypeItemType;
|
|
285
292
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
286
293
|
custom?: string;
|
|
287
294
|
}
|
|
288
|
-
|
|
295
|
+
declare enum ItemTypeItemType {
|
|
289
296
|
UNRECOGNISED = "UNRECOGNISED",
|
|
290
297
|
PHYSICAL = "PHYSICAL",
|
|
291
298
|
DIGITAL = "DIGITAL",
|
|
292
299
|
GIFT_CARD = "GIFT_CARD",
|
|
293
300
|
SERVICE = "SERVICE"
|
|
294
301
|
}
|
|
295
|
-
|
|
302
|
+
interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
296
303
|
/** Description line plain text value. */
|
|
297
304
|
plainText?: PlainTextValue;
|
|
298
305
|
/** Description line color value. */
|
|
@@ -301,16 +308,16 @@ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionL
|
|
|
301
308
|
name?: DescriptionLineName;
|
|
302
309
|
}
|
|
303
310
|
/** @oneof */
|
|
304
|
-
|
|
311
|
+
interface DescriptionLineValueOneOf {
|
|
305
312
|
/** Description line plain text value. */
|
|
306
313
|
plainText?: PlainTextValue;
|
|
307
314
|
/** Description line color value. */
|
|
308
315
|
colorInfo?: Color;
|
|
309
316
|
}
|
|
310
317
|
/** @oneof */
|
|
311
|
-
|
|
318
|
+
interface DescriptionLineDescriptionLineValueOneOf {
|
|
312
319
|
}
|
|
313
|
-
|
|
320
|
+
interface DescriptionLineName {
|
|
314
321
|
/**
|
|
315
322
|
* Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
316
323
|
* @maxLength 100
|
|
@@ -324,7 +331,7 @@ export interface DescriptionLineName {
|
|
|
324
331
|
*/
|
|
325
332
|
translated?: string | null;
|
|
326
333
|
}
|
|
327
|
-
|
|
334
|
+
interface PlainTextValue {
|
|
328
335
|
/**
|
|
329
336
|
* Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
330
337
|
* @maxLength 600
|
|
@@ -338,7 +345,7 @@ export interface PlainTextValue {
|
|
|
338
345
|
*/
|
|
339
346
|
translated?: string | null;
|
|
340
347
|
}
|
|
341
|
-
|
|
348
|
+
interface Color {
|
|
342
349
|
/**
|
|
343
350
|
* Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
344
351
|
* @maxLength 500
|
|
@@ -354,7 +361,7 @@ export interface Color {
|
|
|
354
361
|
/** HEX or RGB color code for display. */
|
|
355
362
|
code?: string | null;
|
|
356
363
|
}
|
|
357
|
-
|
|
364
|
+
declare enum DescriptionLineType {
|
|
358
365
|
/** Unrecognized type. */
|
|
359
366
|
UNRECOGNISED = "UNRECOGNISED",
|
|
360
367
|
/** Plain text type. */
|
|
@@ -362,7 +369,7 @@ export declare enum DescriptionLineType {
|
|
|
362
369
|
/** Color type. */
|
|
363
370
|
COLOR = "COLOR"
|
|
364
371
|
}
|
|
365
|
-
|
|
372
|
+
interface PhysicalProperties {
|
|
366
373
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
367
374
|
weight?: number | null;
|
|
368
375
|
/**
|
|
@@ -373,19 +380,19 @@ export interface PhysicalProperties {
|
|
|
373
380
|
/** Whether this line item is shippable. */
|
|
374
381
|
shippable?: boolean;
|
|
375
382
|
}
|
|
376
|
-
|
|
383
|
+
interface Scope {
|
|
377
384
|
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
378
385
|
namespace?: string;
|
|
379
386
|
/** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
|
|
380
387
|
group?: Group;
|
|
381
388
|
}
|
|
382
|
-
|
|
389
|
+
interface Group {
|
|
383
390
|
/** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
384
391
|
name?: string;
|
|
385
392
|
/** Item ID (when the coupon scope is limited to just one item). */
|
|
386
393
|
entityId?: string | null;
|
|
387
394
|
}
|
|
388
|
-
|
|
395
|
+
interface SubscriptionOptionInfo {
|
|
389
396
|
/** Subscription option settings. */
|
|
390
397
|
subscriptionSettings?: SubscriptionSettings;
|
|
391
398
|
/** Subscription option title. */
|
|
@@ -393,7 +400,7 @@ export interface SubscriptionOptionInfo {
|
|
|
393
400
|
/** Subscription option description. */
|
|
394
401
|
description?: Description;
|
|
395
402
|
}
|
|
396
|
-
|
|
403
|
+
interface SubscriptionSettings {
|
|
397
404
|
/** Frequency of recurring payment. */
|
|
398
405
|
frequency?: SubscriptionFrequency;
|
|
399
406
|
/**
|
|
@@ -421,14 +428,14 @@ export interface SubscriptionSettings {
|
|
|
421
428
|
freeTrialPeriod?: FreeTrialPeriod;
|
|
422
429
|
}
|
|
423
430
|
/** Frequency unit of recurring payment */
|
|
424
|
-
|
|
431
|
+
declare enum SubscriptionFrequency {
|
|
425
432
|
UNDEFINED = "UNDEFINED",
|
|
426
433
|
DAY = "DAY",
|
|
427
434
|
WEEK = "WEEK",
|
|
428
435
|
MONTH = "MONTH",
|
|
429
436
|
YEAR = "YEAR"
|
|
430
437
|
}
|
|
431
|
-
|
|
438
|
+
interface FreeTrialPeriod {
|
|
432
439
|
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
433
440
|
frequency?: SubscriptionFrequency;
|
|
434
441
|
/**
|
|
@@ -438,7 +445,7 @@ export interface FreeTrialPeriod {
|
|
|
438
445
|
*/
|
|
439
446
|
interval?: number;
|
|
440
447
|
}
|
|
441
|
-
|
|
448
|
+
interface Title {
|
|
442
449
|
/**
|
|
443
450
|
* Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
444
451
|
* @minLength 1
|
|
@@ -454,7 +461,7 @@ export interface Title {
|
|
|
454
461
|
*/
|
|
455
462
|
translated?: string | null;
|
|
456
463
|
}
|
|
457
|
-
|
|
464
|
+
interface Description {
|
|
458
465
|
/**
|
|
459
466
|
* Subscription option description.
|
|
460
467
|
* @maxLength 500
|
|
@@ -466,7 +473,7 @@ export interface Description {
|
|
|
466
473
|
*/
|
|
467
474
|
translated?: string | null;
|
|
468
475
|
}
|
|
469
|
-
|
|
476
|
+
interface SecuredMedia {
|
|
470
477
|
/**
|
|
471
478
|
* Media ID in Wix Media Manager.
|
|
472
479
|
* @minLength 1
|
|
@@ -482,7 +489,7 @@ export interface SecuredMedia {
|
|
|
482
489
|
/** File type. */
|
|
483
490
|
fileType?: FileType;
|
|
484
491
|
}
|
|
485
|
-
|
|
492
|
+
declare enum FileType {
|
|
486
493
|
UNSPECIFIED = "UNSPECIFIED",
|
|
487
494
|
SECURE_PICTURE = "SECURE_PICTURE",
|
|
488
495
|
SECURE_VIDEO = "SECURE_VIDEO",
|
|
@@ -491,7 +498,7 @@ export declare enum FileType {
|
|
|
491
498
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
492
499
|
}
|
|
493
500
|
/** Type of selected payment option for catalog item */
|
|
494
|
-
|
|
501
|
+
declare enum PaymentOptionType {
|
|
495
502
|
/** The entire payment for this item happens as part of the checkout. */
|
|
496
503
|
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
497
504
|
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
@@ -503,7 +510,7 @@ export declare enum PaymentOptionType {
|
|
|
503
510
|
/** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
|
|
504
511
|
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
505
512
|
}
|
|
506
|
-
|
|
513
|
+
interface ServiceProperties {
|
|
507
514
|
/**
|
|
508
515
|
* Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
509
516
|
* For example, the start time of a class.
|
|
@@ -516,7 +523,7 @@ export interface ServiceProperties {
|
|
|
516
523
|
*/
|
|
517
524
|
numberOfParticipants?: number | null;
|
|
518
525
|
}
|
|
519
|
-
|
|
526
|
+
interface PriceDescription {
|
|
520
527
|
/**
|
|
521
528
|
* __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
522
529
|
* @minLength 1
|
|
@@ -532,22 +539,22 @@ export interface PriceDescription {
|
|
|
532
539
|
*/
|
|
533
540
|
translated?: string | null;
|
|
534
541
|
}
|
|
535
|
-
|
|
542
|
+
interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
536
543
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
537
544
|
addressType?: TaxableAddressType;
|
|
538
545
|
}
|
|
539
546
|
/** @oneof */
|
|
540
|
-
|
|
547
|
+
interface TaxableAddressTaxableAddressDataOneOf {
|
|
541
548
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
542
549
|
addressType?: TaxableAddressType;
|
|
543
550
|
}
|
|
544
|
-
|
|
551
|
+
declare enum TaxableAddressType {
|
|
545
552
|
UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
|
|
546
553
|
BUSINESS = "BUSINESS",
|
|
547
554
|
BILLING = "BILLING",
|
|
548
555
|
SHIPPING = "SHIPPING"
|
|
549
556
|
}
|
|
550
|
-
|
|
557
|
+
interface Policy {
|
|
551
558
|
/**
|
|
552
559
|
* Policy title - should be translated
|
|
553
560
|
* @minLength 1
|
|
@@ -561,7 +568,7 @@ export interface Policy {
|
|
|
561
568
|
*/
|
|
562
569
|
content?: string;
|
|
563
570
|
}
|
|
564
|
-
|
|
571
|
+
interface AdditionalFee {
|
|
565
572
|
/**
|
|
566
573
|
* Additional fee's unique code or ID.
|
|
567
574
|
* @minLength 1
|
|
@@ -589,7 +596,7 @@ export interface AdditionalFee {
|
|
|
589
596
|
taxDetails?: TaxDetails;
|
|
590
597
|
}
|
|
591
598
|
/** Tax details. */
|
|
592
|
-
|
|
599
|
+
interface TaxDetails {
|
|
593
600
|
/** Whether additional fee is taxable. */
|
|
594
601
|
taxable?: boolean;
|
|
595
602
|
/**
|
|
@@ -598,7 +605,7 @@ export interface TaxDetails {
|
|
|
598
605
|
*/
|
|
599
606
|
taxGroupId?: string | null;
|
|
600
607
|
}
|
|
601
|
-
|
|
608
|
+
interface ModifierGroup {
|
|
602
609
|
/**
|
|
603
610
|
* Modifier group id.
|
|
604
611
|
* @minLength 1
|
|
@@ -610,11 +617,11 @@ export interface ModifierGroup {
|
|
|
610
617
|
/**
|
|
611
618
|
* List of modifiers in this group.
|
|
612
619
|
* @minSize 1
|
|
613
|
-
* @maxSize
|
|
620
|
+
* @maxSize 25
|
|
614
621
|
*/
|
|
615
622
|
modifiers?: ItemModifier[];
|
|
616
623
|
}
|
|
617
|
-
|
|
624
|
+
interface TranslatableString {
|
|
618
625
|
/**
|
|
619
626
|
* __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
620
627
|
*
|
|
@@ -635,7 +642,7 @@ export interface TranslatableString {
|
|
|
635
642
|
*/
|
|
636
643
|
translated?: string | null;
|
|
637
644
|
}
|
|
638
|
-
|
|
645
|
+
interface ItemModifier {
|
|
639
646
|
/**
|
|
640
647
|
* Modifier ID.
|
|
641
648
|
* @minLength 1
|
|
@@ -658,7 +665,7 @@ export interface ItemModifier {
|
|
|
658
665
|
*/
|
|
659
666
|
price?: string | null;
|
|
660
667
|
}
|
|
661
|
-
|
|
668
|
+
interface QueryCatalogItemsRequest {
|
|
662
669
|
/**
|
|
663
670
|
* A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.
|
|
664
671
|
* @minLength 1
|
|
@@ -680,19 +687,19 @@ export interface QueryCatalogItemsRequest {
|
|
|
680
687
|
*/
|
|
681
688
|
lastNumericId?: string | null;
|
|
682
689
|
}
|
|
683
|
-
|
|
690
|
+
interface Paging {
|
|
684
691
|
/** Number of items to load. */
|
|
685
692
|
limit?: number | null;
|
|
686
693
|
/** Number of items to skip in the current sort order. */
|
|
687
694
|
offset?: number | null;
|
|
688
695
|
}
|
|
689
|
-
|
|
696
|
+
interface QueryCatalogItemsResponse {
|
|
690
697
|
/** Catalog info and item data. */
|
|
691
698
|
catalogItems?: BasicItem[];
|
|
692
699
|
/** Paging metadata. */
|
|
693
700
|
metadata?: PagingMetadata;
|
|
694
701
|
}
|
|
695
|
-
|
|
702
|
+
interface BasicItem {
|
|
696
703
|
/**
|
|
697
704
|
* The ID of the item.
|
|
698
705
|
* @minLength 1
|
|
@@ -713,13 +720,13 @@ export interface BasicItem {
|
|
|
713
720
|
*/
|
|
714
721
|
numericId?: string | null;
|
|
715
722
|
}
|
|
716
|
-
|
|
723
|
+
interface NumericPropertyRange {
|
|
717
724
|
/** Minimum value. */
|
|
718
725
|
minValue?: number;
|
|
719
726
|
/** Maximum value. */
|
|
720
727
|
maxValue?: number;
|
|
721
728
|
}
|
|
722
|
-
|
|
729
|
+
interface PagingMetadata {
|
|
723
730
|
/** Number of items returned in the response. */
|
|
724
731
|
count?: number | null;
|
|
725
732
|
/** Offset that was requested. */
|
|
@@ -729,7 +736,7 @@ export interface PagingMetadata {
|
|
|
729
736
|
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
730
737
|
tooManyToCount?: boolean | null;
|
|
731
738
|
}
|
|
732
|
-
|
|
739
|
+
interface CatalogSPIConfig {
|
|
733
740
|
/** Base URI which Wix eCommerce will call to access Catalog service plugin endpoints. For example, to call the Get Catalog Items endpoint at `https://my-external-catalog.com/get-catalog-items`, the base URI you provide here is `https://my-external-catalog.com`. */
|
|
734
741
|
deploymentUri?: string;
|
|
735
742
|
/** Configuration details for discounts applied to all items in the catalog. */
|
|
@@ -738,7 +745,7 @@ export interface CatalogSPIConfig {
|
|
|
738
745
|
specificItemsDiscount?: SpecificItemsDiscountConfig;
|
|
739
746
|
}
|
|
740
747
|
/** Configuration for all items discount functionality in the catalog. */
|
|
741
|
-
|
|
748
|
+
interface AllItemsDiscountConfig {
|
|
742
749
|
/**
|
|
743
750
|
* Whether the discount is enabled.
|
|
744
751
|
*
|
|
@@ -754,7 +761,7 @@ export interface AllItemsDiscountConfig {
|
|
|
754
761
|
name?: string | null;
|
|
755
762
|
}
|
|
756
763
|
/** Configuration for discount functionality in the catalog. */
|
|
757
|
-
|
|
764
|
+
interface SpecificItemsDiscountConfig {
|
|
758
765
|
/**
|
|
759
766
|
* Whether the discount is enabled.
|
|
760
767
|
*
|
|
@@ -781,7 +788,7 @@ export interface SpecificItemsDiscountConfig {
|
|
|
781
788
|
* }
|
|
782
789
|
* ```
|
|
783
790
|
*/
|
|
784
|
-
|
|
791
|
+
interface Context {
|
|
785
792
|
/** 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. */
|
|
786
793
|
requestId?: string | null;
|
|
787
794
|
/**
|
|
@@ -799,14 +806,14 @@ export interface Context {
|
|
|
799
806
|
*/
|
|
800
807
|
instanceId?: string | null;
|
|
801
808
|
}
|
|
802
|
-
|
|
809
|
+
declare enum IdentityType {
|
|
803
810
|
UNKNOWN = "UNKNOWN",
|
|
804
811
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
805
812
|
MEMBER = "MEMBER",
|
|
806
813
|
WIX_USER = "WIX_USER",
|
|
807
814
|
APP = "APP"
|
|
808
815
|
}
|
|
809
|
-
|
|
816
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
810
817
|
/**
|
|
811
818
|
* ID of a site visitor that has not logged in to the site.
|
|
812
819
|
* @format GUID
|
|
@@ -831,7 +838,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
831
838
|
identityType?: IdentityType;
|
|
832
839
|
}
|
|
833
840
|
/** @oneof */
|
|
834
|
-
|
|
841
|
+
interface IdentificationDataIdOneOf {
|
|
835
842
|
/**
|
|
836
843
|
* ID of a site visitor that has not logged in to the site.
|
|
837
844
|
* @format GUID
|
|
@@ -853,3 +860,39 @@ export interface IdentificationDataIdOneOf {
|
|
|
853
860
|
*/
|
|
854
861
|
appId?: string;
|
|
855
862
|
}
|
|
863
|
+
|
|
864
|
+
interface GetCatalogItemsEnvelope {
|
|
865
|
+
request: GetCatalogItemsRequest;
|
|
866
|
+
metadata: Context;
|
|
867
|
+
}
|
|
868
|
+
declare const provideHandlers$1: ServicePluginDefinition<{
|
|
869
|
+
/**
|
|
870
|
+
*
|
|
871
|
+
* Retrieves data for specified items in a specified catalog.
|
|
872
|
+
*
|
|
873
|
+
* Wix calls this method whenever a cart or checkout is updated, and when an item is added to an order.
|
|
874
|
+
*
|
|
875
|
+
* The method receives a `catalogReferences` array. Each catalog reference in the array contains:
|
|
876
|
+
* + The ID of the item whose latest information Wix needs to retrieve.
|
|
877
|
+
* + The ID of the app providing the catalog containing the item.
|
|
878
|
+
* + Optional details about preferences or customization of the item.
|
|
879
|
+
*
|
|
880
|
+
* The method also receives preferences for the currency and weight unit to be used in the response.
|
|
881
|
+
*
|
|
882
|
+
* Your external catalog can store and organize item details in any way you prefer.
|
|
883
|
+
* When implementing the Catalog service plugin, learn how to handle item variants ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/catalog/handle-item-variants)) in a way that meets your needs.
|
|
884
|
+
*
|
|
885
|
+
* The method's response must contain a `catalogItems` array. Each item in the array must contain:
|
|
886
|
+
* + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.
|
|
887
|
+
* + A `data` object with full details about the item.
|
|
888
|
+
*
|
|
889
|
+
* > **Notes:**
|
|
890
|
+
* > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.
|
|
891
|
+
* > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.
|
|
892
|
+
* > + Wix calls the method every time a cart or checkout is updated. If the response doesn't include an item that was already in the cart or checkout, Wix removes the item from the cart or checkout. */
|
|
893
|
+
getCatalogItems(payload: GetCatalogItemsEnvelope): GetCatalogItemsResponse | Promise<GetCatalogItemsResponse>;
|
|
894
|
+
}>;
|
|
895
|
+
|
|
896
|
+
declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
|
|
897
|
+
|
|
898
|
+
export { type AdditionalFee, type AllItemsDiscountConfig, type BasicItem, type BuyerInfo, type BuyerInfoIdOneOf, type CatalogReference, type CatalogReferenceAndQuantity, type CatalogSPIConfig, type Color, type Context, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineValueOneOf, FileType, type FreeTrialPeriod, type GetCatalogItemsRequest, type GetCatalogItemsResponse, type Group, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type Item, type ItemData, type ItemModifier, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ModifierGroup, type NumericPropertyRange, type Paging, type PagingMetadata, PaymentOptionType, type PhysicalProperties, type PlainTextValue, type Policy, type PriceDescription, type ProductName, type QueryCatalogItemsRequest, type QueryCatalogItemsResponse, type Scope, type SecuredMedia, type ServiceProperties, type SpecificItemsDiscountConfig, SubscriptionFrequency, type SubscriptionOptionInfo, type SubscriptionSettings, type TaxDetails, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type Title, type TranslatableString, WeightUnit, provideHandlers, provideHandlers$1 as publicProvideHandlers };
|