wjx-api-sdk 0.1.1
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/LICENSE +21 -0
- package/README.md +300 -0
- package/dist/core/api-client.d.ts +13 -0
- package/dist/core/api-client.js +141 -0
- package/dist/core/api-client.js.map +1 -0
- package/dist/core/constants.d.ts +61 -0
- package/dist/core/constants.js +82 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/types.d.ts +26 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/analytics/compute.d.ts +14 -0
- package/dist/modules/analytics/compute.js +205 -0
- package/dist/modules/analytics/compute.js.map +1 -0
- package/dist/modules/analytics/push-decode.d.ts +12 -0
- package/dist/modules/analytics/push-decode.js +46 -0
- package/dist/modules/analytics/push-decode.js.map +1 -0
- package/dist/modules/analytics/types.d.ts +61 -0
- package/dist/modules/analytics/types.js +3 -0
- package/dist/modules/analytics/types.js.map +1 -0
- package/dist/modules/contacts/client.d.ts +16 -0
- package/dist/modules/contacts/client.js +129 -0
- package/dist/modules/contacts/client.js.map +1 -0
- package/dist/modules/contacts/types.d.ts +62 -0
- package/dist/modules/contacts/types.js +2 -0
- package/dist/modules/contacts/types.js.map +1 -0
- package/dist/modules/multi-user/client.d.ts +7 -0
- package/dist/modules/multi-user/client.js +70 -0
- package/dist/modules/multi-user/client.js.map +1 -0
- package/dist/modules/multi-user/types.d.ts +31 -0
- package/dist/modules/multi-user/types.js +2 -0
- package/dist/modules/multi-user/types.js.map +1 -0
- package/dist/modules/response/client.d.ts +12 -0
- package/dist/modules/response/client.js +169 -0
- package/dist/modules/response/client.js.map +1 -0
- package/dist/modules/response/types.d.ts +83 -0
- package/dist/modules/response/types.js +2 -0
- package/dist/modules/response/types.js.map +1 -0
- package/dist/modules/sso/client.d.ts +22 -0
- package/dist/modules/sso/client.js +101 -0
- package/dist/modules/sso/client.js.map +1 -0
- package/dist/modules/sso/types.d.ts +75 -0
- package/dist/modules/sso/types.js +2 -0
- package/dist/modules/sso/types.js.map +1 -0
- package/dist/modules/survey/client.d.ts +13 -0
- package/dist/modules/survey/client.js +140 -0
- package/dist/modules/survey/client.js.map +1 -0
- package/dist/modules/survey/survey-to-text.d.ts +17 -0
- package/dist/modules/survey/survey-to-text.js +237 -0
- package/dist/modules/survey/survey-to-text.js.map +1 -0
- package/dist/modules/survey/text-to-survey.d.ts +9 -0
- package/dist/modules/survey/text-to-survey.js +175 -0
- package/dist/modules/survey/text-to-survey.js.map +1 -0
- package/dist/modules/survey/types.d.ts +170 -0
- package/dist/modules/survey/types.js +2 -0
- package/dist/modules/survey/types.js.map +1 -0
- package/dist/modules/user-system/client.d.ts +8 -0
- package/dist/modules/user-system/client.js +76 -0
- package/dist/modules/user-system/client.js.map +1 -0
- package/dist/modules/user-system/types.d.ts +41 -0
- package/dist/modules/user-system/types.js +2 -0
- package/dist/modules/user-system/types.js.map +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export interface CreateSurveyInput {
|
|
2
|
+
title: string;
|
|
3
|
+
type: number;
|
|
4
|
+
description: string;
|
|
5
|
+
publish?: boolean;
|
|
6
|
+
questions: string;
|
|
7
|
+
creater?: string;
|
|
8
|
+
source_vid?: string;
|
|
9
|
+
compress_img?: boolean;
|
|
10
|
+
is_string?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface UploadFileInput {
|
|
13
|
+
file_name: string;
|
|
14
|
+
file: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GetSurveyInput {
|
|
17
|
+
vid: number;
|
|
18
|
+
get_questions?: boolean;
|
|
19
|
+
get_items?: boolean;
|
|
20
|
+
get_exts?: boolean;
|
|
21
|
+
get_setting?: boolean;
|
|
22
|
+
get_page_cut?: boolean;
|
|
23
|
+
get_tags?: boolean;
|
|
24
|
+
showtitle?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ListSurveysInput {
|
|
27
|
+
page_index?: number;
|
|
28
|
+
page_size?: number;
|
|
29
|
+
status?: number;
|
|
30
|
+
atype?: number;
|
|
31
|
+
name_like?: string;
|
|
32
|
+
sort?: number;
|
|
33
|
+
creater?: string;
|
|
34
|
+
folder?: string;
|
|
35
|
+
is_xingbiao?: boolean;
|
|
36
|
+
query_all?: boolean;
|
|
37
|
+
verify_status?: number;
|
|
38
|
+
time_type?: number;
|
|
39
|
+
begin_time?: number;
|
|
40
|
+
end_time?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface UpdateSurveyStatusInput {
|
|
43
|
+
vid: number;
|
|
44
|
+
state: number;
|
|
45
|
+
}
|
|
46
|
+
export interface GetSurveySettingsInput {
|
|
47
|
+
vid: number;
|
|
48
|
+
additional_setting?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface UpdateSurveySettingsInput {
|
|
51
|
+
vid: number;
|
|
52
|
+
api_setting?: string;
|
|
53
|
+
after_submit_setting?: string;
|
|
54
|
+
msg_setting?: string;
|
|
55
|
+
sojumpparm_setting?: string;
|
|
56
|
+
time_setting?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface DeleteSurveyInput {
|
|
59
|
+
vid: number;
|
|
60
|
+
username: string;
|
|
61
|
+
completely_delete?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface GetQuestionTagsInput {
|
|
64
|
+
username: string;
|
|
65
|
+
}
|
|
66
|
+
export interface GetTagDetailsInput {
|
|
67
|
+
tag_id: number;
|
|
68
|
+
}
|
|
69
|
+
export interface ClearRecycleBinInput {
|
|
70
|
+
username: string;
|
|
71
|
+
vid?: number;
|
|
72
|
+
}
|
|
73
|
+
/** A parsed question from DSL text. */
|
|
74
|
+
export interface ParsedQuestion {
|
|
75
|
+
/** Question title (plain text, HTML stripped). */
|
|
76
|
+
title: string;
|
|
77
|
+
/**
|
|
78
|
+
* Question type identifier.
|
|
79
|
+
* Skeleton types: "single-choice" | "multi-choice" | "fill-in" | "scale" | "matrix" | "paragraph"
|
|
80
|
+
*/
|
|
81
|
+
type: string;
|
|
82
|
+
/** Whether the question is required (default true). */
|
|
83
|
+
required: boolean;
|
|
84
|
+
/** Options/items for choice-type questions. */
|
|
85
|
+
options?: string[];
|
|
86
|
+
/** Scale range for scale-type questions [min, max]. */
|
|
87
|
+
scaleRange?: [string, string];
|
|
88
|
+
/** Matrix row labels. */
|
|
89
|
+
matrixRows?: string[];
|
|
90
|
+
}
|
|
91
|
+
/** Parsed survey structure from DSL text. */
|
|
92
|
+
export interface ParsedSurvey {
|
|
93
|
+
/** Survey title. */
|
|
94
|
+
title: string;
|
|
95
|
+
/** Survey description (may be empty). */
|
|
96
|
+
description: string;
|
|
97
|
+
/** Parsed questions in order. */
|
|
98
|
+
questions: ParsedQuestion[];
|
|
99
|
+
}
|
|
100
|
+
/** A single option/item within a question. */
|
|
101
|
+
export interface SurveyQuestionItem {
|
|
102
|
+
q_index: number;
|
|
103
|
+
item_index: number;
|
|
104
|
+
item_title: string;
|
|
105
|
+
item_image?: string;
|
|
106
|
+
item_score?: number;
|
|
107
|
+
item_selected?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/** A question in the flat questions array returned by get_survey. */
|
|
110
|
+
export interface SurveyQuestion {
|
|
111
|
+
q_index: number;
|
|
112
|
+
/** 1=分页, 2=段落说明, 3=单选, 4=多选, 5=填空, 6=多项填空, 7=矩阵, 8=文件上传, 9=比重, 10=滑动条 */
|
|
113
|
+
q_type: number;
|
|
114
|
+
/**
|
|
115
|
+
* Sub-type within q_type. Common values:
|
|
116
|
+
* 3→单选, 301→下拉框, 302→量表, 303→评分单选, 304→情景题, 305→判断题,
|
|
117
|
+
* 4→多选, 401→评分多选, 402→排序, 403→商品题,
|
|
118
|
+
* 5→填空, 501→多级下拉,
|
|
119
|
+
* 6→多项填空,
|
|
120
|
+
* 7→矩阵(generic), 701→矩阵量表, 702→矩阵单选, 703→矩阵多选, 704-712→矩阵变体,
|
|
121
|
+
* 8→文件上传, 801→绘图,
|
|
122
|
+
* 9→比重, 10→滑动条.
|
|
123
|
+
*
|
|
124
|
+
* NOTE: The API may normalise subtypes (e.g. 301→3, 701→7) depending on
|
|
125
|
+
* how the survey was created.
|
|
126
|
+
*/
|
|
127
|
+
q_subtype: number;
|
|
128
|
+
q_title: string;
|
|
129
|
+
is_requir: boolean;
|
|
130
|
+
has_jump: boolean;
|
|
131
|
+
is_hide?: boolean;
|
|
132
|
+
/** Items / options (for selection-type, ranking, weight questions). */
|
|
133
|
+
items?: SurveyQuestionItem[];
|
|
134
|
+
is_zhenbie?: boolean;
|
|
135
|
+
min_time?: number;
|
|
136
|
+
max_time?: number;
|
|
137
|
+
need_only?: boolean;
|
|
138
|
+
gap_count?: number;
|
|
139
|
+
matrix_mode?: number;
|
|
140
|
+
table_mode?: number;
|
|
141
|
+
style_mode?: number;
|
|
142
|
+
is_panduan?: boolean;
|
|
143
|
+
total?: number;
|
|
144
|
+
row_width?: number;
|
|
145
|
+
min_value?: number;
|
|
146
|
+
max_value?: number;
|
|
147
|
+
check_mode?: number;
|
|
148
|
+
}
|
|
149
|
+
/** The `data` payload returned by get_survey (action=1000001). */
|
|
150
|
+
export interface SurveyDetail {
|
|
151
|
+
vid: number;
|
|
152
|
+
begin_time: string;
|
|
153
|
+
update_time: string;
|
|
154
|
+
atype: number;
|
|
155
|
+
title: string;
|
|
156
|
+
description: string;
|
|
157
|
+
notes: string;
|
|
158
|
+
version: number;
|
|
159
|
+
answer_valid: number;
|
|
160
|
+
answer_total: number;
|
|
161
|
+
status: number;
|
|
162
|
+
verify_status: number;
|
|
163
|
+
creater: string;
|
|
164
|
+
total_score: number;
|
|
165
|
+
/**
|
|
166
|
+
* Flat array of questions. Page breaks are represented as q_type=1 entries.
|
|
167
|
+
* Present when get_questions=true.
|
|
168
|
+
*/
|
|
169
|
+
questions?: SurveyQuestion[];
|
|
170
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/survey/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WjxApiResponse, WjxCredentials, FetchLike } from "../../core/types.js";
|
|
2
|
+
import type { AddParticipantsInput, ModifyParticipantsInput, DeleteParticipantsInput, BindActivityInput, QuerySurveyBindingInput, QueryUserSurveysInput } from "./types.js";
|
|
3
|
+
export declare function addParticipants<T = unknown>(input: AddParticipantsInput, credentials?: WjxCredentials, fetchImpl?: FetchLike): Promise<WjxApiResponse<T>>;
|
|
4
|
+
export declare function modifyParticipants<T = unknown>(input: ModifyParticipantsInput, credentials?: WjxCredentials, fetchImpl?: FetchLike): Promise<WjxApiResponse<T>>;
|
|
5
|
+
export declare function deleteParticipants<T = unknown>(input: DeleteParticipantsInput, credentials?: WjxCredentials, fetchImpl?: FetchLike): Promise<WjxApiResponse<T>>;
|
|
6
|
+
export declare function bindActivity<T = unknown>(input: BindActivityInput, credentials?: WjxCredentials, fetchImpl?: FetchLike): Promise<WjxApiResponse<T>>;
|
|
7
|
+
export declare function querySurveyBinding<T = unknown>(input: QuerySurveyBindingInput, credentials?: WjxCredentials, fetchImpl?: FetchLike): Promise<WjxApiResponse<T>>;
|
|
8
|
+
export declare function queryUserSurveys<T = unknown>(input: QueryUserSurveysInput, credentials?: WjxCredentials, fetchImpl?: FetchLike): Promise<WjxApiResponse<T>>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Action } from "../../core/constants.js";
|
|
2
|
+
import { callWjxUserSystemApi, getWjxCredentials } from "../../core/api-client.js";
|
|
3
|
+
export async function addParticipants(input, credentials = getWjxCredentials(), fetchImpl = fetch) {
|
|
4
|
+
return callWjxUserSystemApi({
|
|
5
|
+
action: Action.ADD_PARTICIPANTS,
|
|
6
|
+
username: input.username,
|
|
7
|
+
users: input.users,
|
|
8
|
+
sysid: input.sysid,
|
|
9
|
+
}, { credentials, fetchImpl, maxRetries: 0 });
|
|
10
|
+
}
|
|
11
|
+
export async function modifyParticipants(input, credentials = getWjxCredentials(), fetchImpl = fetch) {
|
|
12
|
+
const params = {
|
|
13
|
+
action: Action.MODIFY_PARTICIPANTS,
|
|
14
|
+
username: input.username,
|
|
15
|
+
users: input.users,
|
|
16
|
+
sysid: input.sysid,
|
|
17
|
+
};
|
|
18
|
+
if (input.auto_create_udept !== undefined)
|
|
19
|
+
params.auto_create_udept = input.auto_create_udept;
|
|
20
|
+
return callWjxUserSystemApi(params, { credentials, fetchImpl, maxRetries: 0 });
|
|
21
|
+
}
|
|
22
|
+
export async function deleteParticipants(input, credentials = getWjxCredentials(), fetchImpl = fetch) {
|
|
23
|
+
return callWjxUserSystemApi({
|
|
24
|
+
action: Action.DELETE_PARTICIPANTS,
|
|
25
|
+
username: input.username,
|
|
26
|
+
uids: input.uids,
|
|
27
|
+
sysid: input.sysid,
|
|
28
|
+
}, { credentials, fetchImpl, maxRetries: 0 });
|
|
29
|
+
}
|
|
30
|
+
export async function bindActivity(input, credentials = getWjxCredentials(), fetchImpl = fetch) {
|
|
31
|
+
const params = {
|
|
32
|
+
action: Action.BIND_ACTIVITY,
|
|
33
|
+
username: input.username,
|
|
34
|
+
vid: input.vid,
|
|
35
|
+
sysid: input.sysid,
|
|
36
|
+
uids: input.uids,
|
|
37
|
+
};
|
|
38
|
+
if (input.answer_times !== undefined)
|
|
39
|
+
params.answer_times = input.answer_times;
|
|
40
|
+
if (input.can_chg_answer !== undefined)
|
|
41
|
+
params.can_chg_answer = input.can_chg_answer;
|
|
42
|
+
if (input.can_view_result !== undefined)
|
|
43
|
+
params.can_view_result = input.can_view_result;
|
|
44
|
+
if (input.can_hide_qlist !== undefined)
|
|
45
|
+
params.can_hide_qlist = input.can_hide_qlist;
|
|
46
|
+
return callWjxUserSystemApi(params, { credentials, fetchImpl, maxRetries: 0 });
|
|
47
|
+
}
|
|
48
|
+
export async function querySurveyBinding(input, credentials = getWjxCredentials(), fetchImpl = fetch) {
|
|
49
|
+
const params = {
|
|
50
|
+
action: Action.QUERY_SURVEY_BINDING,
|
|
51
|
+
username: input.username,
|
|
52
|
+
vid: input.vid,
|
|
53
|
+
sysid: input.sysid,
|
|
54
|
+
};
|
|
55
|
+
if (input.join_status !== undefined)
|
|
56
|
+
params.join_status = input.join_status;
|
|
57
|
+
if (input.day !== undefined)
|
|
58
|
+
params.day = input.day;
|
|
59
|
+
if (input.week !== undefined)
|
|
60
|
+
params.week = input.week;
|
|
61
|
+
if (input.month !== undefined)
|
|
62
|
+
params.month = input.month;
|
|
63
|
+
if (input.force_join_times !== undefined)
|
|
64
|
+
params.force_join_times = input.force_join_times;
|
|
65
|
+
return callWjxUserSystemApi(params, { credentials, fetchImpl });
|
|
66
|
+
}
|
|
67
|
+
export async function queryUserSurveys(input, credentials = getWjxCredentials(), fetchImpl = fetch) {
|
|
68
|
+
const params = {
|
|
69
|
+
action: Action.QUERY_USER_SURVEYS,
|
|
70
|
+
username: input.username,
|
|
71
|
+
uid: input.uid,
|
|
72
|
+
sysid: input.sysid,
|
|
73
|
+
};
|
|
74
|
+
return callWjxUserSystemApi(params, { credentials, fetchImpl });
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/modules/user-system/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAUnF,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAA2B,EAC3B,cAA8B,iBAAiB,EAAE,EACjD,YAAuB,KAAK;IAE5B,OAAO,oBAAoB,CACzB;QACE,MAAM,EAAE,MAAM,CAAC,gBAAgB;QAC/B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;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AAK,CAAC,gBAAgB,KAAK,SAAS;QAAE,MAAM,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;IAE3F,OAAO,oBAAoB,CAAI,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAA4B,EAC5B,cAA8B,iBAAiB,EAAE,EACjD,YAAuB,KAAK;IAE5B,MAAM,MAAM,GAA4B;QACtC,MAAM,EAAE,MAAM,CAAC,kBAAkB;QACjC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;IAEF,OAAO,oBAAoB,CAAI,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface AddParticipantsInput {
|
|
2
|
+
username: string;
|
|
3
|
+
users: string;
|
|
4
|
+
sysid: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ModifyParticipantsInput {
|
|
7
|
+
username: string;
|
|
8
|
+
users: string;
|
|
9
|
+
sysid: number;
|
|
10
|
+
auto_create_udept?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface DeleteParticipantsInput {
|
|
13
|
+
username: string;
|
|
14
|
+
uids: string;
|
|
15
|
+
sysid: number;
|
|
16
|
+
}
|
|
17
|
+
export interface BindActivityInput {
|
|
18
|
+
username: string;
|
|
19
|
+
vid: number;
|
|
20
|
+
sysid: number;
|
|
21
|
+
uids: string;
|
|
22
|
+
answer_times?: number;
|
|
23
|
+
can_chg_answer?: boolean;
|
|
24
|
+
can_view_result?: boolean;
|
|
25
|
+
can_hide_qlist?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface QuerySurveyBindingInput {
|
|
28
|
+
username: string;
|
|
29
|
+
vid: number;
|
|
30
|
+
sysid: number;
|
|
31
|
+
join_status?: number;
|
|
32
|
+
day?: string;
|
|
33
|
+
week?: string;
|
|
34
|
+
month?: string;
|
|
35
|
+
force_join_times?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface QueryUserSurveysInput {
|
|
38
|
+
username: string;
|
|
39
|
+
uid: string;
|
|
40
|
+
sysid: number;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/user-system/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wjx-api-sdk",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "问卷星 (Wenjuanxing) OpenAPI SDK — 零 MCP 依赖的 API 客户端",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=20"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "npx -p typescript tsc -p tsconfig.json",
|
|
15
|
+
"test": "npm run build && node --test __tests__/*.test.mjs",
|
|
16
|
+
"clean": "rm -rf dist",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"wjx",
|
|
21
|
+
"wenjuanxing",
|
|
22
|
+
"survey",
|
|
23
|
+
"openapi",
|
|
24
|
+
"sdk"
|
|
25
|
+
],
|
|
26
|
+
"author": "wjxagents",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://codeup.aliyun.com/6445da2d020eabef3107e22e/wjxfc/wjxagents.git",
|
|
32
|
+
"directory": "wjx-ai-kit/wjx-api-sdk"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22",
|
|
36
|
+
"typescript": "^5.5"
|
|
37
|
+
}
|
|
38
|
+
}
|