@lark-project/js-sdk 2.1.4-dev.ainode.1 → 2.1.4

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 CHANGED
@@ -496,16 +496,6 @@ _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
-
509
499
  // src/client.ts
510
500
  function getImplClass(decl, impls) {
511
501
  return impls == null ? void 0 : impls[decl[IMPL_KEY]];
@@ -599,13 +589,6 @@ var _SDKClient = class {
599
589
  get liteAppComponent() {
600
590
  return getImplValue(BuilderComponent, this._meegoBizHub);
601
591
  }
602
- /**
603
- * AI 节点点位容器特有能力
604
- * only 2.0
605
- */
606
- get aiNode() {
607
- return getImplValue(AINode, this._meegoBizHub);
608
- }
609
592
  /**
610
593
  * 应用导航
611
594
  */
@@ -739,7 +722,7 @@ var SDKClient = _SDKClient;
739
722
  /**
740
723
  * SDK 版本号
741
724
  */
742
- SDKClient.version = "2.1.4-dev.ainode.1";
725
+ SDKClient.version = "2.1.4";
743
726
 
744
727
  // src/types/biz.ts
745
728
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -839,14 +822,6 @@ var LiteAppPropTemplateType = /* @__PURE__ */ ((LiteAppPropTemplateType2) => {
839
822
  LiteAppPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
840
823
  return LiteAppPropTemplateType2;
841
824
  })(LiteAppPropTemplateType || {});
842
- var AINodeRuningState = /* @__PURE__ */ ((AINodeRuningState2) => {
843
- AINodeRuningState2["Ready"] = "ready";
844
- AINodeRuningState2["Running"] = "running";
845
- AINodeRuningState2["Pending"] = "pending";
846
- AINodeRuningState2["End"] = "end";
847
- AINodeRuningState2["Error"] = "error";
848
- return AINodeRuningState2;
849
- })(AINodeRuningState || {});
850
825
 
851
826
  // src/errors/CustomError.ts
852
827
  var CustomError = class extends Error {
@@ -948,8 +923,6 @@ var SystemPermissionDeniedError = class extends CustomError {
948
923
  // src/index.ts
949
924
  var src_default = SDKClient;
950
925
  export {
951
- AINode,
952
- AINodeRuningState,
953
926
  ActionSheet,
954
927
  AttributeType,
955
928
  BuilderComponent,
package/dist/lib/index.js CHANGED
@@ -48,8 +48,6 @@ 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,
53
51
  ActionSheet: () => ActionSheet,
54
52
  AttributeType: () => AttributeType,
55
53
  BuilderComponent: () => BuilderComponent,
@@ -571,16 +569,6 @@ _a29 = IMPL_KEY;
571
569
  */
572
570
  BuilderComponent[_a29] = "liteAppComponent";
573
571
 
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
-
584
572
  // src/client.ts
585
573
  function getImplClass(decl, impls) {
586
574
  return impls == null ? void 0 : impls[decl[IMPL_KEY]];
@@ -674,13 +662,6 @@ var _SDKClient = class {
674
662
  get liteAppComponent() {
675
663
  return getImplValue(BuilderComponent, this._meegoBizHub);
676
664
  }
677
- /**
678
- * AI 节点点位容器特有能力
679
- * only 2.0
680
- */
681
- get aiNode() {
682
- return getImplValue(AINode, this._meegoBizHub);
683
- }
684
665
  /**
685
666
  * 应用导航
686
667
  */
@@ -814,7 +795,7 @@ var SDKClient = _SDKClient;
814
795
  /**
815
796
  * SDK 版本号
816
797
  */
817
- SDKClient.version = "2.1.4-dev.ainode.1";
798
+ SDKClient.version = "2.1.4";
818
799
 
819
800
  // src/types/biz.ts
820
801
  var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
@@ -914,14 +895,6 @@ var LiteAppPropTemplateType = /* @__PURE__ */ ((LiteAppPropTemplateType2) => {
914
895
  LiteAppPropTemplateType2["workItemTypeWithField"] = "workItemTypeWithField";
915
896
  return LiteAppPropTemplateType2;
916
897
  })(LiteAppPropTemplateType || {});
917
- var AINodeRuningState = /* @__PURE__ */ ((AINodeRuningState2) => {
918
- AINodeRuningState2["Ready"] = "ready";
919
- AINodeRuningState2["Running"] = "running";
920
- AINodeRuningState2["Pending"] = "pending";
921
- AINodeRuningState2["End"] = "end";
922
- AINodeRuningState2["Error"] = "error";
923
- return AINodeRuningState2;
924
- })(AINodeRuningState || {});
925
898
 
926
899
  // src/errors/CustomError.ts
927
900
  var CustomError = class extends Error {
@@ -1024,8 +997,6 @@ var SystemPermissionDeniedError = class extends CustomError {
1024
997
  var src_default = SDKClient;
1025
998
  // Annotate the CommonJS export names for ESM import in node:
1026
999
  0 && (module.exports = {
1027
- AINode,
1028
- AINodeRuningState,
1029
1000
  ActionSheet,
1030
1001
  AttributeType,
1031
1002
  BuilderComponent,
@@ -893,13 +893,18 @@ 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
+ };
896
901
  type LiteAppPropView = {
897
902
  viewId: string;
898
903
  isMultiProject: boolean;
899
904
  };
900
905
  type LiteAppPropWorkItemListAfterFilter = LiteAppPropWorkItemInstance[];
901
906
  type LiteAppPropWorkItemListAfterSort = LiteAppPropWorkItemInstance[];
902
- type LiteAppCompPropValueType = LiteAppPropText | LiteAppPropNumber | LiteAppPropSelect | LiteAppPropBoolean | LiteAppPropMultiSelect | LiteAppPropDateWithTime | LiteAppPropDateRange | LiteAppPropWorkItemType | LiteAppPropWorkItemInstance | LiteAppPropView | LiteAppPropWorkItemListAfterFilter | LiteAppPropWorkItemListAfterSort;
907
+ type LiteAppCompPropValueType = LiteAppPropText | LiteAppPropNumber | LiteAppPropSelect | LiteAppPropBoolean | LiteAppPropMultiSelect | LiteAppPropDateWithTime | LiteAppPropDateRange | LiteAppPropWorkItemType | LiteAppPropWorkItemInstance | LiteAppPropView | LiteAppPropWorkItemListAfterFilter | LiteAppPropWorkItemListAfterSort | LiteAppPropDataSource;
903
908
  /**
904
909
  * liteapp 组件不同的属性类型对应的可读配置
905
910
  */
@@ -958,44 +963,49 @@ interface LiteAppComponentPreset {
958
963
  height: number;
959
964
  };
960
965
  }
961
- /** ----------------------- AI 节点构成类型 ----------------------- */
962
- interface AINodeFeatureContext {
966
+ type LiteAppWorkItemInstance = {
963
967
  /**
964
- * AI 节点当前所属空间标识
968
+ * 唯一标识
969
+ */
970
+ id: number;
971
+ /**
972
+ * 空间标识
965
973
  */
966
974
  spaceId: string;
967
975
  /**
968
- * AI 节点当前所属工作项类型标识
976
+ * 所属工作项标识
969
977
  */
970
978
  workObjectId: string;
971
979
  /**
972
- * AI 节点当前所属工作项实例标识
980
+ * 使用的工作项模板标识
973
981
  */
974
- workItemId: number;
982
+ templateId: number;
975
983
  /**
976
- * 当前节点标识
984
+ * 工作项实例名称
977
985
  */
978
- nodeId: string;
979
- }
980
- /**
981
- * AI 节点运行状态
982
- */
983
- declare enum AINodeRuningState {
984
- Ready = "ready",
985
- Running = "running",
986
- Pending = "pending",
987
- End = "end",
988
- Error = "error"
989
- }
990
- /**
991
- * AI 节点 props
992
- */
993
- interface AINodeProps {
986
+ name: string;
994
987
  /**
995
- * AI 节点运行状态字段
988
+ * 角色与人员列表
996
989
  */
997
- ai_node_running: AINodeRuningState;
998
- }
990
+ roleOwnersList: RoleOwners[];
991
+ /**
992
+ * 工作项实例已终止
993
+ */
994
+ isAborted: boolean;
995
+ /**
996
+ * 工作项实例已删除
997
+ */
998
+ isDeleted: boolean;
999
+ /**
1000
+ * 其他字段
1001
+ */
1002
+ fields?: Record<string, unknown>;
1003
+ };
1004
+ type LiteAppComponentDataSourceResult = {
1005
+ data: LiteAppWorkItemInstance[];
1006
+ total: number;
1007
+ hasMore: boolean;
1008
+ };
999
1009
 
1000
1010
  /**
1001
1011
  * @internal
@@ -2369,42 +2379,13 @@ declare abstract class BuilderComponent extends BaseModel {
2369
2379
  * 暂时不支持指定多组预设值/指定预设id(统一走 default),未来视诉求开放
2370
2380
  */
2371
2381
  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>;
2387
2382
  /**
2388
- * 获取 AI 节点运行态 props
2383
+ * 获取 liteapp 组件数据源属性的数据结果
2389
2384
  */
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>;
2385
+ abstract getDataSourceResult: (propKey: string, pagination: {
2386
+ pageNum: number;
2387
+ pageSize: number;
2388
+ }) => Promise<LiteAppComponentDataSourceResult>;
2408
2389
  }
2409
2390
 
2410
2391
  /**
@@ -2485,11 +2466,6 @@ declare class SDKClient {
2485
2466
  * only web 2.0
2486
2467
  */
2487
2468
  get liteAppComponent(): BuilderComponent;
2488
- /**
2489
- * AI 节点点位容器特有能力
2490
- * only 2.0
2491
- */
2492
- get aiNode(): AINode;
2493
2469
  /**
2494
2470
  * 应用导航
2495
2471
  */
@@ -2647,4 +2623,4 @@ declare class NotSupportedError extends CustomError {
2647
2623
  * @packageDocumentation
2648
2624
  */
2649
2625
 
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 };
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, LiteAppComponentDataSourceResult, LiteAppComponentFeatureContext, LiteAppComponentPreset, LiteAppComponentProps, LiteAppPropBoolean, LiteAppPropDataSource, LiteAppPropDateRange, LiteAppPropDateWithTime, LiteAppPropField, LiteAppPropLayout, LiteAppPropMultiSelect, LiteAppPropNumber, LiteAppPropSelect, LiteAppPropTemplateType, LiteAppPropText, LiteAppPropView, LiteAppPropWorkItemInstance, LiteAppPropWorkItemListAfterFilter, LiteAppPropWorkItemListAfterSort, LiteAppPropWorkItemType, 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, WorkItemFinder, WorkItemFinderOptions, WorkObject, SDKClient as default, unwatch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/js-sdk",
3
- "version": "2.1.4-dev.ainode.1",
3
+ "version": "2.1.4",
4
4
  "runtimeMinVersions": {
5
5
  "web": "2.1.0",
6
6
  "mobile": "1.1.0"