kuzzle-device-manager-types 2.4.0-beta.4 → 2.4.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/modules/asset/AssetService.d.ts +2 -0
- package/dist/lib/modules/asset/AssetsController.d.ts +2 -1
- package/dist/lib/modules/asset/types/AssetApi.d.ts +12 -0
- package/dist/lib/modules/device/DeviceService.d.ts +1 -0
- package/dist/lib/modules/device/types/DeviceEvents.d.ts +29 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { DeviceManagerPlugin } from "../plugin";
|
|
|
4
4
|
import { Metadata } from "../shared";
|
|
5
5
|
import { AssetHistoryService } from "./AssetHistoryService";
|
|
6
6
|
import { AssetContent } from "./types/AssetContent";
|
|
7
|
+
import { ApiAssetMigrateTenantResult } from "./types/AssetApi";
|
|
7
8
|
export declare class AssetService {
|
|
8
9
|
private context;
|
|
9
10
|
private config;
|
|
@@ -33,6 +34,7 @@ export declare class AssetService {
|
|
|
33
34
|
scroll?: string;
|
|
34
35
|
lang?: string;
|
|
35
36
|
}): Promise<SearchResult<KHit<AssetContent>>>;
|
|
37
|
+
migrateTenant(user: User, assetsList: string[], engineId: string, newEngineId: string): Promise<ApiAssetMigrateTenantResult>;
|
|
36
38
|
/**
|
|
37
39
|
* Replace an asset metadata
|
|
38
40
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ControllerDefinition, KuzzleRequest } from "kuzzle";
|
|
2
2
|
import { DeviceManagerPlugin } from "../plugin";
|
|
3
3
|
import { AssetService } from "./AssetService";
|
|
4
|
-
import { ApiAssetCreateResult, ApiAssetDeleteResult, ApiAssetGetMeasuresResult, ApiAssetGetResult, ApiAssetSearchResult, ApiAssetUpdateResult } from "./types/AssetApi";
|
|
4
|
+
import { ApiAssetCreateResult, ApiAssetDeleteResult, ApiAssetGetMeasuresResult, ApiAssetGetResult, ApiAssetSearchResult, ApiAssetUpdateResult, ApiAssetMigrateTenantResult } from "./types/AssetApi";
|
|
5
5
|
export declare class AssetsController {
|
|
6
6
|
private plugin;
|
|
7
7
|
private assetService;
|
|
@@ -17,4 +17,5 @@ export declare class AssetsController {
|
|
|
17
17
|
getMeasures(request: KuzzleRequest): Promise<ApiAssetGetMeasuresResult>;
|
|
18
18
|
exportMeasures(request: KuzzleRequest): Promise<any>;
|
|
19
19
|
export(request: KuzzleRequest): Promise<any>;
|
|
20
|
+
migrateTenant(request: KuzzleRequest): Promise<ApiAssetMigrateTenantResult>;
|
|
20
21
|
}
|
|
@@ -96,4 +96,16 @@ export interface ApiAssetExportRequest extends AssetsControllerRequest {
|
|
|
96
96
|
export type ApiAssetExportResult = {
|
|
97
97
|
link: string;
|
|
98
98
|
};
|
|
99
|
+
export interface ApiAssetMigrateTenantRequest extends AssetsControllerRequest {
|
|
100
|
+
action: "migrateTenant";
|
|
101
|
+
engineId: string;
|
|
102
|
+
body: {
|
|
103
|
+
assetsList: string[];
|
|
104
|
+
newEngineId: string;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export type ApiAssetMigrateTenantResult = {
|
|
108
|
+
errors: string[];
|
|
109
|
+
successes: string[];
|
|
110
|
+
};
|
|
99
111
|
export {};
|
|
@@ -2,6 +2,7 @@ import { User } from "kuzzle";
|
|
|
2
2
|
import { KDocument } from "kuzzle-sdk";
|
|
3
3
|
import { Metadata } from "../../../modules/shared";
|
|
4
4
|
import { DeviceContent } from "./DeviceContent";
|
|
5
|
+
import { ApiDeviceLinkAssetRequest } from "./DeviceApi";
|
|
5
6
|
export type EventDeviceUpdateBefore = {
|
|
6
7
|
name: "device-manager:device:update:before";
|
|
7
8
|
args: [{
|
|
@@ -19,6 +20,17 @@ export type EventDeviceUpdateAfter = {
|
|
|
19
20
|
/**
|
|
20
21
|
* @internal
|
|
21
22
|
*/
|
|
23
|
+
export type AskDeviceLinkAsset = {
|
|
24
|
+
name: "ask:device-manager:device:link-asset";
|
|
25
|
+
payload: {
|
|
26
|
+
engineId: string;
|
|
27
|
+
assetId: string;
|
|
28
|
+
deviceId: string;
|
|
29
|
+
user: User;
|
|
30
|
+
measureNames: ApiDeviceLinkAssetRequest["body"]["measureNames"];
|
|
31
|
+
};
|
|
32
|
+
result: void;
|
|
33
|
+
};
|
|
22
34
|
export type AskDeviceUnlinkAsset = {
|
|
23
35
|
name: "ask:device-manager:device:unlink-asset";
|
|
24
36
|
payload: {
|
|
@@ -27,3 +39,20 @@ export type AskDeviceUnlinkAsset = {
|
|
|
27
39
|
};
|
|
28
40
|
result: void;
|
|
29
41
|
};
|
|
42
|
+
export type AskDeviceDetachEngine = {
|
|
43
|
+
name: "ask:device-manager:device:detach-engine";
|
|
44
|
+
payload: {
|
|
45
|
+
deviceId: string;
|
|
46
|
+
user: User;
|
|
47
|
+
};
|
|
48
|
+
result: void;
|
|
49
|
+
};
|
|
50
|
+
export type AskDeviceAttachEngine = {
|
|
51
|
+
name: "ask:device-manager:device:attach-engine";
|
|
52
|
+
payload: {
|
|
53
|
+
engineId: string;
|
|
54
|
+
deviceId: string;
|
|
55
|
+
user: User;
|
|
56
|
+
};
|
|
57
|
+
result: void;
|
|
58
|
+
};
|