@gaiot/apis
Version:
aiot apis
264 lines (263 loc) • 6.63 kB
TypeScript
export interface PointOfInterest {
pitch: number;
yaw: number;
type: 'scene' | 'label';
text: string;
sceneId: string;
targetPitch?: number;
targetYaw?: number;
targetHfov?: number;
id: number | string;
cssClass?: string;
createTooltipFunc?: Function;
createTooltipArgs?: object;
clickHandlerFunc?: Function;
clickHandlerArgs?: object;
scale?: boolean;
}
export interface Config {
type: 'equirectangular' | 'cubemap' | 'multires';
title: string;
author: string;
authorURL: string;
basePath: string;
autoLoad: boolean;
autoRotate: number;
autoRotateInactivityDelay: number;
autoRotateStopDelay: number;
fallback: string;
orientationOnByDefault: boolean;
showZoomCtrl: boolean;
keyboardZoom: boolean;
mouseZoom: boolean | string;
draggable: boolean;
friction: number;
disableKeyboardCtrl: boolean;
showFullscreenCtrl: boolean;
showControls: boolean;
touchPanSpeedCoeffFactor: number;
yaw: number;
pitch: number;
hfov: number;
minYaw: number;
maxYaw: number;
minPitch: number;
maxPitch: number;
minHfov: number;
maxHfov: number;
multiResMinHfov: boolean;
compass: boolean;
northOffset: number;
preview: string;
previewTitle: string;
previewAuthor: string;
horizonPitch: number;
horizonRoll: number;
animationTimingFunction: (param: [number, number]) => [number, number];
escapeHTML: boolean;
crossOrigin: string;
hotSpots: PointOfInterest[];
hotSpotDebug: boolean;
sceneFadeDuration: number;
capturedKeyNumbers: number[];
backgroundColor: [number, number, number];
avoidShowingBackground: boolean;
}
export interface RecordQueryParams {
afterAt?: string;
beforeAt?: string;
orgId?: string | number;
status?: string;
pageNo?: number;
pageSize?: number;
}
export type Point = [number, number];
export type GUICoords = {
x: number;
y: number;
};
export interface PanoramaCoords {
pitch: number;
yaw: number;
}
export interface RecordCreateParams {
beginAt: string;
finishedAt: string;
points: [Point, Point];
orgId: string;
drawingFileUrl?: string;
drawingFileBase64?: string;
}
export interface Record {
id: string;
status: string;
creator?: string;
mergingInfo?: {
firstSceneId: string;
};
drawingUrl: string;
slimDrawingUrl: string;
fileUrls: string[];
beginAt: string;
finishedAt: string;
points: GUICoords[];
orgID: string;
device: {
brand: string;
model: string;
};
label?: any;
createdAt: string;
updatedAt: string;
deletedAt: string;
tenantCode: string;
scenes: Scene[];
}
export interface BindRecord {
spacetwinsId: string;
}
export interface BindScene {
sceneId: string;
}
export declare enum RecordStatus {
Collecting = "\u91C7\u96C6\u4E2D",
CollectionTimeout = "\u8D85\u65F6",
CollectionFinish = "\u5B8C\u6210",
WaitUpload = "\u7B49\u5F85\u4E0A\u4F20",
Uploading = "\u4E0A\u4F20\u4E2D",
UploadFinish = "\u4E0A\u4F20\u5B8C\u6210",
UploadFailed = "\u4E0A\u4F20\u5931\u8D25",
WaitMerge = "\u7B49\u5F85\u5408\u6210",
CreateMergeTaskFailed = "\u521B\u5EFA\u5408\u6210\u4EFB\u52A1\u5931\u8D25",
Merging = "\u5408\u6210\u4E2D",
MergeFailed = "\u5408\u6210\u5931\u8D25",
MergeFinish = "\u5408\u6210\u6210\u529F"
}
export interface ViewToken {
viewToken: string;
expireIn: number;
}
export type SpotType = 'scene' | 'info';
export interface Spot extends PanoramaCoords, BindScene {
type: SpotType;
}
export interface HotSpot extends Spot {
type: 'scene';
}
export type RenderType = 'cubemap';
export interface Scene extends PanoramaCoords, GUICoords, BindRecord, BindScene {
type: RenderType;
cubeMap: [string, string, string, string, string, string];
prefix: string;
hotSpots: HotSpot[];
}
export type TrackType = 'map' | 'bim';
export interface TrackPoint extends GUICoords {
id: string;
}
export type UploadStatus = 'Uploading' | 'UploadFinish' | 'UploadFailed';
export interface PanoramaJWTPayload {
ro: 'resource';
ten: string;
uid: string;
rid: string;
pdt: 'panorama';
coms: ['data'];
ext: {
spaceTwinsId: string;
};
exp: number;
}
export interface ISpacetwinParams {
afterAt?: string;
beforeAt?: string;
orgId?: string | number;
status?: string;
spacetwinsIds?: string[];
pageNo?: number;
pageSize?: number;
}
export interface ISpacetwinCreateParams {
areaId: number;
beginAt: string;
finishedAt: string;
points: IPoint[];
scheduleId: number;
monomerId: number;
device: {
brand: string;
model: string;
};
fileUrls: string[];
orgId: number;
localFileNames: string[];
drawingBase64: string;
drawingUrl: string;
lastSpaceTwinsId: string;
aiAnalysis: {
aiSchedule: {
areas: {
id: string;
posX: number;
posY: number;
posR: number;
}[];
};
};
}
export interface IPoint {
x: number;
y: number;
}
export interface ISpacetwin {
id: string;
status: string;
creator?: string;
mergingInfo: any;
drawingUrl: string;
slimDrawingUrl: string;
fileUrls: string[];
beginAt: string;
finishedAt: string;
points: IPoint[];
orgId: string;
device: {
brand: string;
model: string;
};
label?: any;
createdAt: string;
updatedAt: string;
deletedAt: string;
tenantCode: string;
}
export declare enum ISpacetwinStatus {
Collecting = "\u91C7\u96C6\u4E2D",
CollectionTimeout = "\u8D85\u65F6",
CollectionFinish = "\u5B8C\u6210",
WaitUpload = "\u7B49\u5F85\u4E0A\u4F20",
Uploading = "\u4E0A\u4F20\u4E2D",
UploadFinish = "\u4E0A\u4F20\u5B8C\u6210",
UploadFailed = "\u4E0A\u4F20\u5931\u8D25",
WaitMerge = "\u7B49\u5F85\u5408\u6210",
CreateMergeTaskFailed = "\u521B\u5EFA\u5408\u6210\u4EFB\u52A1\u5931\u8D25",
Merging = "\u5408\u6210\u4E2D",
MergeFailed = "\u5408\u6210\u5931\u8D25",
MergeFinish = "\u5408\u6210\u6210\u529F"
}
export interface IViewToken {
viewToken: string;
expireIn: number;
}
export interface IUploadTickets {
hw: {
accessKey: string;
secertKey: string;
securityToken: string;
bucket: string;
fileKeys: string[];
};
}
export interface TrackPoint extends GUICoords {
id: string;
}