@alicloud/aliding20230426 2.18.0 → 2.19.0
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/client.d.ts +282 -0
- package/dist/client.js +294 -26
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +455 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -20490,6 +20490,312 @@ export class GetTemplateListByUserIdResponse extends $tea.Model {
|
|
|
20490
20490
|
}
|
|
20491
20491
|
}
|
|
20492
20492
|
|
|
20493
|
+
export class GetTodoTaskHeaders extends $tea.Model {
|
|
20494
|
+
commonHeaders?: { [key: string]: string };
|
|
20495
|
+
accountContext?: GetTodoTaskHeadersAccountContext;
|
|
20496
|
+
static names(): { [key: string]: string } {
|
|
20497
|
+
return {
|
|
20498
|
+
commonHeaders: 'commonHeaders',
|
|
20499
|
+
accountContext: 'AccountContext',
|
|
20500
|
+
};
|
|
20501
|
+
}
|
|
20502
|
+
|
|
20503
|
+
static types(): { [key: string]: any } {
|
|
20504
|
+
return {
|
|
20505
|
+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
20506
|
+
accountContext: GetTodoTaskHeadersAccountContext,
|
|
20507
|
+
};
|
|
20508
|
+
}
|
|
20509
|
+
|
|
20510
|
+
constructor(map?: { [key: string]: any }) {
|
|
20511
|
+
super(map);
|
|
20512
|
+
}
|
|
20513
|
+
}
|
|
20514
|
+
|
|
20515
|
+
export class GetTodoTaskShrinkHeaders extends $tea.Model {
|
|
20516
|
+
commonHeaders?: { [key: string]: string };
|
|
20517
|
+
accountContextShrink?: string;
|
|
20518
|
+
static names(): { [key: string]: string } {
|
|
20519
|
+
return {
|
|
20520
|
+
commonHeaders: 'commonHeaders',
|
|
20521
|
+
accountContextShrink: 'AccountContext',
|
|
20522
|
+
};
|
|
20523
|
+
}
|
|
20524
|
+
|
|
20525
|
+
static types(): { [key: string]: any } {
|
|
20526
|
+
return {
|
|
20527
|
+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
20528
|
+
accountContextShrink: 'string',
|
|
20529
|
+
};
|
|
20530
|
+
}
|
|
20531
|
+
|
|
20532
|
+
constructor(map?: { [key: string]: any }) {
|
|
20533
|
+
super(map);
|
|
20534
|
+
}
|
|
20535
|
+
}
|
|
20536
|
+
|
|
20537
|
+
export class GetTodoTaskRequest extends $tea.Model {
|
|
20538
|
+
/**
|
|
20539
|
+
* @remarks
|
|
20540
|
+
* This parameter is required.
|
|
20541
|
+
*
|
|
20542
|
+
* @example
|
|
20543
|
+
* OPJpwtxxxx
|
|
20544
|
+
*/
|
|
20545
|
+
taskId?: string;
|
|
20546
|
+
tenantContext?: GetTodoTaskRequestTenantContext;
|
|
20547
|
+
static names(): { [key: string]: string } {
|
|
20548
|
+
return {
|
|
20549
|
+
taskId: 'TaskId',
|
|
20550
|
+
tenantContext: 'TenantContext',
|
|
20551
|
+
};
|
|
20552
|
+
}
|
|
20553
|
+
|
|
20554
|
+
static types(): { [key: string]: any } {
|
|
20555
|
+
return {
|
|
20556
|
+
taskId: 'string',
|
|
20557
|
+
tenantContext: GetTodoTaskRequestTenantContext,
|
|
20558
|
+
};
|
|
20559
|
+
}
|
|
20560
|
+
|
|
20561
|
+
constructor(map?: { [key: string]: any }) {
|
|
20562
|
+
super(map);
|
|
20563
|
+
}
|
|
20564
|
+
}
|
|
20565
|
+
|
|
20566
|
+
export class GetTodoTaskShrinkRequest extends $tea.Model {
|
|
20567
|
+
/**
|
|
20568
|
+
* @remarks
|
|
20569
|
+
* This parameter is required.
|
|
20570
|
+
*
|
|
20571
|
+
* @example
|
|
20572
|
+
* OPJpwtxxxx
|
|
20573
|
+
*/
|
|
20574
|
+
taskId?: string;
|
|
20575
|
+
tenantContextShrink?: string;
|
|
20576
|
+
static names(): { [key: string]: string } {
|
|
20577
|
+
return {
|
|
20578
|
+
taskId: 'TaskId',
|
|
20579
|
+
tenantContextShrink: 'TenantContext',
|
|
20580
|
+
};
|
|
20581
|
+
}
|
|
20582
|
+
|
|
20583
|
+
static types(): { [key: string]: any } {
|
|
20584
|
+
return {
|
|
20585
|
+
taskId: 'string',
|
|
20586
|
+
tenantContextShrink: 'string',
|
|
20587
|
+
};
|
|
20588
|
+
}
|
|
20589
|
+
|
|
20590
|
+
constructor(map?: { [key: string]: any }) {
|
|
20591
|
+
super(map);
|
|
20592
|
+
}
|
|
20593
|
+
}
|
|
20594
|
+
|
|
20595
|
+
export class GetTodoTaskResponseBody extends $tea.Model {
|
|
20596
|
+
/**
|
|
20597
|
+
* @example
|
|
20598
|
+
* isv_dingtalkTodo
|
|
20599
|
+
*/
|
|
20600
|
+
bizTag?: string;
|
|
20601
|
+
/**
|
|
20602
|
+
* @example
|
|
20603
|
+
* 此参数禁止发布
|
|
20604
|
+
*/
|
|
20605
|
+
cardTypeId?: string;
|
|
20606
|
+
/**
|
|
20607
|
+
* @example
|
|
20608
|
+
* 1617675000000
|
|
20609
|
+
*/
|
|
20610
|
+
createdTime?: number;
|
|
20611
|
+
/**
|
|
20612
|
+
* @example
|
|
20613
|
+
* 012345
|
|
20614
|
+
*/
|
|
20615
|
+
creatorId?: string;
|
|
20616
|
+
/**
|
|
20617
|
+
* @example
|
|
20618
|
+
* 应用可以调用该接口获取钉钉待办任务详情信息及状态。
|
|
20619
|
+
*/
|
|
20620
|
+
description?: string;
|
|
20621
|
+
detailUrl?: GetTodoTaskResponseBodyDetailUrl;
|
|
20622
|
+
/**
|
|
20623
|
+
* @example
|
|
20624
|
+
* true
|
|
20625
|
+
*/
|
|
20626
|
+
done?: boolean;
|
|
20627
|
+
/**
|
|
20628
|
+
* @example
|
|
20629
|
+
* 1617675000000
|
|
20630
|
+
*/
|
|
20631
|
+
dueTime?: number;
|
|
20632
|
+
executorIds?: string[];
|
|
20633
|
+
/**
|
|
20634
|
+
* @example
|
|
20635
|
+
* 1617675000000
|
|
20636
|
+
*/
|
|
20637
|
+
finishTime?: number;
|
|
20638
|
+
/**
|
|
20639
|
+
* @example
|
|
20640
|
+
* OPJpwtxxxx
|
|
20641
|
+
*/
|
|
20642
|
+
id?: string;
|
|
20643
|
+
/**
|
|
20644
|
+
* @example
|
|
20645
|
+
* true
|
|
20646
|
+
*/
|
|
20647
|
+
isOnlyShowExecutor?: boolean;
|
|
20648
|
+
/**
|
|
20649
|
+
* @example
|
|
20650
|
+
* 1617675000000
|
|
20651
|
+
*/
|
|
20652
|
+
modifiedTime?: number;
|
|
20653
|
+
/**
|
|
20654
|
+
* @example
|
|
20655
|
+
* 012345
|
|
20656
|
+
*/
|
|
20657
|
+
modifierId?: string;
|
|
20658
|
+
participantIds?: string[];
|
|
20659
|
+
/**
|
|
20660
|
+
* @example
|
|
20661
|
+
* 20
|
|
20662
|
+
*/
|
|
20663
|
+
priority?: number;
|
|
20664
|
+
/**
|
|
20665
|
+
* @example
|
|
20666
|
+
* PUoiinWIxxx
|
|
20667
|
+
*/
|
|
20668
|
+
requestId?: string;
|
|
20669
|
+
/**
|
|
20670
|
+
* @example
|
|
20671
|
+
* isv_dingtalkTodo
|
|
20672
|
+
*/
|
|
20673
|
+
source?: string;
|
|
20674
|
+
/**
|
|
20675
|
+
* @example
|
|
20676
|
+
* isv_dingxxx
|
|
20677
|
+
*/
|
|
20678
|
+
sourceId?: string;
|
|
20679
|
+
/**
|
|
20680
|
+
* @example
|
|
20681
|
+
* 1617675000000
|
|
20682
|
+
*/
|
|
20683
|
+
startTime?: number;
|
|
20684
|
+
/**
|
|
20685
|
+
* @example
|
|
20686
|
+
* 接入钉钉待办
|
|
20687
|
+
*/
|
|
20688
|
+
subject?: string;
|
|
20689
|
+
/**
|
|
20690
|
+
* @example
|
|
20691
|
+
* orgId1
|
|
20692
|
+
*/
|
|
20693
|
+
tenantId?: string;
|
|
20694
|
+
/**
|
|
20695
|
+
* @example
|
|
20696
|
+
* org
|
|
20697
|
+
*/
|
|
20698
|
+
tenantType?: string;
|
|
20699
|
+
/**
|
|
20700
|
+
* @example
|
|
20701
|
+
* 0FAAEC9C-C6C8-5C87-AF8E-1195889BBXXX
|
|
20702
|
+
*/
|
|
20703
|
+
vendorRequestId?: string;
|
|
20704
|
+
/**
|
|
20705
|
+
* @example
|
|
20706
|
+
* dingtalk
|
|
20707
|
+
*/
|
|
20708
|
+
vendorType?: string;
|
|
20709
|
+
static names(): { [key: string]: string } {
|
|
20710
|
+
return {
|
|
20711
|
+
bizTag: 'bizTag',
|
|
20712
|
+
cardTypeId: 'cardTypeId',
|
|
20713
|
+
createdTime: 'createdTime',
|
|
20714
|
+
creatorId: 'creatorId',
|
|
20715
|
+
description: 'description',
|
|
20716
|
+
detailUrl: 'detailUrl',
|
|
20717
|
+
done: 'done',
|
|
20718
|
+
dueTime: 'dueTime',
|
|
20719
|
+
executorIds: 'executorIds',
|
|
20720
|
+
finishTime: 'finishTime',
|
|
20721
|
+
id: 'id',
|
|
20722
|
+
isOnlyShowExecutor: 'isOnlyShowExecutor',
|
|
20723
|
+
modifiedTime: 'modifiedTime',
|
|
20724
|
+
modifierId: 'modifierId',
|
|
20725
|
+
participantIds: 'participantIds',
|
|
20726
|
+
priority: 'priority',
|
|
20727
|
+
requestId: 'requestId',
|
|
20728
|
+
source: 'source',
|
|
20729
|
+
sourceId: 'sourceId',
|
|
20730
|
+
startTime: 'startTime',
|
|
20731
|
+
subject: 'subject',
|
|
20732
|
+
tenantId: 'tenantId',
|
|
20733
|
+
tenantType: 'tenantType',
|
|
20734
|
+
vendorRequestId: 'vendorRequestId',
|
|
20735
|
+
vendorType: 'vendorType',
|
|
20736
|
+
};
|
|
20737
|
+
}
|
|
20738
|
+
|
|
20739
|
+
static types(): { [key: string]: any } {
|
|
20740
|
+
return {
|
|
20741
|
+
bizTag: 'string',
|
|
20742
|
+
cardTypeId: 'string',
|
|
20743
|
+
createdTime: 'number',
|
|
20744
|
+
creatorId: 'string',
|
|
20745
|
+
description: 'string',
|
|
20746
|
+
detailUrl: GetTodoTaskResponseBodyDetailUrl,
|
|
20747
|
+
done: 'boolean',
|
|
20748
|
+
dueTime: 'number',
|
|
20749
|
+
executorIds: { 'type': 'array', 'itemType': 'string' },
|
|
20750
|
+
finishTime: 'number',
|
|
20751
|
+
id: 'string',
|
|
20752
|
+
isOnlyShowExecutor: 'boolean',
|
|
20753
|
+
modifiedTime: 'number',
|
|
20754
|
+
modifierId: 'string',
|
|
20755
|
+
participantIds: { 'type': 'array', 'itemType': 'string' },
|
|
20756
|
+
priority: 'number',
|
|
20757
|
+
requestId: 'string',
|
|
20758
|
+
source: 'string',
|
|
20759
|
+
sourceId: 'string',
|
|
20760
|
+
startTime: 'number',
|
|
20761
|
+
subject: 'string',
|
|
20762
|
+
tenantId: 'string',
|
|
20763
|
+
tenantType: 'string',
|
|
20764
|
+
vendorRequestId: 'string',
|
|
20765
|
+
vendorType: 'string',
|
|
20766
|
+
};
|
|
20767
|
+
}
|
|
20768
|
+
|
|
20769
|
+
constructor(map?: { [key: string]: any }) {
|
|
20770
|
+
super(map);
|
|
20771
|
+
}
|
|
20772
|
+
}
|
|
20773
|
+
|
|
20774
|
+
export class GetTodoTaskResponse extends $tea.Model {
|
|
20775
|
+
headers?: { [key: string]: string };
|
|
20776
|
+
statusCode?: number;
|
|
20777
|
+
body?: GetTodoTaskResponseBody;
|
|
20778
|
+
static names(): { [key: string]: string } {
|
|
20779
|
+
return {
|
|
20780
|
+
headers: 'headers',
|
|
20781
|
+
statusCode: 'statusCode',
|
|
20782
|
+
body: 'body',
|
|
20783
|
+
};
|
|
20784
|
+
}
|
|
20785
|
+
|
|
20786
|
+
static types(): { [key: string]: any } {
|
|
20787
|
+
return {
|
|
20788
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
20789
|
+
statusCode: 'number',
|
|
20790
|
+
body: GetTodoTaskResponseBody,
|
|
20791
|
+
};
|
|
20792
|
+
}
|
|
20793
|
+
|
|
20794
|
+
constructor(map?: { [key: string]: any }) {
|
|
20795
|
+
super(map);
|
|
20796
|
+
}
|
|
20797
|
+
}
|
|
20798
|
+
|
|
20493
20799
|
export class GetUserHeaders extends $tea.Model {
|
|
20494
20800
|
commonHeaders?: { [key: string]: string };
|
|
20495
20801
|
accountContext?: GetUserHeadersAccountContext;
|
|
@@ -51569,6 +51875,85 @@ export class GetTemplateListByUserIdResponseBodyTemplateList extends $tea.Model
|
|
|
51569
51875
|
}
|
|
51570
51876
|
}
|
|
51571
51877
|
|
|
51878
|
+
export class GetTodoTaskHeadersAccountContext extends $tea.Model {
|
|
51879
|
+
/**
|
|
51880
|
+
* @remarks
|
|
51881
|
+
* This parameter is required.
|
|
51882
|
+
*
|
|
51883
|
+
* @example
|
|
51884
|
+
* 012345
|
|
51885
|
+
*/
|
|
51886
|
+
accountId?: string;
|
|
51887
|
+
static names(): { [key: string]: string } {
|
|
51888
|
+
return {
|
|
51889
|
+
accountId: 'accountId',
|
|
51890
|
+
};
|
|
51891
|
+
}
|
|
51892
|
+
|
|
51893
|
+
static types(): { [key: string]: any } {
|
|
51894
|
+
return {
|
|
51895
|
+
accountId: 'string',
|
|
51896
|
+
};
|
|
51897
|
+
}
|
|
51898
|
+
|
|
51899
|
+
constructor(map?: { [key: string]: any }) {
|
|
51900
|
+
super(map);
|
|
51901
|
+
}
|
|
51902
|
+
}
|
|
51903
|
+
|
|
51904
|
+
export class GetTodoTaskRequestTenantContext extends $tea.Model {
|
|
51905
|
+
/**
|
|
51906
|
+
* @example
|
|
51907
|
+
* xxxxxx
|
|
51908
|
+
*/
|
|
51909
|
+
tenantId?: string;
|
|
51910
|
+
static names(): { [key: string]: string } {
|
|
51911
|
+
return {
|
|
51912
|
+
tenantId: 'tenantId',
|
|
51913
|
+
};
|
|
51914
|
+
}
|
|
51915
|
+
|
|
51916
|
+
static types(): { [key: string]: any } {
|
|
51917
|
+
return {
|
|
51918
|
+
tenantId: 'string',
|
|
51919
|
+
};
|
|
51920
|
+
}
|
|
51921
|
+
|
|
51922
|
+
constructor(map?: { [key: string]: any }) {
|
|
51923
|
+
super(map);
|
|
51924
|
+
}
|
|
51925
|
+
}
|
|
51926
|
+
|
|
51927
|
+
export class GetTodoTaskResponseBodyDetailUrl extends $tea.Model {
|
|
51928
|
+
/**
|
|
51929
|
+
* @example
|
|
51930
|
+
* dingtalk://dingtalkclient/action/open_mini_app?miniAppId={0}&ddMode=push&page=pages%2ftask-detail%2ftask-detail%3ftaskId%3d{1}
|
|
51931
|
+
*/
|
|
51932
|
+
appUrl?: string;
|
|
51933
|
+
/**
|
|
51934
|
+
* @example
|
|
51935
|
+
* https://todo.dingtalk.com/ding-portal/detail/task/{0}
|
|
51936
|
+
*/
|
|
51937
|
+
pcUrl?: string;
|
|
51938
|
+
static names(): { [key: string]: string } {
|
|
51939
|
+
return {
|
|
51940
|
+
appUrl: 'AppUrl',
|
|
51941
|
+
pcUrl: 'PcUrl',
|
|
51942
|
+
};
|
|
51943
|
+
}
|
|
51944
|
+
|
|
51945
|
+
static types(): { [key: string]: any } {
|
|
51946
|
+
return {
|
|
51947
|
+
appUrl: 'string',
|
|
51948
|
+
pcUrl: 'string',
|
|
51949
|
+
};
|
|
51950
|
+
}
|
|
51951
|
+
|
|
51952
|
+
constructor(map?: { [key: string]: any }) {
|
|
51953
|
+
super(map);
|
|
51954
|
+
}
|
|
51955
|
+
}
|
|
51956
|
+
|
|
51572
51957
|
export class GetUserHeadersAccountContext extends $tea.Model {
|
|
51573
51958
|
/**
|
|
51574
51959
|
* @example
|
|
@@ -71508,6 +71893,76 @@ export default class Client extends OpenApi {
|
|
|
71508
71893
|
return await this.getTemplateListByUserIdWithOptions(request, headers, runtime);
|
|
71509
71894
|
}
|
|
71510
71895
|
|
|
71896
|
+
/**
|
|
71897
|
+
* 获取钉钉待办任务详情
|
|
71898
|
+
*
|
|
71899
|
+
* @param tmpReq - GetTodoTaskRequest
|
|
71900
|
+
* @param tmpHeader - GetTodoTaskHeaders
|
|
71901
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
71902
|
+
* @returns GetTodoTaskResponse
|
|
71903
|
+
*/
|
|
71904
|
+
async getTodoTaskWithOptions(tmpReq: GetTodoTaskRequest, tmpHeader: GetTodoTaskHeaders, runtime: $Util.RuntimeOptions): Promise<GetTodoTaskResponse> {
|
|
71905
|
+
Util.validateModel(tmpReq);
|
|
71906
|
+
let request = new GetTodoTaskShrinkRequest({ });
|
|
71907
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
71908
|
+
let headers = new GetTodoTaskShrinkHeaders({ });
|
|
71909
|
+
OpenApiUtil.convert(tmpHeader, headers);
|
|
71910
|
+
if (!Util.isUnset(tmpHeader.accountContext)) {
|
|
71911
|
+
headers.accountContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpHeader.accountContext, "AccountContext", "json");
|
|
71912
|
+
}
|
|
71913
|
+
|
|
71914
|
+
if (!Util.isUnset(tmpReq.tenantContext)) {
|
|
71915
|
+
request.tenantContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tenantContext, "TenantContext", "json");
|
|
71916
|
+
}
|
|
71917
|
+
|
|
71918
|
+
let body : {[key: string ]: any} = { };
|
|
71919
|
+
if (!Util.isUnset(request.taskId)) {
|
|
71920
|
+
body["TaskId"] = request.taskId;
|
|
71921
|
+
}
|
|
71922
|
+
|
|
71923
|
+
if (!Util.isUnset(request.tenantContextShrink)) {
|
|
71924
|
+
body["TenantContext"] = request.tenantContextShrink;
|
|
71925
|
+
}
|
|
71926
|
+
|
|
71927
|
+
let realHeaders : {[key: string ]: string} = { };
|
|
71928
|
+
if (!Util.isUnset(headers.commonHeaders)) {
|
|
71929
|
+
realHeaders = headers.commonHeaders;
|
|
71930
|
+
}
|
|
71931
|
+
|
|
71932
|
+
if (!Util.isUnset(headers.accountContextShrink)) {
|
|
71933
|
+
realHeaders["AccountContext"] = Util.toJSONString(headers.accountContextShrink);
|
|
71934
|
+
}
|
|
71935
|
+
|
|
71936
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
71937
|
+
headers: realHeaders,
|
|
71938
|
+
body: OpenApiUtil.parseToMap(body),
|
|
71939
|
+
});
|
|
71940
|
+
let params = new $OpenApi.Params({
|
|
71941
|
+
action: "GetTodoTask",
|
|
71942
|
+
version: "2023-04-26",
|
|
71943
|
+
protocol: "HTTPS",
|
|
71944
|
+
pathname: `/dingtalk/v1/task/getTodoTask`,
|
|
71945
|
+
method: "POST",
|
|
71946
|
+
authType: "AK",
|
|
71947
|
+
style: "ROA",
|
|
71948
|
+
reqBodyType: "formData",
|
|
71949
|
+
bodyType: "json",
|
|
71950
|
+
});
|
|
71951
|
+
return $tea.cast<GetTodoTaskResponse>(await this.callApi(params, req, runtime), new GetTodoTaskResponse({}));
|
|
71952
|
+
}
|
|
71953
|
+
|
|
71954
|
+
/**
|
|
71955
|
+
* 获取钉钉待办任务详情
|
|
71956
|
+
*
|
|
71957
|
+
* @param request - GetTodoTaskRequest
|
|
71958
|
+
* @returns GetTodoTaskResponse
|
|
71959
|
+
*/
|
|
71960
|
+
async getTodoTask(request: GetTodoTaskRequest): Promise<GetTodoTaskResponse> {
|
|
71961
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
71962
|
+
let headers = new GetTodoTaskHeaders({ });
|
|
71963
|
+
return await this.getTodoTaskWithOptions(request, headers, runtime);
|
|
71964
|
+
}
|
|
71965
|
+
|
|
71511
71966
|
/**
|
|
71512
71967
|
* 获取专属账号信息
|
|
71513
71968
|
*
|