digitalsee-ai-flow-cli 0.2.1 → 0.6.15-beta
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/.github/workflows/publish.yml +1 -0
- package/README.md +285 -17
- package/dist/api/link.d.ts.map +1 -1
- package/dist/api/link.js +4 -0
- package/dist/api/link.js.map +1 -1
- package/dist/api/mapping.d.ts.map +1 -0
- package/dist/api/mapping.js +95 -0
- package/dist/api/mapping.js.map +1 -0
- package/dist/api/node.d.ts.map +1 -1
- package/dist/api/node.js +4 -0
- package/dist/api/node.js.map +1 -1
- package/dist/api/org.d.ts.map +1 -0
- package/dist/api/org.js +21 -0
- package/dist/api/org.js.map +1 -0
- package/dist/commands/flow/list.d.ts.map +1 -1
- package/dist/commands/flow/list.js +13 -1
- package/dist/commands/flow/list.js.map +1 -1
- package/dist/commands/flow/mapping.d.ts.map +1 -0
- package/dist/commands/flow/mapping.js +734 -0
- package/dist/commands/flow/mapping.js.map +1 -0
- package/dist/commands/flow/node.d.ts.map +1 -1
- package/dist/commands/flow/node.js +108 -8
- package/dist/commands/flow/node.js.map +1 -1
- package/dist/commands/flow/test.d.ts.map +1 -1
- package/dist/commands/flow/test.js +0 -30
- package/dist/commands/flow/test.js.map +1 -1
- package/dist/commands/flow/update.d.ts.map +1 -1
- package/dist/commands/flow/update.js +31 -5
- package/dist/commands/flow/update.js.map +1 -1
- package/dist/commands/flow.d.ts.map +1 -1
- package/dist/commands/flow.js +2 -0
- package/dist/commands/flow.js.map +1 -1
- package/dist/commands/link/account-linking.d.ts.map +1 -0
- package/dist/commands/link/account-linking.js +123 -0
- package/dist/commands/link/account-linking.js.map +1 -0
- package/dist/commands/link/check-mapping.d.ts.map +1 -0
- package/dist/commands/link/check-mapping.js +37 -0
- package/dist/commands/link/check-mapping.js.map +1 -0
- package/dist/commands/link/create.d.ts.map +1 -1
- package/dist/commands/link/create.js +22 -4
- package/dist/commands/link/create.js.map +1 -1
- package/dist/commands/link.d.ts.map +1 -1
- package/dist/commands/link.js +4 -0
- package/dist/commands/link.js.map +1 -1
- package/dist/commands/org.d.ts.map +1 -0
- package/dist/commands/org.js +248 -0
- package/dist/commands/org.js.map +1 -0
- package/dist/commands/sync/check-mapping.d.ts.map +1 -0
- package/dist/commands/sync/check-mapping.js +37 -0
- package/dist/commands/sync/check-mapping.js.map +1 -0
- package/dist/commands/sync/create.d.ts.map +1 -1
- package/dist/commands/sync/create.js +22 -4
- package/dist/commands/sync/create.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +2 -0
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/org.d.ts.map +1 -0
- package/dist/types/org.js +5 -0
- package/dist/types/org.js.map +1 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +23 -0
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +4 -0
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/updateCheck.d.ts.map +1 -1
- package/dist/utils/updateCheck.js +9 -0
- package/dist/utils/updateCheck.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/dip.d.ts.map +0 -1
- package/dist/api/dip.js +0 -14
- package/dist/api/dip.js.map +0 -1
package/README.md
CHANGED
|
@@ -131,8 +131,16 @@ ai-flow config reset --project # 重置项目级配置
|
|
|
131
131
|
ai-flow flow list
|
|
132
132
|
ai-flow flow list --page 1 --size 20
|
|
133
133
|
ai-flow flow list --filter "测试"
|
|
134
|
+
ai-flow flow list --json
|
|
134
135
|
```
|
|
135
136
|
|
|
137
|
+
| 选项 | 必填 | 默认值 | 说明 |
|
|
138
|
+
|------|------|--------|------|
|
|
139
|
+
| `--page` | 否 | `1` | 页码 |
|
|
140
|
+
| `--size` | 否 | `20` | 每页数量 |
|
|
141
|
+
| `--filter` | 否 | — | 名称过滤 |
|
|
142
|
+
| `--json` | 否 | — | 以 JSON 格式输出 `{ items, total, page, size }` |
|
|
143
|
+
|
|
136
144
|
### flow create
|
|
137
145
|
|
|
138
146
|
创建新的连接流。支持通过 `--data`/`--data-file` 一次性传入完整流定义(含 nodes + connections)实现原子创建。
|
|
@@ -168,11 +176,13 @@ ai-flow flow create --name "我的流" --json
|
|
|
168
176
|
|
|
169
177
|
```bash
|
|
170
178
|
ai-flow flow update <flowId> --name "新名称"
|
|
179
|
+
ai-flow flow update <flowId> --name "新名称" --json
|
|
171
180
|
```
|
|
172
181
|
|
|
173
182
|
| 选项 | 必填 | 说明 |
|
|
174
183
|
|------|------|------|
|
|
175
184
|
| `--name` | 否 | 新的连接流名称 |
|
|
185
|
+
| `--json` | 否 | 以 JSON 格式输出 `{ ok, id, message }` |
|
|
176
186
|
|
|
177
187
|
### flow analyze
|
|
178
188
|
|
|
@@ -225,13 +235,13 @@ ai-flow flow analyze <flowId> --json # JSON 格式(含 $schema
|
|
|
225
235
|
|
|
226
236
|
### flow test
|
|
227
237
|
|
|
228
|
-
|
|
238
|
+
测试运行指定节点。支持断言校验。
|
|
239
|
+
|
|
240
|
+
> 如需修改节点配置后再测试,请先使用 `flow node update --patch` 更新配置。如需设置节点样本输出供下游节点引用,请使用 `flow node update --sample-output`。
|
|
229
241
|
|
|
230
242
|
```bash
|
|
231
243
|
ai-flow flow test <nodeId>
|
|
232
244
|
ai-flow flow test <nodeId> --flow-id <flowId>
|
|
233
|
-
ai-flow flow test <nodeId> --data-file ./config.json
|
|
234
|
-
ai-flow flow test <nodeId> --data '{"properties": {"millisecond": "2000"}}'
|
|
235
245
|
|
|
236
246
|
# 带断言:期望 status_code 为 200
|
|
237
247
|
ai-flow flow test <nodeId> --expect '{"status_code": 200}'
|
|
@@ -243,20 +253,9 @@ ai-flow flow test <nodeId> --json
|
|
|
243
253
|
| 选项 | 必填 | 说明 |
|
|
244
254
|
|------|------|------|
|
|
245
255
|
| `--flow-id` | 否 | 连接流 ID |
|
|
246
|
-
| `--data` | 否 | JSON 字符串,覆盖节点配置值 |
|
|
247
|
-
| `--data-file` | 否 | JSON 文件路径,覆盖节点配置值 |
|
|
248
256
|
| `--expect` | 否 | JSON 格式断言,如 `{"status_code": 200}` |
|
|
249
257
|
| `--json` | 否 | 以 JSON 格式输出 `{ ok, data, expectErrors }` |
|
|
250
258
|
|
|
251
|
-
`config.json` 示例(配置值包裹在 `properties` 中):
|
|
252
|
-
```json
|
|
253
|
-
{
|
|
254
|
-
"properties": {
|
|
255
|
-
"millisecond": "2000"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
259
|
### flow node create
|
|
261
260
|
|
|
262
261
|
在连接流中创建新节点。
|
|
@@ -298,6 +297,7 @@ ai-flow flow node create \
|
|
|
298
297
|
--flow-id <flowId> \
|
|
299
298
|
--connector-id <connectorId> \
|
|
300
299
|
--action-id <actionId> \
|
|
300
|
+
--name "查询用户数据" \
|
|
301
301
|
--error-handler-file ./error-handler.json
|
|
302
302
|
```
|
|
303
303
|
|
|
@@ -309,6 +309,7 @@ ai-flow flow node create \
|
|
|
309
309
|
| `--trigger` | 否 | `false` | 作为触发器节点,流无节点时会提示启用 |
|
|
310
310
|
| `--node-type` | 否 | 首个节点 `StartEventNode`,否则 `ActionNode` | 节点类型或动作类型 |
|
|
311
311
|
| `--account-id` | 否 | — | 账号实例 ID(需要账号鉴权时指定)。若仅 1 个可用账号则自动选择;多个账号时输出列表由调用方选择 |
|
|
312
|
+
| `--name` | 否 | — | 节点名称,描述节点用途,保存到 `action_name` |
|
|
312
313
|
| `--error-handler-file` | 否 | — | 错误处理配置 JSON 文件 |
|
|
313
314
|
| `--data-file` | 否 | — | JSON 文件,覆盖配置字段值 |
|
|
314
315
|
| `--data` | 否 | — | JSON 字符串,覆盖配置字段值(与 `--data-file` 互斥) |
|
|
@@ -375,7 +376,7 @@ timeout 超时时间(ms) NUMBER 否 5000 -
|
|
|
375
376
|
|
|
376
377
|
### flow node update
|
|
377
378
|
|
|
378
|
-
更新连接流中的节点配置。使用 `--patch`/`--patch-file` 做深度合并更新(`--data`
|
|
379
|
+
更新连接流中的节点配置。使用 `--patch`/`--patch-file` 做深度合并更新(`--data` 已废弃)。支持通过 `--sample-output` 设置节点样本输出,供下游节点测试时引用变量。
|
|
379
380
|
|
|
380
381
|
```bash
|
|
381
382
|
# 通过 JSON 文件 patch 更新配置
|
|
@@ -406,6 +407,16 @@ ai-flow flow node update <nodeId> --flow-id <flowId> --connector-id <id> --actio
|
|
|
406
407
|
ai-flow flow node update <nodeId> --flow-id <flowId> --account-id <accountId>
|
|
407
408
|
ai-flow flow node update <nodeId> --flow-id <flowId> --error-handler-file ./error-handler.json
|
|
408
409
|
|
|
410
|
+
# 设置样本输出(下游节点可通过 {{N<nodeId>.field}} 引用)
|
|
411
|
+
ai-flow flow node update <nodeId> --flow-id <flowId> --sample-output '{"key":"value"}'
|
|
412
|
+
ai-flow flow node update <nodeId> --flow-id <flowId> --sample-output-file ./sample.json
|
|
413
|
+
|
|
414
|
+
# 同时 patch 配置并设置样本输出
|
|
415
|
+
ai-flow flow node update <nodeId> \
|
|
416
|
+
--flow-id <flowId> \
|
|
417
|
+
--patch-file ./config.json \
|
|
418
|
+
--sample-output '{"status":"ok"}'
|
|
419
|
+
|
|
409
420
|
# JSON 输出
|
|
410
421
|
ai-flow flow node update <nodeId> --flow-id <flowId> --patch-file ./config.json --json
|
|
411
422
|
```
|
|
@@ -424,8 +435,12 @@ ai-flow flow node update <nodeId> --flow-id <flowId> --patch-file ./config.json
|
|
|
424
435
|
| `--action-id` | 否 | 更换动作 ID |
|
|
425
436
|
| `--account-id` | 否 | 更换账号实例 ID |
|
|
426
437
|
| `--error-handler-file` | 否 | 错误处理配置 JSON 文件 |
|
|
438
|
+
| `--sample-output` | 否 | JSON 字符串,设置节点样本输出供下游节点引用 |
|
|
439
|
+
| `--sample-output-file` | 否 | JSON 文件路径,读取样本输出 |
|
|
427
440
|
| `--json` | 否 | 以 JSON 格式输出 `{ ok, id, message }` |
|
|
428
441
|
|
|
442
|
+
> `--sample-output`/`--sample-output-file` 用于"忽略调试"场景:当上游节点不便真实执行时,可手动设定其输出值,下游节点通过 `{{N<nodeId>.<field>}}` 引用该样本数据。
|
|
443
|
+
|
|
429
444
|
> `--patch` 与 `--data` 的区别:`--patch` 与现有配置做深度合并,语义明确为 patch 操作;`--data` 为旧参数,语义不统一,已废弃。
|
|
430
445
|
|
|
431
446
|
### flow node delete
|
|
@@ -695,6 +710,138 @@ ai-flow flow log show --id <logId> --json
|
|
|
695
710
|
| `--child-page / --child-size` | 循环迭代分页 |
|
|
696
711
|
| `--json` | 以 JSON 格式输出(敏感字段自动脱敏) |
|
|
697
712
|
|
|
713
|
+
### flow mapping
|
|
714
|
+
|
|
715
|
+
管理通讯录集成/同步连接流的属性映射配置,支持用户、部门、角色三种实体类型的字段映射增删改查。
|
|
716
|
+
|
|
717
|
+
> 仅 `business_type=5`(通讯录集成)和 `business_type=6`(通讯录同步)的连接流支持属性映射。
|
|
718
|
+
|
|
719
|
+
#### flow mapping show
|
|
720
|
+
|
|
721
|
+
查看属性映射配置(含已配置的映射表和可用字段列表)。
|
|
722
|
+
|
|
723
|
+
```bash
|
|
724
|
+
ai-flow flow mapping show <flowId>
|
|
725
|
+
ai-flow flow mapping show <flowId> --mode configured # 仅显示已配置的映射
|
|
726
|
+
ai-flow flow mapping show <flowId> --mode available # 仅显示可配置的字段
|
|
727
|
+
ai-flow flow mapping show <flowId> --entity user --direction upstream # 仅用户上游映射
|
|
728
|
+
ai-flow flow mapping show <flowId> --side idaas --entity user # IDAAS 用户字段模板
|
|
729
|
+
ai-flow flow mapping show <flowId> --side upstream # 上游端
|
|
730
|
+
ai-flow flow mapping show <flowId> --json
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
| 选项 | 必填 | 默认值 | 说明 |
|
|
734
|
+
|------|------|--------|------|
|
|
735
|
+
| `--entity` | 否 | — | 实体类型过滤:`user` / `org` / `role` |
|
|
736
|
+
| `--side` | 否 | — | 聚焦端:`upstream`(上游端)/ `idaas`(IDAAS端)/ `downstream`(下游端)。与 `--direction` 互斥 |
|
|
737
|
+
| `--direction` | 否 | `all` | 方向过滤:`upstream`(上游→IDAAS)/ `downstream`(IDAAS→下游)/ `all`(全部) |
|
|
738
|
+
| `--mode` | 否 | `all` | 显示模式:`all`(全部)/ `configured`(仅已配置映射)/ `available`(仅可配置字段) |
|
|
739
|
+
| `--json` | 否 | — | 以 JSON 格式输出映射数据(有过滤时仅输出相关字段,去除 null 元数据) |
|
|
740
|
+
|
|
741
|
+
> 引用类型根据 flow 的 `business_type` 自动推导:通讯录集成(bt=5)→ `CONNECTOR`,通讯录同步(bt=6)→ `PUSHCONNECTOR`。
|
|
742
|
+
|
|
743
|
+
#### flow mapping add
|
|
744
|
+
|
|
745
|
+
新增一条属性映射。方向由 flow 的 `business_type` 自动推导(5=上游→IDAAS,6=IDAAS→下游)。source 和 target 均可传字段名或 JS 表达式。
|
|
746
|
+
|
|
747
|
+
```bash
|
|
748
|
+
# 字段名映射:外部系统字段 mail → IDAAS 字段 email
|
|
749
|
+
ai-flow flow mapping add <flowId> \
|
|
750
|
+
--entity user \
|
|
751
|
+
--source-field mail \
|
|
752
|
+
--target-field email
|
|
753
|
+
|
|
754
|
+
# source 侧 JS 表达式
|
|
755
|
+
ai-flow flow mapping add <flowId> \
|
|
756
|
+
--entity user \
|
|
757
|
+
--expression "item.name" \
|
|
758
|
+
--target-field email
|
|
759
|
+
|
|
760
|
+
# source 和 target 均为 JS 表达式
|
|
761
|
+
ai-flow flow mapping add <flowId> \
|
|
762
|
+
--entity user \
|
|
763
|
+
--expression "item.name" \
|
|
764
|
+
--target-expression "item.email + '@domain.com'"
|
|
765
|
+
|
|
766
|
+
# 使用 update 方式
|
|
767
|
+
ai-flow flow mapping add <flowId> \
|
|
768
|
+
--entity user --source-field mail --target-field email --method update
|
|
769
|
+
|
|
770
|
+
# JSON 输出
|
|
771
|
+
ai-flow flow mapping add <flowId> --entity org --source-field dept --target-field department --json
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
| 选项 | 必填 | 默认值 | 说明 |
|
|
775
|
+
|------|------|--------|------|
|
|
776
|
+
| `--entity` | 是 | — | 实体类型:`user` / `org` / `role` |
|
|
777
|
+
| `--source-field` | 二选一 | — | 外部系统字段名(与 `--expression` 互斥) |
|
|
778
|
+
| `--expression` | 二选一 | — | source 侧 JS 表达式(与 `--source-field` 互斥) |
|
|
779
|
+
| `--target-field` | 二选一 | — | IDAAS 字段名(与 `--target-expression` 互斥) |
|
|
780
|
+
| `--target-expression` | 二选一 | — | target 侧 JS 表达式(与 `--target-field` 互斥) |
|
|
781
|
+
| `--method` | 否 | `create` | 映射方式:`create` / `update` |
|
|
782
|
+
| `--type` | 否 | 自动推导 | 引用类型,默认从 flow 的 `business_type` 推导 |
|
|
783
|
+
| `--json` | 否 | — | 以 JSON 格式输出 `{ ok, message, entry, flowId }` |
|
|
784
|
+
|
|
785
|
+
#### flow mapping set
|
|
786
|
+
|
|
787
|
+
修改已有映射。通过 `--name`(IDAAS 字段名)定位条目。方向由 flow 的 `business_type` 自动推导。支持将 source/target 侧切换为字段名或 JS 表达式。
|
|
788
|
+
|
|
789
|
+
```bash
|
|
790
|
+
# 修改映射方式
|
|
791
|
+
ai-flow flow mapping set <flowId> --entity user --name email --method update
|
|
792
|
+
|
|
793
|
+
# 修改外部系统字段
|
|
794
|
+
ai-flow flow mapping set <flowId> --entity user --name email --source-field newMail
|
|
795
|
+
|
|
796
|
+
# 切换 source 侧为 JS 表达式
|
|
797
|
+
ai-flow flow mapping set <flowId> --entity user --name email --expression "item.displayName"
|
|
798
|
+
|
|
799
|
+
# 切换 target 侧为 JS 表达式
|
|
800
|
+
ai-flow flow mapping set <flowId> --entity user --name email --target-expression "item.email"
|
|
801
|
+
|
|
802
|
+
# JSON 输出
|
|
803
|
+
ai-flow flow mapping set <flowId> --entity user --name email --method update --json
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
| 选项 | 必填 | 默认值 | 说明 |
|
|
807
|
+
|------|------|--------|------|
|
|
808
|
+
| `--entity` | 是 | — | 实体类型:`user` / `org` / `role` |
|
|
809
|
+
| `--name` | 是 | — | IDAAS 字段名,用于定位映射条目 |
|
|
810
|
+
| `--source-field` | 否 | — | 新的外部系统字段名(与 `--expression` 互斥) |
|
|
811
|
+
| `--expression` | 否 | — | 新的 source 侧 JS 表达式(与 `--source-field` 互斥) |
|
|
812
|
+
| `--target-field` | 否 | — | 新的 IDAAS 字段名(与 `--target-expression` 互斥) |
|
|
813
|
+
| `--target-expression` | 否 | — | 新的 target 侧 JS 表达式(与 `--target-field` 互斥) |
|
|
814
|
+
| `--method` | 否 | — | 映射方式:`create` / `update` |
|
|
815
|
+
| `--type` | 否 | 自动推导 | 引用类型,默认从 flow 的 `business_type` 推导 |
|
|
816
|
+
| `--json` | 否 | — | 以 JSON 格式输出 `{ ok, message, old, updated, flowId }` |
|
|
817
|
+
|
|
818
|
+
> 至少需提供一个修改项。
|
|
819
|
+
|
|
820
|
+
#### flow mapping delete
|
|
821
|
+
|
|
822
|
+
删除一条属性映射。通过 `--name`(IDAAS 字段名)定位条目。方向由 flow 的 `business_type` 自动推导。
|
|
823
|
+
|
|
824
|
+
```bash
|
|
825
|
+
ai-flow flow mapping delete <flowId> --entity user --name email
|
|
826
|
+
ai-flow flow mapping delete <flowId> --entity org --name dept --json
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
| 选项 | 必填 | 默认值 | 说明 |
|
|
830
|
+
|------|------|--------|------|
|
|
831
|
+
| `--entity` | 是 | — | 实体类型:`user` / `org` / `role` |
|
|
832
|
+
| `--name` | 是 | — | IDAAS 字段名,用于定位映射条目 |
|
|
833
|
+
| `--type` | 否 | 自动推导 | 引用类型,默认从 flow 的 `business_type` 推导 |
|
|
834
|
+
| `--json` | 否 | — | 以 JSON 格式输出 `{ ok, message, name, flowId }` |
|
|
835
|
+
|
|
836
|
+
#### flow mapping check
|
|
837
|
+
|
|
838
|
+
检查映射是否已完成配置。
|
|
839
|
+
|
|
840
|
+
```bash
|
|
841
|
+
ai-flow flow mapping check <flowId>
|
|
842
|
+
ai-flow flow mapping check <flowId> --json
|
|
843
|
+
```
|
|
844
|
+
|
|
698
845
|
---
|
|
699
846
|
|
|
700
847
|
## 身份自动化
|
|
@@ -757,6 +904,27 @@ ai-flow link log show --id <logId> --json
|
|
|
757
904
|
| `--detail-op` | 操作类型筛选:CREATED / UPDATED / DELETED |
|
|
758
905
|
| `--detail-name` | 资源名称模糊匹配 |
|
|
759
906
|
|
|
907
|
+
#### 账号关联配置
|
|
908
|
+
|
|
909
|
+
```bash
|
|
910
|
+
# 展示账号关联可选配置(上游连接器字段 + IDAAS 用户字段)
|
|
911
|
+
ai-flow link account-linking show <flowId>
|
|
912
|
+
ai-flow link account-linking show <flowId> --json
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
输出上游连接器字段(字段名、显示名、EXP、类型)和 IDAAS 账号关联字段(字段名、显示名、类型)。
|
|
916
|
+
|
|
917
|
+
#### 映射状态检查
|
|
918
|
+
|
|
919
|
+
```bash
|
|
920
|
+
ai-flow link check-mapping <flowId>
|
|
921
|
+
ai-flow link check-mapping <flowId> --json
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
| 选项 | 必填 | 说明 |
|
|
925
|
+
|------|------|------|
|
|
926
|
+
| `--json` | 否 | 以 JSON 格式输出 `{ ok, configured, flowId }` |
|
|
927
|
+
|
|
760
928
|
### sync — 身份下游自动化(通讯录同步)
|
|
761
929
|
|
|
762
930
|
从 IDaaS 推送组织与用户数据到外部系统。
|
|
@@ -811,6 +979,17 @@ ai-flow sync log show --id <logId> --json
|
|
|
811
979
|
|
|
812
980
|
> 前置检查:查看日志前检查连接器是否已执行过同步/推送,如有问题仅提醒不阻塞。
|
|
813
981
|
|
|
982
|
+
#### 映射状态检查
|
|
983
|
+
|
|
984
|
+
```bash
|
|
985
|
+
ai-flow sync check-mapping <flowId>
|
|
986
|
+
ai-flow sync check-mapping <flowId> --json
|
|
987
|
+
```
|
|
988
|
+
|
|
989
|
+
| 选项 | 必填 | 说明 |
|
|
990
|
+
|------|------|------|
|
|
991
|
+
| `--json` | 否 | 以 JSON 格式输出 `{ ok, configured, flowId }` |
|
|
992
|
+
|
|
814
993
|
---
|
|
815
994
|
|
|
816
995
|
## 知识库
|
|
@@ -908,6 +1087,75 @@ docs/
|
|
|
908
1087
|
|
|
909
1088
|
---
|
|
910
1089
|
|
|
1090
|
+
## 组织架构
|
|
1091
|
+
|
|
1092
|
+
浏览和选择组织树节点,用于账号关联时指定挂载点。
|
|
1093
|
+
|
|
1094
|
+
### org tree list
|
|
1095
|
+
|
|
1096
|
+
列出组织树节点(默认从根节点开始),支持指定起始节点和递归深度。
|
|
1097
|
+
|
|
1098
|
+
```bash
|
|
1099
|
+
ai-flow org tree list
|
|
1100
|
+
ai-flow org tree list --id <orgId>
|
|
1101
|
+
ai-flow org tree list --depth 0 # 展开全部子节点
|
|
1102
|
+
ai-flow org tree list --depth 2 # 下钻 2 层
|
|
1103
|
+
ai-flow org tree list --json
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
| 选项 | 必填 | 默认值 | 说明 |
|
|
1107
|
+
|------|------|--------|------|
|
|
1108
|
+
| `--id` | 否 | 根节点 `-1` | 起始组织 ID |
|
|
1109
|
+
| `--depth` | 否 | `1` | 递归深度,`0`=全部,`1`=仅直接子节点 |
|
|
1110
|
+
| `--json` | 否 | — | 以 JSON 格式输出树节点数组 |
|
|
1111
|
+
|
|
1112
|
+
输出示例:
|
|
1113
|
+
```
|
|
1114
|
+
==================== 组织节点 (orgId: -1, depth: 1) ====================
|
|
1115
|
+
ID 名称 描述 子节点 只读
|
|
1116
|
+
org-001 数犀科技 公司根节点 有 是
|
|
1117
|
+
org-002 技术部 技术部门 有 否
|
|
1118
|
+
org-003 产品部 产品部门 无 否
|
|
1119
|
+
|
|
1120
|
+
ℹ 共 3 个节点
|
|
1121
|
+
```
|
|
1122
|
+
|
|
1123
|
+
### org tree search
|
|
1124
|
+
|
|
1125
|
+
按名称搜索组织节点。
|
|
1126
|
+
|
|
1127
|
+
```bash
|
|
1128
|
+
ai-flow org tree search <keyword>
|
|
1129
|
+
ai-flow org tree search 技术
|
|
1130
|
+
ai-flow org tree search 产品 --json
|
|
1131
|
+
```
|
|
1132
|
+
|
|
1133
|
+
| 选项 | 必填 | 说明 |
|
|
1134
|
+
|------|------|------|
|
|
1135
|
+
| `--json` | 否 | 以 JSON 格式输出搜索结果 |
|
|
1136
|
+
|
|
1137
|
+
### org tree select
|
|
1138
|
+
|
|
1139
|
+
交互式浏览并选择组织节点,选中后输出 JSON 到 stdout(导航 UI 走 stderr),适合 Agent 调用。
|
|
1140
|
+
|
|
1141
|
+
```bash
|
|
1142
|
+
ai-flow org tree select
|
|
1143
|
+
ai-flow org tree select --id <orgId>
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
操作方式:
|
|
1147
|
+
- 输入编号进入子节点
|
|
1148
|
+
- 直接回车选中当前节点
|
|
1149
|
+
- `b` 返回上级
|
|
1150
|
+
- `q` 退出
|
|
1151
|
+
|
|
1152
|
+
选中后 stdout 输出:
|
|
1153
|
+
```json
|
|
1154
|
+
{ "id": "org-002", "name": "技术部", "path": "数犀科技 / 技术部" }
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
911
1159
|
## Shell Completion
|
|
912
1160
|
|
|
913
1161
|
```bash
|
|
@@ -956,9 +1204,26 @@ src/
|
|
|
956
1204
|
│ │ ├── log.ts # flow log (list/show)
|
|
957
1205
|
│ │ ├── draft.ts # flow draft (create/commit/discard)
|
|
958
1206
|
│ │ ├── validate.ts # flow validate
|
|
1207
|
+
│ │ ├── mapping.ts # flow mapping (show/add/set/delete/check)
|
|
959
1208
|
│ │ └── helpers.ts # 共享辅助函数
|
|
960
1209
|
│ ├── link.ts # ai-flow link(身份上游自动化)
|
|
1210
|
+
│ ├── link/
|
|
1211
|
+
│ │ ├── list.ts
|
|
1212
|
+
│ │ ├── create.ts
|
|
1213
|
+
│ │ ├── reset.ts
|
|
1214
|
+
│ │ ├── templates-cmd.ts
|
|
1215
|
+
│ │ ├── log.ts
|
|
1216
|
+
│ │ ├── account-linking.ts
|
|
1217
|
+
│ │ └── check-mapping.ts
|
|
961
1218
|
│ ├── sync.ts # ai-flow sync(身份下游自动化)
|
|
1219
|
+
│ ├── sync/
|
|
1220
|
+
│ │ ├── list.ts
|
|
1221
|
+
│ │ ├── create.ts
|
|
1222
|
+
│ │ ├── reset.ts
|
|
1223
|
+
│ │ ├── templates-cmd.ts
|
|
1224
|
+
│ │ ├── log.ts
|
|
1225
|
+
│ │ └── check-mapping.ts
|
|
1226
|
+
│ ├── org.ts # ai-flow org(组织架构)
|
|
962
1227
|
│ └── knowledge.ts # ai-flow knowledge
|
|
963
1228
|
├── api/
|
|
964
1229
|
│ ├── client.ts # axios 实例(SSL、Token)
|
|
@@ -968,7 +1233,9 @@ src/
|
|
|
968
1233
|
│ ├── knowledge.ts # 分类/节点搜索
|
|
969
1234
|
│ ├── variables.ts # 全局变量 + 输出树
|
|
970
1235
|
│ ├── link.ts # 上游连接器 API
|
|
971
|
-
│
|
|
1236
|
+
│ ├── mapping.ts # 属性映射 API
|
|
1237
|
+
│ ├── sync.ts # 下游连接器 API
|
|
1238
|
+
│ └── org.ts # 组织架构 API
|
|
972
1239
|
├── services/
|
|
973
1240
|
│ ├── flowAnalyzer.ts # DAG 拓扑分析
|
|
974
1241
|
│ └── skillGenerator.ts # Skills 批量生成
|
|
@@ -982,5 +1249,6 @@ src/
|
|
|
982
1249
|
│ ├── output.ts # 终端彩色输出
|
|
983
1250
|
│ └── updateCheck.ts # 版本更新检查
|
|
984
1251
|
└── types/
|
|
985
|
-
|
|
1252
|
+
├── index.ts # TypeScript 类型定义
|
|
1253
|
+
└── org.ts # 组织架构类型
|
|
986
1254
|
```
|
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AAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAChF,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAW9C;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAIpE;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAExE"}
|
package/dist/api/link.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.getLinkConnectorList = getLinkConnectorList;
|
|
|
6
6
|
exports.getLinkSyncLogList = getLinkSyncLogList;
|
|
7
7
|
exports.getLinkSyncLogContent = getLinkSyncLogContent;
|
|
8
8
|
exports.getLinkSyncLogDetail = getLinkSyncLogDetail;
|
|
9
|
+
exports.getUserLinkingProfile = getUserLinkingProfile;
|
|
9
10
|
const client_1 = require("@/api/client");
|
|
10
11
|
function createLinkConnector(data) {
|
|
11
12
|
return (0, client_1.apiPost)('/iam/api/connectors', data);
|
|
@@ -39,4 +40,7 @@ function getLinkSyncLogDetail(logId) {
|
|
|
39
40
|
taskId: logId,
|
|
40
41
|
});
|
|
41
42
|
}
|
|
43
|
+
function getUserLinkingProfile() {
|
|
44
|
+
return (0, client_1.apiGet)('/iam/api/appProfile/user/linking');
|
|
45
|
+
}
|
|
42
46
|
//# sourceMappingURL=link.js.map
|
package/dist/api/link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/api/link.ts"],"names":[],"mappings":";;AAEA,kDAMC;AAED,sCAEC;AAED,oDAEC;AAED,gDAeC;AAED,sDAiBC;AAED,oDAIC;
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/api/link.ts"],"names":[],"mappings":";;AAEA,kDAMC;AAED,sCAEC;AAED,oDA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wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEnE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDigProfileTemplates = getDigProfileTemplates;
|
|
4
|
+
exports.buildProfileMappingData = buildProfileMappingData;
|
|
5
|
+
exports.getProfileMappingData = getProfileMappingData;
|
|
6
|
+
exports.editMapping = editMapping;
|
|
7
|
+
exports.fetchProfileData = fetchProfileData;
|
|
8
|
+
exports.checkMappingStatus = checkMappingStatus;
|
|
9
|
+
const client_1 = require("@/api/client");
|
|
10
|
+
/**
|
|
11
|
+
* 获取 IDAAS 字段模板
|
|
12
|
+
*
|
|
13
|
+
* 并发请求用户/部门/角色三端的字段定义,不包含连接器侧数据
|
|
14
|
+
*/
|
|
15
|
+
async function getDigProfileTemplates(refType) {
|
|
16
|
+
const [user, org, role] = await Promise.all([
|
|
17
|
+
(0, client_1.apiGet)(`/iam/api/appProfile/user/profile/${refType}`),
|
|
18
|
+
(0, client_1.apiGet)(`/iam/api/appProfile/org/profile/${refType}`),
|
|
19
|
+
(0, client_1.apiGet)(`/iam/api/appProfile/role/profile/${refType}`),
|
|
20
|
+
]);
|
|
21
|
+
return { user, org, role };
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 将 IDAAS 模板和连接器侧原始数据组装为 ProfileMappingData
|
|
25
|
+
*
|
|
26
|
+
* dig/fetchProfileData 均可为 null,对应字段将返回空值
|
|
27
|
+
*/
|
|
28
|
+
function buildProfileMappingData(dig, raw) {
|
|
29
|
+
const orgAndUser = raw ? raw.org_and_user_profile || {} : {};
|
|
30
|
+
const profileData = raw || {};
|
|
31
|
+
return {
|
|
32
|
+
digUserSubParams: dig?.user.sub_params || [],
|
|
33
|
+
digUserName: dig?.user.name || '',
|
|
34
|
+
digOrgSubParams: dig?.org.sub_params || [],
|
|
35
|
+
digOrgName: dig?.org.name || '',
|
|
36
|
+
digRoleSubParams: dig?.role.sub_params || [],
|
|
37
|
+
digRoleName: dig?.role.name || '',
|
|
38
|
+
otherUserSubParams: getSubParams(orgAndUser, 'user_profile'),
|
|
39
|
+
otherUserName: getProfileName(orgAndUser, 'user_profile'),
|
|
40
|
+
otherUserMappingToIam: getMappingSubParams(profileData, 'user_mapping', 'to_iam'),
|
|
41
|
+
otherUserMappingToApp: getMappingSubParams(profileData, 'user_mapping', 'to_app'),
|
|
42
|
+
otherOrgSubParams: getSubParams(orgAndUser, 'org_profile'),
|
|
43
|
+
otherOrgName: getProfileName(orgAndUser, 'org_profile'),
|
|
44
|
+
otherOrgMappingToIam: getMappingSubParams(profileData, 'org_mapping', 'to_iam'),
|
|
45
|
+
otherOrgMappingToApp: getMappingSubParams(profileData, 'org_mapping', 'to_app'),
|
|
46
|
+
otherRoleSubParams: getSubParams(orgAndUser, 'role_profile'),
|
|
47
|
+
otherRoleName: getProfileName(orgAndUser, 'role_profile'),
|
|
48
|
+
otherRoleMappingToIam: getMappingSubParams(profileData, 'role_mapping', 'to_iam'),
|
|
49
|
+
otherRoleMappingToApp: getMappingSubParams(profileData, 'role_mapping', 'to_app'),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 获取属性映射数据
|
|
54
|
+
*
|
|
55
|
+
* 包含 IDAAS 字段模板(用户/部门/角色)和上游/下游系统的字段及映射关系
|
|
56
|
+
*/
|
|
57
|
+
async function getProfileMappingData(refId, refType) {
|
|
58
|
+
const [dig, raw] = await Promise.all([
|
|
59
|
+
getDigProfileTemplates(refType),
|
|
60
|
+
fetchProfileData(refId, refType),
|
|
61
|
+
]);
|
|
62
|
+
return buildProfileMappingData(dig, raw);
|
|
63
|
+
}
|
|
64
|
+
function getSubParams(orgAndUser, profileKey) {
|
|
65
|
+
const profile = orgAndUser[profileKey];
|
|
66
|
+
return profile?.sub_params || [];
|
|
67
|
+
}
|
|
68
|
+
function getProfileName(orgAndUser, profileKey) {
|
|
69
|
+
const profile = orgAndUser[profileKey];
|
|
70
|
+
return profile?.name || '';
|
|
71
|
+
}
|
|
72
|
+
function getMappingSubParams(data, mappingKey, direction) {
|
|
73
|
+
const mapping = data[mappingKey];
|
|
74
|
+
const directionData = mapping?.[direction];
|
|
75
|
+
return directionData?.sub_params || [];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 保存属性映射配置
|
|
79
|
+
*/
|
|
80
|
+
function editMapping(refId, refType, data) {
|
|
81
|
+
return (0, client_1.apiPost)(`/iam/api/appProfile/${refId}/${refType}`, data);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 获取原始 Profile 数据(含完整嵌套结构),用于增删改操作前读取
|
|
85
|
+
*/
|
|
86
|
+
async function fetchProfileData(refId, refType) {
|
|
87
|
+
return (0, client_1.apiGet)(`/iam/api/appProfile/${refId}/${refType}`);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 检查映射配置状态
|
|
91
|
+
*/
|
|
92
|
+
function checkMappingStatus(flowId) {
|
|
93
|
+
return (0, client_1.apiGet)(`/iam/api/appProfile/checkMapping/${flowId}`);
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/api/mapping.ts"],"names":[],"mappings":";;AAoBA,wDAOC;AAOD,0DA8BC;AAOD,sDASC;AAyBD,kCAMC;AAKD,4CAKC;AAKD,gDAEC;AAhID,yCAA+C;AAe/C;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAAC,OAAe;IAC1D,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1C,IAAA,eAAM,EAAkB,oCAAoC,OAAO,EAAE,CAAC;QACtE,IAAA,eAAM,EAAkB,mCAAmC,OAAO,EAAE,CA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AAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CASpC;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAEjF;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAOzE;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAElC"}
|
package/dist/api/node.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.updateNode = updateNode;
|
|
|
7
7
|
exports.getAccountInstances = getAccountInstances;
|
|
8
8
|
exports.deleteNode = deleteNode;
|
|
9
9
|
exports.testRunNode = testRunNode;
|
|
10
|
+
exports.cancelDebugNode = cancelDebugNode;
|
|
10
11
|
const client_1 = require("@/api/client");
|
|
11
12
|
const encoding_1 = require("@/utils/encoding");
|
|
12
13
|
async function getActions(params) {
|
|
@@ -62,4 +63,7 @@ async function testRunNode(nodeId) {
|
|
|
62
63
|
return { success: false, error: error.message };
|
|
63
64
|
}
|
|
64
65
|
}
|
|
66
|
+
async function cancelDebugNode(nodeId, data) {
|
|
67
|
+
return (0, client_1.apiPatch)(`/acm/flows/nodes/cancelDebug/${nodeId}`, data);
|
|
68
|
+
}
|
|
65
69
|
//# sourceMappingURL=node.js.map
|
package/dist/api/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/api/node.ts"],"names":[],"mappings":";;AAIA,gCAcC;AAED,sCAEC;AAED,gCAMC;AAED,gCAMC;AAED,kDAYC;AAED,gCAEC;AAED,kCAOC;
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/api/node.ts"],"names":[],"mappings":";;AAIA,gCAcC;AAED,sCAEC;AAED,gCAMC;AAED,gCAMC;AAED,kDAYC;AAED,gCAEC;AAED,kCAOC;AAUD,0CAKC;AAhFD,yCAAoE;AAEpE,+CAAgD;AAEzC,KAAK,UAAU,UAAU,CAAC,MAOhC;IACC,MAAM,IAAI,GAAG,MAAM,IAAA,eAAM,EAA0B,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC9E,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAmB,CAAC;IACpD,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,KAAoB,CAAC;IACxE,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC,OAAsB,CAAC;IAC5E,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAmB,CAAC;IACtE,OAAO,EAAE,CAAC;AACZ,CAAC;AAEM,KAAK,UAAU,aAAa,CAAC,MAAc;IAChD,OAAO,IAAA,eAAM,EAAC,oBAAoB,MAAM,EAAE,CAAC,CAAC;AAC9C,CAAC;AAEM,KAAK,UAAU,UAAU,CAAC,IAAuB;IACtD,OAAO,IAAA,gBAAO,EAAC,qBAAqB,EAAE,IAAA,uBAAY,EAAC,IAAI,CAAC,EAAE;QACxD,OAAO,EAAE;YACP,cAAc,EAAE,YAAY;SAC7B;KACF,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,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AQ,EAAC,gCAAgC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.d.ts","sourceRoot":"","sources":["../../src/api/org.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAe,MAAM,aAAa,CAAC;AAIhE,wBAAsB,UAAU,CAC9B,KAAK,GAAE,MAAoB,EAC3B,MAAM,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5C,OAAO,CAAC,WAAW,EAAE,CAAC,CASxB;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAElE"}
|
package/dist/api/org.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOrgSubs = getOrgSubs;
|
|
4
|
+
exports.getOrgMeta = getOrgMeta;
|
|
5
|
+
const client_1 = require("@/api/client");
|
|
6
|
+
const org_1 = require("@/types/org");
|
|
7
|
+
const SUBS_ATTRS = 'id,name,description,readonly,entitled,has_children';
|
|
8
|
+
async function getOrgSubs(orgId = org_1.ROOT_ORG_ID, params) {
|
|
9
|
+
const queryParams = {
|
|
10
|
+
attrs: SUBS_ATTRS,
|
|
11
|
+
depth: params?.depth ?? 1,
|
|
12
|
+
};
|
|
13
|
+
if (params?.orgName) {
|
|
14
|
+
queryParams.orgName = params.orgName;
|
|
15
|
+
}
|
|
16
|
+
return (0, client_1.apiGet)(`/iam/api/orgs/${orgId}/subs`, queryParams);
|
|
17
|
+
}
|
|
18
|
+
async function getOrgMeta(ids) {
|
|
19
|
+
return (0, client_1.apiPost)('/iam/api/orgs/meta', { ids });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=org.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/api/org.ts"],"names":[],"mappings":";;AAKA,gCAYC;AAED,gCAEC;AArBD,yCAA+C;AAC/C,qCAAgE;AAEhE,MAAM,UAAU,GAAG,oDAAoD,CAAC;AAEjE,KAAK,UAAU,UAAU,CAC9B,QAAgB,iBAAW,EAC3B,MAA6C;IAE7C,MAAM,WAAW,GAA4B;QAC3C,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;KAC1B,CAAC;IACF,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;QACpB,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,CAAC;IACD,OAAO,IAAA,eAAM,EAAgB,iBAAiB,KAAK,OAAO,EAAE,WAAW,CAAC,CAAC;AAC3E,CAAC;AAEM,KAAK,UAAU,UAAU,CAAC,GAAa;IAC5C,OAAO,IAAA,gBAAO,EAAY,oBAAoB,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/flow/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/flow/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8CvD"}
|