@lark-project/js-sdk 2.1.6 → 2.1.7
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/CHANGELOG.md +3 -0
- package/dist/es/index.js +28 -1
- package/dist/lib/index.js +30 -1
- package/dist/types/index.d.ts +80 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -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.
|
|
742
|
+
SDKClient.version = "2.1.7";
|
|
726
743
|
|
|
727
744
|
// src/types/biz.ts
|
|
728
745
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -833,6 +850,14 @@ var LiteAppSubscribedPropertyTemplate = /* @__PURE__ */ ((LiteAppSubscribedPrope
|
|
|
833
850
|
LiteAppSubscribedPropertyTemplate2["DataSource"] = "dataSource";
|
|
834
851
|
return LiteAppSubscribedPropertyTemplate2;
|
|
835
852
|
})(LiteAppSubscribedPropertyTemplate || {});
|
|
853
|
+
var AINodeRuningState = /* @__PURE__ */ ((AINodeRuningState2) => {
|
|
854
|
+
AINodeRuningState2["Idle"] = "idle";
|
|
855
|
+
AINodeRuningState2["Running"] = "running";
|
|
856
|
+
AINodeRuningState2["Done"] = "done";
|
|
857
|
+
AINodeRuningState2["Stopped"] = "stopped";
|
|
858
|
+
AINodeRuningState2["Error"] = "error";
|
|
859
|
+
return AINodeRuningState2;
|
|
860
|
+
})(AINodeRuningState || {});
|
|
836
861
|
|
|
837
862
|
// src/errors/CustomError.ts
|
|
838
863
|
var CustomError = class extends Error {
|
|
@@ -934,6 +959,8 @@ var SystemPermissionDeniedError = class extends CustomError {
|
|
|
934
959
|
// src/index.ts
|
|
935
960
|
var src_default = SDKClient;
|
|
936
961
|
export {
|
|
962
|
+
AINode,
|
|
963
|
+
AINodeRuningState,
|
|
937
964
|
ActionSheet,
|
|
938
965
|
AttributeType,
|
|
939
966
|
BuilderComponent,
|
package/dist/lib/index.js
CHANGED
|
@@ -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,
|
|
@@ -570,6 +572,16 @@ _a29 = IMPL_KEY;
|
|
|
570
572
|
*/
|
|
571
573
|
BuilderComponent[_a29] = "liteAppComponent";
|
|
572
574
|
|
|
575
|
+
// src/features/AINode.ts
|
|
576
|
+
var _a30;
|
|
577
|
+
var AINode = class extends BaseModel {
|
|
578
|
+
};
|
|
579
|
+
_a30 = IMPL_KEY;
|
|
580
|
+
/**
|
|
581
|
+
* @internal
|
|
582
|
+
*/
|
|
583
|
+
AINode[_a30] = "aiNode";
|
|
584
|
+
|
|
573
585
|
// src/client.ts
|
|
574
586
|
function getImplClass(decl, impls) {
|
|
575
587
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -663,6 +675,13 @@ var _SDKClient = class {
|
|
|
663
675
|
get liteAppComponent() {
|
|
664
676
|
return getImplValue(BuilderComponent, this._meegoBizHub);
|
|
665
677
|
}
|
|
678
|
+
/**
|
|
679
|
+
* AI 节点点位容器特有能力
|
|
680
|
+
* only 2.0
|
|
681
|
+
*/
|
|
682
|
+
get aiNode() {
|
|
683
|
+
return getImplValue(AINode, this._meegoBizHub);
|
|
684
|
+
}
|
|
666
685
|
/**
|
|
667
686
|
* 应用导航
|
|
668
687
|
*/
|
|
@@ -796,7 +815,7 @@ var SDKClient = _SDKClient;
|
|
|
796
815
|
/**
|
|
797
816
|
* SDK 版本号
|
|
798
817
|
*/
|
|
799
|
-
SDKClient.version = "2.1.
|
|
818
|
+
SDKClient.version = "2.1.7";
|
|
800
819
|
|
|
801
820
|
// src/types/biz.ts
|
|
802
821
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -907,6 +926,14 @@ var LiteAppSubscribedPropertyTemplate = /* @__PURE__ */ ((LiteAppSubscribedPrope
|
|
|
907
926
|
LiteAppSubscribedPropertyTemplate2["DataSource"] = "dataSource";
|
|
908
927
|
return LiteAppSubscribedPropertyTemplate2;
|
|
909
928
|
})(LiteAppSubscribedPropertyTemplate || {});
|
|
929
|
+
var AINodeRuningState = /* @__PURE__ */ ((AINodeRuningState2) => {
|
|
930
|
+
AINodeRuningState2["Idle"] = "idle";
|
|
931
|
+
AINodeRuningState2["Running"] = "running";
|
|
932
|
+
AINodeRuningState2["Done"] = "done";
|
|
933
|
+
AINodeRuningState2["Stopped"] = "stopped";
|
|
934
|
+
AINodeRuningState2["Error"] = "error";
|
|
935
|
+
return AINodeRuningState2;
|
|
936
|
+
})(AINodeRuningState || {});
|
|
910
937
|
|
|
911
938
|
// src/errors/CustomError.ts
|
|
912
939
|
var CustomError = class extends Error {
|
|
@@ -1009,6 +1036,8 @@ var SystemPermissionDeniedError = class extends CustomError {
|
|
|
1009
1036
|
var src_default = SDKClient;
|
|
1010
1037
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1011
1038
|
0 && (module.exports = {
|
|
1039
|
+
AINode,
|
|
1040
|
+
AINodeRuningState,
|
|
1012
1041
|
ActionSheet,
|
|
1013
1042
|
AttributeType,
|
|
1014
1043
|
BuilderComponent,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1036,6 +1036,44 @@ interface LiteAppComponentPreset {
|
|
|
1036
1036
|
height: number;
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
|
+
/** ----------------------- AI 节点构成类型 ----------------------- */
|
|
1040
|
+
interface AINodeFeatureContext {
|
|
1041
|
+
/**
|
|
1042
|
+
* AI 节点当前所属空间标识
|
|
1043
|
+
*/
|
|
1044
|
+
spaceId: string;
|
|
1045
|
+
/**
|
|
1046
|
+
* AI 节点当前所属工作项类型标识
|
|
1047
|
+
*/
|
|
1048
|
+
workObjectId: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* AI 节点当前所属工作项实例标识
|
|
1051
|
+
*/
|
|
1052
|
+
workItemId: number;
|
|
1053
|
+
/**
|
|
1054
|
+
* 当前节点标识
|
|
1055
|
+
*/
|
|
1056
|
+
nodeId: string;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* AI 节点运行状态
|
|
1060
|
+
*/
|
|
1061
|
+
declare enum AINodeRuningState {
|
|
1062
|
+
Idle = "idle",
|
|
1063
|
+
Running = "running",
|
|
1064
|
+
Done = "done",
|
|
1065
|
+
Stopped = "stopped",
|
|
1066
|
+
Error = "error"
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* AI 节点 props
|
|
1070
|
+
*/
|
|
1071
|
+
interface AINodeProps {
|
|
1072
|
+
/**
|
|
1073
|
+
* AI 节点运行状态字段
|
|
1074
|
+
*/
|
|
1075
|
+
ai_node_running: AINodeRuningState;
|
|
1076
|
+
}
|
|
1039
1077
|
/**
|
|
1040
1078
|
* liteapp 工作项实例定义
|
|
1041
1079
|
*/
|
|
@@ -2473,6 +2511,42 @@ declare abstract class BuilderComponent extends BaseModel {
|
|
|
2473
2511
|
abstract notify: (key: string, value: LiteAppSubscribedPropertyValueType) => Promise<void>;
|
|
2474
2512
|
}
|
|
2475
2513
|
|
|
2514
|
+
/**
|
|
2515
|
+
* @public
|
|
2516
|
+
* AI 节点
|
|
2517
|
+
*/
|
|
2518
|
+
declare abstract class AINode extends BaseModel {
|
|
2519
|
+
/**
|
|
2520
|
+
* @internal
|
|
2521
|
+
*/
|
|
2522
|
+
protected static [IMPL_KEY]: string;
|
|
2523
|
+
/**
|
|
2524
|
+
* 获取当前 AI 节点所在的上下文
|
|
2525
|
+
*/
|
|
2526
|
+
abstract getContext(): Promise<AINodeFeatureContext>;
|
|
2527
|
+
/**
|
|
2528
|
+
* 获取 AI 节点运行态 props
|
|
2529
|
+
*/
|
|
2530
|
+
abstract getProps(): Promise<AINodeProps>;
|
|
2531
|
+
/**
|
|
2532
|
+
* 监听 AI 节点 props 变更
|
|
2533
|
+
* @param callback 返回最新的 props
|
|
2534
|
+
* @param watchKeys 需要监听的 key,默认监听所有 key
|
|
2535
|
+
*/
|
|
2536
|
+
abstract watch(callback: (next: AINodeProps | Record<string, never>) => void, watchKeys?: (keyof AINodeProps)[]): Promise<Off>;
|
|
2537
|
+
/**
|
|
2538
|
+
* 监听工作项表单项值变化
|
|
2539
|
+
* @param options.watchKeys 需要监听的工作项字段 ID 列表
|
|
2540
|
+
* @param callback 当监听值发生变化时触发,changedValue 为变化的 kv
|
|
2541
|
+
*/
|
|
2542
|
+
abstract onWorkItemFormValueChanged(options: {
|
|
2543
|
+
watchKeys: Array<{
|
|
2544
|
+
key: string | AttributeType;
|
|
2545
|
+
type: Exclude<FieldType, FieldType.richText | FieldType.singleSignal | FieldType.multiSignal | FieldType.singleVoting | FieldType.multiVoting | FieldType.simpleVoting>;
|
|
2546
|
+
}>;
|
|
2547
|
+
}, callback: (changedValue: Record<string, unknown>) => void): Promise<Off>;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2476
2550
|
/**
|
|
2477
2551
|
* @public
|
|
2478
2552
|
* SDKClient 的配置项
|
|
@@ -2551,6 +2625,11 @@ declare class SDKClient {
|
|
|
2551
2625
|
* only web 2.0
|
|
2552
2626
|
*/
|
|
2553
2627
|
get liteAppComponent(): BuilderComponent;
|
|
2628
|
+
/**
|
|
2629
|
+
* AI 节点点位容器特有能力
|
|
2630
|
+
* only 2.0
|
|
2631
|
+
*/
|
|
2632
|
+
get aiNode(): AINode;
|
|
2554
2633
|
/**
|
|
2555
2634
|
* 应用导航
|
|
2556
2635
|
*/
|
|
@@ -2708,4 +2787,4 @@ declare class NotSupportedError extends CustomError {
|
|
|
2708
2787
|
* @packageDocumentation
|
|
2709
2788
|
*/
|
|
2710
2789
|
|
|
2711
|
-
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, LiteAppComponentDataSourceResult, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDataSource, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, LiteAppSubscribedPropertyTemplate, LiteAppSubscribedPropertyValueType, LiteAppWorkItemInstance, 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, WorkItemFieldValue, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|
|
2790
|
+
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, LiteAppComponentDataSourceResult, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDataSource, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, LiteAppSubscribedPropertyTemplate, LiteAppSubscribedPropertyValueType, LiteAppWorkItemInstance, 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, WorkItemFieldValue, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
|