@wix/categories 1.0.21 → 1.0.22

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.
Files changed (29) hide show
  1. package/build/cjs/src/categories-v1-category.http.d.ts +1 -3
  2. package/build/cjs/src/categories-v1-category.http.js +1 -52
  3. package/build/cjs/src/categories-v1-category.http.js.map +1 -1
  4. package/build/cjs/src/categories-v1-category.meta.d.ts +0 -1
  5. package/build/cjs/src/categories-v1-category.meta.js +1 -20
  6. package/build/cjs/src/categories-v1-category.meta.js.map +1 -1
  7. package/build/cjs/src/categories-v1-category.public.d.ts +2 -3
  8. package/build/cjs/src/categories-v1-category.public.js +2 -8
  9. package/build/cjs/src/categories-v1-category.public.js.map +1 -1
  10. package/build/cjs/src/categories-v1-category.types.d.ts +17 -504
  11. package/build/cjs/src/categories-v1-category.types.js.map +1 -1
  12. package/build/cjs/src/categories-v1-category.universal.d.ts +238 -801
  13. package/build/cjs/src/categories-v1-category.universal.js +2 -64
  14. package/build/cjs/src/categories-v1-category.universal.js.map +1 -1
  15. package/build/es/src/categories-v1-category.http.d.ts +1 -3
  16. package/build/es/src/categories-v1-category.http.js +0 -50
  17. package/build/es/src/categories-v1-category.http.js.map +1 -1
  18. package/build/es/src/categories-v1-category.meta.d.ts +0 -1
  19. package/build/es/src/categories-v1-category.meta.js +0 -18
  20. package/build/es/src/categories-v1-category.meta.js.map +1 -1
  21. package/build/es/src/categories-v1-category.public.d.ts +2 -3
  22. package/build/es/src/categories-v1-category.public.js +1 -6
  23. package/build/es/src/categories-v1-category.public.js.map +1 -1
  24. package/build/es/src/categories-v1-category.types.d.ts +17 -504
  25. package/build/es/src/categories-v1-category.types.js.map +1 -1
  26. package/build/es/src/categories-v1-category.universal.d.ts +238 -801
  27. package/build/es/src/categories-v1-category.universal.js +1 -62
  28. package/build/es/src/categories-v1-category.universal.js.map +1 -1
  29. package/package.json +2 -2
@@ -1460,7 +1460,7 @@ export interface QueryCategoriesRequest {
1460
1460
  * A reference to the tree that contains this category.
1461
1461
  * Used only in the first request. Following requests use the cursor token.
1462
1462
  */
1463
- treeReference: TreeReference;
1463
+ treeReference?: TreeReference;
1464
1464
  /**
1465
1465
  * Whether hidden categories should be included in the response. Default is `false`.
1466
1466
  * Used only in the first request. Following requests use the cursor token.
@@ -1538,6 +1538,22 @@ export interface Cursors {
1538
1538
  /** Cursor pointing to previous page in the list of results. */
1539
1539
  prev?: string | null;
1540
1540
  }
1541
+ export interface ListCompactCategoriesByIdsRequest {
1542
+ /** List of category ids. */
1543
+ categoryIds?: string[];
1544
+ /** A reference to the tree that contains the categories. */
1545
+ treeReference?: TreeReference;
1546
+ }
1547
+ export interface ListCompactCategoriesByIdsResponse {
1548
+ /** Categories which satisfy the provided ids. */
1549
+ categories?: CompactCategory[];
1550
+ }
1551
+ export interface CompactCategory {
1552
+ /** Category ID. */
1553
+ _id?: string | null;
1554
+ /** Category name. */
1555
+ name?: string | null;
1556
+ }
1541
1557
  export interface SearchCategoriesRequest {
1542
1558
  /** WQL query expression. */
1543
1559
  search?: CursorSearch;
@@ -2161,700 +2177,221 @@ export interface BulkRemoveItemsFromCategoryRequest {
2161
2177
  /** Category id */
2162
2178
  categoryId: string;
2163
2179
  /** List of catalog items with reference info. */
2164
- items: ItemReference[];
2165
- /** A reference to the tree that contains this category. */
2166
- treeReference: TreeReference;
2167
- }
2168
- export interface BulkRemoveItemsFromCategoryResponse {
2169
- /** Items removed by bulk action. */
2170
- results?: BulkItemsToCategoryResult[];
2171
- /** Bulk action metadata. */
2172
- bulkActionMetadata?: BulkActionMetadata;
2173
- }
2174
- export interface ItemRemovedFromCategory {
2175
- /** Category ID. */
2176
- categoryId?: string;
2177
- /** Catalog item reference info. */
2178
- itemReference?: ItemReference;
2179
- /** A reference to the tree that contains this category. */
2180
- treeReference?: TreeReference;
2181
- }
2182
- export interface ItemsRemovedFromCategory {
2183
- /** Category ID. */
2184
- categoryId?: string;
2185
- /** List of catalog items with reference info. */
2186
- items?: ItemReference[];
2187
- /** A reference to the tree that contains this category. */
2188
- treeReference?: TreeReference;
2189
- }
2190
- export interface BulkRemoveItemFromCategoriesRequest {
2191
- /** Catalog item reference info */
2192
- itemReference: ItemReference;
2193
- /** Category ids. */
2194
- categoryIds: string[];
2195
- /** A reference to the tree that contains the categories. */
2196
- treeReference: TreeReference;
2197
- }
2198
- export interface BulkRemoveItemFromCategoriesResponse {
2199
- /** Items removed by bulk action. */
2200
- results?: BulkItemToCategoriesResult[];
2201
- /** Bulk action metadata. */
2202
- bulkActionMetadata?: BulkActionMetadata;
2203
- }
2204
- export interface ListItemsInCategoryRequest extends ListItemsInCategoryRequestPagingMethodOneOf {
2205
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `use_category_arrangement` or `include_items_from_subcategories`. */
2206
- cursorPaging?: CursorPaging;
2207
- /** ID of category containing items. */
2208
- categoryId: string;
2209
- /** A reference to the tree that contains this category. */
2210
- treeReference: TreeReference;
2211
- /** Default: `false`. When `true` items arranged by user will be return before all other items. */
2212
- useCategoryArrangement?: boolean;
2213
- /** Default: `false`. When `false` only direct items of category will be returned. When `true` response contains also items from all subcategories which current category contains */
2214
- includeItemsFromSubcategories?: boolean;
2215
- }
2216
- /** @oneof */
2217
- export interface ListItemsInCategoryRequestPagingMethodOneOf {
2218
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `use_category_arrangement` or `include_items_from_subcategories`. */
2219
- cursorPaging?: CursorPaging;
2220
- }
2221
- export interface ListItemsInCategoryResponse {
2222
- /** Items which satisfy query. */
2223
- items?: ItemReference[];
2224
- /** Paging metadata. Contains cursor which can be used in next query. */
2225
- pagingMetadata?: PlatformPagingMetadataV2;
2226
- }
2227
- export interface ListCategoriesForItemRequest {
2228
- /** Catalog item reference info. */
2229
- itemReference: ItemReference;
2230
- /** A reference to the tree that contains the categories. */
2231
- treeReference: TreeReference;
2232
- }
2233
- export interface ListCategoriesForItemResponse {
2234
- /** A list of category IDs that contain this item directly. */
2235
- directCategoryIds?: string[];
2236
- /** A list of category IDs that contain this item directly and their parent category IDs. */
2237
- allCategoryIds?: string[];
2238
- }
2239
- export interface MoveItemInCategoryRequest {
2240
- /**
2241
- * ID of category.
2242
- * Item must be direct child of this category, otherwise error returned
2243
- */
2244
- categoryId: string;
2245
- /** A reference to the tree that contains this category. */
2246
- treeReference: TreeReference;
2247
- /** Item to move. */
2248
- item: ItemReference;
2249
- /**
2250
- * Where to move item.
2251
- * `FIRST` - make `item` first item with manual arrangement. If before this operation category already has 100 manually arranged items, the 100th item will be removed from list of items with manual arrangement.
2252
- * `LAST` - make `item` last item with manual arrangement. If before this operation category already has 100 manually arranged items, moving item will be not last but 100th.
2253
- * `BEFORE` - requires `before_item`, `item` will be moved before it. If `before_item` was 100th item in category it will be removed from list of items with manual arrangement.
2254
- * `NONE` - don't use manual arrangement for `item`, it will be shown after all items with manual arrangement according to default sorting.
2255
- */
2256
- position: Position;
2257
- /** Required when `position` is `BEFORE`. `before_item` must be manually arranged item. */
2258
- beforeItem?: ItemReference;
2259
- }
2260
- export declare enum Position {
2261
- UNKNOWN_POSITION = "UNKNOWN_POSITION",
2262
- FIRST = "FIRST",
2263
- LAST = "LAST",
2264
- BEFORE = "BEFORE",
2265
- NONE = "NONE"
2266
- }
2267
- export interface MoveItemInCategoryResponse {
2268
- /** Information about manually arranged items after move. */
2269
- itemsAfterMove?: ItemReference[];
2270
- }
2271
- export interface SetArrangedItemsRequest {
2272
- /** ID of category. */
2273
- categoryId: string;
2274
- /** A reference to the tree that contains this category. */
2275
- treeReference: TreeReference;
2276
- /**
2277
- * List of arranged items to set.
2278
- * All items must be direct children of category with `category_id`, otherwise error returned.
2279
- */
2280
- items?: ItemReference[];
2281
- }
2282
- export interface SetArrangedItemsResponse {
2283
- /** The updated list of arranged items in category. */
2284
- items?: ItemReference[];
2285
- }
2286
- export interface GetArrangedItemsRequest {
2287
- /** ID of category. */
2288
- categoryId: string;
2289
- /** A reference to the tree that contains this category. */
2290
- treeReference: TreeReference;
2291
- }
2292
- export interface GetArrangedItemsResponse {
2293
- /** List of arranged items in category. */
2294
- items?: ItemReference[];
2295
- }
2296
- export interface GetCategoriesTreeRequest {
2297
- /** A reference to the tree. */
2298
- treeReference?: TreeReference;
2299
- }
2300
- export interface GetCategoriesTreeResponse {
2301
- /** Categories tree. */
2302
- categoriesTree?: CategoryTreeNode[];
2303
- }
2304
- /** Represents a node in the view of categories tree */
2305
- export interface CategoryTreeNode {
2306
- /** Category ID. */
2307
- _id?: Uint8Array;
2308
- /** A list of child categories. */
2309
- subcategories?: CategoryTreeNode[];
2310
- }
2311
- export interface DomainEvent extends DomainEventBodyOneOf {
2312
- createdEvent?: EntityCreatedEvent;
2313
- updatedEvent?: EntityUpdatedEvent;
2314
- deletedEvent?: EntityDeletedEvent;
2315
- actionEvent?: ActionEvent;
2316
- /**
2317
- * Unique event ID.
2318
- * Allows clients to ignore duplicate webhooks.
2319
- */
2320
- _id?: string;
2321
- /**
2322
- * Assumes actions are also always typed to an entity_type
2323
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2324
- */
2325
- entityFqdn?: string;
2326
- /**
2327
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2328
- * This is although the created/updated/deleted notion is duplication of the oneof types
2329
- * Example: created/updated/deleted/started/completed/email_opened
2330
- */
2331
- slug?: string;
2332
- /** ID of the entity associated with the event. */
2333
- entityId?: string;
2334
- /** Event timestamp. */
2335
- eventTime?: Date;
2336
- /**
2337
- * Whether the event was triggered as a result of a privacy regulation application
2338
- * (for example, GDPR).
2339
- */
2340
- triggeredByAnonymizeRequest?: boolean | null;
2341
- /** If present, indicates the action that triggered the event. */
2342
- originatedFrom?: string | null;
2343
- /**
2344
- * A sequence number defining the order of updates to the underlying entity.
2345
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
2346
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2347
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2348
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
2349
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2350
- */
2351
- entityEventSequence?: string | null;
2352
- }
2353
- /** @oneof */
2354
- export interface DomainEventBodyOneOf {
2355
- createdEvent?: EntityCreatedEvent;
2356
- updatedEvent?: EntityUpdatedEvent;
2357
- deletedEvent?: EntityDeletedEvent;
2358
- actionEvent?: ActionEvent;
2359
- }
2360
- export interface EntityCreatedEvent {
2361
- entityAsJson?: string;
2362
- }
2363
- export interface EntityUpdatedEvent {
2364
- /**
2365
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2366
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2367
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2368
- */
2369
- currentEntityAsJson?: string;
2370
- }
2371
- export interface EntityDeletedEvent {
2372
- }
2373
- export interface ActionEvent {
2374
- bodyAsJson?: string;
2375
- }
2376
- export interface Empty {
2377
- }
2378
- export interface CreateCategoryResponseNonNullableFields {
2379
- category?: {
2380
- image: string;
2381
- numberOfItems: number;
2382
- breadcrumbs?: {
2383
- values: {
2384
- categoryId: string;
2385
- categoryName: string;
2386
- categorySlug: string;
2387
- }[];
2388
- };
2389
- richContentDescription?: {
2390
- nodes: {
2391
- buttonData?: {
2392
- containerData?: {
2393
- width?: {
2394
- size: WidthType;
2395
- };
2396
- alignment: PluginContainerDataAlignment;
2397
- };
2398
- type: Type;
2399
- link?: {
2400
- url: string;
2401
- anchor: string;
2402
- target: Target;
2403
- };
2404
- };
2405
- codeBlockData?: {
2406
- textStyle?: {
2407
- textAlignment: TextAlignment;
2408
- };
2409
- };
2410
- dividerData?: {
2411
- containerData?: {
2412
- width?: {
2413
- size: WidthType;
2414
- };
2415
- alignment: PluginContainerDataAlignment;
2416
- };
2417
- lineStyle: LineStyle;
2418
- width: Width;
2419
- alignment: Alignment;
2420
- };
2421
- fileData?: {
2422
- containerData?: {
2423
- width?: {
2424
- size: WidthType;
2425
- };
2426
- alignment: PluginContainerDataAlignment;
2427
- };
2428
- pdfSettings?: {
2429
- viewMode: ViewMode;
2430
- };
2431
- };
2432
- galleryData?: {
2433
- containerData?: {
2434
- width?: {
2435
- size: WidthType;
2436
- };
2437
- alignment: PluginContainerDataAlignment;
2438
- };
2439
- items: {
2440
- image?: {
2441
- link?: {
2442
- url: string;
2443
- anchor: string;
2444
- target: Target;
2445
- };
2446
- };
2447
- }[];
2448
- options?: {
2449
- layout?: {
2450
- type: LayoutType;
2451
- orientation: Orientation;
2452
- };
2453
- item?: {
2454
- crop: Crop;
2455
- };
2456
- thumbnails?: {
2457
- placement: ThumbnailsAlignment;
2458
- };
2459
- };
2460
- };
2461
- gifData?: {
2462
- containerData?: {
2463
- width?: {
2464
- size: WidthType;
2465
- };
2466
- alignment: PluginContainerDataAlignment;
2467
- };
2468
- height: number;
2469
- width: number;
2470
- };
2471
- headingData?: {
2472
- level: number;
2473
- textStyle?: {
2474
- textAlignment: TextAlignment;
2475
- };
2476
- };
2477
- htmlData?: {
2478
- url: string;
2479
- html: string;
2480
- containerData?: {
2481
- width?: {
2482
- size: WidthType;
2483
- };
2484
- alignment: PluginContainerDataAlignment;
2485
- };
2486
- source: Source;
2487
- };
2488
- imageData?: {
2489
- containerData?: {
2490
- width?: {
2491
- size: WidthType;
2492
- };
2493
- alignment: PluginContainerDataAlignment;
2494
- };
2495
- link?: {
2496
- url: string;
2497
- anchor: string;
2498
- target: Target;
2499
- };
2500
- };
2501
- linkPreviewData?: {
2502
- containerData?: {
2503
- width?: {
2504
- size: WidthType;
2505
- };
2506
- alignment: PluginContainerDataAlignment;
2507
- };
2508
- link?: {
2509
- url: string;
2510
- anchor: string;
2511
- target: Target;
2512
- };
2513
- };
2514
- mapData?: {
2515
- containerData?: {
2516
- width?: {
2517
- size: WidthType;
2518
- };
2519
- alignment: PluginContainerDataAlignment;
2520
- };
2521
- mapSettings?: {
2522
- mapType: MapType;
2523
- };
2524
- };
2525
- paragraphData?: {
2526
- textStyle?: {
2527
- textAlignment: TextAlignment;
2528
- };
2529
- };
2530
- pollData?: {
2531
- containerData?: {
2532
- width?: {
2533
- size: WidthType;
2534
- };
2535
- alignment: PluginContainerDataAlignment;
2536
- };
2537
- poll?: {
2538
- options: Option[];
2539
- settings?: {
2540
- permissions?: {
2541
- view: ViewRole;
2542
- vote: VoteRole;
2543
- };
2544
- };
2545
- };
2546
- layout?: {
2547
- poll?: {
2548
- type: PollLayoutType;
2549
- direction: PollLayoutDirection;
2550
- };
2551
- };
2552
- design?: {
2553
- poll?: {
2554
- background?: {
2555
- type: BackgroundType;
2556
- };
2557
- };
2558
- };
2559
- };
2560
- textData?: {
2561
- text: string;
2562
- decorations: {
2563
- anchorData?: {
2564
- anchor: string;
2565
- };
2566
- linkData?: {
2567
- link?: {
2568
- url: string;
2569
- anchor: string;
2570
- target: Target;
2571
- };
2572
- };
2573
- mentionData?: {
2574
- name: string;
2575
- slug: string;
2576
- };
2577
- fontSizeData?: {
2578
- unit: FontType;
2579
- };
2580
- type: DecorationType;
2581
- }[];
2582
- };
2583
- appEmbedData?: {
2584
- type: AppType;
2585
- };
2586
- videoData?: {
2587
- containerData?: {
2588
- width?: {
2589
- size: WidthType;
2590
- };
2591
- alignment: PluginContainerDataAlignment;
2592
- };
2593
- };
2594
- embedData?: {
2595
- containerData?: {
2596
- width?: {
2597
- size: WidthType;
2598
- };
2599
- alignment: PluginContainerDataAlignment;
2600
- };
2601
- };
2602
- collapsibleListData?: {
2603
- containerData?: {
2604
- width?: {
2605
- size: WidthType;
2606
- };
2607
- alignment: PluginContainerDataAlignment;
2608
- };
2609
- initialExpandedItems: InitialExpandedItems;
2610
- direction: Direction;
2611
- };
2612
- tableData?: {
2613
- containerData?: {
2614
- width?: {
2615
- size: WidthType;
2616
- };
2617
- alignment: PluginContainerDataAlignment;
2618
- };
2619
- dimensions?: {
2620
- colsWidthRatio: number[];
2621
- rowsHeight: number[];
2622
- colsMinWidth: number[];
2623
- };
2624
- };
2625
- tableCellData?: {
2626
- cellStyle?: {
2627
- verticalAlignment: VerticalAlignment;
2628
- };
2629
- };
2630
- audioData?: {
2631
- containerData?: {
2632
- width?: {
2633
- size: WidthType;
2634
- };
2635
- alignment: PluginContainerDataAlignment;
2636
- };
2637
- };
2638
- orderedListData?: {
2639
- indentation: number;
2640
- };
2641
- bulletedListData?: {
2642
- indentation: number;
2643
- };
2644
- blockquoteData?: {
2645
- indentation: number;
2646
- };
2647
- type: NodeType;
2648
- _id: string;
2649
- nodes: NonNullable<NonNullable<NonNullable<CreateCategoryResponseNonNullableFields>['category']>['richContentDescription']>['nodes'][];
2650
- }[];
2651
- metadata?: {
2652
- version: number;
2653
- };
2654
- documentStyle?: {
2655
- headerOne?: {
2656
- decorations: {
2657
- anchorData?: {
2658
- anchor: string;
2659
- };
2660
- linkData?: {
2661
- link?: {
2662
- url: string;
2663
- anchor: string;
2664
- target: Target;
2665
- };
2666
- };
2667
- mentionData?: {
2668
- name: string;
2669
- slug: string;
2670
- };
2671
- fontSizeData?: {
2672
- unit: FontType;
2673
- };
2674
- type: DecorationType;
2675
- }[];
2676
- };
2677
- headerTwo?: {
2678
- decorations: {
2679
- anchorData?: {
2680
- anchor: string;
2681
- };
2682
- linkData?: {
2683
- link?: {
2684
- url: string;
2685
- anchor: string;
2686
- target: Target;
2687
- };
2688
- };
2689
- mentionData?: {
2690
- name: string;
2691
- slug: string;
2692
- };
2693
- fontSizeData?: {
2694
- unit: FontType;
2695
- };
2696
- type: DecorationType;
2697
- }[];
2698
- };
2699
- headerThree?: {
2700
- decorations: {
2701
- anchorData?: {
2702
- anchor: string;
2703
- };
2704
- linkData?: {
2705
- link?: {
2706
- url: string;
2707
- anchor: string;
2708
- target: Target;
2709
- };
2710
- };
2711
- mentionData?: {
2712
- name: string;
2713
- slug: string;
2714
- };
2715
- fontSizeData?: {
2716
- unit: FontType;
2717
- };
2718
- type: DecorationType;
2719
- }[];
2720
- };
2721
- headerFour?: {
2722
- decorations: {
2723
- anchorData?: {
2724
- anchor: string;
2725
- };
2726
- linkData?: {
2727
- link?: {
2728
- url: string;
2729
- anchor: string;
2730
- target: Target;
2731
- };
2732
- };
2733
- mentionData?: {
2734
- name: string;
2735
- slug: string;
2736
- };
2737
- fontSizeData?: {
2738
- unit: FontType;
2739
- };
2740
- type: DecorationType;
2741
- }[];
2742
- };
2743
- headerFive?: {
2744
- decorations: {
2745
- anchorData?: {
2746
- anchor: string;
2747
- };
2748
- linkData?: {
2749
- link?: {
2750
- url: string;
2751
- anchor: string;
2752
- target: Target;
2753
- };
2754
- };
2755
- mentionData?: {
2756
- name: string;
2757
- slug: string;
2758
- };
2759
- fontSizeData?: {
2760
- unit: FontType;
2761
- };
2762
- type: DecorationType;
2763
- }[];
2764
- };
2765
- headerSix?: {
2766
- decorations: {
2767
- anchorData?: {
2768
- anchor: string;
2769
- };
2770
- linkData?: {
2771
- link?: {
2772
- url: string;
2773
- anchor: string;
2774
- target: Target;
2775
- };
2776
- };
2777
- mentionData?: {
2778
- name: string;
2779
- slug: string;
2780
- };
2781
- fontSizeData?: {
2782
- unit: FontType;
2783
- };
2784
- type: DecorationType;
2785
- }[];
2786
- };
2787
- paragraph?: {
2788
- decorations: {
2789
- anchorData?: {
2790
- anchor: string;
2791
- };
2792
- linkData?: {
2793
- link?: {
2794
- url: string;
2795
- anchor: string;
2796
- target: Target;
2797
- };
2798
- };
2799
- mentionData?: {
2800
- name: string;
2801
- slug: string;
2802
- };
2803
- fontSizeData?: {
2804
- unit: FontType;
2805
- };
2806
- type: DecorationType;
2807
- }[];
2808
- };
2809
- blockquote?: {
2810
- decorations: {
2811
- anchorData?: {
2812
- anchor: string;
2813
- };
2814
- linkData?: {
2815
- link?: {
2816
- url: string;
2817
- anchor: string;
2818
- target: Target;
2819
- };
2820
- };
2821
- mentionData?: {
2822
- name: string;
2823
- slug: string;
2824
- };
2825
- fontSizeData?: {
2826
- unit: FontType;
2827
- };
2828
- type: DecorationType;
2829
- }[];
2830
- };
2831
- codeBlock?: {
2832
- decorations: {
2833
- anchorData?: {
2834
- anchor: string;
2835
- };
2836
- linkData?: {
2837
- link?: {
2838
- url: string;
2839
- anchor: string;
2840
- target: Target;
2841
- };
2842
- };
2843
- mentionData?: {
2844
- name: string;
2845
- slug: string;
2846
- };
2847
- fontSizeData?: {
2848
- unit: FontType;
2849
- };
2850
- type: DecorationType;
2851
- }[];
2852
- };
2853
- };
2854
- };
2855
- };
2180
+ items: ItemReference[];
2181
+ /** A reference to the tree that contains this category. */
2182
+ treeReference: TreeReference;
2856
2183
  }
2857
- export interface GetCategoryResponseNonNullableFields {
2184
+ export interface BulkRemoveItemsFromCategoryResponse {
2185
+ /** Items removed by bulk action. */
2186
+ results?: BulkItemsToCategoryResult[];
2187
+ /** Bulk action metadata. */
2188
+ bulkActionMetadata?: BulkActionMetadata;
2189
+ }
2190
+ export interface ItemRemovedFromCategory {
2191
+ /** Category ID. */
2192
+ categoryId?: string;
2193
+ /** Catalog item reference info. */
2194
+ itemReference?: ItemReference;
2195
+ /** A reference to the tree that contains this category. */
2196
+ treeReference?: TreeReference;
2197
+ }
2198
+ export interface ItemsRemovedFromCategory {
2199
+ /** Category ID. */
2200
+ categoryId?: string;
2201
+ /** List of catalog items with reference info. */
2202
+ items?: ItemReference[];
2203
+ /** A reference to the tree that contains this category. */
2204
+ treeReference?: TreeReference;
2205
+ }
2206
+ export interface BulkRemoveItemFromCategoriesRequest {
2207
+ /** Catalog item reference info */
2208
+ itemReference: ItemReference;
2209
+ /** Category ids. */
2210
+ categoryIds: string[];
2211
+ /** A reference to the tree that contains the categories. */
2212
+ treeReference: TreeReference;
2213
+ }
2214
+ export interface BulkRemoveItemFromCategoriesResponse {
2215
+ /** Items removed by bulk action. */
2216
+ results?: BulkItemToCategoriesResult[];
2217
+ /** Bulk action metadata. */
2218
+ bulkActionMetadata?: BulkActionMetadata;
2219
+ }
2220
+ export interface ListItemsInCategoryRequest extends ListItemsInCategoryRequestPagingMethodOneOf {
2221
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `use_category_arrangement` or `include_items_from_subcategories`. */
2222
+ cursorPaging?: CursorPaging;
2223
+ /** ID of category containing items. */
2224
+ categoryId: string;
2225
+ /** A reference to the tree that contains this category. */
2226
+ treeReference: TreeReference;
2227
+ /** Default: `false`. When `true` items arranged by user will be return before all other items. */
2228
+ useCategoryArrangement?: boolean;
2229
+ /** Default: `false`. When `false` only direct items of category will be returned. When `true` response contains also items from all subcategories which current category contains */
2230
+ includeItemsFromSubcategories?: boolean;
2231
+ }
2232
+ /** @oneof */
2233
+ export interface ListItemsInCategoryRequestPagingMethodOneOf {
2234
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `use_category_arrangement` or `include_items_from_subcategories`. */
2235
+ cursorPaging?: CursorPaging;
2236
+ }
2237
+ export interface ListItemsInCategoryResponse {
2238
+ /** Items which satisfy query. */
2239
+ items?: ItemReference[];
2240
+ /** Paging metadata. Contains cursor which can be used in next query. */
2241
+ pagingMetadata?: PlatformPagingMetadataV2;
2242
+ }
2243
+ export interface ListCategoriesForItemRequest {
2244
+ /** Catalog item reference info. */
2245
+ itemReference: ItemReference;
2246
+ /** A reference to the tree that contains the categories. */
2247
+ treeReference: TreeReference;
2248
+ }
2249
+ export interface ListCategoriesForItemResponse {
2250
+ /** A list of category IDs that contain this item directly. */
2251
+ directCategoryIds?: string[];
2252
+ /** A list of category IDs that contain this item directly and their parent category IDs. */
2253
+ allCategoryIds?: string[];
2254
+ }
2255
+ export interface MoveItemInCategoryRequest {
2256
+ /**
2257
+ * ID of category.
2258
+ * Item must be direct child of this category, otherwise error returned
2259
+ */
2260
+ categoryId: string;
2261
+ /** A reference to the tree that contains this category. */
2262
+ treeReference: TreeReference;
2263
+ /** Item to move. */
2264
+ item: ItemReference;
2265
+ /**
2266
+ * Where to move item.
2267
+ * `FIRST` - make `item` first item with manual arrangement. If before this operation category already has 100 manually arranged items, the 100th item will be removed from list of items with manual arrangement.
2268
+ * `LAST` - make `item` last item with manual arrangement. If before this operation category already has 100 manually arranged items, moving item will be not last but 100th.
2269
+ * `BEFORE` - requires `before_item`, `item` will be moved before it. If `before_item` was 100th item in category it will be removed from list of items with manual arrangement.
2270
+ * `NONE` - don't use manual arrangement for `item`, it will be shown after all items with manual arrangement according to default sorting.
2271
+ */
2272
+ position: Position;
2273
+ /** Required when `position` is `BEFORE`. `before_item` must be manually arranged item. */
2274
+ beforeItem?: ItemReference;
2275
+ }
2276
+ export declare enum Position {
2277
+ UNKNOWN_POSITION = "UNKNOWN_POSITION",
2278
+ FIRST = "FIRST",
2279
+ LAST = "LAST",
2280
+ BEFORE = "BEFORE",
2281
+ NONE = "NONE"
2282
+ }
2283
+ export interface MoveItemInCategoryResponse {
2284
+ /** Information about manually arranged items after move. */
2285
+ itemsAfterMove?: ItemReference[];
2286
+ }
2287
+ export interface SetArrangedItemsRequest {
2288
+ /** ID of category. */
2289
+ categoryId: string;
2290
+ /** A reference to the tree that contains this category. */
2291
+ treeReference: TreeReference;
2292
+ /**
2293
+ * List of arranged items to set.
2294
+ * All items must be direct children of category with `category_id`, otherwise error returned.
2295
+ */
2296
+ items?: ItemReference[];
2297
+ }
2298
+ export interface SetArrangedItemsResponse {
2299
+ /** The updated list of arranged items in category. */
2300
+ items?: ItemReference[];
2301
+ }
2302
+ export interface GetArrangedItemsRequest {
2303
+ /** ID of category. */
2304
+ categoryId: string;
2305
+ /** A reference to the tree that contains this category. */
2306
+ treeReference: TreeReference;
2307
+ }
2308
+ export interface GetArrangedItemsResponse {
2309
+ /** List of arranged items in category. */
2310
+ items?: ItemReference[];
2311
+ }
2312
+ export interface GetCategoriesTreeRequest {
2313
+ /** A reference to the tree. */
2314
+ treeReference?: TreeReference;
2315
+ }
2316
+ export interface GetCategoriesTreeResponse {
2317
+ /** Categories tree. */
2318
+ categoriesTree?: CategoryTreeNode[];
2319
+ }
2320
+ /** Represents a node in the view of categories tree */
2321
+ export interface CategoryTreeNode {
2322
+ /** Category ID. */
2323
+ _id?: Uint8Array;
2324
+ /** A list of child categories. */
2325
+ subcategories?: CategoryTreeNode[];
2326
+ }
2327
+ export interface DomainEvent extends DomainEventBodyOneOf {
2328
+ createdEvent?: EntityCreatedEvent;
2329
+ updatedEvent?: EntityUpdatedEvent;
2330
+ deletedEvent?: EntityDeletedEvent;
2331
+ actionEvent?: ActionEvent;
2332
+ /**
2333
+ * Unique event ID.
2334
+ * Allows clients to ignore duplicate webhooks.
2335
+ */
2336
+ _id?: string;
2337
+ /**
2338
+ * Assumes actions are also always typed to an entity_type
2339
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2340
+ */
2341
+ entityFqdn?: string;
2342
+ /**
2343
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2344
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2345
+ * Example: created/updated/deleted/started/completed/email_opened
2346
+ */
2347
+ slug?: string;
2348
+ /** ID of the entity associated with the event. */
2349
+ entityId?: string;
2350
+ /** Event timestamp. */
2351
+ eventTime?: Date;
2352
+ /**
2353
+ * Whether the event was triggered as a result of a privacy regulation application
2354
+ * (for example, GDPR).
2355
+ */
2356
+ triggeredByAnonymizeRequest?: boolean | null;
2357
+ /** If present, indicates the action that triggered the event. */
2358
+ originatedFrom?: string | null;
2359
+ /**
2360
+ * A sequence number defining the order of updates to the underlying entity.
2361
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2362
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2363
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2364
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2365
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2366
+ */
2367
+ entityEventSequence?: string | null;
2368
+ }
2369
+ /** @oneof */
2370
+ export interface DomainEventBodyOneOf {
2371
+ createdEvent?: EntityCreatedEvent;
2372
+ updatedEvent?: EntityUpdatedEvent;
2373
+ deletedEvent?: EntityDeletedEvent;
2374
+ actionEvent?: ActionEvent;
2375
+ }
2376
+ export interface EntityCreatedEvent {
2377
+ entityAsJson?: string;
2378
+ }
2379
+ export interface EntityUpdatedEvent {
2380
+ /**
2381
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2382
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2383
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2384
+ */
2385
+ currentEntityAsJson?: string;
2386
+ }
2387
+ export interface EntityDeletedEvent {
2388
+ }
2389
+ export interface ActionEvent {
2390
+ bodyAsJson?: string;
2391
+ }
2392
+ export interface Empty {
2393
+ }
2394
+ export interface CreateCategoryResponseNonNullableFields {
2858
2395
  category?: {
2859
2396
  image: string;
2860
2397
  numberOfItems: number;
@@ -3125,7 +2662,7 @@ export interface GetCategoryResponseNonNullableFields {
3125
2662
  };
3126
2663
  type: NodeType;
3127
2664
  _id: string;
3128
- nodes: NonNullable<NonNullable<NonNullable<GetCategoryResponseNonNullableFields>['category']>['richContentDescription']>['nodes'][];
2665
+ nodes: NonNullable<NonNullable<NonNullable<CreateCategoryResponseNonNullableFields>['category']>['richContentDescription']>['nodes'][];
3129
2666
  }[];
3130
2667
  metadata?: {
3131
2668
  version: number;
@@ -3333,7 +2870,7 @@ export interface GetCategoryResponseNonNullableFields {
3333
2870
  };
3334
2871
  };
3335
2872
  }
3336
- export interface UpdateCategoryResponseNonNullableFields {
2873
+ export interface GetCategoryResponseNonNullableFields {
3337
2874
  category?: {
3338
2875
  image: string;
3339
2876
  numberOfItems: number;
@@ -3604,7 +3141,7 @@ export interface UpdateCategoryResponseNonNullableFields {
3604
3141
  };
3605
3142
  type: NodeType;
3606
3143
  _id: string;
3607
- nodes: NonNullable<NonNullable<NonNullable<UpdateCategoryResponseNonNullableFields>['category']>['richContentDescription']>['nodes'][];
3144
+ nodes: NonNullable<NonNullable<NonNullable<GetCategoryResponseNonNullableFields>['category']>['richContentDescription']>['nodes'][];
3608
3145
  }[];
3609
3146
  metadata?: {
3610
3147
  version: number;
@@ -3812,8 +3349,8 @@ export interface UpdateCategoryResponseNonNullableFields {
3812
3349
  };
3813
3350
  };
3814
3351
  }
3815
- export interface QueryCategoriesResponseNonNullableFields {
3816
- categories: {
3352
+ export interface UpdateCategoryResponseNonNullableFields {
3353
+ category?: {
3817
3354
  image: string;
3818
3355
  numberOfItems: number;
3819
3356
  breadcrumbs?: {
@@ -4083,7 +3620,7 @@ export interface QueryCategoriesResponseNonNullableFields {
4083
3620
  };
4084
3621
  type: NodeType;
4085
3622
  _id: string;
4086
- nodes: NonNullable<NonNullable<NonNullable<QueryCategoriesResponseNonNullableFields>['categories'][0]>['richContentDescription']>['nodes'][];
3623
+ nodes: NonNullable<NonNullable<NonNullable<UpdateCategoryResponseNonNullableFields>['category']>['richContentDescription']>['nodes'][];
4087
3624
  }[];
4088
3625
  metadata?: {
4089
3626
  version: number;
@@ -4289,7 +3826,7 @@ export interface QueryCategoriesResponseNonNullableFields {
4289
3826
  };
4290
3827
  };
4291
3828
  };
4292
- }[];
3829
+ };
4293
3830
  }
4294
3831
  export interface SearchCategoriesResponseNonNullableFields {
4295
3832
  categories: {
@@ -6059,105 +5596,6 @@ export interface UpdateCategoryOptions {
6059
5596
  * @requiredField treeReference.appNamespace
6060
5597
  */
6061
5598
  export declare function deleteCategory(categoryId: string, treeReference: TreeReference): Promise<void>;
6062
- /**
6063
- * Query Categories using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
6064
- * @public
6065
- * @documentationMaturity preview
6066
- * @applicableIdentity MEMBER
6067
- * @applicableIdentity VISITOR
6068
- */
6069
- export declare function queryCategories(options: QueryCategoriesOptions): CategoriesQueryBuilder;
6070
- export interface QueryCategoriesOptions {
6071
- /**
6072
- * A reference to the tree that contains this category.
6073
- * Used only in the first request. Following requests use the cursor token.
6074
- */
6075
- treeReference: TreeReference;
6076
- /**
6077
- * Whether hidden categories should be included in the response. Default is `false`.
6078
- * Used only in the first request. Following requests use the cursor token.
6079
- */
6080
- includeHidden?: boolean | undefined;
6081
- /** Fields to return in the response. When not provided, these fields are not returned. */
6082
- fields?: RequestedFields[] | undefined;
6083
- }
6084
- interface QueryCursorResult {
6085
- cursors: Cursors;
6086
- hasNext: () => boolean;
6087
- hasPrev: () => boolean;
6088
- length: number;
6089
- pageSize: number;
6090
- }
6091
- export interface CategoriesQueryResult extends QueryCursorResult {
6092
- items: Category[];
6093
- query: CategoriesQueryBuilder;
6094
- next: () => Promise<CategoriesQueryResult>;
6095
- prev: () => Promise<CategoriesQueryResult>;
6096
- }
6097
- export interface CategoriesQueryBuilder {
6098
- /** @param propertyName - Property whose value is compared with `value`.
6099
- * @param value - Value to compare against.
6100
- * @documentationMaturity preview
6101
- */
6102
- eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'slug', value: any) => CategoriesQueryBuilder;
6103
- /** @param propertyName - Property whose value is compared with `value`.
6104
- * @param value - Value to compare against.
6105
- * @documentationMaturity preview
6106
- */
6107
- ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'slug', value: any) => CategoriesQueryBuilder;
6108
- /** @param propertyName - Property whose value is compared with `value`.
6109
- * @param value - Value to compare against.
6110
- * @documentationMaturity preview
6111
- */
6112
- ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => CategoriesQueryBuilder;
6113
- /** @param propertyName - Property whose value is compared with `value`.
6114
- * @param value - Value to compare against.
6115
- * @documentationMaturity preview
6116
- */
6117
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CategoriesQueryBuilder;
6118
- /** @param propertyName - Property whose value is compared with `value`.
6119
- * @param value - Value to compare against.
6120
- * @documentationMaturity preview
6121
- */
6122
- le: (propertyName: '_createdDate' | '_updatedDate', value: any) => CategoriesQueryBuilder;
6123
- /** @param propertyName - Property whose value is compared with `value`.
6124
- * @param value - Value to compare against.
6125
- * @documentationMaturity preview
6126
- */
6127
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CategoriesQueryBuilder;
6128
- /** @param propertyName - Property whose value is compared with `string`.
6129
- * @param string - String to compare against. Case-insensitive.
6130
- * @documentationMaturity preview
6131
- */
6132
- startsWith: (propertyName: '_id' | 'name' | 'description' | 'slug', value: string) => CategoriesQueryBuilder;
6133
- /** @param propertyName - Property whose value is compared with `values`.
6134
- * @param values - List of values to compare against.
6135
- * @documentationMaturity preview
6136
- */
6137
- hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'slug', value: any[]) => CategoriesQueryBuilder;
6138
- /** @documentationMaturity preview */
6139
- in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'slug', value: any) => CategoriesQueryBuilder;
6140
- /** @documentationMaturity preview */
6141
- exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'description' | 'slug', value: boolean) => CategoriesQueryBuilder;
6142
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
6143
- * @documentationMaturity preview
6144
- */
6145
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name' | 'slug'>) => CategoriesQueryBuilder;
6146
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
6147
- * @documentationMaturity preview
6148
- */
6149
- descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name' | 'slug'>) => CategoriesQueryBuilder;
6150
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
6151
- * @documentationMaturity preview
6152
- */
6153
- limit: (limit: number) => CategoriesQueryBuilder;
6154
- /** @param cursor - A pointer to specific record
6155
- * @documentationMaturity preview
6156
- */
6157
- skipTo: (cursor: string) => CategoriesQueryBuilder;
6158
- /** @documentationMaturity preview */
6159
- find: () => Promise<CategoriesQueryResult>;
6160
- }
6161
5599
  /**
6162
5600
  * Search Categories using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
6163
5601
  * @public
@@ -6463,4 +5901,3 @@ export interface SetArrangedItemsOptions {
6463
5901
  * @applicableIdentity VISITOR
6464
5902
  */
6465
5903
  export declare function getArrangedItems(categoryId: string, treeReference: TreeReference): Promise<GetArrangedItemsResponse & GetArrangedItemsResponseNonNullableFields>;
6466
- export {};