@larksuiteoapi/node-sdk 1.38.0 → 1.40.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 +1501 -252
- package/lib/index.js +1501 -252
- package/package.json +1 -1
- package/types/index.d.ts +1877 -53
package/es/index.js
CHANGED
|
@@ -2777,6 +2777,320 @@ class Client$Z extends Client$_ {
|
|
|
2777
2777
|
});
|
|
2778
2778
|
}),
|
|
2779
2779
|
},
|
|
2780
|
+
/**
|
|
2781
|
+
* app.data_asset
|
|
2782
|
+
*/
|
|
2783
|
+
appDataAsset: {
|
|
2784
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2785
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2786
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2787
|
+
const res = yield this.httpInstance
|
|
2788
|
+
.request({
|
|
2789
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path),
|
|
2790
|
+
method: "GET",
|
|
2791
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
2792
|
+
params: pickBy(innerPayload.params, identity),
|
|
2793
|
+
data,
|
|
2794
|
+
paramsSerializer: (params) => stringify(params, {
|
|
2795
|
+
arrayFormat: "repeat",
|
|
2796
|
+
}),
|
|
2797
|
+
})
|
|
2798
|
+
.catch((e) => {
|
|
2799
|
+
this.logger.error(formatErrors(e));
|
|
2800
|
+
});
|
|
2801
|
+
return res;
|
|
2802
|
+
});
|
|
2803
|
+
const Iterable = {
|
|
2804
|
+
[Symbol.asyncIterator]() {
|
|
2805
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
2806
|
+
let hasMore = true;
|
|
2807
|
+
let pageToken;
|
|
2808
|
+
while (hasMore) {
|
|
2809
|
+
try {
|
|
2810
|
+
const res = yield __await(sendRequest({
|
|
2811
|
+
headers,
|
|
2812
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
2813
|
+
data,
|
|
2814
|
+
}));
|
|
2815
|
+
const _b = get(res, "data") || {}, {
|
|
2816
|
+
// @ts-ignore
|
|
2817
|
+
has_more,
|
|
2818
|
+
// @ts-ignore
|
|
2819
|
+
page_token,
|
|
2820
|
+
// @ts-ignore
|
|
2821
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
2822
|
+
yield yield __await(rest);
|
|
2823
|
+
hasMore = Boolean(has_more);
|
|
2824
|
+
pageToken = page_token || next_page_token;
|
|
2825
|
+
}
|
|
2826
|
+
catch (e) {
|
|
2827
|
+
yield yield __await(null);
|
|
2828
|
+
break;
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
});
|
|
2832
|
+
},
|
|
2833
|
+
};
|
|
2834
|
+
return Iterable;
|
|
2835
|
+
}),
|
|
2836
|
+
/**
|
|
2837
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=list&version=v1 click to debug }
|
|
2838
|
+
*
|
|
2839
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset&version=v1 document }
|
|
2840
|
+
*
|
|
2841
|
+
* 获取数据与知识列表
|
|
2842
|
+
*/
|
|
2843
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2844
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2845
|
+
return this.httpInstance
|
|
2846
|
+
.request({
|
|
2847
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path),
|
|
2848
|
+
method: "GET",
|
|
2849
|
+
data,
|
|
2850
|
+
params,
|
|
2851
|
+
headers,
|
|
2852
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
2853
|
+
})
|
|
2854
|
+
.catch((e) => {
|
|
2855
|
+
this.logger.error(formatErrors(e));
|
|
2856
|
+
throw e;
|
|
2857
|
+
});
|
|
2858
|
+
}),
|
|
2859
|
+
},
|
|
2860
|
+
/**
|
|
2861
|
+
* app.data_asset_tag
|
|
2862
|
+
*/
|
|
2863
|
+
appDataAssetTag: {
|
|
2864
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2865
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2866
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2867
|
+
const res = yield this.httpInstance
|
|
2868
|
+
.request({
|
|
2869
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path),
|
|
2870
|
+
method: "GET",
|
|
2871
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
2872
|
+
params: pickBy(innerPayload.params, identity),
|
|
2873
|
+
data,
|
|
2874
|
+
paramsSerializer: (params) => stringify(params, {
|
|
2875
|
+
arrayFormat: "repeat",
|
|
2876
|
+
}),
|
|
2877
|
+
})
|
|
2878
|
+
.catch((e) => {
|
|
2879
|
+
this.logger.error(formatErrors(e));
|
|
2880
|
+
});
|
|
2881
|
+
return res;
|
|
2882
|
+
});
|
|
2883
|
+
const Iterable = {
|
|
2884
|
+
[Symbol.asyncIterator]() {
|
|
2885
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
2886
|
+
let hasMore = true;
|
|
2887
|
+
let pageToken;
|
|
2888
|
+
while (hasMore) {
|
|
2889
|
+
try {
|
|
2890
|
+
const res = yield __await(sendRequest({
|
|
2891
|
+
headers,
|
|
2892
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
2893
|
+
data,
|
|
2894
|
+
}));
|
|
2895
|
+
const _b = get(res, "data") || {}, {
|
|
2896
|
+
// @ts-ignore
|
|
2897
|
+
has_more,
|
|
2898
|
+
// @ts-ignore
|
|
2899
|
+
page_token,
|
|
2900
|
+
// @ts-ignore
|
|
2901
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
2902
|
+
yield yield __await(rest);
|
|
2903
|
+
hasMore = Boolean(has_more);
|
|
2904
|
+
pageToken = page_token || next_page_token;
|
|
2905
|
+
}
|
|
2906
|
+
catch (e) {
|
|
2907
|
+
yield yield __await(null);
|
|
2908
|
+
break;
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
});
|
|
2912
|
+
},
|
|
2913
|
+
};
|
|
2914
|
+
return Iterable;
|
|
2915
|
+
}),
|
|
2916
|
+
/**
|
|
2917
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset_tag&apiName=list&version=v1 click to debug }
|
|
2918
|
+
*
|
|
2919
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset_tag&version=v1 document }
|
|
2920
|
+
*
|
|
2921
|
+
* 获取数据与知识分类列表
|
|
2922
|
+
*/
|
|
2923
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2924
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2925
|
+
return this.httpInstance
|
|
2926
|
+
.request({
|
|
2927
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path),
|
|
2928
|
+
method: "GET",
|
|
2929
|
+
data,
|
|
2930
|
+
params,
|
|
2931
|
+
headers,
|
|
2932
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
2933
|
+
})
|
|
2934
|
+
.catch((e) => {
|
|
2935
|
+
this.logger.error(formatErrors(e));
|
|
2936
|
+
throw e;
|
|
2937
|
+
});
|
|
2938
|
+
}),
|
|
2939
|
+
},
|
|
2940
|
+
/**
|
|
2941
|
+
* app.knowledge
|
|
2942
|
+
*/
|
|
2943
|
+
appKnowledge: {
|
|
2944
|
+
/**
|
|
2945
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.knowledge&apiName=ask&version=v1 click to debug }
|
|
2946
|
+
*
|
|
2947
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=ask&project=aily&resource=app.knowledge&version=v1 document }
|
|
2948
|
+
*
|
|
2949
|
+
* 执行一次数据知识问答
|
|
2950
|
+
*/
|
|
2951
|
+
ask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2952
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2953
|
+
return this.httpInstance
|
|
2954
|
+
.request({
|
|
2955
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`, path),
|
|
2956
|
+
method: "POST",
|
|
2957
|
+
data,
|
|
2958
|
+
params,
|
|
2959
|
+
headers,
|
|
2960
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
2961
|
+
})
|
|
2962
|
+
.catch((e) => {
|
|
2963
|
+
this.logger.error(formatErrors(e));
|
|
2964
|
+
throw e;
|
|
2965
|
+
});
|
|
2966
|
+
}),
|
|
2967
|
+
},
|
|
2968
|
+
/**
|
|
2969
|
+
* app.skill
|
|
2970
|
+
*/
|
|
2971
|
+
appSkill: {
|
|
2972
|
+
/**
|
|
2973
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=get&version=v1 click to debug }
|
|
2974
|
+
*
|
|
2975
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=app.skill&version=v1 document }
|
|
2976
|
+
*
|
|
2977
|
+
* 该 API 用于获取某个飞书智能伙伴应用的技能(Skill)的详细信息。
|
|
2978
|
+
*/
|
|
2979
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2980
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2981
|
+
return this.httpInstance
|
|
2982
|
+
.request({
|
|
2983
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`, path),
|
|
2984
|
+
method: "GET",
|
|
2985
|
+
data,
|
|
2986
|
+
params,
|
|
2987
|
+
headers,
|
|
2988
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
2989
|
+
})
|
|
2990
|
+
.catch((e) => {
|
|
2991
|
+
this.logger.error(formatErrors(e));
|
|
2992
|
+
throw e;
|
|
2993
|
+
});
|
|
2994
|
+
}),
|
|
2995
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2996
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2997
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2998
|
+
const res = yield this.httpInstance
|
|
2999
|
+
.request({
|
|
3000
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path),
|
|
3001
|
+
method: "GET",
|
|
3002
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
3003
|
+
params: pickBy(innerPayload.params, identity),
|
|
3004
|
+
data,
|
|
3005
|
+
paramsSerializer: (params) => stringify(params, {
|
|
3006
|
+
arrayFormat: "repeat",
|
|
3007
|
+
}),
|
|
3008
|
+
})
|
|
3009
|
+
.catch((e) => {
|
|
3010
|
+
this.logger.error(formatErrors(e));
|
|
3011
|
+
});
|
|
3012
|
+
return res;
|
|
3013
|
+
});
|
|
3014
|
+
const Iterable = {
|
|
3015
|
+
[Symbol.asyncIterator]() {
|
|
3016
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3017
|
+
let hasMore = true;
|
|
3018
|
+
let pageToken;
|
|
3019
|
+
while (hasMore) {
|
|
3020
|
+
try {
|
|
3021
|
+
const res = yield __await(sendRequest({
|
|
3022
|
+
headers,
|
|
3023
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3024
|
+
data,
|
|
3025
|
+
}));
|
|
3026
|
+
const _b = get(res, "data") || {}, {
|
|
3027
|
+
// @ts-ignore
|
|
3028
|
+
has_more,
|
|
3029
|
+
// @ts-ignore
|
|
3030
|
+
page_token,
|
|
3031
|
+
// @ts-ignore
|
|
3032
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3033
|
+
yield yield __await(rest);
|
|
3034
|
+
hasMore = Boolean(has_more);
|
|
3035
|
+
pageToken = page_token || next_page_token;
|
|
3036
|
+
}
|
|
3037
|
+
catch (e) {
|
|
3038
|
+
yield yield __await(null);
|
|
3039
|
+
break;
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
});
|
|
3043
|
+
},
|
|
3044
|
+
};
|
|
3045
|
+
return Iterable;
|
|
3046
|
+
}),
|
|
3047
|
+
/**
|
|
3048
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=list&version=v1 click to debug }
|
|
3049
|
+
*
|
|
3050
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.skill&version=v1 document }
|
|
3051
|
+
*
|
|
3052
|
+
* 该 API 用于批量获取飞书智能伙伴应用的技能(Skill)的详细信息
|
|
3053
|
+
*/
|
|
3054
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3055
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3056
|
+
return this.httpInstance
|
|
3057
|
+
.request({
|
|
3058
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path),
|
|
3059
|
+
method: "GET",
|
|
3060
|
+
data,
|
|
3061
|
+
params,
|
|
3062
|
+
headers,
|
|
3063
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3064
|
+
})
|
|
3065
|
+
.catch((e) => {
|
|
3066
|
+
this.logger.error(formatErrors(e));
|
|
3067
|
+
throw e;
|
|
3068
|
+
});
|
|
3069
|
+
}),
|
|
3070
|
+
/**
|
|
3071
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=start&version=v1 click to debug }
|
|
3072
|
+
*
|
|
3073
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=start&project=aily&resource=app.skill&version=v1 document }
|
|
3074
|
+
*
|
|
3075
|
+
* 该 API 用于执行飞书智能伙伴应用的技能(Skill)获取输出
|
|
3076
|
+
*/
|
|
3077
|
+
start: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3078
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3079
|
+
return this.httpInstance
|
|
3080
|
+
.request({
|
|
3081
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`, path),
|
|
3082
|
+
method: "POST",
|
|
3083
|
+
data,
|
|
3084
|
+
params,
|
|
3085
|
+
headers,
|
|
3086
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3087
|
+
})
|
|
3088
|
+
.catch((e) => {
|
|
3089
|
+
this.logger.error(formatErrors(e));
|
|
3090
|
+
throw e;
|
|
3091
|
+
});
|
|
3092
|
+
}),
|
|
3093
|
+
},
|
|
2780
3094
|
},
|
|
2781
3095
|
};
|
|
2782
3096
|
}
|
|
@@ -3215,6 +3529,81 @@ class Client$Y extends Client$Z {
|
|
|
3215
3529
|
throw e;
|
|
3216
3530
|
});
|
|
3217
3531
|
}),
|
|
3532
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3533
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3534
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3535
|
+
const res = yield this.httpInstance
|
|
3536
|
+
.request({
|
|
3537
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3538
|
+
method: "GET",
|
|
3539
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
3540
|
+
params: pickBy(innerPayload.params, identity),
|
|
3541
|
+
data,
|
|
3542
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3543
|
+
})
|
|
3544
|
+
.catch((e) => {
|
|
3545
|
+
this.logger.error(formatErrors(e));
|
|
3546
|
+
});
|
|
3547
|
+
return res;
|
|
3548
|
+
});
|
|
3549
|
+
const Iterable = {
|
|
3550
|
+
[Symbol.asyncIterator]() {
|
|
3551
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3552
|
+
let hasMore = true;
|
|
3553
|
+
let pageToken;
|
|
3554
|
+
while (hasMore) {
|
|
3555
|
+
try {
|
|
3556
|
+
const res = yield __await(sendRequest({
|
|
3557
|
+
headers,
|
|
3558
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3559
|
+
data,
|
|
3560
|
+
}));
|
|
3561
|
+
const _b = get(res, "data") || {}, {
|
|
3562
|
+
// @ts-ignore
|
|
3563
|
+
has_more,
|
|
3564
|
+
// @ts-ignore
|
|
3565
|
+
page_token,
|
|
3566
|
+
// @ts-ignore
|
|
3567
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3568
|
+
yield yield __await(rest);
|
|
3569
|
+
hasMore = Boolean(has_more);
|
|
3570
|
+
pageToken = page_token || next_page_token;
|
|
3571
|
+
}
|
|
3572
|
+
catch (e) {
|
|
3573
|
+
yield yield __await(null);
|
|
3574
|
+
break;
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3577
|
+
});
|
|
3578
|
+
},
|
|
3579
|
+
};
|
|
3580
|
+
return Iterable;
|
|
3581
|
+
}),
|
|
3582
|
+
/**
|
|
3583
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
|
|
3584
|
+
*
|
|
3585
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
|
|
3586
|
+
*
|
|
3587
|
+
* 获取企业安装的应用
|
|
3588
|
+
*
|
|
3589
|
+
* 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
|
|
3590
|
+
*/
|
|
3591
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3592
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3593
|
+
return this.httpInstance
|
|
3594
|
+
.request({
|
|
3595
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3596
|
+
method: "GET",
|
|
3597
|
+
data,
|
|
3598
|
+
params,
|
|
3599
|
+
headers,
|
|
3600
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3601
|
+
})
|
|
3602
|
+
.catch((e) => {
|
|
3603
|
+
this.logger.error(formatErrors(e));
|
|
3604
|
+
throw e;
|
|
3605
|
+
});
|
|
3606
|
+
}),
|
|
3218
3607
|
/**
|
|
3219
3608
|
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
|
|
3220
3609
|
*
|
|
@@ -3795,121 +4184,198 @@ class Client$Y extends Client$Z {
|
|
|
3795
4184
|
return Iterable;
|
|
3796
4185
|
}),
|
|
3797
4186
|
/**
|
|
3798
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=list&version=v6 click to debug }
|
|
4187
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=list&version=v6 click to debug }
|
|
4188
|
+
*
|
|
4189
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list document }
|
|
4190
|
+
*
|
|
4191
|
+
* 获取应用版本列表
|
|
4192
|
+
*
|
|
4193
|
+
* 根据 app_id 获取对应应用版本列表。
|
|
4194
|
+
*/
|
|
4195
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4196
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4197
|
+
return this.httpInstance
|
|
4198
|
+
.request({
|
|
4199
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`, path),
|
|
4200
|
+
method: "GET",
|
|
4201
|
+
data,
|
|
4202
|
+
params,
|
|
4203
|
+
headers,
|
|
4204
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4205
|
+
})
|
|
4206
|
+
.catch((e) => {
|
|
4207
|
+
this.logger.error(formatErrors(e));
|
|
4208
|
+
throw e;
|
|
4209
|
+
});
|
|
4210
|
+
}),
|
|
4211
|
+
/**
|
|
4212
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=patch&version=v6 click to debug }
|
|
4213
|
+
*
|
|
4214
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch document }
|
|
4215
|
+
*
|
|
4216
|
+
* 更新应用审核状态
|
|
4217
|
+
*
|
|
4218
|
+
* 通过接口来更新应用版本的审核结果:通过后应用可以直接上架;拒绝后则开发者可以看到拒绝理由,并在修改后再次申请发布。
|
|
4219
|
+
*/
|
|
4220
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4221
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4222
|
+
return this.httpInstance
|
|
4223
|
+
.request({
|
|
4224
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path),
|
|
4225
|
+
method: "PATCH",
|
|
4226
|
+
data,
|
|
4227
|
+
params,
|
|
4228
|
+
headers,
|
|
4229
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4230
|
+
})
|
|
4231
|
+
.catch((e) => {
|
|
4232
|
+
this.logger.error(formatErrors(e));
|
|
4233
|
+
throw e;
|
|
4234
|
+
});
|
|
4235
|
+
}),
|
|
4236
|
+
},
|
|
4237
|
+
/**
|
|
4238
|
+
* application.contacts_range
|
|
4239
|
+
*/
|
|
4240
|
+
applicationContactsRange: {
|
|
4241
|
+
/**
|
|
4242
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
|
|
4243
|
+
*
|
|
4244
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
|
|
4245
|
+
*/
|
|
4246
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4247
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4248
|
+
return this.httpInstance
|
|
4249
|
+
.request({
|
|
4250
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path),
|
|
4251
|
+
method: "PATCH",
|
|
4252
|
+
data,
|
|
4253
|
+
params,
|
|
4254
|
+
headers,
|
|
4255
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4256
|
+
})
|
|
4257
|
+
.catch((e) => {
|
|
4258
|
+
this.logger.error(formatErrors(e));
|
|
4259
|
+
throw e;
|
|
4260
|
+
});
|
|
4261
|
+
}),
|
|
4262
|
+
},
|
|
4263
|
+
/**
|
|
4264
|
+
* 应用
|
|
4265
|
+
*/
|
|
4266
|
+
application: {
|
|
4267
|
+
/**
|
|
4268
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
|
|
4269
|
+
*
|
|
4270
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
|
|
4271
|
+
*/
|
|
4272
|
+
contactsRangeConfiguration: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4273
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4274
|
+
return this.httpInstance
|
|
4275
|
+
.request({
|
|
4276
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path),
|
|
4277
|
+
method: "GET",
|
|
4278
|
+
data,
|
|
4279
|
+
params,
|
|
4280
|
+
headers,
|
|
4281
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4282
|
+
})
|
|
4283
|
+
.catch((e) => {
|
|
4284
|
+
this.logger.error(formatErrors(e));
|
|
4285
|
+
throw e;
|
|
4286
|
+
});
|
|
4287
|
+
}),
|
|
4288
|
+
/**
|
|
4289
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
|
|
4290
|
+
*
|
|
4291
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get document }
|
|
4292
|
+
*
|
|
4293
|
+
* 获取应用信息
|
|
4294
|
+
*
|
|
4295
|
+
* 根据app_id获取应用的基础信息
|
|
4296
|
+
*/
|
|
4297
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4298
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4299
|
+
return this.httpInstance
|
|
4300
|
+
.request({
|
|
4301
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path),
|
|
4302
|
+
method: "GET",
|
|
4303
|
+
data,
|
|
4304
|
+
params,
|
|
4305
|
+
headers,
|
|
4306
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4307
|
+
})
|
|
4308
|
+
.catch((e) => {
|
|
4309
|
+
this.logger.error(formatErrors(e));
|
|
4310
|
+
throw e;
|
|
4311
|
+
});
|
|
4312
|
+
}),
|
|
4313
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4314
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4315
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
4316
|
+
const res = yield this.httpInstance
|
|
4317
|
+
.request({
|
|
4318
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
4319
|
+
method: "GET",
|
|
4320
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
4321
|
+
params: pickBy(innerPayload.params, identity),
|
|
4322
|
+
data,
|
|
4323
|
+
paramsSerializer: (params) => stringify(params, {
|
|
4324
|
+
arrayFormat: "repeat",
|
|
4325
|
+
}),
|
|
4326
|
+
})
|
|
4327
|
+
.catch((e) => {
|
|
4328
|
+
this.logger.error(formatErrors(e));
|
|
4329
|
+
});
|
|
4330
|
+
return res;
|
|
4331
|
+
});
|
|
4332
|
+
const Iterable = {
|
|
4333
|
+
[Symbol.asyncIterator]() {
|
|
4334
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
4335
|
+
let hasMore = true;
|
|
4336
|
+
let pageToken;
|
|
4337
|
+
while (hasMore) {
|
|
4338
|
+
try {
|
|
4339
|
+
const res = yield __await(sendRequest({
|
|
4340
|
+
headers,
|
|
4341
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
4342
|
+
data,
|
|
4343
|
+
}));
|
|
4344
|
+
const _b = get(res, "data") || {}, {
|
|
4345
|
+
// @ts-ignore
|
|
4346
|
+
has_more,
|
|
4347
|
+
// @ts-ignore
|
|
4348
|
+
page_token,
|
|
4349
|
+
// @ts-ignore
|
|
4350
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
4351
|
+
yield yield __await(rest);
|
|
4352
|
+
hasMore = Boolean(has_more);
|
|
4353
|
+
pageToken = page_token || next_page_token;
|
|
4354
|
+
}
|
|
4355
|
+
catch (e) {
|
|
4356
|
+
yield yield __await(null);
|
|
4357
|
+
break;
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4360
|
+
});
|
|
4361
|
+
},
|
|
4362
|
+
};
|
|
4363
|
+
return Iterable;
|
|
4364
|
+
}),
|
|
4365
|
+
/**
|
|
4366
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
|
|
3799
4367
|
*
|
|
3800
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application
|
|
4368
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
|
|
3801
4369
|
*
|
|
3802
|
-
*
|
|
4370
|
+
* 获取企业安装的应用
|
|
3803
4371
|
*
|
|
3804
|
-
*
|
|
4372
|
+
* 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
|
|
3805
4373
|
*/
|
|
3806
4374
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3807
4375
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3808
4376
|
return this.httpInstance
|
|
3809
4377
|
.request({
|
|
3810
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications
|
|
3811
|
-
method: "GET",
|
|
3812
|
-
data,
|
|
3813
|
-
params,
|
|
3814
|
-
headers,
|
|
3815
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3816
|
-
})
|
|
3817
|
-
.catch((e) => {
|
|
3818
|
-
this.logger.error(formatErrors(e));
|
|
3819
|
-
throw e;
|
|
3820
|
-
});
|
|
3821
|
-
}),
|
|
3822
|
-
/**
|
|
3823
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=patch&version=v6 click to debug }
|
|
3824
|
-
*
|
|
3825
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch document }
|
|
3826
|
-
*
|
|
3827
|
-
* 更新应用审核状态
|
|
3828
|
-
*
|
|
3829
|
-
* 通过接口来更新应用版本的审核结果:通过后应用可以直接上架;拒绝后则开发者可以看到拒绝理由,并在修改后再次申请发布。
|
|
3830
|
-
*/
|
|
3831
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3832
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3833
|
-
return this.httpInstance
|
|
3834
|
-
.request({
|
|
3835
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path),
|
|
3836
|
-
method: "PATCH",
|
|
3837
|
-
data,
|
|
3838
|
-
params,
|
|
3839
|
-
headers,
|
|
3840
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3841
|
-
})
|
|
3842
|
-
.catch((e) => {
|
|
3843
|
-
this.logger.error(formatErrors(e));
|
|
3844
|
-
throw e;
|
|
3845
|
-
});
|
|
3846
|
-
}),
|
|
3847
|
-
},
|
|
3848
|
-
/**
|
|
3849
|
-
* application.contacts_range
|
|
3850
|
-
*/
|
|
3851
|
-
applicationContactsRange: {
|
|
3852
|
-
/**
|
|
3853
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
|
|
3854
|
-
*
|
|
3855
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
|
|
3856
|
-
*/
|
|
3857
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3858
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3859
|
-
return this.httpInstance
|
|
3860
|
-
.request({
|
|
3861
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path),
|
|
3862
|
-
method: "PATCH",
|
|
3863
|
-
data,
|
|
3864
|
-
params,
|
|
3865
|
-
headers,
|
|
3866
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3867
|
-
})
|
|
3868
|
-
.catch((e) => {
|
|
3869
|
-
this.logger.error(formatErrors(e));
|
|
3870
|
-
throw e;
|
|
3871
|
-
});
|
|
3872
|
-
}),
|
|
3873
|
-
},
|
|
3874
|
-
/**
|
|
3875
|
-
* 应用
|
|
3876
|
-
*/
|
|
3877
|
-
application: {
|
|
3878
|
-
/**
|
|
3879
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
|
|
3880
|
-
*
|
|
3881
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
|
|
3882
|
-
*/
|
|
3883
|
-
contactsRangeConfiguration: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3884
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3885
|
-
return this.httpInstance
|
|
3886
|
-
.request({
|
|
3887
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path),
|
|
3888
|
-
method: "GET",
|
|
3889
|
-
data,
|
|
3890
|
-
params,
|
|
3891
|
-
headers,
|
|
3892
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3893
|
-
})
|
|
3894
|
-
.catch((e) => {
|
|
3895
|
-
this.logger.error(formatErrors(e));
|
|
3896
|
-
throw e;
|
|
3897
|
-
});
|
|
3898
|
-
}),
|
|
3899
|
-
/**
|
|
3900
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
|
|
3901
|
-
*
|
|
3902
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get document }
|
|
3903
|
-
*
|
|
3904
|
-
* 获取应用信息
|
|
3905
|
-
*
|
|
3906
|
-
* 根据app_id获取应用的基础信息
|
|
3907
|
-
*/
|
|
3908
|
-
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3909
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3910
|
-
return this.httpInstance
|
|
3911
|
-
.request({
|
|
3912
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path),
|
|
4378
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3913
4379
|
method: "GET",
|
|
3914
4380
|
data,
|
|
3915
4381
|
params,
|
|
@@ -4508,7 +4974,7 @@ class Client$X extends Client$Y {
|
|
|
4508
4974
|
}),
|
|
4509
4975
|
},
|
|
4510
4976
|
/**
|
|
4511
|
-
*
|
|
4977
|
+
* 原生审批实例
|
|
4512
4978
|
*/
|
|
4513
4979
|
instance: {
|
|
4514
4980
|
/**
|
|
@@ -5513,7 +5979,7 @@ class Client$X extends Client$Y {
|
|
|
5513
5979
|
}),
|
|
5514
5980
|
},
|
|
5515
5981
|
/**
|
|
5516
|
-
*
|
|
5982
|
+
* 原生审批实例
|
|
5517
5983
|
*/
|
|
5518
5984
|
instance: {
|
|
5519
5985
|
/**
|
|
@@ -27662,6 +28128,84 @@ class Client$I extends Client$J {
|
|
|
27662
28128
|
},
|
|
27663
28129
|
},
|
|
27664
28130
|
v2: {
|
|
28131
|
+
/**
|
|
28132
|
+
* approver
|
|
28133
|
+
*/
|
|
28134
|
+
approver: {
|
|
28135
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28136
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28137
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28138
|
+
const res = yield this.httpInstance
|
|
28139
|
+
.request({
|
|
28140
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28141
|
+
method: "GET",
|
|
28142
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
28143
|
+
params: pickBy(innerPayload.params, identity),
|
|
28144
|
+
data,
|
|
28145
|
+
paramsSerializer: (params) => stringify(params, {
|
|
28146
|
+
arrayFormat: "repeat",
|
|
28147
|
+
}),
|
|
28148
|
+
})
|
|
28149
|
+
.catch((e) => {
|
|
28150
|
+
this.logger.error(formatErrors(e));
|
|
28151
|
+
});
|
|
28152
|
+
return res;
|
|
28153
|
+
});
|
|
28154
|
+
const Iterable = {
|
|
28155
|
+
[Symbol.asyncIterator]() {
|
|
28156
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28157
|
+
let hasMore = true;
|
|
28158
|
+
let pageToken;
|
|
28159
|
+
while (hasMore) {
|
|
28160
|
+
try {
|
|
28161
|
+
const res = yield __await(sendRequest({
|
|
28162
|
+
headers,
|
|
28163
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28164
|
+
data,
|
|
28165
|
+
}));
|
|
28166
|
+
const _b = get(res, "data") || {}, {
|
|
28167
|
+
// @ts-ignore
|
|
28168
|
+
has_more,
|
|
28169
|
+
// @ts-ignore
|
|
28170
|
+
page_token,
|
|
28171
|
+
// @ts-ignore
|
|
28172
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28173
|
+
yield yield __await(rest);
|
|
28174
|
+
hasMore = Boolean(has_more);
|
|
28175
|
+
pageToken = page_token || next_page_token;
|
|
28176
|
+
}
|
|
28177
|
+
catch (e) {
|
|
28178
|
+
yield yield __await(null);
|
|
28179
|
+
break;
|
|
28180
|
+
}
|
|
28181
|
+
}
|
|
28182
|
+
});
|
|
28183
|
+
},
|
|
28184
|
+
};
|
|
28185
|
+
return Iterable;
|
|
28186
|
+
}),
|
|
28187
|
+
/**
|
|
28188
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approver&apiName=list&version=v2 click to debug }
|
|
28189
|
+
*
|
|
28190
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=approver&version=v2 document }
|
|
28191
|
+
*/
|
|
28192
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28193
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28194
|
+
return this.httpInstance
|
|
28195
|
+
.request({
|
|
28196
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28197
|
+
method: "GET",
|
|
28198
|
+
data,
|
|
28199
|
+
params,
|
|
28200
|
+
headers,
|
|
28201
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
28202
|
+
})
|
|
28203
|
+
.catch((e) => {
|
|
28204
|
+
this.logger.error(formatErrors(e));
|
|
28205
|
+
throw e;
|
|
28206
|
+
});
|
|
28207
|
+
}),
|
|
28208
|
+
},
|
|
27665
28209
|
/**
|
|
27666
28210
|
* basic_info.bank
|
|
27667
28211
|
*/
|
|
@@ -28343,15 +28887,93 @@ class Client$I extends Client$J {
|
|
|
28343
28887
|
return Iterable;
|
|
28344
28888
|
}),
|
|
28345
28889
|
/**
|
|
28346
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.nationality&apiName=search&version=v2 click to debug }
|
|
28890
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.nationality&apiName=search&version=v2 click to debug }
|
|
28891
|
+
*
|
|
28892
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.nationality&version=v2 document }
|
|
28893
|
+
*/
|
|
28894
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28895
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28896
|
+
return this.httpInstance
|
|
28897
|
+
.request({
|
|
28898
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`, path),
|
|
28899
|
+
method: "POST",
|
|
28900
|
+
data,
|
|
28901
|
+
params,
|
|
28902
|
+
headers,
|
|
28903
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
28904
|
+
})
|
|
28905
|
+
.catch((e) => {
|
|
28906
|
+
this.logger.error(formatErrors(e));
|
|
28907
|
+
throw e;
|
|
28908
|
+
});
|
|
28909
|
+
}),
|
|
28910
|
+
},
|
|
28911
|
+
/**
|
|
28912
|
+
* basic_info.time_zone
|
|
28913
|
+
*/
|
|
28914
|
+
basicInfoTimeZone: {
|
|
28915
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28916
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28917
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28918
|
+
const res = yield this.httpInstance
|
|
28919
|
+
.request({
|
|
28920
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28921
|
+
method: "POST",
|
|
28922
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
28923
|
+
params: pickBy(innerPayload.params, identity),
|
|
28924
|
+
data,
|
|
28925
|
+
paramsSerializer: (params) => stringify(params, {
|
|
28926
|
+
arrayFormat: "repeat",
|
|
28927
|
+
}),
|
|
28928
|
+
})
|
|
28929
|
+
.catch((e) => {
|
|
28930
|
+
this.logger.error(formatErrors(e));
|
|
28931
|
+
});
|
|
28932
|
+
return res;
|
|
28933
|
+
});
|
|
28934
|
+
const Iterable = {
|
|
28935
|
+
[Symbol.asyncIterator]() {
|
|
28936
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28937
|
+
let hasMore = true;
|
|
28938
|
+
let pageToken;
|
|
28939
|
+
while (hasMore) {
|
|
28940
|
+
try {
|
|
28941
|
+
const res = yield __await(sendRequest({
|
|
28942
|
+
headers,
|
|
28943
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28944
|
+
data,
|
|
28945
|
+
}));
|
|
28946
|
+
const _b = get(res, "data") || {}, {
|
|
28947
|
+
// @ts-ignore
|
|
28948
|
+
has_more,
|
|
28949
|
+
// @ts-ignore
|
|
28950
|
+
page_token,
|
|
28951
|
+
// @ts-ignore
|
|
28952
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28953
|
+
yield yield __await(rest);
|
|
28954
|
+
hasMore = Boolean(has_more);
|
|
28955
|
+
pageToken = page_token || next_page_token;
|
|
28956
|
+
}
|
|
28957
|
+
catch (e) {
|
|
28958
|
+
yield yield __await(null);
|
|
28959
|
+
break;
|
|
28960
|
+
}
|
|
28961
|
+
}
|
|
28962
|
+
});
|
|
28963
|
+
},
|
|
28964
|
+
};
|
|
28965
|
+
return Iterable;
|
|
28966
|
+
}),
|
|
28967
|
+
/**
|
|
28968
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.time_zone&apiName=search&version=v2 click to debug }
|
|
28347
28969
|
*
|
|
28348
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.
|
|
28970
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.time_zone&version=v2 document }
|
|
28349
28971
|
*/
|
|
28350
28972
|
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28351
28973
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28352
28974
|
return this.httpInstance
|
|
28353
28975
|
.request({
|
|
28354
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/
|
|
28976
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28355
28977
|
method: "POST",
|
|
28356
28978
|
data,
|
|
28357
28979
|
params,
|
|
@@ -28365,16 +28987,37 @@ class Client$I extends Client$J {
|
|
|
28365
28987
|
}),
|
|
28366
28988
|
},
|
|
28367
28989
|
/**
|
|
28368
|
-
*
|
|
28990
|
+
* bp
|
|
28369
28991
|
*/
|
|
28370
|
-
|
|
28371
|
-
|
|
28992
|
+
bp: {
|
|
28993
|
+
/**
|
|
28994
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=get_by_department&version=v2 click to debug }
|
|
28995
|
+
*
|
|
28996
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_department&project=corehr&resource=bp&version=v2 document }
|
|
28997
|
+
*/
|
|
28998
|
+
getByDepartment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28999
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29000
|
+
return this.httpInstance
|
|
29001
|
+
.request({
|
|
29002
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`, path),
|
|
29003
|
+
method: "POST",
|
|
29004
|
+
data,
|
|
29005
|
+
params,
|
|
29006
|
+
headers,
|
|
29007
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29008
|
+
})
|
|
29009
|
+
.catch((e) => {
|
|
29010
|
+
this.logger.error(formatErrors(e));
|
|
29011
|
+
throw e;
|
|
29012
|
+
});
|
|
29013
|
+
}),
|
|
29014
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28372
29015
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28373
29016
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28374
29017
|
const res = yield this.httpInstance
|
|
28375
29018
|
.request({
|
|
28376
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
28377
|
-
method: "
|
|
29019
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
|
|
29020
|
+
method: "GET",
|
|
28378
29021
|
headers: pickBy(innerPayload.headers, identity),
|
|
28379
29022
|
params: pickBy(innerPayload.params, identity),
|
|
28380
29023
|
data,
|
|
@@ -28421,16 +29064,18 @@ class Client$I extends Client$J {
|
|
|
28421
29064
|
return Iterable;
|
|
28422
29065
|
}),
|
|
28423
29066
|
/**
|
|
28424
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
29067
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=list&version=v2 click to debug }
|
|
28425
29068
|
*
|
|
28426
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
29069
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
|
|
29070
|
+
*
|
|
29071
|
+
* 待补充
|
|
28427
29072
|
*/
|
|
28428
|
-
|
|
29073
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28429
29074
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28430
29075
|
return this.httpInstance
|
|
28431
29076
|
.request({
|
|
28432
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
28433
|
-
method: "
|
|
29077
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
|
|
29078
|
+
method: "GET",
|
|
28434
29079
|
data,
|
|
28435
29080
|
params,
|
|
28436
29081
|
headers,
|
|
@@ -28443,19 +29088,19 @@ class Client$I extends Client$J {
|
|
|
28443
29088
|
}),
|
|
28444
29089
|
},
|
|
28445
29090
|
/**
|
|
28446
|
-
*
|
|
29091
|
+
* company
|
|
28447
29092
|
*/
|
|
28448
|
-
|
|
29093
|
+
company: {
|
|
28449
29094
|
/**
|
|
28450
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
29095
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=active&version=v2 click to debug }
|
|
28451
29096
|
*
|
|
28452
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
29097
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=company&version=v2 document }
|
|
28453
29098
|
*/
|
|
28454
|
-
|
|
29099
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28455
29100
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28456
29101
|
return this.httpInstance
|
|
28457
29102
|
.request({
|
|
28458
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29103
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/active`, path),
|
|
28459
29104
|
method: "POST",
|
|
28460
29105
|
data,
|
|
28461
29106
|
params,
|
|
@@ -28467,12 +29112,35 @@ class Client$I extends Client$J {
|
|
|
28467
29112
|
throw e;
|
|
28468
29113
|
});
|
|
28469
29114
|
}),
|
|
28470
|
-
|
|
29115
|
+
/**
|
|
29116
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
|
|
29117
|
+
*
|
|
29118
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
|
|
29119
|
+
*
|
|
29120
|
+
* 通过公司 ID 批量获取公司信息
|
|
29121
|
+
*/
|
|
29122
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29123
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29124
|
+
return this.httpInstance
|
|
29125
|
+
.request({
|
|
29126
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path),
|
|
29127
|
+
method: "POST",
|
|
29128
|
+
data,
|
|
29129
|
+
params,
|
|
29130
|
+
headers,
|
|
29131
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29132
|
+
})
|
|
29133
|
+
.catch((e) => {
|
|
29134
|
+
this.logger.error(formatErrors(e));
|
|
29135
|
+
throw e;
|
|
29136
|
+
});
|
|
29137
|
+
}),
|
|
29138
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28471
29139
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28472
29140
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28473
29141
|
const res = yield this.httpInstance
|
|
28474
29142
|
.request({
|
|
28475
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29143
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
28476
29144
|
method: "GET",
|
|
28477
29145
|
headers: pickBy(innerPayload.headers, identity),
|
|
28478
29146
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -28520,17 +29188,15 @@ class Client$I extends Client$J {
|
|
|
28520
29188
|
return Iterable;
|
|
28521
29189
|
}),
|
|
28522
29190
|
/**
|
|
28523
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
28524
|
-
*
|
|
28525
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
|
|
29191
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=query_recent_change&version=v2 click to debug }
|
|
28526
29192
|
*
|
|
28527
|
-
*
|
|
29193
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=company&version=v2 document }
|
|
28528
29194
|
*/
|
|
28529
|
-
|
|
29195
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28530
29196
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28531
29197
|
return this.httpInstance
|
|
28532
29198
|
.request({
|
|
28533
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29199
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
28534
29200
|
method: "GET",
|
|
28535
29201
|
data,
|
|
28536
29202
|
params,
|
|
@@ -28543,34 +29209,6 @@ class Client$I extends Client$J {
|
|
|
28543
29209
|
});
|
|
28544
29210
|
}),
|
|
28545
29211
|
},
|
|
28546
|
-
/**
|
|
28547
|
-
* company
|
|
28548
|
-
*/
|
|
28549
|
-
company: {
|
|
28550
|
-
/**
|
|
28551
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
|
|
28552
|
-
*
|
|
28553
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
|
|
28554
|
-
*
|
|
28555
|
-
* 通过公司 ID 批量获取公司信息
|
|
28556
|
-
*/
|
|
28557
|
-
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28558
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28559
|
-
return this.httpInstance
|
|
28560
|
-
.request({
|
|
28561
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path),
|
|
28562
|
-
method: "POST",
|
|
28563
|
-
data,
|
|
28564
|
-
params,
|
|
28565
|
-
headers,
|
|
28566
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
28567
|
-
})
|
|
28568
|
-
.catch((e) => {
|
|
28569
|
-
this.logger.error(formatErrors(e));
|
|
28570
|
-
throw e;
|
|
28571
|
-
});
|
|
28572
|
-
}),
|
|
28573
|
-
},
|
|
28574
29212
|
/**
|
|
28575
29213
|
* contract
|
|
28576
29214
|
*/
|
|
@@ -29084,38 +29722,162 @@ class Client$I extends Client$J {
|
|
|
29084
29722
|
return Iterable;
|
|
29085
29723
|
}),
|
|
29086
29724
|
/**
|
|
29087
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=search&version=v2 click to debug }
|
|
29725
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=search&version=v2 click to debug }
|
|
29726
|
+
*
|
|
29727
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=department&version=v2 document }
|
|
29728
|
+
*
|
|
29729
|
+
* 根据部门 ID,上级部门查询部门列表
|
|
29730
|
+
*/
|
|
29731
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29732
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29733
|
+
return this.httpInstance
|
|
29734
|
+
.request({
|
|
29735
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/search`, path),
|
|
29736
|
+
method: "POST",
|
|
29737
|
+
data,
|
|
29738
|
+
params,
|
|
29739
|
+
headers,
|
|
29740
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29741
|
+
})
|
|
29742
|
+
.catch((e) => {
|
|
29743
|
+
this.logger.error(formatErrors(e));
|
|
29744
|
+
throw e;
|
|
29745
|
+
});
|
|
29746
|
+
}),
|
|
29747
|
+
/**
|
|
29748
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=tree&version=v2 click to debug }
|
|
29749
|
+
*
|
|
29750
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tree&project=corehr&resource=department&version=v2 document }
|
|
29751
|
+
*/
|
|
29752
|
+
tree: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29753
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29754
|
+
return this.httpInstance
|
|
29755
|
+
.request({
|
|
29756
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/tree`, path),
|
|
29757
|
+
method: "POST",
|
|
29758
|
+
data,
|
|
29759
|
+
params,
|
|
29760
|
+
headers,
|
|
29761
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29762
|
+
})
|
|
29763
|
+
.catch((e) => {
|
|
29764
|
+
this.logger.error(formatErrors(e));
|
|
29765
|
+
throw e;
|
|
29766
|
+
});
|
|
29767
|
+
}),
|
|
29768
|
+
},
|
|
29769
|
+
/**
|
|
29770
|
+
* employee
|
|
29771
|
+
*/
|
|
29772
|
+
employee: {
|
|
29773
|
+
/**
|
|
29774
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=batch_get&version=v2 click to debug }
|
|
29775
|
+
*
|
|
29776
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employee&version=v2 document }
|
|
29777
|
+
*
|
|
29778
|
+
* 通过员工 ID 批量获取员工信息
|
|
29779
|
+
*/
|
|
29780
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29781
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29782
|
+
return this.httpInstance
|
|
29783
|
+
.request({
|
|
29784
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/batch_get`, path),
|
|
29785
|
+
method: "POST",
|
|
29786
|
+
data,
|
|
29787
|
+
params,
|
|
29788
|
+
headers,
|
|
29789
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29790
|
+
})
|
|
29791
|
+
.catch((e) => {
|
|
29792
|
+
this.logger.error(formatErrors(e));
|
|
29793
|
+
throw e;
|
|
29794
|
+
});
|
|
29795
|
+
}),
|
|
29796
|
+
/**
|
|
29797
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=create&version=v2 click to debug }
|
|
29798
|
+
*
|
|
29799
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employee&version=v2 document }
|
|
29800
|
+
*/
|
|
29801
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29802
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29803
|
+
return this.httpInstance
|
|
29804
|
+
.request({
|
|
29805
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees`, path),
|
|
29806
|
+
method: "POST",
|
|
29807
|
+
data,
|
|
29808
|
+
params,
|
|
29809
|
+
headers,
|
|
29810
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29811
|
+
})
|
|
29812
|
+
.catch((e) => {
|
|
29813
|
+
this.logger.error(formatErrors(e));
|
|
29814
|
+
throw e;
|
|
29815
|
+
});
|
|
29816
|
+
}),
|
|
29817
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29818
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29819
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29820
|
+
const res = yield this.httpInstance
|
|
29821
|
+
.request({
|
|
29822
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/search`, path),
|
|
29823
|
+
method: "POST",
|
|
29824
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
29825
|
+
params: pickBy(innerPayload.params, identity),
|
|
29826
|
+
data,
|
|
29827
|
+
paramsSerializer: (params) => stringify(params, {
|
|
29828
|
+
arrayFormat: "repeat",
|
|
29829
|
+
}),
|
|
29830
|
+
})
|
|
29831
|
+
.catch((e) => {
|
|
29832
|
+
this.logger.error(formatErrors(e));
|
|
29833
|
+
});
|
|
29834
|
+
return res;
|
|
29835
|
+
});
|
|
29836
|
+
const Iterable = {
|
|
29837
|
+
[Symbol.asyncIterator]() {
|
|
29838
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
29839
|
+
let hasMore = true;
|
|
29840
|
+
let pageToken;
|
|
29841
|
+
while (hasMore) {
|
|
29842
|
+
try {
|
|
29843
|
+
const res = yield __await(sendRequest({
|
|
29844
|
+
headers,
|
|
29845
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
29846
|
+
data,
|
|
29847
|
+
}));
|
|
29848
|
+
const _b = get(res, "data") || {}, {
|
|
29849
|
+
// @ts-ignore
|
|
29850
|
+
has_more,
|
|
29851
|
+
// @ts-ignore
|
|
29852
|
+
page_token,
|
|
29853
|
+
// @ts-ignore
|
|
29854
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
29855
|
+
yield yield __await(rest);
|
|
29856
|
+
hasMore = Boolean(has_more);
|
|
29857
|
+
pageToken = page_token || next_page_token;
|
|
29858
|
+
}
|
|
29859
|
+
catch (e) {
|
|
29860
|
+
yield yield __await(null);
|
|
29861
|
+
break;
|
|
29862
|
+
}
|
|
29863
|
+
}
|
|
29864
|
+
});
|
|
29865
|
+
},
|
|
29866
|
+
};
|
|
29867
|
+
return Iterable;
|
|
29868
|
+
}),
|
|
29869
|
+
/**
|
|
29870
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=search&version=v2 click to debug }
|
|
29088
29871
|
*
|
|
29089
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=
|
|
29872
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=employee&version=v2 document }
|
|
29090
29873
|
*
|
|
29091
|
-
*
|
|
29874
|
+
* 根据 email、工号、个人电话等条件查询员工雇佣信息以及个人基础信息
|
|
29092
29875
|
*/
|
|
29093
29876
|
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29094
29877
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29095
29878
|
return this.httpInstance
|
|
29096
29879
|
.request({
|
|
29097
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29098
|
-
method: "POST",
|
|
29099
|
-
data,
|
|
29100
|
-
params,
|
|
29101
|
-
headers,
|
|
29102
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29103
|
-
})
|
|
29104
|
-
.catch((e) => {
|
|
29105
|
-
this.logger.error(formatErrors(e));
|
|
29106
|
-
throw e;
|
|
29107
|
-
});
|
|
29108
|
-
}),
|
|
29109
|
-
/**
|
|
29110
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=tree&version=v2 click to debug }
|
|
29111
|
-
*
|
|
29112
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tree&project=corehr&resource=department&version=v2 document }
|
|
29113
|
-
*/
|
|
29114
|
-
tree: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29115
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29116
|
-
return this.httpInstance
|
|
29117
|
-
.request({
|
|
29118
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/tree`, path),
|
|
29880
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/search`, path),
|
|
29119
29881
|
method: "POST",
|
|
29120
29882
|
data,
|
|
29121
29883
|
params,
|
|
@@ -29129,59 +29891,15 @@ class Client$I extends Client$J {
|
|
|
29129
29891
|
}),
|
|
29130
29892
|
},
|
|
29131
29893
|
/**
|
|
29132
|
-
*
|
|
29894
|
+
* employees.additional_job
|
|
29133
29895
|
*/
|
|
29134
|
-
|
|
29135
|
-
|
|
29136
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=batch_get&version=v2 click to debug }
|
|
29137
|
-
*
|
|
29138
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employee&version=v2 document }
|
|
29139
|
-
*
|
|
29140
|
-
* 通过员工 ID 批量获取员工信息
|
|
29141
|
-
*/
|
|
29142
|
-
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29143
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29144
|
-
return this.httpInstance
|
|
29145
|
-
.request({
|
|
29146
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/batch_get`, path),
|
|
29147
|
-
method: "POST",
|
|
29148
|
-
data,
|
|
29149
|
-
params,
|
|
29150
|
-
headers,
|
|
29151
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29152
|
-
})
|
|
29153
|
-
.catch((e) => {
|
|
29154
|
-
this.logger.error(formatErrors(e));
|
|
29155
|
-
throw e;
|
|
29156
|
-
});
|
|
29157
|
-
}),
|
|
29158
|
-
/**
|
|
29159
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=create&version=v2 click to debug }
|
|
29160
|
-
*
|
|
29161
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employee&version=v2 document }
|
|
29162
|
-
*/
|
|
29163
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29164
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29165
|
-
return this.httpInstance
|
|
29166
|
-
.request({
|
|
29167
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees`, path),
|
|
29168
|
-
method: "POST",
|
|
29169
|
-
data,
|
|
29170
|
-
params,
|
|
29171
|
-
headers,
|
|
29172
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29173
|
-
})
|
|
29174
|
-
.catch((e) => {
|
|
29175
|
-
this.logger.error(formatErrors(e));
|
|
29176
|
-
throw e;
|
|
29177
|
-
});
|
|
29178
|
-
}),
|
|
29179
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29896
|
+
employeesAdditionalJob: {
|
|
29897
|
+
batchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29180
29898
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29181
29899
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29182
29900
|
const res = yield this.httpInstance
|
|
29183
29901
|
.request({
|
|
29184
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/
|
|
29902
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
|
|
29185
29903
|
method: "POST",
|
|
29186
29904
|
headers: pickBy(innerPayload.headers, identity),
|
|
29187
29905
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -29229,17 +29947,40 @@ class Client$I extends Client$J {
|
|
|
29229
29947
|
return Iterable;
|
|
29230
29948
|
}),
|
|
29231
29949
|
/**
|
|
29232
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
29950
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=batch&version=v2 click to debug }
|
|
29233
29951
|
*
|
|
29234
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
29952
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
29235
29953
|
*
|
|
29236
|
-
*
|
|
29954
|
+
* 批量查询兼职信息
|
|
29237
29955
|
*/
|
|
29238
|
-
|
|
29956
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29239
29957
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29240
29958
|
return this.httpInstance
|
|
29241
29959
|
.request({
|
|
29242
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/
|
|
29960
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
|
|
29961
|
+
method: "POST",
|
|
29962
|
+
data,
|
|
29963
|
+
params,
|
|
29964
|
+
headers,
|
|
29965
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
29966
|
+
})
|
|
29967
|
+
.catch((e) => {
|
|
29968
|
+
this.logger.error(formatErrors(e));
|
|
29969
|
+
throw e;
|
|
29970
|
+
});
|
|
29971
|
+
}),
|
|
29972
|
+
/**
|
|
29973
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=create&version=v2 click to debug }
|
|
29974
|
+
*
|
|
29975
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
29976
|
+
*
|
|
29977
|
+
* 创建兼职
|
|
29978
|
+
*/
|
|
29979
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29980
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29981
|
+
return this.httpInstance
|
|
29982
|
+
.request({
|
|
29983
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`, path),
|
|
29243
29984
|
method: "POST",
|
|
29244
29985
|
data,
|
|
29245
29986
|
params,
|
|
@@ -29251,6 +29992,52 @@ class Client$I extends Client$J {
|
|
|
29251
29992
|
throw e;
|
|
29252
29993
|
});
|
|
29253
29994
|
}),
|
|
29995
|
+
/**
|
|
29996
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=delete&version=v2 click to debug }
|
|
29997
|
+
*
|
|
29998
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
29999
|
+
*
|
|
30000
|
+
* 删除兼职
|
|
30001
|
+
*/
|
|
30002
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30003
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30004
|
+
return this.httpInstance
|
|
30005
|
+
.request({
|
|
30006
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
|
|
30007
|
+
method: "DELETE",
|
|
30008
|
+
data,
|
|
30009
|
+
params,
|
|
30010
|
+
headers,
|
|
30011
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30012
|
+
})
|
|
30013
|
+
.catch((e) => {
|
|
30014
|
+
this.logger.error(formatErrors(e));
|
|
30015
|
+
throw e;
|
|
30016
|
+
});
|
|
30017
|
+
}),
|
|
30018
|
+
/**
|
|
30019
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=patch&version=v2 click to debug }
|
|
30020
|
+
*
|
|
30021
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
30022
|
+
*
|
|
30023
|
+
* 更新兼职
|
|
30024
|
+
*/
|
|
30025
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30026
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30027
|
+
return this.httpInstance
|
|
30028
|
+
.request({
|
|
30029
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
|
|
30030
|
+
method: "PATCH",
|
|
30031
|
+
data,
|
|
30032
|
+
params,
|
|
30033
|
+
headers,
|
|
30034
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30035
|
+
})
|
|
30036
|
+
.catch((e) => {
|
|
30037
|
+
this.logger.error(formatErrors(e));
|
|
30038
|
+
throw e;
|
|
30039
|
+
});
|
|
30040
|
+
}),
|
|
29254
30041
|
},
|
|
29255
30042
|
/**
|
|
29256
30043
|
* employees.bp
|
|
@@ -29613,6 +30400,29 @@ class Client$I extends Client$J {
|
|
|
29613
30400
|
* location
|
|
29614
30401
|
*/
|
|
29615
30402
|
location: {
|
|
30403
|
+
/**
|
|
30404
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=active&version=v2 click to debug }
|
|
30405
|
+
*
|
|
30406
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=location&version=v2 document }
|
|
30407
|
+
*
|
|
30408
|
+
* 启停/停用地点
|
|
30409
|
+
*/
|
|
30410
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30411
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30412
|
+
return this.httpInstance
|
|
30413
|
+
.request({
|
|
30414
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/active`, path),
|
|
30415
|
+
method: "POST",
|
|
30416
|
+
data,
|
|
30417
|
+
params,
|
|
30418
|
+
headers,
|
|
30419
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30420
|
+
})
|
|
30421
|
+
.catch((e) => {
|
|
30422
|
+
this.logger.error(formatErrors(e));
|
|
30423
|
+
throw e;
|
|
30424
|
+
});
|
|
30425
|
+
}),
|
|
29616
30426
|
/**
|
|
29617
30427
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
|
|
29618
30428
|
*
|
|
@@ -29636,6 +30446,129 @@ class Client$I extends Client$J {
|
|
|
29636
30446
|
throw e;
|
|
29637
30447
|
});
|
|
29638
30448
|
}),
|
|
30449
|
+
/**
|
|
30450
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=patch&version=v2 click to debug }
|
|
30451
|
+
*
|
|
30452
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location&version=v2 document }
|
|
30453
|
+
*
|
|
30454
|
+
* 更新地点
|
|
30455
|
+
*/
|
|
30456
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30457
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30458
|
+
return this.httpInstance
|
|
30459
|
+
.request({
|
|
30460
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id`, path),
|
|
30461
|
+
method: "PATCH",
|
|
30462
|
+
data,
|
|
30463
|
+
params,
|
|
30464
|
+
headers,
|
|
30465
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30466
|
+
})
|
|
30467
|
+
.catch((e) => {
|
|
30468
|
+
this.logger.error(formatErrors(e));
|
|
30469
|
+
throw e;
|
|
30470
|
+
});
|
|
30471
|
+
}),
|
|
30472
|
+
},
|
|
30473
|
+
/**
|
|
30474
|
+
* location.address
|
|
30475
|
+
*/
|
|
30476
|
+
locationAddress: {
|
|
30477
|
+
/**
|
|
30478
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=create&version=v2 click to debug }
|
|
30479
|
+
*
|
|
30480
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=location.address&version=v2 document }
|
|
30481
|
+
*
|
|
30482
|
+
* 添加地点地址
|
|
30483
|
+
*/
|
|
30484
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30485
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30486
|
+
return this.httpInstance
|
|
30487
|
+
.request({
|
|
30488
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`, path),
|
|
30489
|
+
method: "POST",
|
|
30490
|
+
data,
|
|
30491
|
+
params,
|
|
30492
|
+
headers,
|
|
30493
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30494
|
+
})
|
|
30495
|
+
.catch((e) => {
|
|
30496
|
+
this.logger.error(formatErrors(e));
|
|
30497
|
+
throw e;
|
|
30498
|
+
});
|
|
30499
|
+
}),
|
|
30500
|
+
/**
|
|
30501
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=delete&version=v2 click to debug }
|
|
30502
|
+
*
|
|
30503
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=location.address&version=v2 document }
|
|
30504
|
+
*
|
|
30505
|
+
* 删除地点地址
|
|
30506
|
+
*/
|
|
30507
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30508
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30509
|
+
return this.httpInstance
|
|
30510
|
+
.request({
|
|
30511
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30512
|
+
method: "DELETE",
|
|
30513
|
+
data,
|
|
30514
|
+
params,
|
|
30515
|
+
headers,
|
|
30516
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30517
|
+
})
|
|
30518
|
+
.catch((e) => {
|
|
30519
|
+
this.logger.error(formatErrors(e));
|
|
30520
|
+
throw e;
|
|
30521
|
+
});
|
|
30522
|
+
}),
|
|
30523
|
+
/**
|
|
30524
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=patch&version=v2 click to debug }
|
|
30525
|
+
*
|
|
30526
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location.address&version=v2 document }
|
|
30527
|
+
*
|
|
30528
|
+
* 更新地点地址
|
|
30529
|
+
*/
|
|
30530
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30531
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30532
|
+
return this.httpInstance
|
|
30533
|
+
.request({
|
|
30534
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30535
|
+
method: "PATCH",
|
|
30536
|
+
data,
|
|
30537
|
+
params,
|
|
30538
|
+
headers,
|
|
30539
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30540
|
+
})
|
|
30541
|
+
.catch((e) => {
|
|
30542
|
+
this.logger.error(formatErrors(e));
|
|
30543
|
+
throw e;
|
|
30544
|
+
});
|
|
30545
|
+
}),
|
|
30546
|
+
},
|
|
30547
|
+
/**
|
|
30548
|
+
* offboarding
|
|
30549
|
+
*/
|
|
30550
|
+
offboarding: {
|
|
30551
|
+
/**
|
|
30552
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit_v2&version=v2 click to debug }
|
|
30553
|
+
*
|
|
30554
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=submit_v2&project=corehr&resource=offboarding&version=v2 document }
|
|
30555
|
+
*/
|
|
30556
|
+
submitV2: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30557
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30558
|
+
return this.httpInstance
|
|
30559
|
+
.request({
|
|
30560
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`, path),
|
|
30561
|
+
method: "POST",
|
|
30562
|
+
data,
|
|
30563
|
+
params,
|
|
30564
|
+
headers,
|
|
30565
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
30566
|
+
})
|
|
30567
|
+
.catch((e) => {
|
|
30568
|
+
this.logger.error(formatErrors(e));
|
|
30569
|
+
throw e;
|
|
30570
|
+
});
|
|
30571
|
+
}),
|
|
29639
30572
|
},
|
|
29640
30573
|
/**
|
|
29641
30574
|
* person
|
|
@@ -30318,6 +31251,84 @@ class Client$I extends Client$J {
|
|
|
30318
31251
|
});
|
|
30319
31252
|
}),
|
|
30320
31253
|
},
|
|
31254
|
+
/**
|
|
31255
|
+
* workforce_plan
|
|
31256
|
+
*/
|
|
31257
|
+
workforcePlan: {
|
|
31258
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31259
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31260
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
31261
|
+
const res = yield this.httpInstance
|
|
31262
|
+
.request({
|
|
31263
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
31264
|
+
method: "GET",
|
|
31265
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
31266
|
+
params: pickBy(innerPayload.params, identity),
|
|
31267
|
+
data,
|
|
31268
|
+
paramsSerializer: (params) => stringify(params, {
|
|
31269
|
+
arrayFormat: "repeat",
|
|
31270
|
+
}),
|
|
31271
|
+
})
|
|
31272
|
+
.catch((e) => {
|
|
31273
|
+
this.logger.error(formatErrors(e));
|
|
31274
|
+
});
|
|
31275
|
+
return res;
|
|
31276
|
+
});
|
|
31277
|
+
const Iterable = {
|
|
31278
|
+
[Symbol.asyncIterator]() {
|
|
31279
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
31280
|
+
let hasMore = true;
|
|
31281
|
+
let pageToken;
|
|
31282
|
+
while (hasMore) {
|
|
31283
|
+
try {
|
|
31284
|
+
const res = yield __await(sendRequest({
|
|
31285
|
+
headers,
|
|
31286
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
31287
|
+
data,
|
|
31288
|
+
}));
|
|
31289
|
+
const _b = get(res, "data") || {}, {
|
|
31290
|
+
// @ts-ignore
|
|
31291
|
+
has_more,
|
|
31292
|
+
// @ts-ignore
|
|
31293
|
+
page_token,
|
|
31294
|
+
// @ts-ignore
|
|
31295
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
31296
|
+
yield yield __await(rest);
|
|
31297
|
+
hasMore = Boolean(has_more);
|
|
31298
|
+
pageToken = page_token || next_page_token;
|
|
31299
|
+
}
|
|
31300
|
+
catch (e) {
|
|
31301
|
+
yield yield __await(null);
|
|
31302
|
+
break;
|
|
31303
|
+
}
|
|
31304
|
+
}
|
|
31305
|
+
});
|
|
31306
|
+
},
|
|
31307
|
+
};
|
|
31308
|
+
return Iterable;
|
|
31309
|
+
}),
|
|
31310
|
+
/**
|
|
31311
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan&apiName=list&version=v2 click to debug }
|
|
31312
|
+
*
|
|
31313
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=workforce_plan&version=v2 document }
|
|
31314
|
+
*/
|
|
31315
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31316
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31317
|
+
return this.httpInstance
|
|
31318
|
+
.request({
|
|
31319
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
31320
|
+
method: "GET",
|
|
31321
|
+
data,
|
|
31322
|
+
params,
|
|
31323
|
+
headers,
|
|
31324
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
31325
|
+
})
|
|
31326
|
+
.catch((e) => {
|
|
31327
|
+
this.logger.error(formatErrors(e));
|
|
31328
|
+
throw e;
|
|
31329
|
+
});
|
|
31330
|
+
}),
|
|
31331
|
+
},
|
|
30321
31332
|
/**
|
|
30322
31333
|
* workforce_plan_detail
|
|
30323
31334
|
*/
|
|
@@ -32166,7 +33177,7 @@ class Client$E extends Client$F {
|
|
|
32166
33177
|
}),
|
|
32167
33178
|
},
|
|
32168
33179
|
/**
|
|
32169
|
-
*
|
|
33180
|
+
* 文件
|
|
32170
33181
|
*/
|
|
32171
33182
|
file: {
|
|
32172
33183
|
/**
|
|
@@ -33039,7 +34050,7 @@ class Client$E extends Client$F {
|
|
|
33039
34050
|
}),
|
|
33040
34051
|
},
|
|
33041
34052
|
/**
|
|
33042
|
-
*
|
|
34053
|
+
* 素材
|
|
33043
34054
|
*/
|
|
33044
34055
|
media: {
|
|
33045
34056
|
/**
|
|
@@ -33986,7 +34997,7 @@ class Client$E extends Client$F {
|
|
|
33986
34997
|
}),
|
|
33987
34998
|
},
|
|
33988
34999
|
/**
|
|
33989
|
-
*
|
|
35000
|
+
* 文件
|
|
33990
35001
|
*/
|
|
33991
35002
|
file: {
|
|
33992
35003
|
/**
|
|
@@ -34865,7 +35876,7 @@ class Client$E extends Client$F {
|
|
|
34865
35876
|
}),
|
|
34866
35877
|
},
|
|
34867
35878
|
/**
|
|
34868
|
-
*
|
|
35879
|
+
* 素材
|
|
34869
35880
|
*/
|
|
34870
35881
|
media: {
|
|
34871
35882
|
/**
|
|
@@ -39422,7 +40433,7 @@ class Client$u extends Client$v {
|
|
|
39422
40433
|
}),
|
|
39423
40434
|
},
|
|
39424
40435
|
/**
|
|
39425
|
-
*
|
|
40436
|
+
* 入职
|
|
39426
40437
|
*/
|
|
39427
40438
|
application: {
|
|
39428
40439
|
/**
|
|
@@ -43381,6 +44392,27 @@ class Client$u extends Client$v {
|
|
|
43381
44392
|
throw e;
|
|
43382
44393
|
});
|
|
43383
44394
|
}),
|
|
44395
|
+
/**
|
|
44396
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
44397
|
+
*
|
|
44398
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
44399
|
+
*/
|
|
44400
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44401
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44402
|
+
return this.httpInstance
|
|
44403
|
+
.request({
|
|
44404
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
44405
|
+
method: "POST",
|
|
44406
|
+
data,
|
|
44407
|
+
params,
|
|
44408
|
+
headers,
|
|
44409
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
44410
|
+
})
|
|
44411
|
+
.catch((e) => {
|
|
44412
|
+
this.logger.error(formatErrors(e));
|
|
44413
|
+
throw e;
|
|
44414
|
+
});
|
|
44415
|
+
}),
|
|
43384
44416
|
},
|
|
43385
44417
|
/**
|
|
43386
44418
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -43674,6 +44706,82 @@ class Client$u extends Client$v {
|
|
|
43674
44706
|
});
|
|
43675
44707
|
}),
|
|
43676
44708
|
},
|
|
44709
|
+
/**
|
|
44710
|
+
* talent_tag
|
|
44711
|
+
*/
|
|
44712
|
+
talentTag: {
|
|
44713
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44714
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44715
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
44716
|
+
const res = yield this.httpInstance
|
|
44717
|
+
.request({
|
|
44718
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44719
|
+
method: "GET",
|
|
44720
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
44721
|
+
params: pickBy(innerPayload.params, identity),
|
|
44722
|
+
data,
|
|
44723
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
44724
|
+
})
|
|
44725
|
+
.catch((e) => {
|
|
44726
|
+
this.logger.error(formatErrors(e));
|
|
44727
|
+
});
|
|
44728
|
+
return res;
|
|
44729
|
+
});
|
|
44730
|
+
const Iterable = {
|
|
44731
|
+
[Symbol.asyncIterator]() {
|
|
44732
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
44733
|
+
let hasMore = true;
|
|
44734
|
+
let pageToken;
|
|
44735
|
+
while (hasMore) {
|
|
44736
|
+
try {
|
|
44737
|
+
const res = yield __await(sendRequest({
|
|
44738
|
+
headers,
|
|
44739
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
44740
|
+
data,
|
|
44741
|
+
}));
|
|
44742
|
+
const _b = get(res, "data") || {}, {
|
|
44743
|
+
// @ts-ignore
|
|
44744
|
+
has_more,
|
|
44745
|
+
// @ts-ignore
|
|
44746
|
+
page_token,
|
|
44747
|
+
// @ts-ignore
|
|
44748
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
44749
|
+
yield yield __await(rest);
|
|
44750
|
+
hasMore = Boolean(has_more);
|
|
44751
|
+
pageToken = page_token || next_page_token;
|
|
44752
|
+
}
|
|
44753
|
+
catch (e) {
|
|
44754
|
+
yield yield __await(null);
|
|
44755
|
+
break;
|
|
44756
|
+
}
|
|
44757
|
+
}
|
|
44758
|
+
});
|
|
44759
|
+
},
|
|
44760
|
+
};
|
|
44761
|
+
return Iterable;
|
|
44762
|
+
}),
|
|
44763
|
+
/**
|
|
44764
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
44765
|
+
*
|
|
44766
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
44767
|
+
*/
|
|
44768
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44769
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44770
|
+
return this.httpInstance
|
|
44771
|
+
.request({
|
|
44772
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44773
|
+
method: "GET",
|
|
44774
|
+
data,
|
|
44775
|
+
params,
|
|
44776
|
+
headers,
|
|
44777
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
44778
|
+
})
|
|
44779
|
+
.catch((e) => {
|
|
44780
|
+
this.logger.error(formatErrors(e));
|
|
44781
|
+
throw e;
|
|
44782
|
+
});
|
|
44783
|
+
}),
|
|
44784
|
+
},
|
|
43677
44785
|
/**
|
|
43678
44786
|
* termination_reason
|
|
43679
44787
|
*/
|
|
@@ -44748,7 +45856,7 @@ class Client$u extends Client$v {
|
|
|
44748
45856
|
}),
|
|
44749
45857
|
},
|
|
44750
45858
|
/**
|
|
44751
|
-
*
|
|
45859
|
+
* 入职
|
|
44752
45860
|
*/
|
|
44753
45861
|
application: {
|
|
44754
45862
|
/**
|
|
@@ -48739,6 +49847,27 @@ class Client$u extends Client$v {
|
|
|
48739
49847
|
throw e;
|
|
48740
49848
|
});
|
|
48741
49849
|
}),
|
|
49850
|
+
/**
|
|
49851
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
49852
|
+
*
|
|
49853
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
49854
|
+
*/
|
|
49855
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49856
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49857
|
+
return this.httpInstance
|
|
49858
|
+
.request({
|
|
49859
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
49860
|
+
method: "POST",
|
|
49861
|
+
data,
|
|
49862
|
+
params,
|
|
49863
|
+
headers,
|
|
49864
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
49865
|
+
})
|
|
49866
|
+
.catch((e) => {
|
|
49867
|
+
this.logger.error(formatErrors(e));
|
|
49868
|
+
throw e;
|
|
49869
|
+
});
|
|
49870
|
+
}),
|
|
48742
49871
|
},
|
|
48743
49872
|
/**
|
|
48744
49873
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -49036,6 +50165,84 @@ class Client$u extends Client$v {
|
|
|
49036
50165
|
});
|
|
49037
50166
|
}),
|
|
49038
50167
|
},
|
|
50168
|
+
/**
|
|
50169
|
+
* talent_tag
|
|
50170
|
+
*/
|
|
50171
|
+
talentTag: {
|
|
50172
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50173
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50174
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
50175
|
+
const res = yield this.httpInstance
|
|
50176
|
+
.request({
|
|
50177
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
50178
|
+
method: "GET",
|
|
50179
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
50180
|
+
params: pickBy(innerPayload.params, identity),
|
|
50181
|
+
data,
|
|
50182
|
+
paramsSerializer: (params) => stringify(params, {
|
|
50183
|
+
arrayFormat: "repeat",
|
|
50184
|
+
}),
|
|
50185
|
+
})
|
|
50186
|
+
.catch((e) => {
|
|
50187
|
+
this.logger.error(formatErrors(e));
|
|
50188
|
+
});
|
|
50189
|
+
return res;
|
|
50190
|
+
});
|
|
50191
|
+
const Iterable = {
|
|
50192
|
+
[Symbol.asyncIterator]() {
|
|
50193
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
50194
|
+
let hasMore = true;
|
|
50195
|
+
let pageToken;
|
|
50196
|
+
while (hasMore) {
|
|
50197
|
+
try {
|
|
50198
|
+
const res = yield __await(sendRequest({
|
|
50199
|
+
headers,
|
|
50200
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
50201
|
+
data,
|
|
50202
|
+
}));
|
|
50203
|
+
const _b = get(res, "data") || {}, {
|
|
50204
|
+
// @ts-ignore
|
|
50205
|
+
has_more,
|
|
50206
|
+
// @ts-ignore
|
|
50207
|
+
page_token,
|
|
50208
|
+
// @ts-ignore
|
|
50209
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
50210
|
+
yield yield __await(rest);
|
|
50211
|
+
hasMore = Boolean(has_more);
|
|
50212
|
+
pageToken = page_token || next_page_token;
|
|
50213
|
+
}
|
|
50214
|
+
catch (e) {
|
|
50215
|
+
yield yield __await(null);
|
|
50216
|
+
break;
|
|
50217
|
+
}
|
|
50218
|
+
}
|
|
50219
|
+
});
|
|
50220
|
+
},
|
|
50221
|
+
};
|
|
50222
|
+
return Iterable;
|
|
50223
|
+
}),
|
|
50224
|
+
/**
|
|
50225
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
50226
|
+
*
|
|
50227
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
50228
|
+
*/
|
|
50229
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50230
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50231
|
+
return this.httpInstance
|
|
50232
|
+
.request({
|
|
50233
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
50234
|
+
method: "GET",
|
|
50235
|
+
data,
|
|
50236
|
+
params,
|
|
50237
|
+
headers,
|
|
50238
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
50239
|
+
})
|
|
50240
|
+
.catch((e) => {
|
|
50241
|
+
this.logger.error(formatErrors(e));
|
|
50242
|
+
throw e;
|
|
50243
|
+
});
|
|
50244
|
+
}),
|
|
50245
|
+
},
|
|
49039
50246
|
/**
|
|
49040
50247
|
* termination_reason
|
|
49041
50248
|
*/
|
|
@@ -51400,7 +52607,7 @@ class Client$s extends Client$t {
|
|
|
51400
52607
|
}),
|
|
51401
52608
|
},
|
|
51402
52609
|
/**
|
|
51403
|
-
*
|
|
52610
|
+
* 消息加急
|
|
51404
52611
|
*/
|
|
51405
52612
|
message: {
|
|
51406
52613
|
/**
|
|
@@ -53603,7 +54810,7 @@ class Client$s extends Client$t {
|
|
|
53603
54810
|
}),
|
|
53604
54811
|
},
|
|
53605
54812
|
/**
|
|
53606
|
-
*
|
|
54813
|
+
* 消息加急
|
|
53607
54814
|
*/
|
|
53608
54815
|
message: {
|
|
53609
54816
|
/**
|
|
@@ -59379,6 +60586,27 @@ class Client$k extends Client$l {
|
|
|
59379
60586
|
* 登录态
|
|
59380
60587
|
*/
|
|
59381
60588
|
session: {
|
|
60589
|
+
/**
|
|
60590
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60591
|
+
*
|
|
60592
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60593
|
+
*/
|
|
60594
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60595
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60596
|
+
return this.httpInstance
|
|
60597
|
+
.request({
|
|
60598
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60599
|
+
method: "POST",
|
|
60600
|
+
data,
|
|
60601
|
+
params,
|
|
60602
|
+
headers,
|
|
60603
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
60604
|
+
})
|
|
60605
|
+
.catch((e) => {
|
|
60606
|
+
this.logger.error(formatErrors(e));
|
|
60607
|
+
throw e;
|
|
60608
|
+
});
|
|
60609
|
+
}),
|
|
59382
60610
|
/**
|
|
59383
60611
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
59384
60612
|
*
|
|
@@ -59410,6 +60638,27 @@ class Client$k extends Client$l {
|
|
|
59410
60638
|
* 登录态
|
|
59411
60639
|
*/
|
|
59412
60640
|
session: {
|
|
60641
|
+
/**
|
|
60642
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60643
|
+
*
|
|
60644
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60645
|
+
*/
|
|
60646
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60647
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60648
|
+
return this.httpInstance
|
|
60649
|
+
.request({
|
|
60650
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60651
|
+
method: "POST",
|
|
60652
|
+
data,
|
|
60653
|
+
params,
|
|
60654
|
+
headers,
|
|
60655
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
60656
|
+
})
|
|
60657
|
+
.catch((e) => {
|
|
60658
|
+
this.logger.error(formatErrors(e));
|
|
60659
|
+
throw e;
|
|
60660
|
+
});
|
|
60661
|
+
}),
|
|
59413
60662
|
/**
|
|
59414
60663
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
59415
60664
|
*
|
|
@@ -61492,7 +62741,7 @@ class Client$c extends Client$d {
|
|
|
61492
62741
|
}),
|
|
61493
62742
|
},
|
|
61494
62743
|
/**
|
|
61495
|
-
*
|
|
62744
|
+
* 工作表
|
|
61496
62745
|
*/
|
|
61497
62746
|
spreadsheetSheet: {
|
|
61498
62747
|
/**
|
|
@@ -62222,7 +63471,7 @@ class Client$c extends Client$d {
|
|
|
62222
63471
|
}),
|
|
62223
63472
|
},
|
|
62224
63473
|
/**
|
|
62225
|
-
*
|
|
63474
|
+
* 工作表
|
|
62226
63475
|
*/
|
|
62227
63476
|
spreadsheetSheet: {
|
|
62228
63477
|
/**
|