@dronedeploy/rocos-js-sdk 3.0.1-alpha.34 → 3.0.1-alpha.35
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/models/target/Target.d.ts +3 -10
- package/cjs/models/target/Target.js +5 -0
- package/cjs/services/TargetService.d.ts +3 -3
- package/esm/models/target/Target.d.ts +3 -10
- package/esm/models/target/Target.js +3 -1
- package/esm/services/TargetService.d.ts +3 -3
- package/esm/services/TargetService.js +1 -1
- package/package.json +1 -1
@@ -9,24 +9,17 @@ export interface Target extends TargetBase {
|
|
9
9
|
translation?: Vector3;
|
10
10
|
rotation?: Quaternion;
|
11
11
|
media?: TargetMedia[];
|
12
|
-
|
13
|
-
* Media associated with the target (images)
|
14
|
-
*/
|
12
|
+
position?: TargetWgs84 | Vector3;
|
15
13
|
frame?: string;
|
16
14
|
}
|
17
15
|
export interface TargetMedia {
|
18
16
|
id: string;
|
19
17
|
data: Record<string, string>;
|
20
18
|
}
|
21
|
-
export interface
|
19
|
+
export interface TargetWgs84 {
|
22
20
|
lat: number;
|
23
21
|
lon: number;
|
24
22
|
alt?: number;
|
25
23
|
}
|
26
|
-
export
|
27
|
-
data?: Record<string, string>;
|
28
|
-
position?: CreateTargetPositionWgs84 | Vector3;
|
29
|
-
frame?: string;
|
30
|
-
}
|
24
|
+
export declare const isTargetWgs84: (position: TargetWgs84 | Vector3) => position is TargetWgs84;
|
31
25
|
export type Asset = Target;
|
32
|
-
export type CreateAsset = CreateTarget;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Asset,
|
1
|
+
import { Asset, IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
2
2
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
3
3
|
/**
|
4
4
|
* Service for managing targets (such as assets, PoI's, or FLOCS) on DroneDeploy
|
@@ -8,9 +8,9 @@ export declare class TargetService extends BaseServiceAbstract implements IBaseS
|
|
8
8
|
constructor(config: IRocosSDKConfig);
|
9
9
|
getStatus(): boolean;
|
10
10
|
protected getError(e: Error): RocosError;
|
11
|
-
createTargets(projectId: string, targets:
|
11
|
+
createTargets(projectId: string, targets: Target[]): Promise<void>;
|
12
12
|
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
13
|
-
createAssets(projectId: string, assets:
|
13
|
+
createAssets(projectId: string, assets: Asset[]): Promise<void>;
|
14
14
|
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
15
15
|
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
16
16
|
}
|
@@ -9,24 +9,17 @@ export interface Target extends TargetBase {
|
|
9
9
|
translation?: Vector3;
|
10
10
|
rotation?: Quaternion;
|
11
11
|
media?: TargetMedia[];
|
12
|
-
|
13
|
-
* Media associated with the target (images)
|
14
|
-
*/
|
12
|
+
position?: TargetWgs84 | Vector3;
|
15
13
|
frame?: string;
|
16
14
|
}
|
17
15
|
export interface TargetMedia {
|
18
16
|
id: string;
|
19
17
|
data: Record<string, string>;
|
20
18
|
}
|
21
|
-
export interface
|
19
|
+
export interface TargetWgs84 {
|
22
20
|
lat: number;
|
23
21
|
lon: number;
|
24
22
|
alt?: number;
|
25
23
|
}
|
26
|
-
export
|
27
|
-
data?: Record<string, string>;
|
28
|
-
position?: CreateTargetPositionWgs84 | Vector3;
|
29
|
-
frame?: string;
|
30
|
-
}
|
24
|
+
export declare const isTargetWgs84: (position: TargetWgs84 | Vector3) => position is TargetWgs84;
|
31
25
|
export type Asset = Target;
|
32
|
-
export type CreateAsset = CreateTarget;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Asset,
|
1
|
+
import { Asset, IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
2
2
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
3
3
|
/**
|
4
4
|
* Service for managing targets (such as assets, PoI's, or FLOCS) on DroneDeploy
|
@@ -8,9 +8,9 @@ export declare class TargetService extends BaseServiceAbstract implements IBaseS
|
|
8
8
|
constructor(config: IRocosSDKConfig);
|
9
9
|
getStatus(): boolean;
|
10
10
|
protected getError(e: Error): RocosError;
|
11
|
-
createTargets(projectId: string, targets:
|
11
|
+
createTargets(projectId: string, targets: Target[]): Promise<void>;
|
12
12
|
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
13
|
-
createAssets(projectId: string, assets:
|
13
|
+
createAssets(projectId: string, assets: Asset[]): Promise<void>;
|
14
14
|
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
15
15
|
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
16
16
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { API_ASSETS_UPLOAD_URL, API_ASSETS_URL, API_TARGETS_URL, API_TARGET_UPLOAD_URL } from '../constants/api';
|
2
|
-
import { RocosError, errorCodes
|
2
|
+
import { RocosError, errorCodes } from '../models';
|
3
3
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
4
4
|
import { RocosLogger } from '../logger/RocosLogger';
|
5
5
|
import { formatServiceUrl } from '../helpers/formatServiceUrl';
|