@kaaiot/services
Version:
Type definitions for KaaIoT platform REST API service communication
94 lines (93 loc) • 2.35 kB
TypeScript
export interface AssetType {
id: string;
type: string;
description: string;
displayName: string;
definitionJsonSchema: string;
uiJsonSchema: string;
tenantId: string;
createdAt: string;
updatedAt: string;
}
export declare enum FilterOperatorType {
And = "and",
Or = "or"
}
export interface Asset {
id: string;
name?: string;
definition: string;
assetTypeId: string;
uiJsonSchema?: string;
createdAt: string;
updatedAt: string;
}
export interface AssetWithDefinition extends Omit<Asset, 'definition'> {
definition: Record<string, any>;
}
export interface ListItemsResponse<T> {
content: T;
totalElements: number;
}
export declare type CreateAssetTypePayload = Omit<AssetType, 'id' | 'createdAt' | 'updatedAt' | 'tenantId'>;
export declare enum DateSortFields {
CreatedAt = "createdAt",
UpdatedAt = "updatedAt"
}
export declare type SortOrder = 'asc' | 'desc';
export declare enum RelationEntityType {
Asset = "ASSET",
Endpoint = "ENDPOINT",
Application = "APPLICATION",
AssetType = "ASSET_TYPE"
}
export declare enum RelationType {
CONTAINS = "CONTAINS",
SUPPORTS = "SUPPORTS",
MANAGES = "MANAGES",
CONTROLS = "CONTROLS"
}
export declare enum MatchMode {
EQUAL = "EQUAL",
LIKE = "LIKE"
}
export interface AssetRelation {
fromEntityId: string;
fromEntityType: RelationEntityType;
toEntityId: string;
toEntityType: RelationEntityType;
relationType: RelationType;
createdAt: string;
updatedAt: string;
type?: RelationEntityType;
id?: string;
}
export interface GetAssetsParams {
assetTypeIds?: string;
page: number;
size: number;
offset?: number;
}
export interface GetAssetsPayloadCondition {
key?: string;
in?: any[];
matchMode?: MatchMode;
and?: GetAssetsPayloadCondition[];
or?: GetAssetsPayloadCondition[];
}
export declare enum SortDirection {
Desc = "DESC",
Asc = "ASC"
}
interface GetAssetsSortCondition {
key: string;
direction: SortDirection;
}
export interface GetAssetsPayload {
assetIds?: string[];
and?: GetAssetsPayloadCondition[];
or?: GetAssetsPayloadCondition[];
sort?: GetAssetsSortCondition;
}
export declare type AssetRelationPayload = Omit<AssetRelation, 'createdAt' | 'updatedAt'>;
export {};