@lovrabet/lovrabet-cli 2.3.7 → 2.3.8-beta.2

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.
Files changed (189) hide show
  1. package/README.md +1 -1
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/approval/index.js +1 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.d.ts +1 -1
  27. package/lib/commands/config/init.js +1 -1
  28. package/lib/commands/config/shared.js +1 -1
  29. package/lib/commands/data/import-excel.js +1 -1
  30. package/lib/commands/data/index.js +1 -1
  31. package/lib/commands/dataset/detail.js +1 -1
  32. package/lib/commands/dataset/index.js +1 -1
  33. package/lib/commands/dataset/list.js +1 -1
  34. package/lib/commands/dataset/sdk-doc.js +1 -1
  35. package/lib/commands/doctor.js +1 -1
  36. package/lib/commands/file/index.js +1 -1
  37. package/lib/commands/init.js +1 -1
  38. package/lib/commands/kb/index.js +1 -1
  39. package/lib/commands/logs/index.js +1 -1
  40. package/lib/commands/notification/config-list.js +1 -1
  41. package/lib/commands/notification/index.js +1 -1
  42. package/lib/commands/notification/shared.js +1 -1
  43. package/lib/commands/ocr/index.js +1 -1
  44. package/lib/commands/permit/dataset-get.js +1 -1
  45. package/lib/commands/permit/dataset-set.js +1 -1
  46. package/lib/commands/permit/index.js +1 -1
  47. package/lib/commands/permit/page-get.js +1 -1
  48. package/lib/commands/permit/page-set.js +1 -1
  49. package/lib/commands/permit/role-menus-set.js +1 -1
  50. package/lib/commands/permit/role-menus.js +1 -1
  51. package/lib/commands/permit/shared.js +1 -1
  52. package/lib/commands/personal-bff/index.js +1 -1
  53. package/lib/commands/registry.js +1 -1
  54. package/lib/commands/role/create.js +1 -1
  55. package/lib/commands/role/delete.js +1 -1
  56. package/lib/commands/role/detail.js +1 -1
  57. package/lib/commands/role/index.js +1 -1
  58. package/lib/commands/role/list.js +1 -1
  59. package/lib/commands/role/shared.d.ts +32 -6
  60. package/lib/commands/role/shared.js +1 -1
  61. package/lib/commands/role/update.js +1 -1
  62. package/lib/commands/role/user-add.js +1 -1
  63. package/lib/commands/role/user-remove.js +1 -1
  64. package/lib/commands/schedule/index.js +1 -1
  65. package/lib/commands/schema.js +1 -1
  66. package/lib/commands/service/dynamic.js +1 -1
  67. package/lib/commands/service/function-name-adapter.js +1 -1
  68. package/lib/commands/service/index.js +1 -1
  69. package/lib/commands/service/registry.js +1 -1
  70. package/lib/commands/skill/commands/create.js +1 -1
  71. package/lib/commands/skill/commands/diagram.js +1 -1
  72. package/lib/commands/skill/commands/install.js +1 -1
  73. package/lib/commands/skill/commands/list.js +1 -1
  74. package/lib/commands/skill/commands/push.js +1 -1
  75. package/lib/commands/skill/commands/validate.js +1 -1
  76. package/lib/commands/skill/diagram.js +1 -1
  77. package/lib/commands/skill/flags.js +1 -1
  78. package/lib/commands/skill/index.js +1 -1
  79. package/lib/commands/skill/manifest-helpers.js +1 -1
  80. package/lib/commands/skill/push-execute.js +1 -1
  81. package/lib/commands/skill/push-flow-helpers.js +1 -1
  82. package/lib/commands/skill/push-retarget.js +1 -1
  83. package/lib/commands/skill/scopes.js +1 -1
  84. package/lib/commands/skill/summary.js +1 -1
  85. package/lib/commands/skill/templates.js +1 -1
  86. package/lib/commands/skill/validate.js +1 -1
  87. package/lib/commands/sql/detail.js +1 -1
  88. package/lib/commands/sql/exec.d.ts +2 -4
  89. package/lib/commands/sql/exec.js +1 -1
  90. package/lib/commands/sql/index.js +1 -1
  91. package/lib/commands/update.js +1 -1
  92. package/lib/commands/user-account/bind.js +1 -1
  93. package/lib/commands/user-account/index.js +1 -1
  94. package/lib/commands/workspace/index.js +1 -1
  95. package/lib/config/domain-config.js +1 -1
  96. package/lib/config/schema.js +1 -1
  97. package/lib/constant/app.js +1 -1
  98. package/lib/constant/auth-mode.js +1 -1
  99. package/lib/constant/cli.js +1 -1
  100. package/lib/constant/defaults.js +1 -1
  101. package/lib/constant/distribution.js +1 -1
  102. package/lib/constant/domain.js +1 -1
  103. package/lib/constant/env.js +1 -1
  104. package/lib/constant/output.js +1 -1
  105. package/lib/constant/product.js +1 -1
  106. package/lib/constant/region.js +1 -1
  107. package/lib/constant/risk.js +1 -1
  108. package/lib/constant/url.js +1 -1
  109. package/lib/context.js +1 -1
  110. package/lib/core/api-client.d.ts +20 -340
  111. package/lib/core/api-client.js +1 -1
  112. package/lib/core/db-resolver.js +1 -1
  113. package/lib/core/kb-management-client.js +1 -1
  114. package/lib/core/kb-search-client.js +1 -1
  115. package/lib/core/sdk-client.d.ts +7 -10
  116. package/lib/core/sdk-client.js +1 -1
  117. package/lib/errors.js +1 -1
  118. package/lib/framework/access-error.js +1 -1
  119. package/lib/framework/build-all-flags.js +1 -1
  120. package/lib/framework/dryrun.js +1 -1
  121. package/lib/framework/flags.js +1 -1
  122. package/lib/framework/help.js +1 -1
  123. package/lib/framework/index.js +1 -1
  124. package/lib/framework/output.js +1 -1
  125. package/lib/framework/preparse.js +1 -1
  126. package/lib/framework/rate-limit.js +1 -1
  127. package/lib/framework/raw-flags.js +1 -1
  128. package/lib/framework/response.js +1 -1
  129. package/lib/framework/runner-confirmation.js +1 -1
  130. package/lib/framework/runner-error.js +1 -1
  131. package/lib/framework/runner.js +1 -1
  132. package/lib/framework/schema-export.js +1 -1
  133. package/lib/framework/service-order.js +1 -1
  134. package/lib/framework/types.js +1 -1
  135. package/lib/generated/build-info.d.ts +4 -4
  136. package/lib/generated/build-info.js +1 -1
  137. package/lib/generated/official-routing.js +1 -1
  138. package/lib/generated/routing-contract.js +1 -1
  139. package/lib/help.js +1 -1
  140. package/lib/postinstall.js +1 -1
  141. package/lib/runtime/confirmation.js +1 -1
  142. package/lib/runtime/event.js +1 -1
  143. package/lib/runtime/index.js +1 -1
  144. package/lib/runtime/queue.js +1 -1
  145. package/lib/runtime/resolve.js +1 -1
  146. package/lib/services/dataset-import/auto-id-runner.js +1 -1
  147. package/lib/services/dataset-import/excel-reader.js +1 -1
  148. package/lib/services/dataset-import/image-bytes.js +1 -1
  149. package/lib/services/dataset-import/image-ooxml.js +1 -1
  150. package/lib/services/dataset-import/image-runner.js +1 -1
  151. package/lib/services/dataset-import/metadata.js +1 -1
  152. package/lib/services/dataset-import/preview.js +1 -1
  153. package/lib/services/dataset-import/runner.js +1 -1
  154. package/lib/skills/builtin-skill.js +1 -1
  155. package/lib/skills/npx-skills-add.js +1 -1
  156. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  157. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  158. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  159. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  160. package/lib/skills/runtime-skill-sync/links.js +1 -1
  161. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  162. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  163. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  164. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  165. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  166. package/lib/skills/runtime-skill-sync/push.js +1 -1
  167. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  168. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  169. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  170. package/lib/skills/runtime-skill-sync.js +1 -1
  171. package/lib/skills/skill-presence.js +1 -1
  172. package/lib/utils/access-key-redaction.js +1 -1
  173. package/lib/utils/apply-jq-filter.js +1 -1
  174. package/lib/utils/cli-version-check.js +1 -1
  175. package/lib/utils/cli-version-policy.js +1 -1
  176. package/lib/utils/logger.js +1 -1
  177. package/lib/utils/lossless-json.js +1 -1
  178. package/lib/utils/params.js +1 -1
  179. package/lib/utils/positive-safe-integer.js +1 -1
  180. package/lib/utils/redaction.js +1 -1
  181. package/lib/utils/runtime-user-id.d.ts +2 -0
  182. package/lib/utils/runtime-user-id.js +1 -0
  183. package/lib/utils/update-notice.js +1 -1
  184. package/lib/utils/version.js +1 -1
  185. package/lib/utils/write-cli-side-channel.js +1 -1
  186. package/package.json +3 -3
  187. package/skills/lovrabet/SKILL.md +2 -2
  188. package/skills/lovrabet/guides/role-and-permission-workflow.md +3 -2
  189. package/skills/lovrabet.manifest.json +3 -3
@@ -1,53 +1,24 @@
1
- /**
2
- * @fileoverview Management API client using raw `fetch`.
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 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";
2
+ 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
3
  import type { Paging } from "../framework/response.js";
17
4
  /** Sets the active AccessKey used for all subsequent API calls. */
18
5
  export declare function setActiveAK(ak: string): void;
19
6
  /** Clears the active AccessKey after command completion. */
20
7
  export declare function clearActiveAK(): void;
21
- /** Public runtime contract for one known Backend Function endpoint. */
22
- export interface BffEndpointContract {
23
- appCode: string;
24
- functionName: string;
25
- description?: string;
26
- version?: number;
27
- gmtModified?: string | number;
28
- }
8
+ export type BffEndpointContract = Awaited<ReturnType<typeof getBffEndpointContract>>;
29
9
  /**
30
10
  * Fetches one known Backend Function endpoint contract by its stable runtime identity.
31
11
  * The runtime exposes an AK-authenticated exact endpoint keyed by appCode + functionName.
32
12
  * Platform-only fields returned by older backends are intentionally discarded here.
33
13
  */
34
- export declare function getBffEndpointContract(appCode: string, functionName: string): Promise<BffEndpointContract>;
35
- /** Metadata for a SQL query returned by the management API. */
36
- export interface SqlQuery {
37
- id: number;
38
- tenantCode?: string;
14
+ export declare function getBffEndpointContract(appCode: string, functionName: string): Promise<{
39
15
  appCode: string;
40
- sqlCode: string;
41
- sqlName: string;
42
- dbId?: number;
43
- sqlContent?: string;
44
- sqlConfig?: string | null;
45
- params?: string | null;
46
- }
47
- export interface SqlListResult {
48
- tableData: SqlQuery[];
49
- paging: Paging;
50
- }
16
+ functionName: string;
17
+ description: string | undefined;
18
+ version: number | undefined;
19
+ gmtModified: number | null | undefined;
20
+ }>;
21
+ export type SqlListResult = DataList<SqlQuery>;
51
22
  /**
52
23
  * Fetches SQL query metadata by `sqlCode`.
53
24
  *
@@ -61,39 +32,6 @@ export interface SqlListResult {
61
32
  * handle both shapes.
62
33
  */
63
34
  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
35
  export interface RuntimeArtifactUpsertInput {
98
36
  artifactType: "react_module";
99
37
  name?: string;
@@ -101,69 +39,10 @@ export interface RuntimeArtifactUpsertInput {
101
39
  metadata?: Record<string, unknown>;
102
40
  source: "AGENT";
103
41
  }
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
42
  export interface DatasetSdkUsageResponse {
127
43
  markdown?: string;
128
44
  [key: string]: unknown;
129
45
  }
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
46
  /** A personal knowledge-base entry returned by the runtime API. */
168
47
  export interface PersonalKnowledgeBaseItem {
169
48
  id: string;
@@ -339,83 +218,7 @@ export interface LoginUserInfo {
339
218
  email?: string | null;
340
219
  [key: string]: unknown;
341
220
  }
342
- /** Runtime approval task returned by the current task APIs. */
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
- }
221
+ export type ApprovalFlowTodoPage = PageResult<ApprovalFlowTaskItem>;
419
222
  export type RuntimeScheduleKind = "CRON" | "ONCE";
420
223
  export type RuntimeScheduleModel = "kimi/k3" | "deepseek-v4-flash-0731" | "deepseek-v4-pro-0813";
421
224
  export type RuntimeScheduleTaskStatus = "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
@@ -459,9 +262,9 @@ export declare function listApprovalTodo(appCode: string, currentPage?: number,
459
262
  /** Fetches one approval task detail for the AccessKey-authenticated user. */
460
263
  export declare function getApprovalTaskDetail(taskId: string, appCode: string): Promise<ApprovalFlowTaskDetail>;
461
264
  /** Approves or rejects one approval task. */
462
- export declare function approveApprovalTask(input: ApprovalFlowApproveInput): Promise<unknown>;
265
+ export declare function approveApprovalTask(input: ApprovalFlowApproveInput): Promise<null>;
463
266
  /** Transfers one approval task to a Runtime-authorized target user. */
464
- export declare function transferApprovalTask(input: ApprovalFlowTransferInput): Promise<unknown>;
267
+ export declare function transferApprovalTask(input: ApprovalFlowTransferInput): Promise<null>;
465
268
  /** Fetches the current user's app list from the remote API. */
466
269
  export declare function getMyApps(): Promise<RemoteAppItem[]>;
467
270
  /**
@@ -504,7 +307,7 @@ export declare function listDatasets(appCode: string, options?: {
504
307
  * The server endpoint also accepts `id`, but runtime CLI keeps `code` as the
505
308
  * public contract because it is stable across environments and visible to users.
506
309
  */
507
- export declare function getDatasetDetail(datasetCode: string): Promise<any>;
310
+ export declare function getDatasetDetail(datasetCode: string): Promise<unknown>;
508
311
  /** 导入只消费 AK Client 契约;写入结果不明时由检查点回查,不自动重试。 */
509
312
  export declare function getDatasetImportContract(appCode: string, datasetCode: string): Promise<any>;
510
313
  export declare function createDatasetImportBatch(appCode: string, datasetCode: string, body: {
@@ -533,18 +336,9 @@ export declare function queryRuntimeFileUrl(filePath: string, options?: {
533
336
  download?: boolean;
534
337
  longTerm?: boolean;
535
338
  }): Promise<RuntimeFileUrlResponse>;
536
- export declare function recognizeRuntimeOcr(appCode: string, input: {
537
- url: string;
538
- type: string;
539
- }): Promise<RuntimeOcrResponse>;
339
+ export declare function recognizeRuntimeOcr(appCode: string, input: import("@lovrabet/sdk").OcrRecognizeRequest): Promise<RuntimeOcrResponse>;
540
340
  export declare function getRuntimeAppConfigByKey(appCode: string, key: string): Promise<string>;
541
341
  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
342
  /** Lists app-level notification configs without using the development Cookie flow. */
549
343
  export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
550
344
  export declare function listRuntimeArtifacts(appCode: string, options?: {
@@ -608,34 +402,6 @@ export declare function getRuntimeSkillVersionDiagram(appCode: string, skillCode
608
402
  /** Downloads a runtime Skill package through SkillHub. */
609
403
  export declare function downloadRuntimeSkillPackage(scope: "personal" | "company" | "builtin", skillCode: string, appCode: string, version?: string): Promise<Buffer>;
610
404
  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
405
  export interface RuntimeAppRoleListOptions {
640
406
  roleName?: string;
641
407
  currentPage?: number;
@@ -651,97 +417,11 @@ export declare function createRuntimeAppRole(input: {
651
417
  roleName: string;
652
418
  remark?: string;
653
419
  }): Promise<RuntimeAppRole>;
654
- export declare function updateRuntimeAppRole(input: {
655
- id: number;
656
- appCode: string;
657
- roleCode?: string;
658
- roleName?: string;
659
- remark?: string;
660
- }): Promise<RuntimeAppRole>;
661
- export declare function deleteRuntimeAppRole(id: number): Promise<boolean>;
420
+ export declare function updateRuntimeAppRole(input: AppRoleUpdateParam): Promise<RuntimeAppRole>;
421
+ export declare function deleteRuntimeAppRole(id: number): Promise<void>;
662
422
  export declare function listRuntimeRoleUsers(appCode: string): Promise<RuntimeRoleUsers[]>;
663
- export declare function updateRuntimeRoleUsers(appCode: string, roleList: RuntimeRoleUsers[]): Promise<boolean>;
664
- export interface RuntimeAppUser {
665
- code: string | number;
666
- userName: string;
667
- nickName?: string;
668
- displayName?: string;
669
- status?: string;
670
- }
423
+ export declare function updateRuntimeRoleUsers(appCode: string, roleList: RuntimeRoleUsers[]): Promise<void>;
671
424
  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
425
  export declare function listRuntimePermitRoles(appCode: string, options?: {
746
426
  needSelf?: boolean;
747
427
  needPublic?: boolean;
@@ -750,7 +430,7 @@ export declare function getRuntimePagePermit(menuId: number): Promise<RuntimePag
750
430
  export declare function saveRuntimePagePermit(input: RuntimePagePermit): Promise<RuntimePagePermit>;
751
431
  export declare function getRuntimeRoleMenuResources(appCode: string, roleId: number): Promise<RuntimeEvaluatedResource[]>;
752
432
  export declare function listRuntimeMenuRolePermits(appCode: string): Promise<RuntimeMenuRolePermitNode[]>;
753
- export declare function saveRuntimeMenuRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<boolean>;
433
+ export declare function saveRuntimeMenuRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<void>;
754
434
  export declare function listRuntimeDatasetPermits(appCode: string, roleId: number): Promise<RuntimeDatasetPermit[]>;
755
435
  export declare function listRuntimeDatasetRolePermits(appCode: string): Promise<RuntimeDatasetRolePermit[]>;
756
- export declare function saveRuntimeDatasetRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<boolean>;
436
+ export declare function saveRuntimeDatasetRolePermits(appCode: string, permitList: RuntimeResourcePermit[]): Promise<void>;