@23blocks/block-content 3.3.7 → 3.4.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/index.esm.js CHANGED
@@ -1373,7 +1373,15 @@ function createSeriesService(transport, _config) {
1373
1373
  };
1374
1374
  }
1375
1375
 
1376
- function createContentBlock(transport, config) {
1376
+ /**
1377
+ * Create the Content block.
1378
+ *
1379
+ * @example
1380
+ * ```typescript
1381
+ * const block = createContentBlock(transport, { appId: 'xxx' });
1382
+ * const posts = await block.posts.list({ page: 1 });
1383
+ * ```
1384
+ */ function createContentBlock(transport, config) {
1377
1385
  return {
1378
1386
  posts: createPostsService(transport),
1379
1387
  postVersions: createPostVersionsService(transport),
@@ -1,21 +1,48 @@
1
1
  import type { Transport, BlockConfig, BlockMetadata } from '@23blocks/contracts';
2
2
  import { type PostsService, type PostVersionsService, type PostTemplatesService, type CommentsService, type CategoriesService, type TagsService, type ContentUsersService, type ModerationService, type ActivityService, type SeriesService } from './services/index.js';
3
+ /**
4
+ * Configuration for the Content block.
5
+ */
3
6
  export interface ContentBlockConfig extends BlockConfig {
7
+ /** Application ID */
4
8
  appId: string;
9
+ /** Tenant ID (optional, for multi-tenant setups) */
5
10
  tenantId?: string;
6
11
  }
12
+ /**
13
+ * Content management block interface.
14
+ */
7
15
  export interface ContentBlock {
16
+ /** Post CRUD operations */
8
17
  posts: PostsService;
18
+ /** Post version history management */
9
19
  postVersions: PostVersionsService;
20
+ /** Post template management */
10
21
  postTemplates: PostTemplatesService;
22
+ /** Comment management */
11
23
  comments: CommentsService;
24
+ /** Content category management */
12
25
  categories: CategoriesService;
26
+ /** Content tag management */
13
27
  tags: TagsService;
28
+ /** Content user management */
14
29
  users: ContentUsersService;
30
+ /** Content moderation operations */
15
31
  moderation: ModerationService;
32
+ /** Activity feed management */
16
33
  activity: ActivityService;
34
+ /** Content series management */
17
35
  series: SeriesService;
18
36
  }
37
+ /**
38
+ * Create the Content block.
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * const block = createContentBlock(transport, { appId: 'xxx' });
43
+ * const posts = await block.posts.list({ page: 1 });
44
+ * ```
45
+ */
19
46
  export declare function createContentBlock(transport: Transport, config: ContentBlockConfig): ContentBlock;
20
47
  export declare const contentBlockMetadata: BlockMetadata;
21
48
  //# sourceMappingURL=content.block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.block.d.ts","sourceRoot":"","sources":["../../../src/lib/content.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAWL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,mBAAmB,CAAC;IAClC,aAAa,EAAE,oBAAoB,CAAC;IACpC,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,kBAAkB,GACzB,YAAY,CAad;AAED,eAAO,MAAM,oBAAoB,EAAE,aAiBlC,CAAC"}
1
+ {"version":3,"file":"content.block.d.ts","sourceRoot":"","sources":["../../../src/lib/content.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAWL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,KAAK,EAAE,YAAY,CAAC;IACpB,sCAAsC;IACtC,YAAY,EAAE,mBAAmB,CAAC;IAClC,+BAA+B;IAC/B,aAAa,EAAE,oBAAoB,CAAC;IACpC,yBAAyB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,kCAAkC;IAClC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,6BAA6B;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,8BAA8B;IAC9B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,oCAAoC;IACpC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,+BAA+B;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,gCAAgC;IAChC,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,kBAAkB,GACzB,YAAY,CAad;AAED,eAAO,MAAM,oBAAoB,EAAE,aAiBlC,CAAC"}
@@ -7,14 +7,23 @@ import type { Comment, ListCommentsParams } from '../types/comment.js';
7
7
  export interface ActivityService {
8
8
  /**
9
9
  * Get activities for an identity (user)
10
+ * @param identityUniqueId - Unique ID of the identity to retrieve activities for
11
+ * @param params - Optional filtering and pagination parameters
12
+ * @returns Paginated list of Activity records with pagination metadata
10
13
  */
11
14
  getActivities(identityUniqueId: string, params?: ListActivitiesParams): Promise<PageResult<Activity>>;
12
15
  /**
13
16
  * Get comments by an identity (user)
17
+ * @param identityUniqueId - Unique ID of the identity to retrieve comments for
18
+ * @param params - Optional filtering and pagination parameters
19
+ * @returns Paginated list of Comment records with pagination metadata
14
20
  */
15
21
  getComments(identityUniqueId: string, params?: ListCommentsParams): Promise<PageResult<Comment>>;
16
22
  /**
17
23
  * Get the user's activity feed (activities from followed users)
24
+ * @param params - Optional filtering and pagination parameters
25
+ * @returns Paginated list of Activity records from followed users with pagination metadata
26
+ * @note Returns activities from users the current user follows, not the user's own activities
18
27
  */
19
28
  getFeed(params?: ListActivitiesParams): Promise<PageResult<Activity>>;
20
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"activity.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/activity.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIvE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,aAAa,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEtG;;OAEG;IACH,WAAW,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEjG;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;CACvE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACzB,eAAe,CAqDjB"}
1
+ {"version":3,"file":"activity.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/activity.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIvE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,aAAa,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEtG;;;;;OAKG;IACH,WAAW,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEjG;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;CACvE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACzB,eAAe,CAqDjB"}
@@ -3,15 +3,21 @@ import type { Category, CreateCategoryRequest, ListCategoriesParams } from '../t
3
3
  export interface CategoriesService {
4
4
  /**
5
5
  * List all categories
6
+ * @param params - Optional filtering and pagination parameters
7
+ * @returns Paginated list of Category records with pagination metadata
6
8
  */
7
9
  list(params?: ListCategoriesParams): Promise<PageResult<Category>>;
8
10
  /**
9
11
  * Get a category by unique ID
12
+ * @param uniqueId - Unique ID of the category to retrieve
13
+ * @returns The matching Category record
10
14
  */
11
15
  get(uniqueId: string): Promise<Category>;
12
16
  /**
13
17
  * Create a new category
14
- * Note: The API does not support update or delete operations for categories
18
+ * @param data - Category creation payload
19
+ * @returns The newly created Category record
20
+ * @note The API does not support update or delete operations for categories
15
21
  */
16
22
  create(data: CreateCategoryRequest): Promise<Category>;
17
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"categories.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/categories.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEnE;;OAEG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzC;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACxD;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAqC3G"}
1
+ {"version":3,"file":"categories.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/categories.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEnE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzC;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACxD;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAqC3G"}
@@ -3,33 +3,90 @@ import type { Comment, CreateCommentRequest, UpdateCommentRequest, ListCommentsP
3
3
  export interface CommentsService {
4
4
  /**
5
5
  * List comments for a post
6
+ * @param postUniqueId - Unique ID of the post to list comments for
7
+ * @param params - Optional filtering and pagination parameters
8
+ * @returns Paginated list of Comment records with pagination metadata
6
9
  */
7
10
  list(postUniqueId: string, params?: ListCommentsParams): Promise<PageResult<Comment>>;
8
11
  /**
9
12
  * Get a specific comment
13
+ * @param postUniqueId - Unique ID of the parent post
14
+ * @param uniqueId - Unique ID of the comment to retrieve
15
+ * @returns The matching Comment record
10
16
  */
11
17
  get(postUniqueId: string, uniqueId: string): Promise<Comment>;
12
18
  /**
13
19
  * Create a new comment on a post
20
+ * @param postUniqueId - Unique ID of the post to comment on
21
+ * @param data - Comment creation payload
22
+ * @returns The newly created Comment record
14
23
  */
15
24
  create(postUniqueId: string, data: CreateCommentRequest): Promise<Comment>;
16
25
  /**
17
26
  * Update a comment
27
+ * @param postUniqueId - Unique ID of the parent post
28
+ * @param uniqueId - Unique ID of the comment to update
29
+ * @param data - Fields to update on the comment
30
+ * @returns The updated Comment record
18
31
  */
19
32
  update(postUniqueId: string, uniqueId: string, data: UpdateCommentRequest): Promise<Comment>;
20
33
  /**
21
34
  * Delete a comment
35
+ * @param postUniqueId - Unique ID of the parent post
36
+ * @param uniqueId - Unique ID of the comment to delete
37
+ * @returns void on successful deletion
22
38
  */
23
39
  delete(postUniqueId: string, uniqueId: string): Promise<void>;
24
40
  /**
25
41
  * Reply to a comment (creates a nested comment)
42
+ * @param postUniqueId - Unique ID of the parent post
43
+ * @param parentCommentUniqueId - Unique ID of the comment being replied to
44
+ * @param data - Reply content (parentId is set automatically from parentCommentUniqueId)
45
+ * @returns The newly created reply Comment record
46
+ * @note The parentId field is omitted from the request since it is derived from parentCommentUniqueId
26
47
  */
27
48
  reply(postUniqueId: string, parentCommentUniqueId: string, data: Omit<CreateCommentRequest, 'parentId'>): Promise<Comment>;
49
+ /**
50
+ * Like a comment
51
+ * @param postUniqueId - Unique ID of the parent post
52
+ * @param uniqueId - Unique ID of the comment to like
53
+ * @returns The updated Comment record with engagement state
54
+ */
28
55
  like(postUniqueId: string, uniqueId: string): Promise<Comment>;
56
+ /**
57
+ * Dislike a comment
58
+ * @param postUniqueId - Unique ID of the parent post
59
+ * @param uniqueId - Unique ID of the comment to dislike
60
+ * @returns The updated Comment record with engagement state
61
+ */
29
62
  dislike(postUniqueId: string, uniqueId: string): Promise<Comment>;
63
+ /**
64
+ * Save a comment to the user's saved items
65
+ * @param postUniqueId - Unique ID of the parent post
66
+ * @param uniqueId - Unique ID of the comment to save
67
+ * @returns The updated Comment record with engagement state
68
+ */
30
69
  save(postUniqueId: string, uniqueId: string): Promise<Comment>;
70
+ /**
71
+ * Remove a comment from the user's saved items
72
+ * @param postUniqueId - Unique ID of the parent post
73
+ * @param uniqueId - Unique ID of the comment to unsave
74
+ * @returns The updated Comment record with engagement state
75
+ */
31
76
  unsave(postUniqueId: string, uniqueId: string): Promise<Comment>;
77
+ /**
78
+ * Follow a comment to receive notifications on updates
79
+ * @param postUniqueId - Unique ID of the parent post
80
+ * @param uniqueId - Unique ID of the comment to follow
81
+ * @returns The updated Comment record with engagement state
82
+ */
32
83
  follow(postUniqueId: string, uniqueId: string): Promise<Comment>;
84
+ /**
85
+ * Unfollow a comment to stop receiving notifications
86
+ * @param postUniqueId - Unique ID of the parent post
87
+ * @param uniqueId - Unique ID of the comment to unfollow
88
+ * @returns The updated Comment record with engagement state
89
+ */
33
90
  unfollow(postUniqueId: string, uniqueId: string): Promise<Comment>;
34
91
  }
35
92
  export declare function createCommentsService(transport: Transport, _config: {
@@ -1 +1 @@
1
- {"version":3,"file":"comments.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/comments.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEtF;;OAEG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9D;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3E;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7F;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAA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KG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAmGvG"}
@@ -6,30 +6,50 @@ import type { ModerationResult, ModerateContentRequest, ContentFlag, CreateConte
6
6
  export interface ModerationService {
7
7
  /**
8
8
  * Moderate a post
9
+ * @param postUniqueId - Unique ID of the post to moderate
10
+ * @param request - Moderation action and reason
11
+ * @returns ModerationResult with success status, action taken, and timestamp
9
12
  */
10
13
  moderatePost(postUniqueId: string, request: ModerateContentRequest): Promise<ModerationResult>;
11
14
  /**
12
15
  * Moderate a comment
16
+ * @param postUniqueId - Unique ID of the parent post
17
+ * @param commentUniqueId - Unique ID of the comment to moderate
18
+ * @param request - Moderation action and reason
19
+ * @returns ModerationResult with success status, action taken, and timestamp
20
+ * @note Uses HTTP DELETE internally despite accepting a request body
13
21
  */
14
22
  moderateComment(postUniqueId: string, commentUniqueId: string, request: ModerateContentRequest): Promise<ModerationResult>;
15
23
  /**
16
24
  * List content flags
25
+ * @param params - Optional filtering and pagination parameters
26
+ * @returns Paginated list of ContentFlag records with pagination metadata
17
27
  */
18
28
  listFlags(params?: ListContentFlagsParams): Promise<PageResult<ContentFlag>>;
19
29
  /**
20
30
  * Get a specific flag
31
+ * @param flagUniqueId - Unique ID of the flag to retrieve
32
+ * @returns The matching ContentFlag record
21
33
  */
22
34
  getFlag(flagUniqueId: string): Promise<ContentFlag>;
23
35
  /**
24
36
  * Create a content flag (report content)
37
+ * @param request - Flag details including content type, content ID, reason, and category
38
+ * @returns The newly created ContentFlag record
25
39
  */
26
40
  createFlag(request: CreateContentFlagRequest): Promise<ContentFlag>;
27
41
  /**
28
42
  * Resolve a content flag
43
+ * @param flagUniqueId - Unique ID of the flag to resolve
44
+ * @param resolution - Resolution description
45
+ * @returns The updated ContentFlag record with resolution applied
29
46
  */
30
47
  resolveFlag(flagUniqueId: string, resolution: string): Promise<ContentFlag>;
31
48
  /**
32
49
  * Dismiss a content flag
50
+ * @param flagUniqueId - Unique ID of the flag to dismiss
51
+ * @param reason - Optional reason for dismissal
52
+ * @returns void on successful dismissal
33
53
  */
34
54
  dismissFlag(flagUniqueId: string, reason?: string): Promise<void>;
35
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"moderation.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/moderation.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,WAAW,EACX,wBAAwB,EACxB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAGhC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE/F;;OAEG;IACH,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE3H;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAE7E;;OAEG;IACH,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpE;;OAEG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE5E;;OAEG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACzB,iBAAiB,CA+FnB"}
1
+ {"version":3,"file":"moderation.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/moderation.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,WAAW,EACX,wBAAwB,EACxB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAGhC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE/F;;;;;;;OAOG;IACH,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE3H;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAE7E;;;;OAIG;IACH,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpD;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEpE;;;;;OAKG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE5E;;;;;OAKG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACzB,iBAAiB,CA+FnB"}
@@ -1,10 +1,36 @@
1
1
  import type { Transport, PageResult } from '@23blocks/contracts';
2
2
  import type { PostTemplate, CreatePostTemplateRequest, UpdatePostTemplateRequest, ListPostTemplatesParams } from '../types/post-template.js';
3
3
  export interface PostTemplatesService {
4
+ /**
5
+ * List all post templates
6
+ * @param params - Optional filtering and pagination parameters
7
+ * @returns Paginated list of PostTemplate records with pagination metadata
8
+ */
4
9
  list(params?: ListPostTemplatesParams): Promise<PageResult<PostTemplate>>;
10
+ /**
11
+ * Get a post template by unique ID
12
+ * @param uniqueId - Unique ID of the template to retrieve
13
+ * @returns The matching PostTemplate record
14
+ */
5
15
  get(uniqueId: string): Promise<PostTemplate>;
16
+ /**
17
+ * Create a new post template
18
+ * @param data - Template creation payload including name, slug, and field definitions
19
+ * @returns The newly created PostTemplate record
20
+ */
6
21
  create(data: CreatePostTemplateRequest): Promise<PostTemplate>;
22
+ /**
23
+ * Update a post template
24
+ * @param uniqueId - Unique ID of the template to update
25
+ * @param data - Fields to update on the template
26
+ * @returns The updated PostTemplate record
27
+ */
7
28
  update(uniqueId: string, data: UpdatePostTemplateRequest): Promise<PostTemplate>;
29
+ /**
30
+ * Delete a post template
31
+ * @param uniqueId - Unique ID of the template to delete
32
+ * @returns void on successful deletion
33
+ */
8
34
  delete(uniqueId: string): Promise<void>;
9
35
  }
10
36
  export declare function createPostTemplatesService(transport: Transport, _config: {
@@ -1 +1 @@
1
- {"version":3,"file":"post-templates.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/post-templates.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1E,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7C,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/D,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACjF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CA+DjH"}
1
+ {"version":3,"file":"post-templates.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/post-templates.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE1E;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEjF;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CA+DjH"}
@@ -3,14 +3,25 @@ import type { PostVersion, ListPostVersionsParams } from '../types/post-version.
3
3
  export interface PostVersionsService {
4
4
  /**
5
5
  * List all versions of a post
6
+ * @param postUniqueId - Unique ID of the post to list versions for
7
+ * @param params - Optional filtering and pagination parameters
8
+ * @returns Paginated list of PostVersion records with pagination metadata
9
+ * @note Versions are extracted from the post's included relationships rather than a dedicated endpoint
6
10
  */
7
11
  list(postUniqueId: string, params?: ListPostVersionsParams): Promise<PageResult<PostVersion>>;
8
12
  /**
9
13
  * Get a specific version of a post
14
+ * @param postUniqueId - Unique ID of the parent post
15
+ * @param versionUniqueId - Unique ID of the version to retrieve
16
+ * @returns The matching PostVersion record
17
+ * @note Fetches the post with included versions and filters to the requested version; throws if not found
10
18
  */
11
19
  get(postUniqueId: string, versionUniqueId: string): Promise<PostVersion>;
12
20
  /**
13
21
  * Publish a specific version (makes it the current live version)
22
+ * @param postUniqueId - Unique ID of the parent post
23
+ * @param versionUniqueId - Unique ID of the version to publish
24
+ * @returns The published PostVersion record
14
25
  */
15
26
  publish(postUniqueId: string, versionUniqueId: string): Promise<PostVersion>;
16
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"post-versions.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/post-versions.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGpF,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F;;OAEG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzE;;OAEG;IACH,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CAC9E;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CAuD/G"}
1
+ {"version":3,"file":"post-versions.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/post-versions.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGpF,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F;;;;;;OAMG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzE;;;;;OAKG;IACH,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CAC9E;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CAuD/G"}
@@ -2,24 +2,127 @@ import type { Transport, PageResult } from '@23blocks/contracts';
2
2
  import type { Post, CreatePostRequest, UpdatePostRequest, ListPostsParams } from '../types/post.js';
3
3
  import type { PostValidationResult } from '../types/post-template.js';
4
4
  export interface PostsService {
5
+ /**
6
+ * List all posts
7
+ * @param params - Optional filtering, sorting, and pagination parameters
8
+ * @returns Paginated list of Post records with pagination metadata
9
+ */
5
10
  list(params?: ListPostsParams): Promise<PageResult<Post>>;
11
+ /**
12
+ * Query posts using advanced filters via POST
13
+ * @param params - Required filtering and pagination parameters
14
+ * @returns Paginated list of Post records with pagination metadata
15
+ * @note Uses POST for complex query payloads unlike the GET-based list method
16
+ */
6
17
  query(params: ListPostsParams): Promise<PageResult<Post>>;
18
+ /**
19
+ * Get a post by unique ID
20
+ * @param uniqueId - Unique ID of the post to retrieve
21
+ * @returns The matching Post record
22
+ */
7
23
  get(uniqueId: string): Promise<Post>;
24
+ /**
25
+ * Create a new post
26
+ * @param data - Post creation payload
27
+ * @returns The newly created Post record
28
+ */
8
29
  create(data: CreatePostRequest): Promise<Post>;
30
+ /**
31
+ * Update a post (partial update)
32
+ * @param uniqueId - Unique ID of the post to update
33
+ * @param data - Fields to update on the post
34
+ * @returns The updated Post record
35
+ */
9
36
  update(uniqueId: string, data: UpdatePostRequest): Promise<Post>;
37
+ /**
38
+ * Replace a post (full replacement)
39
+ * @param uniqueId - Unique ID of the post to replace
40
+ * @param data - Complete post data to replace the existing record
41
+ * @returns The replaced Post record
42
+ * @note Unlike update, this replaces the entire post content rather than merging fields
43
+ */
10
44
  replace(uniqueId: string, data: UpdatePostRequest): Promise<Post>;
45
+ /**
46
+ * Delete a post (soft delete)
47
+ * @param uniqueId - Unique ID of the post to delete
48
+ * @returns void on successful deletion
49
+ */
11
50
  delete(uniqueId: string): Promise<void>;
51
+ /**
52
+ * Recover a previously deleted post
53
+ * @param uniqueId - Unique ID of the deleted post to recover
54
+ * @returns The recovered Post record
55
+ */
12
56
  recover(uniqueId: string): Promise<Post>;
57
+ /**
58
+ * Search posts by query string
59
+ * @param query - Search query text
60
+ * @param params - Optional pagination parameters
61
+ * @returns Paginated list of matching Post records with pagination metadata
62
+ */
13
63
  search(query: string, params?: ListPostsParams): Promise<PageResult<Post>>;
64
+ /**
65
+ * List soft-deleted posts
66
+ * @param params - Optional pagination parameters
67
+ * @returns Paginated list of deleted Post records with pagination metadata
68
+ */
14
69
  listDeleted(params?: ListPostsParams): Promise<PageResult<Post>>;
70
+ /**
71
+ * Transfer ownership of a post to another user
72
+ * @param uniqueId - Unique ID of the post to transfer
73
+ * @param newOwnerUniqueId - Unique ID of the new owner
74
+ * @returns The updated Post record with new ownership
75
+ */
15
76
  changeOwner(uniqueId: string, newOwnerUniqueId: string): Promise<Post>;
77
+ /**
78
+ * Publish a specific version of a post
79
+ * @param uniqueId - Unique ID of the post
80
+ * @param versionUniqueId - Unique ID of the version to publish
81
+ * @returns The updated Post record reflecting the published version
82
+ */
16
83
  publishVersion(uniqueId: string, versionUniqueId: string): Promise<Post>;
84
+ /**
85
+ * Like a post
86
+ * @param uniqueId - Unique ID of the post to like
87
+ * @returns The updated Post record with engagement state
88
+ */
17
89
  like(uniqueId: string): Promise<Post>;
90
+ /**
91
+ * Remove a like from a post
92
+ * @param uniqueId - Unique ID of the post to dislike
93
+ * @returns The updated Post record with engagement state
94
+ */
18
95
  dislike(uniqueId: string): Promise<Post>;
96
+ /**
97
+ * Save a post to the user's saved items
98
+ * @param uniqueId - Unique ID of the post to save
99
+ * @returns The updated Post record with engagement state
100
+ */
19
101
  save(uniqueId: string): Promise<Post>;
102
+ /**
103
+ * Remove a post from the user's saved items
104
+ * @param uniqueId - Unique ID of the post to unsave
105
+ * @returns The updated Post record with engagement state
106
+ */
20
107
  unsave(uniqueId: string): Promise<Post>;
108
+ /**
109
+ * Follow a post to receive notifications on updates
110
+ * @param uniqueId - Unique ID of the post to follow
111
+ * @returns The updated Post record with engagement state
112
+ */
21
113
  follow(uniqueId: string): Promise<Post>;
114
+ /**
115
+ * Unfollow a post to stop receiving notifications
116
+ * @param uniqueId - Unique ID of the post to unfollow
117
+ * @returns The updated Post record with engagement state
118
+ */
22
119
  unfollow(uniqueId: string): Promise<Post>;
120
+ /**
121
+ * Validate a post against a post template
122
+ * @param uniqueId - Unique ID of the post to validate
123
+ * @param templateUniqueId - Unique ID of the template to validate against
124
+ * @returns PostValidationResult indicating whether the post conforms to the template
125
+ */
23
126
  validate(uniqueId: string, templateUniqueId: string): Promise<PostValidationResult>;
24
127
  }
25
128
  export declare function createPostsService(transport: Transport, _config: {
@@ -1 +1 @@
1
- {"version":3,"file":"posts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/posts.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAItE,MAAM,WAAW,YAAY;IAE3B,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,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,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACrF;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CA6LjG"}
@@ -2,21 +2,106 @@ import type { Transport, PageResult } from '@23blocks/contracts';
2
2
  import type { Series, CreateSeriesRequest, UpdateSeriesRequest, ListSeriesParams, QuerySeriesParams, ReorderPostsRequest } from '../types/series.js';
3
3
  import type { Post } from '../types/post.js';
4
4
  export interface SeriesService {
5
+ /**
6
+ * List all series
7
+ * @param params - Optional pagination parameters
8
+ * @returns Paginated list of Series records with pagination metadata
9
+ */
5
10
  list(params?: ListSeriesParams): Promise<PageResult<Series>>;
11
+ /**
12
+ * Query series using advanced filters via POST
13
+ * @param params - Required filtering and pagination parameters
14
+ * @returns Paginated list of Series records with pagination metadata
15
+ */
6
16
  query(params: QuerySeriesParams): Promise<PageResult<Series>>;
17
+ /**
18
+ * Get a series by unique ID
19
+ * @param uniqueId - Unique ID of the series to retrieve
20
+ * @returns The matching Series record
21
+ */
7
22
  get(uniqueId: string): Promise<Series>;
23
+ /**
24
+ * Create a new series
25
+ * @param data - Series creation payload
26
+ * @returns The newly created Series record
27
+ */
8
28
  create(data: CreateSeriesRequest): Promise<Series>;
29
+ /**
30
+ * Update a series
31
+ * @param uniqueId - Unique ID of the series to update
32
+ * @param data - Fields to update on the series
33
+ * @returns The updated Series record
34
+ */
9
35
  update(uniqueId: string, data: UpdateSeriesRequest): Promise<Series>;
36
+ /**
37
+ * Delete a series
38
+ * @param uniqueId - Unique ID of the series to delete
39
+ * @returns void on successful deletion
40
+ */
10
41
  delete(uniqueId: string): Promise<void>;
42
+ /**
43
+ * Like a series
44
+ * @param uniqueId - Unique ID of the series to like
45
+ * @returns The updated Series record with engagement state
46
+ */
11
47
  like(uniqueId: string): Promise<Series>;
48
+ /**
49
+ * Remove a like from a series
50
+ * @param uniqueId - Unique ID of the series to dislike
51
+ * @returns The updated Series record with engagement state
52
+ */
12
53
  dislike(uniqueId: string): Promise<Series>;
54
+ /**
55
+ * Follow a series to receive notifications on updates
56
+ * @param uniqueId - Unique ID of the series to follow
57
+ * @returns The updated Series record with engagement state
58
+ */
13
59
  follow(uniqueId: string): Promise<Series>;
60
+ /**
61
+ * Unfollow a series to stop receiving notifications
62
+ * @param uniqueId - Unique ID of the series to unfollow
63
+ * @returns void on successful unfollow
64
+ */
14
65
  unfollow(uniqueId: string): Promise<void>;
66
+ /**
67
+ * Save a series to the user's saved items
68
+ * @param uniqueId - Unique ID of the series to save
69
+ * @returns The updated Series record with engagement state
70
+ */
15
71
  save(uniqueId: string): Promise<Series>;
72
+ /**
73
+ * Remove a series from the user's saved items
74
+ * @param uniqueId - Unique ID of the series to unsave
75
+ * @returns void on successful unsave
76
+ */
16
77
  unsave(uniqueId: string): Promise<void>;
78
+ /**
79
+ * Get all posts belonging to a series
80
+ * @param uniqueId - Unique ID of the series
81
+ * @returns Array of Post records in the series
82
+ */
17
83
  getPosts(uniqueId: string): Promise<Post[]>;
84
+ /**
85
+ * Add a post to a series
86
+ * @param seriesUniqueId - Unique ID of the series
87
+ * @param postUniqueId - Unique ID of the post to add
88
+ * @param sequence - Optional position in the series ordering
89
+ * @returns void on successful addition
90
+ */
18
91
  addPost(seriesUniqueId: string, postUniqueId: string, sequence?: number): Promise<void>;
92
+ /**
93
+ * Remove a post from a series
94
+ * @param seriesUniqueId - Unique ID of the series
95
+ * @param postUniqueId - Unique ID of the post to remove
96
+ * @returns void on successful removal
97
+ */
19
98
  removePost(seriesUniqueId: string, postUniqueId: string): Promise<void>;
99
+ /**
100
+ * Reorder posts within a series
101
+ * @param uniqueId - Unique ID of the series
102
+ * @param data - Array of post-sequence pairs defining the new order
103
+ * @returns The updated Series record
104
+ */
20
105
  reorderPosts(uniqueId: string, data: ReorderPostsRequest): Promise<Series>;
21
106
  }
22
107
  export declare function createSeriesService(transport: Transport, _config: {
@@ -1 +1 @@
1
- {"version":3,"file":"series.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/series.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,MAAM,WAAW,aAAa;IAE5B,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,KAAK,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9D,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAGxC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;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EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5E;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CA4HnG"}
@@ -1,10 +1,36 @@
1
1
  import type { Transport, PageResult } from '@23blocks/contracts';
2
2
  import type { Tag, CreateTagRequest, UpdateTagRequest, ListTagsParams } from '../types/tag.js';
3
3
  export interface TagsService {
4
+ /**
5
+ * List all tags
6
+ * @param params - Optional filtering and pagination parameters
7
+ * @returns Paginated list of Tag records with pagination metadata
8
+ */
4
9
  list(params?: ListTagsParams): Promise<PageResult<Tag>>;
10
+ /**
11
+ * Get a tag by unique ID
12
+ * @param uniqueId - Unique ID of the tag to retrieve
13
+ * @returns The matching Tag record
14
+ */
5
15
  get(uniqueId: string): Promise<Tag>;
16
+ /**
17
+ * Create a new tag
18
+ * @param data - Tag creation payload
19
+ * @returns The newly created Tag record
20
+ */
6
21
  create(data: CreateTagRequest): Promise<Tag>;
22
+ /**
23
+ * Update a tag
24
+ * @param uniqueId - Unique ID of the tag to update
25
+ * @param data - Fields to update on the tag
26
+ * @returns The updated Tag record
27
+ */
7
28
  update(uniqueId: string, data: UpdateTagRequest): Promise<Tag>;
29
+ /**
30
+ * Delete a tag
31
+ * @param uniqueId - Unique ID of the tag to delete
32
+ * @returns void on successful deletion
33
+ */
8
34
  delete(uniqueId: string): Promise<void>;
9
35
  }
10
36
  export declare function createTagsService(transport: Transport, _config: {
@@ -1 +1 @@
1
- {"version":3,"file":"tags.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/tags.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU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O,CAAC,GAAG,CAAC,CAAC;IAE7C;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAE/D;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAmD/F"}
@@ -3,19 +3,95 @@ import type { ContentUser, Following, RegisterContentUserRequest, UpdateContentU
3
3
  import type { Post } from '../types/post.js';
4
4
  import type { Comment } from '../types/comment.js';
5
5
  export interface ContentUsersService {
6
+ /**
7
+ * List all content users
8
+ * @param params - Optional filtering and pagination parameters
9
+ * @returns Paginated list of ContentUser records with pagination metadata
10
+ */
6
11
  list(params?: ListContentUsersParams): Promise<PageResult<ContentUser>>;
12
+ /**
13
+ * Get a content user by unique ID
14
+ * @param uniqueId - Unique ID of the user to retrieve
15
+ * @returns The matching ContentUser record
16
+ */
7
17
  get(uniqueId: string): Promise<ContentUser>;
18
+ /**
19
+ * Register a user in the content system
20
+ * @param uniqueId - Unique ID of the user to register
21
+ * @param data - Registration payload with profile details
22
+ * @returns The newly registered ContentUser record
23
+ */
8
24
  register(uniqueId: string, data: RegisterContentUserRequest): Promise<ContentUser>;
25
+ /**
26
+ * Update a content user's profile
27
+ * @param uniqueId - Unique ID of the user to update
28
+ * @param data - Fields to update on the user profile
29
+ * @returns The updated ContentUser record
30
+ */
9
31
  update(uniqueId: string, data: UpdateContentUserRequest): Promise<ContentUser>;
32
+ /**
33
+ * Get a user's draft posts
34
+ * @param uniqueId - Unique ID of the user
35
+ * @returns Array of draft Post records
36
+ */
10
37
  getDrafts(uniqueId: string): Promise<Post[]>;
38
+ /**
39
+ * Get a user's published posts
40
+ * @param uniqueId - Unique ID of the user
41
+ * @returns Array of Post records
42
+ */
11
43
  getPosts(uniqueId: string): Promise<Post[]>;
44
+ /**
45
+ * Get a user's comments
46
+ * @param uniqueId - Unique ID of the user
47
+ * @returns Array of Comment records
48
+ */
12
49
  getComments(uniqueId: string): Promise<Comment[]>;
50
+ /**
51
+ * Get a user's activity history
52
+ * @param uniqueId - Unique ID of the user
53
+ * @returns Array of UserActivity records with activity type, target, and timestamp
54
+ */
13
55
  getActivities(uniqueId: string): Promise<UserActivity[]>;
56
+ /**
57
+ * Add a tag to a content user
58
+ * @param uniqueId - Unique ID of the user
59
+ * @param tagUniqueId - Unique ID of the tag to add
60
+ * @returns The updated ContentUser record
61
+ */
14
62
  addTag(uniqueId: string, tagUniqueId: string): Promise<ContentUser>;
63
+ /**
64
+ * Remove a tag from a content user
65
+ * @param uniqueId - Unique ID of the user
66
+ * @param tagUniqueId - Unique ID of the tag to remove
67
+ * @returns void on successful removal
68
+ */
15
69
  removeTag(uniqueId: string, tagUniqueId: string): Promise<void>;
70
+ /**
71
+ * Get a user's followers
72
+ * @param uniqueId - Unique ID of the user
73
+ * @returns Array of Following records with full relationship data
74
+ */
16
75
  getFollowers(uniqueId: string): Promise<Following[]>;
76
+ /**
77
+ * Get users that a user is following
78
+ * @param uniqueId - Unique ID of the user
79
+ * @returns Array of Following records with full relationship data
80
+ */
17
81
  getFollowing(uniqueId: string): Promise<Following[]>;
82
+ /**
83
+ * Follow another user
84
+ * @param uniqueId - Unique ID of the current user
85
+ * @param targetUserUniqueId - Unique ID of the user to follow
86
+ * @returns void on successful follow
87
+ */
18
88
  followUser(uniqueId: string, targetUserUniqueId: string): Promise<void>;
89
+ /**
90
+ * Unfollow another user
91
+ * @param uniqueId - Unique ID of the current user
92
+ * @param targetUserUniqueId - Unique ID of the user to unfollow
93
+ * @returns void on successful unfollow
94
+ */
19
95
  unfollowUser(uniqueId: string, targetUserUniqueId: string): Promise<void>;
20
96
  }
21
97
  export declare function createContentUsersService(transport: Transport, _config: {
@@ -1 +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