@larksuiteoapi/node-sdk 1.38.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +936 -14
- package/lib/index.js +936 -14
- package/package.json +1 -1
- package/types/index.d.ts +1164 -55
package/lib/index.js
CHANGED
|
@@ -1322,7 +1322,7 @@ class Client$_ extends Client$$ {
|
|
|
1322
1322
|
constructor() {
|
|
1323
1323
|
super(...arguments);
|
|
1324
1324
|
/**
|
|
1325
|
-
*
|
|
1325
|
+
* 管理后台-行为审计
|
|
1326
1326
|
*/
|
|
1327
1327
|
this.admin = {
|
|
1328
1328
|
/**
|
|
@@ -2794,6 +2794,320 @@ class Client$Z extends Client$_ {
|
|
|
2794
2794
|
});
|
|
2795
2795
|
}),
|
|
2796
2796
|
},
|
|
2797
|
+
/**
|
|
2798
|
+
* app.data_asset
|
|
2799
|
+
*/
|
|
2800
|
+
appDataAsset: {
|
|
2801
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2802
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2803
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2804
|
+
const res = yield this.httpInstance
|
|
2805
|
+
.request({
|
|
2806
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path),
|
|
2807
|
+
method: "GET",
|
|
2808
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
2809
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
2810
|
+
data,
|
|
2811
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
2812
|
+
arrayFormat: "repeat",
|
|
2813
|
+
}),
|
|
2814
|
+
})
|
|
2815
|
+
.catch((e) => {
|
|
2816
|
+
this.logger.error(formatErrors(e));
|
|
2817
|
+
});
|
|
2818
|
+
return res;
|
|
2819
|
+
});
|
|
2820
|
+
const Iterable = {
|
|
2821
|
+
[Symbol.asyncIterator]() {
|
|
2822
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
2823
|
+
let hasMore = true;
|
|
2824
|
+
let pageToken;
|
|
2825
|
+
while (hasMore) {
|
|
2826
|
+
try {
|
|
2827
|
+
const res = yield __await(sendRequest({
|
|
2828
|
+
headers,
|
|
2829
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
2830
|
+
data,
|
|
2831
|
+
}));
|
|
2832
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
2833
|
+
// @ts-ignore
|
|
2834
|
+
has_more,
|
|
2835
|
+
// @ts-ignore
|
|
2836
|
+
page_token,
|
|
2837
|
+
// @ts-ignore
|
|
2838
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
2839
|
+
yield yield __await(rest);
|
|
2840
|
+
hasMore = Boolean(has_more);
|
|
2841
|
+
pageToken = page_token || next_page_token;
|
|
2842
|
+
}
|
|
2843
|
+
catch (e) {
|
|
2844
|
+
yield yield __await(null);
|
|
2845
|
+
break;
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
});
|
|
2849
|
+
},
|
|
2850
|
+
};
|
|
2851
|
+
return Iterable;
|
|
2852
|
+
}),
|
|
2853
|
+
/**
|
|
2854
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset&apiName=list&version=v1 click to debug }
|
|
2855
|
+
*
|
|
2856
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset&version=v1 document }
|
|
2857
|
+
*
|
|
2858
|
+
* 获取数据与知识列表
|
|
2859
|
+
*/
|
|
2860
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2861
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2862
|
+
return this.httpInstance
|
|
2863
|
+
.request({
|
|
2864
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_assets`, path),
|
|
2865
|
+
method: "GET",
|
|
2866
|
+
data,
|
|
2867
|
+
params,
|
|
2868
|
+
headers,
|
|
2869
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
2870
|
+
})
|
|
2871
|
+
.catch((e) => {
|
|
2872
|
+
this.logger.error(formatErrors(e));
|
|
2873
|
+
throw e;
|
|
2874
|
+
});
|
|
2875
|
+
}),
|
|
2876
|
+
},
|
|
2877
|
+
/**
|
|
2878
|
+
* app.data_asset_tag
|
|
2879
|
+
*/
|
|
2880
|
+
appDataAssetTag: {
|
|
2881
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2882
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2883
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
2884
|
+
const res = yield this.httpInstance
|
|
2885
|
+
.request({
|
|
2886
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path),
|
|
2887
|
+
method: "GET",
|
|
2888
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
2889
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
2890
|
+
data,
|
|
2891
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
2892
|
+
arrayFormat: "repeat",
|
|
2893
|
+
}),
|
|
2894
|
+
})
|
|
2895
|
+
.catch((e) => {
|
|
2896
|
+
this.logger.error(formatErrors(e));
|
|
2897
|
+
});
|
|
2898
|
+
return res;
|
|
2899
|
+
});
|
|
2900
|
+
const Iterable = {
|
|
2901
|
+
[Symbol.asyncIterator]() {
|
|
2902
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
2903
|
+
let hasMore = true;
|
|
2904
|
+
let pageToken;
|
|
2905
|
+
while (hasMore) {
|
|
2906
|
+
try {
|
|
2907
|
+
const res = yield __await(sendRequest({
|
|
2908
|
+
headers,
|
|
2909
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
2910
|
+
data,
|
|
2911
|
+
}));
|
|
2912
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
2913
|
+
// @ts-ignore
|
|
2914
|
+
has_more,
|
|
2915
|
+
// @ts-ignore
|
|
2916
|
+
page_token,
|
|
2917
|
+
// @ts-ignore
|
|
2918
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
2919
|
+
yield yield __await(rest);
|
|
2920
|
+
hasMore = Boolean(has_more);
|
|
2921
|
+
pageToken = page_token || next_page_token;
|
|
2922
|
+
}
|
|
2923
|
+
catch (e) {
|
|
2924
|
+
yield yield __await(null);
|
|
2925
|
+
break;
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
},
|
|
2930
|
+
};
|
|
2931
|
+
return Iterable;
|
|
2932
|
+
}),
|
|
2933
|
+
/**
|
|
2934
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.data_asset_tag&apiName=list&version=v1 click to debug }
|
|
2935
|
+
*
|
|
2936
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.data_asset_tag&version=v1 document }
|
|
2937
|
+
*
|
|
2938
|
+
* 获取数据与知识分类列表
|
|
2939
|
+
*/
|
|
2940
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2941
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2942
|
+
return this.httpInstance
|
|
2943
|
+
.request({
|
|
2944
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/data_asset_tags`, path),
|
|
2945
|
+
method: "GET",
|
|
2946
|
+
data,
|
|
2947
|
+
params,
|
|
2948
|
+
headers,
|
|
2949
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
2950
|
+
})
|
|
2951
|
+
.catch((e) => {
|
|
2952
|
+
this.logger.error(formatErrors(e));
|
|
2953
|
+
throw e;
|
|
2954
|
+
});
|
|
2955
|
+
}),
|
|
2956
|
+
},
|
|
2957
|
+
/**
|
|
2958
|
+
* app.knowledge
|
|
2959
|
+
*/
|
|
2960
|
+
appKnowledge: {
|
|
2961
|
+
/**
|
|
2962
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.knowledge&apiName=ask&version=v1 click to debug }
|
|
2963
|
+
*
|
|
2964
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=ask&project=aily&resource=app.knowledge&version=v1 document }
|
|
2965
|
+
*
|
|
2966
|
+
* 执行一次数据知识问答
|
|
2967
|
+
*/
|
|
2968
|
+
ask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2969
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2970
|
+
return this.httpInstance
|
|
2971
|
+
.request({
|
|
2972
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/knowledges/ask`, path),
|
|
2973
|
+
method: "POST",
|
|
2974
|
+
data,
|
|
2975
|
+
params,
|
|
2976
|
+
headers,
|
|
2977
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
2978
|
+
})
|
|
2979
|
+
.catch((e) => {
|
|
2980
|
+
this.logger.error(formatErrors(e));
|
|
2981
|
+
throw e;
|
|
2982
|
+
});
|
|
2983
|
+
}),
|
|
2984
|
+
},
|
|
2985
|
+
/**
|
|
2986
|
+
* app.skill
|
|
2987
|
+
*/
|
|
2988
|
+
appSkill: {
|
|
2989
|
+
/**
|
|
2990
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=get&version=v1 click to debug }
|
|
2991
|
+
*
|
|
2992
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=app.skill&version=v1 document }
|
|
2993
|
+
*
|
|
2994
|
+
* 该 API 用于获取某个飞书智能伙伴应用的技能(Skill)的详细信息。
|
|
2995
|
+
*/
|
|
2996
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2997
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2998
|
+
return this.httpInstance
|
|
2999
|
+
.request({
|
|
3000
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id`, path),
|
|
3001
|
+
method: "GET",
|
|
3002
|
+
data,
|
|
3003
|
+
params,
|
|
3004
|
+
headers,
|
|
3005
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3006
|
+
})
|
|
3007
|
+
.catch((e) => {
|
|
3008
|
+
this.logger.error(formatErrors(e));
|
|
3009
|
+
throw e;
|
|
3010
|
+
});
|
|
3011
|
+
}),
|
|
3012
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3013
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3014
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3015
|
+
const res = yield this.httpInstance
|
|
3016
|
+
.request({
|
|
3017
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path),
|
|
3018
|
+
method: "GET",
|
|
3019
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
3020
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
3021
|
+
data,
|
|
3022
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
3023
|
+
arrayFormat: "repeat",
|
|
3024
|
+
}),
|
|
3025
|
+
})
|
|
3026
|
+
.catch((e) => {
|
|
3027
|
+
this.logger.error(formatErrors(e));
|
|
3028
|
+
});
|
|
3029
|
+
return res;
|
|
3030
|
+
});
|
|
3031
|
+
const Iterable = {
|
|
3032
|
+
[Symbol.asyncIterator]() {
|
|
3033
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3034
|
+
let hasMore = true;
|
|
3035
|
+
let pageToken;
|
|
3036
|
+
while (hasMore) {
|
|
3037
|
+
try {
|
|
3038
|
+
const res = yield __await(sendRequest({
|
|
3039
|
+
headers,
|
|
3040
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3041
|
+
data,
|
|
3042
|
+
}));
|
|
3043
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
3044
|
+
// @ts-ignore
|
|
3045
|
+
has_more,
|
|
3046
|
+
// @ts-ignore
|
|
3047
|
+
page_token,
|
|
3048
|
+
// @ts-ignore
|
|
3049
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3050
|
+
yield yield __await(rest);
|
|
3051
|
+
hasMore = Boolean(has_more);
|
|
3052
|
+
pageToken = page_token || next_page_token;
|
|
3053
|
+
}
|
|
3054
|
+
catch (e) {
|
|
3055
|
+
yield yield __await(null);
|
|
3056
|
+
break;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
});
|
|
3060
|
+
},
|
|
3061
|
+
};
|
|
3062
|
+
return Iterable;
|
|
3063
|
+
}),
|
|
3064
|
+
/**
|
|
3065
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=list&version=v1 click to debug }
|
|
3066
|
+
*
|
|
3067
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.skill&version=v1 document }
|
|
3068
|
+
*
|
|
3069
|
+
* 该 API 用于批量获取飞书智能伙伴应用的技能(Skill)的详细信息
|
|
3070
|
+
*/
|
|
3071
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3072
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3073
|
+
return this.httpInstance
|
|
3074
|
+
.request({
|
|
3075
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills`, path),
|
|
3076
|
+
method: "GET",
|
|
3077
|
+
data,
|
|
3078
|
+
params,
|
|
3079
|
+
headers,
|
|
3080
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3081
|
+
})
|
|
3082
|
+
.catch((e) => {
|
|
3083
|
+
this.logger.error(formatErrors(e));
|
|
3084
|
+
throw e;
|
|
3085
|
+
});
|
|
3086
|
+
}),
|
|
3087
|
+
/**
|
|
3088
|
+
* {@link https://open.feishu.cn/api-explorer?project=aily&resource=app.skill&apiName=start&version=v1 click to debug }
|
|
3089
|
+
*
|
|
3090
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=start&project=aily&resource=app.skill&version=v1 document }
|
|
3091
|
+
*
|
|
3092
|
+
* 该 API 用于执行飞书智能伙伴应用的技能(Skill)获取输出
|
|
3093
|
+
*/
|
|
3094
|
+
start: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3095
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3096
|
+
return this.httpInstance
|
|
3097
|
+
.request({
|
|
3098
|
+
url: fillApiPath(`${this.domain}/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start`, path),
|
|
3099
|
+
method: "POST",
|
|
3100
|
+
data,
|
|
3101
|
+
params,
|
|
3102
|
+
headers,
|
|
3103
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3104
|
+
})
|
|
3105
|
+
.catch((e) => {
|
|
3106
|
+
this.logger.error(formatErrors(e));
|
|
3107
|
+
throw e;
|
|
3108
|
+
});
|
|
3109
|
+
}),
|
|
3110
|
+
},
|
|
2797
3111
|
},
|
|
2798
3112
|
};
|
|
2799
3113
|
}
|
|
@@ -4230,7 +4544,7 @@ class Client$X extends Client$Y {
|
|
|
4230
4544
|
*/
|
|
4231
4545
|
this.approval = {
|
|
4232
4546
|
/**
|
|
4233
|
-
*
|
|
4547
|
+
* 事件
|
|
4234
4548
|
*/
|
|
4235
4549
|
approval: {
|
|
4236
4550
|
/**
|
|
@@ -4525,7 +4839,7 @@ class Client$X extends Client$Y {
|
|
|
4525
4839
|
}),
|
|
4526
4840
|
},
|
|
4527
4841
|
/**
|
|
4528
|
-
*
|
|
4842
|
+
* 原生审批实例
|
|
4529
4843
|
*/
|
|
4530
4844
|
instance: {
|
|
4531
4845
|
/**
|
|
@@ -5027,7 +5341,7 @@ class Client$X extends Client$Y {
|
|
|
5027
5341
|
}),
|
|
5028
5342
|
},
|
|
5029
5343
|
/**
|
|
5030
|
-
*
|
|
5344
|
+
* 审批查询
|
|
5031
5345
|
*/
|
|
5032
5346
|
task: {
|
|
5033
5347
|
/**
|
|
@@ -5233,7 +5547,7 @@ class Client$X extends Client$Y {
|
|
|
5233
5547
|
},
|
|
5234
5548
|
v4: {
|
|
5235
5549
|
/**
|
|
5236
|
-
*
|
|
5550
|
+
* 事件
|
|
5237
5551
|
*/
|
|
5238
5552
|
approval: {
|
|
5239
5553
|
/**
|
|
@@ -5530,7 +5844,7 @@ class Client$X extends Client$Y {
|
|
|
5530
5844
|
}),
|
|
5531
5845
|
},
|
|
5532
5846
|
/**
|
|
5533
|
-
*
|
|
5847
|
+
* 原生审批实例
|
|
5534
5848
|
*/
|
|
5535
5849
|
instance: {
|
|
5536
5850
|
/**
|
|
@@ -6038,7 +6352,7 @@ class Client$X extends Client$Y {
|
|
|
6038
6352
|
}),
|
|
6039
6353
|
},
|
|
6040
6354
|
/**
|
|
6041
|
-
*
|
|
6355
|
+
* 审批查询
|
|
6042
6356
|
*/
|
|
6043
6357
|
task: {
|
|
6044
6358
|
/**
|
|
@@ -16973,7 +17287,7 @@ class Client$L extends Client$M {
|
|
|
16973
17287
|
constructor() {
|
|
16974
17288
|
super(...arguments);
|
|
16975
17289
|
/**
|
|
16976
|
-
*
|
|
17290
|
+
* 搜索
|
|
16977
17291
|
*/
|
|
16978
17292
|
this.contact = {
|
|
16979
17293
|
/**
|
|
@@ -27679,6 +27993,84 @@ class Client$I extends Client$J {
|
|
|
27679
27993
|
},
|
|
27680
27994
|
},
|
|
27681
27995
|
v2: {
|
|
27996
|
+
/**
|
|
27997
|
+
* approver
|
|
27998
|
+
*/
|
|
27999
|
+
approver: {
|
|
28000
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28001
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28002
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28003
|
+
const res = yield this.httpInstance
|
|
28004
|
+
.request({
|
|
28005
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28006
|
+
method: "GET",
|
|
28007
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28008
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28009
|
+
data,
|
|
28010
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28011
|
+
arrayFormat: "repeat",
|
|
28012
|
+
}),
|
|
28013
|
+
})
|
|
28014
|
+
.catch((e) => {
|
|
28015
|
+
this.logger.error(formatErrors(e));
|
|
28016
|
+
});
|
|
28017
|
+
return res;
|
|
28018
|
+
});
|
|
28019
|
+
const Iterable = {
|
|
28020
|
+
[Symbol.asyncIterator]() {
|
|
28021
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28022
|
+
let hasMore = true;
|
|
28023
|
+
let pageToken;
|
|
28024
|
+
while (hasMore) {
|
|
28025
|
+
try {
|
|
28026
|
+
const res = yield __await(sendRequest({
|
|
28027
|
+
headers,
|
|
28028
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28029
|
+
data,
|
|
28030
|
+
}));
|
|
28031
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28032
|
+
// @ts-ignore
|
|
28033
|
+
has_more,
|
|
28034
|
+
// @ts-ignore
|
|
28035
|
+
page_token,
|
|
28036
|
+
// @ts-ignore
|
|
28037
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28038
|
+
yield yield __await(rest);
|
|
28039
|
+
hasMore = Boolean(has_more);
|
|
28040
|
+
pageToken = page_token || next_page_token;
|
|
28041
|
+
}
|
|
28042
|
+
catch (e) {
|
|
28043
|
+
yield yield __await(null);
|
|
28044
|
+
break;
|
|
28045
|
+
}
|
|
28046
|
+
}
|
|
28047
|
+
});
|
|
28048
|
+
},
|
|
28049
|
+
};
|
|
28050
|
+
return Iterable;
|
|
28051
|
+
}),
|
|
28052
|
+
/**
|
|
28053
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approver&apiName=list&version=v2 click to debug }
|
|
28054
|
+
*
|
|
28055
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=approver&version=v2 document }
|
|
28056
|
+
*/
|
|
28057
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28058
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28059
|
+
return this.httpInstance
|
|
28060
|
+
.request({
|
|
28061
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approvers`, path),
|
|
28062
|
+
method: "GET",
|
|
28063
|
+
data,
|
|
28064
|
+
params,
|
|
28065
|
+
headers,
|
|
28066
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28067
|
+
})
|
|
28068
|
+
.catch((e) => {
|
|
28069
|
+
this.logger.error(formatErrors(e));
|
|
28070
|
+
throw e;
|
|
28071
|
+
});
|
|
28072
|
+
}),
|
|
28073
|
+
},
|
|
27682
28074
|
/**
|
|
27683
28075
|
* basic_info.bank
|
|
27684
28076
|
*/
|
|
@@ -28564,6 +28956,27 @@ class Client$I extends Client$J {
|
|
|
28564
28956
|
* company
|
|
28565
28957
|
*/
|
|
28566
28958
|
company: {
|
|
28959
|
+
/**
|
|
28960
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=active&version=v2 click to debug }
|
|
28961
|
+
*
|
|
28962
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=company&version=v2 document }
|
|
28963
|
+
*/
|
|
28964
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28965
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28966
|
+
return this.httpInstance
|
|
28967
|
+
.request({
|
|
28968
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/active`, path),
|
|
28969
|
+
method: "POST",
|
|
28970
|
+
data,
|
|
28971
|
+
params,
|
|
28972
|
+
headers,
|
|
28973
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28974
|
+
})
|
|
28975
|
+
.catch((e) => {
|
|
28976
|
+
this.logger.error(formatErrors(e));
|
|
28977
|
+
throw e;
|
|
28978
|
+
});
|
|
28979
|
+
}),
|
|
28567
28980
|
/**
|
|
28568
28981
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
|
|
28569
28982
|
*
|
|
@@ -28587,6 +29000,79 @@ class Client$I extends Client$J {
|
|
|
28587
29000
|
throw e;
|
|
28588
29001
|
});
|
|
28589
29002
|
}),
|
|
29003
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29004
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29005
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29006
|
+
const res = yield this.httpInstance
|
|
29007
|
+
.request({
|
|
29008
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
29009
|
+
method: "GET",
|
|
29010
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
29011
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
29012
|
+
data,
|
|
29013
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
29014
|
+
arrayFormat: "repeat",
|
|
29015
|
+
}),
|
|
29016
|
+
})
|
|
29017
|
+
.catch((e) => {
|
|
29018
|
+
this.logger.error(formatErrors(e));
|
|
29019
|
+
});
|
|
29020
|
+
return res;
|
|
29021
|
+
});
|
|
29022
|
+
const Iterable = {
|
|
29023
|
+
[Symbol.asyncIterator]() {
|
|
29024
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
29025
|
+
let hasMore = true;
|
|
29026
|
+
let pageToken;
|
|
29027
|
+
while (hasMore) {
|
|
29028
|
+
try {
|
|
29029
|
+
const res = yield __await(sendRequest({
|
|
29030
|
+
headers,
|
|
29031
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
29032
|
+
data,
|
|
29033
|
+
}));
|
|
29034
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
29035
|
+
// @ts-ignore
|
|
29036
|
+
has_more,
|
|
29037
|
+
// @ts-ignore
|
|
29038
|
+
page_token,
|
|
29039
|
+
// @ts-ignore
|
|
29040
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
29041
|
+
yield yield __await(rest);
|
|
29042
|
+
hasMore = Boolean(has_more);
|
|
29043
|
+
pageToken = page_token || next_page_token;
|
|
29044
|
+
}
|
|
29045
|
+
catch (e) {
|
|
29046
|
+
yield yield __await(null);
|
|
29047
|
+
break;
|
|
29048
|
+
}
|
|
29049
|
+
}
|
|
29050
|
+
});
|
|
29051
|
+
},
|
|
29052
|
+
};
|
|
29053
|
+
return Iterable;
|
|
29054
|
+
}),
|
|
29055
|
+
/**
|
|
29056
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=query_recent_change&version=v2 click to debug }
|
|
29057
|
+
*
|
|
29058
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=company&version=v2 document }
|
|
29059
|
+
*/
|
|
29060
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29061
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29062
|
+
return this.httpInstance
|
|
29063
|
+
.request({
|
|
29064
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/query_recent_change`, path),
|
|
29065
|
+
method: "GET",
|
|
29066
|
+
data,
|
|
29067
|
+
params,
|
|
29068
|
+
headers,
|
|
29069
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29070
|
+
})
|
|
29071
|
+
.catch((e) => {
|
|
29072
|
+
this.logger.error(formatErrors(e));
|
|
29073
|
+
throw e;
|
|
29074
|
+
});
|
|
29075
|
+
}),
|
|
28590
29076
|
},
|
|
28591
29077
|
/**
|
|
28592
29078
|
* contract
|
|
@@ -29630,6 +30116,29 @@ class Client$I extends Client$J {
|
|
|
29630
30116
|
* location
|
|
29631
30117
|
*/
|
|
29632
30118
|
location: {
|
|
30119
|
+
/**
|
|
30120
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=active&version=v2 click to debug }
|
|
30121
|
+
*
|
|
30122
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=location&version=v2 document }
|
|
30123
|
+
*
|
|
30124
|
+
* 启停/停用地点
|
|
30125
|
+
*/
|
|
30126
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30127
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30128
|
+
return this.httpInstance
|
|
30129
|
+
.request({
|
|
30130
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/active`, path),
|
|
30131
|
+
method: "POST",
|
|
30132
|
+
data,
|
|
30133
|
+
params,
|
|
30134
|
+
headers,
|
|
30135
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30136
|
+
})
|
|
30137
|
+
.catch((e) => {
|
|
30138
|
+
this.logger.error(formatErrors(e));
|
|
30139
|
+
throw e;
|
|
30140
|
+
});
|
|
30141
|
+
}),
|
|
29633
30142
|
/**
|
|
29634
30143
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
|
|
29635
30144
|
*
|
|
@@ -29653,6 +30162,103 @@ class Client$I extends Client$J {
|
|
|
29653
30162
|
throw e;
|
|
29654
30163
|
});
|
|
29655
30164
|
}),
|
|
30165
|
+
/**
|
|
30166
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=patch&version=v2 click to debug }
|
|
30167
|
+
*
|
|
30168
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location&version=v2 document }
|
|
30169
|
+
*
|
|
30170
|
+
* 更新地点
|
|
30171
|
+
*/
|
|
30172
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30173
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30174
|
+
return this.httpInstance
|
|
30175
|
+
.request({
|
|
30176
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id`, path),
|
|
30177
|
+
method: "PATCH",
|
|
30178
|
+
data,
|
|
30179
|
+
params,
|
|
30180
|
+
headers,
|
|
30181
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30182
|
+
})
|
|
30183
|
+
.catch((e) => {
|
|
30184
|
+
this.logger.error(formatErrors(e));
|
|
30185
|
+
throw e;
|
|
30186
|
+
});
|
|
30187
|
+
}),
|
|
30188
|
+
},
|
|
30189
|
+
/**
|
|
30190
|
+
* location.address
|
|
30191
|
+
*/
|
|
30192
|
+
locationAddress: {
|
|
30193
|
+
/**
|
|
30194
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=create&version=v2 click to debug }
|
|
30195
|
+
*
|
|
30196
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=location.address&version=v2 document }
|
|
30197
|
+
*
|
|
30198
|
+
* 添加地点地址
|
|
30199
|
+
*/
|
|
30200
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30201
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30202
|
+
return this.httpInstance
|
|
30203
|
+
.request({
|
|
30204
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses`, path),
|
|
30205
|
+
method: "POST",
|
|
30206
|
+
data,
|
|
30207
|
+
params,
|
|
30208
|
+
headers,
|
|
30209
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30210
|
+
})
|
|
30211
|
+
.catch((e) => {
|
|
30212
|
+
this.logger.error(formatErrors(e));
|
|
30213
|
+
throw e;
|
|
30214
|
+
});
|
|
30215
|
+
}),
|
|
30216
|
+
/**
|
|
30217
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=delete&version=v2 click to debug }
|
|
30218
|
+
*
|
|
30219
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=location.address&version=v2 document }
|
|
30220
|
+
*
|
|
30221
|
+
* 删除地点地址
|
|
30222
|
+
*/
|
|
30223
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30224
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30225
|
+
return this.httpInstance
|
|
30226
|
+
.request({
|
|
30227
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30228
|
+
method: "DELETE",
|
|
30229
|
+
data,
|
|
30230
|
+
params,
|
|
30231
|
+
headers,
|
|
30232
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30233
|
+
})
|
|
30234
|
+
.catch((e) => {
|
|
30235
|
+
this.logger.error(formatErrors(e));
|
|
30236
|
+
throw e;
|
|
30237
|
+
});
|
|
30238
|
+
}),
|
|
30239
|
+
/**
|
|
30240
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location.address&apiName=patch&version=v2 click to debug }
|
|
30241
|
+
*
|
|
30242
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=location.address&version=v2 document }
|
|
30243
|
+
*
|
|
30244
|
+
* 更新地点地址
|
|
30245
|
+
*/
|
|
30246
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30247
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30248
|
+
return this.httpInstance
|
|
30249
|
+
.request({
|
|
30250
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/:location_id/addresses/:address_id`, path),
|
|
30251
|
+
method: "PATCH",
|
|
30252
|
+
data,
|
|
30253
|
+
params,
|
|
30254
|
+
headers,
|
|
30255
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30256
|
+
})
|
|
30257
|
+
.catch((e) => {
|
|
30258
|
+
this.logger.error(formatErrors(e));
|
|
30259
|
+
throw e;
|
|
30260
|
+
});
|
|
30261
|
+
}),
|
|
29656
30262
|
},
|
|
29657
30263
|
/**
|
|
29658
30264
|
* person
|
|
@@ -30335,6 +30941,84 @@ class Client$I extends Client$J {
|
|
|
30335
30941
|
});
|
|
30336
30942
|
}),
|
|
30337
30943
|
},
|
|
30944
|
+
/**
|
|
30945
|
+
* workforce_plan
|
|
30946
|
+
*/
|
|
30947
|
+
workforcePlan: {
|
|
30948
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30949
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30950
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
30951
|
+
const res = yield this.httpInstance
|
|
30952
|
+
.request({
|
|
30953
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
30954
|
+
method: "GET",
|
|
30955
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
30956
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
30957
|
+
data,
|
|
30958
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
30959
|
+
arrayFormat: "repeat",
|
|
30960
|
+
}),
|
|
30961
|
+
})
|
|
30962
|
+
.catch((e) => {
|
|
30963
|
+
this.logger.error(formatErrors(e));
|
|
30964
|
+
});
|
|
30965
|
+
return res;
|
|
30966
|
+
});
|
|
30967
|
+
const Iterable = {
|
|
30968
|
+
[Symbol.asyncIterator]() {
|
|
30969
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
30970
|
+
let hasMore = true;
|
|
30971
|
+
let pageToken;
|
|
30972
|
+
while (hasMore) {
|
|
30973
|
+
try {
|
|
30974
|
+
const res = yield __await(sendRequest({
|
|
30975
|
+
headers,
|
|
30976
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
30977
|
+
data,
|
|
30978
|
+
}));
|
|
30979
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
30980
|
+
// @ts-ignore
|
|
30981
|
+
has_more,
|
|
30982
|
+
// @ts-ignore
|
|
30983
|
+
page_token,
|
|
30984
|
+
// @ts-ignore
|
|
30985
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
30986
|
+
yield yield __await(rest);
|
|
30987
|
+
hasMore = Boolean(has_more);
|
|
30988
|
+
pageToken = page_token || next_page_token;
|
|
30989
|
+
}
|
|
30990
|
+
catch (e) {
|
|
30991
|
+
yield yield __await(null);
|
|
30992
|
+
break;
|
|
30993
|
+
}
|
|
30994
|
+
}
|
|
30995
|
+
});
|
|
30996
|
+
},
|
|
30997
|
+
};
|
|
30998
|
+
return Iterable;
|
|
30999
|
+
}),
|
|
31000
|
+
/**
|
|
31001
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan&apiName=list&version=v2 click to debug }
|
|
31002
|
+
*
|
|
31003
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=workforce_plan&version=v2 document }
|
|
31004
|
+
*/
|
|
31005
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31006
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31007
|
+
return this.httpInstance
|
|
31008
|
+
.request({
|
|
31009
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plans`, path),
|
|
31010
|
+
method: "GET",
|
|
31011
|
+
data,
|
|
31012
|
+
params,
|
|
31013
|
+
headers,
|
|
31014
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31015
|
+
})
|
|
31016
|
+
.catch((e) => {
|
|
31017
|
+
this.logger.error(formatErrors(e));
|
|
31018
|
+
throw e;
|
|
31019
|
+
});
|
|
31020
|
+
}),
|
|
31021
|
+
},
|
|
30338
31022
|
/**
|
|
30339
31023
|
* workforce_plan_detail
|
|
30340
31024
|
*/
|
|
@@ -32183,7 +32867,7 @@ class Client$E extends Client$F {
|
|
|
32183
32867
|
}),
|
|
32184
32868
|
},
|
|
32185
32869
|
/**
|
|
32186
|
-
*
|
|
32870
|
+
* 文件夹
|
|
32187
32871
|
*/
|
|
32188
32872
|
file: {
|
|
32189
32873
|
/**
|
|
@@ -33056,7 +33740,7 @@ class Client$E extends Client$F {
|
|
|
33056
33740
|
}),
|
|
33057
33741
|
},
|
|
33058
33742
|
/**
|
|
33059
|
-
*
|
|
33743
|
+
* 素材
|
|
33060
33744
|
*/
|
|
33061
33745
|
media: {
|
|
33062
33746
|
/**
|
|
@@ -34003,7 +34687,7 @@ class Client$E extends Client$F {
|
|
|
34003
34687
|
}),
|
|
34004
34688
|
},
|
|
34005
34689
|
/**
|
|
34006
|
-
*
|
|
34690
|
+
* 文件夹
|
|
34007
34691
|
*/
|
|
34008
34692
|
file: {
|
|
34009
34693
|
/**
|
|
@@ -34882,7 +35566,7 @@ class Client$E extends Client$F {
|
|
|
34882
35566
|
}),
|
|
34883
35567
|
},
|
|
34884
35568
|
/**
|
|
34885
|
-
*
|
|
35569
|
+
* 素材
|
|
34886
35570
|
*/
|
|
34887
35571
|
media: {
|
|
34888
35572
|
/**
|
|
@@ -43398,6 +44082,27 @@ class Client$u extends Client$v {
|
|
|
43398
44082
|
throw e;
|
|
43399
44083
|
});
|
|
43400
44084
|
}),
|
|
44085
|
+
/**
|
|
44086
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
44087
|
+
*
|
|
44088
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
44089
|
+
*/
|
|
44090
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44091
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44092
|
+
return this.httpInstance
|
|
44093
|
+
.request({
|
|
44094
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
44095
|
+
method: "POST",
|
|
44096
|
+
data,
|
|
44097
|
+
params,
|
|
44098
|
+
headers,
|
|
44099
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44100
|
+
})
|
|
44101
|
+
.catch((e) => {
|
|
44102
|
+
this.logger.error(formatErrors(e));
|
|
44103
|
+
throw e;
|
|
44104
|
+
});
|
|
44105
|
+
}),
|
|
43401
44106
|
},
|
|
43402
44107
|
/**
|
|
43403
44108
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -43691,6 +44396,82 @@ class Client$u extends Client$v {
|
|
|
43691
44396
|
});
|
|
43692
44397
|
}),
|
|
43693
44398
|
},
|
|
44399
|
+
/**
|
|
44400
|
+
* talent_tag
|
|
44401
|
+
*/
|
|
44402
|
+
talentTag: {
|
|
44403
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44404
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44405
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
44406
|
+
const res = yield this.httpInstance
|
|
44407
|
+
.request({
|
|
44408
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44409
|
+
method: "GET",
|
|
44410
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
44411
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
44412
|
+
data,
|
|
44413
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44414
|
+
})
|
|
44415
|
+
.catch((e) => {
|
|
44416
|
+
this.logger.error(formatErrors(e));
|
|
44417
|
+
});
|
|
44418
|
+
return res;
|
|
44419
|
+
});
|
|
44420
|
+
const Iterable = {
|
|
44421
|
+
[Symbol.asyncIterator]() {
|
|
44422
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
44423
|
+
let hasMore = true;
|
|
44424
|
+
let pageToken;
|
|
44425
|
+
while (hasMore) {
|
|
44426
|
+
try {
|
|
44427
|
+
const res = yield __await(sendRequest({
|
|
44428
|
+
headers,
|
|
44429
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
44430
|
+
data,
|
|
44431
|
+
}));
|
|
44432
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
44433
|
+
// @ts-ignore
|
|
44434
|
+
has_more,
|
|
44435
|
+
// @ts-ignore
|
|
44436
|
+
page_token,
|
|
44437
|
+
// @ts-ignore
|
|
44438
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
44439
|
+
yield yield __await(rest);
|
|
44440
|
+
hasMore = Boolean(has_more);
|
|
44441
|
+
pageToken = page_token || next_page_token;
|
|
44442
|
+
}
|
|
44443
|
+
catch (e) {
|
|
44444
|
+
yield yield __await(null);
|
|
44445
|
+
break;
|
|
44446
|
+
}
|
|
44447
|
+
}
|
|
44448
|
+
});
|
|
44449
|
+
},
|
|
44450
|
+
};
|
|
44451
|
+
return Iterable;
|
|
44452
|
+
}),
|
|
44453
|
+
/**
|
|
44454
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
44455
|
+
*
|
|
44456
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
44457
|
+
*/
|
|
44458
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
44459
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
44460
|
+
return this.httpInstance
|
|
44461
|
+
.request({
|
|
44462
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
44463
|
+
method: "GET",
|
|
44464
|
+
data,
|
|
44465
|
+
params,
|
|
44466
|
+
headers,
|
|
44467
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
44468
|
+
})
|
|
44469
|
+
.catch((e) => {
|
|
44470
|
+
this.logger.error(formatErrors(e));
|
|
44471
|
+
throw e;
|
|
44472
|
+
});
|
|
44473
|
+
}),
|
|
44474
|
+
},
|
|
43694
44475
|
/**
|
|
43695
44476
|
* termination_reason
|
|
43696
44477
|
*/
|
|
@@ -48756,6 +49537,27 @@ class Client$u extends Client$v {
|
|
|
48756
49537
|
throw e;
|
|
48757
49538
|
});
|
|
48758
49539
|
}),
|
|
49540
|
+
/**
|
|
49541
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=tag&version=v1 click to debug }
|
|
49542
|
+
*
|
|
49543
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=tag&project=hire&resource=talent&version=v1 document }
|
|
49544
|
+
*/
|
|
49545
|
+
tag: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49546
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49547
|
+
return this.httpInstance
|
|
49548
|
+
.request({
|
|
49549
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/:talent_id/tag`, path),
|
|
49550
|
+
method: "POST",
|
|
49551
|
+
data,
|
|
49552
|
+
params,
|
|
49553
|
+
headers,
|
|
49554
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
49555
|
+
})
|
|
49556
|
+
.catch((e) => {
|
|
49557
|
+
this.logger.error(formatErrors(e));
|
|
49558
|
+
throw e;
|
|
49559
|
+
});
|
|
49560
|
+
}),
|
|
48759
49561
|
},
|
|
48760
49562
|
/**
|
|
48761
49563
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -49053,6 +49855,84 @@ class Client$u extends Client$v {
|
|
|
49053
49855
|
});
|
|
49054
49856
|
}),
|
|
49055
49857
|
},
|
|
49858
|
+
/**
|
|
49859
|
+
* talent_tag
|
|
49860
|
+
*/
|
|
49861
|
+
talentTag: {
|
|
49862
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49863
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49864
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
49865
|
+
const res = yield this.httpInstance
|
|
49866
|
+
.request({
|
|
49867
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
49868
|
+
method: "GET",
|
|
49869
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
49870
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
49871
|
+
data,
|
|
49872
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
49873
|
+
arrayFormat: "repeat",
|
|
49874
|
+
}),
|
|
49875
|
+
})
|
|
49876
|
+
.catch((e) => {
|
|
49877
|
+
this.logger.error(formatErrors(e));
|
|
49878
|
+
});
|
|
49879
|
+
return res;
|
|
49880
|
+
});
|
|
49881
|
+
const Iterable = {
|
|
49882
|
+
[Symbol.asyncIterator]() {
|
|
49883
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
49884
|
+
let hasMore = true;
|
|
49885
|
+
let pageToken;
|
|
49886
|
+
while (hasMore) {
|
|
49887
|
+
try {
|
|
49888
|
+
const res = yield __await(sendRequest({
|
|
49889
|
+
headers,
|
|
49890
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
49891
|
+
data,
|
|
49892
|
+
}));
|
|
49893
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
49894
|
+
// @ts-ignore
|
|
49895
|
+
has_more,
|
|
49896
|
+
// @ts-ignore
|
|
49897
|
+
page_token,
|
|
49898
|
+
// @ts-ignore
|
|
49899
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
49900
|
+
yield yield __await(rest);
|
|
49901
|
+
hasMore = Boolean(has_more);
|
|
49902
|
+
pageToken = page_token || next_page_token;
|
|
49903
|
+
}
|
|
49904
|
+
catch (e) {
|
|
49905
|
+
yield yield __await(null);
|
|
49906
|
+
break;
|
|
49907
|
+
}
|
|
49908
|
+
}
|
|
49909
|
+
});
|
|
49910
|
+
},
|
|
49911
|
+
};
|
|
49912
|
+
return Iterable;
|
|
49913
|
+
}),
|
|
49914
|
+
/**
|
|
49915
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_tag&apiName=list&version=v1 click to debug }
|
|
49916
|
+
*
|
|
49917
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=talent_tag&version=v1 document }
|
|
49918
|
+
*/
|
|
49919
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
49920
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
49921
|
+
return this.httpInstance
|
|
49922
|
+
.request({
|
|
49923
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_tags`, path),
|
|
49924
|
+
method: "GET",
|
|
49925
|
+
data,
|
|
49926
|
+
params,
|
|
49927
|
+
headers,
|
|
49928
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
49929
|
+
})
|
|
49930
|
+
.catch((e) => {
|
|
49931
|
+
this.logger.error(formatErrors(e));
|
|
49932
|
+
throw e;
|
|
49933
|
+
});
|
|
49934
|
+
}),
|
|
49935
|
+
},
|
|
49056
49936
|
/**
|
|
49057
49937
|
* termination_reason
|
|
49058
49938
|
*/
|
|
@@ -59396,6 +60276,27 @@ class Client$k extends Client$l {
|
|
|
59396
60276
|
* 登录态
|
|
59397
60277
|
*/
|
|
59398
60278
|
session: {
|
|
60279
|
+
/**
|
|
60280
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60281
|
+
*
|
|
60282
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60283
|
+
*/
|
|
60284
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60285
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60286
|
+
return this.httpInstance
|
|
60287
|
+
.request({
|
|
60288
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60289
|
+
method: "POST",
|
|
60290
|
+
data,
|
|
60291
|
+
params,
|
|
60292
|
+
headers,
|
|
60293
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
60294
|
+
})
|
|
60295
|
+
.catch((e) => {
|
|
60296
|
+
this.logger.error(formatErrors(e));
|
|
60297
|
+
throw e;
|
|
60298
|
+
});
|
|
60299
|
+
}),
|
|
59399
60300
|
/**
|
|
59400
60301
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
59401
60302
|
*
|
|
@@ -59427,6 +60328,27 @@ class Client$k extends Client$l {
|
|
|
59427
60328
|
* 登录态
|
|
59428
60329
|
*/
|
|
59429
60330
|
session: {
|
|
60331
|
+
/**
|
|
60332
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=logout&version=v1 click to debug }
|
|
60333
|
+
*
|
|
60334
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=logout&project=passport&resource=session&version=v1 document }
|
|
60335
|
+
*/
|
|
60336
|
+
logout: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
60337
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
60338
|
+
return this.httpInstance
|
|
60339
|
+
.request({
|
|
60340
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/logout`, path),
|
|
60341
|
+
method: "POST",
|
|
60342
|
+
data,
|
|
60343
|
+
params,
|
|
60344
|
+
headers,
|
|
60345
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
60346
|
+
})
|
|
60347
|
+
.catch((e) => {
|
|
60348
|
+
this.logger.error(formatErrors(e));
|
|
60349
|
+
throw e;
|
|
60350
|
+
});
|
|
60351
|
+
}),
|
|
59430
60352
|
/**
|
|
59431
60353
|
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
59432
60354
|
*
|
|
@@ -61509,7 +62431,7 @@ class Client$c extends Client$d {
|
|
|
61509
62431
|
}),
|
|
61510
62432
|
},
|
|
61511
62433
|
/**
|
|
61512
|
-
*
|
|
62434
|
+
* 工作表
|
|
61513
62435
|
*/
|
|
61514
62436
|
spreadsheetSheet: {
|
|
61515
62437
|
/**
|
|
@@ -62239,7 +63161,7 @@ class Client$c extends Client$d {
|
|
|
62239
63161
|
}),
|
|
62240
63162
|
},
|
|
62241
63163
|
/**
|
|
62242
|
-
*
|
|
63164
|
+
* 工作表
|
|
62243
63165
|
*/
|
|
62244
63166
|
spreadsheetSheet: {
|
|
62245
63167
|
/**
|