@lovrabet/lovrabet-cli 2.3.8-beta.1 → 2.3.8-beta.3
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/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +32 -6
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -4
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +26 -358
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.d.ts +9 -10
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.d.ts +2 -0
- package/lib/utils/runtime-user-id.js +1 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet/guides/role-and-permission-workflow.md +3 -2
- package/skills/lovrabet.manifest.json +3 -3
package/lib/core/api-client.d.ts
CHANGED
|
@@ -1,53 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Why a separate module from `sdk-client.ts`: the SDK (`@lovrabet/sdk`) is designed
|
|
5
|
-
* for runtime operations (data/SQL/Backend Function execution) and encapsulates the SDK client
|
|
6
|
-
* lifecycle. This module handles authenticated API calls that the SDK does not
|
|
7
|
-
* cover: listing datasets, fetching app lists, querying runtime contracts, etc.
|
|
8
|
-
*
|
|
9
|
-
* Why `X-User-AK` auth: the runtime CLI uses AccessKey authentication exclusively.
|
|
10
|
-
* The AK is set as a module-level variable (`_activeAK`) and read by every request.
|
|
11
|
-
* The `finalize` hook clears it after each command to prevent AK leakage.
|
|
12
|
-
*
|
|
13
|
-
* Design decision: management API paths use `/client/`; narrowly scoped runtime
|
|
14
|
-
* contract lookups may use `/api/` when the backend exposes a non-enumerating endpoint.
|
|
15
|
-
*/
|
|
1
|
+
import { ClientAkModel } from "@lovrabet/sdk";
|
|
2
|
+
import type { DataList, PageResult, UserCustomSqlDTO as SqlQuery, DatasetMeta as DatasetItem, RuntimeArtifactDTO as RuntimeArtifactItem, PersonalBffScript as PersonalBffItem, PersonalBffUpsertRequest as PersonalBffUpsertInput, FileUploadResponse as RuntimeFileUploadResponse, FileUrlResponse as RuntimeFileUrlResponse, OcrRecognizeResponse as RuntimeOcrResponse, ApprovalFlowTaskItem, ApprovalFlowTaskDetail, ApprovalFlowApproveRequest as ApprovalFlowApproveInput, ApprovalFlowTransferRequest as ApprovalFlowTransferInput, AppRoleUpdateParam, AppRoleVO as RuntimeAppRole, AppRoleUserVO as RuntimeRoleUsers, AppEmployee as RuntimeAppUser, BaseRoleVO as RuntimePermitRole, ResourcePermitDTO as RuntimeResourcePermit, MenuPermitDTO as RuntimePagePermit, AppMenuPermitVO as RuntimeEvaluatedResource, MenuRolePermitNodeVO as RuntimeMenuRolePermitNode, AppDatasetPermitVO as RuntimeDatasetPermit, AppDatasetRolePermitVO as RuntimeDatasetRolePermit, NotificationChannelConfig as NotificationChannelConfigItem } from "@lovrabet/sdk";
|
|
3
|
+
export type { ApprovalFlowApproveRequest as ApprovalFlowApproveInput, ApprovalFlowTransferRequest as ApprovalFlowTransferInput, UserCustomSqlDTO as SqlQuery, DatasetMeta as DatasetItem, RuntimeArtifactDTO as RuntimeArtifactItem, PersonalBffScript as PersonalBffItem, PersonalBffUpsertRequest as PersonalBffUpsertInput, FileUploadResponse as RuntimeFileUploadResponse, FileUrlResponse as RuntimeFileUrlResponse, OcrRecognizeResponse as RuntimeOcrResponse, ApprovalFlowTaskItem, ApprovalFlowTaskDetail, AppRoleVO as RuntimeAppRole, AppUserBaseVO as RuntimeRoleUserRef, AppRoleUserVO as RuntimeRoleUsers, AppEmployee as RuntimeAppUser, BaseRoleVO as RuntimePermitRole, ResourcePermitDTO as RuntimeResourcePermit, MenuPermitDTO as RuntimePagePermit, AppMenuPermitVO as RuntimeEvaluatedResource, MenuRolePermitNodeVO as RuntimeMenuRolePermitNode, AppDatasetPermitVO as RuntimeDatasetPermit, AppDatasetActionRolePermitVO as RuntimeDatasetActionRolePermit, AppDatasetRolePermitVO as RuntimeDatasetRolePermit, NotificationChannelConfig as NotificationChannelConfigItem, } from "@lovrabet/sdk";
|
|
16
4
|
import type { Paging } from "../framework/response.js";
|
|
17
5
|
/** Sets the active AccessKey used for all subsequent API calls. */
|
|
18
6
|
export declare function setActiveAK(ak: string): void;
|
|
19
7
|
/** Clears the active AccessKey after command completion. */
|
|
20
8
|
export declare function clearActiveAK(): void;
|
|
21
|
-
|
|
22
|
-
export interface BffEndpointContract {
|
|
23
|
-
appCode: string;
|
|
24
|
-
functionName: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
version?: number;
|
|
27
|
-
gmtModified?: string | number;
|
|
28
|
-
}
|
|
9
|
+
export type BffEndpointContract = Awaited<ReturnType<typeof getBffEndpointContract>>;
|
|
29
10
|
/**
|
|
30
11
|
* Fetches one known Backend Function endpoint contract by its stable runtime identity.
|
|
31
12
|
* The runtime exposes an AK-authenticated exact endpoint keyed by appCode + functionName.
|
|
32
13
|
* Platform-only fields returned by older backends are intentionally discarded here.
|
|
33
14
|
*/
|
|
34
|
-
export declare function getBffEndpointContract(appCode: string, functionName: string): Promise<
|
|
35
|
-
/** Metadata for a SQL query returned by the management API. */
|
|
36
|
-
export interface SqlQuery {
|
|
37
|
-
id: number;
|
|
38
|
-
tenantCode?: string;
|
|
15
|
+
export declare function getBffEndpointContract(appCode: string, functionName: string): Promise<{
|
|
39
16
|
appCode: string;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
export interface SqlListResult {
|
|
48
|
-
tableData: SqlQuery[];
|
|
49
|
-
paging: Paging;
|
|
50
|
-
}
|
|
17
|
+
functionName: string;
|
|
18
|
+
description: string | undefined;
|
|
19
|
+
version: number | undefined;
|
|
20
|
+
gmtModified: number | null | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export type SqlListResult = DataList<SqlQuery>;
|
|
51
23
|
/**
|
|
52
24
|
* Fetches SQL query metadata by `sqlCode`.
|
|
53
25
|
*
|
|
@@ -61,39 +33,6 @@ export interface SqlListResult {
|
|
|
61
33
|
* handle both shapes.
|
|
62
34
|
*/
|
|
63
35
|
export declare function getSqlQueryInfo(appCode: string, sqlCode: string): Promise<SqlQuery>;
|
|
64
|
-
/** A dataset returned by the list API. */
|
|
65
|
-
export interface DatasetItem {
|
|
66
|
-
id: number;
|
|
67
|
-
name: string;
|
|
68
|
-
code: string;
|
|
69
|
-
source?: string;
|
|
70
|
-
description?: string;
|
|
71
|
-
dbtableConfig?: {
|
|
72
|
-
tableName?: string;
|
|
73
|
-
dbId?: number;
|
|
74
|
-
dbName?: string;
|
|
75
|
-
dbType?: string;
|
|
76
|
-
datasetKey?: string;
|
|
77
|
-
pkField?: string;
|
|
78
|
-
allFields?: string;
|
|
79
|
-
};
|
|
80
|
-
[key: string]: any;
|
|
81
|
-
}
|
|
82
|
-
export interface RuntimeArtifactItem {
|
|
83
|
-
id: number;
|
|
84
|
-
appCode: string;
|
|
85
|
-
artifactType?: string;
|
|
86
|
-
name?: string;
|
|
87
|
-
content?: string;
|
|
88
|
-
compiledContent?: string;
|
|
89
|
-
metadata?: Record<string, unknown>;
|
|
90
|
-
source?: string;
|
|
91
|
-
favorite?: boolean;
|
|
92
|
-
deleted?: number | boolean;
|
|
93
|
-
createTime?: string;
|
|
94
|
-
updateTime?: string;
|
|
95
|
-
[key: string]: unknown;
|
|
96
|
-
}
|
|
97
36
|
export interface RuntimeArtifactUpsertInput {
|
|
98
37
|
artifactType: "react_module";
|
|
99
38
|
name?: string;
|
|
@@ -101,69 +40,10 @@ export interface RuntimeArtifactUpsertInput {
|
|
|
101
40
|
metadata?: Record<string, unknown>;
|
|
102
41
|
source: "AGENT";
|
|
103
42
|
}
|
|
104
|
-
export interface PersonalBffItem {
|
|
105
|
-
id: number;
|
|
106
|
-
appCode?: string;
|
|
107
|
-
functionName?: string;
|
|
108
|
-
description?: string;
|
|
109
|
-
scriptType?: string;
|
|
110
|
-
scriptContent?: string;
|
|
111
|
-
config?: Record<string, unknown> | null;
|
|
112
|
-
version?: number | string;
|
|
113
|
-
createUserId?: number | string;
|
|
114
|
-
gmtCreate?: string;
|
|
115
|
-
gmtModified?: string;
|
|
116
|
-
createTime?: string;
|
|
117
|
-
updateTime?: string;
|
|
118
|
-
[key: string]: unknown;
|
|
119
|
-
}
|
|
120
|
-
export interface PersonalBffUpsertInput {
|
|
121
|
-
functionName?: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
scriptContent?: string;
|
|
124
|
-
sourceSessionId?: string;
|
|
125
|
-
}
|
|
126
43
|
export interface DatasetSdkUsageResponse {
|
|
127
44
|
markdown?: string;
|
|
128
45
|
[key: string]: unknown;
|
|
129
46
|
}
|
|
130
|
-
export interface RuntimeFileUploadResponse {
|
|
131
|
-
fileName?: string | null;
|
|
132
|
-
filePath?: string | null;
|
|
133
|
-
fileUrl?: string | null;
|
|
134
|
-
downloadFlag?: boolean;
|
|
135
|
-
fileType?: string | null;
|
|
136
|
-
size?: number | null;
|
|
137
|
-
sourceDir?: string | null;
|
|
138
|
-
[key: string]: unknown;
|
|
139
|
-
}
|
|
140
|
-
export interface RuntimeFileUrlResponse {
|
|
141
|
-
fileName?: string | null;
|
|
142
|
-
filePath?: string | null;
|
|
143
|
-
fileUrl?: string | null;
|
|
144
|
-
downloadFlag?: boolean;
|
|
145
|
-
longTerm?: boolean;
|
|
146
|
-
expiresInDays?: number | null;
|
|
147
|
-
[key: string]: unknown;
|
|
148
|
-
}
|
|
149
|
-
export interface RuntimeOcrResponse {
|
|
150
|
-
requestId?: string;
|
|
151
|
-
type?: string;
|
|
152
|
-
scene?: string;
|
|
153
|
-
text?: string;
|
|
154
|
-
lines?: string[];
|
|
155
|
-
kvData?: Record<string, unknown>;
|
|
156
|
-
width?: number;
|
|
157
|
-
height?: number;
|
|
158
|
-
pageNo?: number | null;
|
|
159
|
-
subImageCount?: number | null;
|
|
160
|
-
algoVersion?: string | null;
|
|
161
|
-
kvExcelUrl?: string | null;
|
|
162
|
-
xmlResult?: string | null;
|
|
163
|
-
rawData?: string | null;
|
|
164
|
-
creditsCharged?: number;
|
|
165
|
-
[key: string]: unknown;
|
|
166
|
-
}
|
|
167
47
|
/** A personal knowledge-base entry returned by the runtime API. */
|
|
168
48
|
export interface PersonalKnowledgeBaseItem {
|
|
169
49
|
id: string;
|
|
@@ -339,83 +219,7 @@ export interface LoginUserInfo {
|
|
|
339
219
|
email?: string | null;
|
|
340
220
|
[key: string]: unknown;
|
|
341
221
|
}
|
|
342
|
-
|
|
343
|
-
export interface ApprovalFlowTaskItem {
|
|
344
|
-
id?: string;
|
|
345
|
-
name?: string;
|
|
346
|
-
taskDefinitionKey?: string;
|
|
347
|
-
assignee?: string;
|
|
348
|
-
assigneeName?: string;
|
|
349
|
-
transferCandidates?: Array<{
|
|
350
|
-
userId?: string;
|
|
351
|
-
userName?: string;
|
|
352
|
-
}>;
|
|
353
|
-
processInstanceId?: string;
|
|
354
|
-
flowCode?: string;
|
|
355
|
-
flowName?: string;
|
|
356
|
-
appCode?: string;
|
|
357
|
-
initiatorUserId?: string;
|
|
358
|
-
initiatorUsername?: string;
|
|
359
|
-
datasetCode?: string;
|
|
360
|
-
pageId?: number;
|
|
361
|
-
operationType?: string;
|
|
362
|
-
dataId?: unknown;
|
|
363
|
-
detailUrl?: string;
|
|
364
|
-
taskStatus?: string;
|
|
365
|
-
processStatus?: string;
|
|
366
|
-
createTime?: number;
|
|
367
|
-
endTime?: number;
|
|
368
|
-
processStartTime?: number;
|
|
369
|
-
[key: string]: unknown;
|
|
370
|
-
}
|
|
371
|
-
/** Page envelope returned by `GET /client/approve/todo`. */
|
|
372
|
-
export interface ApprovalFlowTodoPage {
|
|
373
|
-
records: ApprovalFlowTaskItem[];
|
|
374
|
-
currentPage?: number;
|
|
375
|
-
pageSize?: number;
|
|
376
|
-
totalCount?: number;
|
|
377
|
-
totalPages?: number;
|
|
378
|
-
[key: string]: unknown;
|
|
379
|
-
}
|
|
380
|
-
/** Task detail returned by `GET /client/flow/task/{taskId}`. */
|
|
381
|
-
export interface ApprovalFlowTaskDetail {
|
|
382
|
-
id?: string;
|
|
383
|
-
name?: string;
|
|
384
|
-
taskDefinitionKey?: string;
|
|
385
|
-
assignee?: string;
|
|
386
|
-
assigneeName?: string;
|
|
387
|
-
processInstanceId?: string;
|
|
388
|
-
appCode?: string;
|
|
389
|
-
dataId?: unknown;
|
|
390
|
-
createTime?: number;
|
|
391
|
-
endTime?: number;
|
|
392
|
-
status?: string;
|
|
393
|
-
canHandle?: boolean;
|
|
394
|
-
canCancel?: boolean;
|
|
395
|
-
transferCandidates?: Array<{
|
|
396
|
-
userId?: string;
|
|
397
|
-
userName?: string;
|
|
398
|
-
}>;
|
|
399
|
-
formData?: Record<string, unknown>;
|
|
400
|
-
identityLinks?: Array<Record<string, unknown>>;
|
|
401
|
-
timeline?: Record<string, unknown>;
|
|
402
|
-
[key: string]: unknown;
|
|
403
|
-
}
|
|
404
|
-
/** Request body accepted by `POST /client/flow/approve`. */
|
|
405
|
-
export interface ApprovalFlowApproveInput {
|
|
406
|
-
appCode: string;
|
|
407
|
-
taskId: string;
|
|
408
|
-
approved: boolean;
|
|
409
|
-
comment?: string;
|
|
410
|
-
variables?: Record<string, unknown>;
|
|
411
|
-
}
|
|
412
|
-
/** Request body accepted by `POST /client/flow/task/transfer`. */
|
|
413
|
-
export interface ApprovalFlowTransferInput {
|
|
414
|
-
appCode: string;
|
|
415
|
-
taskId: string;
|
|
416
|
-
targetUserId: string;
|
|
417
|
-
comment?: string;
|
|
418
|
-
}
|
|
222
|
+
export type ApprovalFlowTodoPage = PageResult<ApprovalFlowTaskItem>;
|
|
419
223
|
export type RuntimeScheduleKind = "CRON" | "ONCE";
|
|
420
224
|
export type RuntimeScheduleModel = "kimi/k3" | "deepseek-v4-flash-0731" | "deepseek-v4-pro-0813";
|
|
421
225
|
export type RuntimeScheduleTaskStatus = "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
@@ -459,17 +263,12 @@ export declare function listApprovalTodo(appCode: string, currentPage?: number,
|
|
|
459
263
|
/** Fetches one approval task detail for the AccessKey-authenticated user. */
|
|
460
264
|
export declare function getApprovalTaskDetail(taskId: string, appCode: string): Promise<ApprovalFlowTaskDetail>;
|
|
461
265
|
/** Approves or rejects one approval task. */
|
|
462
|
-
export declare function approveApprovalTask(input: ApprovalFlowApproveInput): Promise<
|
|
266
|
+
export declare function approveApprovalTask(input: ApprovalFlowApproveInput): Promise<null>;
|
|
463
267
|
/** Transfers one approval task to a Runtime-authorized target user. */
|
|
464
|
-
export declare function transferApprovalTask(input: ApprovalFlowTransferInput): Promise<
|
|
268
|
+
export declare function transferApprovalTask(input: ApprovalFlowTransferInput): Promise<null>;
|
|
465
269
|
/** Fetches the current user's app list from the remote API. */
|
|
466
270
|
export declare function getMyApps(): Promise<RemoteAppItem[]>;
|
|
467
|
-
/**
|
|
468
|
-
* Fetches the current login user info for the active AccessKey.
|
|
469
|
-
*
|
|
470
|
-
* Why this call goes through the raw API client: it is a management-style
|
|
471
|
-
* `/client/*` endpoint keyed solely by `X-User-AK`, not an app-scoped SDK call.
|
|
472
|
-
*/
|
|
271
|
+
/** Fetches the active AK identity without requiring a selected application. */
|
|
473
272
|
export declare function getLoginUserInfo(): Promise<LoginUserInfo>;
|
|
474
273
|
export declare const USER_ACCOUNT_BIND_PATH = "/client/user-accounts/bind";
|
|
475
274
|
export declare function bindExternalUserAccount(provider: string, accountId: string): Promise<boolean>;
|
|
@@ -504,47 +303,30 @@ export declare function listDatasets(appCode: string, options?: {
|
|
|
504
303
|
* The server endpoint also accepts `id`, but runtime CLI keeps `code` as the
|
|
505
304
|
* public contract because it is stable across environments and visible to users.
|
|
506
305
|
*/
|
|
507
|
-
export declare function getDatasetDetail(datasetCode: string): Promise<
|
|
508
|
-
|
|
509
|
-
export declare function
|
|
510
|
-
export declare function createDatasetImportBatch(appCode: string, datasetCode: string, body: {
|
|
511
|
-
schemaFingerprint: string;
|
|
512
|
-
taskId?: number;
|
|
513
|
-
items: Record<string, unknown>[];
|
|
514
|
-
}): Promise<{
|
|
515
|
-
ids: number[];
|
|
516
|
-
count: number;
|
|
517
|
-
}>;
|
|
306
|
+
export declare function getDatasetDetail(datasetCode: string): Promise<unknown>;
|
|
307
|
+
export declare function getDatasetImportContract(appCode: string, datasetCode: string): Promise<import("@lovrabet/sdk").DatasetImportContract>;
|
|
308
|
+
export declare function createDatasetImportBatch(appCode: string, datasetCode: string, body: Parameters<ClientAkModel["importBatch"]>[0]): Promise<import("@lovrabet/sdk").DatasetImportBatchResult>;
|
|
518
309
|
export declare function readDatasetImportRows(appCode: string, datasetCode: string, ids: number[]): Promise<Record<string, unknown>[]>;
|
|
519
310
|
export declare function readDatasetImportTaskRows(appCode: string, datasetCode: string, taskId: number): Promise<Record<string, unknown>[]>;
|
|
520
311
|
export declare function uploadDatasetImportImage(appCode: string, datasetCode: string, importId: string, media: {
|
|
521
312
|
contentHash: string;
|
|
522
313
|
type: string;
|
|
523
314
|
bytes: Buffer;
|
|
524
|
-
}): Promise<import("
|
|
315
|
+
}): Promise<import("@lovrabet/sdk").DatasetImportImageResult>;
|
|
525
316
|
export declare function readDatasetImportImage(appCode: string, datasetCode: string, importId: string, media: {
|
|
526
317
|
contentHash: string;
|
|
527
318
|
type: string;
|
|
528
319
|
size: number;
|
|
529
|
-
}): Promise<import("
|
|
320
|
+
}): Promise<import("@lovrabet/sdk").DatasetImportImageResult>;
|
|
530
321
|
export declare function getDatasetSdkUsageDoc(datasetCode: string, appCode: string): Promise<string>;
|
|
531
322
|
export declare function uploadRuntimeFile(appCode: string, filePath: string): Promise<RuntimeFileUploadResponse>;
|
|
532
323
|
export declare function queryRuntimeFileUrl(filePath: string, options?: {
|
|
533
324
|
download?: boolean;
|
|
534
325
|
longTerm?: boolean;
|
|
535
326
|
}): Promise<RuntimeFileUrlResponse>;
|
|
536
|
-
export declare function recognizeRuntimeOcr(appCode: string, input:
|
|
537
|
-
url: string;
|
|
538
|
-
type: string;
|
|
539
|
-
}): Promise<RuntimeOcrResponse>;
|
|
327
|
+
export declare function recognizeRuntimeOcr(appCode: string, input: import("@lovrabet/sdk").OcrRecognizeRequest): Promise<RuntimeOcrResponse>;
|
|
540
328
|
export declare function getRuntimeAppConfigByKey(appCode: string, key: string): Promise<string>;
|
|
541
329
|
export type NotificationChannelType = "EMAIL" | "FEISHU" | "DINGTALK" | "WECOM" | "WEBHOOK";
|
|
542
|
-
export interface NotificationChannelConfigItem {
|
|
543
|
-
configCode?: string | null;
|
|
544
|
-
configName?: string | null;
|
|
545
|
-
channelType?: string | null;
|
|
546
|
-
description?: string | null;
|
|
547
|
-
}
|
|
548
330
|
/** Lists app-level notification configs without using the development Cookie flow. */
|
|
549
331
|
export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
|
|
550
332
|
export declare function listRuntimeArtifacts(appCode: string, options?: {
|
|
@@ -608,34 +390,6 @@ export declare function getRuntimeSkillVersionDiagram(appCode: string, skillCode
|
|
|
608
390
|
/** Downloads a runtime Skill package through SkillHub. */
|
|
609
391
|
export declare function downloadRuntimeSkillPackage(scope: "personal" | "company" | "builtin", skillCode: string, appCode: string, version?: string): Promise<Buffer>;
|
|
610
392
|
export type RuntimeAppRoleType = "ADMIN" | "USER" | "OWNER" | "CUSTOM";
|
|
611
|
-
export interface RuntimeAppRole {
|
|
612
|
-
id: number;
|
|
613
|
-
appCode: string;
|
|
614
|
-
roleCode: string;
|
|
615
|
-
roleName: string;
|
|
616
|
-
roleType: RuntimeAppRoleType;
|
|
617
|
-
permits?: Record<string, string[]>;
|
|
618
|
-
remark?: string;
|
|
619
|
-
extend?: string;
|
|
620
|
-
userCount: number;
|
|
621
|
-
permitCount: number;
|
|
622
|
-
gmtCreate?: string;
|
|
623
|
-
gmtModified?: string;
|
|
624
|
-
}
|
|
625
|
-
export interface RuntimeRoleUserRef {
|
|
626
|
-
userId: number;
|
|
627
|
-
username?: string;
|
|
628
|
-
nickname?: string;
|
|
629
|
-
status?: string;
|
|
630
|
-
}
|
|
631
|
-
export interface RuntimeRoleUsers {
|
|
632
|
-
id: number;
|
|
633
|
-
roleCode: string;
|
|
634
|
-
roleName: string;
|
|
635
|
-
roleType: RuntimeAppRoleType;
|
|
636
|
-
userList: RuntimeRoleUserRef[];
|
|
637
|
-
applyUserList?: RuntimeRoleUserRef[];
|
|
638
|
-
}
|
|
639
393
|
export interface RuntimeAppRoleListOptions {
|
|
640
394
|
roleName?: string;
|
|
641
395
|
currentPage?: number;
|
|
@@ -651,97 +405,11 @@ export declare function createRuntimeAppRole(input: {
|
|
|
651
405
|
roleName: string;
|
|
652
406
|
remark?: string;
|
|
653
407
|
}): Promise<RuntimeAppRole>;
|
|
654
|
-
export declare function updateRuntimeAppRole(input:
|
|
655
|
-
|
|
656
|
-
appCode: string;
|
|
657
|
-
roleCode?: string;
|
|
658
|
-
roleName?: string;
|
|
659
|
-
remark?: string;
|
|
660
|
-
}): Promise<RuntimeAppRole>;
|
|
661
|
-
export declare function deleteRuntimeAppRole(id: number): Promise<boolean>;
|
|
408
|
+
export declare function updateRuntimeAppRole(input: AppRoleUpdateParam): Promise<RuntimeAppRole>;
|
|
409
|
+
export declare function deleteRuntimeAppRole(id: number): Promise<void>;
|
|
662
410
|
export declare function listRuntimeRoleUsers(appCode: string): Promise<RuntimeRoleUsers[]>;
|
|
663
|
-
export declare function updateRuntimeRoleUsers(appCode: string, roleList: RuntimeRoleUsers[]): Promise<
|
|
664
|
-
export interface RuntimeAppUser {
|
|
665
|
-
code: string | number;
|
|
666
|
-
userName: string;
|
|
667
|
-
nickName?: string;
|
|
668
|
-
displayName?: string;
|
|
669
|
-
status?: string;
|
|
670
|
-
}
|
|
411
|
+
export declare function updateRuntimeRoleUsers(appCode: string, roleList: RuntimeRoleUsers[]): Promise<void>;
|
|
671
412
|
export declare function listRuntimeAppUsers(appCode: string): Promise<RuntimeAppUser[]>;
|
|
672
|
-
export interface RuntimePermitRole {
|
|
673
|
-
id: number;
|
|
674
|
-
roleType: RuntimeAppRoleType | "ALL" | "SELF" | "PUBLIC";
|
|
675
|
-
roleName: string;
|
|
676
|
-
allowed?: boolean;
|
|
677
|
-
}
|
|
678
|
-
export interface RuntimeResourcePermit {
|
|
679
|
-
id?: number;
|
|
680
|
-
appCode?: string;
|
|
681
|
-
menuId?: number | null;
|
|
682
|
-
pageId?: number | null;
|
|
683
|
-
resourceCode: string;
|
|
684
|
-
resourceType: string;
|
|
685
|
-
resourceName?: string;
|
|
686
|
-
rolePermit: RuntimePermitRole[] | null;
|
|
687
|
-
dataPermit?: RuntimePermitRole[] | null;
|
|
688
|
-
fieldPermit?: string;
|
|
689
|
-
extend?: string;
|
|
690
|
-
}
|
|
691
|
-
export interface RuntimePagePermit {
|
|
692
|
-
menuId: number;
|
|
693
|
-
pageId?: number;
|
|
694
|
-
appCode: string;
|
|
695
|
-
datasetCode?: string;
|
|
696
|
-
menuPermit: RuntimeResourcePermit;
|
|
697
|
-
dataCreate?: RuntimeResourcePermit;
|
|
698
|
-
dataUpdate?: RuntimeResourcePermit;
|
|
699
|
-
dataDelete?: RuntimeResourcePermit;
|
|
700
|
-
dataDetail?: RuntimeResourcePermit;
|
|
701
|
-
dataExport?: RuntimeResourcePermit;
|
|
702
|
-
dataPermit?: RuntimeResourcePermit;
|
|
703
|
-
}
|
|
704
|
-
export interface RuntimeEvaluatedResource {
|
|
705
|
-
resourceType: string;
|
|
706
|
-
resourceCode: string;
|
|
707
|
-
resourceName?: string;
|
|
708
|
-
allowed?: boolean;
|
|
709
|
-
allowedActions?: string[];
|
|
710
|
-
appCode?: string;
|
|
711
|
-
menuType?: string;
|
|
712
|
-
pageId?: number | null;
|
|
713
|
-
pageNodeList?: RuntimeEvaluatedResource[] | null;
|
|
714
|
-
}
|
|
715
|
-
export interface RuntimeMenuRolePermitNode {
|
|
716
|
-
id: number;
|
|
717
|
-
parentId?: number;
|
|
718
|
-
label: string;
|
|
719
|
-
type?: string;
|
|
720
|
-
path?: string;
|
|
721
|
-
pageId?: number | null;
|
|
722
|
-
permitId?: number | null;
|
|
723
|
-
rolePermit: RuntimePermitRole[] | null;
|
|
724
|
-
children?: RuntimeMenuRolePermitNode[];
|
|
725
|
-
}
|
|
726
|
-
export interface RuntimeDatasetPermit {
|
|
727
|
-
appCode?: string;
|
|
728
|
-
datasetCode: string;
|
|
729
|
-
datasetName?: string;
|
|
730
|
-
dataPermitList: RuntimeEvaluatedResource[];
|
|
731
|
-
}
|
|
732
|
-
export interface RuntimeDatasetActionRolePermit {
|
|
733
|
-
permitId?: number | null;
|
|
734
|
-
resourceType: string;
|
|
735
|
-
resourceCode: string;
|
|
736
|
-
resourceName?: string;
|
|
737
|
-
rolePermit: RuntimePermitRole[] | null;
|
|
738
|
-
}
|
|
739
|
-
export interface RuntimeDatasetRolePermit {
|
|
740
|
-
appCode?: string;
|
|
741
|
-
datasetCode: string;
|
|
742
|
-
datasetName?: string;
|
|
743
|
-
dataPermitList: RuntimeDatasetActionRolePermit[];
|
|
744
|
-
}
|
|
745
413
|
export declare function listRuntimePermitRoles(appCode: string, options?: {
|
|
746
414
|
needSelf?: boolean;
|
|
747
415
|
needPublic?: boolean;
|
|
@@ -750,7 +418,7 @@ export declare function getRuntimePagePermit(menuId: number): Promise<RuntimePag
|
|
|
750
418
|
export declare function saveRuntimePagePermit(input: RuntimePagePermit): Promise<RuntimePagePermit>;
|
|
751
419
|
export declare function getRuntimeRoleMenuResources(appCode: string, roleId: number): Promise<RuntimeEvaluatedResource[]>;
|
|
752
420
|
export declare function listRuntimeMenuRolePermits(appCode: string): Promise<RuntimeMenuRolePermitNode[]>;
|
|
753
|
-
export declare function saveRuntimeMenuRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<
|
|
421
|
+
export declare function saveRuntimeMenuRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<void>;
|
|
754
422
|
export declare function listRuntimeDatasetPermits(appCode: string, roleId: number): Promise<RuntimeDatasetPermit[]>;
|
|
755
423
|
export declare function listRuntimeDatasetRolePermits(appCode: string): Promise<RuntimeDatasetRolePermit[]>;
|
|
756
|
-
export declare function saveRuntimeDatasetRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<
|
|
424
|
+
export declare function saveRuntimeDatasetRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<void>;
|