@kevisual/cnb 0.0.39 → 0.0.42

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/routes.d.ts CHANGED
@@ -520,6 +520,21 @@ type IssueAuthor = {
520
520
  created_at: string;
521
521
  ended_at: string;
522
522
  };
523
+ type IssueCommentUser = {
524
+ username: string;
525
+ nickname: string;
526
+ avatar: string;
527
+ is_npc: boolean;
528
+ };
529
+ type IssueCommentReaction = {};
530
+ type IssueComment = {
531
+ id: string;
532
+ body: string;
533
+ author: IssueCommentUser;
534
+ reactions: IssueCommentReaction[];
535
+ created_at: string;
536
+ updated_at: string;
537
+ };
523
538
  type IssueItem = {
524
539
  assignees: IssueAssignee[];
525
540
  author: IssueAuthor;
@@ -540,7 +555,13 @@ declare class Issue extends CNBCore {
540
555
  updateIssue(repo: string, issueNumber: string | number, data: Partial<IssueItem>): Promise<any>;
541
556
  getItem(repo: string, issueNumber: string | number): Promise<Result<IssueItem>>;
542
557
  getList(repo: string, params?: Partial<GetListParams>): Promise<Result<IssueItem[]>>;
543
- getCommentList(repo: string, issueNumber: string | number): Promise<any>;
558
+ getCommentList(repo: string, issueNumber: string | number, params?: {
559
+ page?: number;
560
+ page_size?: number;
561
+ }): Promise<Result<IssueComment[]>>;
562
+ getComment(repo: string, issueNumber: string | number, commentId: string | number): Promise<Result<IssueComment>>;
563
+ createComment(repo: string, issueNumber: string | number, body: string): Promise<Result<IssueComment>>;
564
+ updateComment(repo: string, issueNumber: string | number, commentId: string | number, body: string): Promise<Result<IssueComment>>;
544
565
  setIssueProperty(repo: string, issueNumber: string | number, properties: {
545
566
  [key: string]: any;
546
567
  }[]): Promise<any>;
@@ -551,6 +572,43 @@ declare class Issue extends CNBCore {
551
572
  * @returns
552
573
  */
553
574
  getAliveMetadata(repo: string, issueNumber: string | number): Promise<Result<AliveMetadata>>;
575
+ useNPCEnv(): {
576
+ npcSlug: any;
577
+ npcName: any;
578
+ npcSha: any;
579
+ npcPrompt: any;
580
+ npcAvatar: any;
581
+ npcEnableThinking: any;
582
+ };
583
+ useCommentEnv(): {
584
+ commentId: any;
585
+ commentBody: any;
586
+ commentType: any;
587
+ commentFilePath: any;
588
+ commentRange: any;
589
+ reviewId: any;
590
+ };
591
+ usePullRequestEnv(): {
592
+ pullRequest: any;
593
+ pullRequestLike: any;
594
+ pullRequestProposer: any;
595
+ pullRequestTitle: any;
596
+ pullRequestBranch: any;
597
+ pullRequestSha: any;
598
+ pullRequestTargetSha: any;
599
+ pullRequestMergeSha: any;
600
+ pullRequestSlug: any;
601
+ pullRequestAction: any;
602
+ pullRequestId: any;
603
+ };
604
+ useRepoInfoEnv(): {
605
+ repoSlug: any;
606
+ repoSlugLowercase: any;
607
+ repoName: any;
608
+ repoNameLowercase: any;
609
+ repoId: any;
610
+ repoUrlHttps: any;
611
+ };
554
612
  }
555
613
  type GetListParams = {
556
614
  /** 问题指派人名称,例如: 张三, 李四, -; - 表示不指派给任何人 */