Skip to content

Latest commit

 

History

History
852 lines (401 loc) · 10.1 KB

File metadata and controls

852 lines (401 loc) · 10.1 KB

LIB_Classification class

综合库 / 库分类索引类

Signature

declare class LIB_Classification 

Methods

Method

Modifiers

Description

createPrimary(libraryUuid, libraryType, primaryClassificationName)

(BETA) 创建一级分类

createSecondary(libraryUuid, libraryType, primaryClassificationUuid, secondaryClassificationName)

(BETA) 创建二级分类

deleteByIndex(classificationIndex)

(BETA) 删除指定索引的分类

deleteByUuid(libraryUuid, classificationUuid)

(BETA) 删除指定 UUID 的分类

getAllClassificationTree(libraryUuid, libraryType)

(BETA) 获取所有分类信息组成的树

getIndexByName(libraryUuid, libraryType, primaryClassificationName, secondaryClassificationName)

(BETA) 获取指定名称的分类的分类索引

getNameByIndex(classificationIndex)

(BETA) 获取指定索引的分类的名称

getNameByUuid(libraryUuid, libraryType, primaryClassificationUuid, secondaryClassificationUuid)

(BETA) 获取指定 UUID 的分类的名称


方法详情

createprimary

LIB_Classification.createPrimary() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

  • since EDA v3.2; dropped EDA v3.3

创建一级分类

Signature

createPrimary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;

Parameters

Parameter

Type

Description

libraryUuid

string

库 UUID

libraryType

ELIB_LibraryType

库类型

primaryClassificationName

string

一级分类名称

Returns

Promise<ILIB_ClassificationIndex | undefined>

分类索引

createsecondary

LIB_Classification.createSecondary() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

  • since EDA v3.2; dropped EDA v3.3

创建二级分类

Signature

createSecondary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationName: string): Promise<ILIB_ClassificationIndex | undefined>;

Parameters

Parameter

Type

Description

libraryUuid

string

库 UUID

libraryType

ELIB_LibraryType

库类型

primaryClassificationUuid

string

一级分类 UUID

secondaryClassificationName

string

二级分类名称

Returns

Promise<ILIB_ClassificationIndex | undefined>

分类索引

deletebyindex

LIB_Classification.deleteByIndex() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

  • since EDA v3.2; dropped EDA v3.3

删除指定索引的分类

Signature

deleteByIndex(classificationIndex: ILIB_ClassificationIndex): Promise<boolean>;

Parameters

Parameter

Type

Description

classificationIndex

ILIB_ClassificationIndex

分类索引

Returns

Promise<boolean>

操作是否成功

deletebyuuid

LIB_Classification.deleteByUuid() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

删除指定 UUID 的分类

Signature

deleteByUuid(libraryUuid: string, classificationUuid: string): Promise<boolean>;

Parameters

Parameter

Type

Description

libraryUuid

string

库 UUID

classificationUuid

string

Returns

Promise<boolean>

操作是否成功

getallclassificationtree

LIB_Classification.getAllClassificationTree() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

获取所有分类信息组成的树

Signature

getAllClassificationTree(libraryUuid: string, libraryType: ELIB_LibraryType): Promise<Array<{
        name: string;
        uuid: string;
        children?: Array<{
            name: string;
            uuid: string;
        }> | undefined;
    }>>;

Parameters

Parameter

Type

Description

libraryUuid

string

库 UUID

libraryType

ELIB_LibraryType

库类型

Returns

Promise<Array<{ name: string; uuid: string; children?: Array<{ name: string; uuid: string; }> | undefined; }>>

分类信息组成的树结构数据

getindexbyname

LIB_Classification.getIndexByName() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

  • since EDA v3.2; dropped EDA v3.3

获取指定名称的分类的分类索引

Signature

getIndexByName(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string, secondaryClassificationName?: string): Promise<ILIB_ClassificationIndex | undefined>;

Parameters

Parameter

Type

Description

libraryUuid

string

库 UUID

libraryType

ELIB_LibraryType

库类型

primaryClassificationName

string

一级分类名称

secondaryClassificationName

string

(Optional) 二级分类名称

Returns

Promise<ILIB_ClassificationIndex | undefined>

分类索引

Remarks

分类索引内包含分类的 UUID,具体可查阅 ILIB_ClassificationIndex

getnamebyindex

LIB_Classification.getNameByIndex() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

  • since EDA v3.2; dropped EDA v3.3

获取指定索引的分类的名称

Signature

getNameByIndex(classificationIndex: ILIB_ClassificationIndex): Promise<{
        primaryClassificationName: string;
        secondaryClassificationName?: string | undefined;
    } | undefined>;

Parameters

Parameter

Type

Description

classificationIndex

ILIB_ClassificationIndex

分类索引

Returns

Promise<{ primaryClassificationName: string; secondaryClassificationName?: string | undefined; } | undefined>

两级分类的名称

getnamebyuuid

LIB_Classification.getNameByUuid() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

获取指定 UUID 的分类的名称

Signature

getNameByUuid(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationUuid?: string): Promise<{
        primaryClassificationName: string;
        secondaryClassificationName?: string | undefined;
    } | undefined>;

Parameters

Parameter

Type

Description

libraryUuid

string

库 UUID

libraryType

ELIB_LibraryType

库类型

primaryClassificationUuid

string

一级分类 UUID

secondaryClassificationUuid

string

(Optional) 二级分类 UUID,如若不指定,则只获取一级分类的信息

Returns

Promise<{ primaryClassificationName: string; secondaryClassificationName?: string | undefined; } | undefined>

两级分类的名称