@larksuiteoapi/node-sdk 1.53.0 → 1.54.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 +170 -12
- package/lib/index.js +170 -12
- package/package.json +1 -1
- package/types/index.d.ts +383 -57
package/es/index.js
CHANGED
|
@@ -1333,7 +1333,7 @@ class Client$15 extends Client$16 {
|
|
|
1333
1333
|
constructor() {
|
|
1334
1334
|
super(...arguments);
|
|
1335
1335
|
/**
|
|
1336
|
-
*
|
|
1336
|
+
* 管理后台-行为审计
|
|
1337
1337
|
*/
|
|
1338
1338
|
this.admin = {
|
|
1339
1339
|
/**
|
|
@@ -3226,6 +3226,84 @@ class Client$13 extends Client$14 {
|
|
|
3226
3226
|
*/
|
|
3227
3227
|
this.apaas = {
|
|
3228
3228
|
v1: {
|
|
3229
|
+
/**
|
|
3230
|
+
* app
|
|
3231
|
+
*/
|
|
3232
|
+
app: {
|
|
3233
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3234
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3235
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3236
|
+
const res = yield this.httpInstance
|
|
3237
|
+
.request({
|
|
3238
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
|
|
3239
|
+
method: "GET",
|
|
3240
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
3241
|
+
params: pickBy(innerPayload.params, identity),
|
|
3242
|
+
data,
|
|
3243
|
+
paramsSerializer: (params) => stringify(params, {
|
|
3244
|
+
arrayFormat: "repeat",
|
|
3245
|
+
}),
|
|
3246
|
+
})
|
|
3247
|
+
.catch((e) => {
|
|
3248
|
+
this.logger.error(formatErrors(e));
|
|
3249
|
+
});
|
|
3250
|
+
return res;
|
|
3251
|
+
});
|
|
3252
|
+
const Iterable = {
|
|
3253
|
+
[Symbol.asyncIterator]() {
|
|
3254
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3255
|
+
let hasMore = true;
|
|
3256
|
+
let pageToken;
|
|
3257
|
+
while (hasMore) {
|
|
3258
|
+
try {
|
|
3259
|
+
const res = yield __await(sendRequest({
|
|
3260
|
+
headers,
|
|
3261
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3262
|
+
data,
|
|
3263
|
+
}));
|
|
3264
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
3265
|
+
// @ts-ignore
|
|
3266
|
+
has_more,
|
|
3267
|
+
// @ts-ignore
|
|
3268
|
+
page_token,
|
|
3269
|
+
// @ts-ignore
|
|
3270
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3271
|
+
yield yield __await(rest);
|
|
3272
|
+
hasMore = Boolean(has_more);
|
|
3273
|
+
pageToken = page_token || next_page_token;
|
|
3274
|
+
}
|
|
3275
|
+
catch (e) {
|
|
3276
|
+
yield yield __await(null);
|
|
3277
|
+
break;
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
});
|
|
3281
|
+
},
|
|
3282
|
+
};
|
|
3283
|
+
return Iterable;
|
|
3284
|
+
}),
|
|
3285
|
+
/**
|
|
3286
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=app&apiName=list&version=v1 click to debug }
|
|
3287
|
+
*
|
|
3288
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=app&version=v1 document }
|
|
3289
|
+
*/
|
|
3290
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3291
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3292
|
+
return this.httpInstance
|
|
3293
|
+
.request({
|
|
3294
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
|
|
3295
|
+
method: "GET",
|
|
3296
|
+
data,
|
|
3297
|
+
params,
|
|
3298
|
+
headers,
|
|
3299
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
3300
|
+
})
|
|
3301
|
+
.catch((e) => {
|
|
3302
|
+
this.logger.error(formatErrors(e));
|
|
3303
|
+
throw e;
|
|
3304
|
+
});
|
|
3305
|
+
}),
|
|
3306
|
+
},
|
|
3229
3307
|
/**
|
|
3230
3308
|
* application.audit_log
|
|
3231
3309
|
*/
|
|
@@ -5927,7 +6005,7 @@ class Client$11 extends Client$12 {
|
|
|
5927
6005
|
*/
|
|
5928
6006
|
this.approval = {
|
|
5929
6007
|
/**
|
|
5930
|
-
*
|
|
6008
|
+
* 事件
|
|
5931
6009
|
*/
|
|
5932
6010
|
approval: {
|
|
5933
6011
|
/**
|
|
@@ -6222,7 +6300,7 @@ class Client$11 extends Client$12 {
|
|
|
6222
6300
|
}),
|
|
6223
6301
|
},
|
|
6224
6302
|
/**
|
|
6225
|
-
*
|
|
6303
|
+
* 审批查询
|
|
6226
6304
|
*/
|
|
6227
6305
|
instance: {
|
|
6228
6306
|
/**
|
|
@@ -6930,7 +7008,7 @@ class Client$11 extends Client$12 {
|
|
|
6930
7008
|
},
|
|
6931
7009
|
v4: {
|
|
6932
7010
|
/**
|
|
6933
|
-
*
|
|
7011
|
+
* 事件
|
|
6934
7012
|
*/
|
|
6935
7013
|
approval: {
|
|
6936
7014
|
/**
|
|
@@ -7227,7 +7305,7 @@ class Client$11 extends Client$12 {
|
|
|
7227
7305
|
}),
|
|
7228
7306
|
},
|
|
7229
7307
|
/**
|
|
7230
|
-
*
|
|
7308
|
+
* 审批查询
|
|
7231
7309
|
*/
|
|
7232
7310
|
instance: {
|
|
7233
7311
|
/**
|
|
@@ -37479,7 +37557,7 @@ class Client$G extends Client$H {
|
|
|
37479
37557
|
constructor() {
|
|
37480
37558
|
super(...arguments);
|
|
37481
37559
|
/**
|
|
37482
|
-
*
|
|
37560
|
+
* 云文档-文件管理
|
|
37483
37561
|
*/
|
|
37484
37562
|
this.drive = {
|
|
37485
37563
|
/**
|
|
@@ -37902,7 +37980,7 @@ class Client$G extends Client$H {
|
|
|
37902
37980
|
}),
|
|
37903
37981
|
},
|
|
37904
37982
|
/**
|
|
37905
|
-
*
|
|
37983
|
+
* 文件夹
|
|
37906
37984
|
*/
|
|
37907
37985
|
file: {
|
|
37908
37986
|
/**
|
|
@@ -38777,7 +38855,7 @@ class Client$G extends Client$H {
|
|
|
38777
38855
|
}),
|
|
38778
38856
|
},
|
|
38779
38857
|
/**
|
|
38780
|
-
*
|
|
38858
|
+
* 素材
|
|
38781
38859
|
*/
|
|
38782
38860
|
media: {
|
|
38783
38861
|
/**
|
|
@@ -39728,7 +39806,7 @@ class Client$G extends Client$H {
|
|
|
39728
39806
|
}),
|
|
39729
39807
|
},
|
|
39730
39808
|
/**
|
|
39731
|
-
*
|
|
39809
|
+
* 文件夹
|
|
39732
39810
|
*/
|
|
39733
39811
|
file: {
|
|
39734
39812
|
/**
|
|
@@ -40609,7 +40687,7 @@ class Client$G extends Client$H {
|
|
|
40609
40687
|
}),
|
|
40610
40688
|
},
|
|
40611
40689
|
/**
|
|
40612
|
-
*
|
|
40690
|
+
* 素材
|
|
40613
40691
|
*/
|
|
40614
40692
|
media: {
|
|
40615
40693
|
/**
|
|
@@ -58533,7 +58611,7 @@ class Client$v extends Client$w {
|
|
|
58533
58611
|
}),
|
|
58534
58612
|
},
|
|
58535
58613
|
/**
|
|
58536
|
-
*
|
|
58614
|
+
* 消息加急
|
|
58537
58615
|
*/
|
|
58538
58616
|
message: {
|
|
58539
58617
|
/**
|
|
@@ -60742,7 +60820,7 @@ class Client$v extends Client$w {
|
|
|
60742
60820
|
}),
|
|
60743
60821
|
},
|
|
60744
60822
|
/**
|
|
60745
|
-
*
|
|
60823
|
+
* 消息加急
|
|
60746
60824
|
*/
|
|
60747
60825
|
message: {
|
|
60748
60826
|
/**
|
|
@@ -68068,6 +68146,86 @@ class Client$l extends Client$m {
|
|
|
68068
68146
|
});
|
|
68069
68147
|
}),
|
|
68070
68148
|
},
|
|
68149
|
+
/**
|
|
68150
|
+
* cost_allocation_detail
|
|
68151
|
+
*/
|
|
68152
|
+
costAllocationDetail: {
|
|
68153
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
68154
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
68155
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
68156
|
+
const res = yield this.httpInstance
|
|
68157
|
+
.request({
|
|
68158
|
+
url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
|
|
68159
|
+
method: "GET",
|
|
68160
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
68161
|
+
params: pickBy(innerPayload.params, identity),
|
|
68162
|
+
data,
|
|
68163
|
+
paramsSerializer: (params) => stringify(params, {
|
|
68164
|
+
arrayFormat: "repeat",
|
|
68165
|
+
}),
|
|
68166
|
+
})
|
|
68167
|
+
.catch((e) => {
|
|
68168
|
+
this.logger.error(formatErrors(e));
|
|
68169
|
+
});
|
|
68170
|
+
return res;
|
|
68171
|
+
});
|
|
68172
|
+
const Iterable = {
|
|
68173
|
+
[Symbol.asyncIterator]() {
|
|
68174
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
68175
|
+
let hasMore = true;
|
|
68176
|
+
let pageToken;
|
|
68177
|
+
while (hasMore) {
|
|
68178
|
+
try {
|
|
68179
|
+
const res = yield __await(sendRequest({
|
|
68180
|
+
headers,
|
|
68181
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
68182
|
+
data,
|
|
68183
|
+
}));
|
|
68184
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
68185
|
+
// @ts-ignore
|
|
68186
|
+
has_more,
|
|
68187
|
+
// @ts-ignore
|
|
68188
|
+
page_token,
|
|
68189
|
+
// @ts-ignore
|
|
68190
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
68191
|
+
yield yield __await(rest);
|
|
68192
|
+
hasMore = Boolean(has_more);
|
|
68193
|
+
pageToken = page_token || next_page_token;
|
|
68194
|
+
}
|
|
68195
|
+
catch (e) {
|
|
68196
|
+
yield yield __await(null);
|
|
68197
|
+
break;
|
|
68198
|
+
}
|
|
68199
|
+
}
|
|
68200
|
+
});
|
|
68201
|
+
},
|
|
68202
|
+
};
|
|
68203
|
+
return Iterable;
|
|
68204
|
+
}),
|
|
68205
|
+
/**
|
|
68206
|
+
* {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_detail&apiName=list&version=v1 click to debug }
|
|
68207
|
+
*
|
|
68208
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_detail&version=v1 document }
|
|
68209
|
+
*
|
|
68210
|
+
* 获取成本分摊报表明细数据
|
|
68211
|
+
*/
|
|
68212
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
68213
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
68214
|
+
return this.httpInstance
|
|
68215
|
+
.request({
|
|
68216
|
+
url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
|
|
68217
|
+
method: "GET",
|
|
68218
|
+
data,
|
|
68219
|
+
params,
|
|
68220
|
+
headers,
|
|
68221
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
68222
|
+
})
|
|
68223
|
+
.catch((e) => {
|
|
68224
|
+
this.logger.error(formatErrors(e));
|
|
68225
|
+
throw e;
|
|
68226
|
+
});
|
|
68227
|
+
}),
|
|
68228
|
+
},
|
|
68071
68229
|
/**
|
|
68072
68230
|
* cost_allocation_plan
|
|
68073
68231
|
*/
|
package/lib/index.js
CHANGED
|
@@ -1348,7 +1348,7 @@ class Client$15 extends Client$16 {
|
|
|
1348
1348
|
constructor() {
|
|
1349
1349
|
super(...arguments);
|
|
1350
1350
|
/**
|
|
1351
|
-
*
|
|
1351
|
+
* 管理后台-行为审计
|
|
1352
1352
|
*/
|
|
1353
1353
|
this.admin = {
|
|
1354
1354
|
/**
|
|
@@ -3241,6 +3241,84 @@ class Client$13 extends Client$14 {
|
|
|
3241
3241
|
*/
|
|
3242
3242
|
this.apaas = {
|
|
3243
3243
|
v1: {
|
|
3244
|
+
/**
|
|
3245
|
+
* app
|
|
3246
|
+
*/
|
|
3247
|
+
app: {
|
|
3248
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3249
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3250
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3251
|
+
const res = yield this.httpInstance
|
|
3252
|
+
.request({
|
|
3253
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
|
|
3254
|
+
method: "GET",
|
|
3255
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
3256
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
3257
|
+
data,
|
|
3258
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
3259
|
+
arrayFormat: "repeat",
|
|
3260
|
+
}),
|
|
3261
|
+
})
|
|
3262
|
+
.catch((e) => {
|
|
3263
|
+
this.logger.error(formatErrors(e));
|
|
3264
|
+
});
|
|
3265
|
+
return res;
|
|
3266
|
+
});
|
|
3267
|
+
const Iterable = {
|
|
3268
|
+
[Symbol.asyncIterator]() {
|
|
3269
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3270
|
+
let hasMore = true;
|
|
3271
|
+
let pageToken;
|
|
3272
|
+
while (hasMore) {
|
|
3273
|
+
try {
|
|
3274
|
+
const res = yield __await(sendRequest({
|
|
3275
|
+
headers,
|
|
3276
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3277
|
+
data,
|
|
3278
|
+
}));
|
|
3279
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
3280
|
+
// @ts-ignore
|
|
3281
|
+
has_more,
|
|
3282
|
+
// @ts-ignore
|
|
3283
|
+
page_token,
|
|
3284
|
+
// @ts-ignore
|
|
3285
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3286
|
+
yield yield __await(rest);
|
|
3287
|
+
hasMore = Boolean(has_more);
|
|
3288
|
+
pageToken = page_token || next_page_token;
|
|
3289
|
+
}
|
|
3290
|
+
catch (e) {
|
|
3291
|
+
yield yield __await(null);
|
|
3292
|
+
break;
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
});
|
|
3296
|
+
},
|
|
3297
|
+
};
|
|
3298
|
+
return Iterable;
|
|
3299
|
+
}),
|
|
3300
|
+
/**
|
|
3301
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=app&apiName=list&version=v1 click to debug }
|
|
3302
|
+
*
|
|
3303
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=app&version=v1 document }
|
|
3304
|
+
*/
|
|
3305
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3306
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3307
|
+
return this.httpInstance
|
|
3308
|
+
.request({
|
|
3309
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
|
|
3310
|
+
method: "GET",
|
|
3311
|
+
data,
|
|
3312
|
+
params,
|
|
3313
|
+
headers,
|
|
3314
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3315
|
+
})
|
|
3316
|
+
.catch((e) => {
|
|
3317
|
+
this.logger.error(formatErrors(e));
|
|
3318
|
+
throw e;
|
|
3319
|
+
});
|
|
3320
|
+
}),
|
|
3321
|
+
},
|
|
3244
3322
|
/**
|
|
3245
3323
|
* application.audit_log
|
|
3246
3324
|
*/
|
|
@@ -5942,7 +6020,7 @@ class Client$11 extends Client$12 {
|
|
|
5942
6020
|
*/
|
|
5943
6021
|
this.approval = {
|
|
5944
6022
|
/**
|
|
5945
|
-
*
|
|
6023
|
+
* 事件
|
|
5946
6024
|
*/
|
|
5947
6025
|
approval: {
|
|
5948
6026
|
/**
|
|
@@ -6237,7 +6315,7 @@ class Client$11 extends Client$12 {
|
|
|
6237
6315
|
}),
|
|
6238
6316
|
},
|
|
6239
6317
|
/**
|
|
6240
|
-
*
|
|
6318
|
+
* 审批查询
|
|
6241
6319
|
*/
|
|
6242
6320
|
instance: {
|
|
6243
6321
|
/**
|
|
@@ -6945,7 +7023,7 @@ class Client$11 extends Client$12 {
|
|
|
6945
7023
|
},
|
|
6946
7024
|
v4: {
|
|
6947
7025
|
/**
|
|
6948
|
-
*
|
|
7026
|
+
* 事件
|
|
6949
7027
|
*/
|
|
6950
7028
|
approval: {
|
|
6951
7029
|
/**
|
|
@@ -7242,7 +7320,7 @@ class Client$11 extends Client$12 {
|
|
|
7242
7320
|
}),
|
|
7243
7321
|
},
|
|
7244
7322
|
/**
|
|
7245
|
-
*
|
|
7323
|
+
* 审批查询
|
|
7246
7324
|
*/
|
|
7247
7325
|
instance: {
|
|
7248
7326
|
/**
|
|
@@ -37494,7 +37572,7 @@ class Client$G extends Client$H {
|
|
|
37494
37572
|
constructor() {
|
|
37495
37573
|
super(...arguments);
|
|
37496
37574
|
/**
|
|
37497
|
-
*
|
|
37575
|
+
* 云文档-文件管理
|
|
37498
37576
|
*/
|
|
37499
37577
|
this.drive = {
|
|
37500
37578
|
/**
|
|
@@ -37917,7 +37995,7 @@ class Client$G extends Client$H {
|
|
|
37917
37995
|
}),
|
|
37918
37996
|
},
|
|
37919
37997
|
/**
|
|
37920
|
-
*
|
|
37998
|
+
* 文件夹
|
|
37921
37999
|
*/
|
|
37922
38000
|
file: {
|
|
37923
38001
|
/**
|
|
@@ -38792,7 +38870,7 @@ class Client$G extends Client$H {
|
|
|
38792
38870
|
}),
|
|
38793
38871
|
},
|
|
38794
38872
|
/**
|
|
38795
|
-
*
|
|
38873
|
+
* 素材
|
|
38796
38874
|
*/
|
|
38797
38875
|
media: {
|
|
38798
38876
|
/**
|
|
@@ -39743,7 +39821,7 @@ class Client$G extends Client$H {
|
|
|
39743
39821
|
}),
|
|
39744
39822
|
},
|
|
39745
39823
|
/**
|
|
39746
|
-
*
|
|
39824
|
+
* 文件夹
|
|
39747
39825
|
*/
|
|
39748
39826
|
file: {
|
|
39749
39827
|
/**
|
|
@@ -40624,7 +40702,7 @@ class Client$G extends Client$H {
|
|
|
40624
40702
|
}),
|
|
40625
40703
|
},
|
|
40626
40704
|
/**
|
|
40627
|
-
*
|
|
40705
|
+
* 素材
|
|
40628
40706
|
*/
|
|
40629
40707
|
media: {
|
|
40630
40708
|
/**
|
|
@@ -58548,7 +58626,7 @@ class Client$v extends Client$w {
|
|
|
58548
58626
|
}),
|
|
58549
58627
|
},
|
|
58550
58628
|
/**
|
|
58551
|
-
*
|
|
58629
|
+
* 消息加急
|
|
58552
58630
|
*/
|
|
58553
58631
|
message: {
|
|
58554
58632
|
/**
|
|
@@ -60757,7 +60835,7 @@ class Client$v extends Client$w {
|
|
|
60757
60835
|
}),
|
|
60758
60836
|
},
|
|
60759
60837
|
/**
|
|
60760
|
-
*
|
|
60838
|
+
* 消息加急
|
|
60761
60839
|
*/
|
|
60762
60840
|
message: {
|
|
60763
60841
|
/**
|
|
@@ -68083,6 +68161,86 @@ class Client$l extends Client$m {
|
|
|
68083
68161
|
});
|
|
68084
68162
|
}),
|
|
68085
68163
|
},
|
|
68164
|
+
/**
|
|
68165
|
+
* cost_allocation_detail
|
|
68166
|
+
*/
|
|
68167
|
+
costAllocationDetail: {
|
|
68168
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
68169
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
68170
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
68171
|
+
const res = yield this.httpInstance
|
|
68172
|
+
.request({
|
|
68173
|
+
url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
|
|
68174
|
+
method: "GET",
|
|
68175
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
68176
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
68177
|
+
data,
|
|
68178
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
68179
|
+
arrayFormat: "repeat",
|
|
68180
|
+
}),
|
|
68181
|
+
})
|
|
68182
|
+
.catch((e) => {
|
|
68183
|
+
this.logger.error(formatErrors(e));
|
|
68184
|
+
});
|
|
68185
|
+
return res;
|
|
68186
|
+
});
|
|
68187
|
+
const Iterable = {
|
|
68188
|
+
[Symbol.asyncIterator]() {
|
|
68189
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
68190
|
+
let hasMore = true;
|
|
68191
|
+
let pageToken;
|
|
68192
|
+
while (hasMore) {
|
|
68193
|
+
try {
|
|
68194
|
+
const res = yield __await(sendRequest({
|
|
68195
|
+
headers,
|
|
68196
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
68197
|
+
data,
|
|
68198
|
+
}));
|
|
68199
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
68200
|
+
// @ts-ignore
|
|
68201
|
+
has_more,
|
|
68202
|
+
// @ts-ignore
|
|
68203
|
+
page_token,
|
|
68204
|
+
// @ts-ignore
|
|
68205
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
68206
|
+
yield yield __await(rest);
|
|
68207
|
+
hasMore = Boolean(has_more);
|
|
68208
|
+
pageToken = page_token || next_page_token;
|
|
68209
|
+
}
|
|
68210
|
+
catch (e) {
|
|
68211
|
+
yield yield __await(null);
|
|
68212
|
+
break;
|
|
68213
|
+
}
|
|
68214
|
+
}
|
|
68215
|
+
});
|
|
68216
|
+
},
|
|
68217
|
+
};
|
|
68218
|
+
return Iterable;
|
|
68219
|
+
}),
|
|
68220
|
+
/**
|
|
68221
|
+
* {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_detail&apiName=list&version=v1 click to debug }
|
|
68222
|
+
*
|
|
68223
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_detail&version=v1 document }
|
|
68224
|
+
*
|
|
68225
|
+
* 获取成本分摊报表明细数据
|
|
68226
|
+
*/
|
|
68227
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
68228
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
68229
|
+
return this.httpInstance
|
|
68230
|
+
.request({
|
|
68231
|
+
url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
|
|
68232
|
+
method: "GET",
|
|
68233
|
+
data,
|
|
68234
|
+
params,
|
|
68235
|
+
headers,
|
|
68236
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
68237
|
+
})
|
|
68238
|
+
.catch((e) => {
|
|
68239
|
+
this.logger.error(formatErrors(e));
|
|
68240
|
+
throw e;
|
|
68241
|
+
});
|
|
68242
|
+
}),
|
|
68243
|
+
},
|
|
68086
68244
|
/**
|
|
68087
68245
|
* cost_allocation_plan
|
|
68088
68246
|
*/
|