Skip to content

Commit 397f554

Browse files
committed
Support API CopyDentryByNodeId.
1 parent 9b95c76 commit 397f554

9 files changed

+474
-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.38.2",
3+
"version": "2.39.0",
44
"description": "",
55
"main": "dist/client.js",
66
"scripts": {

aliding-20230426/src/client.ts

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,92 @@ export default class Client extends OpenApi {
23432343
return await this.copyDentryWithOptions(request, headers, runtime);
23442344
}
23452345

2346+
/**
2347+
* 通过NodeId创建知识库节点副本
2348+
*
2349+
* @param tmpReq - CopyDentryByNodeIdRequest
2350+
* @param tmpHeader - CopyDentryByNodeIdHeaders
2351+
* @param runtime - runtime options for this request RuntimeOptions
2352+
* @returns CopyDentryByNodeIdResponse
2353+
*/
2354+
async copyDentryByNodeIdWithOptions(tmpReq: $_model.CopyDentryByNodeIdRequest, tmpHeader: $_model.CopyDentryByNodeIdHeaders, runtime: $dara.RuntimeOptions): Promise<$_model.CopyDentryByNodeIdResponse> {
2355+
tmpReq.validate();
2356+
let request = new $_model.CopyDentryByNodeIdShrinkRequest({ });
2357+
OpenApiUtil.convert(tmpReq, request);
2358+
let headers = new $_model.CopyDentryByNodeIdShrinkHeaders({ });
2359+
OpenApiUtil.convert(tmpHeader, headers);
2360+
if (!$dara.isNull(tmpHeader.accountContext)) {
2361+
headers.accountContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpHeader.accountContext, "AccountContext", "json");
2362+
}
2363+
2364+
if (!$dara.isNull(tmpReq.tenantContext)) {
2365+
request.tenantContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tenantContext, "TenantContext", "json");
2366+
}
2367+
2368+
let body : {[key: string ]: any} = { };
2369+
if (!$dara.isNull(request.dentryUuid)) {
2370+
body["DentryUuid"] = request.dentryUuid;
2371+
}
2372+
2373+
if (!$dara.isNull(request.name)) {
2374+
body["Name"] = request.name;
2375+
}
2376+
2377+
if (!$dara.isNull(request.tenantContextShrink)) {
2378+
body["TenantContext"] = request.tenantContextShrink;
2379+
}
2380+
2381+
if (!$dara.isNull(request.toNextNodeId)) {
2382+
body["ToNextNodeId"] = request.toNextNodeId;
2383+
}
2384+
2385+
if (!$dara.isNull(request.toParentNodeId)) {
2386+
body["ToParentNodeId"] = request.toParentNodeId;
2387+
}
2388+
2389+
if (!$dara.isNull(request.toPrevNodeId)) {
2390+
body["ToPrevNodeId"] = request.toPrevNodeId;
2391+
}
2392+
2393+
let realHeaders : {[key: string ]: string} = { };
2394+
if (!$dara.isNull(headers.commonHeaders)) {
2395+
realHeaders = headers.commonHeaders;
2396+
}
2397+
2398+
if (!$dara.isNull(headers.accountContextShrink)) {
2399+
realHeaders["AccountContext"] = typeof headers.accountContextShrink === "string" ? headers.accountContextShrink : JSON.stringify(headers.accountContextShrink);
2400+
}
2401+
2402+
let req = new $OpenApiUtil.OpenApiRequest({
2403+
headers: realHeaders,
2404+
body: OpenApiUtil.parseToMap(body),
2405+
});
2406+
let params = new $OpenApiUtil.Params({
2407+
action: "CopyDentryByNodeId",
2408+
version: "2023-04-26",
2409+
protocol: "HTTPS",
2410+
pathname: `/dingtalk/v2/documents/copyDentryByNodeId`,
2411+
method: "POST",
2412+
authType: "AK",
2413+
style: "ROA",
2414+
reqBodyType: "formData",
2415+
bodyType: "json",
2416+
});
2417+
return $dara.cast<$_model.CopyDentryByNodeIdResponse>(await this.callApi(params, req, runtime), new $_model.CopyDentryByNodeIdResponse({}));
2418+
}
2419+
2420+
/**
2421+
* 通过NodeId创建知识库节点副本
2422+
*
2423+
* @param request - CopyDentryByNodeIdRequest
2424+
* @returns CopyDentryByNodeIdResponse
2425+
*/
2426+
async copyDentryByNodeId(request: $_model.CopyDentryByNodeIdRequest): Promise<$_model.CopyDentryByNodeIdResponse> {
2427+
let runtime = new $dara.RuntimeOptions({ });
2428+
let headers = new $_model.CopyDentryByNodeIdHeaders({ });
2429+
return await this.copyDentryByNodeIdWithOptions(request, headers, runtime);
2430+
}
2431+
23462432
/**
23472433
* @param tmpReq - CreateAlidingAssistantRequest
23482434
* @param tmpHeader - CreateAlidingAssistantHeaders
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class CopyDentryByNodeIdHeadersAccountContext 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+
35+
export class CopyDentryByNodeIdHeaders extends $dara.Model {
36+
commonHeaders?: { [key: string]: string };
37+
accountContext?: CopyDentryByNodeIdHeadersAccountContext;
38+
static names(): { [key: string]: string } {
39+
return {
40+
commonHeaders: 'commonHeaders',
41+
accountContext: 'AccountContext',
42+
};
43+
}
44+
45+
static types(): { [key: string]: any } {
46+
return {
47+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
48+
accountContext: CopyDentryByNodeIdHeadersAccountContext,
49+
};
50+
}
51+
52+
validate() {
53+
if(this.commonHeaders) {
54+
$dara.Model.validateMap(this.commonHeaders);
55+
}
56+
if(this.accountContext && typeof (this.accountContext as any).validate === 'function') {
57+
(this.accountContext as any).validate();
58+
}
59+
super.validate();
60+
}
61+
62+
constructor(map?: { [key: string]: any }) {
63+
super(map);
64+
}
65+
}
66+
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class CopyDentryByNodeIdRequestTenantContext 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+
32+
export class CopyDentryByNodeIdRequest extends $dara.Model {
33+
/**
34+
* @remarks
35+
* This parameter is required.
36+
*
37+
* @example
38+
* P7QG4Yx2Jpx4OolYC1QPg5BaJ9dEq3XD
39+
*/
40+
dentryUuid?: string;
41+
/**
42+
* @remarks
43+
* This parameter is required.
44+
*/
45+
name?: string;
46+
tenantContext?: CopyDentryByNodeIdRequestTenantContext;
47+
/**
48+
* @example
49+
* P7QG4Yx2Jpx4OolYC1QPg5BaJ9dEq3XD
50+
*/
51+
toNextNodeId?: string;
52+
/**
53+
* @example
54+
* P7QG4Yx2Jpx4OolYC1QPg5BaJ9dEq3XD
55+
*/
56+
toParentNodeId?: string;
57+
/**
58+
* @example
59+
* P7QG4Yx2Jpx4OolYC1QPg5BaJ9dEq3XD
60+
*/
61+
toPrevNodeId?: string;
62+
static names(): { [key: string]: string } {
63+
return {
64+
dentryUuid: 'DentryUuid',
65+
name: 'Name',
66+
tenantContext: 'TenantContext',
67+
toNextNodeId: 'ToNextNodeId',
68+
toParentNodeId: 'ToParentNodeId',
69+
toPrevNodeId: 'ToPrevNodeId',
70+
};
71+
}
72+
73+
static types(): { [key: string]: any } {
74+
return {
75+
dentryUuid: 'string',
76+
name: 'string',
77+
tenantContext: CopyDentryByNodeIdRequestTenantContext,
78+
toNextNodeId: 'string',
79+
toParentNodeId: 'string',
80+
toPrevNodeId: 'string',
81+
};
82+
}
83+
84+
validate() {
85+
if(this.tenantContext && typeof (this.tenantContext as any).validate === 'function') {
86+
(this.tenantContext as any).validate();
87+
}
88+
super.validate();
89+
}
90+
91+
constructor(map?: { [key: string]: any }) {
92+
super(map);
93+
}
94+
}
95+
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 { CopyDentryByNodeIdResponseBody } from "./CopyDentryByNodeIdResponseBody";
4+
5+
6+
export class CopyDentryByNodeIdResponse extends $dara.Model {
7+
headers?: { [key: string]: string };
8+
statusCode?: number;
9+
body?: CopyDentryByNodeIdResponseBody;
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: CopyDentryByNodeIdResponseBody,
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: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// This file is auto-generated, don't edit it
2+
import * as $dara from '@darabonba/typescript';
3+
4+
5+
export class CopyDentryByNodeIdResponseBody extends $dara.Model {
6+
/**
7+
* @example
8+
* doc
9+
*/
10+
contentType?: string;
11+
/**
12+
* @example
13+
* 12345678
14+
*/
15+
createdTime?: number;
16+
/**
17+
* @example
18+
* cdefg
19+
*/
20+
dentryUuid?: string;
21+
/**
22+
* @example
23+
* alidoc
24+
*/
25+
extension?: string;
26+
/**
27+
* @example
28+
* 0FAAEC9C-C6C8-5C87-AF8E-1195889BBXXX
29+
*/
30+
requestId?: string;
31+
/**
32+
* @example
33+
* bcd
34+
*/
35+
spaceId?: string;
36+
/**
37+
* @example
38+
* 0FAAEC9C-C6C8-5C87-AF8E-1195889BBXXX
39+
*/
40+
vendorRequestId?: string;
41+
/**
42+
* @example
43+
* dingtalk
44+
*/
45+
vendorType?: string;
46+
static names(): { [key: string]: string } {
47+
return {
48+
contentType: 'contentType',
49+
createdTime: 'createdTime',
50+
dentryUuid: 'dentryUuid',
51+
extension: 'extension',
52+
requestId: 'requestId',
53+
spaceId: 'spaceId',
54+
vendorRequestId: 'vendorRequestId',
55+
vendorType: 'vendorType',
56+
};
57+
}
58+
59+
static types(): { [key: string]: any } {
60+
return {
61+
contentType: 'string',
62+
createdTime: 'number',
63+
dentryUuid: 'string',
64+
extension: 'string',
65+
requestId: 'string',
66+
spaceId: 'string',
67+
vendorRequestId: 'string',
68+
vendorType: 'string',
69+
};
70+
}
71+
72+
validate() {
73+
super.validate();
74+
}
75+
76+
constructor(map?: { [key: string]: any }) {
77+
super(map);
78+
}
79+
}
80+

0 commit comments

Comments
 (0)