@zlooks.cn/blog-shared 1.0.0 → 1.0.2

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 (65) hide show
  1. package/dist/events/catalog.d.ts +2 -0
  2. package/dist/events/catalog.d.ts.map +1 -0
  3. package/dist/events/catalog.js +80 -0
  4. package/dist/events/catalog.js.map +1 -0
  5. package/dist/events/comment-deleted.d.ts +33 -0
  6. package/dist/events/comment-deleted.d.ts.map +1 -0
  7. package/dist/events/comment-deleted.js +16 -0
  8. package/dist/events/comment-deleted.js.map +1 -0
  9. package/dist/events/comment-reply-changed.d.ts +45 -0
  10. package/dist/events/comment-reply-changed.d.ts.map +1 -0
  11. package/dist/events/comment-reply-changed.js +15 -0
  12. package/dist/events/comment-reply-changed.js.map +1 -0
  13. package/dist/events/comment-status-changed.d.ts +51 -0
  14. package/dist/events/comment-status-changed.d.ts.map +1 -0
  15. package/dist/events/comment-status-changed.js +16 -0
  16. package/dist/events/comment-status-changed.js.map +1 -0
  17. package/dist/events/comment-submitted.d.ts +45 -0
  18. package/dist/events/comment-submitted.d.ts.map +1 -0
  19. package/dist/events/comment-submitted.js +15 -0
  20. package/dist/events/comment-submitted.js.map +1 -0
  21. package/dist/events/definition.d.ts +3 -0
  22. package/dist/events/definition.d.ts.map +1 -0
  23. package/dist/events/definition.js +10 -0
  24. package/dist/events/definition.js.map +1 -0
  25. package/dist/events/page-archived.d.ts +45 -0
  26. package/dist/events/page-archived.d.ts.map +1 -0
  27. package/dist/events/page-archived.js +15 -0
  28. package/dist/events/page-archived.js.map +1 -0
  29. package/dist/events/page-publication-updated.d.ts +54 -0
  30. package/dist/events/page-publication-updated.d.ts.map +1 -0
  31. package/dist/events/page-publication-updated.js +23 -0
  32. package/dist/events/page-publication-updated.js.map +1 -0
  33. package/dist/events/page-published.d.ts +45 -0
  34. package/dist/events/page-published.d.ts.map +1 -0
  35. package/dist/events/page-published.js +15 -0
  36. package/dist/events/page-published.js.map +1 -0
  37. package/dist/events/post-archived.d.ts +64 -0
  38. package/dist/events/post-archived.d.ts.map +1 -0
  39. package/dist/events/post-archived.js +15 -0
  40. package/dist/events/post-archived.js.map +1 -0
  41. package/dist/events/post-publication-updated.d.ts +74 -0
  42. package/dist/events/post-publication-updated.d.ts.map +1 -0
  43. package/dist/events/post-publication-updated.js +23 -0
  44. package/dist/events/post-publication-updated.js.map +1 -0
  45. package/dist/events/post-published.d.ts +64 -0
  46. package/dist/events/post-published.d.ts.map +1 -0
  47. package/dist/events/post-published.js +15 -0
  48. package/dist/events/post-published.js.map +1 -0
  49. package/dist/events/snapshots.d.ts +105 -0
  50. package/dist/events/snapshots.d.ts.map +1 -0
  51. package/dist/events/snapshots.js +56 -0
  52. package/dist/events/snapshots.js.map +1 -0
  53. package/dist/index.d.ts +13 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +13 -0
  56. package/dist/index.js.map +1 -1
  57. package/dist/management.d.ts +1207 -0
  58. package/dist/management.d.ts.map +1 -0
  59. package/dist/management.js +572 -0
  60. package/dist/management.js.map +1 -0
  61. package/dist/micro.d.ts +94 -1
  62. package/dist/micro.d.ts.map +1 -1
  63. package/dist/micro.js +75 -2
  64. package/dist/micro.js.map +1 -1
  65. package/package.json +6 -4
package/dist/micro.d.ts CHANGED
@@ -1,17 +1,105 @@
1
- import { type BlogCategoryListItem, type BlogCommentListInput, type BlogRecentComment, type BlogRecentCommentListInput, type BlogFriendLink, type BlogPageListInput, type BlogPageSummary, type BlogReadPageInput, type BlogReadPageResponse, type BlogListCommentsResponse, type BlogPostList, type BlogPostArchive, type BlogPostArchiveInput, type BlogPostConnectionsInput, type BlogReadPostConnectionsResponse, type BlogPostListInput, type BlogReadPostInput, type BlogReadPostResponse, type BlogOpenPostResponse, type BlogTagSummary } from '@zlooks.cn/blog-schema';
1
+ import { type BlogCategoryListItem, type BlogCommentListInput, type BlogCreateCommentInput, type BlogCreateCommentResponse, type BlogRecentComment, type BlogRecentCommentListInput, type BlogFriendLink, type BlogPageListInput, type BlogPageSummary, type BlogReadPageInput, type BlogReadPageResponse, type BlogListCommentsResponse, type BlogPostList, type BlogPostArchive, type BlogPostArchiveInput, type BlogPostConnectionsInput, type BlogReadPostConnectionsResponse, type BlogPostListInput, type BlogPostSearchInput, type BlogPostSearchResult, type BlogReadPostInput, type BlogReadPostResponse, type BlogOpenPostResponse, type BlogTagSummary, type BlogSetPostLikedInput, type BlogSetPostLikedResponse } from '@zlooks.cn/blog-schema';
2
2
  import type { ExecutionContext } from '@hile/context';
3
+ import { z } from 'zod';
3
4
  export declare const BLOG_LIST_POSTS_OPERATION = "/public/posts/list";
5
+ export declare const BLOG_SEARCH_POSTS_OPERATION = "/public/posts/search";
4
6
  export declare const BLOG_LIST_POST_ARCHIVE_OPERATION = "/public/posts/archive";
5
7
  export declare const BLOG_READ_POST_OPERATION = "/public/posts/read";
6
8
  export declare const BLOG_OPEN_POST_OPERATION = "/public/posts/open";
7
9
  export declare const BLOG_READ_POST_CONNECTIONS_OPERATION = "/public/posts/connections";
8
10
  export declare const BLOG_LIST_COMMENTS_OPERATION = "/public/comments/list";
11
+ export declare const BLOG_CREATE_COMMENT_OPERATION = "/public/comments/create";
12
+ export declare const BLOG_SET_POST_LIKED_OPERATION = "/public/posts/set-liked";
9
13
  export declare const BLOG_LIST_RECENT_COMMENTS_OPERATION = "/public/comments/recent";
10
14
  export declare const BLOG_LIST_CATEGORIES_OPERATION = "/public/categories/list";
11
15
  export declare const BLOG_LIST_TAGS_OPERATION = "/public/tags/list";
12
16
  export declare const BLOG_LIST_FRIEND_LINKS_OPERATION = "/public/friend-links/list";
13
17
  export declare const BLOG_LIST_PAGES_OPERATION = "/public/pages/list";
14
18
  export declare const BLOG_READ_PAGE_OPERATION = "/public/pages/read";
19
+ export declare const BLOG_READ_THEME_AUTHORING_CONTRACT_OPERATION = "/resources/theme-authoring-contract";
20
+ export declare const BLOG_READ_EVENT_CATALOG_OPERATION = "/resources/event-catalog";
21
+ export declare const blogResourceDocumentSchema: z.ZodJSONSchema;
22
+ export declare const blogListPostsMicroResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
23
+ outcome: z.ZodLiteral<"ok">;
24
+ data: z.ZodReadonly<z.ZodObject<{
25
+ items: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
26
+ id: z.ZodUUID;
27
+ category: z.ZodReadonly<z.ZodObject<{
28
+ id: z.ZodUUID;
29
+ name: z.ZodString;
30
+ slug: z.ZodReadonly<z.ZodString>;
31
+ description: z.ZodNullable<z.ZodString>;
32
+ sortOrder: z.ZodNumber;
33
+ }, z.core.$strict>>;
34
+ title: z.ZodString;
35
+ slug: z.ZodReadonly<z.ZodString>;
36
+ summary: z.ZodNullable<z.ZodString>;
37
+ coverUrl: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodURL]>>;
38
+ publishedAt: z.ZodISODateTime;
39
+ updatedAt: z.ZodISODateTime;
40
+ tags: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
41
+ id: z.ZodUUID;
42
+ name: z.ZodString;
43
+ slug: z.ZodReadonly<z.ZodString>;
44
+ }, z.core.$strict>>>>;
45
+ }, z.core.$strict>>>>;
46
+ nextCursor: z.ZodNullable<z.ZodUUID>;
47
+ total: z.ZodNumber;
48
+ }, z.core.$strict>>;
49
+ }, z.core.$strict>, z.ZodObject<{
50
+ outcome: z.ZodLiteral<"invalid-cursor">;
51
+ }, z.core.$strict>], "outcome">;
52
+ export declare const blogCreateCommentMicroResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
+ outcome: z.ZodLiteral<"ok">;
54
+ data: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
55
+ authenticated: z.ZodLiteral<false>;
56
+ }, z.core.$strict>, z.ZodObject<{
57
+ authenticated: z.ZodLiteral<true>;
58
+ comment: z.ZodReadonly<z.ZodObject<{
59
+ id: z.ZodUUID;
60
+ postId: z.ZodUUID;
61
+ user: z.ZodReadonly<z.ZodObject<{
62
+ id: z.ZodUUID;
63
+ displayName: z.ZodNullable<z.ZodString>;
64
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodURL]>>;
65
+ homepage: z.ZodNullable<z.ZodURL>;
66
+ bio: z.ZodNullable<z.ZodString>;
67
+ }, z.core.$strict>>;
68
+ content: z.ZodString;
69
+ replyContent: z.ZodNullable<z.ZodString>;
70
+ repliedAt: z.ZodNullable<z.ZodISODateTime>;
71
+ createdAt: z.ZodISODateTime;
72
+ location: z.ZodNullable<z.ZodString>;
73
+ client: z.ZodNullable<z.ZodString>;
74
+ pendingReview: z.ZodOptional<z.ZodLiteral<true>>;
75
+ }, z.core.$strict>>;
76
+ }, z.core.$strict>], "authenticated">>;
77
+ }, z.core.$strict>, z.ZodObject<{
78
+ outcome: z.ZodLiteral<"conflict">;
79
+ }, z.core.$strict>], "outcome">;
80
+ export declare const blogSetPostLikedMicroResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
+ outcome: z.ZodLiteral<"ok">;
82
+ data: z.ZodReadonly<z.ZodDiscriminatedUnion<[z.ZodObject<{
83
+ authenticated: z.ZodLiteral<false>;
84
+ }, z.core.$strict>, z.ZodObject<{
85
+ authenticated: z.ZodLiteral<true>;
86
+ result: z.ZodReadonly<z.ZodObject<{
87
+ liked: z.ZodBoolean;
88
+ likeCount: z.ZodNumber;
89
+ }, z.core.$strict>>;
90
+ }, z.core.$strict>], "authenticated">>;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ outcome: z.ZodLiteral<"conflict">;
93
+ }, z.core.$strict>], "outcome">;
94
+ export declare class BlogPostCursorInvalidError extends Error {
95
+ constructor();
96
+ }
97
+ export declare class BlogCommentRejectedError extends Error {
98
+ constructor();
99
+ }
100
+ export declare class BlogEngagementRejectedError extends Error {
101
+ constructor();
102
+ }
15
103
  export interface BlogMicroCallOptions {
16
104
  readonly context: ExecutionContext;
17
105
  readonly timeout?: number;
@@ -23,17 +111,22 @@ export interface BlogMicroCaller {
23
111
  }
24
112
  export interface BlogMicroClient {
25
113
  listPosts(input: BlogPostListInput, options: BlogMicroCallOptions): Promise<BlogPostList>;
114
+ searchPosts(input: BlogPostSearchInput, options: BlogMicroCallOptions): Promise<BlogPostSearchResult>;
26
115
  listPostArchive(input: BlogPostArchiveInput, options: BlogMicroCallOptions): Promise<BlogPostArchive>;
27
116
  readPost(input: BlogReadPostInput, options: BlogMicroCallOptions): Promise<BlogReadPostResponse>;
28
117
  openPost(input: BlogReadPostInput, options: BlogMicroCallOptions): Promise<BlogOpenPostResponse>;
29
118
  readPostConnections(input: BlogPostConnectionsInput, options: BlogMicroCallOptions): Promise<BlogReadPostConnectionsResponse>;
30
119
  listComments(input: BlogCommentListInput, options: BlogMicroCallOptions): Promise<BlogListCommentsResponse>;
120
+ createComment(input: BlogCreateCommentInput, options: BlogMicroCallOptions): Promise<BlogCreateCommentResponse>;
121
+ setPostLiked(input: BlogSetPostLikedInput, options: BlogMicroCallOptions): Promise<BlogSetPostLikedResponse>;
31
122
  listRecentComments(input: BlogRecentCommentListInput, options: BlogMicroCallOptions): Promise<readonly BlogRecentComment[]>;
32
123
  listCategories(options: BlogMicroCallOptions): Promise<readonly BlogCategoryListItem[]>;
33
124
  listTags(options: BlogMicroCallOptions): Promise<readonly BlogTagSummary[]>;
34
125
  listFriendLinks(options: BlogMicroCallOptions): Promise<readonly BlogFriendLink[]>;
35
126
  listPages(input: BlogPageListInput, options: BlogMicroCallOptions): Promise<readonly BlogPageSummary[]>;
36
127
  readPage(input: BlogReadPageInput, options: BlogMicroCallOptions): Promise<BlogReadPageResponse>;
128
+ readThemeAuthoringContract(options: BlogMicroCallOptions): Promise<z.infer<typeof blogResourceDocumentSchema>>;
129
+ readEventCatalog(options: BlogMicroCallOptions): Promise<z.infer<typeof blogResourceDocumentSchema>>;
37
130
  }
38
131
  export declare function createBlogMicroClient(caller: BlogMicroCaller): BlogMicroClient;
39
132
  //# sourceMappingUR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Ac,CACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAC;IAC5E,eAAe,CACb,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC,CAAC;IACtC,SAAS,CACP,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC;IACvC,QAAQ,CACN,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjC,0BAA0B,CACxB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC;IACvD,gBAAgB,CACd,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC;CACxD;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,eAAe,GACtB,eAAe,CA4IjB"}
package/dist/micro.js CHANGED
@@ -1,23 +1,74 @@
1
- import { blogCategoryListSchema, blogCommentListInputSchema, blogRecentCommentListInputSchema, blogRecentCommentListSchema, blogEmptyRequestSchema, blogFriendLinkListSchema, blogPageListInputSchema, blogPageListSchema, blogReadPageInputSchema, blogReadPageResponseSchema, blogListCommentsResponseSchema, blogPostListInputSchema, blogPostListSchema, blogPostArchiveInputSchema, blogPostArchiveSchema, blogPostConnectionsInputSchema, blogReadPostConnectionsResponseSchema, blogReadPostInputSchema, blogReadPostResponseSchema, blogOpenPostResponseSchema, blogTagListSchema, } from '@zlooks.cn/blog-schema';
1
+ import { blogCategoryListSchema, blogCommentListInputSchema, blogCreateCommentInputSchema, blogCreateCommentResponseSchema, blogRecentCommentListInputSchema, blogRecentCommentListSchema, blogEmptyRequestSchema, blogFriendLinkListSchema, blogPageListInputSchema, blogPageListSchema, blogReadPageInputSchema, blogReadPageResponseSchema, blogListCommentsResponseSchema, blogPostListInputSchema, blogPostListSchema, blogPostSearchInputSchema, blogPostSearchResultSchema, blogPostArchiveInputSchema, blogPostArchiveSchema, blogPostConnectionsInputSchema, blogReadPostConnectionsResponseSchema, blogReadPostInputSchema, blogReadPostResponseSchema, blogOpenPostResponseSchema, blogTagListSchema, blogSetPostLikedInputSchema, blogSetPostLikedResponseSchema, } from '@zlooks.cn/blog-schema';
2
+ import { z } from 'zod';
2
3
  import { BLOG_SERVICE_NAMESPACE } from './identity.js';
3
4
  export const BLOG_LIST_POSTS_OPERATION = '/public/posts/list';
5
+ export const BLOG_SEARCH_POSTS_OPERATION = '/public/posts/search';
4
6
  export const BLOG_LIST_POST_ARCHIVE_OPERATION = '/public/posts/archive';
5
7
  export const BLOG_READ_POST_OPERATION = '/public/posts/read';
6
8
  export const BLOG_OPEN_POST_OPERATION = '/public/posts/open';
7
9
  export const BLOG_READ_POST_CONNECTIONS_OPERATION = '/public/posts/connections';
8
10
  export const BLOG_LIST_COMMENTS_OPERATION = '/public/comments/list';
11
+ export const BLOG_CREATE_COMMENT_OPERATION = '/public/comments/create';
12
+ export const BLOG_SET_POST_LIKED_OPERATION = '/public/posts/set-liked';
9
13
  export const BLOG_LIST_RECENT_COMMENTS_OPERATION = '/public/comments/recent';
10
14
  export const BLOG_LIST_CATEGORIES_OPERATION = '/public/categories/list';
11
15
  export const BLOG_LIST_TAGS_OPERATION = '/public/tags/list';
12
16
  export const BLOG_LIST_FRIEND_LINKS_OPERATION = '/public/friend-links/list';
13
17
  export const BLOG_LIST_PAGES_OPERATION = '/public/pages/list';
14
18
  export const BLOG_READ_PAGE_OPERATION = '/public/pages/read';
19
+ export const BLOG_READ_THEME_AUTHORING_CONTRACT_OPERATION = '/resources/theme-authoring-contract';
20
+ export const BLOG_READ_EVENT_CATALOG_OPERATION = '/resources/event-catalog';
21
+ export const blogResourceDocumentSchema = z.json();
22
+ export const blogListPostsMicroResponseSchema = z.discriminatedUnion('outcome', [
23
+ z.strictObject({ outcome: z.literal('ok'), data: blogPostListSchema }),
24
+ z.strictObject({ outcome: z.literal('invalid-cursor') }),
25
+ ]);
26
+ export const blogCreateCommentMicroResponseSchema = z.discriminatedUnion('outcome', [
27
+ z.strictObject({
28
+ outcome: z.literal('ok'),
29
+ data: blogCreateCommentResponseSchema,
30
+ }),
31
+ z.strictObject({ outcome: z.literal('conflict') }),
32
+ ]);
33
+ export const blogSetPostLikedMicroResponseSchema = z.discriminatedUnion('outcome', [
34
+ z.strictObject({
35
+ outcome: z.literal('ok'),
36
+ data: blogSetPostLikedResponseSchema,
37
+ }),
38
+ z.strictObject({ outcome: z.literal('conflict') }),
39
+ ]);
40
+ export class BlogPostCursorInvalidError extends Error {
41
+ constructor() {
42
+ super('The Blog post cursor is no longer valid');
43
+ this.name = 'BlogPostCursorInvalidError';
44
+ }
45
+ }
46
+ export class BlogCommentRejectedError extends Error {
47
+ constructor() {
48
+ super('The Blog post cannot accept this comment');
49
+ this.name = 'BlogCommentRejectedError';
50
+ }
51
+ }
52
+ export class BlogEngagementRejectedError extends Error {
53
+ constructor() {
54
+ super('The Blog post cannot accept this engagement');
55
+ this.name = 'BlogEngagementRejectedError';
56
+ }
57
+ }
15
58
  export function createBlogMicroClient(caller) {
16
59
  const call = async (operation, request, options) => caller.call(BLOG_SERVICE_NAMESPACE, operation, request, options);
17
60
  const client = {
18
61
  async listPosts(input, options) {
19
62
  const request = blogPostListInputSchema.parse(input);
20
- return blogPostListSchema.parse(await call(BLOG_LIST_POSTS_OPERATION, request, options));
63
+ const response = blogListPostsMicroResponseSchema.parse(await call(BLOG_LIST_POSTS_OPERATION, request, options));
64
+ if (response.outcome === 'invalid-cursor') {
65
+ throw new BlogPostCursorInvalidError();
66
+ }
67
+ return response.data;
68
+ },
69
+ async searchPosts(input, options) {
70
+ const request = blogPostSearchInputSchema.parse(input);
71
+ return blogPostSearchResultSchema.parse(await call(BLOG_SEARCH_POSTS_OPERATION, request, options));
21
72
  },
22
73
  async listPostArchive(input, options) {
23
74
  const request = blogPostArchiveInputSchema.parse(input);
@@ -39,6 +90,22 @@ export function createBlogMicroClient(caller) {
39
90
  const request = blogCommentListInputSchema.parse(input);
40
91
  return blogListCommentsResponseSchema.parse(await call(BLOG_LIST_COMMENTS_OPERATION, request, options));
41
92
  },
93
+ async createComment(input, options) {
94
+ const request = blogCreateCommentInputSchema.parse(input);
95
+ const response = blogCreateCommentMicroResponseSchema.parse(await call(BLOG_CREATE_COMMENT_OPERATION, request, options));
96
+ if (response.outcome === 'conflict') {
97
+ throw new BlogCommentRejectedError();
98
+ }
99
+ return response.data;
100
+ },
101
+ async setPostLiked(input, options) {
102
+ const request = blogSetPostLikedInputSchema.parse(input);
103
+ const response = blogSetPostLikedMicroResponseSchema.parse(await call(BLOG_SET_POST_LIKED_OPERATION, request, options));
104
+ if (response.outcome === 'conflict') {
105
+ throw new BlogEngagementRejectedError();
106
+ }
107
+ return response.data;
108
+ },
42
109
  async listRecentComments(input, options) {
43
110
  const request = blogRecentCommentListInputSchema.parse(input);
44
111
  return blogRecentCommentListSchema.parse(await call(BLOG_LIST_RECENT_COMMENTS_OPERATION, request, options));
@@ -60,6 +127,12 @@ export function createBlogMicroClient(caller) {
60
127
  const request = blogReadPageInputSchema.parse(input);
61
128
  return blogReadPageResponseSchema.parse(await call(BLOG_READ_PAGE_OPERATION, request, options));
62
129
  },
130
+ async readThemeAuthoringContract(options) {
131
+ return blogResourceDocumentSchema.parse(await call(BLOG_READ_THEME_AUTHORING_CONTRACT_OPERATION, blogEmptyRequestSchema.parse({}), options));
132
+ },
133
+ async readEventCatalog(options) {
134
+ return blogResourceDocumentSchema.parse(await call(BLOG_READ_EVENT_CATALOG_OPERATION, blogEmptyRequestSchema.parse({}), options));
135
+ },
63
136
  };
64
137
  return Object.freeze(client);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AC,KAAK,CAAC,CAAC;YACrD,OAAO,0BAA0B,CAAC,KAAK,CACrC,MAAM,IAAI,CAAC,wBAAwB,EAAE,OAAO,EAAE,OAAO,CAAC,CACvD,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,0BAA0B,CAAC,OAAO;YACtC,OAAO,0BAA0B,CAAC,KAAK,CACrC,MAAM,IAAI,CACR,4CAA4C,EAC5C,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC,EAChC,OAAO,CACR,CACF,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,gBAAgB,CAAC,OAAO;YAC5B,OAAO,0BAA0B,CAAC,KAAK,CACrC,MAAM,IAAI,CACR,iCAAiC,EACjC,sBAAsB,CAAC,KAAK,CAAC,EAAE,CAAC,EAChC,OAAO,CACR,CACF,CAAC;QACJ,CAAC;KACF,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zlooks.cn/blog-shared",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,8 +19,10 @@
19
19
  "typecheck": "tsc -p tsconfig.json --noEmit"
20
20
  },
21
21
  "dependencies": {
22
- "@hile/context": "4.0.2",
23
- "@zlooks.cn/blog-schema": "1.0.0",
22
+ "@hile/context": "4.0.3",
23
+ "@zlooks.cn/blog-schema": "1.0.1",
24
+ "@zlooks.cn/event-bus": "1.0.2",
25
+ "@zlooks.cn/event-client": "1.0.2",
24
26
  "zod": "4.4.3"
25
27
  },
26
28
  "devDependencies": {
@@ -29,5 +31,5 @@
29
31
  "typescript": "7.0.2",
30
32
  "vitest": "4.1.11"
31
33
  },
32
- "gitHead": "a3e825c2a62561f73f49a54720e286f08da63429"
34
+ "gitHead": "3c7e3ec494a3702626a2b150991b136b89550e35"
33
35
  }