dagster-dingtalk 0.1.44__tar.gz → 0.27.4__tar.gz
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.
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/MarsCodeWorkspaceAppSettings.xml +1 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/workspace.xml +27 -6
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/PKG-INFO +5 -4
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/pyproject.toml +5 -4
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/src/dagster_dingtalk/app_client.py +213 -3
- dagster_dingtalk-0.27.4/src/dagster_dingtalk/version.py +1 -0
- dagster_dingtalk-0.1.44/src/dagster_dingtalk/version.py +0 -1
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.gitignore +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/.gitignore +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/dagster-dingtalk.iml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/deployment.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/dictionaries/admin.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/misc.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/modules.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/vcs.xml +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.python-version +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/README.md +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/desktop.ini +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/src/dagster_dingtalk/__init__.py +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/src/dagster_dingtalk/operations.py +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/src/dagster_dingtalk/py.typed +0 -0
- {dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/src/dagster_dingtalk/resources.py +0 -0
@@ -4,9 +4,10 @@
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
5
5
|
</component>
|
6
6
|
<component name="ChangeListManager">
|
7
|
-
<list default="true" id="d56e898e-6e80-4770-9a14-5869f3cdca54" name="更改" comment="
|
7
|
+
<list default="true" id="d56e898e-6e80-4770-9a14-5869f3cdca54" name="更改" comment="feat(dingtalk): 新增文件搜索和管理功能 - 添加文件搜索功能,支持按关键词、创建者、修改者等条件搜索文件 - 新增知识库搜索功能,支持按关键词搜索知识库信息 - 实现添加文件夹和重命名文件/文件夹的功能- 更新文件提交接口,增加文件名参数">
|
8
8
|
<change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
|
9
9
|
<change beforePath="$PROJECT_DIR$/src/dagster_dingtalk/app_client.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/dagster_dingtalk/app_client.py" afterDir="false" />
|
10
|
+
<change beforePath="$PROJECT_DIR$/src/dagster_dingtalk/version.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/dagster_dingtalk/version.py" afterDir="false" />
|
10
11
|
</list>
|
11
12
|
<option name="SHOW_DIALOG" value="false" />
|
12
13
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -36,6 +37,10 @@
|
|
36
37
|
"accountId": "9d3116f2-0bce-4e24-9308-0425c6ec6992"
|
37
38
|
}
|
38
39
|
}</component>
|
40
|
+
<component name="KubernetesApiPersistence"><![CDATA[{}]]></component>
|
41
|
+
<component name="KubernetesApiProvider"><![CDATA[{
|
42
|
+
"isMigrated": true
|
43
|
+
}]]></component>
|
39
44
|
<component name="ProblemsViewState">
|
40
45
|
<option name="selectedTabId" value="CurrentFile" />
|
41
46
|
</component>
|
@@ -109,8 +114,8 @@
|
|
109
114
|
<component name="SharedIndexes">
|
110
115
|
<attachedChunks>
|
111
116
|
<set>
|
112
|
-
<option value="bundled-js-predefined-d6986cc7102b-
|
113
|
-
<option value="bundled-python-sdk-
|
117
|
+
<option value="bundled-js-predefined-d6986cc7102b-09060db00ec0-JavaScript-PY-251.26927.74" />
|
118
|
+
<option value="bundled-python-sdk-657d8234b839-64d779b69b7a-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-251.26927.74" />
|
114
119
|
</set>
|
115
120
|
</attachedChunks>
|
116
121
|
</component>
|
@@ -147,7 +152,14 @@
|
|
147
152
|
<workItem from="1746881612246" duration="131000" />
|
148
153
|
<workItem from="1748502555257" duration="70000" />
|
149
154
|
<workItem from="1749879333099" duration="4165000" />
|
150
|
-
<workItem from="1749889527048" duration="
|
155
|
+
<workItem from="1749889527048" duration="3459000" />
|
156
|
+
<workItem from="1750078149869" duration="2226000" />
|
157
|
+
<workItem from="1750080478303" duration="38000" />
|
158
|
+
<workItem from="1751506773555" duration="48000" />
|
159
|
+
<workItem from="1751656808609" duration="663000" />
|
160
|
+
<workItem from="1752232080209" duration="599000" />
|
161
|
+
<workItem from="1752242526076" duration="4872000" />
|
162
|
+
<workItem from="1754133202584" duration="974000" />
|
151
163
|
</task>
|
152
164
|
<task id="LOCAL-00001" summary="更改目录结构以便于使用 uv 构建和发布包">
|
153
165
|
<option name="closed" value="true" />
|
@@ -293,7 +305,15 @@
|
|
293
305
|
<option name="project" value="LOCAL" />
|
294
306
|
<updated>1749883507831</updated>
|
295
307
|
</task>
|
296
|
-
<
|
308
|
+
<task id="LOCAL-00019" summary="feat(dingtalk): 新增文件搜索和管理功能 - 添加文件搜索功能,支持按关键词、创建者、修改者等条件搜索文件 - 新增知识库搜索功能,支持按关键词搜索知识库信息 - 实现添加文件夹和重命名文件/文件夹的功能- 更新文件提交接口,增加文件名参数">
|
309
|
+
<option name="closed" value="true" />
|
310
|
+
<created>1750080353218</created>
|
311
|
+
<option name="number" value="00019" />
|
312
|
+
<option name="presentableId" value="LOCAL-00019" />
|
313
|
+
<option name="project" value="LOCAL" />
|
314
|
+
<updated>1750080353218</updated>
|
315
|
+
</task>
|
316
|
+
<option name="localTasksCounter" value="20" />
|
297
317
|
<servers />
|
298
318
|
</component>
|
299
319
|
<component name="TypeScriptGeneratedFilesManager">
|
@@ -329,7 +349,8 @@
|
|
329
349
|
<MESSAGE value="chore: 更新 .idea/.gitignore 文件 - 添加 MarsCodeWorkspaceAppSettings.xml 到忽略列表 - 添加 desktop.ini 到忽略列表" />
|
330
350
|
<MESSAGE value="feat(storage): 优化文件上传接口并添加新功能 - 新增群文件相关接口,包括获取群存储空间信息、发送文件给指定用户等 - 优化文件上传接口,支持自定义文件冲突策略 - 修复文件传输类中的文件提交方法,支持文件内容直接上传" />
|
331
351
|
<MESSAGE value="build(dagster-dingtalk): 更新版本号 - 将 pyproject.toml 中的版本号从 0.1.41 修改为 0.1.42 - 将 version.py 中的版本号从 0.26.17 修改为 0.26.20" />
|
332
|
-
<
|
352
|
+
<MESSAGE value="feat(dingtalk): 新增文件搜索和管理功能 - 添加文件搜索功能,支持按关键词、创建者、修改者等条件搜索文件 - 新增知识库搜索功能,支持按关键词搜索知识库信息 - 实现添加文件夹和重命名文件/文件夹的功能- 更新文件提交接口,增加文件名参数" />
|
353
|
+
<option name="LAST_COMMIT_MESSAGE" value="feat(dingtalk): 新增文件搜索和管理功能 - 添加文件搜索功能,支持按关键词、创建者、修改者等条件搜索文件 - 新增知识库搜索功能,支持按关键词搜索知识库信息 - 实现添加文件夹和重命名文件/文件夹的功能- 更新文件提交接口,增加文件名参数" />
|
333
354
|
</component>
|
334
355
|
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
335
356
|
<SUITE FILE_PATH="coverage/dagster_dingtalk$test.coverage" NAME="test 覆盖结果" MODIFIED="1739565257857" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
@@ -1,12 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dagster-dingtalk
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.27.4
|
4
4
|
Summary: A dagster plugin for the DingTalk
|
5
5
|
Author-email: YiZixuan <sqkkyzx@qq.com>
|
6
|
-
Requires-Python: >=3.
|
7
|
-
Requires-Dist: dagster
|
6
|
+
Requires-Python: >=3.12
|
7
|
+
Requires-Dist: dagster>=1.11.4
|
8
|
+
Requires-Dist: hatchling>=1.27.0
|
8
9
|
Requires-Dist: httpx
|
9
|
-
Requires-Dist: pydantic
|
10
|
+
Requires-Dist: pydantic>=2.11.7
|
10
11
|
Description-Content-Type: text/markdown
|
11
12
|
|
12
13
|
# 钉钉与 Dagster 集成
|
@@ -1,16 +1,17 @@
|
|
1
1
|
[project]
|
2
2
|
name = "dagster-dingtalk"
|
3
|
-
version = "0.
|
3
|
+
version = "0.27.4"
|
4
4
|
description = "A dagster plugin for the DingTalk"
|
5
5
|
readme = "README.md"
|
6
6
|
authors = [
|
7
7
|
{ name = "YiZixuan", email = "sqkkyzx@qq.com" }
|
8
8
|
]
|
9
|
-
requires-python = ">=3.
|
9
|
+
requires-python = ">=3.12"
|
10
10
|
dependencies = [
|
11
11
|
"httpx",
|
12
|
-
"pydantic",
|
13
|
-
"dagster
|
12
|
+
"pydantic>=2.11.7",
|
13
|
+
"dagster>=1.11.4",
|
14
|
+
"hatchling>=1.27.0",
|
14
15
|
]
|
15
16
|
|
16
17
|
[build-system]
|
@@ -5,7 +5,7 @@ import time
|
|
5
5
|
from datetime import datetime
|
6
6
|
from enum import Enum
|
7
7
|
from pathlib import Path
|
8
|
-
from typing import List, Literal
|
8
|
+
from typing import List, Literal, Tuple
|
9
9
|
|
10
10
|
import httpx
|
11
11
|
from httpx import Client
|
@@ -533,6 +533,7 @@ class 文档文件__:
|
|
533
533
|
self.__client:DingTalkClient = _client
|
534
534
|
self.群文件 = 文档文件__群文件(_client)
|
535
535
|
self.媒体文件 = 文档文件__媒体文件(_client)
|
536
|
+
self.搜索 = 文档文件__搜索(_client)
|
536
537
|
self.存储管理 = 文档文件__存储管理(_client)
|
537
538
|
self.文件传输 = 文档文件__存储管理__文件传输(_client)
|
538
539
|
|
@@ -727,11 +728,120 @@ class 文档文件__媒体文件:
|
|
727
728
|
return response.json()
|
728
729
|
|
729
730
|
|
731
|
+
# noinspection NonAsciiCharacters, PyPep8Naming
|
732
|
+
class 文档文件__搜索:
|
733
|
+
def __init__(self, _client:DingTalkClient):
|
734
|
+
self.__client:DingTalkClient = _client
|
735
|
+
|
736
|
+
def 搜索文件(
|
737
|
+
self, operatorId:str, keyword:str, nextToken:str=None, maxResults:int=50,
|
738
|
+
dentryCategories:List[str]=None, creatorIds:List[str]=None, modifierIds:List[str]=None,
|
739
|
+
createTimeRange:Tuple[datetime, datetime]=None, visitTimeRange:Tuple[datetime, datetime]=None
|
740
|
+
) -> dict:
|
741
|
+
"""
|
742
|
+
接口版本:2023-06-06
|
743
|
+
|
744
|
+
调用本接口,根据操作者unionId和关键词信息,获取文件信息。
|
745
|
+
|
746
|
+
https://open.dingtalk.com/document/orgapp/search-for-files
|
747
|
+
|
748
|
+
:param nextToken:
|
749
|
+
:param operatorId: 操作人unionId。
|
750
|
+
:param keyword: 搜索关键词。
|
751
|
+
:param nextToken: 分页游标。首次拉取不用传。
|
752
|
+
:param maxResults: 分页大小,默认值50。最大值50。
|
753
|
+
:param dentryCategories: 限定文件类别。
|
754
|
+
:param creatorIds: 限定创建者。
|
755
|
+
:param modifierIds: 限定修改者。
|
756
|
+
:param createTimeRange: 限定创建时间范围。
|
757
|
+
:param visitTimeRange: 限定访问时间范围。
|
758
|
+
|
759
|
+
:return:
|
760
|
+
{
|
761
|
+
"items" : [ {
|
762
|
+
"dentryUuid" : "*****",
|
763
|
+
"name" : "name",
|
764
|
+
"creator" : {
|
765
|
+
"userId" : "01472825524039877041",
|
766
|
+
"name" : "user_name"
|
767
|
+
},
|
768
|
+
"modifier" : {
|
769
|
+
"userId" : "01472825524039877041",
|
770
|
+
"name" : "user_name"
|
771
|
+
}
|
772
|
+
} ],
|
773
|
+
"nextToken" : "next_token"
|
774
|
+
}
|
775
|
+
"""
|
776
|
+
option = {}
|
777
|
+
if nextToken:
|
778
|
+
option["nextToken"] = nextToken
|
779
|
+
if maxResults:
|
780
|
+
option["maxResults"] = maxResults
|
781
|
+
if dentryCategories:
|
782
|
+
option["dentryCategories"] = dentryCategories
|
783
|
+
if creatorIds:
|
784
|
+
option["creatorIds"] = creatorIds
|
785
|
+
if modifierIds:
|
786
|
+
option["modifierIds"] = modifierIds
|
787
|
+
if createTimeRange:
|
788
|
+
option["createTimeRange"] = {"createTimeRange": {"startTime": createTimeRange[0].timestamp(), "endTime": createTimeRange[1].timestamp()}}
|
789
|
+
if visitTimeRange:
|
790
|
+
option["visitTimeRange"] = {"visitTimeRange": {"startTime": visitTimeRange[0].timestamp(), "endTime": visitTimeRange[1].timestamp()}}
|
791
|
+
|
792
|
+
response = self.__client.api(
|
793
|
+
method="POST",
|
794
|
+
path=f"/v2.0/storage/dentries/search",
|
795
|
+
params={"operatorId": operatorId},
|
796
|
+
json={"keyword": keyword, "option": option}
|
797
|
+
)
|
798
|
+
return response.json()
|
799
|
+
|
800
|
+
def 搜索知识库(self, operatorId:str, keyword:str, nextToken:str=None, maxResults:int=50):
|
801
|
+
"""
|
802
|
+
接口版本:2023-06-06
|
803
|
+
|
804
|
+
调用本接口,根据操作人unionId和关键词信息,搜索知识库信息。
|
805
|
+
|
806
|
+
https://open.dingtalk.com/document/orgapp/search-knowledge-base
|
807
|
+
|
808
|
+
:param nextToken:
|
809
|
+
:param operatorId: 操作人unionId。
|
810
|
+
:param keyword: 搜索关键词。
|
811
|
+
:param nextToken: 分页游标。首次拉取不用传。
|
812
|
+
:param maxResults: 分页大小,默认值50。最大值50。
|
813
|
+
|
814
|
+
:return:
|
815
|
+
{
|
816
|
+
"items" : [ {
|
817
|
+
"workspaceId" : "By8jQS1ZYjGn5b0M",
|
818
|
+
"name" : "workspace_name",
|
819
|
+
"url" : "workspace_url"
|
820
|
+
} ],
|
821
|
+
"nextToken" : "next_token"
|
822
|
+
}
|
823
|
+
"""
|
824
|
+
option = {}
|
825
|
+
if nextToken:
|
826
|
+
option["nextToken"] = nextToken
|
827
|
+
if maxResults:
|
828
|
+
option["maxResults"] = maxResults
|
829
|
+
|
830
|
+
response = self.__client.api(
|
831
|
+
method="POST",
|
832
|
+
path=f"/v2.0/storage/workspaces/search",
|
833
|
+
params={"operatorId": operatorId},
|
834
|
+
json={"keyword": keyword, "option": option}
|
835
|
+
)
|
836
|
+
return response.json()
|
837
|
+
|
838
|
+
|
730
839
|
# noinspection NonAsciiCharacters, PyPep8Naming
|
731
840
|
class 文档文件__存储管理:
|
732
841
|
def __init__(self, _client:DingTalkClient):
|
733
842
|
self.__client:DingTalkClient = _client
|
734
843
|
self.文件传输 = 文档文件__存储管理__文件传输(self.__client)
|
844
|
+
self.文件管理 = 文档文件__存储管理__文件管理(self.__client)
|
735
845
|
|
736
846
|
|
737
847
|
# noinspection NonAsciiCharacters, PyPep8Naming
|
@@ -821,6 +931,67 @@ class 文档文件__存储管理__文件传输:
|
|
821
931
|
return response.json()
|
822
932
|
|
823
933
|
|
934
|
+
# noinspection NonAsciiCharacters, PyPep8Naming
|
935
|
+
class 文档文件__存储管理__文件管理:
|
936
|
+
def __init__(self, _client:DingTalkClient):
|
937
|
+
self.__client:DingTalkClient = _client
|
938
|
+
|
939
|
+
def 添加文件夹(
|
940
|
+
self, spaceId:str, parentId:str, union_id:str, name:str,
|
941
|
+
conflictStrategy:Literal['AUTO_RENAME', 'OVERWRITE', 'RETURN_DENTRY_IF_EXISTS', 'RETURN_ERROR_IF_EXISTS'] = 'OVERWRITE'
|
942
|
+
) -> dict:
|
943
|
+
"""
|
944
|
+
接口版本:2023-06-06
|
945
|
+
|
946
|
+
调用本接口,在存储空间内添加文件夹。
|
947
|
+
|
948
|
+
https://open.dingtalk.com/document/orgapp/add-folder
|
949
|
+
|
950
|
+
:param spaceId: 空间Id。
|
951
|
+
:param parentId: 父目录Id。根目录时,该参数是0。
|
952
|
+
:param union_id: 操作者unionId。
|
953
|
+
:param name: 文件夹的名称。
|
954
|
+
:param conflictStrategy: 文件名称冲突策略。AUTO_RENAME:自动重命名,默认值 OVERWRITE:覆盖 RETURN_DENTRY_IF_EXISTS:返回已存在文件 RETURN_ERROR_IF_EXISTS:文件已存在时报错
|
955
|
+
|
956
|
+
:return:
|
957
|
+
"""
|
958
|
+
response = self.__client.api(
|
959
|
+
method="POST",
|
960
|
+
path=f"/v1.0/storage/spaces/{spaceId}/dentries/{parentId}/folders",
|
961
|
+
params={'unionId': union_id},
|
962
|
+
json={
|
963
|
+
"name": name,
|
964
|
+
"option": {
|
965
|
+
"conflictStrategy": conflictStrategy
|
966
|
+
}
|
967
|
+
}
|
968
|
+
)
|
969
|
+
return response.json()
|
970
|
+
|
971
|
+
def 重命名文件或文件夹(self, spaceId:str, dentryId:str, union_id:str, new_name:str) -> dict:
|
972
|
+
"""
|
973
|
+
接口版本:2023-06-06
|
974
|
+
|
975
|
+
调用本接口,在存储空间内添加文件夹。
|
976
|
+
|
977
|
+
https://open.dingtalk.com/document/orgapp/add-folder
|
978
|
+
|
979
|
+
:param spaceId: 空间Id。
|
980
|
+
:param dentryId: 文件或文件夹Id。
|
981
|
+
:param union_id: 操作者unionId。
|
982
|
+
:param new_name: 文件或文件夹的新名称。
|
983
|
+
|
984
|
+
:return:
|
985
|
+
"""
|
986
|
+
response = self.__client.api(
|
987
|
+
method="POST",
|
988
|
+
path=f"/v1.0/storage/spaces/{spaceId}/dentries/{dentryId}/rename",
|
989
|
+
params={'unionId': union_id},
|
990
|
+
json={"newName": new_name}
|
991
|
+
)
|
992
|
+
return response.json()
|
993
|
+
|
994
|
+
|
824
995
|
# noinspection NonAsciiCharacters, PyPep8Naming
|
825
996
|
class 互动卡片__:
|
826
997
|
def __init__(self, _client:DingTalkClient):
|
@@ -850,7 +1021,7 @@ class 互动卡片__:
|
|
850
1021
|
|
851
1022
|
open_space_id = f"dtv1.card//{';'.join(open_space_ids)}"
|
852
1023
|
|
853
|
-
payload = {
|
1024
|
+
payload:dict = {
|
854
1025
|
"cardTemplateId": card_template_id,
|
855
1026
|
"outTrackId": out_track_id,
|
856
1027
|
"openSpaceId": open_space_id,
|
@@ -918,6 +1089,7 @@ class OA审批__:
|
|
918
1089
|
self.__client:DingTalkClient = _client
|
919
1090
|
self.审批实例 = OA审批_审批实例__(_client)
|
920
1091
|
self.审批钉盘 = OA审批_审批钉盘__(_client)
|
1092
|
+
self.审批任务 = OA审批_审批任务__(_client)
|
921
1093
|
|
922
1094
|
|
923
1095
|
# noinspection NonAsciiCharacters, PyPep8Naming
|
@@ -1004,7 +1176,7 @@ class OA审批_审批实例__:
|
|
1004
1176
|
}
|
1005
1177
|
"""
|
1006
1178
|
|
1007
|
-
data = {
|
1179
|
+
data: dict = {
|
1008
1180
|
'processInstanceId': instance_id,
|
1009
1181
|
'text': text,
|
1010
1182
|
'commentUserId': comment_user_id,
|
@@ -1089,6 +1261,44 @@ class OA审批_审批钉盘__:
|
|
1089
1261
|
return response.json()
|
1090
1262
|
|
1091
1263
|
|
1264
|
+
# noinspection NonAsciiCharacters, PyPep8Naming
|
1265
|
+
class OA审批_审批任务__:
|
1266
|
+
def __init__(self, _client:DingTalkClient):
|
1267
|
+
self.__client:DingTalkClient = _client
|
1268
|
+
|
1269
|
+
def 同意或拒绝审批任务(self, process_instance_id:str, result:bool, actioner_user_id:str, task_id:str|int, remark:str="") -> dict:
|
1270
|
+
"""
|
1271
|
+
调用本接口,根据指定模板ID、审批实例ID、任务节点ID和操作人userId,对单个审批任务进行处理。
|
1272
|
+
|
1273
|
+
https://open.dingtalk.com/document/orgapp/approve-or-reject-the-approval-task
|
1274
|
+
|
1275
|
+
:param process_instance_id: 审批实例 ID。
|
1276
|
+
:param result: 审批操作, 同意或拒绝。
|
1277
|
+
:param remark: 审批意见,可为空。
|
1278
|
+
:param actioner_user_id: 操作人 userId。
|
1279
|
+
:param task_id: 任务 ID。
|
1280
|
+
|
1281
|
+
:return:
|
1282
|
+
{
|
1283
|
+
"success": bool,
|
1284
|
+
"result": {
|
1285
|
+
"spaceId": int
|
1286
|
+
}
|
1287
|
+
}
|
1288
|
+
"""
|
1289
|
+
response = self.__client.api(
|
1290
|
+
method="POST",
|
1291
|
+
path="/v1.0/workflow/processInstances/execute",
|
1292
|
+
json={
|
1293
|
+
"processInstanceId" : process_instance_id,
|
1294
|
+
"remark" : remark,
|
1295
|
+
"result" : "agree" if result else "refuse",
|
1296
|
+
"actionerUserId" : actioner_user_id,
|
1297
|
+
"taskId" : int(task_id)
|
1298
|
+
})
|
1299
|
+
return response.json()
|
1300
|
+
|
1301
|
+
|
1092
1302
|
# noinspection NonAsciiCharacters, PyPep8Naming
|
1093
1303
|
class 即时通信__:
|
1094
1304
|
def __init__(self, _client:DingTalkClient):
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.27.4"
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.26.20"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/inspectionProfiles/Project_Default.xml
RENAMED
File without changes
|
{dagster_dingtalk-0.1.44 → dagster_dingtalk-0.27.4}/.idea/inspectionProfiles/profiles_settings.xml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|