@wix/auto_sdk_blog_posts 1.0.143 → 1.0.145

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 (49) hide show
  1. package/build/cjs/index.d.ts +15 -11
  2. package/build/cjs/index.js +54 -49
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +546 -543
  5. package/build/cjs/index.typings.js +44 -44
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +399 -399
  8. package/build/cjs/meta.js +38 -38
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +86 -88
  11. package/build/cjs/schemas.js +153 -151
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +15 -11
  14. package/build/es/index.mjs +54 -49
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +546 -543
  17. package/build/es/index.typings.mjs +44 -44
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +399 -399
  20. package/build/es/meta.mjs +38 -38
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +86 -88
  23. package/build/es/schemas.mjs +153 -151
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +15 -11
  26. package/build/internal/cjs/index.js +54 -49
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +546 -543
  29. package/build/internal/cjs/index.typings.js +44 -44
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +399 -399
  32. package/build/internal/cjs/meta.js +38 -38
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +86 -88
  35. package/build/internal/cjs/schemas.js +153 -151
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +15 -11
  38. package/build/internal/es/index.mjs +54 -49
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +546 -543
  41. package/build/internal/es/index.typings.mjs +44 -44
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +399 -399
  44. package/build/internal/es/meta.mjs +38 -38
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +86 -88
  47. package/build/internal/es/schemas.mjs +153 -151
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -2633,454 +2633,170 @@ interface PostUnlikedInitiatorOneOf {
2633
2633
  */
2634
2634
  anonymousVisitorId?: string | null;
2635
2635
  }
2636
- interface GetTotalLikesPerMemberRequest {
2636
+ interface ListTemplatesRequest {
2637
2637
  /**
2638
- * Member ID.
2638
+ * Filter post templates by given template category ids
2639
+ * @maxSize 50
2639
2640
  * @format GUID
2640
2641
  */
2641
- memberId?: string;
2642
- }
2643
- interface GetTotalLikesPerMemberResponse {
2644
- /** The total number of likes of the member. */
2645
- total?: number;
2646
- }
2647
- interface DomainEvent extends DomainEventBodyOneOf {
2648
- createdEvent?: EntityCreatedEvent;
2649
- updatedEvent?: EntityUpdatedEvent;
2650
- deletedEvent?: EntityDeletedEvent;
2651
- actionEvent?: ActionEvent;
2652
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
2653
- _id?: string;
2642
+ categoryIds?: string[];
2654
2643
  /**
2655
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
2656
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
2644
+ * Filter post templates by provided language
2645
+ * @format LANGUAGE_TAG
2657
2646
  */
2658
- entityFqdn?: string;
2647
+ language?: string | null;
2648
+ /** Returns post template categories when set to TRUE */
2649
+ listTemplateCategories?: boolean;
2650
+ /** Sort order by ascending/descending publish date. Default is ascending publish date sort */
2651
+ sort?: GetPostTemplatesSortWithLiterals;
2652
+ /** Pagination options. */
2653
+ paging?: BlogPaging;
2654
+ }
2655
+ declare enum GetPostTemplatesSort {
2656
+ /** Sort by ascending publishing date. */
2657
+ PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
2658
+ /** Sort by descending publishing date. */
2659
+ PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC"
2660
+ }
2661
+ /** @enumType */
2662
+ type GetPostTemplatesSortWithLiterals = GetPostTemplatesSort | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC';
2663
+ interface BlogPaging {
2659
2664
  /**
2660
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
2661
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
2665
+ * Number of items to skip in the current sort order.
2666
+ *
2667
+ *
2668
+ * Default: `0`
2662
2669
  */
2663
- slug?: string;
2664
- /** ID of the entity associated with the event. */
2665
- entityId?: string;
2666
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
2667
- eventTime?: Date | null;
2670
+ offset?: number;
2668
2671
  /**
2669
- * Whether the event was triggered as a result of a privacy regulation application
2670
- * (for example, GDPR).
2672
+ * Number of items to return.
2673
+ *
2674
+ *
2675
+ * Default:`50`
2676
+ * @min 1
2677
+ * @max 100
2671
2678
  */
2672
- triggeredByAnonymizeRequest?: boolean | null;
2673
- /** If present, indicates the action that triggered the event. */
2674
- originatedFrom?: string | null;
2679
+ limit?: number;
2675
2680
  /**
2676
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
2677
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
2681
+ * Pointer to the next or previous page in the list of results.
2682
+ * @maxLength 2000
2678
2683
  */
2679
- entityEventSequence?: string | null;
2680
- }
2681
- /** @oneof */
2682
- interface DomainEventBodyOneOf {
2683
- createdEvent?: EntityCreatedEvent;
2684
- updatedEvent?: EntityUpdatedEvent;
2685
- deletedEvent?: EntityDeletedEvent;
2686
- actionEvent?: ActionEvent;
2687
- }
2688
- interface EntityCreatedEvent {
2689
- entity?: string;
2684
+ cursor?: string | null;
2690
2685
  }
2691
- interface RestoreInfo {
2692
- deletedDate?: Date | null;
2686
+ interface ListTemplatesResponse {
2687
+ /** Available post templates */
2688
+ postTemplates?: Post[];
2689
+ /** Details on the paged set of posts templates returned. */
2690
+ postTemplatesMetaData?: MetaData;
2691
+ /** Post template categories. This value is returned empty unless asked explicitly */
2692
+ templateCategories?: Category[];
2693
2693
  }
2694
- interface EntityUpdatedEvent {
2694
+ interface MetaData {
2695
+ /** Number of items returned in this response. */
2696
+ count?: number;
2697
+ /** Requested offset. */
2698
+ offset?: number;
2699
+ /** Total number of items that match the query. */
2700
+ total?: number;
2695
2701
  /**
2696
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2697
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2698
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2702
+ * Pointer to the next or previous page in the list of results.
2703
+ * @maxLength 2000
2699
2704
  */
2700
- currentEntity?: string;
2701
- }
2702
- interface EntityDeletedEvent {
2703
- /** Entity that was deleted. */
2704
- deletedEntity?: string | null;
2705
- }
2706
- interface ActionEvent {
2707
- body?: string;
2705
+ cursor?: string | null;
2708
2706
  }
2709
- interface MessageEnvelope {
2707
+ interface Category {
2710
2708
  /**
2711
- * App instance ID.
2712
- * @format GUID
2709
+ * Category ID.
2710
+ * @immutable
2711
+ * @maxLength 38
2713
2712
  */
2714
- instanceId?: string | null;
2713
+ _id?: string;
2715
2714
  /**
2716
- * Event type.
2717
- * @maxLength 150
2715
+ * Category label. Displayed in the Category Menu.
2716
+ * @maxLength 35
2718
2717
  */
2719
- eventType?: string;
2720
- /** The identification type and identity data. */
2721
- identity?: IdentificationData;
2722
- /** Stringify payload. */
2723
- data?: string;
2724
- /** Details related to the account */
2725
- accountInfo?: AccountInfo;
2726
- }
2727
- interface IdentificationData extends IdentificationDataIdOneOf {
2718
+ label?: string;
2728
2719
  /**
2729
- * ID of a site visitor that has not logged in to the site.
2730
- * @format GUID
2720
+ * Number of posts in the category.
2721
+ * @readonly
2731
2722
  */
2732
- anonymousVisitorId?: string;
2723
+ postCount?: number;
2733
2724
  /**
2734
- * ID of a site visitor that has logged in to the site.
2735
- * @format GUID
2725
+ * The `url` of the page that lists every post with the specified category.
2726
+ * @readonly
2736
2727
  */
2737
- memberId?: string;
2728
+ url?: string;
2738
2729
  /**
2739
- * ID of a Wix user (site owner, contributor, etc.).
2740
- * @format GUID
2730
+ * Category description.
2731
+ * @maxLength 500
2741
2732
  */
2742
- wixUserId?: string;
2733
+ description?: string | null;
2743
2734
  /**
2744
- * ID of an app.
2745
- * @format GUID
2735
+ * Category title.
2736
+ * @maxLength 200
2737
+ * @deprecated Category title.
2738
+ * @targetRemovalDate 2025-07-16
2746
2739
  */
2747
- appId?: string;
2748
- /** @readonly */
2749
- identityType?: WebhookIdentityTypeWithLiterals;
2750
- }
2751
- /** @oneof */
2752
- interface IdentificationDataIdOneOf {
2740
+ title?: string;
2753
2741
  /**
2754
- * ID of a site visitor that has not logged in to the site.
2755
- * @format GUID
2742
+ * Position of the category in the [Category Menu](https://support.wix.com/en/article/wix-blog-adding-and-customizing-a-category-menu).
2743
+ * Categories are displayed in ascending order. Categories with a position of `-1` appear at the end of the sequence.
2744
+ *
2745
+ * Default: `-1`
2756
2746
  */
2757
- anonymousVisitorId?: string;
2747
+ displayPosition?: number | null;
2758
2748
  /**
2759
- * ID of a site visitor that has logged in to the site.
2749
+ * ID of the category's translations. All translations of a single category share the same `translationId`.
2760
2750
  * @format GUID
2761
2751
  */
2762
- memberId?: string;
2752
+ translationId?: string | null;
2763
2753
  /**
2764
- * ID of a Wix user (site owner, contributor, etc.).
2765
- * @format GUID
2754
+ * Category language.
2755
+ *
2756
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2757
+ * @immutable
2766
2758
  */
2767
- wixUserId?: string;
2759
+ language?: string | null;
2768
2760
  /**
2769
- * ID of an app.
2770
- * @format GUID
2761
+ * Part of a category's URL that refers to a specific category. For example, the slug of `https:/example.com/blog/category/famous-cats` is `famous-cats`.
2762
+ * @maxLength 100
2771
2763
  */
2772
- appId?: string;
2773
- }
2774
- declare enum WebhookIdentityType {
2775
- UNKNOWN = "UNKNOWN",
2776
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2777
- MEMBER = "MEMBER",
2778
- WIX_USER = "WIX_USER",
2779
- APP = "APP"
2780
- }
2781
- /** @enumType */
2782
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
2783
- interface AccountInfo {
2764
+ slug?: string;
2765
+ /** SEO data. */
2766
+ seoData?: SeoSchema;
2767
+ /** Category cover image. */
2768
+ coverImage?: string;
2784
2769
  /**
2785
- * ID of the Wix account associated with the event.
2786
- * @format GUID
2770
+ * Date and time the Category was last updated.
2771
+ * @readonly
2787
2772
  */
2788
- accountId?: string | null;
2773
+ _updatedDate?: Date | null;
2774
+ }
2775
+ interface CategoryTranslation {
2789
2776
  /**
2790
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
2777
+ * Category ID.
2791
2778
  * @format GUID
2792
2779
  */
2793
- parentAccountId?: string | null;
2780
+ _id?: string;
2794
2781
  /**
2795
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
2796
- * @format GUID
2782
+ * Label displayed in the categories menu on the site.
2783
+ * @maxLength 100
2797
2784
  */
2798
- siteId?: string | null;
2799
- }
2800
- /** Get Blog Publications Count Stats request */
2801
- interface QueryPublicationsCountStatsRequest {
2802
- /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2803
- rangeStart?: Date | null;
2804
- /** Non-inclusive end of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2805
- rangeEnd?: Date | null;
2806
- /** Order of the returned results. */
2807
- order?: QueryPublicationsCountStatsRequestOrderWithLiterals;
2808
- /** Number of months to include in the response. */
2809
- months?: number;
2785
+ label?: string | null;
2810
2786
  /**
2811
- * Language filter
2812
- *
2813
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2787
+ * Language of the category.
2814
2788
  * @format LANGUAGE_TAG
2815
2789
  */
2816
2790
  language?: string | null;
2791
+ /** URL of this category page. */
2792
+ url?: string;
2793
+ }
2794
+ interface GetTemplateRequest {
2817
2795
  /**
2818
- * Timezone of the client.
2819
- * @minLength 3
2820
- * @maxLength 100
2796
+ * Post template id
2797
+ * @format GUID
2821
2798
  */
2822
- timeZone?: string | null;
2823
- }
2824
- declare enum QueryPublicationsCountStatsRequestOrder {
2825
- UNKNOWN = "UNKNOWN",
2826
- OLDEST = "OLDEST",
2827
- NEWEST = "NEWEST"
2828
- }
2829
- /** @enumType */
2830
- type QueryPublicationsCountStatsRequestOrderWithLiterals = QueryPublicationsCountStatsRequestOrder | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
2831
- /** Get Blog Publications Count Stats response */
2832
- interface QueryPublicationsCountStatsResponse {
2833
- /** Chronologically ordered list of publications. */
2834
- stats?: PeriodPublicationsCount[];
2835
- }
2836
- /** Publications count for a specific time period */
2837
- interface PeriodPublicationsCount {
2838
- /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2839
- periodStart?: Date | null;
2840
- /** Number of posts published during this month. */
2841
- publicationsCount?: number;
2842
- }
2843
- /** Get Blog Post Count Stats request */
2844
- interface QueryPostCountStatsRequest {
2845
- /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2846
- rangeStart?: Date | null;
2847
- /**
2848
- * Order of returned results.
2849
- *
2850
- * - `OLDEST`: posts by date in ascending order.
2851
- * - `NEWEST`: posts by date in descending order.
2852
- *
2853
- * Default: `OLDEST`
2854
- */
2855
- order?: OrderWithLiterals;
2856
- /** Number of months to include in response. */
2857
- months?: number;
2858
- /**
2859
- * Language filter.
2860
- *
2861
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2862
- * Pass a language to only receive the period post count for that specified language.
2863
- * @format LANGUAGE_TAG
2864
- */
2865
- language?: string | null;
2866
- /**
2867
- * Time zone to use when calculating the start of the month.
2868
- *
2869
- * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`.
2870
- * @minLength 3
2871
- * @maxLength 100
2872
- */
2873
- timeZone?: string | null;
2874
- }
2875
- declare enum Order {
2876
- UNKNOWN = "UNKNOWN",
2877
- OLDEST = "OLDEST",
2878
- NEWEST = "NEWEST"
2879
- }
2880
- /** @enumType */
2881
- type OrderWithLiterals = Order | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
2882
- /** Get Blog Post Count Stats response */
2883
- interface QueryPostCountStatsResponse {
2884
- /** List of published post counts by month. */
2885
- stats?: PeriodPostCount[];
2886
- }
2887
- /** Post count for a specific time period */
2888
- interface PeriodPostCount {
2889
- /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2890
- periodStart?: Date | null;
2891
- /** Number of posts published during this month. */
2892
- postCount?: number;
2893
- }
2894
- interface GetTotalPublicationsRequest {
2895
- /**
2896
- * Language filter
2897
- * @minLength 2
2898
- * @format LANGUAGE_TAG
2899
- */
2900
- language?: string | null;
2901
- }
2902
- interface GetTotalPublicationsResponse {
2903
- /** Total amount of publications. */
2904
- total?: number;
2905
- }
2906
- interface GetTotalPostsRequest {
2907
- /**
2908
- * Language filter.
2909
- *
2910
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2911
- * Pass a language to receive the total amount of posts in that specified language.
2912
- * @format LANGUAGE_TAG
2913
- */
2914
- language?: string | null;
2915
- }
2916
- interface GetTotalPostsResponse {
2917
- /** Total amount of published posts. */
2918
- total?: number;
2919
- }
2920
- interface ListTemplatesRequest {
2921
- /**
2922
- * Filter post templates by given template category ids
2923
- * @maxSize 50
2924
- * @format GUID
2925
- */
2926
- categoryIds?: string[];
2927
- /**
2928
- * Filter post templates by provided language
2929
- * @format LANGUAGE_TAG
2930
- */
2931
- language?: string | null;
2932
- /** Returns post template categories when set to TRUE */
2933
- listTemplateCategories?: boolean;
2934
- /** Sort order by ascending/descending publish date. Default is ascending publish date sort */
2935
- sort?: GetPostTemplatesSortWithLiterals;
2936
- /** Pagination options. */
2937
- paging?: BlogPaging;
2938
- }
2939
- declare enum GetPostTemplatesSort {
2940
- /** Sort by ascending publishing date. */
2941
- PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
2942
- /** Sort by descending publishing date. */
2943
- PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC"
2944
- }
2945
- /** @enumType */
2946
- type GetPostTemplatesSortWithLiterals = GetPostTemplatesSort | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC';
2947
- interface BlogPaging {
2948
- /**
2949
- * Number of items to skip in the current sort order.
2950
- *
2951
- *
2952
- * Default: `0`
2953
- */
2954
- offset?: number;
2955
- /**
2956
- * Number of items to return.
2957
- *
2958
- *
2959
- * Default:`50`
2960
- * @min 1
2961
- * @max 100
2962
- */
2963
- limit?: number;
2964
- /**
2965
- * Pointer to the next or previous page in the list of results.
2966
- * @maxLength 2000
2967
- */
2968
- cursor?: string | null;
2969
- }
2970
- interface ListTemplatesResponse {
2971
- /** Available post templates */
2972
- postTemplates?: Post[];
2973
- /** Details on the paged set of posts templates returned. */
2974
- postTemplatesMetaData?: MetaData;
2975
- /** Post template categories. This value is returned empty unless asked explicitly */
2976
- templateCategories?: Category[];
2977
- }
2978
- interface MetaData {
2979
- /** Number of items returned in this response. */
2980
- count?: number;
2981
- /** Requested offset. */
2982
- offset?: number;
2983
- /** Total number of items that match the query. */
2984
- total?: number;
2985
- /**
2986
- * Pointer to the next or previous page in the list of results.
2987
- * @maxLength 2000
2988
- */
2989
- cursor?: string | null;
2990
- }
2991
- interface Category {
2992
- /**
2993
- * Category ID.
2994
- * @immutable
2995
- * @maxLength 38
2996
- */
2997
- _id?: string;
2998
- /**
2999
- * Category label. Displayed in the Category Menu.
3000
- * @maxLength 35
3001
- */
3002
- label?: string;
3003
- /**
3004
- * Number of posts in the category.
3005
- * @readonly
3006
- */
3007
- postCount?: number;
3008
- /**
3009
- * The `url` of the page that lists every post with the specified category.
3010
- * @readonly
3011
- */
3012
- url?: string;
3013
- /**
3014
- * Category description.
3015
- * @maxLength 500
3016
- */
3017
- description?: string | null;
3018
- /**
3019
- * Category title.
3020
- * @maxLength 200
3021
- * @deprecated Category title.
3022
- * @targetRemovalDate 2025-07-16
3023
- */
3024
- title?: string;
3025
- /**
3026
- * Position of the category in the [Category Menu](https://support.wix.com/en/article/wix-blog-adding-and-customizing-a-category-menu).
3027
- * Categories are displayed in ascending order. Categories with a position of `-1` appear at the end of the sequence.
3028
- *
3029
- * Default: `-1`
3030
- */
3031
- displayPosition?: number | null;
3032
- /**
3033
- * ID of the category's translations. All translations of a single category share the same `translationId`.
3034
- * @format GUID
3035
- */
3036
- translationId?: string | null;
3037
- /**
3038
- * Category language.
3039
- *
3040
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3041
- * @immutable
3042
- */
3043
- language?: string | null;
3044
- /**
3045
- * Part of a category's URL that refers to a specific category. For example, the slug of `https:/example.com/blog/category/famous-cats` is `famous-cats`.
3046
- * @maxLength 100
3047
- */
3048
- slug?: string;
3049
- /** SEO data. */
3050
- seoData?: SeoSchema;
3051
- /** Category cover image. */
3052
- coverImage?: string;
3053
- /**
3054
- * Date and time the Category was last updated.
3055
- * @readonly
3056
- */
3057
- _updatedDate?: Date | null;
3058
- }
3059
- interface CategoryTranslation {
3060
- /**
3061
- * Category ID.
3062
- * @format GUID
3063
- */
3064
- _id?: string;
3065
- /**
3066
- * Label displayed in the categories menu on the site.
3067
- * @maxLength 100
3068
- */
3069
- label?: string | null;
3070
- /**
3071
- * Language of the category.
3072
- * @format LANGUAGE_TAG
3073
- */
3074
- language?: string | null;
3075
- /** URL of this category page. */
3076
- url?: string;
3077
- }
3078
- interface GetTemplateRequest {
3079
- /**
3080
- * Post template id
3081
- * @format GUID
3082
- */
3083
- postTemplateId?: string;
2799
+ postTemplateId?: string;
3084
2800
  }
3085
2801
  interface GetTemplateResponse {
3086
2802
  /** Post template */
@@ -3345,157 +3061,289 @@ interface DraftPostTranslation {
3345
3061
  /** Post URL. */
3346
3062
  url?: string;
3347
3063
  }
3348
- interface ListDemoPostsRequest {
3064
+ interface DomainEvent extends DomainEventBodyOneOf {
3065
+ createdEvent?: EntityCreatedEvent;
3066
+ updatedEvent?: EntityUpdatedEvent;
3067
+ deletedEvent?: EntityDeletedEvent;
3068
+ actionEvent?: ActionEvent;
3069
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
3070
+ _id?: string;
3349
3071
  /**
3350
- * Whether to return only featured posts.
3351
- *
3352
- * Default: `false`
3072
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
3073
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
3353
3074
  */
3354
- featured?: boolean;
3075
+ entityFqdn?: string;
3355
3076
  /**
3356
- * Hashtag filter.
3357
- *
3358
- * Pass an array of hashtags to return only posts containing any of the provided hashtags.
3359
- * If omitted, all posts with or without hashtags are returned.
3360
- * @maxSize 100
3361
- * @maxLength 100
3077
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
3078
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
3362
3079
  */
3363
- hashtags?: string[];
3080
+ slug?: string;
3081
+ /** ID of the entity associated with the event. */
3082
+ entityId?: string;
3083
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
3084
+ eventTime?: Date | null;
3364
3085
  /**
3365
- * Category filter.
3366
- *
3367
- * Pass an array of category IDs to return only posts with any of the provided categories.
3368
- * If omitted, all posts with or without associated categories are returned.
3369
- * @maxSize 50
3086
+ * Whether the event was triggered as a result of a privacy regulation application
3087
+ * (for example, GDPR).
3088
+ */
3089
+ triggeredByAnonymizeRequest?: boolean | null;
3090
+ /** If present, indicates the action that triggered the event. */
3091
+ originatedFrom?: string | null;
3092
+ /**
3093
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
3094
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
3095
+ */
3096
+ entityEventSequence?: string | null;
3097
+ }
3098
+ /** @oneof */
3099
+ interface DomainEventBodyOneOf {
3100
+ createdEvent?: EntityCreatedEvent;
3101
+ updatedEvent?: EntityUpdatedEvent;
3102
+ deletedEvent?: EntityDeletedEvent;
3103
+ actionEvent?: ActionEvent;
3104
+ }
3105
+ interface EntityCreatedEvent {
3106
+ entity?: string;
3107
+ }
3108
+ interface RestoreInfo {
3109
+ deletedDate?: Date | null;
3110
+ }
3111
+ interface EntityUpdatedEvent {
3112
+ /**
3113
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3114
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3115
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3116
+ */
3117
+ currentEntity?: string;
3118
+ }
3119
+ interface EntityDeletedEvent {
3120
+ /** Entity that was deleted. */
3121
+ deletedEntity?: string | null;
3122
+ }
3123
+ interface ActionEvent {
3124
+ body?: string;
3125
+ }
3126
+ interface MessageEnvelope {
3127
+ /**
3128
+ * App instance ID.
3370
3129
  * @format GUID
3371
3130
  */
3372
- categoryIds?: string[];
3131
+ instanceId?: string | null;
3373
3132
  /**
3374
- * Tag filter.
3375
- *
3376
- * Pass an array of tag IDs to return only posts with any of the provided tags.
3377
- * If omitted, all posts with or without tags are returned.
3378
- * @maxSize 50
3133
+ * Event type.
3134
+ * @maxLength 150
3135
+ */
3136
+ eventType?: string;
3137
+ /** The identification type and identity data. */
3138
+ identity?: IdentificationData;
3139
+ /** Stringify payload. */
3140
+ data?: string;
3141
+ /** Details related to the account */
3142
+ accountInfo?: AccountInfo;
3143
+ }
3144
+ interface IdentificationData extends IdentificationDataIdOneOf {
3145
+ /**
3146
+ * ID of a site visitor that has not logged in to the site.
3379
3147
  * @format GUID
3380
3148
  */
3381
- tagIds?: string[];
3149
+ anonymousVisitorId?: string;
3382
3150
  /**
3383
- * Sorting options.
3384
- *
3385
- * - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
3386
- * - `VIEW_COUNT`: Ordered by total number of views in descending order.
3387
- * - `LIKE_COUNT`: Ordered by total number of likes in descending order.
3388
- * - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
3389
- * - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
3390
- * - `TITLE_ASC`: Ordered by `title` in ascending order.
3391
- * - `TITLE_DESC`: Ordered by `title` in descending order.
3392
- * - `RATING`: reserved for internal use.
3151
+ * ID of a site visitor that has logged in to the site.
3152
+ * @format GUID
3153
+ */
3154
+ memberId?: string;
3155
+ /**
3156
+ * ID of a Wix user (site owner, contributor, etc.).
3157
+ * @format GUID
3158
+ */
3159
+ wixUserId?: string;
3160
+ /**
3161
+ * ID of an app.
3162
+ * @format GUID
3163
+ */
3164
+ appId?: string;
3165
+ /** @readonly */
3166
+ identityType?: WebhookIdentityTypeWithLiterals;
3167
+ }
3168
+ /** @oneof */
3169
+ interface IdentificationDataIdOneOf {
3170
+ /**
3171
+ * ID of a site visitor that has not logged in to the site.
3172
+ * @format GUID
3173
+ */
3174
+ anonymousVisitorId?: string;
3175
+ /**
3176
+ * ID of a site visitor that has logged in to the site.
3177
+ * @format GUID
3178
+ */
3179
+ memberId?: string;
3180
+ /**
3181
+ * ID of a Wix user (site owner, contributor, etc.).
3182
+ * @format GUID
3183
+ */
3184
+ wixUserId?: string;
3185
+ /**
3186
+ * ID of an app.
3187
+ * @format GUID
3188
+ */
3189
+ appId?: string;
3190
+ }
3191
+ declare enum WebhookIdentityType {
3192
+ UNKNOWN = "UNKNOWN",
3193
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3194
+ MEMBER = "MEMBER",
3195
+ WIX_USER = "WIX_USER",
3196
+ APP = "APP"
3197
+ }
3198
+ /** @enumType */
3199
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
3200
+ interface AccountInfo {
3201
+ /**
3202
+ * ID of the Wix account associated with the event.
3203
+ * @format GUID
3204
+ */
3205
+ accountId?: string | null;
3206
+ /**
3207
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
3208
+ * @format GUID
3209
+ */
3210
+ parentAccountId?: string | null;
3211
+ /**
3212
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
3213
+ * @format GUID
3214
+ */
3215
+ siteId?: string | null;
3216
+ }
3217
+ /** Get Blog Publications Count Stats request */
3218
+ interface QueryPublicationsCountStatsRequest {
3219
+ /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
3220
+ rangeStart?: Date | null;
3221
+ /** Non-inclusive end of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
3222
+ rangeEnd?: Date | null;
3223
+ /** Order of the returned results. */
3224
+ order?: QueryPublicationsCountStatsRequestOrderWithLiterals;
3225
+ /** Number of months to include in the response. */
3226
+ months?: number;
3227
+ /**
3228
+ * Language filter
3393
3229
  *
3394
- * Default: `FEED`
3230
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3231
+ * @format LANGUAGE_TAG
3395
3232
  */
3396
- sort?: GetPostsSortWithLiterals;
3397
- /** Pagination options. */
3398
- paging?: BlogPaging;
3233
+ language?: string | null;
3399
3234
  /**
3400
- * __Deprecated.__ Use `fieldsets` instead.
3401
- * This parameter will be removed on June 30, 2023.
3235
+ * Timezone of the client.
3236
+ * @minLength 3
3237
+ * @maxLength 100
3238
+ */
3239
+ timeZone?: string | null;
3240
+ }
3241
+ declare enum QueryPublicationsCountStatsRequestOrder {
3242
+ UNKNOWN = "UNKNOWN",
3243
+ OLDEST = "OLDEST",
3244
+ NEWEST = "NEWEST"
3245
+ }
3246
+ /** @enumType */
3247
+ type QueryPublicationsCountStatsRequestOrderWithLiterals = QueryPublicationsCountStatsRequestOrder | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
3248
+ /** Get Blog Publications Count Stats response */
3249
+ interface QueryPublicationsCountStatsResponse {
3250
+ /** Chronologically ordered list of publications. */
3251
+ stats?: PeriodPublicationsCount[];
3252
+ }
3253
+ /** Publications count for a specific time period */
3254
+ interface PeriodPublicationsCount {
3255
+ /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
3256
+ periodStart?: Date | null;
3257
+ /** Number of posts published during this month. */
3258
+ publicationsCount?: number;
3259
+ }
3260
+ /** Get Blog Post Count Stats request */
3261
+ interface QueryPostCountStatsRequest {
3262
+ /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
3263
+ rangeStart?: Date | null;
3264
+ /**
3265
+ * Order of returned results.
3402
3266
  *
3403
- * List of post fields to be included in the response.
3404
- * @maxSize 20
3405
- * @deprecated __Deprecated.__ Use `fieldsets` instead.
3406
- * This parameter will be removed on June 30, 2023.
3267
+ * - `OLDEST`: posts by date in ascending order.
3268
+ * - `NEWEST`: posts by date in descending order.
3407
3269
  *
3408
- * List of post fields to be included in the response.
3409
- * @replacedBy fieldsets
3410
- * @targetRemovalDate 2024-06-30
3270
+ * Default: `OLDEST`
3411
3271
  */
3412
- fieldsToInclude?: PostFieldFieldWithLiterals[];
3272
+ order?: OrderWithLiterals;
3273
+ /** Number of months to include in response. */
3274
+ months?: number;
3413
3275
  /**
3414
3276
  * Language filter.
3415
3277
  *
3416
3278
  * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3417
- * Pass a language to only receive posts that are in that language.
3418
- * If omitted, posts in all languages are returned.
3279
+ * Pass a language to only receive the period post count for that specified language.
3419
3280
  * @format LANGUAGE_TAG
3420
3281
  */
3421
3282
  language?: string | null;
3422
3283
  /**
3423
- * Post owner's member ID.
3424
- * @format GUID
3425
- */
3426
- memberId?: string | null;
3427
- /**
3428
- * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
3429
- * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
3430
- * only the post’s base fields are returned.
3431
- * @maxSize 20
3432
- */
3433
- fieldsets?: PostFieldFieldWithLiterals[];
3434
- }
3435
- declare enum GetPostsSort {
3436
- /** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
3437
- FEED = "FEED",
3438
- /** Ordered by `firstPublishedDate` in ascending order. */
3439
- PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
3440
- /** Ordered by `firstPublishedDate` in descending order. */
3441
- PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
3442
- /** Ordered by total number of views in descending order. */
3443
- VIEW_COUNT = "VIEW_COUNT",
3444
- /** Ordered by total number of likes in descending order. */
3445
- LIKE_COUNT = "LIKE_COUNT",
3446
- /** Ordered by `title` in ascending order. */
3447
- TITLE_ASC = "TITLE_ASC",
3448
- /** Ordered by `title` in descending order. */
3449
- TITLE_DESC = "TITLE_DESC"
3284
+ * Time zone to use when calculating the start of the month.
3285
+ *
3286
+ * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`.
3287
+ * @minLength 3
3288
+ * @maxLength 100
3289
+ */
3290
+ timeZone?: string | null;
3450
3291
  }
3451
- /** @enumType */
3452
- type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
3453
- declare enum PostFieldField {
3292
+ declare enum Order {
3454
3293
  UNKNOWN = "UNKNOWN",
3455
- /** Includes post URL when present. */
3456
- URL = "URL",
3457
- /** Includes post content text string when present. */
3458
- CONTENT_TEXT = "CONTENT_TEXT",
3459
- /** Includes post metrics when present. */
3460
- METRICS = "METRICS",
3461
- /** Includes SEO data. */
3462
- SEO = "SEO",
3463
- /** Includes post owner's contact ID. */
3464
- CONTACT_ID = "CONTACT_ID",
3465
- /** Includes post rich content. */
3466
- RICH_CONTENT = "RICH_CONTENT",
3467
- /** Includes post reference ID field. */
3468
- REFERENCE_ID = "REFERENCE_ID"
3294
+ OLDEST = "OLDEST",
3295
+ NEWEST = "NEWEST"
3469
3296
  }
3470
3297
  /** @enumType */
3471
- type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
3472
- interface ListDemoPostsResponse {
3473
- /** List of posts. */
3474
- posts?: Post[];
3475
- /** Details on the paged set of results returned. */
3476
- metaData?: MetaData;
3298
+ type OrderWithLiterals = Order | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
3299
+ /** Get Blog Post Count Stats response */
3300
+ interface QueryPostCountStatsResponse {
3301
+ /** List of published post counts by month. */
3302
+ stats?: PeriodPostCount[];
3477
3303
  }
3478
- interface ConvertDraftJsToRichContentRequest {
3479
- /** DraftJs content to convert to Rich content. */
3480
- content?: Record<string, any> | null;
3304
+ /** Post count for a specific time period */
3305
+ interface PeriodPostCount {
3306
+ /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
3307
+ periodStart?: Date | null;
3308
+ /** Number of posts published during this month. */
3309
+ postCount?: number;
3481
3310
  }
3482
- interface ConvertDraftJsToRichContentResponse {
3311
+ interface GetTotalPublicationsRequest {
3483
3312
  /**
3484
- * Rich content converted from DraftJs content.
3485
- * @maxLength 2000000
3313
+ * Language filter
3314
+ * @minLength 2
3315
+ * @format LANGUAGE_TAG
3486
3316
  */
3487
- richContent?: string;
3317
+ language?: string | null;
3488
3318
  }
3489
- interface ConvertRichContentToDraftJsRequest {
3319
+ interface GetTotalPublicationsResponse {
3320
+ /** Total amount of publications. */
3321
+ total?: number;
3322
+ }
3323
+ interface GetTotalPostsRequest {
3490
3324
  /**
3491
- * Rich content to convert to DraftJs content.
3492
- * @maxLength 2000000
3325
+ * Language filter.
3326
+ *
3327
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3328
+ * Pass a language to receive the total amount of posts in that specified language.
3329
+ * @format LANGUAGE_TAG
3493
3330
  */
3494
- richContent?: string;
3331
+ language?: string | null;
3495
3332
  }
3496
- interface ConvertRichContentToDraftJsResponse {
3497
- /** DraftJs content converted from Rich content. */
3498
- content?: Record<string, any> | null;
3333
+ interface GetTotalPostsResponse {
3334
+ /** Total amount of published posts. */
3335
+ total?: number;
3336
+ }
3337
+ interface GetTotalLikesPerMemberRequest {
3338
+ /**
3339
+ * Member ID.
3340
+ * @format GUID
3341
+ */
3342
+ memberId?: string;
3343
+ }
3344
+ interface GetTotalLikesPerMemberResponse {
3345
+ /** The total number of likes of the member. */
3346
+ total?: number;
3499
3347
  }
3500
3348
  interface PostCountersUpdated extends PostCountersUpdatedInitiatorOneOf {
3501
3349
  /**
@@ -3566,6 +3414,25 @@ interface GetPostRequest {
3566
3414
  */
3567
3415
  fieldsets?: PostFieldFieldWithLiterals[];
3568
3416
  }
3417
+ declare enum PostFieldField {
3418
+ UNKNOWN = "UNKNOWN",
3419
+ /** Includes post URL when present. */
3420
+ URL = "URL",
3421
+ /** Includes post content text string when present. */
3422
+ CONTENT_TEXT = "CONTENT_TEXT",
3423
+ /** Includes post metrics when present. */
3424
+ METRICS = "METRICS",
3425
+ /** Includes SEO data. */
3426
+ SEO = "SEO",
3427
+ /** Includes post owner's contact ID. */
3428
+ CONTACT_ID = "CONTACT_ID",
3429
+ /** Includes post rich content. */
3430
+ RICH_CONTENT = "RICH_CONTENT",
3431
+ /** Includes post reference ID field. */
3432
+ REFERENCE_ID = "REFERENCE_ID"
3433
+ }
3434
+ /** @enumType */
3435
+ type PostFieldFieldWithLiterals = PostFieldField | 'UNKNOWN' | 'URL' | 'CONTENT_TEXT' | 'METRICS' | 'SEO' | 'CONTACT_ID' | 'RICH_CONTENT' | 'REFERENCE_ID';
3569
3436
  interface GetPostResponse {
3570
3437
  /** Retrieved post info. */
3571
3438
  post?: Post;
@@ -3658,6 +3525,24 @@ interface ListPostsRequest {
3658
3525
  */
3659
3526
  fieldsets?: PostFieldFieldWithLiterals[];
3660
3527
  }
3528
+ declare enum GetPostsSort {
3529
+ /** Ordered by `firstPublishedDate` in descending order with pinned posts first. */
3530
+ FEED = "FEED",
3531
+ /** Ordered by `firstPublishedDate` in ascending order. */
3532
+ PUBLISHED_DATE_ASC = "PUBLISHED_DATE_ASC",
3533
+ /** Ordered by `firstPublishedDate` in descending order. */
3534
+ PUBLISHED_DATE_DESC = "PUBLISHED_DATE_DESC",
3535
+ /** Ordered by total number of views in descending order. */
3536
+ VIEW_COUNT = "VIEW_COUNT",
3537
+ /** Ordered by total number of likes in descending order. */
3538
+ LIKE_COUNT = "LIKE_COUNT",
3539
+ /** Ordered by `title` in ascending order. */
3540
+ TITLE_ASC = "TITLE_ASC",
3541
+ /** Ordered by `title` in descending order. */
3542
+ TITLE_DESC = "TITLE_DESC"
3543
+ }
3544
+ /** @enumType */
3545
+ type GetPostsSortWithLiterals = GetPostsSort | 'FEED' | 'PUBLISHED_DATE_ASC' | 'PUBLISHED_DATE_DESC' | 'VIEW_COUNT' | 'LIKE_COUNT' | 'TITLE_ASC' | 'TITLE_DESC';
3661
3546
  interface ListPostsResponse {
3662
3547
  /** List of retrieved posts. */
3663
3548
  posts?: Post[];
@@ -4007,6 +3892,121 @@ interface PostCount {
4007
3892
  /** Number of posts. */
4008
3893
  postCount?: number;
4009
3894
  }
3895
+ interface ListDemoPostsRequest {
3896
+ /**
3897
+ * Whether to return only featured posts.
3898
+ *
3899
+ * Default: `false`
3900
+ */
3901
+ featured?: boolean;
3902
+ /**
3903
+ * Hashtag filter.
3904
+ *
3905
+ * Pass an array of hashtags to return only posts containing any of the provided hashtags.
3906
+ * If omitted, all posts with or without hashtags are returned.
3907
+ * @maxSize 100
3908
+ * @maxLength 100
3909
+ */
3910
+ hashtags?: string[];
3911
+ /**
3912
+ * Category filter.
3913
+ *
3914
+ * Pass an array of category IDs to return only posts with any of the provided categories.
3915
+ * If omitted, all posts with or without associated categories are returned.
3916
+ * @maxSize 50
3917
+ * @format GUID
3918
+ */
3919
+ categoryIds?: string[];
3920
+ /**
3921
+ * Tag filter.
3922
+ *
3923
+ * Pass an array of tag IDs to return only posts with any of the provided tags.
3924
+ * If omitted, all posts with or without tags are returned.
3925
+ * @maxSize 50
3926
+ * @format GUID
3927
+ */
3928
+ tagIds?: string[];
3929
+ /**
3930
+ * Sorting options.
3931
+ *
3932
+ * - `FEED`: Ordered by `firstPublishedDate` in descending order with pinned posts first.
3933
+ * - `VIEW_COUNT`: Ordered by total number of views in descending order.
3934
+ * - `LIKE_COUNT`: Ordered by total number of likes in descending order.
3935
+ * - `PUBLISHED_DATE_ASC`: Ordered by `firstPublishedDate` in ascending order.
3936
+ * - `PUBLISHED_DATE_DESC`: Ordered by `firstPublishedDate` in descending order.
3937
+ * - `TITLE_ASC`: Ordered by `title` in ascending order.
3938
+ * - `TITLE_DESC`: Ordered by `title` in descending order.
3939
+ * - `RATING`: reserved for internal use.
3940
+ *
3941
+ * Default: `FEED`
3942
+ */
3943
+ sort?: GetPostsSortWithLiterals;
3944
+ /** Pagination options. */
3945
+ paging?: BlogPaging;
3946
+ /**
3947
+ * __Deprecated.__ Use `fieldsets` instead.
3948
+ * This parameter will be removed on June 30, 2023.
3949
+ *
3950
+ * List of post fields to be included in the response.
3951
+ * @maxSize 20
3952
+ * @deprecated __Deprecated.__ Use `fieldsets` instead.
3953
+ * This parameter will be removed on June 30, 2023.
3954
+ *
3955
+ * List of post fields to be included in the response.
3956
+ * @replacedBy fieldsets
3957
+ * @targetRemovalDate 2024-06-30
3958
+ */
3959
+ fieldsToInclude?: PostFieldFieldWithLiterals[];
3960
+ /**
3961
+ * Language filter.
3962
+ *
3963
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
3964
+ * Pass a language to only receive posts that are in that language.
3965
+ * If omitted, posts in all languages are returned.
3966
+ * @format LANGUAGE_TAG
3967
+ */
3968
+ language?: string | null;
3969
+ /**
3970
+ * Post owner's member ID.
3971
+ * @format GUID
3972
+ */
3973
+ memberId?: string | null;
3974
+ /**
3975
+ * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
3976
+ * the response in addition to the post’s base fields. Base fields don’t include any of the supported fieldset values. By default
3977
+ * only the post’s base fields are returned.
3978
+ * @maxSize 20
3979
+ */
3980
+ fieldsets?: PostFieldFieldWithLiterals[];
3981
+ }
3982
+ interface ListDemoPostsResponse {
3983
+ /** List of posts. */
3984
+ posts?: Post[];
3985
+ /** Details on the paged set of results returned. */
3986
+ metaData?: MetaData;
3987
+ }
3988
+ interface ConvertDraftJsToRichContentRequest {
3989
+ /** DraftJs content to convert to Rich content. */
3990
+ content?: Record<string, any> | null;
3991
+ }
3992
+ interface ConvertDraftJsToRichContentResponse {
3993
+ /**
3994
+ * Rich content converted from DraftJs content.
3995
+ * @maxLength 2000000
3996
+ */
3997
+ richContent?: string;
3998
+ }
3999
+ interface ConvertRichContentToDraftJsRequest {
4000
+ /**
4001
+ * Rich content to convert to DraftJs content.
4002
+ * @maxLength 2000000
4003
+ */
4004
+ richContent?: string;
4005
+ }
4006
+ interface ConvertRichContentToDraftJsResponse {
4007
+ /** DraftJs content converted from Rich content. */
4008
+ content?: Record<string, any> | null;
4009
+ }
4010
4010
  interface BaseEventMetadata {
4011
4011
  /**
4012
4012
  * App instance ID.
@@ -4154,13 +4154,14 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
4154
4154
  /**
4155
4155
  * Retrieves the number of published posts per month within a specified time range.
4156
4156
  *
4157
- * The time range is set using the `rangeStart` and `months` properties.
4158
- * The time range always starts on the 1st day of the month set in `rangeStart` and
4159
- * includes the number of `months` following `rangeStart`.
4160
- * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
4161
- * the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range always ends on the last day of the month.
4162
- * > Note: If there are no published posts in a month within the time range, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
4157
+ *
4158
+ * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
4159
+ *
4160
+ * You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
4161
+ *
4162
+ * >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
4163
4163
  * @public
4164
+ * @param options - Options specifying time frame, sort, and filter.
4164
4165
  * @permissionId BLOG.READ-PUBLICATION
4165
4166
  * @applicableIdentity APP
4166
4167
  * @returns Get Blog Post Count Stats response
@@ -4201,6 +4202,7 @@ interface QueryPostCountStatsOptions {
4201
4202
  /**
4202
4203
  * Retrieves the total amount of published posts of the blog.
4203
4204
  * @public
4205
+ * @param options - Language Options.
4204
4206
  * @permissionId BLOG.READ-PUBLICATION
4205
4207
  * @applicableIdentity APP
4206
4208
  * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
@@ -4221,12 +4223,12 @@ interface GetTotalPostsOptions {
4221
4223
  * @param postId - Post ID.
4222
4224
  * @public
4223
4225
  * @requiredField postId
4226
+ * @param options - Options specifying which fields to return.
4224
4227
  * @permissionId BLOG.READ-PUBLICATION
4225
4228
  * @applicableIdentity APP
4226
- * @returns Retrieved post info.
4227
4229
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
4228
4230
  */
4229
- declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<Post, `_id` | `title` | `excerpt` | `slug` | `featured` | `pinned` | `categoryIds` | `memberId` | `hashtags` | `commentingEnabled` | `minutesToRead` | `tagIds` | `relatedPostIds` | `pricingPlanIds` | `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` | `preview` | `moderationDetails.submittedBy` | `moderationDetails.status` | `media.embedMedia.thumbnail.url` | `media.embedMedia.thumbnail.width` | `media.embedMedia.thumbnail.height` | `media.embedMedia.video.url` | `media.embedMedia.video.width` | `media.embedMedia.video.height` | `media.displayed` | `media.custom` | `hasUnpublishedChanges`, 6>>;
4231
+ declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<GetPostResponse, `post._id` | `post.title` | `post.excerpt` | `post.slug` | `post.featured` | `post.pinned` | `post.categoryIds` | `post.memberId` | `post.hashtags` | `post.commentingEnabled` | `post.minutesToRead` | `post.tagIds` | `post.relatedPostIds` | `post.pricingPlanIds` | `post.seoData.tags` | `post.seoData.tags.${number}.type` | `post.seoData.tags.${number}.children` | `post.seoData.tags.${number}.custom` | `post.seoData.tags.${number}.disabled` | `post.seoData.settings.preventAutoRedirect` | `post.seoData.settings.keywords` | `post.seoData.settings.keywords.${number}.term` | `post.seoData.settings.keywords.${number}.isMain` | `post.preview` | `post.moderationDetails.submittedBy` | `post.moderationDetails.status` | `post.media.embedMedia.thumbnail.url` | `post.media.embedMedia.thumbnail.width` | `post.media.embedMedia.thumbnail.height` | `post.media.embedMedia.video.url` | `post.media.embedMedia.video.width` | `post.media.embedMedia.video.height` | `post.media.displayed` | `post.media.custom` | `post.hasUnpublishedChanges`, 7>>;
4230
4232
  interface GetPostOptions {
4231
4233
  /**
4232
4234
  * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -4246,6 +4248,7 @@ interface GetPostOptions {
4246
4248
  * @param slug - Slug of the post to retrieve.
4247
4249
  * @public
4248
4250
  * @requiredField slug
4251
+ * @param options - Options specifying which fields to return.
4249
4252
  * @permissionId BLOG.READ-PUBLICATION
4250
4253
  * @applicableIdentity APP
4251
4254
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
@@ -4273,6 +4276,7 @@ interface GetPostBySlugOptions {
4273
4276
  * - `paging.limit` is `50`.
4274
4277
  * - `paging.offset` is `0`.
4275
4278
  * @public
4279
+ * @param options - Sort, filter, and paging options.
4276
4280
  * @permissionId BLOG.READ-PUBLICATION
4277
4281
  * @applicableIdentity APP
4278
4282
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
@@ -4343,18 +4347,26 @@ interface ListPostsOptions {
4343
4347
  fieldsets?: PostFieldFieldWithLiterals[];
4344
4348
  }
4345
4349
  /**
4346
- * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
4350
+ * Creates a query to retrieve a list of posts.
4347
4351
  *
4348
- * Query Posts runs with these defaults, which you can override:
4349
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
4350
- * - `paging.limit` is `50`.
4351
- * - `paging.offset` is `0`.
4352
4352
  *
4353
- * To learn about working with _Query_ endpoints, see
4354
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
4355
- * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
4356
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
4353
+ * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
4354
+ *
4355
+ * The returned object contains the query definition which is typically used to run the query using the `find()` function.
4356
+ *
4357
+ * You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
4358
+ *
4359
+ * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
4360
+ * + `limit(50)`
4361
+ * + `descending('firstPublishedDate')`
4362
+ *
4363
+ * Note that the default limit is `'50'`, but the max limit is `'100'`.
4364
+ *
4365
+ * To learn how to query posts, refer to the table below.
4366
+ *
4367
+ * The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
4357
4368
  * @public
4369
+ * @param options - Options specifying which fields to return.
4358
4370
  * @permissionId BLOG.READ-PUBLICATION
4359
4371
  * @applicableIdentity APP
4360
4372
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
@@ -4394,19 +4406,19 @@ interface PostsQueryBuilder {
4394
4406
  /** @param propertyName - Property whose value is compared with `value`.
4395
4407
  * @param value - Value to compare against.
4396
4408
  */
4397
- ge: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'slug' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4409
+ ge: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4398
4410
  /** @param propertyName - Property whose value is compared with `value`.
4399
4411
  * @param value - Value to compare against.
4400
4412
  */
4401
- gt: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'slug' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4413
+ gt: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4402
4414
  /** @param propertyName - Property whose value is compared with `value`.
4403
4415
  * @param value - Value to compare against.
4404
4416
  */
4405
- le: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'slug' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4417
+ le: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4406
4418
  /** @param propertyName - Property whose value is compared with `value`.
4407
4419
  * @param value - Value to compare against.
4408
4420
  */
4409
- lt: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'slug' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4421
+ lt: (propertyName: 'title' | 'firstPublishedDate' | 'lastPublishedDate' | 'minutesToRead' | 'metrics.comments' | 'metrics.likes' | 'metrics.views', value: any) => PostsQueryBuilder;
4410
4422
  /** @param propertyName - Property whose value is compared with `string`.
4411
4423
  * @param string - String to compare against. Case-insensitive.
4412
4424
  */
@@ -4473,16 +4485,7 @@ interface PostQuerySpec extends QuerySpec {
4473
4485
  },
4474
4486
  {
4475
4487
  fields: ['slug'];
4476
- operators: [
4477
- '$eq',
4478
- '$gt',
4479
- '$gte',
4480
- '$hasAll',
4481
- '$hasSome',
4482
- '$lt',
4483
- '$lte',
4484
- '$ne'
4485
- ];
4488
+ operators: ['$eq', '$hasAll', '$hasSome', '$ne'];
4486
4489
  sort: 'BOTH';
4487
4490
  },
4488
4491
  {