@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/lib/index.js
CHANGED
|
@@ -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
|
}
|
|
@@ -3232,6 +3546,81 @@ class Client$Y extends Client$Z {
|
|
|
3232
3546
|
throw e;
|
|
3233
3547
|
});
|
|
3234
3548
|
}),
|
|
3549
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3550
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3551
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3552
|
+
const res = yield this.httpInstance
|
|
3553
|
+
.request({
|
|
3554
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3555
|
+
method: "GET",
|
|
3556
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
3557
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
3558
|
+
data,
|
|
3559
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3560
|
+
})
|
|
3561
|
+
.catch((e) => {
|
|
3562
|
+
this.logger.error(formatErrors(e));
|
|
3563
|
+
});
|
|
3564
|
+
return res;
|
|
3565
|
+
});
|
|
3566
|
+
const Iterable = {
|
|
3567
|
+
[Symbol.asyncIterator]() {
|
|
3568
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3569
|
+
let hasMore = true;
|
|
3570
|
+
let pageToken;
|
|
3571
|
+
while (hasMore) {
|
|
3572
|
+
try {
|
|
3573
|
+
const res = yield __await(sendRequest({
|
|
3574
|
+
headers,
|
|
3575
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3576
|
+
data,
|
|
3577
|
+
}));
|
|
3578
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
3579
|
+
// @ts-ignore
|
|
3580
|
+
has_more,
|
|
3581
|
+
// @ts-ignore
|
|
3582
|
+
page_token,
|
|
3583
|
+
// @ts-ignore
|
|
3584
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3585
|
+
yield yield __await(rest);
|
|
3586
|
+
hasMore = Boolean(has_more);
|
|
3587
|
+
pageToken = page_token || next_page_token;
|
|
3588
|
+
}
|
|
3589
|
+
catch (e) {
|
|
3590
|
+
yield yield __await(null);
|
|
3591
|
+
break;
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
});
|
|
3595
|
+
},
|
|
3596
|
+
};
|
|
3597
|
+
return Iterable;
|
|
3598
|
+
}),
|
|
3599
|
+
/**
|
|
3600
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
|
|
3601
|
+
*
|
|
3602
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
|
|
3603
|
+
*
|
|
3604
|
+
* 获取企业安装的应用
|
|
3605
|
+
*
|
|
3606
|
+
* 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
|
|
3607
|
+
*/
|
|
3608
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3609
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3610
|
+
return this.httpInstance
|
|
3611
|
+
.request({
|
|
3612
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3613
|
+
method: "GET",
|
|
3614
|
+
data,
|
|
3615
|
+
params,
|
|
3616
|
+
headers,
|
|
3617
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3618
|
+
})
|
|
3619
|
+
.catch((e) => {
|
|
3620
|
+
this.logger.error(formatErrors(e));
|
|
3621
|
+
throw e;
|
|
3622
|
+
});
|
|
3623
|
+
}),
|
|
3235
3624
|
/**
|
|
3236
3625
|
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
|
|
3237
3626
|
*
|
|
@@ -3812,121 +4201,198 @@ class Client$Y extends Client$Z {
|
|
|
3812
4201
|
return Iterable;
|
|
3813
4202
|
}),
|
|
3814
4203
|
/**
|
|
3815
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=list&version=v6 click to debug }
|
|
4204
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=list&version=v6 click to debug }
|
|
4205
|
+
*
|
|
4206
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list document }
|
|
4207
|
+
*
|
|
4208
|
+
* 获取应用版本列表
|
|
4209
|
+
*
|
|
4210
|
+
* 根据 app_id 获取对应应用版本列表。
|
|
4211
|
+
*/
|
|
4212
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4213
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4214
|
+
return this.httpInstance
|
|
4215
|
+
.request({
|
|
4216
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions`, path),
|
|
4217
|
+
method: "GET",
|
|
4218
|
+
data,
|
|
4219
|
+
params,
|
|
4220
|
+
headers,
|
|
4221
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4222
|
+
})
|
|
4223
|
+
.catch((e) => {
|
|
4224
|
+
this.logger.error(formatErrors(e));
|
|
4225
|
+
throw e;
|
|
4226
|
+
});
|
|
4227
|
+
}),
|
|
4228
|
+
/**
|
|
4229
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=patch&version=v6 click to debug }
|
|
4230
|
+
*
|
|
4231
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch document }
|
|
4232
|
+
*
|
|
4233
|
+
* 更新应用审核状态
|
|
4234
|
+
*
|
|
4235
|
+
* 通过接口来更新应用版本的审核结果:通过后应用可以直接上架;拒绝后则开发者可以看到拒绝理由,并在修改后再次申请发布。
|
|
4236
|
+
*/
|
|
4237
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4238
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4239
|
+
return this.httpInstance
|
|
4240
|
+
.request({
|
|
4241
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path),
|
|
4242
|
+
method: "PATCH",
|
|
4243
|
+
data,
|
|
4244
|
+
params,
|
|
4245
|
+
headers,
|
|
4246
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4247
|
+
})
|
|
4248
|
+
.catch((e) => {
|
|
4249
|
+
this.logger.error(formatErrors(e));
|
|
4250
|
+
throw e;
|
|
4251
|
+
});
|
|
4252
|
+
}),
|
|
4253
|
+
},
|
|
4254
|
+
/**
|
|
4255
|
+
* application.contacts_range
|
|
4256
|
+
*/
|
|
4257
|
+
applicationContactsRange: {
|
|
4258
|
+
/**
|
|
4259
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
|
|
4260
|
+
*
|
|
4261
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
|
|
4262
|
+
*/
|
|
4263
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4264
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4265
|
+
return this.httpInstance
|
|
4266
|
+
.request({
|
|
4267
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path),
|
|
4268
|
+
method: "PATCH",
|
|
4269
|
+
data,
|
|
4270
|
+
params,
|
|
4271
|
+
headers,
|
|
4272
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4273
|
+
})
|
|
4274
|
+
.catch((e) => {
|
|
4275
|
+
this.logger.error(formatErrors(e));
|
|
4276
|
+
throw e;
|
|
4277
|
+
});
|
|
4278
|
+
}),
|
|
4279
|
+
},
|
|
4280
|
+
/**
|
|
4281
|
+
* 应用
|
|
4282
|
+
*/
|
|
4283
|
+
application: {
|
|
4284
|
+
/**
|
|
4285
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
|
|
4286
|
+
*
|
|
4287
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
|
|
4288
|
+
*/
|
|
4289
|
+
contactsRangeConfiguration: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4290
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4291
|
+
return this.httpInstance
|
|
4292
|
+
.request({
|
|
4293
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path),
|
|
4294
|
+
method: "GET",
|
|
4295
|
+
data,
|
|
4296
|
+
params,
|
|
4297
|
+
headers,
|
|
4298
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4299
|
+
})
|
|
4300
|
+
.catch((e) => {
|
|
4301
|
+
this.logger.error(formatErrors(e));
|
|
4302
|
+
throw e;
|
|
4303
|
+
});
|
|
4304
|
+
}),
|
|
4305
|
+
/**
|
|
4306
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
|
|
4307
|
+
*
|
|
4308
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get document }
|
|
4309
|
+
*
|
|
4310
|
+
* 获取应用信息
|
|
4311
|
+
*
|
|
4312
|
+
* 根据app_id获取应用的基础信息
|
|
4313
|
+
*/
|
|
4314
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4315
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4316
|
+
return this.httpInstance
|
|
4317
|
+
.request({
|
|
4318
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path),
|
|
4319
|
+
method: "GET",
|
|
4320
|
+
data,
|
|
4321
|
+
params,
|
|
4322
|
+
headers,
|
|
4323
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4324
|
+
})
|
|
4325
|
+
.catch((e) => {
|
|
4326
|
+
this.logger.error(formatErrors(e));
|
|
4327
|
+
throw e;
|
|
4328
|
+
});
|
|
4329
|
+
}),
|
|
4330
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4331
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4332
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
4333
|
+
const res = yield this.httpInstance
|
|
4334
|
+
.request({
|
|
4335
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
4336
|
+
method: "GET",
|
|
4337
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
4338
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
4339
|
+
data,
|
|
4340
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
4341
|
+
arrayFormat: "repeat",
|
|
4342
|
+
}),
|
|
4343
|
+
})
|
|
4344
|
+
.catch((e) => {
|
|
4345
|
+
this.logger.error(formatErrors(e));
|
|
4346
|
+
});
|
|
4347
|
+
return res;
|
|
4348
|
+
});
|
|
4349
|
+
const Iterable = {
|
|
4350
|
+
[Symbol.asyncIterator]() {
|
|
4351
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
4352
|
+
let hasMore = true;
|
|
4353
|
+
let pageToken;
|
|
4354
|
+
while (hasMore) {
|
|
4355
|
+
try {
|
|
4356
|
+
const res = yield __await(sendRequest({
|
|
4357
|
+
headers,
|
|
4358
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
4359
|
+
data,
|
|
4360
|
+
}));
|
|
4361
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
4362
|
+
// @ts-ignore
|
|
4363
|
+
has_more,
|
|
4364
|
+
// @ts-ignore
|
|
4365
|
+
page_token,
|
|
4366
|
+
// @ts-ignore
|
|
4367
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
4368
|
+
yield yield __await(rest);
|
|
4369
|
+
hasMore = Boolean(has_more);
|
|
4370
|
+
pageToken = page_token || next_page_token;
|
|
4371
|
+
}
|
|
4372
|
+
catch (e) {
|
|
4373
|
+
yield yield __await(null);
|
|
4374
|
+
break;
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
});
|
|
4378
|
+
},
|
|
4379
|
+
};
|
|
4380
|
+
return Iterable;
|
|
4381
|
+
}),
|
|
4382
|
+
/**
|
|
4383
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
|
|
3816
4384
|
*
|
|
3817
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application
|
|
4385
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
|
|
3818
4386
|
*
|
|
3819
|
-
*
|
|
4387
|
+
* 获取企业安装的应用
|
|
3820
4388
|
*
|
|
3821
|
-
*
|
|
4389
|
+
* 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
|
|
3822
4390
|
*/
|
|
3823
4391
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3824
4392
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3825
4393
|
return this.httpInstance
|
|
3826
4394
|
.request({
|
|
3827
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications
|
|
3828
|
-
method: "GET",
|
|
3829
|
-
data,
|
|
3830
|
-
params,
|
|
3831
|
-
headers,
|
|
3832
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3833
|
-
})
|
|
3834
|
-
.catch((e) => {
|
|
3835
|
-
this.logger.error(formatErrors(e));
|
|
3836
|
-
throw e;
|
|
3837
|
-
});
|
|
3838
|
-
}),
|
|
3839
|
-
/**
|
|
3840
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=patch&version=v6 click to debug }
|
|
3841
|
-
*
|
|
3842
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch document }
|
|
3843
|
-
*
|
|
3844
|
-
* 更新应用审核状态
|
|
3845
|
-
*
|
|
3846
|
-
* 通过接口来更新应用版本的审核结果:通过后应用可以直接上架;拒绝后则开发者可以看到拒绝理由,并在修改后再次申请发布。
|
|
3847
|
-
*/
|
|
3848
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3849
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3850
|
-
return this.httpInstance
|
|
3851
|
-
.request({
|
|
3852
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id`, path),
|
|
3853
|
-
method: "PATCH",
|
|
3854
|
-
data,
|
|
3855
|
-
params,
|
|
3856
|
-
headers,
|
|
3857
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3858
|
-
})
|
|
3859
|
-
.catch((e) => {
|
|
3860
|
-
this.logger.error(formatErrors(e));
|
|
3861
|
-
throw e;
|
|
3862
|
-
});
|
|
3863
|
-
}),
|
|
3864
|
-
},
|
|
3865
|
-
/**
|
|
3866
|
-
* application.contacts_range
|
|
3867
|
-
*/
|
|
3868
|
-
applicationContactsRange: {
|
|
3869
|
-
/**
|
|
3870
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
|
|
3871
|
-
*
|
|
3872
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
|
|
3873
|
-
*/
|
|
3874
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3875
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3876
|
-
return this.httpInstance
|
|
3877
|
-
.request({
|
|
3878
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path),
|
|
3879
|
-
method: "PATCH",
|
|
3880
|
-
data,
|
|
3881
|
-
params,
|
|
3882
|
-
headers,
|
|
3883
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3884
|
-
})
|
|
3885
|
-
.catch((e) => {
|
|
3886
|
-
this.logger.error(formatErrors(e));
|
|
3887
|
-
throw e;
|
|
3888
|
-
});
|
|
3889
|
-
}),
|
|
3890
|
-
},
|
|
3891
|
-
/**
|
|
3892
|
-
* 应用
|
|
3893
|
-
*/
|
|
3894
|
-
application: {
|
|
3895
|
-
/**
|
|
3896
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
|
|
3897
|
-
*
|
|
3898
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
|
|
3899
|
-
*/
|
|
3900
|
-
contactsRangeConfiguration: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3901
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3902
|
-
return this.httpInstance
|
|
3903
|
-
.request({
|
|
3904
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path),
|
|
3905
|
-
method: "GET",
|
|
3906
|
-
data,
|
|
3907
|
-
params,
|
|
3908
|
-
headers,
|
|
3909
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3910
|
-
})
|
|
3911
|
-
.catch((e) => {
|
|
3912
|
-
this.logger.error(formatErrors(e));
|
|
3913
|
-
throw e;
|
|
3914
|
-
});
|
|
3915
|
-
}),
|
|
3916
|
-
/**
|
|
3917
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
|
|
3918
|
-
*
|
|
3919
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get document }
|
|
3920
|
-
*
|
|
3921
|
-
* 获取应用信息
|
|
3922
|
-
*
|
|
3923
|
-
* 根据app_id获取应用的基础信息
|
|
3924
|
-
*/
|
|
3925
|
-
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3926
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3927
|
-
return this.httpInstance
|
|
3928
|
-
.request({
|
|
3929
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id`, path),
|
|
4395
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3930
4396
|
method: "GET",
|
|
3931
4397
|
data,
|
|
3932
4398
|
params,
|
|
@@ -4525,7 +4991,7 @@ class Client$X extends Client$Y {
|
|
|
4525
4991
|
}),
|
|
4526
4992
|
},
|
|
4527
4993
|
/**
|
|
4528
|
-
*
|
|
4994
|
+
* 原生审批实例
|
|
4529
4995
|
*/
|
|
4530
4996
|
instance: {
|
|
4531
4997
|
/**
|
|
@@ -5530,7 +5996,7 @@ class Client$X extends Client$Y {
|
|
|
5530
5996
|
}),
|
|
5531
5997
|
},
|
|
5532
5998
|
/**
|
|
5533
|
-
*
|
|
5999
|
+
* 原生审批实例
|
|
5534
6000
|
*/
|
|
5535
6001
|
instance: {
|
|
5536
6002
|
/**
|
|
@@ -27679,6 +28145,84 @@ class Client$I extends Client$J {
|
|
|
27679
28145
|
},
|
|
27680
28146
|
},
|
|
27681
28147
|
v2: {
|
|
28148
|
+
/**
|
|
28149
|
+
* approver
|
|
28150
|
+
*/
|
|
28151
|
+
approver: {
|
|
28152
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28153
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28154
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28155
|
+
const res = yield this.httpInstance
|
|
28156
|
+
.request({
|
|
28157
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28158
|
+
method: "GET",
|
|
28159
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28160
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28161
|
+
data,
|
|
28162
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28163
|
+
arrayFormat: "repeat",
|
|
28164
|
+
}),
|
|
28165
|
+
})
|
|
28166
|
+
.catch((e) => {
|
|
28167
|
+
this.logger.error(formatErrors(e));
|
|
28168
|
+
});
|
|
28169
|
+
return res;
|
|
28170
|
+
});
|
|
28171
|
+
const Iterable = {
|
|
28172
|
+
[Symbol.asyncIterator]() {
|
|
28173
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28174
|
+
let hasMore = true;
|
|
28175
|
+
let pageToken;
|
|
28176
|
+
while (hasMore) {
|
|
28177
|
+
try {
|
|
28178
|
+
const res = yield __await(sendRequest({
|
|
28179
|
+
headers,
|
|
28180
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28181
|
+
data,
|
|
28182
|
+
}));
|
|
28183
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28184
|
+
// @ts-ignore
|
|
28185
|
+
has_more,
|
|
28186
|
+
// @ts-ignore
|
|
28187
|
+
page_token,
|
|
28188
|
+
// @ts-ignore
|
|
28189
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28190
|
+
yield yield __await(rest);
|
|
28191
|
+
hasMore = Boolean(has_more);
|
|
28192
|
+
pageToken = page_token || next_page_token;
|
|
28193
|
+
}
|
|
28194
|
+
catch (e) {
|
|
28195
|
+
yield yield __await(null);
|
|
28196
|
+
break;
|
|
28197
|
+
}
|
|
28198
|
+
}
|
|
28199
|
+
});
|
|
28200
|
+
},
|
|
28201
|
+
};
|
|
28202
|
+
return Iterable;
|
|
28203
|
+
}),
|
|
28204
|
+
/**
|
|
28205
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approver&apiName=list&version=v2 click to debug }
|
|
28206
|
+
*
|
|
28207
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=approver&version=v2 document }
|
|
28208
|
+
*/
|
|
28209
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28210
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28211
|
+
return this.httpInstance
|
|
28212
|
+
.request({
|
|
28213
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28214
|
+
method: "GET",
|
|
28215
|
+
data,
|
|
28216
|
+
params,
|
|
28217
|
+
headers,
|
|
28218
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28219
|
+
})
|
|
28220
|
+
.catch((e) => {
|
|
28221
|
+
this.logger.error(formatErrors(e));
|
|
28222
|
+
throw e;
|
|
28223
|
+
});
|
|
28224
|
+
}),
|
|
28225
|
+
},
|
|
27682
28226
|
/**
|
|
27683
28227
|
* basic_info.bank
|
|
27684
28228
|
*/
|
|
@@ -28360,15 +28904,93 @@ class Client$I extends Client$J {
|
|
|
28360
28904
|
return Iterable;
|
|
28361
28905
|
}),
|
|
28362
28906
|
/**
|
|
28363
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.nationality&apiName=search&version=v2 click to debug }
|
|
28907
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.nationality&apiName=search&version=v2 click to debug }
|
|
28908
|
+
*
|
|
28909
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.nationality&version=v2 document }
|
|
28910
|
+
*/
|
|
28911
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28912
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28913
|
+
return this.httpInstance
|
|
28914
|
+
.request({
|
|
28915
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/nationalities/search`, path),
|
|
28916
|
+
method: "POST",
|
|
28917
|
+
data,
|
|
28918
|
+
params,
|
|
28919
|
+
headers,
|
|
28920
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28921
|
+
})
|
|
28922
|
+
.catch((e) => {
|
|
28923
|
+
this.logger.error(formatErrors(e));
|
|
28924
|
+
throw e;
|
|
28925
|
+
});
|
|
28926
|
+
}),
|
|
28927
|
+
},
|
|
28928
|
+
/**
|
|
28929
|
+
* basic_info.time_zone
|
|
28930
|
+
*/
|
|
28931
|
+
basicInfoTimeZone: {
|
|
28932
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28933
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28934
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28935
|
+
const res = yield this.httpInstance
|
|
28936
|
+
.request({
|
|
28937
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28938
|
+
method: "POST",
|
|
28939
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28940
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28941
|
+
data,
|
|
28942
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28943
|
+
arrayFormat: "repeat",
|
|
28944
|
+
}),
|
|
28945
|
+
})
|
|
28946
|
+
.catch((e) => {
|
|
28947
|
+
this.logger.error(formatErrors(e));
|
|
28948
|
+
});
|
|
28949
|
+
return res;
|
|
28950
|
+
});
|
|
28951
|
+
const Iterable = {
|
|
28952
|
+
[Symbol.asyncIterator]() {
|
|
28953
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28954
|
+
let hasMore = true;
|
|
28955
|
+
let pageToken;
|
|
28956
|
+
while (hasMore) {
|
|
28957
|
+
try {
|
|
28958
|
+
const res = yield __await(sendRequest({
|
|
28959
|
+
headers,
|
|
28960
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28961
|
+
data,
|
|
28962
|
+
}));
|
|
28963
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28964
|
+
// @ts-ignore
|
|
28965
|
+
has_more,
|
|
28966
|
+
// @ts-ignore
|
|
28967
|
+
page_token,
|
|
28968
|
+
// @ts-ignore
|
|
28969
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28970
|
+
yield yield __await(rest);
|
|
28971
|
+
hasMore = Boolean(has_more);
|
|
28972
|
+
pageToken = page_token || next_page_token;
|
|
28973
|
+
}
|
|
28974
|
+
catch (e) {
|
|
28975
|
+
yield yield __await(null);
|
|
28976
|
+
break;
|
|
28977
|
+
}
|
|
28978
|
+
}
|
|
28979
|
+
});
|
|
28980
|
+
},
|
|
28981
|
+
};
|
|
28982
|
+
return Iterable;
|
|
28983
|
+
}),
|
|
28984
|
+
/**
|
|
28985
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.time_zone&apiName=search&version=v2 click to debug }
|
|
28364
28986
|
*
|
|
28365
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.
|
|
28987
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.time_zone&version=v2 document }
|
|
28366
28988
|
*/
|
|
28367
28989
|
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28368
28990
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28369
28991
|
return this.httpInstance
|
|
28370
28992
|
.request({
|
|
28371
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/
|
|
28993
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28372
28994
|
method: "POST",
|
|
28373
28995
|
data,
|
|
28374
28996
|
params,
|
|
@@ -28382,16 +29004,37 @@ class Client$I extends Client$J {
|
|
|
28382
29004
|
}),
|
|
28383
29005
|
},
|
|
28384
29006
|
/**
|
|
28385
|
-
*
|
|
29007
|
+
* bp
|
|
28386
29008
|
*/
|
|
28387
|
-
|
|
28388
|
-
|
|
29009
|
+
bp: {
|
|
29010
|
+
/**
|
|
29011
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=get_by_department&version=v2 click to debug }
|
|
29012
|
+
*
|
|
29013
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_department&project=corehr&resource=bp&version=v2 document }
|
|
29014
|
+
*/
|
|
29015
|
+
getByDepartment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29016
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29017
|
+
return this.httpInstance
|
|
29018
|
+
.request({
|
|
29019
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`, path),
|
|
29020
|
+
method: "POST",
|
|
29021
|
+
data,
|
|
29022
|
+
params,
|
|
29023
|
+
headers,
|
|
29024
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29025
|
+
})
|
|
29026
|
+
.catch((e) => {
|
|
29027
|
+
this.logger.error(formatErrors(e));
|
|
29028
|
+
throw e;
|
|
29029
|
+
});
|
|
29030
|
+
}),
|
|
29031
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28389
29032
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28390
29033
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28391
29034
|
const res = yield this.httpInstance
|
|
28392
29035
|
.request({
|
|
28393
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
28394
|
-
method: "
|
|
29036
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
|
|
29037
|
+
method: "GET",
|
|
28395
29038
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28396
29039
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28397
29040
|
data,
|
|
@@ -28438,16 +29081,18 @@ class Client$I extends Client$J {
|
|
|
28438
29081
|
return Iterable;
|
|
28439
29082
|
}),
|
|
28440
29083
|
/**
|
|
28441
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
29084
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=list&version=v2 click to debug }
|
|
28442
29085
|
*
|
|
28443
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
29086
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
|
|
29087
|
+
*
|
|
29088
|
+
* 待补充
|
|
28444
29089
|
*/
|
|
28445
|
-
|
|
29090
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28446
29091
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28447
29092
|
return this.httpInstance
|
|
28448
29093
|
.request({
|
|
28449
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
28450
|
-
method: "
|
|
29094
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
|
|
29095
|
+
method: "GET",
|
|
28451
29096
|
data,
|
|
28452
29097
|
params,
|
|
28453
29098
|
headers,
|
|
@@ -28460,19 +29105,19 @@ class Client$I extends Client$J {
|
|
|
28460
29105
|
}),
|
|
28461
29106
|
},
|
|
28462
29107
|
/**
|
|
28463
|
-
*
|
|
29108
|
+
* company
|
|
28464
29109
|
*/
|
|
28465
|
-
|
|
29110
|
+
company: {
|
|
28466
29111
|
/**
|
|
28467
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
29112
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=active&version=v2 click to debug }
|
|
28468
29113
|
*
|
|
28469
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
29114
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=company&version=v2 document }
|
|
28470
29115
|
*/
|
|
28471
|
-
|
|
29116
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28472
29117
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28473
29118
|
return this.httpInstance
|
|
28474
29119
|
.request({
|
|
28475
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29120
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/active`, path),
|
|
28476
29121
|
method: "POST",
|
|
28477
29122
|
data,
|
|
28478
29123
|
params,
|
|
@@ -28484,12 +29129,35 @@ class Client$I extends Client$J {
|
|
|
28484
29129
|
throw e;
|
|
28485
29130
|
});
|
|
28486
29131
|
}),
|
|
28487
|
-
|
|
29132
|
+
/**
|
|
29133
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
|
|
29134
|
+
*
|
|
29135
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
|
|
29136
|
+
*
|
|
29137
|
+
* 通过公司 ID 批量获取公司信息
|
|
29138
|
+
*/
|
|
29139
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29140
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29141
|
+
return this.httpInstance
|
|
29142
|
+
.request({
|
|
29143
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path),
|
|
29144
|
+
method: "POST",
|
|
29145
|
+
data,
|
|
29146
|
+
params,
|
|
29147
|
+
headers,
|
|
29148
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29149
|
+
})
|
|
29150
|
+
.catch((e) => {
|
|
29151
|
+
this.logger.error(formatErrors(e));
|
|
29152
|
+
throw e;
|
|
29153
|
+
});
|
|
29154
|
+
}),
|
|
29155
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28488
29156
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28489
29157
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28490
29158
|
const res = yield this.httpInstance
|
|
28491
29159
|
.request({
|
|
28492
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29160
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
28493
29161
|
method: "GET",
|
|
28494
29162
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28495
29163
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -28537,17 +29205,15 @@ class Client$I extends Client$J {
|
|
|
28537
29205
|
return Iterable;
|
|
28538
29206
|
}),
|
|
28539
29207
|
/**
|
|
28540
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
28541
|
-
*
|
|
28542
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
|
|
29208
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=query_recent_change&version=v2 click to debug }
|
|
28543
29209
|
*
|
|
28544
|
-
*
|
|
29210
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=company&version=v2 document }
|
|
28545
29211
|
*/
|
|
28546
|
-
|
|
29212
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28547
29213
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28548
29214
|
return this.httpInstance
|
|
28549
29215
|
.request({
|
|
28550
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29216
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
28551
29217
|
method: "GET",
|
|
28552
29218
|
data,
|
|
28553
29219
|
params,
|
|
@@ -28560,34 +29226,6 @@ class Client$I extends Client$J {
|
|
|
28560
29226
|
});
|
|
28561
29227
|
}),
|
|
28562
29228
|
},
|
|
28563
|
-
/**
|
|
28564
|
-
* company
|
|
28565
|
-
*/
|
|
28566
|
-
company: {
|
|
28567
|
-
/**
|
|
28568
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
|
|
28569
|
-
*
|
|
28570
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
|
|
28571
|
-
*
|
|
28572
|
-
* 通过公司 ID 批量获取公司信息
|
|
28573
|
-
*/
|
|
28574
|
-
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28575
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28576
|
-
return this.httpInstance
|
|
28577
|
-
.request({
|
|
28578
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path),
|
|
28579
|
-
method: "POST",
|
|
28580
|
-
data,
|
|
28581
|
-
params,
|
|
28582
|
-
headers,
|
|
28583
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28584
|
-
})
|
|
28585
|
-
.catch((e) => {
|
|
28586
|
-
this.logger.error(formatErrors(e));
|
|
28587
|
-
throw e;
|
|
28588
|
-
});
|
|
28589
|
-
}),
|
|
28590
|
-
},
|
|
28591
29229
|
/**
|
|
28592
29230
|
* contract
|
|
28593
29231
|
*/
|
|
@@ -29101,38 +29739,162 @@ class Client$I extends Client$J {
|
|
|
29101
29739
|
return Iterable;
|
|
29102
29740
|
}),
|
|
29103
29741
|
/**
|
|
29104
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=search&version=v2 click to debug }
|
|
29742
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=search&version=v2 click to debug }
|
|
29743
|
+
*
|
|
29744
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=department&version=v2 document }
|
|
29745
|
+
*
|
|
29746
|
+
* 根据部门 ID,上级部门查询部门列表
|
|
29747
|
+
*/
|
|
29748
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29749
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29750
|
+
return this.httpInstance
|
|
29751
|
+
.request({
|
|
29752
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/search`, path),
|
|
29753
|
+
method: "POST",
|
|
29754
|
+
data,
|
|
29755
|
+
params,
|
|
29756
|
+
headers,
|
|
29757
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29758
|
+
})
|
|
29759
|
+
.catch((e) => {
|
|
29760
|
+
this.logger.error(formatErrors(e));
|
|
29761
|
+
throw e;
|
|
29762
|
+
});
|
|
29763
|
+
}),
|
|
29764
|
+
/**
|
|
29765
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=tree&version=v2 click to debug }
|
|
29766
|
+
*
|
|
29767
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tree&project=corehr&resource=department&version=v2 document }
|
|
29768
|
+
*/
|
|
29769
|
+
tree: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29770
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29771
|
+
return this.httpInstance
|
|
29772
|
+
.request({
|
|
29773
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/tree`, path),
|
|
29774
|
+
method: "POST",
|
|
29775
|
+
data,
|
|
29776
|
+
params,
|
|
29777
|
+
headers,
|
|
29778
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29779
|
+
})
|
|
29780
|
+
.catch((e) => {
|
|
29781
|
+
this.logger.error(formatErrors(e));
|
|
29782
|
+
throw e;
|
|
29783
|
+
});
|
|
29784
|
+
}),
|
|
29785
|
+
},
|
|
29786
|
+
/**
|
|
29787
|
+
* employee
|
|
29788
|
+
*/
|
|
29789
|
+
employee: {
|
|
29790
|
+
/**
|
|
29791
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=batch_get&version=v2 click to debug }
|
|
29792
|
+
*
|
|
29793
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employee&version=v2 document }
|
|
29794
|
+
*
|
|
29795
|
+
* 通过员工 ID 批量获取员工信息
|
|
29796
|
+
*/
|
|
29797
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29798
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29799
|
+
return this.httpInstance
|
|
29800
|
+
.request({
|
|
29801
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/batch_get`, path),
|
|
29802
|
+
method: "POST",
|
|
29803
|
+
data,
|
|
29804
|
+
params,
|
|
29805
|
+
headers,
|
|
29806
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29807
|
+
})
|
|
29808
|
+
.catch((e) => {
|
|
29809
|
+
this.logger.error(formatErrors(e));
|
|
29810
|
+
throw e;
|
|
29811
|
+
});
|
|
29812
|
+
}),
|
|
29813
|
+
/**
|
|
29814
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=create&version=v2 click to debug }
|
|
29815
|
+
*
|
|
29816
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employee&version=v2 document }
|
|
29817
|
+
*/
|
|
29818
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29819
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29820
|
+
return this.httpInstance
|
|
29821
|
+
.request({
|
|
29822
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees`, path),
|
|
29823
|
+
method: "POST",
|
|
29824
|
+
data,
|
|
29825
|
+
params,
|
|
29826
|
+
headers,
|
|
29827
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29828
|
+
})
|
|
29829
|
+
.catch((e) => {
|
|
29830
|
+
this.logger.error(formatErrors(e));
|
|
29831
|
+
throw e;
|
|
29832
|
+
});
|
|
29833
|
+
}),
|
|
29834
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29835
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29836
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29837
|
+
const res = yield this.httpInstance
|
|
29838
|
+
.request({
|
|
29839
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/search`, path),
|
|
29840
|
+
method: "POST",
|
|
29841
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
29842
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
29843
|
+
data,
|
|
29844
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
29845
|
+
arrayFormat: "repeat",
|
|
29846
|
+
}),
|
|
29847
|
+
})
|
|
29848
|
+
.catch((e) => {
|
|
29849
|
+
this.logger.error(formatErrors(e));
|
|
29850
|
+
});
|
|
29851
|
+
return res;
|
|
29852
|
+
});
|
|
29853
|
+
const Iterable = {
|
|
29854
|
+
[Symbol.asyncIterator]() {
|
|
29855
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
29856
|
+
let hasMore = true;
|
|
29857
|
+
let pageToken;
|
|
29858
|
+
while (hasMore) {
|
|
29859
|
+
try {
|
|
29860
|
+
const res = yield __await(sendRequest({
|
|
29861
|
+
headers,
|
|
29862
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
29863
|
+
data,
|
|
29864
|
+
}));
|
|
29865
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
29866
|
+
// @ts-ignore
|
|
29867
|
+
has_more,
|
|
29868
|
+
// @ts-ignore
|
|
29869
|
+
page_token,
|
|
29870
|
+
// @ts-ignore
|
|
29871
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
29872
|
+
yield yield __await(rest);
|
|
29873
|
+
hasMore = Boolean(has_more);
|
|
29874
|
+
pageToken = page_token || next_page_token;
|
|
29875
|
+
}
|
|
29876
|
+
catch (e) {
|
|
29877
|
+
yield yield __await(null);
|
|
29878
|
+
break;
|
|
29879
|
+
}
|
|
29880
|
+
}
|
|
29881
|
+
});
|
|
29882
|
+
},
|
|
29883
|
+
};
|
|
29884
|
+
return Iterable;
|
|
29885
|
+
}),
|
|
29886
|
+
/**
|
|
29887
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=search&version=v2 click to debug }
|
|
29105
29888
|
*
|
|
29106
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=
|
|
29889
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=employee&version=v2 document }
|
|
29107
29890
|
*
|
|
29108
|
-
*
|
|
29891
|
+
* 根据 email、工号、个人电话等条件查询员工雇佣信息以及个人基础信息
|
|
29109
29892
|
*/
|
|
29110
29893
|
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29111
29894
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29112
29895
|
return this.httpInstance
|
|
29113
29896
|
.request({
|
|
29114
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
29115
|
-
method: "POST",
|
|
29116
|
-
data,
|
|
29117
|
-
params,
|
|
29118
|
-
headers,
|
|
29119
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29120
|
-
})
|
|
29121
|
-
.catch((e) => {
|
|
29122
|
-
this.logger.error(formatErrors(e));
|
|
29123
|
-
throw e;
|
|
29124
|
-
});
|
|
29125
|
-
}),
|
|
29126
|
-
/**
|
|
29127
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=tree&version=v2 click to debug }
|
|
29128
|
-
*
|
|
29129
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tree&project=corehr&resource=department&version=v2 document }
|
|
29130
|
-
*/
|
|
29131
|
-
tree: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29132
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29133
|
-
return this.httpInstance
|
|
29134
|
-
.request({
|
|
29135
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/tree`, path),
|
|
29897
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/search`, path),
|
|
29136
29898
|
method: "POST",
|
|
29137
29899
|
data,
|
|
29138
29900
|
params,
|
|
@@ -29146,59 +29908,15 @@ class Client$I extends Client$J {
|
|
|
29146
29908
|
}),
|
|
29147
29909
|
},
|
|
29148
29910
|
/**
|
|
29149
|
-
*
|
|
29911
|
+
* employees.additional_job
|
|
29150
29912
|
*/
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=batch_get&version=v2 click to debug }
|
|
29154
|
-
*
|
|
29155
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employee&version=v2 document }
|
|
29156
|
-
*
|
|
29157
|
-
* 通过员工 ID 批量获取员工信息
|
|
29158
|
-
*/
|
|
29159
|
-
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29160
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29161
|
-
return this.httpInstance
|
|
29162
|
-
.request({
|
|
29163
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/batch_get`, path),
|
|
29164
|
-
method: "POST",
|
|
29165
|
-
data,
|
|
29166
|
-
params,
|
|
29167
|
-
headers,
|
|
29168
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29169
|
-
})
|
|
29170
|
-
.catch((e) => {
|
|
29171
|
-
this.logger.error(formatErrors(e));
|
|
29172
|
-
throw e;
|
|
29173
|
-
});
|
|
29174
|
-
}),
|
|
29175
|
-
/**
|
|
29176
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee&apiName=create&version=v2 click to debug }
|
|
29177
|
-
*
|
|
29178
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employee&version=v2 document }
|
|
29179
|
-
*/
|
|
29180
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29181
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29182
|
-
return this.httpInstance
|
|
29183
|
-
.request({
|
|
29184
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees`, path),
|
|
29185
|
-
method: "POST",
|
|
29186
|
-
data,
|
|
29187
|
-
params,
|
|
29188
|
-
headers,
|
|
29189
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29190
|
-
})
|
|
29191
|
-
.catch((e) => {
|
|
29192
|
-
this.logger.error(formatErrors(e));
|
|
29193
|
-
throw e;
|
|
29194
|
-
});
|
|
29195
|
-
}),
|
|
29196
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29913
|
+
employeesAdditionalJob: {
|
|
29914
|
+
batchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29197
29915
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29198
29916
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29199
29917
|
const res = yield this.httpInstance
|
|
29200
29918
|
.request({
|
|
29201
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/
|
|
29919
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
|
|
29202
29920
|
method: "POST",
|
|
29203
29921
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
29204
29922
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -29246,17 +29964,40 @@ class Client$I extends Client$J {
|
|
|
29246
29964
|
return Iterable;
|
|
29247
29965
|
}),
|
|
29248
29966
|
/**
|
|
29249
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
29967
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=batch&version=v2 click to debug }
|
|
29250
29968
|
*
|
|
29251
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
29969
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
29252
29970
|
*
|
|
29253
|
-
*
|
|
29971
|
+
* 批量查询兼职信息
|
|
29254
29972
|
*/
|
|
29255
|
-
|
|
29973
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29256
29974
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29257
29975
|
return this.httpInstance
|
|
29258
29976
|
.request({
|
|
29259
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/
|
|
29977
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
|
|
29978
|
+
method: "POST",
|
|
29979
|
+
data,
|
|
29980
|
+
params,
|
|
29981
|
+
headers,
|
|
29982
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29983
|
+
})
|
|
29984
|
+
.catch((e) => {
|
|
29985
|
+
this.logger.error(formatErrors(e));
|
|
29986
|
+
throw e;
|
|
29987
|
+
});
|
|
29988
|
+
}),
|
|
29989
|
+
/**
|
|
29990
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=create&version=v2 click to debug }
|
|
29991
|
+
*
|
|
29992
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
29993
|
+
*
|
|
29994
|
+
* 创建兼职
|
|
29995
|
+
*/
|
|
29996
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29997
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29998
|
+
return this.httpInstance
|
|
29999
|
+
.request({
|
|
30000
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`, path),
|
|
29260
30001
|
method: "POST",
|
|
29261
30002
|
data,
|
|
29262
30003
|
params,
|
|
@@ -29268,6 +30009,52 @@ class Client$I extends Client$J {
|
|
|
29268
30009
|
throw e;
|
|
29269
30010
|
});
|
|
29270
30011
|
}),
|
|
30012
|
+
/**
|
|
30013
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=delete&version=v2 click to debug }
|
|
30014
|
+
*
|
|
30015
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
30016
|
+
*
|
|
30017
|
+
* 删除兼职
|
|
30018
|
+
*/
|
|
30019
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30020
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30021
|
+
return this.httpInstance
|
|
30022
|
+
.request({
|
|
30023
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
|
|
30024
|
+
method: "DELETE",
|
|
30025
|
+
data,
|
|
30026
|
+
params,
|
|
30027
|
+
headers,
|
|
30028
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30029
|
+
})
|
|
30030
|
+
.catch((e) => {
|
|
30031
|
+
this.logger.error(formatErrors(e));
|
|
30032
|
+
throw e;
|
|
30033
|
+
});
|
|
30034
|
+
}),
|
|
30035
|
+
/**
|
|
30036
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=patch&version=v2 click to debug }
|
|
30037
|
+
*
|
|
30038
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
30039
|
+
*
|
|
30040
|
+
* 更新兼职
|
|
30041
|
+
*/
|
|
30042
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30043
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30044
|
+
return this.httpInstance
|
|
30045
|
+
.request({
|
|
30046
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
|
|
30047
|
+
method: "PATCH",
|
|
30048
|
+
data,
|
|
30049
|
+
params,
|
|
30050
|
+
headers,
|
|
30051
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30052
|
+
})
|
|
30053
|
+
.catch((e) => {
|
|
30054
|
+
this.logger.error(formatErrors(e));
|
|
30055
|
+
throw e;
|
|
30056
|
+
});
|
|
30057
|
+
}),
|
|
29271
30058
|
},
|
|
29272
30059
|
/**
|
|
29273
30060
|
* employees.bp
|
|
@@ -29630,6 +30417,29 @@ class Client$I extends Client$J {
|
|
|
29630
30417
|
* location
|
|
29631
30418
|
*/
|
|
29632
30419
|
location: {
|
|
30420
|
+
/**
|
|
30421
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=active&version=v2 click to debug }
|
|
30422
|
+
*
|
|
30423
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=location&version=v2 document }
|
|
30424
|
+
*
|
|
30425
|
+
* 启停/停用地点
|
|
30426
|
+
*/
|
|
30427
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30428
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30429
|
+
return this.httpInstance
|
|
30430
|
+
.request({
|
|
30431
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/active`, path),
|
|
30432
|
+
method: "POST",
|
|
30433
|
+
data,
|
|
30434
|
+
params,
|
|
30435
|
+
headers,
|
|
30436
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30437
|
+
})
|
|
30438
|
+
.catch((e) => {
|
|
30439
|
+
this.logger.error(formatErrors(e));
|
|
30440
|
+
throw e;
|
|
30441
|
+
});
|
|
30442
|
+
}),
|
|
29633
30443
|
/**
|
|
29634
30444
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
|
|
29635
30445
|
*
|
|
@@ -29653,6 +30463,129 @@ class Client$I extends Client$J {
|
|
|
29653
30463
|
throw e;
|
|
29654
30464
|
});
|
|
29655
30465
|
}),
|
|
30466
|
+
/**
|
|
30467
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=patch&version=v2 click to debug }
|
|
30468
|
+
*
|
|
30469
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location&version=v2 document }
|
|
30470
|
+
*
|
|
30471
|
+
* 更新地点
|
|
30472
|
+
*/
|
|
30473
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30474
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30475
|
+
return this.httpInstance
|
|
30476
|
+
.request({
|
|
30477
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id`, path),
|
|
30478
|
+
method: "PATCH",
|
|
30479
|
+
data,
|
|
30480
|
+
params,
|
|
30481
|
+
headers,
|
|
30482
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30483
|
+
})
|
|
30484
|
+
.catch((e) => {
|
|
30485
|
+
this.logger.error(formatErrors(e));
|
|
30486
|
+
throw e;
|
|
30487
|
+
});
|
|
30488
|
+
}),
|
|
30489
|
+
},
|
|
30490
|
+
/**
|
|
30491
|
+
* location.address
|
|
30492
|
+
*/
|
|
30493
|
+
locationAddress: {
|
|
30494
|
+
/**
|
|
30495
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=create&version=v2 click to debug }
|
|
30496
|
+
*
|
|
30497
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=location.address&version=v2 document }
|
|
30498
|
+
*
|
|
30499
|
+
* 添加地点地址
|
|
30500
|
+
*/
|
|
30501
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30502
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30503
|
+
return this.httpInstance
|
|
30504
|
+
.request({
|
|
30505
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`, path),
|
|
30506
|
+
method: "POST",
|
|
30507
|
+
data,
|
|
30508
|
+
params,
|
|
30509
|
+
headers,
|
|
30510
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30511
|
+
})
|
|
30512
|
+
.catch((e) => {
|
|
30513
|
+
this.logger.error(formatErrors(e));
|
|
30514
|
+
throw e;
|
|
30515
|
+
});
|
|
30516
|
+
}),
|
|
30517
|
+
/**
|
|
30518
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=delete&version=v2 click to debug }
|
|
30519
|
+
*
|
|
30520
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=location.address&version=v2 document }
|
|
30521
|
+
*
|
|
30522
|
+
* 删除地点地址
|
|
30523
|
+
*/
|
|
30524
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30525
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30526
|
+
return this.httpInstance
|
|
30527
|
+
.request({
|
|
30528
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30529
|
+
method: "DELETE",
|
|
30530
|
+
data,
|
|
30531
|
+
params,
|
|
30532
|
+
headers,
|
|
30533
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30534
|
+
})
|
|
30535
|
+
.catch((e) => {
|
|
30536
|
+
this.logger.error(formatErrors(e));
|
|
30537
|
+
throw e;
|
|
30538
|
+
});
|
|
30539
|
+
}),
|
|
30540
|
+
/**
|
|
30541
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=patch&version=v2 click to debug }
|
|
30542
|
+
*
|
|
30543
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location.address&version=v2 document }
|
|
30544
|
+
*
|
|
30545
|
+
* 更新地点地址
|
|
30546
|
+
*/
|
|
30547
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30548
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30549
|
+
return this.httpInstance
|
|
30550
|
+
.request({
|
|
30551
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30552
|
+
method: "PATCH",
|
|
30553
|
+
data,
|
|
30554
|
+
params,
|
|
30555
|
+
headers,
|
|
30556
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30557
|
+
})
|
|
30558
|
+
.catch((e) => {
|
|
30559
|
+
this.logger.error(formatErrors(e));
|
|
30560
|
+
throw e;
|
|
30561
|
+
});
|
|
30562
|
+
}),
|
|
30563
|
+
},
|
|
30564
|
+
/**
|
|
30565
|
+
* offboarding
|
|
30566
|
+
*/
|
|
30567
|
+
offboarding: {
|
|
30568
|
+
/**
|
|
30569
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit_v2&version=v2 click to debug }
|
|
30570
|
+
*
|
|
30571
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=submit_v2&project=corehr&resource=offboarding&version=v2 document }
|
|
30572
|
+
*/
|
|
30573
|
+
submitV2: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30574
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30575
|
+
return this.httpInstance
|
|
30576
|
+
.request({
|
|
30577
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`, path),
|
|
30578
|
+
method: "POST",
|
|
30579
|
+
data,
|
|
30580
|
+
params,
|
|
30581
|
+
headers,
|
|
30582
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30583
|
+
})
|
|
30584
|
+
.catch((e) => {
|
|
30585
|
+
this.logger.error(formatErrors(e));
|
|
30586
|
+
throw e;
|
|
30587
|
+
});
|
|
30588
|
+
}),
|
|
29656
30589
|
},
|
|
29657
30590
|
/**
|
|
29658
30591
|
* person
|
|
@@ -30335,6 +31268,84 @@ class Client$I extends Client$J {
|
|
|
30335
31268
|
});
|
|
30336
31269
|
}),
|
|
30337
31270
|
},
|
|
31271
|
+
/**
|
|
31272
|
+
* workforce_plan
|
|
31273
|
+
*/
|
|
31274
|
+
workforcePlan: {
|
|
31275
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31276
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31277
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
31278
|
+
const res = yield this.httpInstance
|
|
31279
|
+
.request({
|
|
31280
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
31281
|
+
method: "GET",
|
|
31282
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
31283
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
31284
|
+
data,
|
|
31285
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
31286
|
+
arrayFormat: "repeat",
|
|
31287
|
+
}),
|
|
31288
|
+
})
|
|
31289
|
+
.catch((e) => {
|
|
31290
|
+
this.logger.error(formatErrors(e));
|
|
31291
|
+
});
|
|
31292
|
+
return res;
|
|
31293
|
+
});
|
|
31294
|
+
const Iterable = {
|
|
31295
|
+
[Symbol.asyncIterator]() {
|
|
31296
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
31297
|
+
let hasMore = true;
|
|
31298
|
+
let pageToken;
|
|
31299
|
+
while (hasMore) {
|
|
31300
|
+
try {
|
|
31301
|
+
const res = yield __await(sendRequest({
|
|
31302
|
+
headers,
|
|
31303
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
31304
|
+
data,
|
|
31305
|
+
}));
|
|
31306
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
31307
|
+
// @ts-ignore
|
|
31308
|
+
has_more,
|
|
31309
|
+
// @ts-ignore
|
|
31310
|
+
page_token,
|
|
31311
|
+
// @ts-ignore
|
|
31312
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
31313
|
+
yield yield __await(rest);
|
|
31314
|
+
hasMore = Boolean(has_more);
|
|
31315
|
+
pageToken = page_token || next_page_token;
|
|
31316
|
+
}
|
|
31317
|
+
catch (e) {
|
|
31318
|
+
yield yield __await(null);
|
|
31319
|
+
break;
|
|
31320
|
+
}
|
|
31321
|
+
}
|
|
31322
|
+
});
|
|
31323
|
+
},
|
|
31324
|
+
};
|
|
31325
|
+
return Iterable;
|
|
31326
|
+
}),
|
|
31327
|
+
/**
|
|
31328
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan&apiName=list&version=v2 click to debug }
|
|
31329
|
+
*
|
|
31330
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=workforce_plan&version=v2 document }
|
|
31331
|
+
*/
|
|
31332
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31333
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31334
|
+
return this.httpInstance
|
|
31335
|
+
.request({
|
|
31336
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
31337
|
+
method: "GET",
|
|
31338
|
+
data,
|
|
31339
|
+
params,
|
|
31340
|
+
headers,
|
|
31341
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31342
|
+
})
|
|
31343
|
+
.catch((e) => {
|
|
31344
|
+
this.logger.error(formatErrors(e));
|
|
31345
|
+
throw e;
|
|
31346
|
+
});
|
|
31347
|
+
}),
|
|
31348
|
+
},
|
|
30338
31349
|
/**
|
|
30339
31350
|
* workforce_plan_detail
|
|
30340
31351
|
*/
|
|
@@ -32183,7 +33194,7 @@ class Client$E extends Client$F {
|
|
|
32183
33194
|
}),
|
|
32184
33195
|
},
|
|
32185
33196
|
/**
|
|
32186
|
-
*
|
|
33197
|
+
* 文件
|
|
32187
33198
|
*/
|
|
32188
33199
|
file: {
|
|
32189
33200
|
/**
|
|
@@ -33056,7 +34067,7 @@ class Client$E extends Client$F {
|
|
|
33056
34067
|
}),
|
|
33057
34068
|
},
|
|
33058
34069
|
/**
|
|
33059
|
-
*
|
|
34070
|
+
* 素材
|
|
33060
34071
|
*/
|
|
33061
34072
|
media: {
|
|
33062
34073
|
/**
|
|
@@ -34003,7 +35014,7 @@ class Client$E extends Client$F {
|
|
|
34003
35014
|
}),
|
|
34004
35015
|
},
|
|
34005
35016
|
/**
|
|
34006
|
-
*
|
|
35017
|
+
* 文件
|
|
34007
35018
|
*/
|
|
34008
35019
|
file: {
|
|
34009
35020
|
/**
|
|
@@ -34882,7 +35893,7 @@ class Client$E extends Client$F {
|
|
|
34882
35893
|
}),
|
|
34883
35894
|
},
|
|
34884
35895
|
/**
|
|
34885
|
-
*
|
|
35896
|
+
* 素材
|
|
34886
35897
|
*/
|
|
34887
35898
|
media: {
|
|
34888
35899
|
/**
|
|
@@ -39439,7 +40450,7 @@ class Client$u extends Client$v {
|
|
|
39439
40450
|
}),
|
|
39440
40451
|
},
|
|
39441
40452
|
/**
|
|
39442
|
-
*
|
|
40453
|
+
* 入职
|
|
39443
40454
|
*/
|
|
39444
40455
|
application: {
|
|
39445
40456
|
/**
|
|
@@ -43398,6 +44409,27 @@ class Client$u extends Client$v {
|
|
|
43398
44409
|
throw e;
|
|
43399
44410
|
});
|
|
43400
44411
|
}),
|
|
44412
|
+
/**
|
|
44413
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
44414
|
+
*
|
|
44415
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
44416
|
+
*/
|
|
44417
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44418
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44419
|
+
return this.httpInstance
|
|
44420
|
+
.request({
|
|
44421
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
44422
|
+
method: "POST",
|
|
44423
|
+
data,
|
|
44424
|
+
params,
|
|
44425
|
+
headers,
|
|
44426
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44427
|
+
})
|
|
44428
|
+
.catch((e) => {
|
|
44429
|
+
this.logger.error(formatErrors(e));
|
|
44430
|
+
throw e;
|
|
44431
|
+
});
|
|
44432
|
+
}),
|
|
43401
44433
|
},
|
|
43402
44434
|
/**
|
|
43403
44435
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -43691,6 +44723,82 @@ class Client$u extends Client$v {
|
|
|
43691
44723
|
});
|
|
43692
44724
|
}),
|
|
43693
44725
|
},
|
|
44726
|
+
/**
|
|
44727
|
+
* talent_tag
|
|
44728
|
+
*/
|
|
44729
|
+
talentTag: {
|
|
44730
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44731
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44732
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
44733
|
+
const res = yield this.httpInstance
|
|
44734
|
+
.request({
|
|
44735
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44736
|
+
method: "GET",
|
|
44737
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
44738
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
44739
|
+
data,
|
|
44740
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44741
|
+
})
|
|
44742
|
+
.catch((e) => {
|
|
44743
|
+
this.logger.error(formatErrors(e));
|
|
44744
|
+
});
|
|
44745
|
+
return res;
|
|
44746
|
+
});
|
|
44747
|
+
const Iterable = {
|
|
44748
|
+
[Symbol.asyncIterator]() {
|
|
44749
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
44750
|
+
let hasMore = true;
|
|
44751
|
+
let pageToken;
|
|
44752
|
+
while (hasMore) {
|
|
44753
|
+
try {
|
|
44754
|
+
const res = yield __await(sendRequest({
|
|
44755
|
+
headers,
|
|
44756
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
44757
|
+
data,
|
|
44758
|
+
}));
|
|
44759
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
44760
|
+
// @ts-ignore
|
|
44761
|
+
has_more,
|
|
44762
|
+
// @ts-ignore
|
|
44763
|
+
page_token,
|
|
44764
|
+
// @ts-ignore
|
|
44765
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
44766
|
+
yield yield __await(rest);
|
|
44767
|
+
hasMore = Boolean(has_more);
|
|
44768
|
+
pageToken = page_token || next_page_token;
|
|
44769
|
+
}
|
|
44770
|
+
catch (e) {
|
|
44771
|
+
yield yield __await(null);
|
|
44772
|
+
break;
|
|
44773
|
+
}
|
|
44774
|
+
}
|
|
44775
|
+
});
|
|
44776
|
+
},
|
|
44777
|
+
};
|
|
44778
|
+
return Iterable;
|
|
44779
|
+
}),
|
|
44780
|
+
/**
|
|
44781
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
44782
|
+
*
|
|
44783
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
44784
|
+
*/
|
|
44785
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44786
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44787
|
+
return this.httpInstance
|
|
44788
|
+
.request({
|
|
44789
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44790
|
+
method: "GET",
|
|
44791
|
+
data,
|
|
44792
|
+
params,
|
|
44793
|
+
headers,
|
|
44794
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44795
|
+
})
|
|
44796
|
+
.catch((e) => {
|
|
44797
|
+
this.logger.error(formatErrors(e));
|
|
44798
|
+
throw e;
|
|
44799
|
+
});
|
|
44800
|
+
}),
|
|
44801
|
+
},
|
|
43694
44802
|
/**
|
|
43695
44803
|
* termination_reason
|
|
43696
44804
|
*/
|
|
@@ -44765,7 +45873,7 @@ class Client$u extends Client$v {
|
|
|
44765
45873
|
}),
|
|
44766
45874
|
},
|
|
44767
45875
|
/**
|
|
44768
|
-
*
|
|
45876
|
+
* 入职
|
|
44769
45877
|
*/
|
|
44770
45878
|
application: {
|
|
44771
45879
|
/**
|
|
@@ -48756,6 +49864,27 @@ class Client$u extends Client$v {
|
|
|
48756
49864
|
throw e;
|
|
48757
49865
|
});
|
|
48758
49866
|
}),
|
|
49867
|
+
/**
|
|
49868
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
49869
|
+
*
|
|
49870
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
49871
|
+
*/
|
|
49872
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49873
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49874
|
+
return this.httpInstance
|
|
49875
|
+
.request({
|
|
49876
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
49877
|
+
method: "POST",
|
|
49878
|
+
data,
|
|
49879
|
+
params,
|
|
49880
|
+
headers,
|
|
49881
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
49882
|
+
})
|
|
49883
|
+
.catch((e) => {
|
|
49884
|
+
this.logger.error(formatErrors(e));
|
|
49885
|
+
throw e;
|
|
49886
|
+
});
|
|
49887
|
+
}),
|
|
48759
49888
|
},
|
|
48760
49889
|
/**
|
|
48761
49890
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -49053,6 +50182,84 @@ class Client$u extends Client$v {
|
|
|
49053
50182
|
});
|
|
49054
50183
|
}),
|
|
49055
50184
|
},
|
|
50185
|
+
/**
|
|
50186
|
+
* talent_tag
|
|
50187
|
+
*/
|
|
50188
|
+
talentTag: {
|
|
50189
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50190
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50191
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
50192
|
+
const res = yield this.httpInstance
|
|
50193
|
+
.request({
|
|
50194
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
50195
|
+
method: "GET",
|
|
50196
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
50197
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
50198
|
+
data,
|
|
50199
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
50200
|
+
arrayFormat: "repeat",
|
|
50201
|
+
}),
|
|
50202
|
+
})
|
|
50203
|
+
.catch((e) => {
|
|
50204
|
+
this.logger.error(formatErrors(e));
|
|
50205
|
+
});
|
|
50206
|
+
return res;
|
|
50207
|
+
});
|
|
50208
|
+
const Iterable = {
|
|
50209
|
+
[Symbol.asyncIterator]() {
|
|
50210
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
50211
|
+
let hasMore = true;
|
|
50212
|
+
let pageToken;
|
|
50213
|
+
while (hasMore) {
|
|
50214
|
+
try {
|
|
50215
|
+
const res = yield __await(sendRequest({
|
|
50216
|
+
headers,
|
|
50217
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
50218
|
+
data,
|
|
50219
|
+
}));
|
|
50220
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
50221
|
+
// @ts-ignore
|
|
50222
|
+
has_more,
|
|
50223
|
+
// @ts-ignore
|
|
50224
|
+
page_token,
|
|
50225
|
+
// @ts-ignore
|
|
50226
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
50227
|
+
yield yield __await(rest);
|
|
50228
|
+
hasMore = Boolean(has_more);
|
|
50229
|
+
pageToken = page_token || next_page_token;
|
|
50230
|
+
}
|
|
50231
|
+
catch (e) {
|
|
50232
|
+
yield yield __await(null);
|
|
50233
|
+
break;
|
|
50234
|
+
}
|
|
50235
|
+
}
|
|
50236
|
+
});
|
|
50237
|
+
},
|
|
50238
|
+
};
|
|
50239
|
+
return Iterable;
|
|
50240
|
+
}),
|
|
50241
|
+
/**
|
|
50242
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
50243
|
+
*
|
|
50244
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
50245
|
+
*/
|
|
50246
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50247
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50248
|
+
return this.httpInstance
|
|
50249
|
+
.request({
|
|
50250
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
50251
|
+
method: "GET",
|
|
50252
|
+
data,
|
|
50253
|
+
params,
|
|
50254
|
+
headers,
|
|
50255
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
50256
|
+
})
|
|
50257
|
+
.catch((e) => {
|
|
50258
|
+
this.logger.error(formatErrors(e));
|
|
50259
|
+
throw e;
|
|
50260
|
+
});
|
|
50261
|
+
}),
|
|
50262
|
+
},
|
|
49056
50263
|
/**
|
|
49057
50264
|
* termination_reason
|
|
49058
50265
|
*/
|
|
@@ -51417,7 +52624,7 @@ class Client$s extends Client$t {
|
|
|
51417
52624
|
}),
|
|
51418
52625
|
},
|
|
51419
52626
|
/**
|
|
51420
|
-
*
|
|
52627
|
+
* 消息加急
|
|
51421
52628
|
*/
|
|
51422
52629
|
message: {
|
|
51423
52630
|
/**
|
|
@@ -53620,7 +54827,7 @@ class Client$s extends Client$t {
|
|
|
53620
54827
|
}),
|
|
53621
54828
|
},
|
|
53622
54829
|
/**
|
|
53623
|
-
*
|
|
54830
|
+
* 消息加急
|
|
53624
54831
|
*/
|
|
53625
54832
|
message: {
|
|
53626
54833
|
/**
|
|
@@ -59396,6 +60603,27 @@ class Client$k extends Client$l {
|
|
|
59396
60603
|
* 登录态
|
|
59397
60604
|
*/
|
|
59398
60605
|
session: {
|
|
60606
|
+
/**
|
|
60607
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60608
|
+
*
|
|
60609
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60610
|
+
*/
|
|
60611
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60612
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60613
|
+
return this.httpInstance
|
|
60614
|
+
.request({
|
|
60615
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60616
|
+
method: "POST",
|
|
60617
|
+
data,
|
|
60618
|
+
params,
|
|
60619
|
+
headers,
|
|
60620
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
60621
|
+
})
|
|
60622
|
+
.catch((e) => {
|
|
60623
|
+
this.logger.error(formatErrors(e));
|
|
60624
|
+
throw e;
|
|
60625
|
+
});
|
|
60626
|
+
}),
|
|
59399
60627
|
/**
|
|
59400
60628
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
59401
60629
|
*
|
|
@@ -59427,6 +60655,27 @@ class Client$k extends Client$l {
|
|
|
59427
60655
|
* 登录态
|
|
59428
60656
|
*/
|
|
59429
60657
|
session: {
|
|
60658
|
+
/**
|
|
60659
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60660
|
+
*
|
|
60661
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60662
|
+
*/
|
|
60663
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60664
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60665
|
+
return this.httpInstance
|
|
60666
|
+
.request({
|
|
60667
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60668
|
+
method: "POST",
|
|
60669
|
+
data,
|
|
60670
|
+
params,
|
|
60671
|
+
headers,
|
|
60672
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
60673
|
+
})
|
|
60674
|
+
.catch((e) => {
|
|
60675
|
+
this.logger.error(formatErrors(e));
|
|
60676
|
+
throw e;
|
|
60677
|
+
});
|
|
60678
|
+
}),
|
|
59430
60679
|
/**
|
|
59431
60680
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
59432
60681
|
*
|
|
@@ -61509,7 +62758,7 @@ class Client$c extends Client$d {
|
|
|
61509
62758
|
}),
|
|
61510
62759
|
},
|
|
61511
62760
|
/**
|
|
61512
|
-
*
|
|
62761
|
+
* 工作表
|
|
61513
62762
|
*/
|
|
61514
62763
|
spreadsheetSheet: {
|
|
61515
62764
|
/**
|
|
@@ -62239,7 +63488,7 @@ class Client$c extends Client$d {
|
|
|
62239
63488
|
}),
|
|
62240
63489
|
},
|
|
62241
63490
|
/**
|
|
62242
|
-
*
|
|
63491
|
+
* 工作表
|
|
62243
63492
|
*/
|
|
62244
63493
|
spreadsheetSheet: {
|
|
62245
63494
|
/**
|