@wix/auto_sdk_blog_categories 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +16 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{blog-v3-category-categories.universal-CZqdXr9y.d.ts → index.typings.d.ts} +169 -1
- package/build/cjs/index.typings.js +782 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +16 -9
- package/build/es/index.mjs.map +1 -1
- package/build/es/{blog-v3-category-categories.universal-CZqdXr9y.d.mts → index.typings.d.mts} +169 -1
- package/build/es/index.typings.mjs +749 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +16 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{blog-v3-category-categories.universal-CZqdXr9y.d.ts → index.typings.d.ts} +169 -1
- package/build/internal/cjs/index.typings.js +782 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +16 -9
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{blog-v3-category-categories.universal-CZqdXr9y.d.mts → index.typings.d.mts} +169 -1
- package/build/internal/es/index.typings.mjs +749 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +3 -3
package/build/cjs/{blog-v3-category-categories.universal-CZqdXr9y.d.ts → index.typings.d.ts}
RENAMED
@@ -1,3 +1,5 @@
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
2
|
+
|
1
3
|
interface Category {
|
2
4
|
/**
|
3
5
|
* Category ID.
|
@@ -732,13 +734,77 @@ interface CategoryCreatedEnvelope {
|
|
732
734
|
entity: Category;
|
733
735
|
metadata: EventMetadata;
|
734
736
|
}
|
737
|
+
/**
|
738
|
+
* Triggered when a category is created.
|
739
|
+
* @permissionScope Read Blog
|
740
|
+
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
741
|
+
* @permissionScope Manage Blog
|
742
|
+
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
743
|
+
* @permissionScope Manage Blog
|
744
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
745
|
+
* @permissionScope Read Draft Blog Posts
|
746
|
+
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
747
|
+
* @permissionId BLOG.READ-CATEGORY
|
748
|
+
* @webhook
|
749
|
+
* @eventType wix.blog.v3.category_created
|
750
|
+
* @serviceIdentifier com.wixpress.npm.communities.platformized.blog.v3.CategoryService
|
751
|
+
* @slug created
|
752
|
+
*/
|
753
|
+
declare function onCategoryCreated(handler: (event: CategoryCreatedEnvelope) => void | Promise<void>): void;
|
735
754
|
interface CategoryDeletedEnvelope {
|
736
755
|
metadata: EventMetadata;
|
737
756
|
}
|
757
|
+
/**
|
758
|
+
* Triggered when a category is deleted.
|
759
|
+
* @permissionScope Read Blog
|
760
|
+
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
761
|
+
* @permissionScope Manage Blog
|
762
|
+
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
763
|
+
* @permissionScope Manage Blog
|
764
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
765
|
+
* @permissionScope Read Draft Blog Posts
|
766
|
+
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
767
|
+
* @permissionId BLOG.READ-CATEGORY
|
768
|
+
* @webhook
|
769
|
+
* @eventType wix.blog.v3.category_deleted
|
770
|
+
* @serviceIdentifier com.wixpress.npm.communities.platformized.blog.v3.CategoryService
|
771
|
+
* @slug deleted
|
772
|
+
*/
|
773
|
+
declare function onCategoryDeleted(handler: (event: CategoryDeletedEnvelope) => void | Promise<void>): void;
|
738
774
|
interface CategoryUpdatedEnvelope {
|
739
775
|
entity: Category;
|
740
776
|
metadata: EventMetadata;
|
741
777
|
}
|
778
|
+
/**
|
779
|
+
* Triggered when a category is updated.
|
780
|
+
* @permissionScope Read Blog
|
781
|
+
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
782
|
+
* @permissionScope Manage Blog
|
783
|
+
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
784
|
+
* @permissionScope Manage Blog
|
785
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
786
|
+
* @permissionScope Read Draft Blog Posts
|
787
|
+
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
788
|
+
* @permissionId BLOG.READ-CATEGORY
|
789
|
+
* @webhook
|
790
|
+
* @eventType wix.blog.v3.category_updated
|
791
|
+
* @serviceIdentifier com.wixpress.npm.communities.platformized.blog.v3.CategoryService
|
792
|
+
* @slug updated
|
793
|
+
*/
|
794
|
+
declare function onCategoryUpdated(handler: (event: CategoryUpdatedEnvelope) => void | Promise<void>): void;
|
795
|
+
type CategoryNonNullablePaths = `_id` | `label` | `postCount` | `title` | `slug` | `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`;
|
796
|
+
/**
|
797
|
+
* Creates a category.
|
798
|
+
* @param category - Category info.
|
799
|
+
* @public
|
800
|
+
* @requiredField category
|
801
|
+
* @requiredField category.label
|
802
|
+
* @permissionId BLOG.CREATE-CATEGORY
|
803
|
+
* @applicableIdentity APP
|
804
|
+
* @returns Category info.
|
805
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.CreateCategory
|
806
|
+
*/
|
807
|
+
declare function createCategory(category: NonNullablePaths<Category, `label`>, options?: CreateCategoryOptions): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>>;
|
742
808
|
interface CreateCategoryOptions {
|
743
809
|
/**
|
744
810
|
* List of additional category fields to include in the response. By default
|
@@ -750,6 +816,18 @@ interface CreateCategoryOptions {
|
|
750
816
|
*/
|
751
817
|
fieldsets?: FieldWithLiterals[];
|
752
818
|
}
|
819
|
+
/**
|
820
|
+
* Updates a category.
|
821
|
+
* @param _id - Category ID.
|
822
|
+
* @public
|
823
|
+
* @requiredField _id
|
824
|
+
* @requiredField category
|
825
|
+
* @permissionId BLOG.EDIT-CATEGORY
|
826
|
+
* @applicableIdentity APP
|
827
|
+
* @returns Category info.
|
828
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.UpdateCategory
|
829
|
+
*/
|
830
|
+
declare function updateCategory(_id: string, category: UpdateCategory, options?: UpdateCategoryOptions): Promise<NonNullablePaths<Category, CategoryNonNullablePaths>>;
|
753
831
|
interface UpdateCategory {
|
754
832
|
/**
|
755
833
|
* Category ID.
|
@@ -829,6 +907,20 @@ interface UpdateCategoryOptions {
|
|
829
907
|
*/
|
830
908
|
fieldsets?: FieldWithLiterals[];
|
831
909
|
}
|
910
|
+
/**
|
911
|
+
* Gets a category with the specified ID.
|
912
|
+
* @param categoryId - Category ID.
|
913
|
+
* @public
|
914
|
+
* @requiredField categoryId
|
915
|
+
* @param options - Options specifying which fields to return.
|
916
|
+
* @permissionId BLOG.READ-CATEGORY
|
917
|
+
* @applicableIdentity APP
|
918
|
+
* @applicableIdentity VISITOR
|
919
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategory
|
920
|
+
*/
|
921
|
+
declare function getCategory(categoryId: string, options?: GetCategoryOptions): Promise<NonNullablePaths<GetCategoryResponse, {
|
922
|
+
[P in CategoryNonNullablePaths]: `category.${P}`;
|
923
|
+
}[CategoryNonNullablePaths]>>;
|
832
924
|
interface GetCategoryOptions {
|
833
925
|
/**
|
834
926
|
* List of additional category fields to include in the response. By default
|
@@ -840,6 +932,26 @@ interface GetCategoryOptions {
|
|
840
932
|
*/
|
841
933
|
fieldsets?: FieldWithLiterals[];
|
842
934
|
}
|
935
|
+
/**
|
936
|
+
* Gets a category with the specified slug.
|
937
|
+
*
|
938
|
+
* The slug is at the end of the URL of a specific category.
|
939
|
+
* For example, if a category's URL is `https://example.com/blog/categories/famous-cats`, the slug is `famous-cats`.
|
940
|
+
* The slug is a case-sensitive string that is derived from the category's label, unless specified otherwise.
|
941
|
+
* @public
|
942
|
+
* @requiredField slug
|
943
|
+
* @param slug - Slug of the category to retrieve.
|
944
|
+
*
|
945
|
+
* The end of a category's URL. For example, `'https:/example.com/blog/category/{my-category-slug}'`. Case sensitive and generally based on the category `label` if not specified.
|
946
|
+
* @param options - Options specifying which fields to return.
|
947
|
+
* @permissionId BLOG.READ-CATEGORY
|
948
|
+
* @applicableIdentity APP
|
949
|
+
* @applicableIdentity VISITOR
|
950
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategoryBySlug
|
951
|
+
*/
|
952
|
+
declare function getCategoryBySlug(slug: string, options?: GetCategoryBySlugOptions): Promise<NonNullablePaths<GetCategoryBySlugResponse, {
|
953
|
+
[P in CategoryNonNullablePaths]: `category.${P}`;
|
954
|
+
}[CategoryNonNullablePaths]>>;
|
843
955
|
interface GetCategoryBySlugOptions {
|
844
956
|
/**
|
845
957
|
* List of additional category fields to include in the response. By default
|
@@ -857,6 +969,29 @@ interface GetCategoryBySlugOptions {
|
|
857
969
|
*/
|
858
970
|
language?: string | null;
|
859
971
|
}
|
972
|
+
/**
|
973
|
+
* Retrieves a list of up to 100 categories per request.
|
974
|
+
*
|
975
|
+
* If you pass a language filter to the method, it returns a list of up to 100 categories in the requested language.
|
976
|
+
*
|
977
|
+
* The categoies are displayed in order of their `displayPosition`, starting with `0`. The `displayPosition` is the position in which the categories
|
978
|
+
* are displayed in the Category Menu page. By default, categories get added to the bottom of the Category Menu page with a `displayPosition` of `-1`.
|
979
|
+
*
|
980
|
+
* List Categories runs with these defaults, which you can override:
|
981
|
+
* - `paging.limit` is `50`.
|
982
|
+
* - `paging.offset` is `0`.
|
983
|
+
*
|
984
|
+
* List Categories is sorted by `displayPosition` in descending order. This cannot be overridden.
|
985
|
+
* @public
|
986
|
+
* @param options - Filter and paging options.
|
987
|
+
* @permissionId BLOG.READ-CATEGORY
|
988
|
+
* @applicableIdentity APP
|
989
|
+
* @applicableIdentity VISITOR
|
990
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories
|
991
|
+
*/
|
992
|
+
declare function listCategories(options?: ListCategoriesOptions): Promise<NonNullablePaths<ListCategoriesResponse, {
|
993
|
+
[P in CategoryNonNullablePaths]: `categories.${number}.${P}`;
|
994
|
+
}[CategoryNonNullablePaths] | `metaData.count` | `metaData.offset` | `metaData.total`>>;
|
860
995
|
interface ListCategoriesOptions {
|
861
996
|
/** Pagination options. */
|
862
997
|
paging?: BlogPaging;
|
@@ -879,6 +1014,29 @@ interface ListCategoriesOptions {
|
|
879
1014
|
*/
|
880
1015
|
language?: string | null;
|
881
1016
|
}
|
1017
|
+
/**
|
1018
|
+
* Creates a query to retrieve a list of categories.
|
1019
|
+
*
|
1020
|
+
*
|
1021
|
+
* The Query Categories method builds a query to retrieve a list of up to 100 categories per language, and returns a [`CategoriesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/categories-query-builder/ascending) object.
|
1022
|
+
*
|
1023
|
+
* The response contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/categories-query-builder/find) method.
|
1024
|
+
*
|
1025
|
+
* You can refine the query by chaining `CategoriesQueryBuilder` methods to the query. `CategoriesQueryBuilder` methods enable you to sort, filter, and control the results that Query Categories returns. Any methods chained to the Query Categories method are applied in the order that they are called.
|
1026
|
+
*
|
1027
|
+
* Query Categories runs with these `CategoriesQueryBuilder` defaults, which you can override.
|
1028
|
+
* - [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/categories-query-builder/limit)
|
1029
|
+
* - [`ascending(displayPosition)`](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/categories-query-builder/ascending)
|
1030
|
+
*
|
1031
|
+
* The following `CategoriesQueryBuilder` methods are supported for Query Categories. For a full description of the `Categories` object, see the response for the [`items`](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/categories-query-result/items) property in [`CategoriesQueryResult`](https://www.wix.com/velo/reference/wix-blog-backend/categories/categoriesqueryresult).
|
1032
|
+
* @public
|
1033
|
+
* @param options - Options specifying which fields to return.
|
1034
|
+
* @permissionId BLOG.READ-CATEGORY
|
1035
|
+
* @applicableIdentity APP
|
1036
|
+
* @applicableIdentity VISITOR
|
1037
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.QueryCategories
|
1038
|
+
*/
|
1039
|
+
declare function queryCategories(options?: QueryCategoriesOptions): CategoriesQueryBuilder;
|
882
1040
|
interface QueryCategoriesOptions {
|
883
1041
|
/**
|
884
1042
|
|
@@ -942,5 +1100,15 @@ interface CategoriesQueryBuilder {
|
|
942
1100
|
skip: (skip: number) => CategoriesQueryBuilder;
|
943
1101
|
find: () => Promise<CategoriesQueryResult>;
|
944
1102
|
}
|
1103
|
+
/**
|
1104
|
+
* Deletes a category.
|
1105
|
+
* @param categoryId - Category ID.
|
1106
|
+
* @public
|
1107
|
+
* @requiredField categoryId
|
1108
|
+
* @permissionId BLOG.DELETE-CATEGORY
|
1109
|
+
* @applicableIdentity APP
|
1110
|
+
* @fqn com.wixpress.npm.communities.platformized.blog.v3.CategoryService.DeleteCategory
|
1111
|
+
*/
|
1112
|
+
declare function deleteCategory(categoryId: string): Promise<void>;
|
945
1113
|
|
946
|
-
export { type
|
1114
|
+
export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BlogPaging, type BulkActionMetadata, type BulkCategoryResult, type BulkCreateCategoriesRequest, type BulkCreateCategoriesResponse, type BulkDeleteCategoryRequest, type BulkDeleteCategoryResponse, type BulkUpdateCategoriesRequest, type BulkUpdateCategoriesResponse, type CategoriesQueryBuilder, type CategoriesQueryResult, type Category, type CategoryCreatedEnvelope, type CategoryDeletedEnvelope, type CategoryLanguageCount, type CategoryTranslation, type CategoryUpdatedEnvelope, type CreateCategoryOptions, type CreateCategoryRequest, type CreateCategoryResponse, type CursorPaging, type Cursors, type DeleteCategoryRequest, type DeleteCategoryResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, Field, type FieldWithLiterals, type FocalPoint, type GetCategoriesCountByLanguageRequest, type GetCategoriesCountByLanguageResponse, type GetCategoryBySlugOptions, type GetCategoryBySlugRequest, type GetCategoryBySlugResponse, type GetCategoryOptions, type GetCategoryRequest, type GetCategoryResponse, type IdentificationData, type IdentificationDataIdOneOf, type InitialCategoriesCopied, type ItemMetadata, type Keyword, type ListCategoriesOptions, type ListCategoriesRequest, type ListCategoriesResponse, type MaskedCategory, type MessageEnvelope, type MetaData, type Paging, type PagingMetadataV2, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type QueryCategoriesOptions, type QueryCategoriesRequest, type QueryCategoriesResponse, type RestoreInfo, type SeoSchema, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, type Tag, type UpdateCategory, type UpdateCategoryOptions, type UpdateCategoryRequest, type UpdateCategoryResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createCategory, deleteCategory, getCategory, getCategoryBySlug, listCategories, onCategoryCreated, onCategoryDeleted, onCategoryUpdated, queryCategories, updateCategory };
|