@jdr-web-infra/xingyun-open-api-user 0.0.2 → 0.0.3
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.d.mts +11 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare const BASE_URL = "http://api-gateway.jd.com/jacp";
|
|
2
|
+
export declare const APP_ID = "joyclaw";
|
|
3
|
+
export declare const CONTENT_TYPE = "application/json";
|
|
4
|
+
export declare const API_SUCCESS_CODE = 200;
|
|
1
5
|
interface Card {
|
|
2
6
|
id: number;
|
|
3
7
|
code: string;
|
|
@@ -86,6 +90,12 @@ interface UserVO {
|
|
|
86
90
|
declare class Application {
|
|
87
91
|
private axiosInstance;
|
|
88
92
|
constructor(userToken?: string);
|
|
93
|
+
/**
|
|
94
|
+
* 按卡片ID查询卡片详情(含所属空间、迭代、阶段、扩展字段及关联附件)
|
|
95
|
+
*
|
|
96
|
+
* @param cardId
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
89
99
|
getCardById(cardId: number): Promise<Card>;
|
|
90
100
|
/**
|
|
91
101
|
* 按空间ID查询空间信息
|
|
@@ -109,4 +119,4 @@ declare class Application {
|
|
|
109
119
|
*/
|
|
110
120
|
querySprintsBySpaceId(spaceId: string): Promise<Sprint[]>;
|
|
111
121
|
}
|
|
112
|
-
export { Application as default };
|
|
122
|
+
export { type Card, type Space, type Sprint, type SprintInfo, type UserVO, Application as default };
|
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { create, isAxiosError } from "axios";
|
|
|
3
3
|
const BASE_URL = "http://api-gateway.jd.com/jacp";
|
|
4
4
|
const APP_ID = "joyclaw";
|
|
5
5
|
const CONTENT_TYPE = "application/json";
|
|
6
|
+
const API_SUCCESS_CODE = 200;
|
|
6
7
|
// src/index.ts
|
|
7
8
|
var Application = class {
|
|
8
9
|
axiosInstance;
|
|
@@ -33,6 +34,12 @@ var Application = class {
|
|
|
33
34
|
});
|
|
34
35
|
this.axiosInstance = axiosInstance;
|
|
35
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* 按卡片ID查询卡片详情(含所属空间、迭代、阶段、扩展字段及关联附件)
|
|
39
|
+
*
|
|
40
|
+
* @param cardId
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
36
43
|
async getCardById(cardId) {
|
|
37
44
|
return (await this.axiosInstance.get(`/openapi/v3/cards/${cardId}`)).data;
|
|
38
45
|
}
|
|
@@ -64,4 +71,4 @@ var Application = class {
|
|
|
64
71
|
return (await this.axiosInstance.get(`/openapi/v3/spaces/${spaceId}/sprints`)).data;
|
|
65
72
|
}
|
|
66
73
|
};
|
|
67
|
-
export { Application as default };
|
|
74
|
+
export { API_SUCCESS_CODE, APP_ID, BASE_URL, CONTENT_TYPE, Application as default };
|