@lark-project/js-sdk 2.1.4-alpha.2 → 2.1.4-dev.ainode.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.
- package/dist/es/index.js +29 -2
- package/dist/lib/index.js +31 -2
- package/dist/types/index.d.ts +67 -43
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
* MIT License
|
|
4
|
-
* Copyright (c)
|
|
4
|
+
* Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
|
5
5
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
|
|
7
7
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -496,6 +496,16 @@ _a29 = IMPL_KEY;
|
|
|
496
496
|
*/
|
|
497
497
|
BuilderComponent[_a29] = "liteAppComponent";
|
|
498
498
|
|
|
499
|
+
// src/features/AINode.ts
|
|
500
|
+
var _a30;
|
|
501
|
+
var AINode = class extends BaseModel {
|
|
502
|
+
};
|
|
503
|
+
_a30 = IMPL_KEY;
|
|
504
|
+
/**
|
|
505
|
+
* @internal
|
|
506
|
+
*/
|
|
507
|
+
AINode[_a30] = "aiNode";
|
|
508
|
+
|
|
499
509
|
// src/client.ts
|
|
500
510
|
function getImplClass(decl, impls) {
|
|
501
511
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -589,6 +599,13 @@ var _SDKClient = class {
|
|
|
589
599
|
get liteAppComponent() {
|
|
590
600
|
return getImplValue(BuilderComponent, this._meegoBizHub);
|
|
591
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* AI 节点点位容器特有能力
|
|
604
|
+
* only 2.0
|
|
605
|
+
*/
|
|
606
|
+
get aiNode() {
|
|
607
|
+
return getImplValue(AINode, this._meegoBizHub);
|
|
608
|
+
}
|
|
592
609
|
/**
|
|
593
610
|
* 应用导航
|
|
594
611
|
*/
|
|
@@ -722,7 +739,7 @@ var SDKClient = _SDKClient;
|
|
|
722
739
|
/**
|
|
723
740
|
* SDK 版本号
|
|
724
741
|
*/
|
|
725
|
-
SDKClient.version = "2.1.4-
|
|
742
|
+
SDKClient.version = "2.1.4-dev.ainode.2";
|
|
726
743
|
|
|
727
744
|
// src/types/biz.ts
|
|
728
745
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -822,6 +839,14 @@ var LiteAppPropTemplateType = /* @__PURE__ */ ((LiteAppPropTemplateType2) => {
|
|
|
822
839
|
LiteAppPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
|
|
823
840
|
return LiteAppPropTemplateType2;
|
|
824
841
|
})(LiteAppPropTemplateType || {});
|
|
842
|
+
var AINodeRuningState = /* @__PURE__ */ ((AINodeRuningState2) => {
|
|
843
|
+
AINodeRuningState2["Idle"] = "idle";
|
|
844
|
+
AINodeRuningState2["Running"] = "running";
|
|
845
|
+
AINodeRuningState2["Done"] = "done";
|
|
846
|
+
AINodeRuningState2["Stopped"] = "stopped";
|
|
847
|
+
AINodeRuningState2["Error"] = "error";
|
|
848
|
+
return AINodeRuningState2;
|
|
849
|
+
})(AINodeRuningState || {});
|
|
825
850
|
|
|
826
851
|
// src/errors/CustomError.ts
|
|
827
852
|
var CustomError = class extends Error {
|
|
@@ -923,6 +948,8 @@ var SystemPermissionDeniedError = class extends CustomError {
|
|
|
923
948
|
// src/index.ts
|
|
924
949
|
var src_default = SDKClient;
|
|
925
950
|
export {
|
|
951
|
+
AINode,
|
|
952
|
+
AINodeRuningState,
|
|
926
953
|
ActionSheet,
|
|
927
954
|
AttributeType,
|
|
928
955
|
BuilderComponent,
|
package/dist/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
* MIT License
|
|
4
|
-
* Copyright (c)
|
|
4
|
+
* Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
|
5
5
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
|
|
7
7
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -48,6 +48,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
48
48
|
// src/index.ts
|
|
49
49
|
var src_exports = {};
|
|
50
50
|
__export(src_exports, {
|
|
51
|
+
AINode: () => AINode,
|
|
52
|
+
AINodeRuningState: () => AINodeRuningState,
|
|
51
53
|
ActionSheet: () => ActionSheet,
|
|
52
54
|
AttributeType: () => AttributeType,
|
|
53
55
|
BuilderComponent: () => BuilderComponent,
|
|
@@ -569,6 +571,16 @@ _a29 = IMPL_KEY;
|
|
|
569
571
|
*/
|
|
570
572
|
BuilderComponent[_a29] = "liteAppComponent";
|
|
571
573
|
|
|
574
|
+
// src/features/AINode.ts
|
|
575
|
+
var _a30;
|
|
576
|
+
var AINode = class extends BaseModel {
|
|
577
|
+
};
|
|
578
|
+
_a30 = IMPL_KEY;
|
|
579
|
+
/**
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
AINode[_a30] = "aiNode";
|
|
583
|
+
|
|
572
584
|
// src/client.ts
|
|
573
585
|
function getImplClass(decl, impls) {
|
|
574
586
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -662,6 +674,13 @@ var _SDKClient = class {
|
|
|
662
674
|
get liteAppComponent() {
|
|
663
675
|
return getImplValue(BuilderComponent, this._meegoBizHub);
|
|
664
676
|
}
|
|
677
|
+
/**
|
|
678
|
+
* AI 节点点位容器特有能力
|
|
679
|
+
* only 2.0
|
|
680
|
+
*/
|
|
681
|
+
get aiNode() {
|
|
682
|
+
return getImplValue(AINode, this._meegoBizHub);
|
|
683
|
+
}
|
|
665
684
|
/**
|
|
666
685
|
* 应用导航
|
|
667
686
|
*/
|
|
@@ -795,7 +814,7 @@ var SDKClient = _SDKClient;
|
|
|
795
814
|
/**
|
|
796
815
|
* SDK 版本号
|
|
797
816
|
*/
|
|
798
|
-
SDKClient.version = "2.1.4-
|
|
817
|
+
SDKClient.version = "2.1.4-dev.ainode.2";
|
|
799
818
|
|
|
800
819
|
// src/types/biz.ts
|
|
801
820
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -895,6 +914,14 @@ var LiteAppPropTemplateType = /* @__PURE__ */ ((LiteAppPropTemplateType2) => {
|
|
|
895
914
|
LiteAppPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
|
|
896
915
|
return LiteAppPropTemplateType2;
|
|
897
916
|
})(LiteAppPropTemplateType || {});
|
|
917
|
+
var AINodeRuningState = /* @__PURE__ */ ((AINodeRuningState2) => {
|
|
918
|
+
AINodeRuningState2["Idle"] = "idle";
|
|
919
|
+
AINodeRuningState2["Running"] = "running";
|
|
920
|
+
AINodeRuningState2["Done"] = "done";
|
|
921
|
+
AINodeRuningState2["Stopped"] = "stopped";
|
|
922
|
+
AINodeRuningState2["Error"] = "error";
|
|
923
|
+
return AINodeRuningState2;
|
|
924
|
+
})(AINodeRuningState || {});
|
|
898
925
|
|
|
899
926
|
// src/errors/CustomError.ts
|
|
900
927
|
var CustomError = class extends Error {
|
|
@@ -997,6 +1024,8 @@ var SystemPermissionDeniedError = class extends CustomError {
|
|
|
997
1024
|
var src_default = SDKClient;
|
|
998
1025
|
// Annotate the CommonJS export names for ESM import in node:
|
|
999
1026
|
0 && (module.exports = {
|
|
1027
|
+
AINode,
|
|
1028
|
+
AINodeRuningState,
|
|
1000
1029
|
ActionSheet,
|
|
1001
1030
|
AttributeType,
|
|
1002
1031
|
BuilderComponent,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -893,18 +893,13 @@ type LiteAppPropField = {
|
|
|
893
893
|
roleId: string;
|
|
894
894
|
display?: boolean;
|
|
895
895
|
};
|
|
896
|
-
type LiteAppPropDataSource = {
|
|
897
|
-
spaceId: string;
|
|
898
|
-
workObjectId: string;
|
|
899
|
-
fieldList?: LiteAppPropField[];
|
|
900
|
-
};
|
|
901
896
|
type LiteAppPropView = {
|
|
902
897
|
viewId: string;
|
|
903
898
|
isMultiProject: boolean;
|
|
904
899
|
};
|
|
905
900
|
type LiteAppPropWorkItemListAfterFilter = LiteAppPropWorkItemInstance[];
|
|
906
901
|
type LiteAppPropWorkItemListAfterSort = LiteAppPropWorkItemInstance[];
|
|
907
|
-
type LiteAppCompPropValueType = LiteAppPropText | LiteAppPropNumber | LiteAppPropSelect | LiteAppPropBoolean | LiteAppPropMultiSelect | LiteAppPropDateWithTime | LiteAppPropDateRange | LiteAppPropWorkItemType | LiteAppPropWorkItemInstance | LiteAppPropView | LiteAppPropWorkItemListAfterFilter | LiteAppPropWorkItemListAfterSort
|
|
902
|
+
type LiteAppCompPropValueType = LiteAppPropText | LiteAppPropNumber | LiteAppPropSelect | LiteAppPropBoolean | LiteAppPropMultiSelect | LiteAppPropDateWithTime | LiteAppPropDateRange | LiteAppPropWorkItemType | LiteAppPropWorkItemInstance | LiteAppPropView | LiteAppPropWorkItemListAfterFilter | LiteAppPropWorkItemListAfterSort;
|
|
908
903
|
/**
|
|
909
904
|
* liteapp 组件不同的属性类型对应的可读配置
|
|
910
905
|
*/
|
|
@@ -963,49 +958,44 @@ interface LiteAppComponentPreset {
|
|
|
963
958
|
height: number;
|
|
964
959
|
};
|
|
965
960
|
}
|
|
966
|
-
|
|
961
|
+
/** ----------------------- AI 节点构成类型 ----------------------- */
|
|
962
|
+
interface AINodeFeatureContext {
|
|
967
963
|
/**
|
|
968
|
-
*
|
|
969
|
-
*/
|
|
970
|
-
id: number;
|
|
971
|
-
/**
|
|
972
|
-
* 空间标识
|
|
964
|
+
* AI 节点当前所属空间标识
|
|
973
965
|
*/
|
|
974
966
|
spaceId: string;
|
|
975
967
|
/**
|
|
976
|
-
*
|
|
968
|
+
* AI 节点当前所属工作项类型标识
|
|
977
969
|
*/
|
|
978
970
|
workObjectId: string;
|
|
979
971
|
/**
|
|
980
|
-
*
|
|
981
|
-
*/
|
|
982
|
-
templateId: number;
|
|
983
|
-
/**
|
|
984
|
-
* 工作项实例名称
|
|
985
|
-
*/
|
|
986
|
-
name: string;
|
|
987
|
-
/**
|
|
988
|
-
* 角色与人员列表
|
|
989
|
-
*/
|
|
990
|
-
roleOwnersList: RoleOwners[];
|
|
991
|
-
/**
|
|
992
|
-
* 工作项实例已终止
|
|
972
|
+
* AI 节点当前所属工作项实例标识
|
|
993
973
|
*/
|
|
994
|
-
|
|
974
|
+
workItemId: number;
|
|
995
975
|
/**
|
|
996
|
-
*
|
|
976
|
+
* 当前节点标识
|
|
997
977
|
*/
|
|
998
|
-
|
|
978
|
+
nodeId: string;
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* AI 节点运行状态
|
|
982
|
+
*/
|
|
983
|
+
declare enum AINodeRuningState {
|
|
984
|
+
Idle = "idle",
|
|
985
|
+
Running = "running",
|
|
986
|
+
Done = "done",
|
|
987
|
+
Stopped = "stopped",
|
|
988
|
+
Error = "error"
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* AI 节点 props
|
|
992
|
+
*/
|
|
993
|
+
interface AINodeProps {
|
|
999
994
|
/**
|
|
1000
|
-
*
|
|
995
|
+
* AI 节点运行状态字段
|
|
1001
996
|
*/
|
|
1002
|
-
|
|
1003
|
-
}
|
|
1004
|
-
type LiteAppComponentDataSourceResult = {
|
|
1005
|
-
data: LiteAppWorkItemInstance[];
|
|
1006
|
-
total: number;
|
|
1007
|
-
hasMore: boolean;
|
|
1008
|
-
};
|
|
997
|
+
ai_node_running: AINodeRuningState;
|
|
998
|
+
}
|
|
1009
999
|
|
|
1010
1000
|
/**
|
|
1011
1001
|
* @internal
|
|
@@ -2379,13 +2369,42 @@ declare abstract class BuilderComponent extends BaseModel {
|
|
|
2379
2369
|
* 暂时不支持指定多组预设值/指定预设id(统一走 default),未来视诉求开放
|
|
2380
2370
|
*/
|
|
2381
2371
|
abstract getPreset: (propKeys?: string | string[]) => Promise<LiteAppComponentPreset>;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* @public
|
|
2376
|
+
* AI 节点
|
|
2377
|
+
*/
|
|
2378
|
+
declare abstract class AINode extends BaseModel {
|
|
2379
|
+
/**
|
|
2380
|
+
* @internal
|
|
2381
|
+
*/
|
|
2382
|
+
protected static [IMPL_KEY]: string;
|
|
2383
|
+
/**
|
|
2384
|
+
* 获取当前 AI 节点所在的上下文
|
|
2385
|
+
*/
|
|
2386
|
+
abstract getContext(): Promise<AINodeFeatureContext>;
|
|
2382
2387
|
/**
|
|
2383
|
-
* 获取
|
|
2388
|
+
* 获取 AI 节点运行态 props
|
|
2384
2389
|
*/
|
|
2385
|
-
abstract
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2390
|
+
abstract getProps(): Promise<AINodeProps>;
|
|
2391
|
+
/**
|
|
2392
|
+
* 监听 AI 节点 props 变更
|
|
2393
|
+
* @param callback 返回最新的 props
|
|
2394
|
+
* @param watchKeys 需要监听的 key,默认监听所有 key
|
|
2395
|
+
*/
|
|
2396
|
+
abstract watch(callback: (next: AINodeProps | Record<string, never>) => void, watchKeys?: (keyof AINodeProps)[]): Promise<Off>;
|
|
2397
|
+
/**
|
|
2398
|
+
* 监听工作项表单项值变化
|
|
2399
|
+
* @param options.watchKeys 需要监听的工作项字段 ID 列表
|
|
2400
|
+
* @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
|
|
2401
|
+
*/
|
|
2402
|
+
abstract onWorkItemFormValueChanged(options: {
|
|
2403
|
+
watchKeys: Array<{
|
|
2404
|
+
key: string | AttributeType;
|
|
2405
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
2406
|
+
}>;
|
|
2407
|
+
}, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
|
|
2389
2408
|
}
|
|
2390
2409
|
|
|
2391
2410
|
/**
|
|
@@ -2466,6 +2485,11 @@ declare class SDKClient {
|
|
|
2466
2485
|
* only web 2.0
|
|
2467
2486
|
*/
|
|
2468
2487
|
get liteAppComponent(): BuilderComponent;
|
|
2488
|
+
/**
|
|
2489
|
+
* AI 节点点位容器特有能力
|
|
2490
|
+
* only 2.0
|
|
2491
|
+
*/
|
|
2492
|
+
get aiNode(): AINode;
|
|
2469
2493
|
/**
|
|
2470
2494
|
* 应用导航
|
|
2471
2495
|
*/
|
|
@@ -2623,4 +2647,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2623
2647
|
* @packageDocumentation
|
|
2624
2648
|
*/
|
|
2625
2649
|
|
|
2626
|
-
export { ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType, CustomField, CustomFieldConfig, CustomFieldFeatureContext, CustomFieldProps, CustomFieldValidateMsg, CustomFieldValueType, Event, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, Geolocation, GeolocationCoordinates, GeolocationPosition, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig,
|
|
2650
|
+
export { AINode, AINodeFeatureContext, AINodeProps, AINodeRuningState, ActionSheet, ActionSheetOptions, AttributeType, BatchButtonFeatureContext, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, BuilderComponent, Button, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, ComponentScheduleIdentity, ComponentScheduleScene, Configuration, ConfigurationFeatureContext, ContainerModal, ContainerModalConfigureOptions, Context, Control, ControlFeatureContext, CreateButtonFeatureContext, CustomComponent, CustomComponentFeatureContext, CustomComponentProps, CustomComponentType, CustomField, CustomFieldConfig, CustomFieldFeatureContext, CustomFieldProps, CustomFieldValidateMsg, CustomFieldValueType, Event, EventPayloadMap, EventType, ExCompoundFieldValueType, Field, FieldType, FieldValue, FlowMode, Geolocation, GeolocationCoordinates, GeolocationPosition, I18nTitleConfig, IMPL_KEY, IPluginCustomBuildConfig, IRichTextEditorImageUploadComplete, IntegrationFeatureContext, Intercept, InterceptEvent, InterceptFeatureContext, InternalError, InvalidParamsError, Language, LiteAppCompLayoutConfig, LiteAppCompPropBriefConfig, LiteAppCompPropFullConfig, LiteAppCompPropSelectConfig, LiteAppCompPropValueType, LiteAppComponentConfig, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, MEEGO_BIZ_HUB, Modal, ModalConfirmOptions, ModalOpenOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, NotSupportedError, Off, OutOfLimitError, Page, PageFeatureContext, RichTextEditor, RichTextEditorContent, RichTextEditorOptions, Role, RoleOwners, SDKClient, SDKClientOptions, ScheduleCompValidateMsg, ScheduleCompValueType, ScheduleUnitButtonFeatureContext, Script, ScriptFeatureContext, Shared, Space, Storage, SubFieldType, SystemPermissionDeniedError, Tab, TabFeatureContext, Toast, ToastOptions, User, UserInfo, Utils, View, ViewFeatureContext, WbsStatus, WorkItem, WorkItemButtonFeatureContext, WorkItemCreateFormPreset, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|