apaas-oapi-client 0.1.16 → 0.1.18
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/UserManual copy.md +568 -0
- package/UserManual.md +299 -36
- package/dist/index.d.ts +229 -0
- package/dist/index.js +484 -0
- package/package.json +1 -1
- package/src/index.ts +614 -0
package/UserManual.md
CHANGED
|
@@ -22,9 +22,9 @@ aPaaS 平台有完整的 Open API 能力,但是目前这些能力全都以单
|
|
|
22
22
|
- ……
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
<br>
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
|
|
28
28
|
|
|
29
29
|
**📦 安装**
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ yarn add apaas-oapi-client
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
|
|
41
41
|
# **🚀 快速开始**
|
|
42
42
|
|
|
@@ -62,7 +62,7 @@ main();
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
|
|
67
67
|
## **🔐 认证**
|
|
68
68
|
|
|
@@ -77,7 +77,7 @@ main();
|
|
|
77
77
|
|
|
78
78
|
***
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
|
|
82
82
|
## **📝 日志等级**
|
|
83
83
|
|
|
@@ -94,7 +94,27 @@ main();
|
|
|
94
94
|
|
|
95
95
|
***
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# 💾 **数据模块**
|
|
100
|
+
|
|
101
|
+
## **📋 对象列表接口**
|
|
102
|
+
|
|
103
|
+
### **获取所有对象(数据表)**
|
|
104
|
+
|
|
105
|
+
```JavaScript
|
|
106
|
+
const res = await client.object.list({
|
|
107
|
+
offset: 0,
|
|
108
|
+
limit: 100,
|
|
109
|
+
filter: {
|
|
110
|
+
type: 'custom',
|
|
111
|
+
quickQuery: 'store'
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
console.log(res);
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
***
|
|
98
118
|
|
|
99
119
|
## **🔍 查询接口**
|
|
100
120
|
|
|
@@ -151,7 +171,7 @@ console.log('Items:', items);
|
|
|
151
171
|
|
|
152
172
|
***
|
|
153
173
|
|
|
154
|
-
|
|
174
|
+
|
|
155
175
|
|
|
156
176
|
|
|
157
177
|
***
|
|
@@ -188,7 +208,7 @@ console.log('Items:', items);
|
|
|
188
208
|
```
|
|
189
209
|
|
|
190
210
|
|
|
191
|
-
|
|
211
|
+
|
|
192
212
|
## **✏️ 更新接口**
|
|
193
213
|
|
|
194
214
|
### **单条更新**
|
|
@@ -221,7 +241,7 @@ console.log(res);
|
|
|
221
241
|
|
|
222
242
|
***
|
|
223
243
|
|
|
224
|
-
|
|
244
|
+
|
|
225
245
|
|
|
226
246
|
## **🗑️ 删除接口**
|
|
227
247
|
|
|
@@ -251,68 +271,220 @@ console.log(res);
|
|
|
251
271
|
|
|
252
272
|
***
|
|
253
273
|
|
|
254
|
-
## **🛠️ 高级**
|
|
255
274
|
|
|
256
|
-
|
|
275
|
+
|
|
276
|
+
## **📊 对象元数据接口**
|
|
277
|
+
|
|
278
|
+
### **获取指定对象字段元数据**
|
|
257
279
|
|
|
258
280
|
```JavaScript
|
|
259
|
-
|
|
281
|
+
const res = await client.object.metadata.field({
|
|
282
|
+
object_name: '_user',
|
|
283
|
+
field_name: '_id'
|
|
284
|
+
});
|
|
285
|
+
console.log(res);
|
|
260
286
|
```
|
|
261
287
|
|
|
262
|
-
###
|
|
288
|
+
### **获取指定对象所有字段信息**
|
|
263
289
|
|
|
264
290
|
```JavaScript
|
|
265
|
-
|
|
291
|
+
const res = await client.object.metadata.fields({
|
|
292
|
+
object_name: 'object_store'
|
|
293
|
+
});
|
|
294
|
+
console.log(res);
|
|
266
295
|
```
|
|
267
296
|
|
|
268
297
|
***
|
|
269
298
|
|
|
270
|
-
<br>
|
|
271
299
|
|
|
272
|
-
## **💡 备注**
|
|
273
300
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
301
|
+
# **📎 附件模块**
|
|
302
|
+
|
|
303
|
+
## **文件操作**
|
|
304
|
+
|
|
305
|
+
### **上传文件**
|
|
306
|
+
|
|
307
|
+
```JavaScript
|
|
308
|
+
const fs = require('fs');
|
|
309
|
+
|
|
310
|
+
const res = await client.attachment.file.upload({
|
|
311
|
+
file: fs.createReadStream('/path/to/file.zip')
|
|
312
|
+
});
|
|
313
|
+
console.log(res);
|
|
314
|
+
// 返回: { code: "0", msg: "success", data: { fileId, type, name, size } }
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### **下载文件**
|
|
318
|
+
|
|
319
|
+
```JavaScript
|
|
320
|
+
const fileData = await client.attachment.file.download({
|
|
321
|
+
file_id: '625d2f602af94d46972073db32a99ed2'
|
|
322
|
+
});
|
|
323
|
+
// 返回文件二进制流
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### **删除文件**
|
|
327
|
+
|
|
328
|
+
```JavaScript
|
|
329
|
+
const res = await client.attachment.file.delete({
|
|
330
|
+
file_id: '625d2f602af94d46972073db32a99ed2'
|
|
331
|
+
});
|
|
332
|
+
console.log(res);
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## **头像图片操作**
|
|
336
|
+
|
|
337
|
+
### **上传头像图片**
|
|
338
|
+
|
|
339
|
+
```JavaScript
|
|
340
|
+
const fs = require('fs');
|
|
341
|
+
|
|
342
|
+
const res = await client.attachment.avatar.upload({
|
|
343
|
+
image: fs.createReadStream('/path/to/avatar.jpg')
|
|
344
|
+
});
|
|
345
|
+
console.log(res);
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### **下载头像图片**
|
|
349
|
+
|
|
350
|
+
```JavaScript
|
|
351
|
+
const imageData = await client.attachment.avatar.download({
|
|
352
|
+
image_id: 'c70d03b21d3c40468ee710d984cfb7a8_o'
|
|
353
|
+
});
|
|
354
|
+
// 返回图片二进制流
|
|
355
|
+
```
|
|
280
356
|
|
|
281
357
|
***
|
|
282
358
|
|
|
283
|
-
<br>
|
|
284
359
|
|
|
285
|
-
<br>
|
|
286
360
|
|
|
287
|
-
|
|
361
|
+
# **💽 全局数据模块**
|
|
362
|
+
|
|
363
|
+
## **全局选项**
|
|
364
|
+
|
|
365
|
+
### **查询全局选项详情**
|
|
366
|
+
|
|
367
|
+
```JavaScript
|
|
368
|
+
const res = await client.global.options.detail({
|
|
369
|
+
api_name: 'global_option_abc'
|
|
370
|
+
});
|
|
371
|
+
console.log(res);
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### **查询全局选项列表**
|
|
375
|
+
|
|
376
|
+
```JavaScript
|
|
377
|
+
const res = await client.global.options.list({
|
|
378
|
+
limit: 10,
|
|
379
|
+
offset: 0,
|
|
380
|
+
filter: { quickQuery: 'Sample Text' }
|
|
381
|
+
});
|
|
382
|
+
console.log(res);
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### **分页查询所有全局选项**
|
|
386
|
+
|
|
387
|
+
```JavaScript
|
|
388
|
+
const { total, items } = await client.global.options.listWithIterator({
|
|
389
|
+
limit: 100,
|
|
390
|
+
filter: { quickQuery: 'Sample Text' }
|
|
391
|
+
});
|
|
392
|
+
console.log('Total:', total);
|
|
393
|
+
console.log('Items:', items);
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## **环境变量**
|
|
397
|
+
|
|
398
|
+
### **查询环境变量详情**
|
|
399
|
+
|
|
400
|
+
```JavaScript
|
|
401
|
+
const res = await client.global.variables.detail({
|
|
402
|
+
api_name: 'global_variable_abc'
|
|
403
|
+
});
|
|
404
|
+
console.log(res);
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### **查询环境变量列表**
|
|
408
|
+
|
|
409
|
+
```JavaScript
|
|
410
|
+
const res = await client.global.variables.list({
|
|
411
|
+
limit: 10,
|
|
412
|
+
offset: 0,
|
|
413
|
+
filter: { quickQuery: 'Sample Text' }
|
|
414
|
+
});
|
|
415
|
+
console.log(res);
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### **分页查询所有环境变量**
|
|
419
|
+
|
|
420
|
+
```JavaScript
|
|
421
|
+
const { total, items } = await client.global.variables.listWithIterator({
|
|
422
|
+
limit: 100,
|
|
423
|
+
filter: { quickQuery: 'Sample Text' }
|
|
424
|
+
});
|
|
425
|
+
console.log('Total:', total);
|
|
426
|
+
console.log('Items:', items);
|
|
427
|
+
```
|
|
288
428
|
|
|
289
|
-
<br>
|
|
290
429
|
***
|
|
291
430
|
|
|
292
|
-
## **📊 对象元数据接口**
|
|
293
431
|
|
|
294
|
-
|
|
432
|
+
|
|
433
|
+
# **📄 页面模块**
|
|
434
|
+
|
|
435
|
+
### **获取所有页面**
|
|
295
436
|
|
|
296
437
|
```JavaScript
|
|
297
|
-
const res = await client.
|
|
298
|
-
|
|
299
|
-
|
|
438
|
+
const res = await client.page.list({
|
|
439
|
+
limit: 10,
|
|
440
|
+
offset: 0
|
|
300
441
|
});
|
|
301
442
|
console.log(res);
|
|
302
443
|
```
|
|
303
444
|
|
|
304
|
-
###
|
|
445
|
+
### **分页查询所有页面**
|
|
305
446
|
|
|
306
447
|
```JavaScript
|
|
307
|
-
const
|
|
308
|
-
|
|
448
|
+
const { total, items } = await client.page.listWithIterator({
|
|
449
|
+
limit: 100
|
|
450
|
+
});
|
|
451
|
+
console.log('Total:', total);
|
|
452
|
+
console.log('Items:', items);
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### **获取页面详情**
|
|
456
|
+
|
|
457
|
+
```JavaScript
|
|
458
|
+
const res = await client.page.detail({
|
|
459
|
+
page_id: 'appPage_aadd64dlqamdo'
|
|
309
460
|
});
|
|
310
461
|
console.log(res);
|
|
311
462
|
```
|
|
312
463
|
|
|
464
|
+
### **获取页面访问地址**
|
|
465
|
+
|
|
466
|
+
```JavaScript
|
|
467
|
+
const res = await client.page.url({
|
|
468
|
+
page_id: 'appPage_aadd64dlqamdo',
|
|
469
|
+
pageParams: { var_EzpvJsER: '1234567890' },
|
|
470
|
+
parentPageParams: {
|
|
471
|
+
navId: 'aadd64bapmic2',
|
|
472
|
+
pageApiName: 'page_aaddmtkqgicbg'
|
|
473
|
+
},
|
|
474
|
+
navId: 'aadd64bapmic2',
|
|
475
|
+
tabId: 'tab_legqch3h'
|
|
476
|
+
});
|
|
477
|
+
console.log(res);
|
|
478
|
+
// 返回: { code: "0", msg: "success", data: { link: "https://..." } }
|
|
479
|
+
```
|
|
480
|
+
|
|
313
481
|
***
|
|
314
482
|
|
|
315
|
-
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
# **🏢 部门模块**
|
|
486
|
+
|
|
487
|
+
## **部门 ID 交换**
|
|
316
488
|
|
|
317
489
|
### **单个部门 ID 交换**
|
|
318
490
|
|
|
@@ -338,7 +510,55 @@ console.log(res);
|
|
|
338
510
|
|
|
339
511
|
***
|
|
340
512
|
|
|
341
|
-
|
|
513
|
+
<br>
|
|
514
|
+
|
|
515
|
+
# **🔄 自动化流程模块**
|
|
516
|
+
|
|
517
|
+
## **V1 版本 - 执行流程**
|
|
518
|
+
|
|
519
|
+
```JavaScript
|
|
520
|
+
const res = await client.automation.v1.execute({
|
|
521
|
+
flow_api_name: 'automation_cd05fdab67d',
|
|
522
|
+
operator: {
|
|
523
|
+
_id: 100,
|
|
524
|
+
email: 'sample@feishu.cn'
|
|
525
|
+
},
|
|
526
|
+
params: {
|
|
527
|
+
varRecord_ab67d031d44: {
|
|
528
|
+
_id: 100
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
console.log(res);
|
|
533
|
+
// 返回: { code: "0", msg: "success", data: { errMsg, executionId, status, data, errCode } }
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
## **V2 版本 - 执行流程**
|
|
537
|
+
|
|
538
|
+
V2 版本支持流程重新提交功能。
|
|
539
|
+
|
|
540
|
+
```JavaScript
|
|
541
|
+
const res = await client.automation.v2.execute({
|
|
542
|
+
flow_api_name: 'automation_a9ec6ee5fb1',
|
|
543
|
+
operator: {
|
|
544
|
+
_id: 100,
|
|
545
|
+
email: 'sample@feishu.cn'
|
|
546
|
+
},
|
|
547
|
+
params: {
|
|
548
|
+
storeId: 100
|
|
549
|
+
},
|
|
550
|
+
is_resubmit: true,
|
|
551
|
+
pre_instance_id: '1835957428957195'
|
|
552
|
+
});
|
|
553
|
+
console.log(res);
|
|
554
|
+
// 返回: { code: "0", msg: "success", data: { errMsg, executionId, status, data, errCode } }
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
***
|
|
558
|
+
|
|
559
|
+
<br>
|
|
560
|
+
|
|
561
|
+
# **☁️ 云函数模块**
|
|
342
562
|
|
|
343
563
|
```JavaScript
|
|
344
564
|
const res = await client.function.invoke({
|
|
@@ -348,4 +568,47 @@ const res = await client.function.invoke({
|
|
|
348
568
|
console.log(res);
|
|
349
569
|
```
|
|
350
570
|
|
|
571
|
+
***
|
|
572
|
+
|
|
573
|
+
<br>
|
|
574
|
+
|
|
575
|
+
## **🛠️ 高级**
|
|
576
|
+
|
|
577
|
+
### **获取当前 token**
|
|
578
|
+
|
|
579
|
+
```JavaScript
|
|
580
|
+
console.log(client.token);
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### **获取 token 过期时间**
|
|
584
|
+
|
|
585
|
+
```JavaScript
|
|
586
|
+
console.log(client.tokenExpireTime); // 返回剩余秒数
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### **获取当前 namespace**
|
|
590
|
+
|
|
591
|
+
```JavaScript
|
|
592
|
+
console.log(client.currentNamespace);
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
***
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
## **💡 备注**
|
|
600
|
+
|
|
601
|
+
- 本 SDK 默认使用 [axios](https://www.npmjs.com/package/axios) 请求。
|
|
602
|
+
|
|
603
|
+
- 内置 [bottleneck](https://www.npmjs.com/package/bottleneck) 进行请求限流。
|
|
604
|
+
|
|
605
|
+
- 日志打印默认使用 console.log 并带时间戳,可通过 setLoggerLevel 动态控制输出等级。
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
***
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
> 由 [aPaaS OAPI Client SDK](https://www.npmjs.com/package/apaas-oapi-client) 提供支持,如有问题请提交 Issue 反馈。
|
|
613
|
+
|
|
351
614
|
---
|
package/dist/index.d.ts
CHANGED
|
@@ -277,6 +277,235 @@ declare class Client {
|
|
|
277
277
|
params: any;
|
|
278
278
|
}) => Promise<any>;
|
|
279
279
|
};
|
|
280
|
+
/**
|
|
281
|
+
* 页面模块
|
|
282
|
+
*/
|
|
283
|
+
page: {
|
|
284
|
+
/**
|
|
285
|
+
* 获取所有页面
|
|
286
|
+
* @param params 请求参数 { limit: number (max 200), offset: number }
|
|
287
|
+
* @returns 接口返回结果
|
|
288
|
+
*/
|
|
289
|
+
list: (params: {
|
|
290
|
+
limit: number;
|
|
291
|
+
offset: number;
|
|
292
|
+
}) => Promise<any>;
|
|
293
|
+
/**
|
|
294
|
+
* 获取所有页面 - 支持自动分页,获取全部数据
|
|
295
|
+
* @description 该方法会自动处理分页,直到获取所有页面数据
|
|
296
|
+
* @param params 请求参数 { limit?: number }
|
|
297
|
+
* @returns { total, items }
|
|
298
|
+
*/
|
|
299
|
+
listWithIterator: (params?: {
|
|
300
|
+
limit?: number;
|
|
301
|
+
}) => Promise<{
|
|
302
|
+
total: number;
|
|
303
|
+
items: any[];
|
|
304
|
+
}>;
|
|
305
|
+
/**
|
|
306
|
+
* 获取页面详情
|
|
307
|
+
* @param params 请求参数 { page_id: string }
|
|
308
|
+
* @returns 接口返回结果
|
|
309
|
+
*/
|
|
310
|
+
detail: (params: {
|
|
311
|
+
page_id: string;
|
|
312
|
+
}) => Promise<any>;
|
|
313
|
+
/**
|
|
314
|
+
* 获取页面访问地址
|
|
315
|
+
* @param params 请求参数 { page_id: string, pageParams?: any, parentPageParams?: any, navId?: string, tabId?: string }
|
|
316
|
+
* @returns 接口返回结果
|
|
317
|
+
*/
|
|
318
|
+
url: (params: {
|
|
319
|
+
page_id: string;
|
|
320
|
+
pageParams?: any;
|
|
321
|
+
parentPageParams?: any;
|
|
322
|
+
navId?: string;
|
|
323
|
+
tabId?: string;
|
|
324
|
+
}) => Promise<any>;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* 附件模块
|
|
328
|
+
*/
|
|
329
|
+
attachment: {
|
|
330
|
+
/**
|
|
331
|
+
* 文件操作
|
|
332
|
+
*/
|
|
333
|
+
file: {
|
|
334
|
+
/**
|
|
335
|
+
* 上传文件
|
|
336
|
+
* @param params 请求参数 { file: any }
|
|
337
|
+
* @returns 接口返回结果
|
|
338
|
+
*/
|
|
339
|
+
upload: (params: {
|
|
340
|
+
file: any;
|
|
341
|
+
}) => Promise<any>;
|
|
342
|
+
/**
|
|
343
|
+
* 下载文件
|
|
344
|
+
* @param params 请求参数 { file_id: string }
|
|
345
|
+
* @returns 文件二进制流
|
|
346
|
+
*/
|
|
347
|
+
download: (params: {
|
|
348
|
+
file_id: string;
|
|
349
|
+
}) => Promise<any>;
|
|
350
|
+
/**
|
|
351
|
+
* 删除文件
|
|
352
|
+
* @param params 请求参数 { file_id: string }
|
|
353
|
+
* @returns 接口返回结果
|
|
354
|
+
*/
|
|
355
|
+
delete: (params: {
|
|
356
|
+
file_id: string;
|
|
357
|
+
}) => Promise<any>;
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* 头像图片操作
|
|
361
|
+
*/
|
|
362
|
+
avatar: {
|
|
363
|
+
/**
|
|
364
|
+
* 上传头像图片
|
|
365
|
+
* @param params 请求参数 { image: any }
|
|
366
|
+
* @returns 接口返回结果
|
|
367
|
+
*/
|
|
368
|
+
upload: (params: {
|
|
369
|
+
image: any;
|
|
370
|
+
}) => Promise<any>;
|
|
371
|
+
/**
|
|
372
|
+
* 下载头像图片
|
|
373
|
+
* @param params 请求参数 { image_id: string }
|
|
374
|
+
* @returns 图片二进制流
|
|
375
|
+
*/
|
|
376
|
+
download: (params: {
|
|
377
|
+
image_id: string;
|
|
378
|
+
}) => Promise<any>;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* 全局数据模块
|
|
383
|
+
*/
|
|
384
|
+
global: {
|
|
385
|
+
/**
|
|
386
|
+
* 全局选项
|
|
387
|
+
*/
|
|
388
|
+
options: {
|
|
389
|
+
/**
|
|
390
|
+
* 查询全局选项详情
|
|
391
|
+
* @param params 请求参数 { api_name: string }
|
|
392
|
+
* @returns 接口返回结果
|
|
393
|
+
*/
|
|
394
|
+
detail: (params: {
|
|
395
|
+
api_name: string;
|
|
396
|
+
}) => Promise<any>;
|
|
397
|
+
/**
|
|
398
|
+
* 查询全局选项列表
|
|
399
|
+
* @param params 请求参数 { limit: number, offset: number, filter?: { quickQuery?: string } }
|
|
400
|
+
* @returns 接口返回结果
|
|
401
|
+
*/
|
|
402
|
+
list: (params: {
|
|
403
|
+
limit: number;
|
|
404
|
+
offset: number;
|
|
405
|
+
filter?: {
|
|
406
|
+
quickQuery?: string;
|
|
407
|
+
};
|
|
408
|
+
}) => Promise<any>;
|
|
409
|
+
/**
|
|
410
|
+
* 查询所有全局选项 - 支持自动分页,获取全部数据
|
|
411
|
+
* @description 该方法会自动处理分页,直到获取所有全局选项数据
|
|
412
|
+
* @param params 请求参数 { limit?: number, filter?: { quickQuery?: string } }
|
|
413
|
+
* @returns { total, items }
|
|
414
|
+
*/
|
|
415
|
+
listWithIterator: (params?: {
|
|
416
|
+
limit?: number;
|
|
417
|
+
filter?: {
|
|
418
|
+
quickQuery?: string;
|
|
419
|
+
};
|
|
420
|
+
}) => Promise<{
|
|
421
|
+
total: number;
|
|
422
|
+
items: any[];
|
|
423
|
+
}>;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* 环境变量
|
|
427
|
+
*/
|
|
428
|
+
variables: {
|
|
429
|
+
/**
|
|
430
|
+
* 查询环境变量详情
|
|
431
|
+
* @param params 请求参数 { api_name: string }
|
|
432
|
+
* @returns 接口返回结果
|
|
433
|
+
*/
|
|
434
|
+
detail: (params: {
|
|
435
|
+
api_name: string;
|
|
436
|
+
}) => Promise<any>;
|
|
437
|
+
/**
|
|
438
|
+
* 查询环境变量列表
|
|
439
|
+
* @param params 请求参数 { limit: number, offset: number, filter?: { quickQuery?: string } }
|
|
440
|
+
* @returns 接口返回结果
|
|
441
|
+
*/
|
|
442
|
+
list: (params: {
|
|
443
|
+
limit: number;
|
|
444
|
+
offset: number;
|
|
445
|
+
filter?: {
|
|
446
|
+
quickQuery?: string;
|
|
447
|
+
};
|
|
448
|
+
}) => Promise<any>;
|
|
449
|
+
/**
|
|
450
|
+
* 查询所有环境变量 - 支持自动分页,获取全部数据
|
|
451
|
+
* @description 该方法会自动处理分页,直到获取所有环境变量数据
|
|
452
|
+
* @param params 请求参数 { limit?: number, filter?: { quickQuery?: string } }
|
|
453
|
+
* @returns { total, items }
|
|
454
|
+
*/
|
|
455
|
+
listWithIterator: (params?: {
|
|
456
|
+
limit?: number;
|
|
457
|
+
filter?: {
|
|
458
|
+
quickQuery?: string;
|
|
459
|
+
};
|
|
460
|
+
}) => Promise<{
|
|
461
|
+
total: number;
|
|
462
|
+
items: any[];
|
|
463
|
+
}>;
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* 自动化流程模块
|
|
468
|
+
*/
|
|
469
|
+
automation: {
|
|
470
|
+
/**
|
|
471
|
+
* V1 版本
|
|
472
|
+
*/
|
|
473
|
+
v1: {
|
|
474
|
+
/**
|
|
475
|
+
* 执行流程
|
|
476
|
+
* @param params 请求参数 { flow_api_name: string, operator: { _id: number, email: string }, params: any }
|
|
477
|
+
* @returns 接口返回结果
|
|
478
|
+
*/
|
|
479
|
+
execute: (params: {
|
|
480
|
+
flow_api_name: string;
|
|
481
|
+
operator: {
|
|
482
|
+
_id: number;
|
|
483
|
+
email: string;
|
|
484
|
+
};
|
|
485
|
+
params: any;
|
|
486
|
+
}) => Promise<any>;
|
|
487
|
+
};
|
|
488
|
+
/**
|
|
489
|
+
* V2 版本
|
|
490
|
+
*/
|
|
491
|
+
v2: {
|
|
492
|
+
/**
|
|
493
|
+
* 执行流程
|
|
494
|
+
* @param params 请求参数 { flow_api_name: string, operator: { _id: number, email: string }, params: any, is_resubmit?: boolean, pre_instance_id?: string }
|
|
495
|
+
* @returns 接口返回结果
|
|
496
|
+
*/
|
|
497
|
+
execute: (params: {
|
|
498
|
+
flow_api_name: string;
|
|
499
|
+
operator: {
|
|
500
|
+
_id: number;
|
|
501
|
+
email: string;
|
|
502
|
+
};
|
|
503
|
+
params: any;
|
|
504
|
+
is_resubmit?: boolean;
|
|
505
|
+
pre_instance_id?: string;
|
|
506
|
+
}) => Promise<any>;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
280
509
|
}
|
|
281
510
|
export declare const apaas: {
|
|
282
511
|
Client: typeof Client;
|