Skip to content

Commit 021faa8

Browse files
committed
Support API UpdateConvExtension.
1 parent d9ae04f commit 021faa8

11 files changed

+427
-1
lines changed

aliding-20230426/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alicloud/aliding20230426",
3-
"version": "2.32.0",
3+
"version": "2.33.0",
44
"description": "",
55
"main": "dist/client.js",
66
"scripts": {

aliding-20230426/src/client.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18865,6 +18865,88 @@ export default class Client extends OpenApi {
1886518865
return await this.unsubscribeEventWithOptions(request, headers, runtime);
1886618866
}
1886718867

18868+
/**
18869+
* @param tmpReq - UpdateConvExtensionRequest
18870+
* @param tmpHeader - UpdateConvExtensionHeaders
18871+
* @param runtime - runtime options for this request RuntimeOptions
18872+
* @returns UpdateConvExtensionResponse
18873+
*/
18874+
async updateConvExtensionWithOptions(tmpReq: $_model.UpdateConvExtensionRequest, tmpHeader: $_model.UpdateConvExtensionHeaders, runtime: $dara.RuntimeOptions): Promise<$_model.UpdateConvExtensionResponse> {
18875+
tmpReq.validate();
18876+
let request = new $_model.UpdateConvExtensionShrinkRequest({ });
18877+
OpenApiUtil.convert(tmpReq, request);
18878+
let headers = new $_model.UpdateConvExtensionShrinkHeaders({ });
18879+
OpenApiUtil.convert(tmpHeader, headers);
18880+
if (!$dara.isNull(tmpHeader.accountContext)) {
18881+
headers.accountContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpHeader.accountContext, "AccountContext", "json");
18882+
}
18883+
18884+
if (!$dara.isNull(tmpReq.staffIdList)) {
18885+
request.staffIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.staffIdList, "StaffIdList", "json");
18886+
}
18887+
18888+
if (!$dara.isNull(tmpReq.tenantContext)) {
18889+
request.tenantContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tenantContext, "TenantContext", "json");
18890+
}
18891+
18892+
let body : {[key: string ]: any} = { };
18893+
if (!$dara.isNull(request.mobileUrl)) {
18894+
body["MobileUrl"] = request.mobileUrl;
18895+
}
18896+
18897+
if (!$dara.isNull(request.pcUrl)) {
18898+
body["PcUrl"] = request.pcUrl;
18899+
}
18900+
18901+
if (!$dara.isNull(request.staffIdListShrink)) {
18902+
body["StaffIdList"] = request.staffIdListShrink;
18903+
}
18904+
18905+
if (!$dara.isNull(request.systemUid)) {
18906+
body["SystemUid"] = request.systemUid;
18907+
}
18908+
18909+
if (!$dara.isNull(request.tenantContextShrink)) {
18910+
body["TenantContext"] = request.tenantContextShrink;
18911+
}
18912+
18913+
let realHeaders : {[key: string ]: string} = { };
18914+
if (!$dara.isNull(headers.commonHeaders)) {
18915+
realHeaders = headers.commonHeaders;
18916+
}
18917+
18918+
if (!$dara.isNull(headers.accountContextShrink)) {
18919+
realHeaders["AccountContext"] = typeof headers.accountContextShrink === "string" ? headers.accountContextShrink : JSON.stringify(headers.accountContextShrink);
18920+
}
18921+
18922+
let req = new $OpenApiUtil.OpenApiRequest({
18923+
headers: realHeaders,
18924+
body: OpenApiUtil.parseToMap(body),
18925+
});
18926+
let params = new $OpenApiUtil.Params({
18927+
action: "UpdateConvExtension",
18928+
version: "2023-04-26",
18929+
protocol: "HTTPS",
18930+
pathname: `/dingtalk/v1/conversation/updateConvExtension`,
18931+
method: "POST",
18932+
authType: "AK",
18933+
style: "ROA",
18934+
reqBodyType: "formData",
18935+
bodyType: "json",
18936+
});
18937+
return $dara.cast<$_model.UpdateConvExtensionResponse>(await this.callApi(params, req, runtime), new $_model.UpdateConvExtensionResponse({}));
18938+
}
18939+
18940+
/**
18941+
* @param request - UpdateConvExtensionRequest
18942+
* @returns UpdateConvExtensionResponse
18943+
*/
18944+
async updateConvExtension(request: $_model.UpdateConvExtensionRequest): Promise<$_model.UpdateConvExtensionResponse> {
18945+
let runtime = new $dara.RuntimeOptions({ });
18946+
let headers = new $_model.UpdateConvExtensionHeaders({ });
18947+
return await this.updateConvExtensionWithOptions(request, headers, runtime);
18948+
}
18949+
1886818950
/**
1886918951
* 更新表单数据
1887018952
*
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { UpdateConvExtensionHeadersAccountContext } from "./UpdateConvExtensionHeadersAccountContext";
4+
5+
6+
export class UpdateConvExtensionHeaders extends $dara.Model {
7+
commonHeaders?: { [key: string]: string };
8+
accountContext?: UpdateConvExtensionHeadersAccountContext;
9+
static names(): { [key: string]: string } {
10+
return {
11+
commonHeaders: 'commonHeaders',
12+
accountContext: 'AccountContext',
13+
};
14+
}
15+
16+
static types(): { [key: string]: any } {
17+
return {
18+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
19+
accountContext: UpdateConvExtensionHeadersAccountContext,
20+
};
21+
}
22+
23+
validate() {
24+
if(this.commonHeaders) {
25+
$dara.Model.validateMap(this.commonHeaders);
26+
}
27+
if(this.accountContext && typeof (this.accountContext as any).validate === 'function') {
28+
(this.accountContext as any).validate();
29+
}
30+
super.validate();
31+
}
32+
33+
constructor(map?: { [key: string]: any }) {
34+
super(map);
35+
}
36+
}
37+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class UpdateConvExtensionHeadersAccountContext extends $dara.Model {
6+
/**
7+
* @remarks
8+
* This parameter is required.
9+
*
10+
* @example
11+
* 012345
12+
*/
13+
accountId?: string;
14+
static names(): { [key: string]: string } {
15+
return {
16+
accountId: 'accountId',
17+
};
18+
}
19+
20+
static types(): { [key: string]: any } {
21+
return {
22+
accountId: 'string',
23+
};
24+
}
25+
26+
validate() {
27+
super.validate();
28+
}
29+
30+
constructor(map?: { [key: string]: any }) {
31+
super(map);
32+
}
33+
}
34+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { UpdateConvExtensionRequestTenantContext } from "./UpdateConvExtensionRequestTenantContext";
4+
5+
6+
export class UpdateConvExtensionRequest extends $dara.Model {
7+
/**
8+
* @example
9+
* https://xxx
10+
*/
11+
mobileUrl?: string;
12+
/**
13+
* @example
14+
* https://xxx
15+
*/
16+
pcUrl?: string;
17+
staffIdList?: string[];
18+
/**
19+
* @example
20+
* 546374856
21+
*/
22+
systemUid?: string;
23+
tenantContext?: UpdateConvExtensionRequestTenantContext;
24+
static names(): { [key: string]: string } {
25+
return {
26+
mobileUrl: 'MobileUrl',
27+
pcUrl: 'PcUrl',
28+
staffIdList: 'StaffIdList',
29+
systemUid: 'SystemUid',
30+
tenantContext: 'TenantContext',
31+
};
32+
}
33+
34+
static types(): { [key: string]: any } {
35+
return {
36+
mobileUrl: 'string',
37+
pcUrl: 'string',
38+
staffIdList: { 'type': 'array', 'itemType': 'string' },
39+
systemUid: 'string',
40+
tenantContext: UpdateConvExtensionRequestTenantContext,
41+
};
42+
}
43+
44+
validate() {
45+
if(Array.isArray(this.staffIdList)) {
46+
$dara.Model.validateArray(this.staffIdList);
47+
}
48+
if(this.tenantContext && typeof (this.tenantContext as any).validate === 'function') {
49+
(this.tenantContext as any).validate();
50+
}
51+
super.validate();
52+
}
53+
54+
constructor(map?: { [key: string]: any }) {
55+
super(map);
56+
}
57+
}
58+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class UpdateConvExtensionRequestTenantContext extends $dara.Model {
6+
/**
7+
* @example
8+
* xxxxxx
9+
*/
10+
tenantId?: string;
11+
static names(): { [key: string]: string } {
12+
return {
13+
tenantId: 'tenantId',
14+
};
15+
}
16+
17+
static types(): { [key: string]: any } {
18+
return {
19+
tenantId: 'string',
20+
};
21+
}
22+
23+
validate() {
24+
super.validate();
25+
}
26+
27+
constructor(map?: { [key: string]: any }) {
28+
super(map);
29+
}
30+
}
31+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
import { UpdateConvExtensionResponseBody } from "./UpdateConvExtensionResponseBody";
4+
5+
6+
export class UpdateConvExtensionResponse extends $dara.Model {
7+
headers?: { [key: string]: string };
8+
statusCode?: number;
9+
body?: UpdateConvExtensionResponseBody;
10+
static names(): { [key: string]: string } {
11+
return {
12+
headers: 'headers',
13+
statusCode: 'statusCode',
14+
body: 'body',
15+
};
16+
}
17+
18+
static types(): { [key: string]: any } {
19+
return {
20+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
21+
statusCode: 'number',
22+
body: UpdateConvExtensionResponseBody,
23+
};
24+
}
25+
26+
validate() {
27+
if(this.headers) {
28+
$dara.Model.validateMap(this.headers);
29+
}
30+
if(this.body && typeof (this.body as any).validate === 'function') {
31+
(this.body as any).validate();
32+
}
33+
super.validate();
34+
}
35+
36+
constructor(map?: { [key: string]: any }) {
37+
super(map);
38+
}
39+
}
40+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class UpdateConvExtensionResponseBody extends $dara.Model {
6+
/**
7+
* @example
8+
* True
9+
*/
10+
success?: boolean;
11+
/**
12+
* @example
13+
* 0FAAEC9C-C6C8-5C87-AF8E-1195889BBXXX
14+
*/
15+
requestId?: string;
16+
/**
17+
* @example
18+
* 0FAAEC9C-C6C8-5C87-AF8E-1195889BBXXX
19+
*/
20+
vendorRequestId?: string;
21+
/**
22+
* @example
23+
* dingtalk
24+
*/
25+
vendorType?: string;
26+
static names(): { [key: string]: string } {
27+
return {
28+
success: 'Success',
29+
requestId: 'requestId',
30+
vendorRequestId: 'vendorRequestId',
31+
vendorType: 'vendorType',
32+
};
33+
}
34+
35+
static types(): { [key: string]: any } {
36+
return {
37+
success: 'boolean',
38+
requestId: 'string',
39+
vendorRequestId: 'string',
40+
vendorType: 'string',
41+
};
42+
}
43+
44+
validate() {
45+
super.validate();
46+
}
47+
48+
constructor(map?: { [key: string]: any }) {
49+
super(map);
50+
}
51+
}
52+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class UpdateConvExtensionShrinkHeaders extends $dara.Model {
6+
commonHeaders?: { [key: string]: string };
7+
accountContextShrink?: string;
8+
static names(): { [key: string]: string } {
9+
return {
10+
commonHeaders: 'commonHeaders',
11+
accountContextShrink: 'AccountContext',
12+
};
13+
}
14+
15+
static types(): { [key: string]: any } {
16+
return {
17+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
18+
accountContextShrink: 'string',
19+
};
20+
}
21+
22+
validate() {
23+
if(this.commonHeaders) {
24+
$dara.Model.validateMap(this.commonHeaders);
25+
}
26+
super.validate();
27+
}
28+
29+
constructor(map?: { [key: string]: any }) {
30+
super(map);
31+
}
32+
}
33+

0 commit comments

Comments
 (0)