@fa-software/semi2-dsh 0.0.19 → 0.0.20-preview.20261012043528

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.
@@ -932,6 +932,95 @@ export interface paths {
932
932
  patch?: never;
933
933
  trace?: never;
934
934
  };
935
+ "/api/v1/me/tasks": {
936
+ parameters: {
937
+ query?: never;
938
+ header?: never;
939
+ path?: never;
940
+ cookie?: never;
941
+ };
942
+ /** @description Live aggregation for the signed-in user: Redmine issues assigned to them in Redmine projects linked from hub projects, plus CNB issues assigned to them in hub-managed repositories. Either source degrades alone. */
943
+ get: operations["listMyTasks"];
944
+ put?: never;
945
+ post?: never;
946
+ delete?: never;
947
+ options?: never;
948
+ head?: never;
949
+ patch?: never;
950
+ trace?: never;
951
+ };
952
+ "/api/v1/me/tasks/links": {
953
+ parameters: {
954
+ query?: never;
955
+ header?: never;
956
+ path?: never;
957
+ cookie?: never;
958
+ };
959
+ get?: never;
960
+ put?: never;
961
+ /** @description Opens a CNB issue from one of the caller's Redmine tasks and links the pair one-to-one. The caller's CNB token must allow repo-issue:rw; the issue is assigned to the caller. */
962
+ post: operations["createTaskIssue"];
963
+ delete?: never;
964
+ options?: never;
965
+ head?: never;
966
+ patch?: never;
967
+ trace?: never;
968
+ };
969
+ "/api/v1/me/tasks/close": {
970
+ parameters: {
971
+ query?: never;
972
+ header?: never;
973
+ path?: never;
974
+ cookie?: never;
975
+ };
976
+ get?: never;
977
+ put?: never;
978
+ /** @description Closes one CNB issue with the caller's token. When the issue has a link, a note is appended to the Redmine issue afterwards (never its status); a failed note stays pending and is retried by the reconciler. */
979
+ post: operations["closeTaskIssue"];
980
+ delete?: never;
981
+ options?: never;
982
+ head?: never;
983
+ patch?: never;
984
+ trace?: never;
985
+ };
986
+ "/api/v1/me/tasks/links/{id}/sync": {
987
+ parameters: {
988
+ query?: never;
989
+ header?: never;
990
+ path: {
991
+ id: components["parameters"]["LinkId"];
992
+ };
993
+ cookie?: never;
994
+ };
995
+ get?: never;
996
+ put?: never;
997
+ /** @description Re-reads the CNB issue with the caller's token and appends the missing Redmine note when it is closed. The caller's Redmine key is used for the note; a duplicate note is prevented by the note marker. */
998
+ post: operations["syncTaskLink"];
999
+ delete?: never;
1000
+ options?: never;
1001
+ head?: never;
1002
+ patch?: never;
1003
+ trace?: never;
1004
+ };
1005
+ "/api/v1/me/tasks/links/{id}/release": {
1006
+ parameters: {
1007
+ query?: never;
1008
+ header?: never;
1009
+ path: {
1010
+ id: components["parameters"]["LinkId"];
1011
+ };
1012
+ cookie?: never;
1013
+ };
1014
+ get?: never;
1015
+ put?: never;
1016
+ /** @description Deletes a link whose CNB issue is no longer visible (state MISSING) so a new issue can be opened. */
1017
+ post: operations["releaseTaskLink"];
1018
+ delete?: never;
1019
+ options?: never;
1020
+ head?: never;
1021
+ patch?: never;
1022
+ trace?: never;
1023
+ };
935
1024
  "/api/v1/runtime/bootstrap": {
936
1025
  parameters: {
937
1026
  query?: never;
@@ -1552,6 +1641,74 @@ export interface components {
1552
1641
  updatedByUsername: string | null;
1553
1642
  updatedByDisplayName: string | null;
1554
1643
  };
1644
+ TaskRedmineReference: {
1645
+ id: number;
1646
+ projectId: number;
1647
+ statusLabel?: string | null;
1648
+ closed?: boolean | null;
1649
+ webUrl: string;
1650
+ };
1651
+ TaskCnbReference: {
1652
+ repoPath: string;
1653
+ number: number;
1654
+ webUrl: string;
1655
+ closed?: boolean | null;
1656
+ };
1657
+ TaskLink: {
1658
+ /** Format: uuid */
1659
+ id: string;
1660
+ revision: number;
1661
+ /** @enum {string} */
1662
+ state: "LINKED" | "CNB_CLOSED" | "SYNCED" | "MISSING" | "BLOCKED";
1663
+ redmineIssueId: number;
1664
+ redmineProjectId: number;
1665
+ repoPath: string;
1666
+ number: number;
1667
+ webUrl: string;
1668
+ lastError: string | null;
1669
+ canClose: boolean;
1670
+ canSync: boolean;
1671
+ canRelease: boolean;
1672
+ };
1673
+ MyTask: {
1674
+ key: string;
1675
+ /** @enum {string} */
1676
+ source: "REDMINE" | "CNB";
1677
+ /** @enum {string} */
1678
+ column: "TODO" | "DOING" | "DONE";
1679
+ title: string;
1680
+ /** @description Only populated for unlinked Redmine rows; prefills the issue body and is never stored */
1681
+ description: string | null;
1682
+ /** @enum {string} */
1683
+ state: "OPEN" | "CLOSED";
1684
+ statusLabel: string;
1685
+ priorityLabel: string | null;
1686
+ /** Format: uuid */
1687
+ projectId: string | null;
1688
+ projectName: string | null;
1689
+ updatedAt: string | null;
1690
+ webUrl: string;
1691
+ redmine: components["schemas"]["TaskRedmineReference"] | null;
1692
+ cnb: components["schemas"]["TaskCnbReference"] | null;
1693
+ link: components["schemas"]["TaskLink"] | null;
1694
+ /** @description True when the linked Redmine issue is closed while the CNB issue is open */
1695
+ mismatch: boolean;
1696
+ };
1697
+ TaskSource: {
1698
+ /** @enum {string} */
1699
+ state: "OK" | "NO_BASE_URL" | "NO_KEY" | "NOT_CONNECTED" | "FAILED";
1700
+ message: string;
1701
+ };
1702
+ MyTaskPage: {
1703
+ items: components["schemas"]["MyTask"][];
1704
+ total: number;
1705
+ /** @description True when an upstream scan hit its page budget and the result may be incomplete */
1706
+ truncated: boolean;
1707
+ sources: {
1708
+ redmine: components["schemas"]["TaskSource"];
1709
+ cnb: components["schemas"]["TaskSource"];
1710
+ };
1711
+ };
1555
1712
  Viewer: {
1556
1713
  id: string;
1557
1714
  username: string;
@@ -1831,6 +1988,7 @@ export interface components {
1831
1988
  Revision: number;
1832
1989
  /** @description Omitted selects head */
1833
1990
  Version: number;
1991
+ LinkId: string;
1834
1992
  };
1835
1993
  requestBodies: {
1836
1994
  Enrollment: {
@@ -3516,6 +3674,167 @@ export interface operations {
3516
3674
  default: components["responses"]["Error"];
3517
3675
  };
3518
3676
  };
3677
+ listMyTasks: {
3678
+ parameters: {
3679
+ query?: {
3680
+ first?: components["parameters"]["First"];
3681
+ offset?: components["parameters"]["Offset"];
3682
+ /** @description all includes issues closed within the last 30 days */
3683
+ state?: "open" | "all";
3684
+ source?: "all" | "REDMINE" | "CNB";
3685
+ };
3686
+ header?: never;
3687
+ path?: never;
3688
+ cookie?: never;
3689
+ };
3690
+ requestBody?: never;
3691
+ responses: {
3692
+ /** @description Merged rows; total matches the current filter while items are one page of it */
3693
+ 200: {
3694
+ headers: {
3695
+ [name: string]: unknown;
3696
+ };
3697
+ content: {
3698
+ "application/json": components["schemas"]["MyTaskPage"];
3699
+ };
3700
+ };
3701
+ default: components["responses"]["Error"];
3702
+ };
3703
+ };
3704
+ createTaskIssue: {
3705
+ parameters: {
3706
+ query?: never;
3707
+ header: {
3708
+ Origin: components["parameters"]["Origin"];
3709
+ "X-CSRF-Token": components["parameters"]["Csrf"];
3710
+ };
3711
+ path?: never;
3712
+ cookie?: never;
3713
+ };
3714
+ requestBody: {
3715
+ content: {
3716
+ "application/json": {
3717
+ redmineIssueId: number;
3718
+ /**
3719
+ * Format: uuid
3720
+ * @description Target hub project; must be kind CNB and accessible
3721
+ */
3722
+ projectId: string;
3723
+ title: string;
3724
+ body: string;
3725
+ /** @enum {string|null} */
3726
+ priority?: "-2P" | "-1P" | "P0" | "P1" | "P2" | "P3" | null;
3727
+ };
3728
+ };
3729
+ };
3730
+ responses: {
3731
+ /** @description CNB issue created and the link recorded as LINKED */
3732
+ 201: {
3733
+ headers: {
3734
+ [name: string]: unknown;
3735
+ };
3736
+ content: {
3737
+ "application/json": components["schemas"]["TaskLink"];
3738
+ };
3739
+ };
3740
+ default: components["responses"]["Error"];
3741
+ };
3742
+ };
3743
+ closeTaskIssue: {
3744
+ parameters: {
3745
+ query?: never;
3746
+ header: {
3747
+ Origin: components["parameters"]["Origin"];
3748
+ "X-CSRF-Token": components["parameters"]["Csrf"];
3749
+ };
3750
+ path?: never;
3751
+ cookie?: never;
3752
+ };
3753
+ requestBody: {
3754
+ content: {
3755
+ "application/json": {
3756
+ repoPath: string;
3757
+ number: number;
3758
+ /** @enum {string} */
3759
+ reason: "completed" | "not_planned";
3760
+ /** @description Required once a link exists; guards the link row with CAS */
3761
+ expectedLinkRevision?: number;
3762
+ };
3763
+ };
3764
+ };
3765
+ responses: {
3766
+ /** @description CNB issue closed; redmineWrite is NA when the issue has no link */
3767
+ 200: {
3768
+ headers: {
3769
+ [name: string]: unknown;
3770
+ };
3771
+ content: {
3772
+ "application/json": {
3773
+ /** @enum {string} */
3774
+ redmineWrite: "WRITTEN" | "PENDING" | "FAILED" | "NA";
3775
+ link: components["schemas"]["TaskLink"] | null;
3776
+ };
3777
+ };
3778
+ };
3779
+ default: components["responses"]["Error"];
3780
+ };
3781
+ };
3782
+ syncTaskLink: {
3783
+ parameters: {
3784
+ query?: never;
3785
+ header: {
3786
+ Origin: components["parameters"]["Origin"];
3787
+ "X-CSRF-Token": components["parameters"]["Csrf"];
3788
+ };
3789
+ path: {
3790
+ id: components["parameters"]["LinkId"];
3791
+ };
3792
+ cookie?: never;
3793
+ };
3794
+ requestBody: {
3795
+ content: {
3796
+ "application/json": {
3797
+ expectedRevision: number;
3798
+ };
3799
+ };
3800
+ };
3801
+ responses: {
3802
+ /** @description Link row after the sync attempt */
3803
+ 200: {
3804
+ headers: {
3805
+ [name: string]: unknown;
3806
+ };
3807
+ content: {
3808
+ "application/json": components["schemas"]["TaskLink"];
3809
+ };
3810
+ };
3811
+ default: components["responses"]["Error"];
3812
+ };
3813
+ };
3814
+ releaseTaskLink: {
3815
+ parameters: {
3816
+ query?: never;
3817
+ header: {
3818
+ Origin: components["parameters"]["Origin"];
3819
+ "X-CSRF-Token": components["parameters"]["Csrf"];
3820
+ };
3821
+ path: {
3822
+ id: components["parameters"]["LinkId"];
3823
+ };
3824
+ cookie?: never;
3825
+ };
3826
+ requestBody: {
3827
+ content: {
3828
+ "application/json": {
3829
+ expectedRevision: number;
3830
+ };
3831
+ };
3832
+ };
3833
+ responses: {
3834
+ 200: components["responses"]["Ok"];
3835
+ default: components["responses"]["Error"];
3836
+ };
3837
+ };
3519
3838
  runtimeBootstrap: {
3520
3839
  parameters: {
3521
3840
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fa-software/semi2-dsh",
3
- "version": "0.0.19",
3
+ "version": "0.0.20-preview.20261012043528",
4
4
  "description": "Semi2 单插件:semi2-hub 配置引导 + 公共 Web 能力。",
5
5
  "homepage": "https://cnb.cool/fa-software/semi2/dsh/dsh-mono",
6
6
  "bugs": "https://cnb.cool/fa-software/semi2/dsh/dsh-mono/-/issues",