Skip to content

Commit ca52949

Browse files
committed
feat: update api
1 parent 6a6d934 commit ca52949

File tree

130 files changed

+9210
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+9210
-101
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<dependency>
4747
<groupId>com.larksuite.oapi</groupId>
4848
<artifactId>oapi-sdk</artifactId>
49-
<version>2.0.27</version>
49+
<version>2.0.28</version>
5050
</dependency>
5151
```
5252
- 如无法获取oapi-sdk依赖,请在 pom.xml 的 <project> 里增加 <repositories>

larksuite-oapi/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,5 +242,5 @@
242242

243243
<url>https://github.com/larksuite/oapi-sdk-java</url>
244244

245-
<version>2.0.27</version>
245+
<version>2.0.28</version>
246246
</project>

larksuite-oapi/src/main/java/com/lark/oapi/Client.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
public class Client {
7575
private Config config;
7676
private AcsService acs; // 智能门禁
77-
private AdminService admin; // 管理后台-企业勋章
77+
private AdminService admin; // 管理后台-数据报表
7878
private ApplicationService application; // 应用信息
7979
private ApprovalService approval; // 审批
8080
private AttendanceService attendance; // 打卡
@@ -136,7 +136,7 @@ public AcsService acs() {
136136
}
137137

138138
/**
139-
* 管理后台-企业勋章
139+
* 管理后台-数据报表
140140
*
141141
* @return
142142
*/

larksuite-oapi/src/main/java/com/lark/oapi/service/application/v6/ApplicationService.java

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class ApplicationService {
3434
private final Application application; // 应用
3535
private final ApplicationAppUsage applicationAppUsage; // 应用使用情况
3636
private final ApplicationAppVersion applicationAppVersion; // 事件
37+
private final ApplicationContactsRange applicationContactsRange; // application.contacts_range
3738
private final ApplicationFeedback applicationFeedback; // 应用反馈
3839
private final ApplicationVisibility applicationVisibility; // 事件
3940
private final Bot bot; // 事件
@@ -43,6 +44,7 @@ public ApplicationService(Config config) {
4344
this.application = new Application(config);
4445
this.applicationAppUsage = new ApplicationAppUsage(config);
4546
this.applicationAppVersion = new ApplicationAppVersion(config);
47+
this.applicationContactsRange = new ApplicationContactsRange(config);
4648
this.applicationFeedback = new ApplicationFeedback(config);
4749
this.applicationVisibility = new ApplicationVisibility(config);
4850
this.bot = new Bot(config);
@@ -84,6 +86,15 @@ public ApplicationAppVersion applicationAppVersion() {
8486
return applicationAppVersion;
8587
}
8688

89+
/**
90+
* application.contacts_range
91+
*
92+
* @return
93+
*/
94+
public ApplicationContactsRange applicationContactsRange() {
95+
return applicationContactsRange;
96+
}
97+
8798
/**
8899
* 应用反馈
89100
*
@@ -873,6 +884,80 @@ public PatchApplicationAppVersionResp patch(PatchApplicationAppVersionReq req) t
873884
}
874885
}
875886

887+
public static class ApplicationContactsRange {
888+
private final Config config;
889+
890+
public ApplicationContactsRange(Config config) {
891+
this.config = config;
892+
}
893+
894+
/**
895+
* ,
896+
* <p> 官网API文档链接:<a href="https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6">https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6</a> ;
897+
* <p> 使用Demo链接: <a href="https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationContactsRangeSample.java">https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationContactsRangeSample.java</a> ;
898+
*/
899+
public PatchApplicationContactsRangeResp patch(PatchApplicationContactsRangeReq req, RequestOptions reqOptions) throws Exception {
900+
// 请求参数选项
901+
if (reqOptions == null) {
902+
reqOptions = new RequestOptions();
903+
}
904+
905+
// 发起请求
906+
RawResponse httpResponse = Transport.send(config, reqOptions, "PATCH"
907+
, "/open-apis/application/v6/applications/:app_id/contacts_range"
908+
, Sets.newHashSet(AccessTokenType.Tenant)
909+
, req);
910+
911+
// 反序列化
912+
PatchApplicationContactsRangeResp resp = UnmarshalRespUtil.unmarshalResp(httpResponse, PatchApplicationContactsRangeResp.class);
913+
if (resp == null) {
914+
log.error(String.format(
915+
"%s,callError,req=%s,respHeader=%s,respStatusCode=%s,respBody=%s,", "/open-apis/application/v6/applications/:app_id/contacts_range"
916+
, Jsons.DEFAULT.toJson(req), Jsons.DEFAULT.toJson(httpResponse.getHeaders()),
917+
httpResponse.getStatusCode(), new String(httpResponse.getBody(),
918+
StandardCharsets.UTF_8)));
919+
throw new IllegalArgumentException("The result returned by the server is illegal");
920+
}
921+
922+
resp.setRawResponse(httpResponse);
923+
resp.setRequest(req);
924+
925+
return resp;
926+
}
927+
928+
/**
929+
* ,
930+
* <p> 官网API文档链接:<a href="https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6">https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6</a> ;
931+
* <p> 使用Demo链接: <a href="https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationContactsRangeSample.java">https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationContactsRangeSample.java</a> ;
932+
*/
933+
public PatchApplicationContactsRangeResp patch(PatchApplicationContactsRangeReq req) throws Exception {
934+
// 请求参数选项
935+
RequestOptions reqOptions = new RequestOptions();
936+
937+
// 发起请求
938+
RawResponse httpResponse = Transport.send(config, reqOptions, "PATCH"
939+
, "/open-apis/application/v6/applications/:app_id/contacts_range"
940+
, Sets.newHashSet(AccessTokenType.Tenant)
941+
, req);
942+
943+
// 反序列化
944+
PatchApplicationContactsRangeResp resp = UnmarshalRespUtil.unmarshalResp(httpResponse, PatchApplicationContactsRangeResp.class);
945+
if (resp == null) {
946+
log.error(String.format(
947+
"%s,callError,req=%s,respHeader=%s,respStatusCode=%s,respBody=%s,", "/open-apis/application/v6/applications/:app_id/contacts_range"
948+
, Jsons.DEFAULT.toJson(req), Jsons.DEFAULT.toJson(httpResponse.getHeaders()),
949+
httpResponse.getStatusCode(), new String(httpResponse.getBody(),
950+
StandardCharsets.UTF_8)));
951+
throw new IllegalArgumentException("The result returned by the server is illegal");
952+
}
953+
954+
resp.setRawResponse(httpResponse);
955+
resp.setRequest(req);
956+
957+
return resp;
958+
}
959+
}
960+
876961
public static class ApplicationFeedback {
877962
private final Config config;
878963

@@ -1085,6 +1170,72 @@ public CheckWhiteBlackListApplicationVisibilityResp checkWhiteBlackList(CheckWhi
10851170

10861171
return resp;
10871172
}
1173+
1174+
/**
1175+
* ,
1176+
* <p> 官网API文档链接:<a href="https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6">https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6</a> ;
1177+
* <p> 使用Demo链接: <a href="https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationVisibilitySample.java">https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationVisibilitySample.java</a> ;
1178+
*/
1179+
public PatchApplicationVisibilityResp patch(PatchApplicationVisibilityReq req, RequestOptions reqOptions) throws Exception {
1180+
// 请求参数选项
1181+
if (reqOptions == null) {
1182+
reqOptions = new RequestOptions();
1183+
}
1184+
1185+
// 发起请求
1186+
RawResponse httpResponse = Transport.send(config, reqOptions, "PATCH"
1187+
, "/open-apis/application/v6/applications/:app_id/visibility"
1188+
, Sets.newHashSet(AccessTokenType.Tenant)
1189+
, req);
1190+
1191+
// 反序列化
1192+
PatchApplicationVisibilityResp resp = UnmarshalRespUtil.unmarshalResp(httpResponse, PatchApplicationVisibilityResp.class);
1193+
if (resp == null) {
1194+
log.error(String.format(
1195+
"%s,callError,req=%s,respHeader=%s,respStatusCode=%s,respBody=%s,", "/open-apis/application/v6/applications/:app_id/visibility"
1196+
, Jsons.DEFAULT.toJson(req), Jsons.DEFAULT.toJson(httpResponse.getHeaders()),
1197+
httpResponse.getStatusCode(), new String(httpResponse.getBody(),
1198+
StandardCharsets.UTF_8)));
1199+
throw new IllegalArgumentException("The result returned by the server is illegal");
1200+
}
1201+
1202+
resp.setRawResponse(httpResponse);
1203+
resp.setRequest(req);
1204+
1205+
return resp;
1206+
}
1207+
1208+
/**
1209+
* ,
1210+
* <p> 官网API文档链接:<a href="https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6">https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6</a> ;
1211+
* <p> 使用Demo链接: <a href="https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationVisibilitySample.java">https://github.com/larksuite/oapi-sdk-java/tree/v2_main/sample/src/main/java/com/lark/oapi/sample/apiall/applicationv6/PatchApplicationVisibilitySample.java</a> ;
1212+
*/
1213+
public PatchApplicationVisibilityResp patch(PatchApplicationVisibilityReq req) throws Exception {
1214+
// 请求参数选项
1215+
RequestOptions reqOptions = new RequestOptions();
1216+
1217+
// 发起请求
1218+
RawResponse httpResponse = Transport.send(config, reqOptions, "PATCH"
1219+
, "/open-apis/application/v6/applications/:app_id/visibility"
1220+
, Sets.newHashSet(AccessTokenType.Tenant)
1221+
, req);
1222+
1223+
// 反序列化
1224+
PatchApplicationVisibilityResp resp = UnmarshalRespUtil.unmarshalResp(httpResponse, PatchApplicationVisibilityResp.class);
1225+
if (resp == null) {
1226+
log.error(String.format(
1227+
"%s,callError,req=%s,respHeader=%s,respStatusCode=%s,respBody=%s,", "/open-apis/application/v6/applications/:app_id/visibility"
1228+
, Jsons.DEFAULT.toJson(req), Jsons.DEFAULT.toJson(httpResponse.getHeaders()),
1229+
httpResponse.getStatusCode(), new String(httpResponse.getBody(),
1230+
StandardCharsets.UTF_8)));
1231+
throw new IllegalArgumentException("The result returned by the server is illegal");
1232+
}
1233+
1234+
resp.setRawResponse(httpResponse);
1235+
resp.setRequest(req);
1236+
1237+
return resp;
1238+
}
10881239
}
10891240

10901241
public static class Bot {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Code generated by lark suite oapi sdk gen
2+
/*
3+
* MIT License
4+
*
5+
* Copyright (c) 2022 Lark Technologies Pte. Ltd.
6+
*
7+
* 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:
8+
*
9+
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
10+
*
11+
* 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.
12+
*/
13+
14+
package com.lark.oapi.service.application.v6.enums;
15+
16+
/**
17+
* 更新范围方式
18+
*/
19+
public enum PatchApplicationContactsRangeContactsRangeTypeEnum {
20+
EQUAL_TO_AVAILABILITY("equal_to_availability"), // 与应用可用范围一致
21+
SOME("some"), // 修改部分成员
22+
ALL("all"), // 全部成员范围
23+
;
24+
private String value;
25+
26+
PatchApplicationContactsRangeContactsRangeTypeEnum(String value) {
27+
this.value = value;
28+
}
29+
30+
public String getValue() {
31+
return this.value;
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Code generated by lark suite oapi sdk gen
2+
/*
3+
* MIT License
4+
*
5+
* Copyright (c) 2022 Lark Technologies Pte. Ltd.
6+
*
7+
* 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:
8+
*
9+
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
10+
*
11+
* 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.
12+
*/
13+
14+
package com.lark.oapi.service.application.v6.enums;
15+
16+
/**
17+
* 部门id 类型
18+
*/
19+
public enum PatchApplicationContactsRangeDepartmentIdTypeEnum {
20+
OPEN_DEPARTMENT_ID("open_department_id"), // 以open_department_id标识部门
21+
DEPARTMENT_ID("department_id"), // 以department_id标识部门
22+
;
23+
private String value;
24+
25+
PatchApplicationContactsRangeDepartmentIdTypeEnum(String value) {
26+
this.value = value;
27+
}
28+
29+
public String getValue() {
30+
return this.value;
31+
}
32+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Code generated by lark suite oapi sdk gen
2+
/*
3+
* MIT License
4+
*
5+
* Copyright (c) 2022 Lark Technologies Pte. Ltd.
6+
*
7+
* 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:
8+
*
9+
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
10+
*
11+
* 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.
12+
*/
13+
14+
package com.lark.oapi.service.application.v6.enums;
15+
16+
/**
17+
* 成员id类型
18+
*/
19+
public enum PatchApplicationContactsRangeUserIdTypeEnum {
20+
OPEN_ID("open_id"), // 以open_id 标识成员
21+
USER_ID("user_id"), // 以user_id 标识用户
22+
UNION_ID("union_id"), // 以union_id 标识用户
23+
;
24+
private String value;
25+
26+
PatchApplicationContactsRangeUserIdTypeEnum(String value) {
27+
this.value = value;
28+
}
29+
30+
public String getValue() {
31+
return this.value;
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Code generated by lark suite oapi sdk gen
2+
/*
3+
* MIT License
4+
*
5+
* Copyright (c) 2022 Lark Technologies Pte. Ltd.
6+
*
7+
* 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:
8+
*
9+
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
10+
*
11+
* 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.
12+
*/
13+
14+
package com.lark.oapi.service.application.v6.enums;
15+
16+
/**
17+
* 部门id 类型
18+
*/
19+
public enum PatchApplicationVisibilityDepartmentIdTypeEnum {
20+
OPEN_DEPARTMENT_ID("open_department_id"), // 以open_department_id标识部门
21+
DEPARTMENT_ID("department_id"), // 以department_id标识部门
22+
;
23+
private String value;
24+
25+
PatchApplicationVisibilityDepartmentIdTypeEnum(String value) {
26+
this.value = value;
27+
}
28+
29+
public String getValue() {
30+
return this.value;
31+
}
32+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Code generated by lark suite oapi sdk gen
2+
/*
3+
* MIT License
4+
*
5+
* Copyright (c) 2022 Lark Technologies Pte. Ltd.
6+
*
7+
* 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:
8+
*
9+
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
10+
*
11+
* 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.
12+
*/
13+
14+
package com.lark.oapi.service.application.v6.enums;
15+
16+
/**
17+
* open_id 类型
18+
*/
19+
public enum PatchApplicationVisibilityUserIdTypeEnum {
20+
OPEN_ID("open_id"), // 以open_id 标识用户
21+
USER_ID("user_id"), // 以user_id 标识用户
22+
UNION_ID("union_id"), // 以union_id 标识用户
23+
;
24+
private String value;
25+
26+
PatchApplicationVisibilityUserIdTypeEnum(String value) {
27+
this.value = value;
28+
}
29+
30+
public String getValue() {
31+
return this.value;
32+
}
33+
}

0 commit comments

Comments
 (0)