@wix/auto_sdk_categories_categories 1.0.89 → 1.0.90
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/{categories-v1-category-categories.universal-BSVLZtNA.d.ts → categories-v1-category-categories.universal-D6LO11T_.d.ts} +158 -147
- package/build/cjs/index.d.ts +38 -42
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +70 -63
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{categories-v1-category-categories.universal-BSVLZtNA.d.mts → categories-v1-category-categories.universal-D6LO11T_.d.mts} +158 -147
- package/build/es/index.d.mts +38 -42
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -17
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +70 -63
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/{categories-v1-category-categories.universal-zp5hyouG.d.ts → categories-v1-category-categories.universal-DTJ8R-cl.d.ts} +158 -147
- package/build/internal/cjs/index.d.ts +38 -42
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -17
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +70 -63
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/{categories-v1-category-categories.universal-zp5hyouG.d.mts → categories-v1-category-categories.universal-DTJ8R-cl.d.mts} +158 -147
- package/build/internal/es/index.d.mts +38 -42
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -17
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +70 -63
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { QuerySpec, SearchSpec, Query, Search, NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A category for organizing items into a hierarchical structure.
|
|
5
|
+
*
|
|
6
|
+
* Categories can be nested to create a multi-level hierarchy. Each category belongs to a specific category tree, identified by its `treeReference`. Each Wix Stores site has one category tree.
|
|
7
|
+
*
|
|
8
|
+
* > **Note:** Currently, only Wix Stores Catalog (V3) categories are supported. Pass `appNamespace: "@wix/stores"` in the `treeReference` for all API calls.
|
|
9
|
+
*/
|
|
3
10
|
interface Category {
|
|
4
11
|
/**
|
|
5
12
|
* Category ID.
|
|
@@ -39,35 +46,42 @@ interface Category {
|
|
|
39
46
|
*/
|
|
40
47
|
image?: string;
|
|
41
48
|
/**
|
|
42
|
-
* Number of items
|
|
49
|
+
* Number of items directly assigned to this category. Doesn't include items in subcategories.
|
|
43
50
|
* @readonly
|
|
44
51
|
*/
|
|
45
52
|
itemCounter?: number;
|
|
46
53
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
54
|
+
* Plain-text category description.
|
|
55
|
+
*
|
|
56
|
+
* Returned only when you pass `"DESCRIPTION"` to the `fields` array.
|
|
49
57
|
* @minLength 1
|
|
50
58
|
* @maxLength 600
|
|
51
59
|
*/
|
|
52
60
|
description?: string | null;
|
|
53
61
|
/**
|
|
54
|
-
* Whether the category is visible to site visitors
|
|
62
|
+
* Whether the category is visible to site visitors.
|
|
63
|
+
*
|
|
64
|
+
* Visibility cascades to subcategories: if a parent category's visibility is set to `false`, all its subcategories become hidden as well.
|
|
65
|
+
* Setting a subcategory's visibility to `true` fails if any of its parent categories are hidden.
|
|
55
66
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
67
|
+
* > **Notes:**
|
|
68
|
+
* > 1. Hidden categories and their items are still accessible via API calls. For example, List Items In Category returns items even for hidden categories.
|
|
69
|
+
* > 2. The `visible` field can only be changed using the [Update Category Visibility](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/update-category-visibility) method.
|
|
70
|
+
* > 3. Default: `true`
|
|
59
71
|
* @immutable
|
|
60
72
|
*/
|
|
61
73
|
visible?: boolean | null;
|
|
62
74
|
/**
|
|
63
|
-
* Category breadcrumbs.
|
|
75
|
+
* Category breadcrumbs, representing the path from the top-level ancestor category down to the parent of the current category.
|
|
64
76
|
*
|
|
65
|
-
*
|
|
77
|
+
* Breadcrumbs are useful for building navigation UI and for SEO purposes. For top-level categories, the breadcrumbs list is empty.
|
|
78
|
+
*
|
|
79
|
+
* Returned only when you pass `"BREADCRUMBS_INFO"` to the `fields` array.
|
|
66
80
|
* @readonly
|
|
67
81
|
*/
|
|
68
82
|
breadcrumbsInfo?: BreadcrumbsInfo;
|
|
69
83
|
/**
|
|
70
|
-
*
|
|
84
|
+
* Information about the category's parent. Top-level categories don't have a parent.
|
|
71
85
|
* @immutable
|
|
72
86
|
*/
|
|
73
87
|
parentCategory?: ParentCategory;
|
|
@@ -90,9 +104,18 @@ interface Category {
|
|
|
90
104
|
*/
|
|
91
105
|
richContentDescription?: RichContent;
|
|
92
106
|
/**
|
|
93
|
-
*
|
|
107
|
+
* Reference to the category tree this category belongs to.
|
|
108
|
+
*
|
|
109
|
+
* When working with Wix Stores categories, always pass `appNamespace: "@wix/stores"` and `treeKey: null`.
|
|
110
|
+
* @readonly
|
|
111
|
+
*/
|
|
112
|
+
treeReference?: TreeReference;
|
|
113
|
+
/**
|
|
114
|
+
* ID of the app responsible for managing items in this category.
|
|
94
115
|
*
|
|
95
|
-
*
|
|
116
|
+
* When set, only the specified app can add or remove items from this category. This is useful for third-party apps that want to create categories exclusively managed by their app, preventing site owners or other apps from modifying the category's items.
|
|
117
|
+
*
|
|
118
|
+
* You can get your app's ID from the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
96
119
|
* @format GUID
|
|
97
120
|
* @immutable
|
|
98
121
|
*/
|
|
@@ -106,7 +129,7 @@ interface Category {
|
|
|
106
129
|
}
|
|
107
130
|
interface BreadcrumbsInfo {
|
|
108
131
|
/**
|
|
109
|
-
* List of
|
|
132
|
+
* List of ancestor categories from the top-level category down to the parent of the current category. The current category isn't included in the list.
|
|
110
133
|
* @readonly
|
|
111
134
|
* @maxSize 5
|
|
112
135
|
*/
|
|
@@ -114,18 +137,18 @@ interface BreadcrumbsInfo {
|
|
|
114
137
|
}
|
|
115
138
|
interface Breadcrumb {
|
|
116
139
|
/**
|
|
117
|
-
*
|
|
140
|
+
* Ancestor category ID.
|
|
118
141
|
* @format GUID
|
|
119
142
|
*/
|
|
120
143
|
categoryId?: string;
|
|
121
144
|
/**
|
|
122
|
-
*
|
|
145
|
+
* Ancestor category name.
|
|
123
146
|
* @minLength 1
|
|
124
147
|
* @maxLength 80
|
|
125
148
|
*/
|
|
126
149
|
categoryName?: string;
|
|
127
150
|
/**
|
|
128
|
-
*
|
|
151
|
+
* Ancestor category slug.
|
|
129
152
|
* @minLength 1
|
|
130
153
|
* @maxLength 100
|
|
131
154
|
*/
|
|
@@ -133,14 +156,14 @@ interface Breadcrumb {
|
|
|
133
156
|
}
|
|
134
157
|
interface ParentCategory {
|
|
135
158
|
/**
|
|
136
|
-
*
|
|
159
|
+
* ID of the parent category.
|
|
137
160
|
*
|
|
138
|
-
*
|
|
161
|
+
* Leave empty or omit to create a top-level category.
|
|
139
162
|
* @format GUID
|
|
140
163
|
*/
|
|
141
164
|
_id?: string | null;
|
|
142
165
|
/**
|
|
143
|
-
*
|
|
166
|
+
* Position of this category among its sibling categories within the parent.
|
|
144
167
|
* @readonly
|
|
145
168
|
*/
|
|
146
169
|
index?: number | null;
|
|
@@ -2087,15 +2110,17 @@ interface TextNodeStyle {
|
|
|
2087
2110
|
}
|
|
2088
2111
|
interface TreeReference {
|
|
2089
2112
|
/**
|
|
2090
|
-
* Namespace of the app
|
|
2113
|
+
* Namespace of the app whose catalog this category tree belongs to.
|
|
2091
2114
|
*
|
|
2092
|
-
*
|
|
2115
|
+
* Currently, only `"@wix/stores"` is supported.
|
|
2093
2116
|
* @minLength 4
|
|
2094
2117
|
* @maxLength 150
|
|
2095
2118
|
*/
|
|
2096
2119
|
appNamespace?: string;
|
|
2097
2120
|
/**
|
|
2098
|
-
*
|
|
2121
|
+
* Key to differentiate between multiple trees managed by the same app.
|
|
2122
|
+
*
|
|
2123
|
+
* For Wix Stores, pass `null` or omit this field, as each store has only one category tree.
|
|
2099
2124
|
* @minLength 1
|
|
2100
2125
|
* @maxLength 44
|
|
2101
2126
|
*/
|
|
@@ -2251,22 +2276,17 @@ interface ItemAddedToCategory {
|
|
|
2251
2276
|
}
|
|
2252
2277
|
interface ItemReference {
|
|
2253
2278
|
/**
|
|
2254
|
-
* ID of the item within the catalog
|
|
2279
|
+
* ID of the item within the catalog.
|
|
2255
2280
|
*
|
|
2256
|
-
* For
|
|
2281
|
+
* For Wix Stores, this is the product ID from the [Catalog V3 Products API](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/introduction).
|
|
2257
2282
|
* @minLength 1
|
|
2258
2283
|
* @maxLength 36
|
|
2259
2284
|
*/
|
|
2260
2285
|
catalogItemId?: string;
|
|
2261
2286
|
/**
|
|
2262
|
-
* ID of the app providing the catalog.
|
|
2287
|
+
* ID of the Wix app providing the catalog.
|
|
2263
2288
|
*
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2266
|
-
* For items from Wix catalogs, the following values always apply:
|
|
2267
|
-
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
2268
|
-
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
2269
|
-
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
2289
|
+
* Currently, only Wix Stores is supported. Use `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` for all Wix Stores products.
|
|
2270
2290
|
* @minLength 1
|
|
2271
2291
|
* @maxLength 36
|
|
2272
2292
|
*/
|
|
@@ -2531,13 +2551,7 @@ interface CompactCategory {
|
|
|
2531
2551
|
name?: string | null;
|
|
2532
2552
|
}
|
|
2533
2553
|
interface SearchCategoriesRequest {
|
|
2534
|
-
/**
|
|
2535
|
-
* Search criteria including filter, sort, aggregations, and paging options.
|
|
2536
|
-
*
|
|
2537
|
-
* Refer to the [supported filters & sorting table](https://dev.wix.com/docs/sdk/backend-modules/categories/categories/search-categories) (SDK)
|
|
2538
|
-
* or the [supported filters article](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting) (REST)
|
|
2539
|
-
* for a complete list of supported filters and sorting options.
|
|
2540
|
-
*/
|
|
2554
|
+
/** Search criteria including filter, sort, aggregations, and paging options. */
|
|
2541
2555
|
search?: CursorSearch;
|
|
2542
2556
|
/**
|
|
2543
2557
|
* Category tree reference details.
|
|
@@ -2562,18 +2576,10 @@ interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
|
2562
2576
|
* `filter`, `sort`, or `search` can't be specified.
|
|
2563
2577
|
*/
|
|
2564
2578
|
cursorPaging?: CursorPaging;
|
|
2565
|
-
/**
|
|
2566
|
-
* Filter object for narrowing search results. For example, to return only categories from the Stores app: `"filter": {"appNamespace": "@wix/stores"}`.
|
|
2567
|
-
*
|
|
2568
|
-
* Learn more about the filter format in the [supported filters & sorting table](https://dev.wix.com/docs/sdk/backend-modules/categories/categories/search-categories) (SDK)
|
|
2569
|
-
* or the [supported filters article](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting) (REST).
|
|
2570
|
-
*/
|
|
2579
|
+
/** Filter object for narrowing search results. */
|
|
2571
2580
|
filter?: Record<string, any> | null;
|
|
2572
2581
|
/**
|
|
2573
|
-
* Array of sort objects specifying result order.
|
|
2574
|
-
*
|
|
2575
|
-
* Learn more about the sort format in the [supported filters & sorting table](https://dev.wix.com/docs/sdk/backend-modules/categories/categories/search-categories) (SDK)
|
|
2576
|
-
* or the [supported filters article](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting) (REST).
|
|
2582
|
+
* Array of sort objects specifying result order.
|
|
2577
2583
|
* @maxSize 10
|
|
2578
2584
|
*/
|
|
2579
2585
|
sort?: Sorting[];
|
|
@@ -3182,9 +3188,7 @@ interface MoveCategoryRequest {
|
|
|
3182
3188
|
/** Category tree reference details. */
|
|
3183
3189
|
treeReference: TreeReference;
|
|
3184
3190
|
/**
|
|
3185
|
-
*
|
|
3186
|
-
*
|
|
3187
|
-
* Default: root category ID
|
|
3191
|
+
* ID of the target parent category. Leave empty or omit to move the category to the top level.
|
|
3188
3192
|
* @format GUID
|
|
3189
3193
|
*/
|
|
3190
3194
|
parentCategoryId?: string | null;
|
|
@@ -3304,10 +3308,10 @@ interface UpdateCategoryVisibilityRequest {
|
|
|
3304
3308
|
*/
|
|
3305
3309
|
categoryId: string;
|
|
3306
3310
|
/**
|
|
3307
|
-
* Whether the category is visible to site visitors
|
|
3311
|
+
* Whether the category is visible to site visitors.
|
|
3308
3312
|
*
|
|
3309
|
-
*
|
|
3310
|
-
*
|
|
3313
|
+
* Visibility cascades to subcategories: setting a parent category to `false` also hides all its subcategories.
|
|
3314
|
+
* Setting to `true` fails if any parent category is hidden.
|
|
3311
3315
|
*/
|
|
3312
3316
|
visible: boolean;
|
|
3313
3317
|
/** Category tree reference details. */
|
|
@@ -3514,7 +3518,10 @@ interface ListItemsInCategoryRequest extends ListItemsInCategoryRequestPagingMet
|
|
|
3514
3518
|
/** Category tree reference details. */
|
|
3515
3519
|
treeReference: TreeReference;
|
|
3516
3520
|
/**
|
|
3517
|
-
* Whether to use category arrangement for sorting items.
|
|
3521
|
+
* Whether to use the category's manual arrangement for sorting items.
|
|
3522
|
+
*
|
|
3523
|
+
* When `true`, manually arranged items appear first in their specified order, followed by remaining items sorted by date added (newest first).
|
|
3524
|
+
* When `false`, all items are sorted by date added (newest first).
|
|
3518
3525
|
*
|
|
3519
3526
|
* Default: `false`
|
|
3520
3527
|
*/
|
|
@@ -3522,7 +3529,7 @@ interface ListItemsInCategoryRequest extends ListItemsInCategoryRequestPagingMet
|
|
|
3522
3529
|
/**
|
|
3523
3530
|
* Whether to include items from subcategories.
|
|
3524
3531
|
*
|
|
3525
|
-
* Default: `false`
|
|
3532
|
+
* Default: `false`
|
|
3526
3533
|
*/
|
|
3527
3534
|
includeItemsFromSubcategories?: boolean;
|
|
3528
3535
|
}
|
|
@@ -3562,13 +3569,13 @@ interface ListCategoriesForItemRequest {
|
|
|
3562
3569
|
}
|
|
3563
3570
|
interface ListCategoriesForItemResponse {
|
|
3564
3571
|
/**
|
|
3565
|
-
*
|
|
3572
|
+
* IDs of categories that directly contain this item.
|
|
3566
3573
|
* @format GUID
|
|
3567
3574
|
* @maxSize 1000
|
|
3568
3575
|
*/
|
|
3569
3576
|
directCategoryIds?: string[];
|
|
3570
3577
|
/**
|
|
3571
|
-
*
|
|
3578
|
+
* IDs of all categories containing this item, including direct categories and all their ancestor categories.
|
|
3572
3579
|
* @format GUID
|
|
3573
3580
|
* @maxSize 1000
|
|
3574
3581
|
*/
|
|
@@ -3591,16 +3598,16 @@ interface ListCategoriesForItemsResponse {
|
|
|
3591
3598
|
categoriesForItems?: MapItemToCategories[];
|
|
3592
3599
|
}
|
|
3593
3600
|
interface MapItemToCategories {
|
|
3594
|
-
/** Item reference
|
|
3601
|
+
/** Item reference. */
|
|
3595
3602
|
item?: ItemReference;
|
|
3596
3603
|
/**
|
|
3597
|
-
*
|
|
3604
|
+
* IDs of categories that directly contain this item.
|
|
3598
3605
|
* @format GUID
|
|
3599
3606
|
* @maxSize 1000
|
|
3600
3607
|
*/
|
|
3601
3608
|
directCategoryIds?: string[];
|
|
3602
3609
|
/**
|
|
3603
|
-
*
|
|
3610
|
+
* IDs of ancestor categories of the item's direct categories. These categories indirectly contain the item through their subcategories.
|
|
3604
3611
|
* @format GUID
|
|
3605
3612
|
* @maxSize 1000
|
|
3606
3613
|
*/
|
|
@@ -3661,7 +3668,7 @@ interface SetArrangedItemsRequest {
|
|
|
3661
3668
|
/** Category tree reference details. */
|
|
3662
3669
|
treeReference: TreeReference;
|
|
3663
3670
|
/**
|
|
3664
|
-
* List of items
|
|
3671
|
+
* List of items in the desired order. The order in this array determines the display order when List Items In Category is called with `useCategoryArrangement: true`.
|
|
3665
3672
|
* @maxSize 100
|
|
3666
3673
|
*/
|
|
3667
3674
|
items?: ItemReference[];
|
|
@@ -4045,7 +4052,7 @@ interface CategoryMovedEnvelope {
|
|
|
4045
4052
|
metadata: EventMetadata;
|
|
4046
4053
|
}
|
|
4047
4054
|
/**
|
|
4048
|
-
* Triggered when a category is moved.
|
|
4055
|
+
* Triggered when a category is moved to a different position or parent category.
|
|
4049
4056
|
* @permissionScope Manage Stores - all permissions
|
|
4050
4057
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4051
4058
|
* @permissionScope Manage Stores
|
|
@@ -4078,7 +4085,9 @@ interface CategoryCreatedEnvelope {
|
|
|
4078
4085
|
entity: Category;
|
|
4079
4086
|
metadata: EventMetadata;
|
|
4080
4087
|
}
|
|
4081
|
-
/**
|
|
4088
|
+
/**
|
|
4089
|
+
* Triggered when a category is created.
|
|
4090
|
+
* @permissionScope Manage Stores - all permissions
|
|
4082
4091
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4083
4092
|
* @permissionScope Manage Stores
|
|
4084
4093
|
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
@@ -4109,7 +4118,9 @@ declare function onCategoryCreated(handler: (event: CategoryCreatedEnvelope) =>
|
|
|
4109
4118
|
interface CategoryDeletedEnvelope {
|
|
4110
4119
|
metadata: EventMetadata;
|
|
4111
4120
|
}
|
|
4112
|
-
/**
|
|
4121
|
+
/**
|
|
4122
|
+
* Triggered when a category is deleted.
|
|
4123
|
+
* @permissionScope Manage Stores - all permissions
|
|
4113
4124
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4114
4125
|
* @permissionScope Manage Stores
|
|
4115
4126
|
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
@@ -4210,7 +4221,7 @@ interface CategoryItemsArrangedInCategoryEnvelope {
|
|
|
4210
4221
|
metadata: EventMetadata;
|
|
4211
4222
|
}
|
|
4212
4223
|
/**
|
|
4213
|
-
* Triggered when items
|
|
4224
|
+
* Triggered when items are rearranged within a category.
|
|
4214
4225
|
* @permissionScope Manage Stores - all permissions
|
|
4215
4226
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4216
4227
|
* @permissionScope Manage Stores
|
|
@@ -4245,7 +4256,9 @@ interface CategoryUpdatedEnvelope {
|
|
|
4245
4256
|
/** @hidden */
|
|
4246
4257
|
modifiedFields: Record<string, any>;
|
|
4247
4258
|
}
|
|
4248
|
-
/**
|
|
4259
|
+
/**
|
|
4260
|
+
* Triggered when a category is updated.
|
|
4261
|
+
* @permissionScope Manage Stores - all permissions
|
|
4249
4262
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4250
4263
|
* @permissionScope Manage Stores
|
|
4251
4264
|
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
@@ -4287,7 +4300,7 @@ declare function onCategoryUpdated(handler: (event: CategoryUpdatedEnvelope) =>
|
|
|
4287
4300
|
* @returns Created category.
|
|
4288
4301
|
* @fqn com.wix.categories.api.v1.CategoriesService.CreateCategory
|
|
4289
4302
|
*/
|
|
4290
|
-
declare function createCategory(category: NonNullablePaths<Category, `name` | `parentCategory._id`, 3>, options?: NonNullablePaths<CreateCategoryOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<Category, `itemCounter` | `breadcrumbsInfo.breadcrumbs` | `breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`, 6> & {
|
|
4303
|
+
declare function createCategory(category: NonNullablePaths<Category, `name` | `parentCategory._id`, 3>, options?: NonNullablePaths<CreateCategoryOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<Category, `itemCounter` | `breadcrumbsInfo.breadcrumbs` | `breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain` | `treeReference.appNamespace`, 6> & {
|
|
4291
4304
|
__applicationErrorsType?: CreateCategoryApplicationErrors;
|
|
4292
4305
|
}>;
|
|
4293
4306
|
interface CreateCategoryOptions {
|
|
@@ -4312,7 +4325,7 @@ interface CreateCategoryOptions {
|
|
|
4312
4325
|
* @returns Category.
|
|
4313
4326
|
* @fqn com.wix.categories.api.v1.CategoriesService.GetCategory
|
|
4314
4327
|
*/
|
|
4315
|
-
declare function getCategory(categoryId: string, treeReference: NonNullablePaths<TreeReference, `appNamespace`, 2>, options?: GetCategoryOptions): Promise<NonNullablePaths<Category, `itemCounter` | `breadcrumbsInfo.breadcrumbs` | `breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`, 6>>;
|
|
4328
|
+
declare function getCategory(categoryId: string, treeReference: NonNullablePaths<TreeReference, `appNamespace`, 2>, options?: GetCategoryOptions): Promise<NonNullablePaths<Category, `itemCounter` | `breadcrumbsInfo.breadcrumbs` | `breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain` | `treeReference.appNamespace`, 6>>;
|
|
4316
4329
|
interface GetCategoryOptions {
|
|
4317
4330
|
/**
|
|
4318
4331
|
* Fields to include in the response.
|
|
@@ -4338,7 +4351,7 @@ interface GetCategoryOptions {
|
|
|
4338
4351
|
* @returns Updated category.
|
|
4339
4352
|
* @fqn com.wix.categories.api.v1.CategoriesService.UpdateCategory
|
|
4340
4353
|
*/
|
|
4341
|
-
declare function updateCategory(_id: string, category: NonNullablePaths<UpdateCategory, `revision`, 2>, options?: NonNullablePaths<UpdateCategoryOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<Category, `itemCounter` | `breadcrumbsInfo.breadcrumbs` | `breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`, 6> & {
|
|
4354
|
+
declare function updateCategory(_id: string, category: NonNullablePaths<UpdateCategory, `revision`, 2>, options?: NonNullablePaths<UpdateCategoryOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<Category, `itemCounter` | `breadcrumbsInfo.breadcrumbs` | `breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain` | `treeReference.appNamespace`, 6> & {
|
|
4342
4355
|
__applicationErrorsType?: UpdateCategoryApplicationErrors;
|
|
4343
4356
|
}>;
|
|
4344
4357
|
interface UpdateCategory {
|
|
@@ -4380,35 +4393,42 @@ interface UpdateCategory {
|
|
|
4380
4393
|
*/
|
|
4381
4394
|
image?: string;
|
|
4382
4395
|
/**
|
|
4383
|
-
* Number of items
|
|
4396
|
+
* Number of items directly assigned to this category. Doesn't include items in subcategories.
|
|
4384
4397
|
* @readonly
|
|
4385
4398
|
*/
|
|
4386
4399
|
itemCounter?: number;
|
|
4387
4400
|
/**
|
|
4388
|
-
*
|
|
4389
|
-
*
|
|
4401
|
+
* Plain-text category description.
|
|
4402
|
+
*
|
|
4403
|
+
* Returned only when you pass `"DESCRIPTION"` to the `fields` array.
|
|
4390
4404
|
* @minLength 1
|
|
4391
4405
|
* @maxLength 600
|
|
4392
4406
|
*/
|
|
4393
4407
|
description?: string | null;
|
|
4394
4408
|
/**
|
|
4395
|
-
* Whether the category is visible to site visitors
|
|
4409
|
+
* Whether the category is visible to site visitors.
|
|
4410
|
+
*
|
|
4411
|
+
* Visibility cascades to subcategories: if a parent category's visibility is set to `false`, all its subcategories become hidden as well.
|
|
4412
|
+
* Setting a subcategory's visibility to `true` fails if any of its parent categories are hidden.
|
|
4396
4413
|
*
|
|
4397
|
-
*
|
|
4398
|
-
*
|
|
4399
|
-
*
|
|
4414
|
+
* > **Notes:**
|
|
4415
|
+
* > 1. Hidden categories and their items are still accessible via API calls. For example, List Items In Category returns items even for hidden categories.
|
|
4416
|
+
* > 2. The `visible` field can only be changed using the [Update Category Visibility](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/update-category-visibility) method.
|
|
4417
|
+
* > 3. Default: `true`
|
|
4400
4418
|
* @immutable
|
|
4401
4419
|
*/
|
|
4402
4420
|
visible?: boolean | null;
|
|
4403
4421
|
/**
|
|
4404
|
-
* Category breadcrumbs.
|
|
4422
|
+
* Category breadcrumbs, representing the path from the top-level ancestor category down to the parent of the current category.
|
|
4405
4423
|
*
|
|
4406
|
-
*
|
|
4424
|
+
* Breadcrumbs are useful for building navigation UI and for SEO purposes. For top-level categories, the breadcrumbs list is empty.
|
|
4425
|
+
*
|
|
4426
|
+
* Returned only when you pass `"BREADCRUMBS_INFO"` to the `fields` array.
|
|
4407
4427
|
* @readonly
|
|
4408
4428
|
*/
|
|
4409
4429
|
breadcrumbsInfo?: BreadcrumbsInfo;
|
|
4410
4430
|
/**
|
|
4411
|
-
*
|
|
4431
|
+
* Information about the category's parent. Top-level categories don't have a parent.
|
|
4412
4432
|
* @immutable
|
|
4413
4433
|
*/
|
|
4414
4434
|
parentCategory?: ParentCategory;
|
|
@@ -4431,9 +4451,18 @@ interface UpdateCategory {
|
|
|
4431
4451
|
*/
|
|
4432
4452
|
richContentDescription?: RichContent;
|
|
4433
4453
|
/**
|
|
4434
|
-
*
|
|
4454
|
+
* Reference to the category tree this category belongs to.
|
|
4455
|
+
*
|
|
4456
|
+
* When working with Wix Stores categories, always pass `appNamespace: "@wix/stores"` and `treeKey: null`.
|
|
4457
|
+
* @readonly
|
|
4458
|
+
*/
|
|
4459
|
+
treeReference?: TreeReference;
|
|
4460
|
+
/**
|
|
4461
|
+
* ID of the app responsible for managing items in this category.
|
|
4435
4462
|
*
|
|
4436
|
-
*
|
|
4463
|
+
* When set, only the specified app can add or remove items from this category. This is useful for third-party apps that want to create categories exclusively managed by their app, preventing site owners or other apps from modifying the category's items.
|
|
4464
|
+
*
|
|
4465
|
+
* You can get your app's ID from the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
4437
4466
|
* @format GUID
|
|
4438
4467
|
* @immutable
|
|
4439
4468
|
*/
|
|
@@ -4456,6 +4485,8 @@ interface UpdateCategoryOptions {
|
|
|
4456
4485
|
}
|
|
4457
4486
|
/**
|
|
4458
4487
|
* Deletes a category.
|
|
4488
|
+
*
|
|
4489
|
+
* Deleting a category also deletes all of its subcategories. Items that were assigned to the deleted categories remain in the catalog but are no longer associated with those categories.
|
|
4459
4490
|
* @param categoryId - Category ID.
|
|
4460
4491
|
* @param treeReference - Category tree reference details.
|
|
4461
4492
|
* @public
|
|
@@ -4473,10 +4504,7 @@ declare function deleteCategory(categoryId: string, treeReference: NonNullablePa
|
|
|
4473
4504
|
* Retrieves a list of up to 1,000 categories, given the provided filtering, sorting, and cursor paging.
|
|
4474
4505
|
* Pass supported values to the `fields` array in the request to include those fields in the response.
|
|
4475
4506
|
*
|
|
4476
|
-
*
|
|
4477
|
-
* see [Categories: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting).
|
|
4478
|
-
*
|
|
4479
|
-
* To learn about working with _Query_ endpoints, see
|
|
4507
|
+
* To learn about working with _Query_ methods, see
|
|
4480
4508
|
* [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language),
|
|
4481
4509
|
* and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
4482
4510
|
*
|
|
@@ -4519,37 +4547,37 @@ interface CategoriesQueryBuilder {
|
|
|
4519
4547
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
4520
4548
|
* @param value - Value to compare against.
|
|
4521
4549
|
*/
|
|
4522
|
-
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4550
|
+
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4523
4551
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
4524
4552
|
* @param value - Value to compare against.
|
|
4525
4553
|
*/
|
|
4526
|
-
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4554
|
+
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4527
4555
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
4528
4556
|
* @param value - Value to compare against.
|
|
4529
4557
|
*/
|
|
4530
|
-
ge: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4558
|
+
ge: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4531
4559
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
4532
4560
|
* @param value - Value to compare against.
|
|
4533
4561
|
*/
|
|
4534
|
-
gt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4562
|
+
gt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4535
4563
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
4536
4564
|
* @param value - Value to compare against.
|
|
4537
4565
|
*/
|
|
4538
|
-
le: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4566
|
+
le: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4539
4567
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
4540
4568
|
* @param value - Value to compare against.
|
|
4541
4569
|
*/
|
|
4542
|
-
lt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4570
|
+
lt: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4543
4571
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
4544
4572
|
* @param string - String to compare against. Case-insensitive.
|
|
4545
4573
|
*/
|
|
4546
|
-
startsWith: (propertyName: '_id' | 'name' | 'description' | 'parentCategory.id' | 'slug' | '
|
|
4574
|
+
startsWith: (propertyName: '_id' | 'name' | 'description' | 'parentCategory.id' | 'slug' | 'managingAppId', value: string) => CategoriesQueryBuilder;
|
|
4547
4575
|
/** @param propertyName - Property whose value is compared with `values`.
|
|
4548
4576
|
* @param values - List of values to compare against.
|
|
4549
4577
|
*/
|
|
4550
|
-
hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4551
|
-
in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4552
|
-
exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | '
|
|
4578
|
+
hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any[]) => CategoriesQueryBuilder;
|
|
4579
|
+
in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: any) => CategoriesQueryBuilder;
|
|
4580
|
+
exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'visible' | 'parentCategory.id' | 'parentCategory.index' | 'slug' | 'managingAppId', value: boolean) => CategoriesQueryBuilder;
|
|
4553
4581
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
4554
4582
|
ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'name' | 'parentCategory.id' | 'parentCategory.index' | 'managingAppId'>) => CategoriesQueryBuilder;
|
|
4555
4583
|
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
@@ -4566,19 +4594,12 @@ interface CategoriesQueryBuilder {
|
|
|
4566
4594
|
* @requiredField query
|
|
4567
4595
|
* @requiredField options
|
|
4568
4596
|
*/
|
|
4569
|
-
declare function typedQueryCategories(query: CategoryQuery, options: QueryCategoriesOptions): Promise<NonNullablePaths<QueryCategoriesResponse, `categories` | `categories.${number}.itemCounter` | `categories.${number}.seoData.settings.preventAutoRedirect`, 6>>;
|
|
4597
|
+
declare function typedQueryCategories(query: CategoryQuery, options: QueryCategoriesOptions): Promise<NonNullablePaths<QueryCategoriesResponse, `categories` | `categories.${number}.itemCounter` | `categories.${number}.seoData.settings.preventAutoRedirect` | `categories.${number}.treeReference.appNamespace`, 6>>;
|
|
4570
4598
|
interface CategoryQuerySpec extends QuerySpec {
|
|
4571
4599
|
paging: 'cursor';
|
|
4572
4600
|
wql: [
|
|
4573
4601
|
{
|
|
4574
|
-
fields: [
|
|
4575
|
-
'_id',
|
|
4576
|
-
'description',
|
|
4577
|
-
'slug',
|
|
4578
|
-
'treeReference.appNamespace',
|
|
4579
|
-
'treeReference.treeKey',
|
|
4580
|
-
'visible'
|
|
4581
|
-
];
|
|
4602
|
+
fields: ['_id', 'description', 'slug', 'visible'];
|
|
4582
4603
|
operators: '*';
|
|
4583
4604
|
sort: 'NONE';
|
|
4584
4605
|
},
|
|
@@ -4671,21 +4692,13 @@ interface CategorySearchSpec extends SearchSpec {
|
|
|
4671
4692
|
'parentCategory._id',
|
|
4672
4693
|
'parentCategory.index',
|
|
4673
4694
|
'slug',
|
|
4674
|
-
'treeReference.appNamespace',
|
|
4675
|
-
'treeReference.treeKey',
|
|
4676
4695
|
'visible'
|
|
4677
4696
|
];
|
|
4678
4697
|
paging: 'cursor';
|
|
4679
4698
|
wql: [
|
|
4680
4699
|
{
|
|
4681
4700
|
operators: '*';
|
|
4682
|
-
fields: [
|
|
4683
|
-
'_id',
|
|
4684
|
-
'slug',
|
|
4685
|
-
'treeReference.appNamespace',
|
|
4686
|
-
'treeReference.treeKey',
|
|
4687
|
-
'visible'
|
|
4688
|
-
];
|
|
4701
|
+
fields: ['_id', 'slug', 'visible'];
|
|
4689
4702
|
sort: 'NONE';
|
|
4690
4703
|
},
|
|
4691
4704
|
{
|
|
@@ -4724,17 +4737,11 @@ type CategorySearch = {
|
|
|
4724
4737
|
cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
4725
4738
|
};
|
|
4726
4739
|
/**
|
|
4727
|
-
Filter object for narrowing search results.
|
|
4728
|
-
|
|
4729
|
-
Learn more about the filter format in the [supported filters & sorting table](https://dev.wix.com/docs/sdk/backend-modules/categories/categories/search-categories) (SDK)
|
|
4730
|
-
or the [supported filters article](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting) (REST).
|
|
4740
|
+
Filter object for narrowing search results.
|
|
4731
4741
|
*/
|
|
4732
4742
|
filter?: CommonSearchWithEntityContext['filter'] | null;
|
|
4733
4743
|
/**
|
|
4734
|
-
Array of sort objects specifying result order.
|
|
4735
|
-
|
|
4736
|
-
Learn more about the sort format in the [supported filters & sorting table](https://dev.wix.com/docs/sdk/backend-modules/categories/categories/search-categories) (SDK)
|
|
4737
|
-
or the [supported filters article](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting) (REST).
|
|
4744
|
+
Array of sort objects specifying result order.
|
|
4738
4745
|
@maxSize: 10
|
|
4739
4746
|
*/
|
|
4740
4747
|
sort?: {
|
|
@@ -4823,9 +4830,6 @@ type CategorySearch = {
|
|
|
4823
4830
|
};
|
|
4824
4831
|
/**
|
|
4825
4832
|
* Counts the number of categories that match the provided filtering.
|
|
4826
|
-
*
|
|
4827
|
-
* For field support for filters and sorting,
|
|
4828
|
-
* see [Categories: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/business-management/categories/supported-filters-and-sorting).
|
|
4829
4833
|
* @public
|
|
4830
4834
|
* @requiredField options.treeReference
|
|
4831
4835
|
* @requiredField options.treeReference.appNamespace
|
|
@@ -4870,9 +4874,7 @@ declare function moveCategory(categoryId: string, treeReference: NonNullablePath
|
|
|
4870
4874
|
}>;
|
|
4871
4875
|
interface MoveCategoryOptions {
|
|
4872
4876
|
/**
|
|
4873
|
-
*
|
|
4874
|
-
*
|
|
4875
|
-
* Default: root category ID
|
|
4877
|
+
* ID of the target parent category. Leave empty or omit to move the category to the top level.
|
|
4876
4878
|
* @format GUID
|
|
4877
4879
|
*/
|
|
4878
4880
|
parentCategoryId?: string | null;
|
|
@@ -4908,7 +4910,7 @@ interface MoveCategoryOptions {
|
|
|
4908
4910
|
* @applicableIdentity APP
|
|
4909
4911
|
* @fqn com.wix.categories.api.v1.CategoriesService.BulkUpdateCategories
|
|
4910
4912
|
*/
|
|
4911
|
-
declare function bulkUpdateCategories(categories: NonNullablePaths<MaskedCategory, `category` | `category._id` | `category.revision`, 3>[], options?: NonNullablePaths<BulkUpdateCategoriesOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<BulkUpdateCategoriesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.category.itemCounter` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
4913
|
+
declare function bulkUpdateCategories(categories: NonNullablePaths<MaskedCategory, `category` | `category._id` | `category.revision`, 3>[], options?: NonNullablePaths<BulkUpdateCategoriesOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<BulkUpdateCategoriesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.category.itemCounter` | `results.${number}.category.treeReference.appNamespace` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
4912
4914
|
__applicationErrorsType?: BulkUpdateCategoriesApplicationErrors;
|
|
4913
4915
|
}>;
|
|
4914
4916
|
interface BulkUpdateCategoriesOptions {
|
|
@@ -4929,6 +4931,7 @@ interface BulkUpdateCategoriesOptions {
|
|
|
4929
4931
|
/**
|
|
4930
4932
|
* Updates category visibility.
|
|
4931
4933
|
*
|
|
4934
|
+
* Setting visibility to `false` hides the category from site visitors. This also cascades to all subcategories. Hidden categories and their items remain accessible via API.
|
|
4932
4935
|
*
|
|
4933
4936
|
* Each time a category is updated, `revision` increments by 1.
|
|
4934
4937
|
* The current `revision` must be passed when updating a category.
|
|
@@ -4944,15 +4947,15 @@ interface BulkUpdateCategoriesOptions {
|
|
|
4944
4947
|
* @applicableIdentity APP
|
|
4945
4948
|
* @fqn com.wix.categories.api.v1.CategoriesService.UpdateCategoryVisibility
|
|
4946
4949
|
*/
|
|
4947
|
-
declare function updateCategoryVisibility(categoryId: string, options?: NonNullablePaths<UpdateCategoryVisibilityOptions, `revision` | `treeReference` | `treeReference.appNamespace` | `visible`, 3>): Promise<NonNullablePaths<UpdateCategoryVisibilityResponse, `category.itemCounter` | `category.breadcrumbsInfo.breadcrumbs` | `category.breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `category.breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `category.breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `category.seoData.tags` | `category.seoData.tags.${number}.type` | `category.seoData.tags.${number}.children` | `category.seoData.tags.${number}.custom` | `category.seoData.tags.${number}.disabled` | `category.seoData.settings.preventAutoRedirect` | `category.seoData.settings.keywords` | `category.seoData.settings.keywords.${number}.term` | `category.seoData.settings.keywords.${number}.isMain`, 7> & {
|
|
4950
|
+
declare function updateCategoryVisibility(categoryId: string, options?: NonNullablePaths<UpdateCategoryVisibilityOptions, `revision` | `treeReference` | `treeReference.appNamespace` | `visible`, 3>): Promise<NonNullablePaths<UpdateCategoryVisibilityResponse, `category.itemCounter` | `category.breadcrumbsInfo.breadcrumbs` | `category.breadcrumbsInfo.breadcrumbs.${number}.categoryId` | `category.breadcrumbsInfo.breadcrumbs.${number}.categoryName` | `category.breadcrumbsInfo.breadcrumbs.${number}.categorySlug` | `category.seoData.tags` | `category.seoData.tags.${number}.type` | `category.seoData.tags.${number}.children` | `category.seoData.tags.${number}.custom` | `category.seoData.tags.${number}.disabled` | `category.seoData.settings.preventAutoRedirect` | `category.seoData.settings.keywords` | `category.seoData.settings.keywords.${number}.term` | `category.seoData.settings.keywords.${number}.isMain` | `category.treeReference.appNamespace`, 7> & {
|
|
4948
4951
|
__applicationErrorsType?: UpdateCategoryVisibilityApplicationErrors;
|
|
4949
4952
|
}>;
|
|
4950
4953
|
interface UpdateCategoryVisibilityOptions {
|
|
4951
4954
|
/**
|
|
4952
|
-
* Whether the category is visible to site visitors
|
|
4955
|
+
* Whether the category is visible to site visitors.
|
|
4953
4956
|
*
|
|
4954
|
-
*
|
|
4955
|
-
*
|
|
4957
|
+
* Visibility cascades to subcategories: setting a parent category to `false` also hides all its subcategories.
|
|
4958
|
+
* Setting to `true` fails if any parent category is hidden.
|
|
4956
4959
|
*/
|
|
4957
4960
|
visible: boolean;
|
|
4958
4961
|
/** Category tree reference details. */
|
|
@@ -4969,10 +4972,9 @@ interface UpdateCategoryVisibilityOptions {
|
|
|
4969
4972
|
fields?: SingleEntityOpsRequestedFieldsWithLiterals[];
|
|
4970
4973
|
}
|
|
4971
4974
|
/**
|
|
4972
|
-
*
|
|
4975
|
+
* Sets visibility to `true` for multiple categories, making them visible to site visitors.
|
|
4973
4976
|
*
|
|
4974
|
-
*
|
|
4975
|
-
* > **Note:** If one of the passed categories has a parent category that is not visible, the passed category will not be updated.
|
|
4977
|
+
* Categories with a hidden parent category aren't updated.
|
|
4976
4978
|
* @param categoryIds - IDs of the categories to update.
|
|
4977
4979
|
* @public
|
|
4978
4980
|
* @requiredField categoryIds
|
|
@@ -4982,7 +4984,7 @@ interface UpdateCategoryVisibilityOptions {
|
|
|
4982
4984
|
* @applicableIdentity APP
|
|
4983
4985
|
* @fqn com.wix.categories.api.v1.CategoriesService.BulkShowCategories
|
|
4984
4986
|
*/
|
|
4985
|
-
declare function bulkShowCategories(categoryIds: string[], options?: NonNullablePaths<BulkShowCategoriesOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<BulkShowCategoriesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.category.itemCounter` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
4987
|
+
declare function bulkShowCategories(categoryIds: string[], options?: NonNullablePaths<BulkShowCategoriesOptions, `treeReference` | `treeReference.appNamespace`, 3>): Promise<NonNullablePaths<BulkShowCategoriesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.category.itemCounter` | `results.${number}.category.treeReference.appNamespace` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
4986
4988
|
interface BulkShowCategoriesOptions {
|
|
4987
4989
|
/** Category tree reference details. */
|
|
4988
4990
|
treeReference: TreeReference;
|
|
@@ -5103,10 +5105,11 @@ interface BulkRemoveItemFromCategoriesOptions {
|
|
|
5103
5105
|
treeReference: TreeReference;
|
|
5104
5106
|
}
|
|
5105
5107
|
/**
|
|
5106
|
-
* Retrieves a list of up to 100 items from a
|
|
5108
|
+
* Retrieves a list of up to 100 items from a category.
|
|
5107
5109
|
*
|
|
5108
5110
|
*
|
|
5109
|
-
*
|
|
5111
|
+
* By default, items are sorted by the date they were added to the category, newest first. To use the category's manual arrangement instead, pass `useCategoryArrangement: true`.
|
|
5112
|
+
* When `useCategoryArrangement` is `true`, items arranged with [Set Arranged Items](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/set-arranged-items) appear first in their specified order, followed by remaining items sorted by date added.
|
|
5110
5113
|
* @param categoryId - Category ID.
|
|
5111
5114
|
* @param treeReference - Category tree reference details.
|
|
5112
5115
|
* @public
|
|
@@ -5120,7 +5123,10 @@ interface BulkRemoveItemFromCategoriesOptions {
|
|
|
5120
5123
|
declare function listItemsInCategory(categoryId: string, treeReference: NonNullablePaths<TreeReference, `appNamespace`, 2>, options?: ListItemsInCategoryOptions): Promise<NonNullablePaths<ListItemsInCategoryResponse, `items` | `items.${number}.catalogItemId` | `items.${number}.appId`, 4>>;
|
|
5121
5124
|
interface ListItemsInCategoryOptions extends ListItemsInCategoryOptionsPagingMethodOneOf {
|
|
5122
5125
|
/**
|
|
5123
|
-
* Whether to use category arrangement for sorting items.
|
|
5126
|
+
* Whether to use the category's manual arrangement for sorting items.
|
|
5127
|
+
*
|
|
5128
|
+
* When `true`, manually arranged items appear first in their specified order, followed by remaining items sorted by date added (newest first).
|
|
5129
|
+
* When `false`, all items are sorted by date added (newest first).
|
|
5124
5130
|
*
|
|
5125
5131
|
* Default: `false`
|
|
5126
5132
|
*/
|
|
@@ -5128,7 +5134,7 @@ interface ListItemsInCategoryOptions extends ListItemsInCategoryOptionsPagingMet
|
|
|
5128
5134
|
/**
|
|
5129
5135
|
* Whether to include items from subcategories.
|
|
5130
5136
|
*
|
|
5131
|
-
* Default: `false`
|
|
5137
|
+
* Default: `false`
|
|
5132
5138
|
*/
|
|
5133
5139
|
includeItemsFromSubcategories?: boolean;
|
|
5134
5140
|
/**
|
|
@@ -5165,7 +5171,9 @@ interface ListCategoriesForItemOptions {
|
|
|
5165
5171
|
treeReference: TreeReference;
|
|
5166
5172
|
}
|
|
5167
5173
|
/**
|
|
5168
|
-
* Retrieves
|
|
5174
|
+
* Retrieves the categories that contain each of the specified items.
|
|
5175
|
+
*
|
|
5176
|
+
* Returns both directly assigned categories, as well as their parent and ancestor categories for each item.
|
|
5169
5177
|
* @param items - List of Item reference info.
|
|
5170
5178
|
* @public
|
|
5171
5179
|
* @requiredField items
|
|
@@ -5192,10 +5200,11 @@ interface ListCategoriesForItemsOptions {
|
|
|
5192
5200
|
*/
|
|
5193
5201
|
declare function listTrees(): Promise<NonNullablePaths<ListTreesResponse, `trees` | `trees.${number}.appNamespace`, 4>>;
|
|
5194
5202
|
/**
|
|
5195
|
-
* Sets
|
|
5203
|
+
* Sets the manual arrangement of items in a category.
|
|
5204
|
+
*
|
|
5205
|
+
* The order of items in the `items` array determines their display order when L[ist Items In Category](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/list-items-in-category) is called with `useCategoryArrangement: true`. The category's existing arrangement is replaced with the provided list.
|
|
5196
5206
|
*
|
|
5197
|
-
*
|
|
5198
|
-
* The category's existing list of arranged items will be overridden.
|
|
5207
|
+
* Limited to 100 items. Items beyond this limit are displayed after the arranged items, sorted by the date they were added.
|
|
5199
5208
|
* @param categoryId - Category ID.
|
|
5200
5209
|
* @param treeReference - Category tree reference details.
|
|
5201
5210
|
* @public
|
|
@@ -5211,13 +5220,15 @@ declare function setArrangedItems(categoryId: string, treeReference: NonNullable
|
|
|
5211
5220
|
}>;
|
|
5212
5221
|
interface SetArrangedItemsOptions {
|
|
5213
5222
|
/**
|
|
5214
|
-
* List of items
|
|
5223
|
+
* List of items in the desired order. The order in this array determines the display order when List Items In Category is called with `useCategoryArrangement: true`.
|
|
5215
5224
|
* @maxSize 100
|
|
5216
5225
|
*/
|
|
5217
5226
|
items?: ItemReference[];
|
|
5218
5227
|
}
|
|
5219
5228
|
/**
|
|
5220
|
-
* Retrieves
|
|
5229
|
+
* Retrieves the manually arranged items in a category.
|
|
5230
|
+
*
|
|
5231
|
+
* Returns only items that have been explicitly arranged using [Set Arranged Items](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/categories/set-arranged-items). Items added to the category but not manually arranged aren't included.
|
|
5221
5232
|
* @param categoryId - Category ID.
|
|
5222
5233
|
* @param treeReference - Category tree reference details.
|
|
5223
5234
|
* @public
|