kuzzle-device-manager-types 2.4.0-beta.5 → 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.
|
@@ -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,7 +34,7 @@ export declare class AssetService {
|
|
|
33
34
|
scroll?: string;
|
|
34
35
|
lang?: string;
|
|
35
36
|
}): Promise<SearchResult<KHit<AssetContent>>>;
|
|
36
|
-
migrateTenant(user: User, assetsList: string[], engineId: string, newEngineId: string): Promise<
|
|
37
|
+
migrateTenant(user: User, assetsList: string[], engineId: string, newEngineId: string): Promise<ApiAssetMigrateTenantResult>;
|
|
37
38
|
/**
|
|
38
39
|
* Replace an asset metadata
|
|
39
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,5 +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<
|
|
20
|
+
migrateTenant(request: KuzzleRequest): Promise<ApiAssetMigrateTenantResult>;
|
|
21
21
|
}
|
|
@@ -104,5 +104,8 @@ export interface ApiAssetMigrateTenantRequest extends AssetsControllerRequest {
|
|
|
104
104
|
newEngineId: string;
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
export type ApiAssetMigrateTenantResult =
|
|
107
|
+
export type ApiAssetMigrateTenantResult = {
|
|
108
|
+
errors: string[];
|
|
109
|
+
successes: string[];
|
|
110
|
+
};
|
|
108
111
|
export {};
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This recovery queue has been made by the paas team here https://github.com/kuzzleio/paas-console/blob/master/apps/api/lib/api/RecoveryQueue.ts
|
|
3
|
-
* The RecoveryQueue allows you to store action to perform later and trigger
|
|
4
|
-
* all of it at once.
|
|
5
|
-
*/
|
|
6
|
-
export declare class RecoveryQueue {
|
|
7
|
-
private actions;
|
|
8
|
-
constructor();
|
|
9
|
-
/**
|
|
10
|
-
* The addRecovery function adds a recovery function to an array of actions.
|
|
11
|
-
* @param {any} func - The `func` parameter is a function that you want to add to the `actions` array.
|
|
12
|
-
*/
|
|
13
|
-
addRecovery(func: any): void;
|
|
14
|
-
/**
|
|
15
|
-
* The "reset" function clears the "actions" array.
|
|
16
|
-
*/
|
|
17
|
-
reset(): void;
|
|
18
|
-
/**
|
|
19
|
-
* The `rollback` function iterates through a list of actions in reverse order and attempts to execute
|
|
20
|
-
* each action, logging any errors encountered.
|
|
21
|
-
*/
|
|
22
|
-
rollback(): Promise<void>;
|
|
23
|
-
}
|