@larksuiteoapi/node-sdk 1.37.2 → 1.39.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/es/index.js +1392 -10
- package/lib/index.js +1392 -10
- package/package.json +1 -1
- package/types/index.d.ts +15417 -2816
package/lib/index.js
CHANGED
|
@@ -253,7 +253,7 @@ const formatErrors = (e) => {
|
|
|
253
253
|
const errors = [filteredErrorInfo];
|
|
254
254
|
const specificError = get__default["default"](e, 'response.data');
|
|
255
255
|
if (specificError) {
|
|
256
|
-
errors.push(specificError);
|
|
256
|
+
errors.push(Object.assign(Object.assign({}, specificError), (specificError.error ? specificError.error : {})));
|
|
257
257
|
}
|
|
258
258
|
return errors;
|
|
259
259
|
}
|
|
@@ -1322,7 +1322,7 @@ class Client$_ extends Client$$ {
|
|
|
1322
1322
|
constructor() {
|
|
1323
1323
|
super(...arguments);
|
|
1324
1324
|
/**
|
|
1325
|
-
*
|
|
1325
|
+
* 管理后台-行为审计
|
|
1326
1326
|
*/
|
|
1327
1327
|
this.admin = {
|
|
1328
1328
|
/**
|
|
@@ -2794,6 +2794,320 @@ class Client$Z extends Client$_ {
|
|
|
2794
2794
|
});
|
|
2795
2795
|
}),
|
|
2796
2796
|
},
|
|
2797
|
+
/**
|
|
2798
|
+
* app.data_asset
|
|
2799
|
+
*/
|
|
2800
|
+
appDataAsset: {
|
|
2801
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2802
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2803
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2804
|
+
const res = yield this.httpInstance
|
|
2805
|
+
.request({
|
|
2806
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path),
|
|
2807
|
+
method: "GET",
|
|
2808
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
2809
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
2810
|
+
data,
|
|
2811
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
2812
|
+
arrayFormat: "repeat",
|
|
2813
|
+
}),
|
|
2814
|
+
})
|
|
2815
|
+
.catch((e) => {
|
|
2816
|
+
this.logger.error(formatErrors(e));
|
|
2817
|
+
});
|
|
2818
|
+
return res;
|
|
2819
|
+
});
|
|
2820
|
+
const Iterable = {
|
|
2821
|
+
[Symbol.asyncIterator]() {
|
|
2822
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
2823
|
+
let hasMore = true;
|
|
2824
|
+
let pageToken;
|
|
2825
|
+
while (hasMore) {
|
|
2826
|
+
try {
|
|
2827
|
+
const res = yield __await(sendRequest({
|
|
2828
|
+
headers,
|
|
2829
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
2830
|
+
data,
|
|
2831
|
+
}));
|
|
2832
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
2833
|
+
// @ts-ignore
|
|
2834
|
+
has_more,
|
|
2835
|
+
// @ts-ignore
|
|
2836
|
+
page_token,
|
|
2837
|
+
// @ts-ignore
|
|
2838
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
2839
|
+
yield yield __await(rest);
|
|
2840
|
+
hasMore = Boolean(has_more);
|
|
2841
|
+
pageToken = page_token || next_page_token;
|
|
2842
|
+
}
|
|
2843
|
+
catch (e) {
|
|
2844
|
+
yield yield __await(null);
|
|
2845
|
+
break;
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
});
|
|
2849
|
+
},
|
|
2850
|
+
};
|
|
2851
|
+
return Iterable;
|
|
2852
|
+
}),
|
|
2853
|
+
/**
|
|
2854
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=list&version=v1 click to debug }
|
|
2855
|
+
*
|
|
2856
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset&version=v1 document }
|
|
2857
|
+
*
|
|
2858
|
+
* 获取数据与知识列表
|
|
2859
|
+
*/
|
|
2860
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2861
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2862
|
+
return this.httpInstance
|
|
2863
|
+
.request({
|
|
2864
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path),
|
|
2865
|
+
method: "GET",
|
|
2866
|
+
data,
|
|
2867
|
+
params,
|
|
2868
|
+
headers,
|
|
2869
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
2870
|
+
})
|
|
2871
|
+
.catch((e) => {
|
|
2872
|
+
this.logger.error(formatErrors(e));
|
|
2873
|
+
throw e;
|
|
2874
|
+
});
|
|
2875
|
+
}),
|
|
2876
|
+
},
|
|
2877
|
+
/**
|
|
2878
|
+
* app.data_asset_tag
|
|
2879
|
+
*/
|
|
2880
|
+
appDataAssetTag: {
|
|
2881
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2882
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2883
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2884
|
+
const res = yield this.httpInstance
|
|
2885
|
+
.request({
|
|
2886
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path),
|
|
2887
|
+
method: "GET",
|
|
2888
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
2889
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
2890
|
+
data,
|
|
2891
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
2892
|
+
arrayFormat: "repeat",
|
|
2893
|
+
}),
|
|
2894
|
+
})
|
|
2895
|
+
.catch((e) => {
|
|
2896
|
+
this.logger.error(formatErrors(e));
|
|
2897
|
+
});
|
|
2898
|
+
return res;
|
|
2899
|
+
});
|
|
2900
|
+
const Iterable = {
|
|
2901
|
+
[Symbol.asyncIterator]() {
|
|
2902
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
2903
|
+
let hasMore = true;
|
|
2904
|
+
let pageToken;
|
|
2905
|
+
while (hasMore) {
|
|
2906
|
+
try {
|
|
2907
|
+
const res = yield __await(sendRequest({
|
|
2908
|
+
headers,
|
|
2909
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
2910
|
+
data,
|
|
2911
|
+
}));
|
|
2912
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
2913
|
+
// @ts-ignore
|
|
2914
|
+
has_more,
|
|
2915
|
+
// @ts-ignore
|
|
2916
|
+
page_token,
|
|
2917
|
+
// @ts-ignore
|
|
2918
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
2919
|
+
yield yield __await(rest);
|
|
2920
|
+
hasMore = Boolean(has_more);
|
|
2921
|
+
pageToken = page_token || next_page_token;
|
|
2922
|
+
}
|
|
2923
|
+
catch (e) {
|
|
2924
|
+
yield yield __await(null);
|
|
2925
|
+
break;
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
},
|
|
2930
|
+
};
|
|
2931
|
+
return Iterable;
|
|
2932
|
+
}),
|
|
2933
|
+
/**
|
|
2934
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset_tag&apiName=list&version=v1 click to debug }
|
|
2935
|
+
*
|
|
2936
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset_tag&version=v1 document }
|
|
2937
|
+
*
|
|
2938
|
+
* 获取数据与知识分类列表
|
|
2939
|
+
*/
|
|
2940
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2941
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2942
|
+
return this.httpInstance
|
|
2943
|
+
.request({
|
|
2944
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path),
|
|
2945
|
+
method: "GET",
|
|
2946
|
+
data,
|
|
2947
|
+
params,
|
|
2948
|
+
headers,
|
|
2949
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
2950
|
+
})
|
|
2951
|
+
.catch((e) => {
|
|
2952
|
+
this.logger.error(formatErrors(e));
|
|
2953
|
+
throw e;
|
|
2954
|
+
});
|
|
2955
|
+
}),
|
|
2956
|
+
},
|
|
2957
|
+
/**
|
|
2958
|
+
* app.knowledge
|
|
2959
|
+
*/
|
|
2960
|
+
appKnowledge: {
|
|
2961
|
+
/**
|
|
2962
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.knowledge&apiName=ask&version=v1 click to debug }
|
|
2963
|
+
*
|
|
2964
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=ask&project=aily&resource=app.knowledge&version=v1 document }
|
|
2965
|
+
*
|
|
2966
|
+
* 执行一次数据知识问答
|
|
2967
|
+
*/
|
|
2968
|
+
ask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2969
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2970
|
+
return this.httpInstance
|
|
2971
|
+
.request({
|
|
2972
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`, path),
|
|
2973
|
+
method: "POST",
|
|
2974
|
+
data,
|
|
2975
|
+
params,
|
|
2976
|
+
headers,
|
|
2977
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
2978
|
+
})
|
|
2979
|
+
.catch((e) => {
|
|
2980
|
+
this.logger.error(formatErrors(e));
|
|
2981
|
+
throw e;
|
|
2982
|
+
});
|
|
2983
|
+
}),
|
|
2984
|
+
},
|
|
2985
|
+
/**
|
|
2986
|
+
* app.skill
|
|
2987
|
+
*/
|
|
2988
|
+
appSkill: {
|
|
2989
|
+
/**
|
|
2990
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=get&version=v1 click to debug }
|
|
2991
|
+
*
|
|
2992
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=app.skill&version=v1 document }
|
|
2993
|
+
*
|
|
2994
|
+
* 该 API 用于获取某个飞书智能伙伴应用的技能(Skill)的详细信息。
|
|
2995
|
+
*/
|
|
2996
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2997
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2998
|
+
return this.httpInstance
|
|
2999
|
+
.request({
|
|
3000
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`, path),
|
|
3001
|
+
method: "GET",
|
|
3002
|
+
data,
|
|
3003
|
+
params,
|
|
3004
|
+
headers,
|
|
3005
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3006
|
+
})
|
|
3007
|
+
.catch((e) => {
|
|
3008
|
+
this.logger.error(formatErrors(e));
|
|
3009
|
+
throw e;
|
|
3010
|
+
});
|
|
3011
|
+
}),
|
|
3012
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3013
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3014
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3015
|
+
const res = yield this.httpInstance
|
|
3016
|
+
.request({
|
|
3017
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path),
|
|
3018
|
+
method: "GET",
|
|
3019
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
3020
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
3021
|
+
data,
|
|
3022
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
3023
|
+
arrayFormat: "repeat",
|
|
3024
|
+
}),
|
|
3025
|
+
})
|
|
3026
|
+
.catch((e) => {
|
|
3027
|
+
this.logger.error(formatErrors(e));
|
|
3028
|
+
});
|
|
3029
|
+
return res;
|
|
3030
|
+
});
|
|
3031
|
+
const Iterable = {
|
|
3032
|
+
[Symbol.asyncIterator]() {
|
|
3033
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3034
|
+
let hasMore = true;
|
|
3035
|
+
let pageToken;
|
|
3036
|
+
while (hasMore) {
|
|
3037
|
+
try {
|
|
3038
|
+
const res = yield __await(sendRequest({
|
|
3039
|
+
headers,
|
|
3040
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3041
|
+
data,
|
|
3042
|
+
}));
|
|
3043
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
3044
|
+
// @ts-ignore
|
|
3045
|
+
has_more,
|
|
3046
|
+
// @ts-ignore
|
|
3047
|
+
page_token,
|
|
3048
|
+
// @ts-ignore
|
|
3049
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3050
|
+
yield yield __await(rest);
|
|
3051
|
+
hasMore = Boolean(has_more);
|
|
3052
|
+
pageToken = page_token || next_page_token;
|
|
3053
|
+
}
|
|
3054
|
+
catch (e) {
|
|
3055
|
+
yield yield __await(null);
|
|
3056
|
+
break;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
});
|
|
3060
|
+
},
|
|
3061
|
+
};
|
|
3062
|
+
return Iterable;
|
|
3063
|
+
}),
|
|
3064
|
+
/**
|
|
3065
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=list&version=v1 click to debug }
|
|
3066
|
+
*
|
|
3067
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.skill&version=v1 document }
|
|
3068
|
+
*
|
|
3069
|
+
* 该 API 用于批量获取飞书智能伙伴应用的技能(Skill)的详细信息
|
|
3070
|
+
*/
|
|
3071
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3072
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3073
|
+
return this.httpInstance
|
|
3074
|
+
.request({
|
|
3075
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path),
|
|
3076
|
+
method: "GET",
|
|
3077
|
+
data,
|
|
3078
|
+
params,
|
|
3079
|
+
headers,
|
|
3080
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3081
|
+
})
|
|
3082
|
+
.catch((e) => {
|
|
3083
|
+
this.logger.error(formatErrors(e));
|
|
3084
|
+
throw e;
|
|
3085
|
+
});
|
|
3086
|
+
}),
|
|
3087
|
+
/**
|
|
3088
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=start&version=v1 click to debug }
|
|
3089
|
+
*
|
|
3090
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=start&project=aily&resource=app.skill&version=v1 document }
|
|
3091
|
+
*
|
|
3092
|
+
* 该 API 用于执行飞书智能伙伴应用的技能(Skill)获取输出
|
|
3093
|
+
*/
|
|
3094
|
+
start: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3095
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3096
|
+
return this.httpInstance
|
|
3097
|
+
.request({
|
|
3098
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`, path),
|
|
3099
|
+
method: "POST",
|
|
3100
|
+
data,
|
|
3101
|
+
params,
|
|
3102
|
+
headers,
|
|
3103
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3104
|
+
})
|
|
3105
|
+
.catch((e) => {
|
|
3106
|
+
this.logger.error(formatErrors(e));
|
|
3107
|
+
throw e;
|
|
3108
|
+
});
|
|
3109
|
+
}),
|
|
3110
|
+
},
|
|
2797
3111
|
},
|
|
2798
3112
|
};
|
|
2799
3113
|
}
|
|
@@ -16973,7 +17287,7 @@ class Client$L extends Client$M {
|
|
|
16973
17287
|
constructor() {
|
|
16974
17288
|
super(...arguments);
|
|
16975
17289
|
/**
|
|
16976
|
-
*
|
|
17290
|
+
* 搜索
|
|
16977
17291
|
*/
|
|
16978
17292
|
this.contact = {
|
|
16979
17293
|
/**
|
|
@@ -23768,6 +24082,48 @@ class Client$I extends Client$J {
|
|
|
23768
24082
|
throw e;
|
|
23769
24083
|
});
|
|
23770
24084
|
}),
|
|
24085
|
+
/**
|
|
24086
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar&version=v1 click to debug }
|
|
24087
|
+
*
|
|
24088
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar&project=corehr&resource=leave&version=v1 document }
|
|
24089
|
+
*/
|
|
24090
|
+
workCalendar: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
24091
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
24092
|
+
return this.httpInstance
|
|
24093
|
+
.request({
|
|
24094
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`, path),
|
|
24095
|
+
method: "POST",
|
|
24096
|
+
data,
|
|
24097
|
+
params,
|
|
24098
|
+
headers,
|
|
24099
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
24100
|
+
})
|
|
24101
|
+
.catch((e) => {
|
|
24102
|
+
this.logger.error(formatErrors(e));
|
|
24103
|
+
throw e;
|
|
24104
|
+
});
|
|
24105
|
+
}),
|
|
24106
|
+
/**
|
|
24107
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar_date&version=v1 click to debug }
|
|
24108
|
+
*
|
|
24109
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar_date&project=corehr&resource=leave&version=v1 document }
|
|
24110
|
+
*/
|
|
24111
|
+
workCalendarDate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
24112
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
24113
|
+
return this.httpInstance
|
|
24114
|
+
.request({
|
|
24115
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`, path),
|
|
24116
|
+
method: "POST",
|
|
24117
|
+
data,
|
|
24118
|
+
params,
|
|
24119
|
+
headers,
|
|
24120
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
24121
|
+
})
|
|
24122
|
+
.catch((e) => {
|
|
24123
|
+
this.logger.error(formatErrors(e));
|
|
24124
|
+
throw e;
|
|
24125
|
+
});
|
|
24126
|
+
}),
|
|
23771
24127
|
},
|
|
23772
24128
|
/**
|
|
23773
24129
|
* leave_granting_record
|
|
@@ -26551,6 +26907,48 @@ class Client$I extends Client$J {
|
|
|
26551
26907
|
throw e;
|
|
26552
26908
|
});
|
|
26553
26909
|
}),
|
|
26910
|
+
/**
|
|
26911
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar&version=v1 click to debug }
|
|
26912
|
+
*
|
|
26913
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar&project=corehr&resource=leave&version=v1 document }
|
|
26914
|
+
*/
|
|
26915
|
+
workCalendar: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
26916
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
26917
|
+
return this.httpInstance
|
|
26918
|
+
.request({
|
|
26919
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`, path),
|
|
26920
|
+
method: "POST",
|
|
26921
|
+
data,
|
|
26922
|
+
params,
|
|
26923
|
+
headers,
|
|
26924
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
26925
|
+
})
|
|
26926
|
+
.catch((e) => {
|
|
26927
|
+
this.logger.error(formatErrors(e));
|
|
26928
|
+
throw e;
|
|
26929
|
+
});
|
|
26930
|
+
}),
|
|
26931
|
+
/**
|
|
26932
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar_date&version=v1 click to debug }
|
|
26933
|
+
*
|
|
26934
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar_date&project=corehr&resource=leave&version=v1 document }
|
|
26935
|
+
*/
|
|
26936
|
+
workCalendarDate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
26937
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
26938
|
+
return this.httpInstance
|
|
26939
|
+
.request({
|
|
26940
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`, path),
|
|
26941
|
+
method: "POST",
|
|
26942
|
+
data,
|
|
26943
|
+
params,
|
|
26944
|
+
headers,
|
|
26945
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
26946
|
+
})
|
|
26947
|
+
.catch((e) => {
|
|
26948
|
+
this.logger.error(formatErrors(e));
|
|
26949
|
+
throw e;
|
|
26950
|
+
});
|
|
26951
|
+
}),
|
|
26554
26952
|
},
|
|
26555
26953
|
/**
|
|
26556
26954
|
* leave_granting_record
|
|
@@ -27595,6 +27993,84 @@ class Client$I extends Client$J {
|
|
|
27595
27993
|
},
|
|
27596
27994
|
},
|
|
27597
27995
|
v2: {
|
|
27996
|
+
/**
|
|
27997
|
+
* approver
|
|
27998
|
+
*/
|
|
27999
|
+
approver: {
|
|
28000
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28001
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28002
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28003
|
+
const res = yield this.httpInstance
|
|
28004
|
+
.request({
|
|
28005
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28006
|
+
method: "GET",
|
|
28007
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28008
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28009
|
+
data,
|
|
28010
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28011
|
+
arrayFormat: "repeat",
|
|
28012
|
+
}),
|
|
28013
|
+
})
|
|
28014
|
+
.catch((e) => {
|
|
28015
|
+
this.logger.error(formatErrors(e));
|
|
28016
|
+
});
|
|
28017
|
+
return res;
|
|
28018
|
+
});
|
|
28019
|
+
const Iterable = {
|
|
28020
|
+
[Symbol.asyncIterator]() {
|
|
28021
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28022
|
+
let hasMore = true;
|
|
28023
|
+
let pageToken;
|
|
28024
|
+
while (hasMore) {
|
|
28025
|
+
try {
|
|
28026
|
+
const res = yield __await(sendRequest({
|
|
28027
|
+
headers,
|
|
28028
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28029
|
+
data,
|
|
28030
|
+
}));
|
|
28031
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28032
|
+
// @ts-ignore
|
|
28033
|
+
has_more,
|
|
28034
|
+
// @ts-ignore
|
|
28035
|
+
page_token,
|
|
28036
|
+
// @ts-ignore
|
|
28037
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28038
|
+
yield yield __await(rest);
|
|
28039
|
+
hasMore = Boolean(has_more);
|
|
28040
|
+
pageToken = page_token || next_page_token;
|
|
28041
|
+
}
|
|
28042
|
+
catch (e) {
|
|
28043
|
+
yield yield __await(null);
|
|
28044
|
+
break;
|
|
28045
|
+
}
|
|
28046
|
+
}
|
|
28047
|
+
});
|
|
28048
|
+
},
|
|
28049
|
+
};
|
|
28050
|
+
return Iterable;
|
|
28051
|
+
}),
|
|
28052
|
+
/**
|
|
28053
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approver&apiName=list&version=v2 click to debug }
|
|
28054
|
+
*
|
|
28055
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=approver&version=v2 document }
|
|
28056
|
+
*/
|
|
28057
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28058
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28059
|
+
return this.httpInstance
|
|
28060
|
+
.request({
|
|
28061
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28062
|
+
method: "GET",
|
|
28063
|
+
data,
|
|
28064
|
+
params,
|
|
28065
|
+
headers,
|
|
28066
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28067
|
+
})
|
|
28068
|
+
.catch((e) => {
|
|
28069
|
+
this.logger.error(formatErrors(e));
|
|
28070
|
+
throw e;
|
|
28071
|
+
});
|
|
28072
|
+
}),
|
|
28073
|
+
},
|
|
27598
28074
|
/**
|
|
27599
28075
|
* basic_info.bank
|
|
27600
28076
|
*/
|
|
@@ -28141,6 +28617,84 @@ class Client$I extends Client$J {
|
|
|
28141
28617
|
});
|
|
28142
28618
|
}),
|
|
28143
28619
|
},
|
|
28620
|
+
/**
|
|
28621
|
+
* basic_info.language
|
|
28622
|
+
*/
|
|
28623
|
+
basicInfoLanguage: {
|
|
28624
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28625
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28626
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28627
|
+
const res = yield this.httpInstance
|
|
28628
|
+
.request({
|
|
28629
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`, path),
|
|
28630
|
+
method: "POST",
|
|
28631
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28632
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28633
|
+
data,
|
|
28634
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28635
|
+
arrayFormat: "repeat",
|
|
28636
|
+
}),
|
|
28637
|
+
})
|
|
28638
|
+
.catch((e) => {
|
|
28639
|
+
this.logger.error(formatErrors(e));
|
|
28640
|
+
});
|
|
28641
|
+
return res;
|
|
28642
|
+
});
|
|
28643
|
+
const Iterable = {
|
|
28644
|
+
[Symbol.asyncIterator]() {
|
|
28645
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28646
|
+
let hasMore = true;
|
|
28647
|
+
let pageToken;
|
|
28648
|
+
while (hasMore) {
|
|
28649
|
+
try {
|
|
28650
|
+
const res = yield __await(sendRequest({
|
|
28651
|
+
headers,
|
|
28652
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28653
|
+
data,
|
|
28654
|
+
}));
|
|
28655
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28656
|
+
// @ts-ignore
|
|
28657
|
+
has_more,
|
|
28658
|
+
// @ts-ignore
|
|
28659
|
+
page_token,
|
|
28660
|
+
// @ts-ignore
|
|
28661
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28662
|
+
yield yield __await(rest);
|
|
28663
|
+
hasMore = Boolean(has_more);
|
|
28664
|
+
pageToken = page_token || next_page_token;
|
|
28665
|
+
}
|
|
28666
|
+
catch (e) {
|
|
28667
|
+
yield yield __await(null);
|
|
28668
|
+
break;
|
|
28669
|
+
}
|
|
28670
|
+
}
|
|
28671
|
+
});
|
|
28672
|
+
},
|
|
28673
|
+
};
|
|
28674
|
+
return Iterable;
|
|
28675
|
+
}),
|
|
28676
|
+
/**
|
|
28677
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.language&apiName=search&version=v2 click to debug }
|
|
28678
|
+
*
|
|
28679
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.language&version=v2 document }
|
|
28680
|
+
*/
|
|
28681
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28682
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28683
|
+
return this.httpInstance
|
|
28684
|
+
.request({
|
|
28685
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`, path),
|
|
28686
|
+
method: "POST",
|
|
28687
|
+
data,
|
|
28688
|
+
params,
|
|
28689
|
+
headers,
|
|
28690
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28691
|
+
})
|
|
28692
|
+
.catch((e) => {
|
|
28693
|
+
this.logger.error(formatErrors(e));
|
|
28694
|
+
throw e;
|
|
28695
|
+
});
|
|
28696
|
+
}),
|
|
28697
|
+
},
|
|
28144
28698
|
/**
|
|
28145
28699
|
* basic_info.nationality
|
|
28146
28700
|
*/
|
|
@@ -28219,6 +28773,84 @@ class Client$I extends Client$J {
|
|
|
28219
28773
|
});
|
|
28220
28774
|
}),
|
|
28221
28775
|
},
|
|
28776
|
+
/**
|
|
28777
|
+
* basic_info.time_zone
|
|
28778
|
+
*/
|
|
28779
|
+
basicInfoTimeZone: {
|
|
28780
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28781
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28782
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28783
|
+
const res = yield this.httpInstance
|
|
28784
|
+
.request({
|
|
28785
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28786
|
+
method: "POST",
|
|
28787
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28788
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28789
|
+
data,
|
|
28790
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28791
|
+
arrayFormat: "repeat",
|
|
28792
|
+
}),
|
|
28793
|
+
})
|
|
28794
|
+
.catch((e) => {
|
|
28795
|
+
this.logger.error(formatErrors(e));
|
|
28796
|
+
});
|
|
28797
|
+
return res;
|
|
28798
|
+
});
|
|
28799
|
+
const Iterable = {
|
|
28800
|
+
[Symbol.asyncIterator]() {
|
|
28801
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28802
|
+
let hasMore = true;
|
|
28803
|
+
let pageToken;
|
|
28804
|
+
while (hasMore) {
|
|
28805
|
+
try {
|
|
28806
|
+
const res = yield __await(sendRequest({
|
|
28807
|
+
headers,
|
|
28808
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28809
|
+
data,
|
|
28810
|
+
}));
|
|
28811
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28812
|
+
// @ts-ignore
|
|
28813
|
+
has_more,
|
|
28814
|
+
// @ts-ignore
|
|
28815
|
+
page_token,
|
|
28816
|
+
// @ts-ignore
|
|
28817
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28818
|
+
yield yield __await(rest);
|
|
28819
|
+
hasMore = Boolean(has_more);
|
|
28820
|
+
pageToken = page_token || next_page_token;
|
|
28821
|
+
}
|
|
28822
|
+
catch (e) {
|
|
28823
|
+
yield yield __await(null);
|
|
28824
|
+
break;
|
|
28825
|
+
}
|
|
28826
|
+
}
|
|
28827
|
+
});
|
|
28828
|
+
},
|
|
28829
|
+
};
|
|
28830
|
+
return Iterable;
|
|
28831
|
+
}),
|
|
28832
|
+
/**
|
|
28833
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.time_zone&apiName=search&version=v2 click to debug }
|
|
28834
|
+
*
|
|
28835
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.time_zone&version=v2 document }
|
|
28836
|
+
*/
|
|
28837
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28838
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28839
|
+
return this.httpInstance
|
|
28840
|
+
.request({
|
|
28841
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28842
|
+
method: "POST",
|
|
28843
|
+
data,
|
|
28844
|
+
params,
|
|
28845
|
+
headers,
|
|
28846
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28847
|
+
})
|
|
28848
|
+
.catch((e) => {
|
|
28849
|
+
this.logger.error(formatErrors(e));
|
|
28850
|
+
throw e;
|
|
28851
|
+
});
|
|
28852
|
+
}),
|
|
28853
|
+
},
|
|
28222
28854
|
/**
|
|
28223
28855
|
* bp
|
|
28224
28856
|
*/
|
|
@@ -28324,6 +28956,27 @@ class Client$I extends Client$J {
|
|
|
28324
28956
|
* company
|
|
28325
28957
|
*/
|
|
28326
28958
|
company: {
|
|
28959
|
+
/**
|
|
28960
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=active&version=v2 click to debug }
|
|
28961
|
+
*
|
|
28962
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=company&version=v2 document }
|
|
28963
|
+
*/
|
|
28964
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28965
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28966
|
+
return this.httpInstance
|
|
28967
|
+
.request({
|
|
28968
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/active`, path),
|
|
28969
|
+
method: "POST",
|
|
28970
|
+
data,
|
|
28971
|
+
params,
|
|
28972
|
+
headers,
|
|
28973
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28974
|
+
})
|
|
28975
|
+
.catch((e) => {
|
|
28976
|
+
this.logger.error(formatErrors(e));
|
|
28977
|
+
throw e;
|
|
28978
|
+
});
|
|
28979
|
+
}),
|
|
28327
28980
|
/**
|
|
28328
28981
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
|
|
28329
28982
|
*
|
|
@@ -28347,6 +29000,79 @@ class Client$I extends Client$J {
|
|
|
28347
29000
|
throw e;
|
|
28348
29001
|
});
|
|
28349
29002
|
}),
|
|
29003
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29004
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29005
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29006
|
+
const res = yield this.httpInstance
|
|
29007
|
+
.request({
|
|
29008
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
29009
|
+
method: "GET",
|
|
29010
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
29011
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
29012
|
+
data,
|
|
29013
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
29014
|
+
arrayFormat: "repeat",
|
|
29015
|
+
}),
|
|
29016
|
+
})
|
|
29017
|
+
.catch((e) => {
|
|
29018
|
+
this.logger.error(formatErrors(e));
|
|
29019
|
+
});
|
|
29020
|
+
return res;
|
|
29021
|
+
});
|
|
29022
|
+
const Iterable = {
|
|
29023
|
+
[Symbol.asyncIterator]() {
|
|
29024
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
29025
|
+
let hasMore = true;
|
|
29026
|
+
let pageToken;
|
|
29027
|
+
while (hasMore) {
|
|
29028
|
+
try {
|
|
29029
|
+
const res = yield __await(sendRequest({
|
|
29030
|
+
headers,
|
|
29031
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
29032
|
+
data,
|
|
29033
|
+
}));
|
|
29034
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
29035
|
+
// @ts-ignore
|
|
29036
|
+
has_more,
|
|
29037
|
+
// @ts-ignore
|
|
29038
|
+
page_token,
|
|
29039
|
+
// @ts-ignore
|
|
29040
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
29041
|
+
yield yield __await(rest);
|
|
29042
|
+
hasMore = Boolean(has_more);
|
|
29043
|
+
pageToken = page_token || next_page_token;
|
|
29044
|
+
}
|
|
29045
|
+
catch (e) {
|
|
29046
|
+
yield yield __await(null);
|
|
29047
|
+
break;
|
|
29048
|
+
}
|
|
29049
|
+
}
|
|
29050
|
+
});
|
|
29051
|
+
},
|
|
29052
|
+
};
|
|
29053
|
+
return Iterable;
|
|
29054
|
+
}),
|
|
29055
|
+
/**
|
|
29056
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=query_recent_change&version=v2 click to debug }
|
|
29057
|
+
*
|
|
29058
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=company&version=v2 document }
|
|
29059
|
+
*/
|
|
29060
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29061
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29062
|
+
return this.httpInstance
|
|
29063
|
+
.request({
|
|
29064
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
29065
|
+
method: "GET",
|
|
29066
|
+
data,
|
|
29067
|
+
params,
|
|
29068
|
+
headers,
|
|
29069
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29070
|
+
})
|
|
29071
|
+
.catch((e) => {
|
|
29072
|
+
this.logger.error(formatErrors(e));
|
|
29073
|
+
throw e;
|
|
29074
|
+
});
|
|
29075
|
+
}),
|
|
28350
29076
|
},
|
|
28351
29077
|
/**
|
|
28352
29078
|
* contract
|
|
@@ -28712,6 +29438,79 @@ class Client$I extends Client$J {
|
|
|
28712
29438
|
throw e;
|
|
28713
29439
|
});
|
|
28714
29440
|
}),
|
|
29441
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29442
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29443
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29444
|
+
const res = yield this.httpInstance
|
|
29445
|
+
.request({
|
|
29446
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`, path),
|
|
29447
|
+
method: "GET",
|
|
29448
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
29449
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
29450
|
+
data,
|
|
29451
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
29452
|
+
arrayFormat: "repeat",
|
|
29453
|
+
}),
|
|
29454
|
+
})
|
|
29455
|
+
.catch((e) => {
|
|
29456
|
+
this.logger.error(formatErrors(e));
|
|
29457
|
+
});
|
|
29458
|
+
return res;
|
|
29459
|
+
});
|
|
29460
|
+
const Iterable = {
|
|
29461
|
+
[Symbol.asyncIterator]() {
|
|
29462
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
29463
|
+
let hasMore = true;
|
|
29464
|
+
let pageToken;
|
|
29465
|
+
while (hasMore) {
|
|
29466
|
+
try {
|
|
29467
|
+
const res = yield __await(sendRequest({
|
|
29468
|
+
headers,
|
|
29469
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
29470
|
+
data,
|
|
29471
|
+
}));
|
|
29472
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
29473
|
+
// @ts-ignore
|
|
29474
|
+
has_more,
|
|
29475
|
+
// @ts-ignore
|
|
29476
|
+
page_token,
|
|
29477
|
+
// @ts-ignore
|
|
29478
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
29479
|
+
yield yield __await(rest);
|
|
29480
|
+
hasMore = Boolean(has_more);
|
|
29481
|
+
pageToken = page_token || next_page_token;
|
|
29482
|
+
}
|
|
29483
|
+
catch (e) {
|
|
29484
|
+
yield yield __await(null);
|
|
29485
|
+
break;
|
|
29486
|
+
}
|
|
29487
|
+
}
|
|
29488
|
+
});
|
|
29489
|
+
},
|
|
29490
|
+
};
|
|
29491
|
+
return Iterable;
|
|
29492
|
+
}),
|
|
29493
|
+
/**
|
|
29494
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_recent_change&version=v2 click to debug }
|
|
29495
|
+
*
|
|
29496
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=department&version=v2 document }
|
|
29497
|
+
*/
|
|
29498
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29499
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29500
|
+
return this.httpInstance
|
|
29501
|
+
.request({
|
|
29502
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`, path),
|
|
29503
|
+
method: "GET",
|
|
29504
|
+
data,
|
|
29505
|
+
params,
|
|
29506
|
+
headers,
|
|
29507
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29508
|
+
})
|
|
29509
|
+
.catch((e) => {
|
|
29510
|
+
this.logger.error(formatErrors(e));
|
|
29511
|
+
throw e;
|
|
29512
|
+
});
|
|
29513
|
+
}),
|
|
28715
29514
|
/**
|
|
28716
29515
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_timeline&version=v2 click to debug }
|
|
28717
29516
|
*
|
|
@@ -29192,6 +29991,75 @@ class Client$I extends Client$J {
|
|
|
29192
29991
|
* job_grade
|
|
29193
29992
|
*/
|
|
29194
29993
|
jobGrade: {
|
|
29994
|
+
/**
|
|
29995
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=create&version=v2 click to debug }
|
|
29996
|
+
*
|
|
29997
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_grade&version=v2 document }
|
|
29998
|
+
*
|
|
29999
|
+
* 创建职等数据
|
|
30000
|
+
*/
|
|
30001
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30002
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30003
|
+
return this.httpInstance
|
|
30004
|
+
.request({
|
|
30005
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades`, path),
|
|
30006
|
+
method: "POST",
|
|
30007
|
+
data,
|
|
30008
|
+
params,
|
|
30009
|
+
headers,
|
|
30010
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30011
|
+
})
|
|
30012
|
+
.catch((e) => {
|
|
30013
|
+
this.logger.error(formatErrors(e));
|
|
30014
|
+
throw e;
|
|
30015
|
+
});
|
|
30016
|
+
}),
|
|
30017
|
+
/**
|
|
30018
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=delete&version=v2 click to debug }
|
|
30019
|
+
*
|
|
30020
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=job_grade&version=v2 document }
|
|
30021
|
+
*
|
|
30022
|
+
* 删除职等信息
|
|
30023
|
+
*/
|
|
30024
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30025
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30026
|
+
return this.httpInstance
|
|
30027
|
+
.request({
|
|
30028
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`, path),
|
|
30029
|
+
method: "DELETE",
|
|
30030
|
+
data,
|
|
30031
|
+
params,
|
|
30032
|
+
headers,
|
|
30033
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30034
|
+
})
|
|
30035
|
+
.catch((e) => {
|
|
30036
|
+
this.logger.error(formatErrors(e));
|
|
30037
|
+
throw e;
|
|
30038
|
+
});
|
|
30039
|
+
}),
|
|
30040
|
+
/**
|
|
30041
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=patch&version=v2 click to debug }
|
|
30042
|
+
*
|
|
30043
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=job_grade&version=v2 document }
|
|
30044
|
+
*
|
|
30045
|
+
* 更新职等信息
|
|
30046
|
+
*/
|
|
30047
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30048
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30049
|
+
return this.httpInstance
|
|
30050
|
+
.request({
|
|
30051
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`, path),
|
|
30052
|
+
method: "PATCH",
|
|
30053
|
+
data,
|
|
30054
|
+
params,
|
|
30055
|
+
headers,
|
|
30056
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30057
|
+
})
|
|
30058
|
+
.catch((e) => {
|
|
30059
|
+
this.logger.error(formatErrors(e));
|
|
30060
|
+
throw e;
|
|
30061
|
+
});
|
|
30062
|
+
}),
|
|
29195
30063
|
/**
|
|
29196
30064
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=query&version=v2 click to debug }
|
|
29197
30065
|
*
|
|
@@ -29248,6 +30116,29 @@ class Client$I extends Client$J {
|
|
|
29248
30116
|
* location
|
|
29249
30117
|
*/
|
|
29250
30118
|
location: {
|
|
30119
|
+
/**
|
|
30120
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=active&version=v2 click to debug }
|
|
30121
|
+
*
|
|
30122
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=location&version=v2 document }
|
|
30123
|
+
*
|
|
30124
|
+
* 启停/停用地点
|
|
30125
|
+
*/
|
|
30126
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30127
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30128
|
+
return this.httpInstance
|
|
30129
|
+
.request({
|
|
30130
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/active`, path),
|
|
30131
|
+
method: "POST",
|
|
30132
|
+
data,
|
|
30133
|
+
params,
|
|
30134
|
+
headers,
|
|
30135
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30136
|
+
})
|
|
30137
|
+
.catch((e) => {
|
|
30138
|
+
this.logger.error(formatErrors(e));
|
|
30139
|
+
throw e;
|
|
30140
|
+
});
|
|
30141
|
+
}),
|
|
29251
30142
|
/**
|
|
29252
30143
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
|
|
29253
30144
|
*
|
|
@@ -29271,6 +30162,103 @@ class Client$I extends Client$J {
|
|
|
29271
30162
|
throw e;
|
|
29272
30163
|
});
|
|
29273
30164
|
}),
|
|
30165
|
+
/**
|
|
30166
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=patch&version=v2 click to debug }
|
|
30167
|
+
*
|
|
30168
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location&version=v2 document }
|
|
30169
|
+
*
|
|
30170
|
+
* 更新地点
|
|
30171
|
+
*/
|
|
30172
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30173
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30174
|
+
return this.httpInstance
|
|
30175
|
+
.request({
|
|
30176
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id`, path),
|
|
30177
|
+
method: "PATCH",
|
|
30178
|
+
data,
|
|
30179
|
+
params,
|
|
30180
|
+
headers,
|
|
30181
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30182
|
+
})
|
|
30183
|
+
.catch((e) => {
|
|
30184
|
+
this.logger.error(formatErrors(e));
|
|
30185
|
+
throw e;
|
|
30186
|
+
});
|
|
30187
|
+
}),
|
|
30188
|
+
},
|
|
30189
|
+
/**
|
|
30190
|
+
* location.address
|
|
30191
|
+
*/
|
|
30192
|
+
locationAddress: {
|
|
30193
|
+
/**
|
|
30194
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=create&version=v2 click to debug }
|
|
30195
|
+
*
|
|
30196
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=location.address&version=v2 document }
|
|
30197
|
+
*
|
|
30198
|
+
* 添加地点地址
|
|
30199
|
+
*/
|
|
30200
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30201
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30202
|
+
return this.httpInstance
|
|
30203
|
+
.request({
|
|
30204
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`, path),
|
|
30205
|
+
method: "POST",
|
|
30206
|
+
data,
|
|
30207
|
+
params,
|
|
30208
|
+
headers,
|
|
30209
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30210
|
+
})
|
|
30211
|
+
.catch((e) => {
|
|
30212
|
+
this.logger.error(formatErrors(e));
|
|
30213
|
+
throw e;
|
|
30214
|
+
});
|
|
30215
|
+
}),
|
|
30216
|
+
/**
|
|
30217
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=delete&version=v2 click to debug }
|
|
30218
|
+
*
|
|
30219
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=location.address&version=v2 document }
|
|
30220
|
+
*
|
|
30221
|
+
* 删除地点地址
|
|
30222
|
+
*/
|
|
30223
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30224
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30225
|
+
return this.httpInstance
|
|
30226
|
+
.request({
|
|
30227
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30228
|
+
method: "DELETE",
|
|
30229
|
+
data,
|
|
30230
|
+
params,
|
|
30231
|
+
headers,
|
|
30232
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30233
|
+
})
|
|
30234
|
+
.catch((e) => {
|
|
30235
|
+
this.logger.error(formatErrors(e));
|
|
30236
|
+
throw e;
|
|
30237
|
+
});
|
|
30238
|
+
}),
|
|
30239
|
+
/**
|
|
30240
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=patch&version=v2 click to debug }
|
|
30241
|
+
*
|
|
30242
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location.address&version=v2 document }
|
|
30243
|
+
*
|
|
30244
|
+
* 更新地点地址
|
|
30245
|
+
*/
|
|
30246
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30247
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30248
|
+
return this.httpInstance
|
|
30249
|
+
.request({
|
|
30250
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30251
|
+
method: "PATCH",
|
|
30252
|
+
data,
|
|
30253
|
+
params,
|
|
30254
|
+
headers,
|
|
30255
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30256
|
+
})
|
|
30257
|
+
.catch((e) => {
|
|
30258
|
+
this.logger.error(formatErrors(e));
|
|
30259
|
+
throw e;
|
|
30260
|
+
});
|
|
30261
|
+
}),
|
|
29274
30262
|
},
|
|
29275
30263
|
/**
|
|
29276
30264
|
* person
|
|
@@ -29932,15 +30920,93 @@ class Client$I extends Client$J {
|
|
|
29932
30920
|
return Iterable;
|
|
29933
30921
|
}),
|
|
29934
30922
|
/**
|
|
29935
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=list&version=v2 click to debug }
|
|
30923
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=list&version=v2 click to debug }
|
|
30924
|
+
*
|
|
30925
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=process&version=v2 document }
|
|
30926
|
+
*/
|
|
30927
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30928
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30929
|
+
return this.httpInstance
|
|
30930
|
+
.request({
|
|
30931
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
|
|
30932
|
+
method: "GET",
|
|
30933
|
+
data,
|
|
30934
|
+
params,
|
|
30935
|
+
headers,
|
|
30936
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30937
|
+
})
|
|
30938
|
+
.catch((e) => {
|
|
30939
|
+
this.logger.error(formatErrors(e));
|
|
30940
|
+
throw e;
|
|
30941
|
+
});
|
|
30942
|
+
}),
|
|
30943
|
+
},
|
|
30944
|
+
/**
|
|
30945
|
+
* workforce_plan
|
|
30946
|
+
*/
|
|
30947
|
+
workforcePlan: {
|
|
30948
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30949
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30950
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
30951
|
+
const res = yield this.httpInstance
|
|
30952
|
+
.request({
|
|
30953
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
30954
|
+
method: "GET",
|
|
30955
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
30956
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
30957
|
+
data,
|
|
30958
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
30959
|
+
arrayFormat: "repeat",
|
|
30960
|
+
}),
|
|
30961
|
+
})
|
|
30962
|
+
.catch((e) => {
|
|
30963
|
+
this.logger.error(formatErrors(e));
|
|
30964
|
+
});
|
|
30965
|
+
return res;
|
|
30966
|
+
});
|
|
30967
|
+
const Iterable = {
|
|
30968
|
+
[Symbol.asyncIterator]() {
|
|
30969
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
30970
|
+
let hasMore = true;
|
|
30971
|
+
let pageToken;
|
|
30972
|
+
while (hasMore) {
|
|
30973
|
+
try {
|
|
30974
|
+
const res = yield __await(sendRequest({
|
|
30975
|
+
headers,
|
|
30976
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
30977
|
+
data,
|
|
30978
|
+
}));
|
|
30979
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
30980
|
+
// @ts-ignore
|
|
30981
|
+
has_more,
|
|
30982
|
+
// @ts-ignore
|
|
30983
|
+
page_token,
|
|
30984
|
+
// @ts-ignore
|
|
30985
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
30986
|
+
yield yield __await(rest);
|
|
30987
|
+
hasMore = Boolean(has_more);
|
|
30988
|
+
pageToken = page_token || next_page_token;
|
|
30989
|
+
}
|
|
30990
|
+
catch (e) {
|
|
30991
|
+
yield yield __await(null);
|
|
30992
|
+
break;
|
|
30993
|
+
}
|
|
30994
|
+
}
|
|
30995
|
+
});
|
|
30996
|
+
},
|
|
30997
|
+
};
|
|
30998
|
+
return Iterable;
|
|
30999
|
+
}),
|
|
31000
|
+
/**
|
|
31001
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan&apiName=list&version=v2 click to debug }
|
|
29936
31002
|
*
|
|
29937
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=
|
|
31003
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=workforce_plan&version=v2 document }
|
|
29938
31004
|
*/
|
|
29939
31005
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29940
31006
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29941
31007
|
return this.httpInstance
|
|
29942
31008
|
.request({
|
|
29943
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
31009
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
29944
31010
|
method: "GET",
|
|
29945
31011
|
data,
|
|
29946
31012
|
params,
|
|
@@ -29953,6 +31019,32 @@ class Client$I extends Client$J {
|
|
|
29953
31019
|
});
|
|
29954
31020
|
}),
|
|
29955
31021
|
},
|
|
31022
|
+
/**
|
|
31023
|
+
* workforce_plan_detail
|
|
31024
|
+
*/
|
|
31025
|
+
workforcePlanDetail: {
|
|
31026
|
+
/**
|
|
31027
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan_detail&apiName=batch&version=v2 click to debug }
|
|
31028
|
+
*
|
|
31029
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=workforce_plan_detail&version=v2 document }
|
|
31030
|
+
*/
|
|
31031
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31032
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31033
|
+
return this.httpInstance
|
|
31034
|
+
.request({
|
|
31035
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`, path),
|
|
31036
|
+
method: "POST",
|
|
31037
|
+
data,
|
|
31038
|
+
params,
|
|
31039
|
+
headers,
|
|
31040
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31041
|
+
})
|
|
31042
|
+
.catch((e) => {
|
|
31043
|
+
this.logger.error(formatErrors(e));
|
|
31044
|
+
throw e;
|
|
31045
|
+
});
|
|
31046
|
+
}),
|
|
31047
|
+
},
|
|
29956
31048
|
},
|
|
29957
31049
|
};
|
|
29958
31050
|
}
|
|
@@ -30790,6 +31882,32 @@ class Client$F extends Client$G {
|
|
|
30790
31882
|
});
|
|
30791
31883
|
}),
|
|
30792
31884
|
},
|
|
31885
|
+
/**
|
|
31886
|
+
* document.block.descendant
|
|
31887
|
+
*/
|
|
31888
|
+
documentBlockDescendant: {
|
|
31889
|
+
/**
|
|
31890
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.descendant&apiName=create&version=v1 click to debug }
|
|
31891
|
+
*
|
|
31892
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=document.block.descendant&version=v1 document }
|
|
31893
|
+
*/
|
|
31894
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31895
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31896
|
+
return this.httpInstance
|
|
31897
|
+
.request({
|
|
31898
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`, path),
|
|
31899
|
+
method: "POST",
|
|
31900
|
+
data,
|
|
31901
|
+
params,
|
|
31902
|
+
headers,
|
|
31903
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31904
|
+
})
|
|
31905
|
+
.catch((e) => {
|
|
31906
|
+
this.logger.error(formatErrors(e));
|
|
31907
|
+
throw e;
|
|
31908
|
+
});
|
|
31909
|
+
}),
|
|
31910
|
+
},
|
|
30793
31911
|
/**
|
|
30794
31912
|
* 文档
|
|
30795
31913
|
*/
|
|
@@ -31200,6 +32318,32 @@ class Client$F extends Client$G {
|
|
|
31200
32318
|
});
|
|
31201
32319
|
}),
|
|
31202
32320
|
},
|
|
32321
|
+
/**
|
|
32322
|
+
* document.block.descendant
|
|
32323
|
+
*/
|
|
32324
|
+
documentBlockDescendant: {
|
|
32325
|
+
/**
|
|
32326
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.descendant&apiName=create&version=v1 click to debug }
|
|
32327
|
+
*
|
|
32328
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=document.block.descendant&version=v1 document }
|
|
32329
|
+
*/
|
|
32330
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
32331
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
32332
|
+
return this.httpInstance
|
|
32333
|
+
.request({
|
|
32334
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`, path),
|
|
32335
|
+
method: "POST",
|
|
32336
|
+
data,
|
|
32337
|
+
params,
|
|
32338
|
+
headers,
|
|
32339
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
32340
|
+
})
|
|
32341
|
+
.catch((e) => {
|
|
32342
|
+
this.logger.error(formatErrors(e));
|
|
32343
|
+
throw e;
|
|
32344
|
+
});
|
|
32345
|
+
}),
|
|
32346
|
+
},
|
|
31203
32347
|
/**
|
|
31204
32348
|
* 文档
|
|
31205
32349
|
*/
|
|
@@ -31723,7 +32867,7 @@ class Client$E extends Client$F {
|
|
|
31723
32867
|
}),
|
|
31724
32868
|
},
|
|
31725
32869
|
/**
|
|
31726
|
-
*
|
|
32870
|
+
* 文件夹
|
|
31727
32871
|
*/
|
|
31728
32872
|
file: {
|
|
31729
32873
|
/**
|
|
@@ -33543,7 +34687,7 @@ class Client$E extends Client$F {
|
|
|
33543
34687
|
}),
|
|
33544
34688
|
},
|
|
33545
34689
|
/**
|
|
33546
|
-
*
|
|
34690
|
+
* 文件夹
|
|
33547
34691
|
*/
|
|
33548
34692
|
file: {
|
|
33549
34693
|
/**
|
|
@@ -42938,6 +44082,27 @@ class Client$u extends Client$v {
|
|
|
42938
44082
|
throw e;
|
|
42939
44083
|
});
|
|
42940
44084
|
}),
|
|
44085
|
+
/**
|
|
44086
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
44087
|
+
*
|
|
44088
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
44089
|
+
*/
|
|
44090
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44091
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44092
|
+
return this.httpInstance
|
|
44093
|
+
.request({
|
|
44094
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
44095
|
+
method: "POST",
|
|
44096
|
+
data,
|
|
44097
|
+
params,
|
|
44098
|
+
headers,
|
|
44099
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44100
|
+
})
|
|
44101
|
+
.catch((e) => {
|
|
44102
|
+
this.logger.error(formatErrors(e));
|
|
44103
|
+
throw e;
|
|
44104
|
+
});
|
|
44105
|
+
}),
|
|
42941
44106
|
},
|
|
42942
44107
|
/**
|
|
42943
44108
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -43231,6 +44396,82 @@ class Client$u extends Client$v {
|
|
|
43231
44396
|
});
|
|
43232
44397
|
}),
|
|
43233
44398
|
},
|
|
44399
|
+
/**
|
|
44400
|
+
* talent_tag
|
|
44401
|
+
*/
|
|
44402
|
+
talentTag: {
|
|
44403
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44404
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44405
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
44406
|
+
const res = yield this.httpInstance
|
|
44407
|
+
.request({
|
|
44408
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44409
|
+
method: "GET",
|
|
44410
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
44411
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
44412
|
+
data,
|
|
44413
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44414
|
+
})
|
|
44415
|
+
.catch((e) => {
|
|
44416
|
+
this.logger.error(formatErrors(e));
|
|
44417
|
+
});
|
|
44418
|
+
return res;
|
|
44419
|
+
});
|
|
44420
|
+
const Iterable = {
|
|
44421
|
+
[Symbol.asyncIterator]() {
|
|
44422
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
44423
|
+
let hasMore = true;
|
|
44424
|
+
let pageToken;
|
|
44425
|
+
while (hasMore) {
|
|
44426
|
+
try {
|
|
44427
|
+
const res = yield __await(sendRequest({
|
|
44428
|
+
headers,
|
|
44429
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
44430
|
+
data,
|
|
44431
|
+
}));
|
|
44432
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
44433
|
+
// @ts-ignore
|
|
44434
|
+
has_more,
|
|
44435
|
+
// @ts-ignore
|
|
44436
|
+
page_token,
|
|
44437
|
+
// @ts-ignore
|
|
44438
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
44439
|
+
yield yield __await(rest);
|
|
44440
|
+
hasMore = Boolean(has_more);
|
|
44441
|
+
pageToken = page_token || next_page_token;
|
|
44442
|
+
}
|
|
44443
|
+
catch (e) {
|
|
44444
|
+
yield yield __await(null);
|
|
44445
|
+
break;
|
|
44446
|
+
}
|
|
44447
|
+
}
|
|
44448
|
+
});
|
|
44449
|
+
},
|
|
44450
|
+
};
|
|
44451
|
+
return Iterable;
|
|
44452
|
+
}),
|
|
44453
|
+
/**
|
|
44454
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
44455
|
+
*
|
|
44456
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
44457
|
+
*/
|
|
44458
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44459
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44460
|
+
return this.httpInstance
|
|
44461
|
+
.request({
|
|
44462
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44463
|
+
method: "GET",
|
|
44464
|
+
data,
|
|
44465
|
+
params,
|
|
44466
|
+
headers,
|
|
44467
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44468
|
+
})
|
|
44469
|
+
.catch((e) => {
|
|
44470
|
+
this.logger.error(formatErrors(e));
|
|
44471
|
+
throw e;
|
|
44472
|
+
});
|
|
44473
|
+
}),
|
|
44474
|
+
},
|
|
43234
44475
|
/**
|
|
43235
44476
|
* termination_reason
|
|
43236
44477
|
*/
|
|
@@ -48296,6 +49537,27 @@ class Client$u extends Client$v {
|
|
|
48296
49537
|
throw e;
|
|
48297
49538
|
});
|
|
48298
49539
|
}),
|
|
49540
|
+
/**
|
|
49541
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
49542
|
+
*
|
|
49543
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
49544
|
+
*/
|
|
49545
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49546
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49547
|
+
return this.httpInstance
|
|
49548
|
+
.request({
|
|
49549
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
49550
|
+
method: "POST",
|
|
49551
|
+
data,
|
|
49552
|
+
params,
|
|
49553
|
+
headers,
|
|
49554
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
49555
|
+
})
|
|
49556
|
+
.catch((e) => {
|
|
49557
|
+
this.logger.error(formatErrors(e));
|
|
49558
|
+
throw e;
|
|
49559
|
+
});
|
|
49560
|
+
}),
|
|
48299
49561
|
},
|
|
48300
49562
|
/**
|
|
48301
49563
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -48593,6 +49855,84 @@ class Client$u extends Client$v {
|
|
|
48593
49855
|
});
|
|
48594
49856
|
}),
|
|
48595
49857
|
},
|
|
49858
|
+
/**
|
|
49859
|
+
* talent_tag
|
|
49860
|
+
*/
|
|
49861
|
+
talentTag: {
|
|
49862
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49863
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49864
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
49865
|
+
const res = yield this.httpInstance
|
|
49866
|
+
.request({
|
|
49867
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
49868
|
+
method: "GET",
|
|
49869
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
49870
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
49871
|
+
data,
|
|
49872
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
49873
|
+
arrayFormat: "repeat",
|
|
49874
|
+
}),
|
|
49875
|
+
})
|
|
49876
|
+
.catch((e) => {
|
|
49877
|
+
this.logger.error(formatErrors(e));
|
|
49878
|
+
});
|
|
49879
|
+
return res;
|
|
49880
|
+
});
|
|
49881
|
+
const Iterable = {
|
|
49882
|
+
[Symbol.asyncIterator]() {
|
|
49883
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
49884
|
+
let hasMore = true;
|
|
49885
|
+
let pageToken;
|
|
49886
|
+
while (hasMore) {
|
|
49887
|
+
try {
|
|
49888
|
+
const res = yield __await(sendRequest({
|
|
49889
|
+
headers,
|
|
49890
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
49891
|
+
data,
|
|
49892
|
+
}));
|
|
49893
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
49894
|
+
// @ts-ignore
|
|
49895
|
+
has_more,
|
|
49896
|
+
// @ts-ignore
|
|
49897
|
+
page_token,
|
|
49898
|
+
// @ts-ignore
|
|
49899
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
49900
|
+
yield yield __await(rest);
|
|
49901
|
+
hasMore = Boolean(has_more);
|
|
49902
|
+
pageToken = page_token || next_page_token;
|
|
49903
|
+
}
|
|
49904
|
+
catch (e) {
|
|
49905
|
+
yield yield __await(null);
|
|
49906
|
+
break;
|
|
49907
|
+
}
|
|
49908
|
+
}
|
|
49909
|
+
});
|
|
49910
|
+
},
|
|
49911
|
+
};
|
|
49912
|
+
return Iterable;
|
|
49913
|
+
}),
|
|
49914
|
+
/**
|
|
49915
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
49916
|
+
*
|
|
49917
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
49918
|
+
*/
|
|
49919
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49920
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49921
|
+
return this.httpInstance
|
|
49922
|
+
.request({
|
|
49923
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
49924
|
+
method: "GET",
|
|
49925
|
+
data,
|
|
49926
|
+
params,
|
|
49927
|
+
headers,
|
|
49928
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
49929
|
+
})
|
|
49930
|
+
.catch((e) => {
|
|
49931
|
+
this.logger.error(formatErrors(e));
|
|
49932
|
+
throw e;
|
|
49933
|
+
});
|
|
49934
|
+
}),
|
|
49935
|
+
},
|
|
48596
49936
|
/**
|
|
48597
49937
|
* termination_reason
|
|
48598
49938
|
*/
|
|
@@ -58936,6 +60276,27 @@ class Client$k extends Client$l {
|
|
|
58936
60276
|
* 登录态
|
|
58937
60277
|
*/
|
|
58938
60278
|
session: {
|
|
60279
|
+
/**
|
|
60280
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60281
|
+
*
|
|
60282
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60283
|
+
*/
|
|
60284
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60285
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60286
|
+
return this.httpInstance
|
|
60287
|
+
.request({
|
|
60288
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60289
|
+
method: "POST",
|
|
60290
|
+
data,
|
|
60291
|
+
params,
|
|
60292
|
+
headers,
|
|
60293
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
60294
|
+
})
|
|
60295
|
+
.catch((e) => {
|
|
60296
|
+
this.logger.error(formatErrors(e));
|
|
60297
|
+
throw e;
|
|
60298
|
+
});
|
|
60299
|
+
}),
|
|
58939
60300
|
/**
|
|
58940
60301
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
58941
60302
|
*
|
|
@@ -58967,6 +60328,27 @@ class Client$k extends Client$l {
|
|
|
58967
60328
|
* 登录态
|
|
58968
60329
|
*/
|
|
58969
60330
|
session: {
|
|
60331
|
+
/**
|
|
60332
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60333
|
+
*
|
|
60334
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60335
|
+
*/
|
|
60336
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60337
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60338
|
+
return this.httpInstance
|
|
60339
|
+
.request({
|
|
60340
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60341
|
+
method: "POST",
|
|
60342
|
+
data,
|
|
60343
|
+
params,
|
|
60344
|
+
headers,
|
|
60345
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
60346
|
+
})
|
|
60347
|
+
.catch((e) => {
|
|
60348
|
+
this.logger.error(formatErrors(e));
|
|
60349
|
+
throw e;
|
|
60350
|
+
});
|
|
60351
|
+
}),
|
|
58970
60352
|
/**
|
|
58971
60353
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
58972
60354
|
*
|
|
@@ -61049,7 +62431,7 @@ class Client$c extends Client$d {
|
|
|
61049
62431
|
}),
|
|
61050
62432
|
},
|
|
61051
62433
|
/**
|
|
61052
|
-
*
|
|
62434
|
+
* 工作表
|
|
61053
62435
|
*/
|
|
61054
62436
|
spreadsheetSheet: {
|
|
61055
62437
|
/**
|
|
@@ -61779,7 +63161,7 @@ class Client$c extends Client$d {
|
|
|
61779
63161
|
}),
|
|
61780
63162
|
},
|
|
61781
63163
|
/**
|
|
61782
|
-
*
|
|
63164
|
+
* 工作表
|
|
61783
63165
|
*/
|
|
61784
63166
|
spreadsheetSheet: {
|
|
61785
63167
|
/**
|