@webx-ui/module-blog 0.4.7 → 0.5.0

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/dist/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AdminContext } from '@webx-ui/module-admin';
2
- import { ArticleDetail, ArticleInput, ArticleQuery, ArticleRow, ArticleSave, ArticleVersion, ArticlesPage, BlogTag, RubricInput, RubricRow, RubricsPayload, TagInput, TagMassAction, TagMerged, TagQuery, TagRow, TagsPage } from './types';
2
+ import { ArticleDetail, ArticleInput, ArticleQuery, ArticleRow, ArticleSave, ArticleVersion, ArticlesPage, BlogTag, TagInput, TagMassAction, TagMerged, TagQuery, TagRow, TagsPage } from './types';
3
3
  export interface BlogApi {
4
4
  /** A page of articles, with what the filters over them can be set to. */
5
5
  articles(query?: ArticleQuery): Promise<ArticlesPage>;
@@ -30,18 +30,6 @@ export interface BlogApi {
30
30
  unpublish(id: number): Promise<ArticleRow>;
31
31
  remove(id: number): Promise<void>;
32
32
  restore(id: number): Promise<ArticleRow>;
33
- /** Every rubric there is, in the order the menu of the site has them (§6). */
34
- rubrics(): Promise<RubricsPayload>;
35
- createRubric(input: RubricInput): Promise<RubricRow>;
36
- saveRubric(id: number, input: RubricInput): Promise<RubricRow>;
37
- /**
38
- * Into the bin — refused with a 422 naming the number of articles while it still holds any
39
- * (§6). The panel keeps the button out of reach, so reaching this is somebody else's save
40
- * landing between the list and the click.
41
- */
42
- removeRubric(id: number): Promise<void>;
43
- /** The whole order, as it is on screen. */
44
- sortRubrics(ids: number[]): Promise<void>;
45
33
  /** A page of tags with the counts the pills wear (§10). */
46
34
  tagsPage(query?: TagQuery): Promise<TagsPage>;
47
35
  /** A rename, or the switch on the index. Only what travels is touched. */
@@ -52,5 +40,8 @@ export interface BlogApi {
52
40
  /** Several into one. Irreversible, and `redirect` is what outlives the tags that go (§6). */
53
41
  mergeTags(ids: number[], keep: number, redirect: boolean): Promise<TagMerged>;
54
42
  }
55
- /** Everything under `/blog`, below the panel's API path. */
43
+ /**
44
+ * Everything under `/blog`, below the panel's API path — except the rubrics, which are the
45
+ * panel's shared categories and are asked for with `createCategoriesApi(admin, 'blog/rubrics')`.
46
+ */
56
47
  export declare function createBlogApi(admin: AdminContext): BlogApi;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- export { blog, type BlogOptions } from './module';
1
+ export { blog, rubricsOptions, type BlogOptions } from './module';
2
2
  export { createBlogApi, type BlogApi } from './api';
3
3
  export { blogMessages } from './messages';
4
4
  export { articleEditorKey, provideArticleEditor, useArticleEditor, type ArticleEditorContext, } from './editor';
5
5
  export { default as WxArticlesPage } from './ArticlesPage';
6
- export { default as WxRubricsPage } from './RubricsPage';
7
- export { default as WxRubricDialog } from './RubricDialog';
8
6
  export { default as WxTagsPage } from './TagsPage';
9
7
  export { default as WxTagCreateDialog } from './TagCreateDialog';
10
8
  export { default as WxTagMergeDialog } from './TagMergeDialog';
@@ -12,9 +10,8 @@ export { default as WxArticleCreateDialog } from './ArticleCreateDialog';
12
10
  export { default as WxArticleEditorPage } from './ArticleEditorPage';
13
11
  export { default as WxArticleSlug } from './ArticleSlug';
14
12
  export { default as WxArticleAuthorField } from './ArticleAuthor';
15
- export { default as WxArticleRubrics } from './ArticleRubrics';
16
13
  export { default as WxArticleTags } from './ArticleTags';
17
14
  export { default as WxArticleRelated } from './ArticleRelated';
18
15
  export { default as WxArticleUnpublish } from './ArticleUnpublish';
19
16
  export { default as WxArticleHistory } from './ArticleHistory';
20
- export type { ArticleAuthor, ArticleConflict, ArticleCover, ArticleDetail, ArticleFilters, ArticleInput, ArticleOption, ArticleQuery, ArticleRow, ArticleSave, ArticleStatus, ArticleVersion, ArticlesPage, BlogNamed, BlogTag, RubricInput, RubricRow, RubricsPayload, TagCounts, TagIndexing, TagInput, TagMassAction, TagMerged, TagQuery, TagRow, TagsPage, } from './types';
17
+ export type { ArticleAuthor, ArticleConflict, ArticleCover, ArticleDetail, ArticleFilters, ArticleInput, ArticleOption, ArticleQuery, ArticleRow, ArticleSave, ArticleStatus, ArticleVersion, ArticlesPage, BlogNamed, BlogTag, RubricRow, TagCounts, TagIndexing, TagInput, TagMassAction, TagMerged, TagQuery, TagRow, TagsPage, } from './types';