@carthooks/arcubase-cli 0.1.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/bundle/arcubase-admin.mjs +9875 -0
- package/bundle/arcubase.mjs +9875 -0
- package/dist/bin/arcubase-admin.d.ts +2 -0
- package/dist/bin/arcubase-admin.d.ts.map +1 -0
- package/dist/bin/arcubase-admin.js +22 -0
- package/dist/bin/arcubase.d.ts +2 -0
- package/dist/bin/arcubase.d.ts.map +1 -0
- package/dist/bin/arcubase.js +22 -0
- package/dist/generated/command_registry.generated.d.ts +3072 -0
- package/dist/generated/command_registry.generated.d.ts.map +1 -0
- package/dist/generated/command_registry.generated.js +4587 -0
- package/dist/generated/type_index.generated.d.ts +496 -0
- package/dist/generated/type_index.generated.d.ts.map +1 -0
- package/dist/generated/type_index.generated.js +502 -0
- package/dist/generated/zod_registry.generated.d.ts +356 -0
- package/dist/generated/zod_registry.generated.d.ts.map +1 -0
- package/dist/generated/zod_registry.generated.js +483 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/runtime/argv.d.ts +8 -0
- package/dist/runtime/argv.d.ts.map +1 -0
- package/dist/runtime/argv.js +31 -0
- package/dist/runtime/body_loader.d.ts +3 -0
- package/dist/runtime/body_loader.d.ts.map +1 -0
- package/dist/runtime/body_loader.js +26 -0
- package/dist/runtime/command_registry.d.ts +9 -0
- package/dist/runtime/command_registry.d.ts.map +1 -0
- package/dist/runtime/command_registry.js +14 -0
- package/dist/runtime/env.d.ts +14 -0
- package/dist/runtime/env.d.ts.map +1 -0
- package/dist/runtime/env.js +42 -0
- package/dist/runtime/errors.d.ts +23 -0
- package/dist/runtime/errors.d.ts.map +1 -0
- package/dist/runtime/errors.js +18 -0
- package/dist/runtime/execute.d.ts +17 -0
- package/dist/runtime/execute.d.ts.map +1 -0
- package/dist/runtime/execute.js +183 -0
- package/dist/runtime/http.d.ts +4 -0
- package/dist/runtime/http.d.ts.map +1 -0
- package/dist/runtime/http.js +21 -0
- package/dist/runtime/output.d.ts +2 -0
- package/dist/runtime/output.d.ts.map +1 -0
- package/dist/runtime/output.js +3 -0
- package/dist/runtime/paths.d.ts +4 -0
- package/dist/runtime/paths.d.ts.map +1 -0
- package/dist/runtime/paths.js +8 -0
- package/dist/runtime/zod_registry.d.ts +10 -0
- package/dist/runtime/zod_registry.d.ts.map +1 -0
- package/dist/runtime/zod_registry.js +50 -0
- package/dist/tests/bootstrap.test.d.ts +2 -0
- package/dist/tests/bootstrap.test.d.ts.map +1 -0
- package/dist/tests/bootstrap.test.js +59 -0
- package/dist/tests/command_registry.test.d.ts +2 -0
- package/dist/tests/command_registry.test.d.ts.map +1 -0
- package/dist/tests/command_registry.test.js +22 -0
- package/dist/tests/execute_validation.test.d.ts +2 -0
- package/dist/tests/execute_validation.test.d.ts.map +1 -0
- package/dist/tests/execute_validation.test.js +41 -0
- package/dist/tests/help.test.d.ts +2 -0
- package/dist/tests/help.test.d.ts.map +1 -0
- package/dist/tests/help.test.js +22 -0
- package/dist/tests/zod_registry.test.d.ts +2 -0
- package/dist/tests/zod_registry.test.d.ts.map +1 -0
- package/dist/tests/zod_registry.test.js +26 -0
- package/package.json +46 -0
- package/sdk-dist/api/admin/app-entity-share.ts +52 -0
- package/sdk-dist/api/admin/app.ts +187 -0
- package/sdk-dist/api/admin/automate-rule.ts +59 -0
- package/sdk-dist/api/admin/business-hooks.ts +17 -0
- package/sdk-dist/api/admin/config.ts +12 -0
- package/sdk-dist/api/admin/dashboard.ts +88 -0
- package/sdk-dist/api/admin/dataset.ts +133 -0
- package/sdk-dist/api/admin/departments.ts +223 -0
- package/sdk-dist/api/admin/developer.ts +126 -0
- package/sdk-dist/api/admin/entity-tags.ts +71 -0
- package/sdk-dist/api/admin/entity.ts +188 -0
- package/sdk-dist/api/admin/extension.ts +19 -0
- package/sdk-dist/api/admin/index.ts +21 -0
- package/sdk-dist/api/admin/ingress.ts +117 -0
- package/sdk-dist/api/admin/integration.ts +64 -0
- package/sdk-dist/api/admin/kiosk-flow.ts +67 -0
- package/sdk-dist/api/admin/print-template-background.ts +43 -0
- package/sdk-dist/api/admin/print-templates.ts +60 -0
- package/sdk-dist/api/admin/tenant.ts +231 -0
- package/sdk-dist/api/admin/workflow.ts +51 -0
- package/sdk-dist/api/kiosk/index.ts +4 -0
- package/sdk-dist/api/kiosk/starter.ts +34 -0
- package/sdk-dist/api/kiosk/ui.ts +79 -0
- package/sdk-dist/api/open/api.ts +11 -0
- package/sdk-dist/api/open/index.ts +3 -0
- package/sdk-dist/api/shared-link/form.ts +103 -0
- package/sdk-dist/api/shared-link/index.ts +3 -0
- package/sdk-dist/api/user/common.ts +159 -0
- package/sdk-dist/api/user/context.ts +10 -0
- package/sdk-dist/api/user/copilot.ts +20 -0
- package/sdk-dist/api/user/dashboard.ts +43 -0
- package/sdk-dist/api/user/entity.ts +213 -0
- package/sdk-dist/api/user/flow.ts +20 -0
- package/sdk-dist/api/user/global-action.ts +128 -0
- package/sdk-dist/api/user/index.ts +12 -0
- package/sdk-dist/api/user/kiosk.ts +12 -0
- package/sdk-dist/api/user/profile.ts +57 -0
- package/sdk-dist/api/user/workflow.ts +186 -0
- package/sdk-dist/generated/command_registry.generated.ts +4603 -0
- package/sdk-dist/generated/type_index.generated.ts +503 -0
- package/sdk-dist/generated/zod_registry.generated.ts +713 -0
- package/sdk-dist/types/app-user.ts +0 -0
- package/sdk-dist/types/app.ts +182 -0
- package/sdk-dist/types/auth.ts +174 -0
- package/sdk-dist/types/automate-rule.ts +100 -0
- package/sdk-dist/types/business-hooks.ts +37 -0
- package/sdk-dist/types/common.ts +676 -0
- package/sdk-dist/types/copilot.ts +34 -0
- package/sdk-dist/types/dashboard.ts +122 -0
- package/sdk-dist/types/dataset.ts +168 -0
- package/sdk-dist/types/departments.ts +351 -0
- package/sdk-dist/types/developer.ts +190 -0
- package/sdk-dist/types/entity.ts +400 -0
- package/sdk-dist/types/extension.ts +15 -0
- package/sdk-dist/types/global-action.ts +206 -0
- package/sdk-dist/types/index.ts +26 -0
- package/sdk-dist/types/ingress.ts +173 -0
- package/sdk-dist/types/kiosk-starter.ts +46 -0
- package/sdk-dist/types/kiosk-ui.ts +94 -0
- package/sdk-dist/types/oauth-authorize.ts +52 -0
- package/sdk-dist/types/oauth.ts +33 -0
- package/sdk-dist/types/openapi.ts +24 -0
- package/sdk-dist/types/platform-setup.ts +26 -0
- package/sdk-dist/types/shared-link.ts +41 -0
- package/sdk-dist/types/tenant.ts +340 -0
- package/sdk-dist/types/upload.ts +0 -0
- package/sdk-dist/types/user-action.ts +871 -0
- package/sdk-dist/types/user-flow.ts +90 -0
- package/sdk-dist/types/widgets.ts +115 -0
- package/sdk-dist/types/workflow.ts +162 -0
- package/src/bin/arcubase-admin.ts +23 -0
- package/src/bin/arcubase.ts +23 -0
- package/src/generated/command_registry.generated.ts +4603 -0
- package/src/generated/type_index.generated.ts +503 -0
- package/src/generated/zod_registry.generated.ts +713 -0
- package/src/index.ts +4 -0
- package/src/runtime/argv.ts +39 -0
- package/src/runtime/body_loader.ts +26 -0
- package/src/runtime/command_registry.ts +22 -0
- package/src/runtime/env.ts +60 -0
- package/src/runtime/errors.ts +41 -0
- package/src/runtime/execute.ts +206 -0
- package/src/runtime/http.ts +23 -0
- package/src/runtime/output.ts +3 -0
- package/src/runtime/paths.ts +8 -0
- package/src/runtime/zod_registry.ts +53 -0
- package/src/tests/bootstrap.test.ts +67 -0
- package/src/tests/command_registry.test.ts +27 -0
- package/src/tests/execute_validation.test.ts +50 -0
- package/src/tests/help.test.ts +25 -0
- package/src/tests/zod_registry.test.ts +33 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { getDefaultClient } from '../../factory'
|
|
2
|
+
import type {
|
|
3
|
+
EntityPutQueryKeeperReqVO,
|
|
4
|
+
EntityPutQueryKeeperRespVO,
|
|
5
|
+
EntityQueryReqVO,
|
|
6
|
+
EntityQueryRespVO,
|
|
7
|
+
EntityQueryFilterReqVO,
|
|
8
|
+
EntityQueryFilterRespVO,
|
|
9
|
+
EntityQueryRelationReqVO,
|
|
10
|
+
EntityQueryRelationRespVO,
|
|
11
|
+
EntitySelectionActionReqVO,
|
|
12
|
+
EntityQuerySelectionRespVO,
|
|
13
|
+
EntityResolveWorkflowReqVO,
|
|
14
|
+
EntityResolveWorkflowRespVO,
|
|
15
|
+
EntityRowRespVO,
|
|
16
|
+
EntityRowDeleteRespVO,
|
|
17
|
+
EntityUpdateReqVO,
|
|
18
|
+
EntityUpdateRespVO,
|
|
19
|
+
EntityValidateUniqReqVO,
|
|
20
|
+
EntityValidateUniqRespVO,
|
|
21
|
+
InsertReqVO,
|
|
22
|
+
InsertRespVO,
|
|
23
|
+
InsertPrepareReqVO,
|
|
24
|
+
InsertPrepareRespVO,
|
|
25
|
+
EntityWorkflowApproveUsersRespVO,
|
|
26
|
+
EntityWorkflowNodesRespVO,
|
|
27
|
+
GetSubformItemsReqVO,
|
|
28
|
+
GetSubformItemsRespVO
|
|
29
|
+
} from '../../types'
|
|
30
|
+
|
|
31
|
+
// @endpoint POST /entity/:app_id/:entity_id/query-keeper
|
|
32
|
+
// @controller UserAction.EntityPutQueryKeeper
|
|
33
|
+
export async function putEntityQueryKeeper(
|
|
34
|
+
appId: string,
|
|
35
|
+
entityId: string,
|
|
36
|
+
data: EntityPutQueryKeeperReqVO
|
|
37
|
+
): Promise<EntityPutQueryKeeperRespVO> {
|
|
38
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/query-keeper`, data)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @endpoint POST /entity/:app_id/:entity_id/data-query
|
|
42
|
+
// @controller UserAction.EntityQuery
|
|
43
|
+
export async function queryEntity(
|
|
44
|
+
appId: string,
|
|
45
|
+
entityId: string,
|
|
46
|
+
data: EntityQueryReqVO
|
|
47
|
+
): Promise<EntityQueryRespVO> {
|
|
48
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/data-query`, data)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// @endpoint POST /entity/:app_id/:entity_id/query-filter
|
|
52
|
+
// @controller UserAction.EntityQueryFilter
|
|
53
|
+
export async function filterEntityQuery(
|
|
54
|
+
appId: string,
|
|
55
|
+
entityId: string,
|
|
56
|
+
data: EntityQueryFilterReqVO
|
|
57
|
+
): Promise<EntityQueryFilterRespVO> {
|
|
58
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/query-filter`, data)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// @endpoint POST /entity/:app_id/:entity_id/selection-query/:action
|
|
62
|
+
// @controller UserAction.EntityQuerySelection
|
|
63
|
+
export async function queryEntitySelection(
|
|
64
|
+
appId: string,
|
|
65
|
+
entityId: string,
|
|
66
|
+
action: string,
|
|
67
|
+
data: EntitySelectionActionReqVO
|
|
68
|
+
): Promise<EntityQuerySelectionRespVO> {
|
|
69
|
+
// 调试日志,便于排查 selection-query/archive 不可用问题
|
|
70
|
+
// console.debug('[queryEntitySelection] appId, entityId, action, data', appId, entityId, action, data)
|
|
71
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/selection-query/${action}`, data)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// @endpoint POST /entity/:app_id/:entity_id/resolve-workflow
|
|
75
|
+
// @controller UserAction.EntityResolveWorkflow
|
|
76
|
+
export async function resolveEntityWorkflow(
|
|
77
|
+
appId: string,
|
|
78
|
+
entityId: string,
|
|
79
|
+
data: EntityResolveWorkflowReqVO
|
|
80
|
+
): Promise<EntityResolveWorkflowRespVO> {
|
|
81
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/resolve-workflow`, data)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// @endpoint GET /entity/:app_id/:entity_id/row/:row_id
|
|
85
|
+
// @controller UserAction.EntityRow
|
|
86
|
+
export async function getEntityRow(
|
|
87
|
+
appId: string,
|
|
88
|
+
entityId: string,
|
|
89
|
+
rowId: string,
|
|
90
|
+
params?: Record<string, any>
|
|
91
|
+
): Promise<EntityRowRespVO> {
|
|
92
|
+
return getDefaultClient().get(`/entity/${appId}/${entityId}/row/${rowId}`, params)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// @endpoint POST /entity/:app_id/:entity_id/delete-item
|
|
96
|
+
// @controller UserAction.EntityRowDelete
|
|
97
|
+
export async function deleteEntityRow(
|
|
98
|
+
appId: string,
|
|
99
|
+
entityId: string,
|
|
100
|
+
data: EntitySelectionActionReqVO
|
|
101
|
+
): Promise<EntityRowDeleteRespVO> {
|
|
102
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/delete-item`, data)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// @endpoint POST /entity/:app_id/:entity_id/restore-item
|
|
106
|
+
// @controller UserAction.EntityRowRestore
|
|
107
|
+
export async function restoreEntityRow(
|
|
108
|
+
appId: string,
|
|
109
|
+
entityId: string,
|
|
110
|
+
data: EntitySelectionActionReqVO
|
|
111
|
+
): Promise<{ restored: number }> {
|
|
112
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/restore-item`, data)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// @endpoint PUT /entity/:app_id/:entity_id/row/:row_id
|
|
116
|
+
// @controller UserAction.EntityUpdate
|
|
117
|
+
export async function updateEntityRow(
|
|
118
|
+
appId: string,
|
|
119
|
+
entityId: string,
|
|
120
|
+
rowId: string,
|
|
121
|
+
data: EntityUpdateReqVO
|
|
122
|
+
): Promise<EntityUpdateRespVO> {
|
|
123
|
+
return getDefaultClient().put(`/entity/${appId}/${entityId}/row/${rowId}`, data)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// @endpoint POST /entity/:app_id/:entity_id/validate-uniq
|
|
127
|
+
// @controller UserAction.EntityValidateUniq
|
|
128
|
+
export async function validateEntityUniq(
|
|
129
|
+
appId: string,
|
|
130
|
+
entityId: string,
|
|
131
|
+
data: EntityValidateUniqReqVO
|
|
132
|
+
): Promise<EntityValidateUniqRespVO> {
|
|
133
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/validate-uniq`, data)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// @endpoint POST /entity/:app_id/:entity_id/insert
|
|
137
|
+
// @controller UserAction.Insert
|
|
138
|
+
export async function insertEntity(
|
|
139
|
+
appId: string,
|
|
140
|
+
entityId: string,
|
|
141
|
+
data: InsertReqVO
|
|
142
|
+
): Promise<InsertRespVO> {
|
|
143
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/insert`, data)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Legacy compatibility alias for postFormData
|
|
147
|
+
export const postFormData = insertEntity
|
|
148
|
+
|
|
149
|
+
// @endpoint POST /entity/:app_id/:entity_id/prepare
|
|
150
|
+
// @controller UserAction.InsertPrepare
|
|
151
|
+
export async function prepareEntityInsert(
|
|
152
|
+
appId: string,
|
|
153
|
+
entityId: string,
|
|
154
|
+
data: InsertPrepareReqVO
|
|
155
|
+
): Promise<InsertPrepareRespVO> {
|
|
156
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/prepare`, data)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// @endpoint POST /entity/:app_id/:entity_id/query-approve-users
|
|
160
|
+
// @controller UserAction.EntityWorkflowApproveUsers
|
|
161
|
+
export async function queryEntityWorkflowApproveUsers(
|
|
162
|
+
appId: string,
|
|
163
|
+
entityId: string
|
|
164
|
+
): Promise<EntityWorkflowApproveUsersRespVO> {
|
|
165
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/query-approve-users`)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// @endpoint POST /entity/:app_id/:entity_id/query-workflow-nodes
|
|
169
|
+
// @controller UserAction.EntityWorkflowNodes
|
|
170
|
+
export async function queryEntityWorkflowNodes(
|
|
171
|
+
appId: string,
|
|
172
|
+
entityId: string
|
|
173
|
+
): Promise<EntityWorkflowNodesRespVO> {
|
|
174
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/query-workflow-nodes`)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// @endpoint POST /entity/:app_id/:entity_id/row/:row_id/get-subitems
|
|
178
|
+
// @controller UserAction.GetSubformItems
|
|
179
|
+
export async function getEntitySubformItems(
|
|
180
|
+
appId: string,
|
|
181
|
+
entityId: string,
|
|
182
|
+
rowId: string,
|
|
183
|
+
data: GetSubformItemsReqVO
|
|
184
|
+
): Promise<GetSubformItemsRespVO> {
|
|
185
|
+
return getDefaultClient().post(`/entity/${appId}/${entityId}/row/${rowId}/get-subitems`, data)
|
|
186
|
+
}
|